generated-configure.sh revision 1051:6676325a167c
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
632CCACHE
633USE_PRECOMPILED_HEADER
634SJAVAC_SERVER_DIR
635ENABLE_SJAVAC
636SJAVAC_SERVER_JAVA
637JOBS
638MEMORY_SIZE
639NUM_CORES
640ENABLE_INTREE_EC
641SALIB_NAME
642HOTSPOT_MAKE_ARGS
643MSVCR_DLL
644LIBCXX
645LLVM_LIBS
646LLVM_LDFLAGS
647LLVM_CFLAGS
648LLVM_CONFIG
649LIBFFI_LIBS
650LIBFFI_CFLAGS
651STATIC_CXX_SETTING
652LIBDL
653LIBM
654LIBZIP_CAN_USE_MMAP
655USE_EXTERNAL_LIBZ
656USE_EXTERNAL_LIBPNG
657PNG_LIBS
658PNG_CFLAGS
659USE_EXTERNAL_LCMS
660LCMS_LIBS
661LCMS_CFLAGS
662USE_EXTERNAL_LIBGIF
663USE_EXTERNAL_LIBJPEG
664ALSA_LIBS
665ALSA_CFLAGS
666FREETYPE_BUNDLE_LIB_PATH
667FREETYPE_LIBS
668FREETYPE_CFLAGS
669CUPS_CFLAGS
670X_EXTRA_LIBS
671X_LIBS
672X_PRE_LIBS
673X_CFLAGS
674XMKMF
675FIXPATH
676ZIP_DEBUGINFO_FILES
677ENABLE_DEBUG_SYMBOLS
678CFLAGS_WARNINGS_ARE_ERRORS
679COMPILER_SUPPORTS_TARGET_BITS_FLAG
680ZERO_ARCHFLAG
681LDFLAGS_CXX_JDK
682LDFLAGS_JDKEXE_SUFFIX
683LDFLAGS_JDKLIB_SUFFIX
684LDFLAGS_JDKEXE
685LDFLAGS_JDKLIB
686CXXFLAGS_JDKEXE
687CXXFLAGS_JDKLIB
688CFLAGS_JDKEXE
689CFLAGS_JDKLIB
690MACOSX_VERSION_MIN
691LEGACY_EXTRA_LDFLAGS
692LEGACY_EXTRA_CXXFLAGS
693LEGACY_EXTRA_CFLAGS
694CXX_O_FLAG_NONE
695CXX_O_FLAG_NORM
696CXX_O_FLAG_HI
697CXX_O_FLAG_HIGHEST
698C_O_FLAG_NONE
699C_O_FLAG_NORM
700C_O_FLAG_HI
701C_O_FLAG_HIGHEST
702CXXFLAGS_DEBUG_SYMBOLS
703CFLAGS_DEBUG_SYMBOLS
704CXX_FLAG_DEPS
705C_FLAG_DEPS
706SET_SHARED_LIBRARY_MAPFILE
707SET_SHARED_LIBRARY_NAME
708SET_SHARED_LIBRARY_ORIGIN
709SET_EXECUTABLE_ORIGIN
710SHARED_LIBRARY_FLAGS
711CXX_FLAG_REORDER
712C_FLAG_REORDER
713SYSROOT_LDFLAGS
714SYSROOT_CFLAGS
715RC_FLAGS
716AR_OUT_OPTION
717LD_OUT_OPTION
718EXE_OUT_OPTION
719CC_OUT_OPTION
720POST_MCS_CMD
721POST_STRIP_CMD
722ARFLAGS
723COMPILER_TARGET_BITS_FLAG
724JT_HOME
725JTREGEXE
726USING_BROKEN_SUSE_LD
727PACKAGE_PATH
728LDEXECXX
729LDEXE
730USE_CLANG
731HOTSPOT_LD
732HOTSPOT_CXX
733HOTSPOT_RC
734HOTSPOT_MT
735BUILD_LD
736BUILD_CXX
737BUILD_CC
738ac_ct_OBJDUMP
739OBJDUMP
740ac_ct_OBJCOPY
741OBJCOPY
742ac_ct_NM
743ac_ct_STRIP
744MCS
745GNM
746NM
747STRIP
748DUMPBIN
749RC
750MT
751LIPO
752ac_ct_OBJC
753OBJCFLAGS
754OBJC
755ac_ct_AR
756AR
757AS
758LDCXX
759LD
760CXXCPP
761CPP
762ac_ct_CXX
763CXXFLAGS
764CXX
765ac_ct_PROPER_COMPILER_CXX
766PROPER_COMPILER_CXX
767TOOLCHAIN_PATH_CXX
768POTENTIAL_CXX
769OBJEXT
770EXEEXT
771ac_ct_CC
772CPPFLAGS
773LDFLAGS
774CFLAGS
775CC
776ac_ct_PROPER_COMPILER_CC
777PROPER_COMPILER_CC
778TOOLCHAIN_PATH_CC
779POTENTIAL_CC
780VS_LIB
781VS_INCLUDE
782VS_PATH
783CYGWIN_LINK
784EXE_SUFFIX
785OBJ_SUFFIX
786STATIC_LIBRARY
787SHARED_LIBRARY
788STATIC_LIBRARY_SUFFIX
789SHARED_LIBRARY_SUFFIX
790LIBRARY_PREFIX
791TOOLCHAIN_TYPE
792BUILD_HOTSPOT
793HOTSPOT_DIST
794BUILD_OUTPUT
795OVERRIDE_SRC_ROOT
796ADD_SRC_ROOT
797JDK_TOPDIR
798NASHORN_TOPDIR
799HOTSPOT_TOPDIR
800JAXWS_TOPDIR
801JAXP_TOPDIR
802CORBA_TOPDIR
803LANGTOOLS_TOPDIR
804JAVA_FLAGS_SMALL
805JAVA_FLAGS_BIG
806JAVA_FLAGS
807JAVAC_FLAGS
808BOOT_JDK_SOURCETARGET
809JARSIGNER
810NATIVE2ASCII
811JAR
812JAVAH
813JAVAC
814JAVA
815BOOT_JDK
816BOOT_TOOLSJAR
817BOOT_RTJAR
818JAVA_CHECK
819JAVAC_CHECK
820COOKED_BUILD_NUMBER
821JDK_VERSION
822COPYRIGHT_YEAR
823MACOSX_BUNDLE_ID_BASE
824MACOSX_BUNDLE_NAME_BASE
825COMPANY_NAME
826JDK_RC_PLATFORM_NAME
827PRODUCT_SUFFIX
828PRODUCT_NAME
829LAUNCHER_NAME
830MILESTONE
831JDK_BUILD_NUMBER
832JDK_UPDATE_VERSION
833JDK_MICRO_VERSION
834JDK_MINOR_VERSION
835JDK_MAJOR_VERSION
836USER_RELEASE_SUFFIX
837COMPRESS_JARS
838RMICONNECTOR_IIOP
839UNLIMITED_CRYPTO
840CACERTS_FILE
841TEST_IN_BUILD
842BUILD_HEADLESS
843SUPPORT_HEADFUL
844SUPPORT_HEADLESS
845BDEPS_FTP
846BDEPS_UNZIP
847OS_VERSION_MICRO
848OS_VERSION_MINOR
849OS_VERSION_MAJOR
850PKG_CONFIG
851CODESIGN
852XATTR
853DSYMUTIL
854IS_GNU_TIME
855TIME
856STAT
857HG
858READELF
859OTOOL
860LDD
861ZIP
862UNZIP
863FIND_DELETE
864MAKE
865CHECK_TOOLSDIR_MAKE
866CHECK_TOOLSDIR_GMAKE
867CHECK_MAKE
868CHECK_GMAKE
869PKGHANDLER
870OUTPUT_ROOT
871CONF_NAME
872SPEC
873BUILD_VARIANT_RELEASE
874DEBUG_CLASSFILES
875FASTDEBUG
876VARIANT
877DEBUG_LEVEL
878MACOSX_UNIVERSAL
879INCLUDE_SA
880JVM_VARIANT_CORE
881JVM_VARIANT_ZEROSHARK
882JVM_VARIANT_ZERO
883JVM_VARIANT_KERNEL
884JVM_VARIANT_MINIMAL1
885JVM_VARIANT_CLIENT
886JVM_VARIANT_SERVER
887JVM_VARIANTS
888JVM_INTERPRETER
889JDK_VARIANT
890SET_OPENJDK
891BUILD_LOG_WRAPPER
892BUILD_LOG_PREVIOUS
893BUILD_LOG
894TOPDIR
895PATH_SEP
896ZERO_ARCHDEF
897DEFINE_CROSS_COMPILE_ARCH
898LP64
899OPENJDK_TARGET_OS_EXPORT_DIR
900OPENJDK_TARGET_OS_API_DIR
901OPENJDK_TARGET_CPU_JLI_CFLAGS
902OPENJDK_TARGET_CPU_OSARCH
903OPENJDK_TARGET_CPU_ISADIR
904OPENJDK_TARGET_CPU_LIBDIR
905OPENJDK_TARGET_CPU_LEGACY_LIB
906OPENJDK_TARGET_CPU_LEGACY
907REQUIRED_OS_VERSION
908REQUIRED_OS_NAME
909COMPILE_TYPE
910OPENJDK_TARGET_CPU_ENDIAN
911OPENJDK_TARGET_CPU_BITS
912OPENJDK_TARGET_CPU_ARCH
913OPENJDK_TARGET_CPU
914OPENJDK_TARGET_OS_API
915OPENJDK_TARGET_OS
916OPENJDK_BUILD_CPU_ENDIAN
917OPENJDK_BUILD_CPU_BITS
918OPENJDK_BUILD_CPU_ARCH
919OPENJDK_BUILD_CPU
920OPENJDK_BUILD_OS_API
921OPENJDK_BUILD_OS
922OPENJDK_BUILD_AUTOCONF_NAME
923OPENJDK_TARGET_AUTOCONF_NAME
924target_os
925target_vendor
926target_cpu
927target
928host_os
929host_vendor
930host_cpu
931host
932build_os
933build_vendor
934build_cpu
935build
936SETFILE
937DF
938READLINK
939CYGPATH
940SED
941FGREP
942EGREP
943GREP
944AWK
945XARGS
946WHICH
947WC
948UNIQ
949UNAME
950TR
951TOUCH
952TEE
953TAR
954TAIL
955SORT
956SH
957RM
958PRINTF
959NAWK
960MV
961MKTEMP
962MKDIR
963LS
964LN
965HEAD
966FIND
967FILE
968EXPR
969ECHO
970DIRNAME
971DIFF
972DATE
973CUT
974CPIO
975CP
976COMM
977CMP
978CHMOD
979CAT
980BASH
981BASENAME
982DATE_WHEN_CONFIGURED
983CONFIGURE_COMMAND_LINE
984target_alias
985host_alias
986build_alias
987LIBS
988ECHO_T
989ECHO_N
990ECHO_C
991DEFS
992mandir
993localedir
994libdir
995psdir
996pdfdir
997dvidir
998htmldir
999infodir
1000docdir
1001oldincludedir
1002includedir
1003localstatedir
1004sharedstatedir
1005sysconfdir
1006datadir
1007datarootdir
1008libexecdir
1009sbindir
1010bindir
1011program_transform_name
1012prefix
1013exec_prefix
1014PACKAGE_URL
1015PACKAGE_BUGREPORT
1016PACKAGE_STRING
1017PACKAGE_VERSION
1018PACKAGE_TARNAME
1019PACKAGE_NAME
1020PATH_SEPARATOR
1021SHELL'
1022ac_subst_files=''
1023ac_user_opts='
1024enable_option_checking
1025with_target_bits
1026enable_openjdk_only
1027with_custom_make_dir
1028with_jdk_variant
1029with_jvm_interpreter
1030with_jvm_variants
1031enable_debug
1032with_debug_level
1033with_devkit
1034with_sys_root
1035with_sysroot
1036with_tools_dir
1037with_toolchain_path
1038with_extra_path
1039with_conf_name
1040with_builddeps_conf
1041with_builddeps_server
1042with_builddeps_dir
1043with_builddeps_group
1044enable_headful
1045enable_hotspot_test_in_build
1046with_cacerts_file
1047enable_unlimited_crypto
1048enable_rmiconnector_iiop
1049with_milestone
1050with_update_version
1051with_user_release_suffix
1052with_build_number
1053with_boot_jdk
1054with_boot_jdk_jvmargs
1055with_add_source_root
1056with_override_source_root
1057with_adds_and_overrides
1058with_override_langtools
1059with_override_corba
1060with_override_jaxp
1061with_override_jaxws
1062with_override_hotspot
1063with_override_nashorn
1064with_override_jdk
1065with_import_hotspot
1066with_toolchain_type
1067with_jtreg
1068with_extra_cflags
1069with_extra_cxxflags
1070with_extra_ldflags
1071enable_debug_symbols
1072enable_zip_debug_info
1073enable_macosx_runtime_support
1074with_x
1075with_cups
1076with_cups_include
1077with_freetype
1078with_freetype_include
1079with_freetype_lib
1080enable_freetype_bundling
1081with_alsa
1082with_alsa_include
1083with_alsa_lib
1084with_giflib
1085with_lcms
1086with_libpng
1087with_zlib
1088with_stdc__lib
1089with_msvcr_dll
1090with_dxsdk
1091with_dxsdk_lib
1092with_dxsdk_include
1093with_num_cores
1094with_memory_size
1095with_jobs
1096with_sjavac_server_java
1097enable_sjavac
1098enable_precompiled_headers
1099enable_ccache
1100with_ccache_dir
1101'
1102      ac_precious_vars='build_alias
1103host_alias
1104target_alias
1105BASENAME
1106BASH
1107CAT
1108CHMOD
1109CMP
1110COMM
1111CP
1112CPIO
1113CUT
1114DATE
1115DIFF
1116DIRNAME
1117ECHO
1118EXPR
1119FILE
1120FIND
1121HEAD
1122LN
1123LS
1124MKDIR
1125MKTEMP
1126MV
1127NAWK
1128PRINTF
1129RM
1130SH
1131SORT
1132TAIL
1133TAR
1134TEE
1135TOUCH
1136TR
1137UNAME
1138UNIQ
1139WC
1140WHICH
1141XARGS
1142AWK
1143GREP
1144EGREP
1145FGREP
1146SED
1147CYGPATH
1148READLINK
1149DF
1150SETFILE
1151UNZIP
1152ZIP
1153LDD
1154OTOOL
1155READELF
1156HG
1157STAT
1158TIME
1159DSYMUTIL
1160XATTR
1161CODESIGN
1162PKG_CONFIG
1163JAVA
1164JAVAC
1165JAVAH
1166JAR
1167NATIVE2ASCII
1168JARSIGNER
1169CC
1170CFLAGS
1171LDFLAGS
1172LIBS
1173CPPFLAGS
1174CXX
1175CXXFLAGS
1176CCC
1177CPP
1178CXXCPP
1179AS
1180AR
1181OBJC
1182OBJCFLAGS
1183LIPO
1184STRIP
1185NM
1186GNM
1187MCS
1188OBJCOPY
1189OBJDUMP
1190BUILD_CC
1191BUILD_CXX
1192BUILD_LD
1193JTREGEXE
1194XMKMF
1195FREETYPE_CFLAGS
1196FREETYPE_LIBS
1197ALSA_CFLAGS
1198ALSA_LIBS
1199LCMS_CFLAGS
1200LCMS_LIBS
1201PNG_CFLAGS
1202PNG_LIBS
1203LIBFFI_CFLAGS
1204LIBFFI_LIBS
1205CCACHE'
1206
1207
1208# Initialize some variables set by options.
1209ac_init_help=
1210ac_init_version=false
1211ac_unrecognized_opts=
1212ac_unrecognized_sep=
1213# The variables have the same names as the options, with
1214# dashes changed to underlines.
1215cache_file=/dev/null
1216exec_prefix=NONE
1217no_create=
1218no_recursion=
1219prefix=NONE
1220program_prefix=NONE
1221program_suffix=NONE
1222program_transform_name=s,x,x,
1223silent=
1224site=
1225srcdir=
1226verbose=
1227x_includes=NONE
1228x_libraries=NONE
1229
1230# Installation directory options.
1231# These are left unexpanded so users can "make install exec_prefix=/foo"
1232# and all the variables that are supposed to be based on exec_prefix
1233# by default will actually change.
1234# Use braces instead of parens because sh, perl, etc. also accept them.
1235# (The list follows the same order as the GNU Coding Standards.)
1236bindir='${exec_prefix}/bin'
1237sbindir='${exec_prefix}/sbin'
1238libexecdir='${exec_prefix}/libexec'
1239datarootdir='${prefix}/share'
1240datadir='${datarootdir}'
1241sysconfdir='${prefix}/etc'
1242sharedstatedir='${prefix}/com'
1243localstatedir='${prefix}/var'
1244includedir='${prefix}/include'
1245oldincludedir='/usr/include'
1246docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1247infodir='${datarootdir}/info'
1248htmldir='${docdir}'
1249dvidir='${docdir}'
1250pdfdir='${docdir}'
1251psdir='${docdir}'
1252libdir='${exec_prefix}/lib'
1253localedir='${datarootdir}/locale'
1254mandir='${datarootdir}/man'
1255
1256ac_prev=
1257ac_dashdash=
1258for ac_option
1259do
1260  # If the previous option needs an argument, assign it.
1261  if test -n "$ac_prev"; then
1262    eval $ac_prev=\$ac_option
1263    ac_prev=
1264    continue
1265  fi
1266
1267  case $ac_option in
1268  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1269  *=)   ac_optarg= ;;
1270  *)    ac_optarg=yes ;;
1271  esac
1272
1273  # Accept the important Cygnus configure options, so we can diagnose typos.
1274
1275  case $ac_dashdash$ac_option in
1276  --)
1277    ac_dashdash=yes ;;
1278
1279  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1280    ac_prev=bindir ;;
1281  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1282    bindir=$ac_optarg ;;
1283
1284  -build | --build | --buil | --bui | --bu)
1285    ac_prev=build_alias ;;
1286  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1287    build_alias=$ac_optarg ;;
1288
1289  -cache-file | --cache-file | --cache-fil | --cache-fi \
1290  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1291    ac_prev=cache_file ;;
1292  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1293  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1294    cache_file=$ac_optarg ;;
1295
1296  --config-cache | -C)
1297    cache_file=config.cache ;;
1298
1299  -datadir | --datadir | --datadi | --datad)
1300    ac_prev=datadir ;;
1301  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1302    datadir=$ac_optarg ;;
1303
1304  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1305  | --dataroo | --dataro | --datar)
1306    ac_prev=datarootdir ;;
1307  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1308  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1309    datarootdir=$ac_optarg ;;
1310
1311  -disable-* | --disable-*)
1312    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1313    # Reject names that are not valid shell variable names.
1314    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1315      as_fn_error $? "invalid feature name: $ac_useropt"
1316    ac_useropt_orig=$ac_useropt
1317    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1318    case $ac_user_opts in
1319      *"
1320"enable_$ac_useropt"
1321"*) ;;
1322      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1323	 ac_unrecognized_sep=', ';;
1324    esac
1325    eval enable_$ac_useropt=no ;;
1326
1327  -docdir | --docdir | --docdi | --doc | --do)
1328    ac_prev=docdir ;;
1329  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1330    docdir=$ac_optarg ;;
1331
1332  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1333    ac_prev=dvidir ;;
1334  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1335    dvidir=$ac_optarg ;;
1336
1337  -enable-* | --enable-*)
1338    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
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--enable-$ac_useropt_orig"
1349	 ac_unrecognized_sep=', ';;
1350    esac
1351    eval enable_$ac_useropt=\$ac_optarg ;;
1352
1353  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1354  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1355  | --exec | --exe | --ex)
1356    ac_prev=exec_prefix ;;
1357  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1358  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1359  | --exec=* | --exe=* | --ex=*)
1360    exec_prefix=$ac_optarg ;;
1361
1362  -gas | --gas | --ga | --g)
1363    # Obsolete; use --with-gas.
1364    with_gas=yes ;;
1365
1366  -help | --help | --hel | --he | -h)
1367    ac_init_help=long ;;
1368  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1369    ac_init_help=recursive ;;
1370  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1371    ac_init_help=short ;;
1372
1373  -host | --host | --hos | --ho)
1374    ac_prev=host_alias ;;
1375  -host=* | --host=* | --hos=* | --ho=*)
1376    host_alias=$ac_optarg ;;
1377
1378  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1379    ac_prev=htmldir ;;
1380  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1381  | --ht=*)
1382    htmldir=$ac_optarg ;;
1383
1384  -includedir | --includedir | --includedi | --included | --include \
1385  | --includ | --inclu | --incl | --inc)
1386    ac_prev=includedir ;;
1387  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1388  | --includ=* | --inclu=* | --incl=* | --inc=*)
1389    includedir=$ac_optarg ;;
1390
1391  -infodir | --infodir | --infodi | --infod | --info | --inf)
1392    ac_prev=infodir ;;
1393  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1394    infodir=$ac_optarg ;;
1395
1396  -libdir | --libdir | --libdi | --libd)
1397    ac_prev=libdir ;;
1398  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1399    libdir=$ac_optarg ;;
1400
1401  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1402  | --libexe | --libex | --libe)
1403    ac_prev=libexecdir ;;
1404  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1405  | --libexe=* | --libex=* | --libe=*)
1406    libexecdir=$ac_optarg ;;
1407
1408  -localedir | --localedir | --localedi | --localed | --locale)
1409    ac_prev=localedir ;;
1410  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1411    localedir=$ac_optarg ;;
1412
1413  -localstatedir | --localstatedir | --localstatedi | --localstated \
1414  | --localstate | --localstat | --localsta | --localst | --locals)
1415    ac_prev=localstatedir ;;
1416  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1417  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1418    localstatedir=$ac_optarg ;;
1419
1420  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1421    ac_prev=mandir ;;
1422  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1423    mandir=$ac_optarg ;;
1424
1425  -nfp | --nfp | --nf)
1426    # Obsolete; use --without-fp.
1427    with_fp=no ;;
1428
1429  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1430  | --no-cr | --no-c | -n)
1431    no_create=yes ;;
1432
1433  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1434  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1435    no_recursion=yes ;;
1436
1437  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1438  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1439  | --oldin | --oldi | --old | --ol | --o)
1440    ac_prev=oldincludedir ;;
1441  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1442  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1443  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1444    oldincludedir=$ac_optarg ;;
1445
1446  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1447    ac_prev=prefix ;;
1448  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1449    prefix=$ac_optarg ;;
1450
1451  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1452  | --program-pre | --program-pr | --program-p)
1453    ac_prev=program_prefix ;;
1454  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1455  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1456    program_prefix=$ac_optarg ;;
1457
1458  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1459  | --program-suf | --program-su | --program-s)
1460    ac_prev=program_suffix ;;
1461  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1462  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1463    program_suffix=$ac_optarg ;;
1464
1465  -program-transform-name | --program-transform-name \
1466  | --program-transform-nam | --program-transform-na \
1467  | --program-transform-n | --program-transform- \
1468  | --program-transform | --program-transfor \
1469  | --program-transfo | --program-transf \
1470  | --program-trans | --program-tran \
1471  | --progr-tra | --program-tr | --program-t)
1472    ac_prev=program_transform_name ;;
1473  -program-transform-name=* | --program-transform-name=* \
1474  | --program-transform-nam=* | --program-transform-na=* \
1475  | --program-transform-n=* | --program-transform-=* \
1476  | --program-transform=* | --program-transfor=* \
1477  | --program-transfo=* | --program-transf=* \
1478  | --program-trans=* | --program-tran=* \
1479  | --progr-tra=* | --program-tr=* | --program-t=*)
1480    program_transform_name=$ac_optarg ;;
1481
1482  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1483    ac_prev=pdfdir ;;
1484  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1485    pdfdir=$ac_optarg ;;
1486
1487  -psdir | --psdir | --psdi | --psd | --ps)
1488    ac_prev=psdir ;;
1489  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1490    psdir=$ac_optarg ;;
1491
1492  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1493  | -silent | --silent | --silen | --sile | --sil)
1494    silent=yes ;;
1495
1496  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1497    ac_prev=sbindir ;;
1498  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1499  | --sbi=* | --sb=*)
1500    sbindir=$ac_optarg ;;
1501
1502  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1503  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1504  | --sharedst | --shareds | --shared | --share | --shar \
1505  | --sha | --sh)
1506    ac_prev=sharedstatedir ;;
1507  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1508  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1509  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1510  | --sha=* | --sh=*)
1511    sharedstatedir=$ac_optarg ;;
1512
1513  -site | --site | --sit)
1514    ac_prev=site ;;
1515  -site=* | --site=* | --sit=*)
1516    site=$ac_optarg ;;
1517
1518  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1519    ac_prev=srcdir ;;
1520  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1521    srcdir=$ac_optarg ;;
1522
1523  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1524  | --syscon | --sysco | --sysc | --sys | --sy)
1525    ac_prev=sysconfdir ;;
1526  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1527  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1528    sysconfdir=$ac_optarg ;;
1529
1530  -target | --target | --targe | --targ | --tar | --ta | --t)
1531    ac_prev=target_alias ;;
1532  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1533    target_alias=$ac_optarg ;;
1534
1535  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1536    verbose=yes ;;
1537
1538  -version | --version | --versio | --versi | --vers | -V)
1539    ac_init_version=: ;;
1540
1541  -with-* | --with-*)
1542    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1543    # Reject names that are not valid shell variable names.
1544    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1545      as_fn_error $? "invalid package name: $ac_useropt"
1546    ac_useropt_orig=$ac_useropt
1547    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1548    case $ac_user_opts in
1549      *"
1550"with_$ac_useropt"
1551"*) ;;
1552      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1553	 ac_unrecognized_sep=', ';;
1554    esac
1555    eval with_$ac_useropt=\$ac_optarg ;;
1556
1557  -without-* | --without-*)
1558    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1559    # Reject names that are not valid shell variable names.
1560    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1561      as_fn_error $? "invalid package name: $ac_useropt"
1562    ac_useropt_orig=$ac_useropt
1563    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1564    case $ac_user_opts in
1565      *"
1566"with_$ac_useropt"
1567"*) ;;
1568      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1569	 ac_unrecognized_sep=', ';;
1570    esac
1571    eval with_$ac_useropt=no ;;
1572
1573  --x)
1574    # Obsolete; use --with-x.
1575    with_x=yes ;;
1576
1577  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1578  | --x-incl | --x-inc | --x-in | --x-i)
1579    ac_prev=x_includes ;;
1580  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1581  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1582    x_includes=$ac_optarg ;;
1583
1584  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1585  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1586    ac_prev=x_libraries ;;
1587  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1588  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1589    x_libraries=$ac_optarg ;;
1590
1591  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1592Try \`$0 --help' for more information"
1593    ;;
1594
1595  *=*)
1596    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1597    # Reject names that are not valid shell variable names.
1598    case $ac_envvar in #(
1599      '' | [0-9]* | *[!_$as_cr_alnum]* )
1600      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1601    esac
1602    eval $ac_envvar=\$ac_optarg
1603    export $ac_envvar ;;
1604
1605  *)
1606    # FIXME: should be removed in autoconf 3.0.
1607    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1608    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1609      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1610    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1611    ;;
1612
1613  esac
1614done
1615
1616if test -n "$ac_prev"; then
1617  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1618  as_fn_error $? "missing argument to $ac_option"
1619fi
1620
1621if test -n "$ac_unrecognized_opts"; then
1622  case $enable_option_checking in
1623    no) ;;
1624    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1625    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1626  esac
1627fi
1628
1629# Check all directory arguments for consistency.
1630for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1631		datadir sysconfdir sharedstatedir localstatedir includedir \
1632		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1633		libdir localedir mandir
1634do
1635  eval ac_val=\$$ac_var
1636  # Remove trailing slashes.
1637  case $ac_val in
1638    */ )
1639      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1640      eval $ac_var=\$ac_val;;
1641  esac
1642  # Be sure to have absolute directory names.
1643  case $ac_val in
1644    [\\/$]* | ?:[\\/]* )  continue;;
1645    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1646  esac
1647  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1648done
1649
1650# There might be people who depend on the old broken behavior: `$host'
1651# used to hold the argument of --host etc.
1652# FIXME: To remove some day.
1653build=$build_alias
1654host=$host_alias
1655target=$target_alias
1656
1657# FIXME: To remove some day.
1658if test "x$host_alias" != x; then
1659  if test "x$build_alias" = x; then
1660    cross_compiling=maybe
1661  elif test "x$build_alias" != "x$host_alias"; then
1662    cross_compiling=yes
1663  fi
1664fi
1665
1666ac_tool_prefix=
1667test -n "$host_alias" && ac_tool_prefix=$host_alias-
1668
1669test "$silent" = yes && exec 6>/dev/null
1670
1671
1672ac_pwd=`pwd` && test -n "$ac_pwd" &&
1673ac_ls_di=`ls -di .` &&
1674ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1675  as_fn_error $? "working directory cannot be determined"
1676test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1677  as_fn_error $? "pwd does not report name of working directory"
1678
1679
1680# Find the source files, if location was not specified.
1681if test -z "$srcdir"; then
1682  ac_srcdir_defaulted=yes
1683  # Try the directory containing this script, then the parent directory.
1684  ac_confdir=`$as_dirname -- "$as_myself" ||
1685$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1686	 X"$as_myself" : 'X\(//\)[^/]' \| \
1687	 X"$as_myself" : 'X\(//\)$' \| \
1688	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1689$as_echo X"$as_myself" |
1690    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1691	    s//\1/
1692	    q
1693	  }
1694	  /^X\(\/\/\)[^/].*/{
1695	    s//\1/
1696	    q
1697	  }
1698	  /^X\(\/\/\)$/{
1699	    s//\1/
1700	    q
1701	  }
1702	  /^X\(\/\).*/{
1703	    s//\1/
1704	    q
1705	  }
1706	  s/.*/./; q'`
1707  srcdir=$ac_confdir
1708  if test ! -r "$srcdir/$ac_unique_file"; then
1709    srcdir=..
1710  fi
1711else
1712  ac_srcdir_defaulted=no
1713fi
1714if test ! -r "$srcdir/$ac_unique_file"; then
1715  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1716  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1717fi
1718ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1719ac_abs_confdir=`(
1720	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1721	pwd)`
1722# When building in place, set srcdir=.
1723if test "$ac_abs_confdir" = "$ac_pwd"; then
1724  srcdir=.
1725fi
1726# Remove unnecessary trailing slashes from srcdir.
1727# Double slashes in file names in object file debugging info
1728# mess up M-x gdb in Emacs.
1729case $srcdir in
1730*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1731esac
1732for ac_var in $ac_precious_vars; do
1733  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1734  eval ac_env_${ac_var}_value=\$${ac_var}
1735  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1736  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1737done
1738
1739#
1740# Report the --help message.
1741#
1742if test "$ac_init_help" = "long"; then
1743  # Omit some internal or obsolete options to make the list less imposing.
1744  # This message is too long to be a string in the A/UX 3.1 sh.
1745  cat <<_ACEOF
1746\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1747
1748Usage: $0 [OPTION]... [VAR=VALUE]...
1749
1750To assign environment variables (e.g., CC, CFLAGS...), specify them as
1751VAR=VALUE.  See below for descriptions of some of the useful variables.
1752
1753Defaults for the options are specified in brackets.
1754
1755Configuration:
1756  -h, --help              display this help and exit
1757      --help=short        display options specific to this package
1758      --help=recursive    display the short help of all the included packages
1759  -V, --version           display version information and exit
1760  -q, --quiet, --silent   do not print \`checking ...' messages
1761      --cache-file=FILE   cache test results in FILE [disabled]
1762  -C, --config-cache      alias for \`--cache-file=config.cache'
1763  -n, --no-create         do not create output files
1764      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1765
1766Installation directories:
1767  --prefix=PREFIX         install architecture-independent files in PREFIX
1768                          [$ac_default_prefix]
1769  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1770                          [PREFIX]
1771
1772By default, \`make install' will install all the files in
1773\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1774an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1775for instance \`--prefix=\$HOME'.
1776
1777For better control, use the options below.
1778
1779Fine tuning of the installation directories:
1780  --bindir=DIR            user executables [EPREFIX/bin]
1781  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1782  --libexecdir=DIR        program executables [EPREFIX/libexec]
1783  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1784  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1785  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1786  --libdir=DIR            object code libraries [EPREFIX/lib]
1787  --includedir=DIR        C header files [PREFIX/include]
1788  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1789  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1790  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1791  --infodir=DIR           info documentation [DATAROOTDIR/info]
1792  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1793  --mandir=DIR            man documentation [DATAROOTDIR/man]
1794  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1795  --htmldir=DIR           html documentation [DOCDIR]
1796  --dvidir=DIR            dvi documentation [DOCDIR]
1797  --pdfdir=DIR            pdf documentation [DOCDIR]
1798  --psdir=DIR             ps documentation [DOCDIR]
1799_ACEOF
1800
1801  cat <<\_ACEOF
1802
1803X features:
1804  --x-includes=DIR    X include files are in DIR
1805  --x-libraries=DIR   X library files are in DIR
1806
1807System types:
1808  --build=BUILD     configure for building on BUILD [guessed]
1809  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1810  --target=TARGET   configure for building compilers for TARGET [HOST]
1811_ACEOF
1812fi
1813
1814if test -n "$ac_init_help"; then
1815  case $ac_init_help in
1816     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1817   esac
1818  cat <<\_ACEOF
1819
1820Optional Features:
1821  --disable-option-checking  ignore unrecognized --enable/--with options
1822  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1823  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1824  --enable-openjdk-only   suppress building custom source even if present
1825                          [disabled]
1826  --enable-debug          set the debug level to fastdebug (shorthand for
1827                          --with-debug-level=fastdebug) [disabled]
1828  --disable-headful       disable building headful support (graphical UI
1829                          support) [enabled]
1830  --enable-hotspot-test-in-build
1831                          run the Queens test after Hotspot build [disabled]
1832  --enable-unlimited-crypto
1833                          Enable unlimited crypto policy [disabled]
1834  --enable-rmiconnector-iiop
1835                          enable the JMX RMIConnector iiop transport
1836                          [disabled]
1837  --disable-debug-symbols disable generation of debug symbols [enabled]
1838  --disable-zip-debug-info
1839                          disable zipping of debug-info files [enabled]
1840  --enable-macosx-runtime-support
1841                          Deprecated. Option is kept for backwards
1842                          compatibility and is ignored
1843  --disable-freetype-bundling
1844                          disable bundling of the freetype library with the
1845                          build result [enabled on Windows or when using
1846                          --with-freetype, disabled otherwise]
1847  --enable-sjavac         use sjavac to do fast incremental compiles
1848                          [disabled]
1849  --disable-precompiled-headers
1850                          disable using precompiled headers when compiling C++
1851                          [enabled]
1852  --enable-ccache         enable using ccache to speed up recompilations
1853                          [disabled]
1854
1855Optional Packages:
1856  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1857  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1858  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1859                          support it), e.g. --with-target-bits=32 [guessed]
1860  --with-custom-make-dir  Deprecated. Option is kept for backwards
1861                          compatibility and is ignored
1862  --with-jdk-variant      JDK variant to build (normal) [normal]
1863  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1864  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1865                          client, minimal1, kernel, zero, zeroshark, core)
1866                          [server]
1867  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1868                          optimized (HotSpot build only)) [release]
1869  --with-devkit           use this devkit for compilers, tools and resources
1870  --with-sys-root         alias for --with-sysroot for backwards compatability
1871  --with-sysroot          use this directory as sysroot)
1872  --with-tools-dir        alias for --with-toolchain-path for backwards
1873                          compatibility
1874  --with-toolchain-path   prepend these directories when searching for
1875                          toolchain binaries (compilers etc)
1876  --with-extra-path       prepend these directories to the default path
1877  --with-conf-name        use this as the name of the configuration [generated
1878                          from important configuration options]
1879  --with-builddeps-conf   use this configuration file for the builddeps
1880  --with-builddeps-server download and use build dependencies from this server
1881                          url
1882  --with-builddeps-dir    store downloaded build dependencies here
1883                          [/localhome/builddeps]
1884  --with-builddeps-group  chgrp the downloaded build dependencies to this
1885                          group
1886  --with-cacerts-file     specify alternative cacerts file
1887  --with-milestone        Set milestone value for build [internal]
1888  --with-update-version   Set update version value for build [b00]
1889  --with-user-release-suffix
1890                          Add a custom string to the version string if build
1891                          number is not set.[username_builddateb00]
1892  --with-build-number     Set build number value for build [b00]
1893  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1894  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1895                          invocations of boot JDK, overriding the default
1896                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1897                          -enableassertions"
1898  --with-add-source-root  for each and every source directory, look in this
1899                          additional source root for the same directory; if it
1900                          exists and have files in it, include it in the build
1901  --with-override-source-root
1902                          for each and every source directory, look in this
1903                          override source root for the same directory; if it
1904                          exists, use that directory instead and ignore the
1905                          directory in the original source root
1906  --with-adds-and-overrides
1907                          use the subdirs 'adds' and 'overrides' in the
1908                          specified directory as add-source-root and
1909                          override-source-root
1910  --with-override-langtools
1911                          use this langtools dir for the build
1912  --with-override-corba   use this corba dir for the build
1913  --with-override-jaxp    use this jaxp dir for the build
1914  --with-override-jaxws   use this jaxws dir for the build
1915  --with-override-hotspot use this hotspot dir for the build
1916  --with-override-nashorn use this nashorn dir for the build
1917  --with-override-jdk     use this jdk dir for the build
1918  --with-import-hotspot   import hotspot binaries from this jdk image or
1919                          hotspot build dist dir instead of building from
1920                          source
1921  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1922                          to show possible values [platform dependent]
1923  --with-jtreg            Regression Test Harness [probed]
1924  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1925  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1926  --with-extra-ldflags    extra flags to be used when linking jdk
1927  --with-x                use the X Window System
1928  --with-cups             specify prefix directory for the cups package
1929                          (expecting the headers under PATH/include)
1930  --with-cups-include     specify directory for the cups include files
1931  --with-freetype         specify prefix directory for the freetype package
1932                          (expecting the libraries under PATH/lib and the
1933                          headers under PATH/include)
1934  --with-freetype-include specify directory for the freetype include files
1935  --with-freetype-lib     specify directory for the freetype library
1936  --with-alsa             specify prefix directory for the alsa package
1937                          (expecting the libraries under PATH/lib and the
1938                          headers under PATH/include)
1939  --with-alsa-include     specify directory for the alsa include files
1940  --with-alsa-lib         specify directory for the alsa library
1941  --with-giflib           use giflib from build system or OpenJDK source
1942                          (system, bundled) [bundled]
1943  --with-lcms             use lcms2 from build system or OpenJDK source
1944                          (system, bundled) [bundled]
1945  --with-libpng           use libpng from build system or OpenJDK source
1946                          (system, bundled) [bundled]
1947  --with-zlib             use zlib from build system or OpenJDK source
1948                          (system, bundled) [bundled]
1949  --with-stdc++lib=<static>,<dynamic>,<default>
1950                          force linking of the C++ runtime on Linux to either
1951                          static or dynamic, default is static with dynamic as
1952                          fallback
1953  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1954                          only) [probed]
1955  --with-dxsdk            Deprecated. Option is kept for backwards
1956                          compatibility and is ignored
1957  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1958                          compatibility and is ignored
1959  --with-dxsdk-include    Deprecated. Option is kept for backwards
1960                          compatibility and is ignored
1961  --with-num-cores        number of cores in the build system, e.g.
1962                          --with-num-cores=8 [probed]
1963  --with-memory-size      memory (in MB) available in the build system, e.g.
1964                          --with-memory-size=1024 [probed]
1965  --with-jobs             number of parallel jobs to let make run [calculated
1966                          based on cores and memory]
1967  --with-sjavac-server-java
1968                          use this java binary for running the sjavac
1969                          background server [Boot JDK java]
1970  --with-ccache-dir       where to store ccache files [~/.ccache]
1971
1972Some influential environment variables:
1973  BASENAME    Override default value for BASENAME
1974  BASH        Override default value for BASH
1975  CAT         Override default value for CAT
1976  CHMOD       Override default value for CHMOD
1977  CMP         Override default value for CMP
1978  COMM        Override default value for COMM
1979  CP          Override default value for CP
1980  CPIO        Override default value for CPIO
1981  CUT         Override default value for CUT
1982  DATE        Override default value for DATE
1983  DIFF        Override default value for DIFF
1984  DIRNAME     Override default value for DIRNAME
1985  ECHO        Override default value for ECHO
1986  EXPR        Override default value for EXPR
1987  FILE        Override default value for FILE
1988  FIND        Override default value for FIND
1989  HEAD        Override default value for HEAD
1990  LN          Override default value for LN
1991  LS          Override default value for LS
1992  MKDIR       Override default value for MKDIR
1993  MKTEMP      Override default value for MKTEMP
1994  MV          Override default value for MV
1995  NAWK        Override default value for NAWK
1996  PRINTF      Override default value for PRINTF
1997  RM          Override default value for RM
1998  SH          Override default value for SH
1999  SORT        Override default value for SORT
2000  TAIL        Override default value for TAIL
2001  TAR         Override default value for TAR
2002  TEE         Override default value for TEE
2003  TOUCH       Override default value for TOUCH
2004  TR          Override default value for TR
2005  UNAME       Override default value for UNAME
2006  UNIQ        Override default value for UNIQ
2007  WC          Override default value for WC
2008  WHICH       Override default value for WHICH
2009  XARGS       Override default value for XARGS
2010  AWK         Override default value for AWK
2011  GREP        Override default value for GREP
2012  EGREP       Override default value for EGREP
2013  FGREP       Override default value for FGREP
2014  SED         Override default value for SED
2015  CYGPATH     Override default value for CYGPATH
2016  READLINK    Override default value for READLINK
2017  DF          Override default value for DF
2018  SETFILE     Override default value for SETFILE
2019  UNZIP       Override default value for UNZIP
2020  ZIP         Override default value for ZIP
2021  LDD         Override default value for LDD
2022  OTOOL       Override default value for OTOOL
2023  READELF     Override default value for READELF
2024  HG          Override default value for HG
2025  STAT        Override default value for STAT
2026  TIME        Override default value for TIME
2027  DSYMUTIL    Override default value for DSYMUTIL
2028  XATTR       Override default value for XATTR
2029  CODESIGN    Override default value for CODESIGN
2030  PKG_CONFIG  path to pkg-config utility
2031  JAVA        Override default value for JAVA
2032  JAVAC       Override default value for JAVAC
2033  JAVAH       Override default value for JAVAH
2034  JAR         Override default value for JAR
2035  NATIVE2ASCII
2036              Override default value for NATIVE2ASCII
2037  JARSIGNER   Override default value for JARSIGNER
2038  CC          C compiler command
2039  CFLAGS      C compiler flags
2040  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2041              nonstandard directory <lib dir>
2042  LIBS        libraries to pass to the linker, e.g. -l<library>
2043  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2044              you have headers in a nonstandard directory <include dir>
2045  CXX         C++ compiler command
2046  CXXFLAGS    C++ compiler flags
2047  CPP         C preprocessor
2048  CXXCPP      C++ preprocessor
2049  AS          Override default value for AS
2050  AR          Override default value for AR
2051  OBJC        Objective C compiler command
2052  OBJCFLAGS   Objective C compiler flags
2053  LIPO        Override default value for LIPO
2054  STRIP       Override default value for STRIP
2055  NM          Override default value for NM
2056  GNM         Override default value for GNM
2057  MCS         Override default value for MCS
2058  OBJCOPY     Override default value for OBJCOPY
2059  OBJDUMP     Override default value for OBJDUMP
2060  BUILD_CC    Override default value for BUILD_CC
2061  BUILD_CXX   Override default value for BUILD_CXX
2062  BUILD_LD    Override default value for BUILD_LD
2063  JTREGEXE    Override default value for JTREGEXE
2064  XMKMF       Path to xmkmf, Makefile generator for X Window System
2065  FREETYPE_CFLAGS
2066              C compiler flags for FREETYPE, overriding pkg-config
2067  FREETYPE_LIBS
2068              linker flags for FREETYPE, overriding pkg-config
2069  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2070  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2071  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2072  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2073  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2074  PNG_LIBS    linker flags for PNG, overriding pkg-config
2075  LIBFFI_CFLAGS
2076              C compiler flags for LIBFFI, overriding pkg-config
2077  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2078  CCACHE      Override default value for CCACHE
2079
2080Use these variables to override the choices made by `configure' or to help
2081it to find libraries and programs with nonstandard names/locations.
2082
2083Report bugs to <build-dev@openjdk.java.net>.
2084OpenJDK home page: <http://openjdk.java.net>.
2085_ACEOF
2086ac_status=$?
2087fi
2088
2089if test "$ac_init_help" = "recursive"; then
2090  # If there are subdirs, report their specific --help.
2091  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2092    test -d "$ac_dir" ||
2093      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2094      continue
2095    ac_builddir=.
2096
2097case "$ac_dir" in
2098.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2099*)
2100  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2101  # A ".." for each directory in $ac_dir_suffix.
2102  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2103  case $ac_top_builddir_sub in
2104  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2105  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2106  esac ;;
2107esac
2108ac_abs_top_builddir=$ac_pwd
2109ac_abs_builddir=$ac_pwd$ac_dir_suffix
2110# for backward compatibility:
2111ac_top_builddir=$ac_top_build_prefix
2112
2113case $srcdir in
2114  .)  # We are building in place.
2115    ac_srcdir=.
2116    ac_top_srcdir=$ac_top_builddir_sub
2117    ac_abs_top_srcdir=$ac_pwd ;;
2118  [\\/]* | ?:[\\/]* )  # Absolute name.
2119    ac_srcdir=$srcdir$ac_dir_suffix;
2120    ac_top_srcdir=$srcdir
2121    ac_abs_top_srcdir=$srcdir ;;
2122  *) # Relative name.
2123    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2124    ac_top_srcdir=$ac_top_build_prefix$srcdir
2125    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2126esac
2127ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2128
2129    cd "$ac_dir" || { ac_status=$?; continue; }
2130    # Check for guested configure.
2131    if test -f "$ac_srcdir/configure.gnu"; then
2132      echo &&
2133      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2134    elif test -f "$ac_srcdir/configure"; then
2135      echo &&
2136      $SHELL "$ac_srcdir/configure" --help=recursive
2137    else
2138      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2139    fi || ac_status=$?
2140    cd "$ac_pwd" || { ac_status=$?; break; }
2141  done
2142fi
2143
2144test -n "$ac_init_help" && exit $ac_status
2145if $ac_init_version; then
2146  cat <<\_ACEOF
2147OpenJDK configure jdk9
2148generated by GNU Autoconf 2.69
2149
2150Copyright (C) 2012 Free Software Foundation, Inc.
2151This configure script is free software; the Free Software Foundation
2152gives unlimited permission to copy, distribute and modify it.
2153_ACEOF
2154  exit
2155fi
2156
2157## ------------------------ ##
2158## Autoconf initialization. ##
2159## ------------------------ ##
2160
2161# ac_fn_c_try_compile LINENO
2162# --------------------------
2163# Try to compile conftest.$ac_ext, and return whether this succeeded.
2164ac_fn_c_try_compile ()
2165{
2166  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2167  rm -f conftest.$ac_objext
2168  if { { ac_try="$ac_compile"
2169case "(($ac_try" in
2170  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2171  *) ac_try_echo=$ac_try;;
2172esac
2173eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2174$as_echo "$ac_try_echo"; } >&5
2175  (eval "$ac_compile") 2>conftest.err
2176  ac_status=$?
2177  if test -s conftest.err; then
2178    grep -v '^ *+' conftest.err >conftest.er1
2179    cat conftest.er1 >&5
2180    mv -f conftest.er1 conftest.err
2181  fi
2182  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2183  test $ac_status = 0; } && {
2184	 test -z "$ac_c_werror_flag" ||
2185	 test ! -s conftest.err
2186       } && test -s conftest.$ac_objext; then :
2187  ac_retval=0
2188else
2189  $as_echo "$as_me: failed program was:" >&5
2190sed 's/^/| /' conftest.$ac_ext >&5
2191
2192	ac_retval=1
2193fi
2194  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2195  as_fn_set_status $ac_retval
2196
2197} # ac_fn_c_try_compile
2198
2199# ac_fn_cxx_try_compile LINENO
2200# ----------------------------
2201# Try to compile conftest.$ac_ext, and return whether this succeeded.
2202ac_fn_cxx_try_compile ()
2203{
2204  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2205  rm -f conftest.$ac_objext
2206  if { { ac_try="$ac_compile"
2207case "(($ac_try" in
2208  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2209  *) ac_try_echo=$ac_try;;
2210esac
2211eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2212$as_echo "$ac_try_echo"; } >&5
2213  (eval "$ac_compile") 2>conftest.err
2214  ac_status=$?
2215  if test -s conftest.err; then
2216    grep -v '^ *+' conftest.err >conftest.er1
2217    cat conftest.er1 >&5
2218    mv -f conftest.er1 conftest.err
2219  fi
2220  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2221  test $ac_status = 0; } && {
2222	 test -z "$ac_cxx_werror_flag" ||
2223	 test ! -s conftest.err
2224       } && test -s conftest.$ac_objext; then :
2225  ac_retval=0
2226else
2227  $as_echo "$as_me: failed program was:" >&5
2228sed 's/^/| /' conftest.$ac_ext >&5
2229
2230	ac_retval=1
2231fi
2232  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2233  as_fn_set_status $ac_retval
2234
2235} # ac_fn_cxx_try_compile
2236
2237# ac_fn_c_try_cpp LINENO
2238# ----------------------
2239# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2240ac_fn_c_try_cpp ()
2241{
2242  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2243  if { { ac_try="$ac_cpp conftest.$ac_ext"
2244case "(($ac_try" in
2245  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2246  *) ac_try_echo=$ac_try;;
2247esac
2248eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2249$as_echo "$ac_try_echo"; } >&5
2250  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2251  ac_status=$?
2252  if test -s conftest.err; then
2253    grep -v '^ *+' conftest.err >conftest.er1
2254    cat conftest.er1 >&5
2255    mv -f conftest.er1 conftest.err
2256  fi
2257  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2258  test $ac_status = 0; } > conftest.i && {
2259	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2260	 test ! -s conftest.err
2261       }; then :
2262  ac_retval=0
2263else
2264  $as_echo "$as_me: failed program was:" >&5
2265sed 's/^/| /' conftest.$ac_ext >&5
2266
2267    ac_retval=1
2268fi
2269  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2270  as_fn_set_status $ac_retval
2271
2272} # ac_fn_c_try_cpp
2273
2274# ac_fn_cxx_try_cpp LINENO
2275# ------------------------
2276# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2277ac_fn_cxx_try_cpp ()
2278{
2279  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2280  if { { ac_try="$ac_cpp conftest.$ac_ext"
2281case "(($ac_try" in
2282  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2283  *) ac_try_echo=$ac_try;;
2284esac
2285eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2286$as_echo "$ac_try_echo"; } >&5
2287  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2288  ac_status=$?
2289  if test -s conftest.err; then
2290    grep -v '^ *+' conftest.err >conftest.er1
2291    cat conftest.er1 >&5
2292    mv -f conftest.er1 conftest.err
2293  fi
2294  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2295  test $ac_status = 0; } > conftest.i && {
2296	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2297	 test ! -s conftest.err
2298       }; then :
2299  ac_retval=0
2300else
2301  $as_echo "$as_me: failed program was:" >&5
2302sed 's/^/| /' conftest.$ac_ext >&5
2303
2304    ac_retval=1
2305fi
2306  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2307  as_fn_set_status $ac_retval
2308
2309} # ac_fn_cxx_try_cpp
2310
2311# ac_fn_objc_try_compile LINENO
2312# -----------------------------
2313# Try to compile conftest.$ac_ext, and return whether this succeeded.
2314ac_fn_objc_try_compile ()
2315{
2316  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2317  rm -f conftest.$ac_objext
2318  if { { ac_try="$ac_compile"
2319case "(($ac_try" in
2320  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2321  *) ac_try_echo=$ac_try;;
2322esac
2323eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2324$as_echo "$ac_try_echo"; } >&5
2325  (eval "$ac_compile") 2>conftest.err
2326  ac_status=$?
2327  if test -s conftest.err; then
2328    grep -v '^ *+' conftest.err >conftest.er1
2329    cat conftest.er1 >&5
2330    mv -f conftest.er1 conftest.err
2331  fi
2332  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2333  test $ac_status = 0; } && {
2334	 test -z "$ac_objc_werror_flag" ||
2335	 test ! -s conftest.err
2336       } && test -s conftest.$ac_objext; then :
2337  ac_retval=0
2338else
2339  $as_echo "$as_me: failed program was:" >&5
2340sed 's/^/| /' conftest.$ac_ext >&5
2341
2342	ac_retval=1
2343fi
2344  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2345  as_fn_set_status $ac_retval
2346
2347} # ac_fn_objc_try_compile
2348
2349# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2350# ---------------------------------------------------------
2351# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2352# the include files in INCLUDES and setting the cache variable VAR
2353# accordingly.
2354ac_fn_cxx_check_header_mongrel ()
2355{
2356  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2357  if eval \${$3+:} false; then :
2358  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2359$as_echo_n "checking for $2... " >&6; }
2360if eval \${$3+:} false; then :
2361  $as_echo_n "(cached) " >&6
2362fi
2363eval ac_res=\$$3
2364	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2365$as_echo "$ac_res" >&6; }
2366else
2367  # Is the header compilable?
2368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2369$as_echo_n "checking $2 usability... " >&6; }
2370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2371/* end confdefs.h.  */
2372$4
2373#include <$2>
2374_ACEOF
2375if ac_fn_cxx_try_compile "$LINENO"; then :
2376  ac_header_compiler=yes
2377else
2378  ac_header_compiler=no
2379fi
2380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2382$as_echo "$ac_header_compiler" >&6; }
2383
2384# Is the header present?
2385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2386$as_echo_n "checking $2 presence... " >&6; }
2387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2388/* end confdefs.h.  */
2389#include <$2>
2390_ACEOF
2391if ac_fn_cxx_try_cpp "$LINENO"; then :
2392  ac_header_preproc=yes
2393else
2394  ac_header_preproc=no
2395fi
2396rm -f conftest.err conftest.i conftest.$ac_ext
2397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2398$as_echo "$ac_header_preproc" >&6; }
2399
2400# So?  What about this header?
2401case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2402  yes:no: )
2403    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2404$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2405    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2406$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2407    ;;
2408  no:yes:* )
2409    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2410$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2411    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2412$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2413    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2414$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2415    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2416$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2417    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2418$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2419( $as_echo "## ----------------------------------------- ##
2420## Report this to build-dev@openjdk.java.net ##
2421## ----------------------------------------- ##"
2422     ) | sed "s/^/$as_me: WARNING:     /" >&2
2423    ;;
2424esac
2425  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2426$as_echo_n "checking for $2... " >&6; }
2427if eval \${$3+:} false; then :
2428  $as_echo_n "(cached) " >&6
2429else
2430  eval "$3=\$ac_header_compiler"
2431fi
2432eval ac_res=\$$3
2433	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2434$as_echo "$ac_res" >&6; }
2435fi
2436  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2437
2438} # ac_fn_cxx_check_header_mongrel
2439
2440# ac_fn_cxx_try_run LINENO
2441# ------------------------
2442# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2443# that executables *can* be run.
2444ac_fn_cxx_try_run ()
2445{
2446  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2447  if { { ac_try="$ac_link"
2448case "(($ac_try" in
2449  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2450  *) ac_try_echo=$ac_try;;
2451esac
2452eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2453$as_echo "$ac_try_echo"; } >&5
2454  (eval "$ac_link") 2>&5
2455  ac_status=$?
2456  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2457  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2458  { { case "(($ac_try" in
2459  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2460  *) ac_try_echo=$ac_try;;
2461esac
2462eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2463$as_echo "$ac_try_echo"; } >&5
2464  (eval "$ac_try") 2>&5
2465  ac_status=$?
2466  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2467  test $ac_status = 0; }; }; then :
2468  ac_retval=0
2469else
2470  $as_echo "$as_me: program exited with status $ac_status" >&5
2471       $as_echo "$as_me: failed program was:" >&5
2472sed 's/^/| /' conftest.$ac_ext >&5
2473
2474       ac_retval=$ac_status
2475fi
2476  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2477  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2478  as_fn_set_status $ac_retval
2479
2480} # ac_fn_cxx_try_run
2481
2482# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2483# ---------------------------------------------------------
2484# Tests whether HEADER exists and can be compiled using the include files in
2485# INCLUDES, setting the cache variable VAR accordingly.
2486ac_fn_cxx_check_header_compile ()
2487{
2488  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2489  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2490$as_echo_n "checking for $2... " >&6; }
2491if eval \${$3+:} false; then :
2492  $as_echo_n "(cached) " >&6
2493else
2494  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2495/* end confdefs.h.  */
2496$4
2497#include <$2>
2498_ACEOF
2499if ac_fn_cxx_try_compile "$LINENO"; then :
2500  eval "$3=yes"
2501else
2502  eval "$3=no"
2503fi
2504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2505fi
2506eval ac_res=\$$3
2507	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2508$as_echo "$ac_res" >&6; }
2509  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2510
2511} # ac_fn_cxx_check_header_compile
2512
2513# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2514# ----------------------------------------------
2515# Tries to find the compile-time value of EXPR in a program that includes
2516# INCLUDES, setting VAR accordingly. Returns whether the value could be
2517# computed
2518ac_fn_cxx_compute_int ()
2519{
2520  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2521  if test "$cross_compiling" = yes; then
2522    # Depending upon the size, compute the lo and hi bounds.
2523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2524/* end confdefs.h.  */
2525$4
2526int
2527main ()
2528{
2529static int test_array [1 - 2 * !(($2) >= 0)];
2530test_array [0] = 0;
2531return test_array [0];
2532
2533  ;
2534  return 0;
2535}
2536_ACEOF
2537if ac_fn_cxx_try_compile "$LINENO"; then :
2538  ac_lo=0 ac_mid=0
2539  while :; do
2540    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2541/* end confdefs.h.  */
2542$4
2543int
2544main ()
2545{
2546static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2547test_array [0] = 0;
2548return test_array [0];
2549
2550  ;
2551  return 0;
2552}
2553_ACEOF
2554if ac_fn_cxx_try_compile "$LINENO"; then :
2555  ac_hi=$ac_mid; break
2556else
2557  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2558			if test $ac_lo -le $ac_mid; then
2559			  ac_lo= ac_hi=
2560			  break
2561			fi
2562			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2563fi
2564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2565  done
2566else
2567  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2568/* end confdefs.h.  */
2569$4
2570int
2571main ()
2572{
2573static int test_array [1 - 2 * !(($2) < 0)];
2574test_array [0] = 0;
2575return test_array [0];
2576
2577  ;
2578  return 0;
2579}
2580_ACEOF
2581if ac_fn_cxx_try_compile "$LINENO"; then :
2582  ac_hi=-1 ac_mid=-1
2583  while :; do
2584    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2585/* end confdefs.h.  */
2586$4
2587int
2588main ()
2589{
2590static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2591test_array [0] = 0;
2592return test_array [0];
2593
2594  ;
2595  return 0;
2596}
2597_ACEOF
2598if ac_fn_cxx_try_compile "$LINENO"; then :
2599  ac_lo=$ac_mid; break
2600else
2601  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2602			if test $ac_mid -le $ac_hi; then
2603			  ac_lo= ac_hi=
2604			  break
2605			fi
2606			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2607fi
2608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2609  done
2610else
2611  ac_lo= ac_hi=
2612fi
2613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2614fi
2615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2616# Binary search between lo and hi bounds.
2617while test "x$ac_lo" != "x$ac_hi"; do
2618  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2619  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2620/* end confdefs.h.  */
2621$4
2622int
2623main ()
2624{
2625static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2626test_array [0] = 0;
2627return test_array [0];
2628
2629  ;
2630  return 0;
2631}
2632_ACEOF
2633if ac_fn_cxx_try_compile "$LINENO"; then :
2634  ac_hi=$ac_mid
2635else
2636  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2637fi
2638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2639done
2640case $ac_lo in #((
2641?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2642'') ac_retval=1 ;;
2643esac
2644  else
2645    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2646/* end confdefs.h.  */
2647$4
2648static long int longval () { return $2; }
2649static unsigned long int ulongval () { return $2; }
2650#include <stdio.h>
2651#include <stdlib.h>
2652int
2653main ()
2654{
2655
2656  FILE *f = fopen ("conftest.val", "w");
2657  if (! f)
2658    return 1;
2659  if (($2) < 0)
2660    {
2661      long int i = longval ();
2662      if (i != ($2))
2663	return 1;
2664      fprintf (f, "%ld", i);
2665    }
2666  else
2667    {
2668      unsigned long int i = ulongval ();
2669      if (i != ($2))
2670	return 1;
2671      fprintf (f, "%lu", i);
2672    }
2673  /* Do not output a trailing newline, as this causes \r\n confusion
2674     on some platforms.  */
2675  return ferror (f) || fclose (f) != 0;
2676
2677  ;
2678  return 0;
2679}
2680_ACEOF
2681if ac_fn_cxx_try_run "$LINENO"; then :
2682  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2683else
2684  ac_retval=1
2685fi
2686rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2687  conftest.$ac_objext conftest.beam conftest.$ac_ext
2688rm -f conftest.val
2689
2690  fi
2691  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2692  as_fn_set_status $ac_retval
2693
2694} # ac_fn_cxx_compute_int
2695
2696# ac_fn_cxx_try_link LINENO
2697# -------------------------
2698# Try to link conftest.$ac_ext, and return whether this succeeded.
2699ac_fn_cxx_try_link ()
2700{
2701  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2702  rm -f conftest.$ac_objext conftest$ac_exeext
2703  if { { ac_try="$ac_link"
2704case "(($ac_try" in
2705  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2706  *) ac_try_echo=$ac_try;;
2707esac
2708eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2709$as_echo "$ac_try_echo"; } >&5
2710  (eval "$ac_link") 2>conftest.err
2711  ac_status=$?
2712  if test -s conftest.err; then
2713    grep -v '^ *+' conftest.err >conftest.er1
2714    cat conftest.er1 >&5
2715    mv -f conftest.er1 conftest.err
2716  fi
2717  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2718  test $ac_status = 0; } && {
2719	 test -z "$ac_cxx_werror_flag" ||
2720	 test ! -s conftest.err
2721       } && test -s conftest$ac_exeext && {
2722	 test "$cross_compiling" = yes ||
2723	 test -x conftest$ac_exeext
2724       }; then :
2725  ac_retval=0
2726else
2727  $as_echo "$as_me: failed program was:" >&5
2728sed 's/^/| /' conftest.$ac_ext >&5
2729
2730	ac_retval=1
2731fi
2732  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2733  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2734  # interfere with the next link command; also delete a directory that is
2735  # left behind by Apple's compiler.  We do this before executing the actions.
2736  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2737  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2738  as_fn_set_status $ac_retval
2739
2740} # ac_fn_cxx_try_link
2741
2742# ac_fn_cxx_check_func LINENO FUNC VAR
2743# ------------------------------------
2744# Tests whether FUNC exists, setting the cache variable VAR accordingly
2745ac_fn_cxx_check_func ()
2746{
2747  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2748  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2749$as_echo_n "checking for $2... " >&6; }
2750if eval \${$3+:} false; then :
2751  $as_echo_n "(cached) " >&6
2752else
2753  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2754/* end confdefs.h.  */
2755/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2756   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2757#define $2 innocuous_$2
2758
2759/* System header to define __stub macros and hopefully few prototypes,
2760    which can conflict with char $2 (); below.
2761    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2762    <limits.h> exists even on freestanding compilers.  */
2763
2764#ifdef __STDC__
2765# include <limits.h>
2766#else
2767# include <assert.h>
2768#endif
2769
2770#undef $2
2771
2772/* Override any GCC internal prototype to avoid an error.
2773   Use char because int might match the return type of a GCC
2774   builtin and then its argument prototype would still apply.  */
2775#ifdef __cplusplus
2776extern "C"
2777#endif
2778char $2 ();
2779/* The GNU C library defines this for functions which it implements
2780    to always fail with ENOSYS.  Some functions are actually named
2781    something starting with __ and the normal name is an alias.  */
2782#if defined __stub_$2 || defined __stub___$2
2783choke me
2784#endif
2785
2786int
2787main ()
2788{
2789return $2 ();
2790  ;
2791  return 0;
2792}
2793_ACEOF
2794if ac_fn_cxx_try_link "$LINENO"; then :
2795  eval "$3=yes"
2796else
2797  eval "$3=no"
2798fi
2799rm -f core conftest.err conftest.$ac_objext \
2800    conftest$ac_exeext conftest.$ac_ext
2801fi
2802eval ac_res=\$$3
2803	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2804$as_echo "$ac_res" >&6; }
2805  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2806
2807} # ac_fn_cxx_check_func
2808
2809# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2810# -------------------------------------------------------
2811# Tests whether HEADER exists and can be compiled using the include files in
2812# INCLUDES, setting the cache variable VAR accordingly.
2813ac_fn_c_check_header_compile ()
2814{
2815  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2816  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2817$as_echo_n "checking for $2... " >&6; }
2818if eval \${$3+:} false; then :
2819  $as_echo_n "(cached) " >&6
2820else
2821  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2822/* end confdefs.h.  */
2823$4
2824#include <$2>
2825_ACEOF
2826if ac_fn_c_try_compile "$LINENO"; then :
2827  eval "$3=yes"
2828else
2829  eval "$3=no"
2830fi
2831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2832fi
2833eval ac_res=\$$3
2834	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2835$as_echo "$ac_res" >&6; }
2836  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2837
2838} # ac_fn_c_check_header_compile
2839cat >config.log <<_ACEOF
2840This file contains any messages produced by compilers while
2841running configure, to aid debugging if configure makes a mistake.
2842
2843It was created by OpenJDK $as_me jdk9, which was
2844generated by GNU Autoconf 2.69.  Invocation command line was
2845
2846  $ $0 $@
2847
2848_ACEOF
2849exec 5>>config.log
2850{
2851cat <<_ASUNAME
2852## --------- ##
2853## Platform. ##
2854## --------- ##
2855
2856hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2857uname -m = `(uname -m) 2>/dev/null || echo unknown`
2858uname -r = `(uname -r) 2>/dev/null || echo unknown`
2859uname -s = `(uname -s) 2>/dev/null || echo unknown`
2860uname -v = `(uname -v) 2>/dev/null || echo unknown`
2861
2862/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2863/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2864
2865/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2866/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2867/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2868/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2869/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2870/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2871/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2872
2873_ASUNAME
2874
2875as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2876for as_dir in $PATH
2877do
2878  IFS=$as_save_IFS
2879  test -z "$as_dir" && as_dir=.
2880    $as_echo "PATH: $as_dir"
2881  done
2882IFS=$as_save_IFS
2883
2884} >&5
2885
2886cat >&5 <<_ACEOF
2887
2888
2889## ----------- ##
2890## Core tests. ##
2891## ----------- ##
2892
2893_ACEOF
2894
2895
2896# Keep a trace of the command line.
2897# Strip out --no-create and --no-recursion so they do not pile up.
2898# Strip out --silent because we don't want to record it for future runs.
2899# Also quote any args containing shell meta-characters.
2900# Make two passes to allow for proper duplicate-argument suppression.
2901ac_configure_args=
2902ac_configure_args0=
2903ac_configure_args1=
2904ac_must_keep_next=false
2905for ac_pass in 1 2
2906do
2907  for ac_arg
2908  do
2909    case $ac_arg in
2910    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2911    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2912    | -silent | --silent | --silen | --sile | --sil)
2913      continue ;;
2914    *\'*)
2915      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2916    esac
2917    case $ac_pass in
2918    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2919    2)
2920      as_fn_append ac_configure_args1 " '$ac_arg'"
2921      if test $ac_must_keep_next = true; then
2922	ac_must_keep_next=false # Got value, back to normal.
2923      else
2924	case $ac_arg in
2925	  *=* | --config-cache | -C | -disable-* | --disable-* \
2926	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2927	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2928	  | -with-* | --with-* | -without-* | --without-* | --x)
2929	    case "$ac_configure_args0 " in
2930	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2931	    esac
2932	    ;;
2933	  -* ) ac_must_keep_next=true ;;
2934	esac
2935      fi
2936      as_fn_append ac_configure_args " '$ac_arg'"
2937      ;;
2938    esac
2939  done
2940done
2941{ ac_configure_args0=; unset ac_configure_args0;}
2942{ ac_configure_args1=; unset ac_configure_args1;}
2943
2944# When interrupted or exit'd, cleanup temporary files, and complete
2945# config.log.  We remove comments because anyway the quotes in there
2946# would cause problems or look ugly.
2947# WARNING: Use '\'' to represent an apostrophe within the trap.
2948# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2949trap 'exit_status=$?
2950  # Save into config.log some information that might help in debugging.
2951  {
2952    echo
2953
2954    $as_echo "## ---------------- ##
2955## Cache variables. ##
2956## ---------------- ##"
2957    echo
2958    # The following way of writing the cache mishandles newlines in values,
2959(
2960  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2961    eval ac_val=\$$ac_var
2962    case $ac_val in #(
2963    *${as_nl}*)
2964      case $ac_var in #(
2965      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2966$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2967      esac
2968      case $ac_var in #(
2969      _ | IFS | as_nl) ;; #(
2970      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2971      *) { eval $ac_var=; unset $ac_var;} ;;
2972      esac ;;
2973    esac
2974  done
2975  (set) 2>&1 |
2976    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2977    *${as_nl}ac_space=\ *)
2978      sed -n \
2979	"s/'\''/'\''\\\\'\'''\''/g;
2980	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2981      ;; #(
2982    *)
2983      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2984      ;;
2985    esac |
2986    sort
2987)
2988    echo
2989
2990    $as_echo "## ----------------- ##
2991## Output variables. ##
2992## ----------------- ##"
2993    echo
2994    for ac_var in $ac_subst_vars
2995    do
2996      eval ac_val=\$$ac_var
2997      case $ac_val in
2998      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2999      esac
3000      $as_echo "$ac_var='\''$ac_val'\''"
3001    done | sort
3002    echo
3003
3004    if test -n "$ac_subst_files"; then
3005      $as_echo "## ------------------- ##
3006## File substitutions. ##
3007## ------------------- ##"
3008      echo
3009      for ac_var in $ac_subst_files
3010      do
3011	eval ac_val=\$$ac_var
3012	case $ac_val in
3013	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3014	esac
3015	$as_echo "$ac_var='\''$ac_val'\''"
3016      done | sort
3017      echo
3018    fi
3019
3020    if test -s confdefs.h; then
3021      $as_echo "## ----------- ##
3022## confdefs.h. ##
3023## ----------- ##"
3024      echo
3025      cat confdefs.h
3026      echo
3027    fi
3028    test "$ac_signal" != 0 &&
3029      $as_echo "$as_me: caught signal $ac_signal"
3030    $as_echo "$as_me: exit $exit_status"
3031  } >&5
3032  rm -f core *.core core.conftest.* &&
3033    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3034    exit $exit_status
3035' 0
3036for ac_signal in 1 2 13 15; do
3037  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3038done
3039ac_signal=0
3040
3041# confdefs.h avoids OS command line length limits that DEFS can exceed.
3042rm -f -r conftest* confdefs.h
3043
3044$as_echo "/* confdefs.h */" > confdefs.h
3045
3046# Predefined preprocessor variables.
3047
3048cat >>confdefs.h <<_ACEOF
3049#define PACKAGE_NAME "$PACKAGE_NAME"
3050_ACEOF
3051
3052cat >>confdefs.h <<_ACEOF
3053#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3054_ACEOF
3055
3056cat >>confdefs.h <<_ACEOF
3057#define PACKAGE_VERSION "$PACKAGE_VERSION"
3058_ACEOF
3059
3060cat >>confdefs.h <<_ACEOF
3061#define PACKAGE_STRING "$PACKAGE_STRING"
3062_ACEOF
3063
3064cat >>confdefs.h <<_ACEOF
3065#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3066_ACEOF
3067
3068cat >>confdefs.h <<_ACEOF
3069#define PACKAGE_URL "$PACKAGE_URL"
3070_ACEOF
3071
3072
3073# Let the site file select an alternate cache file if it wants to.
3074# Prefer an explicitly selected file to automatically selected ones.
3075ac_site_file1=NONE
3076ac_site_file2=NONE
3077if test -n "$CONFIG_SITE"; then
3078  # We do not want a PATH search for config.site.
3079  case $CONFIG_SITE in #((
3080    -*)  ac_site_file1=./$CONFIG_SITE;;
3081    */*) ac_site_file1=$CONFIG_SITE;;
3082    *)   ac_site_file1=./$CONFIG_SITE;;
3083  esac
3084elif test "x$prefix" != xNONE; then
3085  ac_site_file1=$prefix/share/config.site
3086  ac_site_file2=$prefix/etc/config.site
3087else
3088  ac_site_file1=$ac_default_prefix/share/config.site
3089  ac_site_file2=$ac_default_prefix/etc/config.site
3090fi
3091for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3092do
3093  test "x$ac_site_file" = xNONE && continue
3094  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3095    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3096$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3097    sed 's/^/| /' "$ac_site_file" >&5
3098    . "$ac_site_file" \
3099      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3100$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3101as_fn_error $? "failed to load site script $ac_site_file
3102See \`config.log' for more details" "$LINENO" 5; }
3103  fi
3104done
3105
3106if test -r "$cache_file"; then
3107  # Some versions of bash will fail to source /dev/null (special files
3108  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3109  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3110    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3111$as_echo "$as_me: loading cache $cache_file" >&6;}
3112    case $cache_file in
3113      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3114      *)                      . "./$cache_file";;
3115    esac
3116  fi
3117else
3118  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3119$as_echo "$as_me: creating cache $cache_file" >&6;}
3120  >$cache_file
3121fi
3122
3123# Check that the precious variables saved in the cache have kept the same
3124# value.
3125ac_cache_corrupted=false
3126for ac_var in $ac_precious_vars; do
3127  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3128  eval ac_new_set=\$ac_env_${ac_var}_set
3129  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3130  eval ac_new_val=\$ac_env_${ac_var}_value
3131  case $ac_old_set,$ac_new_set in
3132    set,)
3133      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3134$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3135      ac_cache_corrupted=: ;;
3136    ,set)
3137      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3138$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3139      ac_cache_corrupted=: ;;
3140    ,);;
3141    *)
3142      if test "x$ac_old_val" != "x$ac_new_val"; then
3143	# differences in whitespace do not lead to failure.
3144	ac_old_val_w=`echo x $ac_old_val`
3145	ac_new_val_w=`echo x $ac_new_val`
3146	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3147	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3148$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3149	  ac_cache_corrupted=:
3150	else
3151	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3152$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3153	  eval $ac_var=\$ac_old_val
3154	fi
3155	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3156$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3157	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3158$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3159      fi;;
3160  esac
3161  # Pass precious variables to config.status.
3162  if test "$ac_new_set" = set; then
3163    case $ac_new_val in
3164    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3165    *) ac_arg=$ac_var=$ac_new_val ;;
3166    esac
3167    case " $ac_configure_args " in
3168      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3169      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3170    esac
3171  fi
3172done
3173if $ac_cache_corrupted; then
3174  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3175$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3176  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3177$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3178  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3179fi
3180## -------------------- ##
3181## Main body of script. ##
3182## -------------------- ##
3183
3184ac_ext=c
3185ac_cpp='$CPP $CPPFLAGS'
3186ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3187ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3188ac_compiler_gnu=$ac_cv_c_compiler_gnu
3189
3190
3191
3192ac_aux_dir=
3193for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3194  if test -f "$ac_dir/install-sh"; then
3195    ac_aux_dir=$ac_dir
3196    ac_install_sh="$ac_aux_dir/install-sh -c"
3197    break
3198  elif test -f "$ac_dir/install.sh"; then
3199    ac_aux_dir=$ac_dir
3200    ac_install_sh="$ac_aux_dir/install.sh -c"
3201    break
3202  elif test -f "$ac_dir/shtool"; then
3203    ac_aux_dir=$ac_dir
3204    ac_install_sh="$ac_aux_dir/shtool install -c"
3205    break
3206  fi
3207done
3208if test -z "$ac_aux_dir"; then
3209  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
3210fi
3211
3212# These three variables are undocumented and unsupported,
3213# and are intended to be withdrawn in a future Autoconf release.
3214# They can cause serious problems if a builder's source tree is in a directory
3215# whose full name contains unusual characters.
3216ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3217ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3218ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3219
3220
3221# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3222
3223#
3224# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3225# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3226#
3227# This code is free software; you can redistribute it and/or modify it
3228# under the terms of the GNU General Public License version 2 only, as
3229# published by the Free Software Foundation.  Oracle designates this
3230# particular file as subject to the "Classpath" exception as provided
3231# by Oracle in the LICENSE file that accompanied this code.
3232#
3233# This code is distributed in the hope that it will be useful, but WITHOUT
3234# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3235# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3236# version 2 for more details (a copy is included in the LICENSE file that
3237# accompanied this code).
3238#
3239# You should have received a copy of the GNU General Public License version
3240# 2 along with this work; if not, write to the Free Software Foundation,
3241# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3242#
3243# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3244# or visit www.oracle.com if you need additional information or have any
3245# questions.
3246#
3247
3248#
3249# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3250#
3251# This program is free software; you can redistribute it and/or modify
3252# it under the terms of the GNU General Public License as published by
3253# the Free Software Foundation; either version 2 of the License, or
3254# (at your option) any later version.
3255#
3256# This program is distributed in the hope that it will be useful, but
3257# WITHOUT ANY WARRANTY; without even the implied warranty of
3258# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3259# General Public License for more details.
3260#
3261# You should have received a copy of the GNU General Public License
3262# along with this program; if not, write to the Free Software
3263# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3264#
3265# As a special exception to the GNU General Public License, if you
3266# distribute this file as part of a program that contains a
3267# configuration script generated by Autoconf, you may include it under
3268# the same distribution terms that you use for the rest of that program.
3269
3270# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3271# ----------------------------------
3272# PKG_PROG_PKG_CONFIG
3273
3274# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3275#
3276# Check to see whether a particular set of modules exists.  Similar
3277# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3278#
3279#
3280# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3281# this or PKG_CHECK_MODULES is called, or make sure to call
3282# PKG_CHECK_EXISTS manually
3283# --------------------------------------------------------------
3284
3285
3286
3287# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3288# ---------------------------------------------
3289# _PKG_CONFIG
3290
3291# _PKG_SHORT_ERRORS_SUPPORTED
3292# -----------------------------
3293# _PKG_SHORT_ERRORS_SUPPORTED
3294
3295
3296# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3297# [ACTION-IF-NOT-FOUND])
3298#
3299#
3300# Note that if there is a possibility the first call to
3301# PKG_CHECK_MODULES might not happen, you should be sure to include an
3302# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3303#
3304#
3305# --------------------------------------------------------------
3306# PKG_CHECK_MODULES
3307
3308
3309# Include these first...
3310#
3311# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3312# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3313#
3314# This code is free software; you can redistribute it and/or modify it
3315# under the terms of the GNU General Public License version 2 only, as
3316# published by the Free Software Foundation.  Oracle designates this
3317# particular file as subject to the "Classpath" exception as provided
3318# by Oracle in the LICENSE file that accompanied this code.
3319#
3320# This code is distributed in the hope that it will be useful, but WITHOUT
3321# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3322# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3323# version 2 for more details (a copy is included in the LICENSE file that
3324# accompanied this code).
3325#
3326# You should have received a copy of the GNU General Public License version
3327# 2 along with this work; if not, write to the Free Software Foundation,
3328# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3329#
3330# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3331# or visit www.oracle.com if you need additional information or have any
3332# questions.
3333#
3334
3335# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3336# If so, then append $1 to $2 \
3337# Also set JVM_ARG_OK to true/false depending on outcome.
3338
3339
3340# Appends a string to a path variable, only adding the : when needed.
3341
3342
3343# Prepends a string to a path variable, only adding the : when needed.
3344
3345
3346# This will make sure the given variable points to a full and proper
3347# path. This means:
3348# 1) There will be no spaces in the path. On posix platforms,
3349#    spaces in the path will result in an error. On Windows,
3350#    the path will be rewritten using short-style to be space-free.
3351# 2) The path will be absolute, and it will be in unix-style (on
3352#     cygwin).
3353# $1: The name of the variable to fix
3354
3355
3356# This will make sure the given variable points to a executable
3357# with a full and proper path. This means:
3358# 1) There will be no spaces in the path. On posix platforms,
3359#    spaces in the path will result in an error. On Windows,
3360#    the path will be rewritten using short-style to be space-free.
3361# 2) The path will be absolute, and it will be in unix-style (on
3362#     cygwin).
3363# Any arguments given to the executable is preserved.
3364# If the input variable does not have a directory specification, then
3365# it need to be in the PATH.
3366# $1: The name of the variable to fix
3367
3368
3369
3370
3371# Register a --with argument but mark it as deprecated
3372# $1: The name of the with argument to deprecate, not including --with-
3373
3374
3375# Register a --enable argument but mark it as deprecated
3376# $1: The name of the with argument to deprecate, not including --enable-
3377# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3378
3379
3380
3381
3382# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3383# $1: variable to check
3384
3385
3386# Check that there are no unprocessed overridden variables left.
3387# If so, they are an incorrect argument and we will exit with an error.
3388
3389
3390# Setup a tool for the given variable. If correctly specified by the user,
3391# use that value, otherwise search for the tool using the supplied code snippet.
3392# $1: variable to set
3393# $2: code snippet to call to look for the tool
3394
3395
3396# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3397# $1: variable to set
3398# $2: executable name (or list of names) to look for
3399
3400
3401# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3402# $1: variable to set
3403# $2: executable name (or list of names) to look for
3404
3405
3406# Like BASIC_PATH_PROGS but fails if no tool was found.
3407# $1: variable to set
3408# $2: executable name (or list of names) to look for
3409
3410
3411# Like BASIC_SETUP_TOOL but fails if no tool was found.
3412# $1: variable to set
3413# $2: autoconf macro to call to look for the special tool
3414
3415
3416# Setup the most fundamental tools that relies on not much else to set up,
3417# but is used by much of the early bootstrap code.
3418
3419
3420# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430#%%% Simple tools %%%
3431
3432# Check if we have found a usable version of make
3433# $1: the path to a potential make binary (or empty)
3434# $2: the description on how we found this
3435
3436
3437# Goes looking for a usable version of GNU make.
3438
3439
3440
3441
3442
3443
3444# Check if build directory is on local disk. If not possible to determine,
3445# we prefer to claim it's local.
3446# Argument 1: directory to test
3447# Argument 2: what to do if it is on local disk
3448# Argument 3: what to do otherwise (remote disk or failure)
3449
3450
3451# Check that source files have basic read permissions set. This might
3452# not be the case in cygwin in certain conditions.
3453
3454
3455
3456
3457#
3458# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3459# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3460#
3461# This code is free software; you can redistribute it and/or modify it
3462# under the terms of the GNU General Public License version 2 only, as
3463# published by the Free Software Foundation.  Oracle designates this
3464# particular file as subject to the "Classpath" exception as provided
3465# by Oracle in the LICENSE file that accompanied this code.
3466#
3467# This code is distributed in the hope that it will be useful, but WITHOUT
3468# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3469# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3470# version 2 for more details (a copy is included in the LICENSE file that
3471# accompanied this code).
3472#
3473# You should have received a copy of the GNU General Public License version
3474# 2 along with this work; if not, write to the Free Software Foundation,
3475# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3476#
3477# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3478# or visit www.oracle.com if you need additional information or have any
3479# questions.
3480#
3481
3482
3483
3484
3485
3486# Helper function which possibly converts a path using DOS-style short mode.
3487# If so, the updated path is stored in $new_path.
3488# $1: The path to check
3489
3490
3491# Helper function which possibly converts a path using DOS-style short mode.
3492# If so, the updated path is stored in $new_path.
3493# $1: The path to check
3494
3495
3496# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3497# and could probably be heavily simplified. However, all changes in this
3498# area tend to need lot of testing in different scenarios, and in lack of
3499# proper unit testing, cleaning this up has not been deemed worth the effort
3500# at the moment.
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3511
3512
3513
3514
3515#
3516# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3517# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3518#
3519# This code is free software; you can redistribute it and/or modify it
3520# under the terms of the GNU General Public License version 2 only, as
3521# published by the Free Software Foundation.  Oracle designates this
3522# particular file as subject to the "Classpath" exception as provided
3523# by Oracle in the LICENSE file that accompanied this code.
3524#
3525# This code is distributed in the hope that it will be useful, but WITHOUT
3526# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3527# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3528# version 2 for more details (a copy is included in the LICENSE file that
3529# accompanied this code).
3530#
3531# You should have received a copy of the GNU General Public License version
3532# 2 along with this work; if not, write to the Free Software Foundation,
3533# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3534#
3535# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3536# or visit www.oracle.com if you need additional information or have any
3537# questions.
3538#
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550# ... then the rest
3551#
3552# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3553# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3554#
3555# This code is free software; you can redistribute it and/or modify it
3556# under the terms of the GNU General Public License version 2 only, as
3557# published by the Free Software Foundation.  Oracle designates this
3558# particular file as subject to the "Classpath" exception as provided
3559# by Oracle in the LICENSE file that accompanied this code.
3560#
3561# This code is distributed in the hope that it will be useful, but WITHOUT
3562# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3563# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3564# version 2 for more details (a copy is included in the LICENSE file that
3565# accompanied this code).
3566#
3567# You should have received a copy of the GNU General Public License version
3568# 2 along with this work; if not, write to the Free Software Foundation,
3569# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3570#
3571# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3572# or visit www.oracle.com if you need additional information or have any
3573# questions.
3574#
3575
3576########################################################################
3577# This file handles detection of the Boot JDK. The Boot JDK detection
3578# process has been developed as a response to solve a complex real-world
3579# problem. Initially, it was simple, but it has grown as platform after
3580# platform, idiosyncracy after idiosyncracy has been supported.
3581#
3582# The basic idea is this:
3583# 1) You need an acceptable *) JDK to use as a Boot JDK
3584# 2) There are several ways to locate a JDK, that are mostly platform
3585#    dependent **)
3586# 3) You can have multiple JDKs installed
3587# 4) If possible, configure should try to dig out an acceptable JDK
3588#    automatically, without having to resort to command-line options
3589#
3590# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3591#     javac) and not a JRE, etc.
3592#
3593# **) On Windows we typically use a well-known path.
3594#     On MacOSX we typically use the tool java_home.
3595#     On Linux we typically find javac in the $PATH, and then follow a
3596#     chain of symlinks that often ends up in a real JDK.
3597#
3598# This leads to the code where we check in different ways to locate a
3599# JDK, and if one is found, check if it is acceptable. If not, we print
3600# our reasons for rejecting it (useful when debugging non-working
3601# configure situations) and continue checking the next one.
3602########################################################################
3603
3604# Execute the check given as argument, and verify the result
3605# If the Boot JDK was previously found, do nothing
3606# $1 A command line (typically autoconf macro) to execute
3607
3608
3609# Test: Is bootjdk explicitely set by command line arguments?
3610
3611
3612# Test: Is bootjdk available from builddeps?
3613
3614
3615# Test: Is $JAVA_HOME set?
3616
3617
3618# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3619
3620
3621# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3622# $1: Argument to the java_home binary (optional)
3623
3624
3625# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3626
3627
3628# Look for a jdk in the given path. If there are multiple, try to select the newest.
3629# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3630# $1 = Path to directory containing jdk installations.
3631# $2 = String to append to the found JDK directory to get the proper JDK home
3632
3633
3634# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3635# environmental variable as base for where to look.
3636# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3637
3638
3639# Test: Is there a JDK installed in default, well-known locations?
3640
3641
3642# Check that a command-line tool in the Boot JDK is correct
3643# $1 = name of variable to assign
3644# $2 = name of binary
3645
3646
3647###############################################################################
3648#
3649# We need a Boot JDK to bootstrap the build.
3650#
3651
3652
3653
3654
3655
3656#
3657# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3658# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3659#
3660# This code is free software; you can redistribute it and/or modify it
3661# under the terms of the GNU General Public License version 2 only, as
3662# published by the Free Software Foundation.  Oracle designates this
3663# particular file as subject to the "Classpath" exception as provided
3664# by Oracle in the LICENSE file that accompanied this code.
3665#
3666# This code is distributed in the hope that it will be useful, but WITHOUT
3667# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3668# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3669# version 2 for more details (a copy is included in the LICENSE file that
3670# accompanied this code).
3671#
3672# You should have received a copy of the GNU General Public License version
3673# 2 along with this work; if not, write to the Free Software Foundation,
3674# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3675#
3676# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3677# or visit www.oracle.com if you need additional information or have any
3678# questions.
3679#
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700#
3701# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3702# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3703#
3704# This code is free software; you can redistribute it and/or modify it
3705# under the terms of the GNU General Public License version 2 only, as
3706# published by the Free Software Foundation.  Oracle designates this
3707# particular file as subject to the "Classpath" exception as provided
3708# by Oracle in the LICENSE file that accompanied this code.
3709#
3710# This code is distributed in the hope that it will be useful, but WITHOUT
3711# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3712# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3713# version 2 for more details (a copy is included in the LICENSE file that
3714# accompanied this code).
3715#
3716# You should have received a copy of the GNU General Public License version
3717# 2 along with this work; if not, write to the Free Software Foundation,
3718# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3719#
3720# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3721# or visit www.oracle.com if you need additional information or have any
3722# questions.
3723#
3724
3725
3726
3727
3728
3729# Documentation on common flags used for solstudio in HIGHEST.
3730#
3731# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3732#          done with care, there are some assumptions below that need to
3733#          be understood about the use of pointers, and IEEE behavior.
3734#
3735# -fns: Use non-standard floating point mode (not IEEE 754)
3736# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3737# -fsingle: Use single precision floating point with 'float'
3738# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3739#   (Source with excessing pointer casting and data access with mixed
3740#    pointer types are not recommended)
3741# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3742#   (If you expect perfect errno behavior, do not use this)
3743# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3744# -xrestrict: Pointer parameters to functions do not overlap
3745#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3746#    If you pass in multiple pointers to the same data, do not use this)
3747# -xlibmil: Inline some library routines
3748#   (If you expect perfect errno behavior, do not use this)
3749# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3750#   (If you expect perfect errno behavior, do not use this)
3751#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3752
3753    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3754    # Bug?
3755    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3756    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3757    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3758    #fi
3759
3760
3761
3762
3763
3764
3765# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3766#                                   [RUN-IF-FALSE])
3767# ------------------------------------------------------------
3768# Check that the c and c++ compilers support an argument
3769
3770
3771
3772
3773#
3774# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3775# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3776#
3777# This code is free software; you can redistribute it and/or modify it
3778# under the terms of the GNU General Public License version 2 only, as
3779# published by the Free Software Foundation.  Oracle designates this
3780# particular file as subject to the "Classpath" exception as provided
3781# by Oracle in the LICENSE file that accompanied this code.
3782#
3783# This code is distributed in the hope that it will be useful, but WITHOUT
3784# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3785# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3786# version 2 for more details (a copy is included in the LICENSE file that
3787# accompanied this code).
3788#
3789# You should have received a copy of the GNU General Public License version
3790# 2 along with this work; if not, write to the Free Software Foundation,
3791# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3792#
3793# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3794# or visit www.oracle.com if you need additional information or have any
3795# questions.
3796#
3797
3798
3799
3800
3801
3802cygwin_help() {
3803  case $1 in
3804    unzip)
3805      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3806      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3807      ;;
3808    zip)
3809      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3810      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3811      ;;
3812    make)
3813      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3814      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3815      ;;
3816    freetype)
3817      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3818        HELP_MSG="To install freetype, run:
3819wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3820chmod +x /tmp/freetype-setup.exe
3821/tmp/freetype-setup.exe
3822Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3823After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3824      else
3825        HELP_MSG="You need to build a 64-bit version of freetype.
3826This is not readily available.
3827You can find source code and build instructions on
3828http://www.freetype.org/
3829If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3830      fi
3831      ;;
3832  esac
3833}
3834
3835msys_help() {
3836  PKGHANDLER_COMMAND=""
3837}
3838
3839apt_help() {
3840  case $1 in
3841    devkit)
3842      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3843    openjdk)
3844      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3845    alsa)
3846      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3847    cups)
3848      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3849    freetype)
3850      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3851    pulse)
3852      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3853    x11)
3854      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3855    ccache)
3856      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3857  esac
3858}
3859
3860yum_help() {
3861  case $1 in
3862    devkit)
3863      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3864    openjdk)
3865      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3866    alsa)
3867      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3868    cups)
3869      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3870    freetype)
3871      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3872    pulse)
3873      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3874    x11)
3875      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3876    ccache)
3877      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3878  esac
3879}
3880
3881port_help() {
3882  PKGHANDLER_COMMAND=""
3883}
3884
3885pkgutil_help() {
3886  PKGHANDLER_COMMAND=""
3887}
3888
3889pkgadd_help() {
3890  PKGHANDLER_COMMAND=""
3891}
3892
3893# This function will check if we're called from the "configure" wrapper while
3894# printing --help. If so, we will print out additional information that can
3895# only be extracted within the autoconf script, and then exit. This must be
3896# called at the very beginning in configure.ac.
3897
3898
3899
3900
3901#
3902# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3903# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3904#
3905# This code is free software; you can redistribute it and/or modify it
3906# under the terms of the GNU General Public License version 2 only, as
3907# published by the Free Software Foundation.  Oracle designates this
3908# particular file as subject to the "Classpath" exception as provided
3909# by Oracle in the LICENSE file that accompanied this code.
3910#
3911# This code is distributed in the hope that it will be useful, but WITHOUT
3912# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3913# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3914# version 2 for more details (a copy is included in the LICENSE file that
3915# accompanied this code).
3916#
3917# You should have received a copy of the GNU General Public License version
3918# 2 along with this work; if not, write to the Free Software Foundation,
3919# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3920#
3921# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3922# or visit www.oracle.com if you need additional information or have any
3923# questions.
3924#
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935###############################################################################
3936#
3937# Should we build only OpenJDK even if closed sources are present?
3938#
3939
3940
3941
3942
3943###############################################################################
3944#
3945# Setup version numbers
3946#
3947
3948
3949
3950
3951
3952
3953#
3954# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3955# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3956#
3957# This code is free software; you can redistribute it and/or modify it
3958# under the terms of the GNU General Public License version 2 only, as
3959# published by the Free Software Foundation.  Oracle designates this
3960# particular file as subject to the "Classpath" exception as provided
3961# by Oracle in the LICENSE file that accompanied this code.
3962#
3963# This code is distributed in the hope that it will be useful, but WITHOUT
3964# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3965# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3966# version 2 for more details (a copy is included in the LICENSE file that
3967# accompanied this code).
3968#
3969# You should have received a copy of the GNU General Public License version
3970# 2 along with this work; if not, write to the Free Software Foundation,
3971# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3972#
3973# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3974# or visit www.oracle.com if you need additional information or have any
3975# questions.
3976#
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996#
3997# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3998# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3999#
4000# This code is free software; you can redistribute it and/or modify it
4001# under the terms of the GNU General Public License version 2 only, as
4002# published by the Free Software Foundation.  Oracle designates this
4003# particular file as subject to the "Classpath" exception as provided
4004# by Oracle in the LICENSE file that accompanied this code.
4005#
4006# This code is distributed in the hope that it will be useful, but WITHOUT
4007# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4008# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4009# version 2 for more details (a copy is included in the LICENSE file that
4010# accompanied this code).
4011#
4012# You should have received a copy of the GNU General Public License version
4013# 2 along with this work; if not, write to the Free Software Foundation,
4014# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4015#
4016# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4017# or visit www.oracle.com if you need additional information or have any
4018# questions.
4019#
4020
4021# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4022# Converts autoconf style CPU name to OpenJDK style, into
4023# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4024
4025
4026# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4027# Converts autoconf style OS name to OpenJDK style, into
4028# VAR_OS and VAR_OS_API.
4029
4030
4031# Expects $host_os $host_cpu $build_os and $build_cpu
4032# and $with_target_bits to have been setup!
4033#
4034# Translate the standard triplet(quadruplet) definition
4035# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4036# OPENJDK_BUILD_OS, etc.
4037
4038
4039# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4040# accordingly. Must be done after setting up build and target system, but before
4041# doing anything else with these values.
4042
4043
4044# Setup the legacy variables, for controlling the old makefiles.
4045#
4046
4047
4048
4049
4050#%%% Build and target systems %%%
4051
4052
4053
4054
4055# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4056# Add -mX to various FLAGS variables.
4057
4058
4059
4060
4061
4062
4063#
4064# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4065# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4066#
4067# This code is free software; you can redistribute it and/or modify it
4068# under the terms of the GNU General Public License version 2 only, as
4069# published by the Free Software Foundation.  Oracle designates this
4070# particular file as subject to the "Classpath" exception as provided
4071# by Oracle in the LICENSE file that accompanied this code.
4072#
4073# This code is distributed in the hope that it will be useful, but WITHOUT
4074# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4075# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4076# version 2 for more details (a copy is included in the LICENSE file that
4077# accompanied this code).
4078#
4079# You should have received a copy of the GNU General Public License version
4080# 2 along with this work; if not, write to the Free Software Foundation,
4081# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4082#
4083# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4084# or visit www.oracle.com if you need additional information or have any
4085# questions.
4086#
4087
4088
4089
4090
4091
4092
4093
4094
4095#
4096# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4097# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4098#
4099# This code is free software; you can redistribute it and/or modify it
4100# under the terms of the GNU General Public License version 2 only, as
4101# published by the Free Software Foundation.  Oracle designates this
4102# particular file as subject to the "Classpath" exception as provided
4103# by Oracle in the LICENSE file that accompanied this code.
4104#
4105# This code is distributed in the hope that it will be useful, but WITHOUT
4106# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4107# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4108# version 2 for more details (a copy is included in the LICENSE file that
4109# accompanied this code).
4110#
4111# You should have received a copy of the GNU General Public License version
4112# 2 along with this work; if not, write to the Free Software Foundation,
4113# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4114#
4115# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4116# or visit www.oracle.com if you need additional information or have any
4117# questions.
4118#
4119
4120########################################################################
4121# This file is responsible for detecting, verifying and setting up the
4122# toolchain, i.e. the compiler, linker and related utilities. It will setup
4123# proper paths to the binaries, but it will not setup any flags.
4124#
4125# The binaries used is determined by the toolchain type, which is the family of
4126# compilers and related tools that are used.
4127########################################################################
4128
4129
4130# All valid toolchains, regardless of platform (used by help.m4)
4131VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4132
4133# These toolchains are valid on different platforms
4134VALID_TOOLCHAINS_linux="gcc clang"
4135VALID_TOOLCHAINS_solaris="solstudio"
4136VALID_TOOLCHAINS_macosx="gcc clang"
4137VALID_TOOLCHAINS_aix="xlc"
4138VALID_TOOLCHAINS_windows="microsoft"
4139
4140# Toolchain descriptions
4141TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4142TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4143TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4144TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4145TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4146
4147# Setup a number of variables describing how native output files are
4148# named on this platform/toolchain.
4149
4150
4151# Determine which toolchain type to use, and make sure it is valid for this
4152# platform. Setup various information about the selected toolchain.
4153
4154
4155# Before we start detecting the toolchain executables, we might need some
4156# special setup, e.g. additional paths etc.
4157
4158
4159# Restore path, etc
4160
4161
4162# Check if a compiler is of the toolchain type we expect, and save the version
4163# information from it. If the compiler does not match the expected type,
4164# this function will abort using AC_MSG_ERROR. If it matches, the version will
4165# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4166# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4167#
4168# $1 = compiler to test (CC or CXX)
4169# $2 = human readable name of compiler (C or C++)
4170
4171
4172# Try to locate the given C or C++ compiler in the path, or otherwise.
4173#
4174# $1 = compiler to test (CC or CXX)
4175# $2 = human readable name of compiler (C or C++)
4176# $3 = list of compiler names to search for
4177
4178
4179# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4180# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4181# archiver (AR). Verify that the compilers are correct according to the
4182# toolchain type.
4183
4184
4185# Setup additional tools that is considered a part of the toolchain, but not the
4186# core part. Many of these are highly platform-specific and do not exist,
4187# and/or are not needed on all platforms.
4188
4189
4190# Setup the build tools (i.e, the compiler and linker used to build programs
4191# that should be run on the build platform, not the target platform, as a build
4192# helper). Since the non-cross-compile case uses the normal, target compilers
4193# for this, we can only do this after these have been setup.
4194
4195
4196# Setup legacy variables that are still needed as alternative ways to refer to
4197# parts of the toolchain.
4198
4199
4200# Do some additional checks on the detected tools.
4201
4202
4203# Setup the JTReg Regression Test Harness.
4204
4205
4206#
4207# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4208# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4209#
4210# This code is free software; you can redistribute it and/or modify it
4211# under the terms of the GNU General Public License version 2 only, as
4212# published by the Free Software Foundation.  Oracle designates this
4213# particular file as subject to the "Classpath" exception as provided
4214# by Oracle in the LICENSE file that accompanied this code.
4215#
4216# This code is distributed in the hope that it will be useful, but WITHOUT
4217# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4218# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4219# version 2 for more details (a copy is included in the LICENSE file that
4220# accompanied this code).
4221#
4222# You should have received a copy of the GNU General Public License version
4223# 2 along with this work; if not, write to the Free Software Foundation,
4224# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4225#
4226# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4227# or visit www.oracle.com if you need additional information or have any
4228# questions.
4229#
4230
4231
4232
4233
4234
4235
4236
4237# Check if the VS env variables were setup prior to running configure.
4238# If not, then find vcvarsall.bat and run it automatically, and integrate
4239# the set env variables into the spec file.
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250# This line needs to be here, verbatim, after all includes and the dummy hook
4251# definitions. It is replaced with custom functionality when building
4252# custom sources.
4253#CUSTOM_AUTOCONF_INCLUDE
4254
4255# Do not change or remove the following line, it is needed for consistency checks:
4256DATE_WHEN_GENERATED=1398799568
4257
4258###############################################################################
4259#
4260# Initialization / Boot-strapping
4261#
4262# The bootstrapping process needs to solve the "chicken or the egg" problem,
4263# thus it jumps back and forth, each time gaining something needed later on.
4264#
4265###############################################################################
4266
4267# If we are requested to print additional help, do that and then exit.
4268# This must be the very first call.
4269
4270  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4271    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4272    $PRINTF "Which are valid to use depends on the build platform.\n"
4273    for toolchain in $VALID_TOOLCHAINS_all; do
4274      # Use indirect variable referencing
4275      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4276      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4277      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4278    done
4279
4280    # And now exit directly
4281    exit 0
4282  fi
4283
4284
4285# Basic initialization that must happen first of all in the normal process.
4286
4287  # Save the original command line. This is passed to us by the wrapper configure script.
4288
4289  DATE_WHEN_CONFIGURED=`LANG=C date`
4290
4291  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4292$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4293  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4294$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4295
4296
4297  # Start with tools that do not need have cross compilation support
4298  # and can be expected to be found in the default PATH. These tools are
4299  # used by configure. Nor are these tools expected to be found in the
4300  # devkit from the builddeps server either, since they are
4301  # needed to download the devkit.
4302
4303  # First are all the simple required tools.
4304
4305
4306
4307  # Publish this variable in the help.
4308
4309
4310  if test "x$BASENAME" = x; then
4311    # The variable is not set by user, try to locate tool using the code snippet
4312    for ac_prog in basename
4313do
4314  # Extract the first word of "$ac_prog", so it can be a program name with args.
4315set dummy $ac_prog; ac_word=$2
4316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4317$as_echo_n "checking for $ac_word... " >&6; }
4318if ${ac_cv_path_BASENAME+:} false; then :
4319  $as_echo_n "(cached) " >&6
4320else
4321  case $BASENAME in
4322  [\\/]* | ?:[\\/]*)
4323  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4324  ;;
4325  *)
4326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4327for as_dir in $PATH
4328do
4329  IFS=$as_save_IFS
4330  test -z "$as_dir" && as_dir=.
4331    for ac_exec_ext in '' $ac_executable_extensions; do
4332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4333    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4335    break 2
4336  fi
4337done
4338  done
4339IFS=$as_save_IFS
4340
4341  ;;
4342esac
4343fi
4344BASENAME=$ac_cv_path_BASENAME
4345if test -n "$BASENAME"; then
4346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4347$as_echo "$BASENAME" >&6; }
4348else
4349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4350$as_echo "no" >&6; }
4351fi
4352
4353
4354  test -n "$BASENAME" && break
4355done
4356
4357  else
4358    # The variable is set, but is it from the command line or the environment?
4359
4360    # Try to remove the string !BASENAME! from our list.
4361    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4362    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4363      # If it failed, the variable was not from the command line. Ignore it,
4364      # but warn the user (except for BASH, which is always set by the calling BASH).
4365      if test "xBASENAME" != xBASH; then
4366        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4367$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4368      fi
4369      # Try to locate tool using the code snippet
4370      for ac_prog in basename
4371do
4372  # Extract the first word of "$ac_prog", so it can be a program name with args.
4373set dummy $ac_prog; ac_word=$2
4374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4375$as_echo_n "checking for $ac_word... " >&6; }
4376if ${ac_cv_path_BASENAME+:} false; then :
4377  $as_echo_n "(cached) " >&6
4378else
4379  case $BASENAME in
4380  [\\/]* | ?:[\\/]*)
4381  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4382  ;;
4383  *)
4384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4385for as_dir in $PATH
4386do
4387  IFS=$as_save_IFS
4388  test -z "$as_dir" && as_dir=.
4389    for ac_exec_ext in '' $ac_executable_extensions; do
4390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4391    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4393    break 2
4394  fi
4395done
4396  done
4397IFS=$as_save_IFS
4398
4399  ;;
4400esac
4401fi
4402BASENAME=$ac_cv_path_BASENAME
4403if test -n "$BASENAME"; then
4404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4405$as_echo "$BASENAME" >&6; }
4406else
4407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4408$as_echo "no" >&6; }
4409fi
4410
4411
4412  test -n "$BASENAME" && break
4413done
4414
4415    else
4416      # If it succeeded, then it was overridden by the user. We will use it
4417      # for the tool.
4418
4419      # First remove it from the list of overridden variables, so we can test
4420      # for unknown variables in the end.
4421      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4422
4423      # Check if the provided tool contains a complete path.
4424      tool_specified="$BASENAME"
4425      tool_basename="${tool_specified##*/}"
4426      if test "x$tool_basename" = "x$tool_specified"; then
4427        # A command without a complete path is provided, search $PATH.
4428        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4429$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4430        # Extract the first word of "$tool_basename", so it can be a program name with args.
4431set dummy $tool_basename; ac_word=$2
4432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4433$as_echo_n "checking for $ac_word... " >&6; }
4434if ${ac_cv_path_BASENAME+:} false; then :
4435  $as_echo_n "(cached) " >&6
4436else
4437  case $BASENAME in
4438  [\\/]* | ?:[\\/]*)
4439  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4440  ;;
4441  *)
4442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4443for as_dir in $PATH
4444do
4445  IFS=$as_save_IFS
4446  test -z "$as_dir" && as_dir=.
4447    for ac_exec_ext in '' $ac_executable_extensions; do
4448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4449    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4451    break 2
4452  fi
4453done
4454  done
4455IFS=$as_save_IFS
4456
4457  ;;
4458esac
4459fi
4460BASENAME=$ac_cv_path_BASENAME
4461if test -n "$BASENAME"; then
4462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4463$as_echo "$BASENAME" >&6; }
4464else
4465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4466$as_echo "no" >&6; }
4467fi
4468
4469
4470        if test "x$BASENAME" = x; then
4471          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4472        fi
4473      else
4474        # Otherwise we believe it is a complete path. Use it as it is.
4475        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4476$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4477        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4478$as_echo_n "checking for BASENAME... " >&6; }
4479        if test ! -x "$tool_specified"; then
4480          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4481$as_echo "not found" >&6; }
4482          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4483        fi
4484        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4485$as_echo "$tool_specified" >&6; }
4486      fi
4487    fi
4488  fi
4489
4490
4491
4492  if test "x$BASENAME" = x; then
4493    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4494  fi
4495
4496
4497
4498
4499
4500  # Publish this variable in the help.
4501
4502
4503  if test "x$BASH" = x; then
4504    # The variable is not set by user, try to locate tool using the code snippet
4505    for ac_prog in bash
4506do
4507  # Extract the first word of "$ac_prog", so it can be a program name with args.
4508set dummy $ac_prog; ac_word=$2
4509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4510$as_echo_n "checking for $ac_word... " >&6; }
4511if ${ac_cv_path_BASH+:} false; then :
4512  $as_echo_n "(cached) " >&6
4513else
4514  case $BASH in
4515  [\\/]* | ?:[\\/]*)
4516  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4517  ;;
4518  *)
4519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4520for as_dir in $PATH
4521do
4522  IFS=$as_save_IFS
4523  test -z "$as_dir" && as_dir=.
4524    for ac_exec_ext in '' $ac_executable_extensions; do
4525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4526    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4528    break 2
4529  fi
4530done
4531  done
4532IFS=$as_save_IFS
4533
4534  ;;
4535esac
4536fi
4537BASH=$ac_cv_path_BASH
4538if test -n "$BASH"; then
4539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4540$as_echo "$BASH" >&6; }
4541else
4542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4543$as_echo "no" >&6; }
4544fi
4545
4546
4547  test -n "$BASH" && break
4548done
4549
4550  else
4551    # The variable is set, but is it from the command line or the environment?
4552
4553    # Try to remove the string !BASH! from our list.
4554    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4555    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4556      # If it failed, the variable was not from the command line. Ignore it,
4557      # but warn the user (except for BASH, which is always set by the calling BASH).
4558      if test "xBASH" != xBASH; then
4559        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4560$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4561      fi
4562      # Try to locate tool using the code snippet
4563      for ac_prog in bash
4564do
4565  # Extract the first word of "$ac_prog", so it can be a program name with args.
4566set dummy $ac_prog; ac_word=$2
4567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4568$as_echo_n "checking for $ac_word... " >&6; }
4569if ${ac_cv_path_BASH+:} false; then :
4570  $as_echo_n "(cached) " >&6
4571else
4572  case $BASH in
4573  [\\/]* | ?:[\\/]*)
4574  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4575  ;;
4576  *)
4577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4578for as_dir in $PATH
4579do
4580  IFS=$as_save_IFS
4581  test -z "$as_dir" && as_dir=.
4582    for ac_exec_ext in '' $ac_executable_extensions; do
4583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4584    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4586    break 2
4587  fi
4588done
4589  done
4590IFS=$as_save_IFS
4591
4592  ;;
4593esac
4594fi
4595BASH=$ac_cv_path_BASH
4596if test -n "$BASH"; then
4597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4598$as_echo "$BASH" >&6; }
4599else
4600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4601$as_echo "no" >&6; }
4602fi
4603
4604
4605  test -n "$BASH" && break
4606done
4607
4608    else
4609      # If it succeeded, then it was overridden by the user. We will use it
4610      # for the tool.
4611
4612      # First remove it from the list of overridden variables, so we can test
4613      # for unknown variables in the end.
4614      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4615
4616      # Check if the provided tool contains a complete path.
4617      tool_specified="$BASH"
4618      tool_basename="${tool_specified##*/}"
4619      if test "x$tool_basename" = "x$tool_specified"; then
4620        # A command without a complete path is provided, search $PATH.
4621        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4622$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4623        # Extract the first word of "$tool_basename", so it can be a program name with args.
4624set dummy $tool_basename; ac_word=$2
4625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4626$as_echo_n "checking for $ac_word... " >&6; }
4627if ${ac_cv_path_BASH+:} false; then :
4628  $as_echo_n "(cached) " >&6
4629else
4630  case $BASH in
4631  [\\/]* | ?:[\\/]*)
4632  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4633  ;;
4634  *)
4635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4636for as_dir in $PATH
4637do
4638  IFS=$as_save_IFS
4639  test -z "$as_dir" && as_dir=.
4640    for ac_exec_ext in '' $ac_executable_extensions; do
4641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4642    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4644    break 2
4645  fi
4646done
4647  done
4648IFS=$as_save_IFS
4649
4650  ;;
4651esac
4652fi
4653BASH=$ac_cv_path_BASH
4654if test -n "$BASH"; then
4655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4656$as_echo "$BASH" >&6; }
4657else
4658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4659$as_echo "no" >&6; }
4660fi
4661
4662
4663        if test "x$BASH" = x; then
4664          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4665        fi
4666      else
4667        # Otherwise we believe it is a complete path. Use it as it is.
4668        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4669$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4670        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4671$as_echo_n "checking for BASH... " >&6; }
4672        if test ! -x "$tool_specified"; then
4673          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4674$as_echo "not found" >&6; }
4675          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4676        fi
4677        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4678$as_echo "$tool_specified" >&6; }
4679      fi
4680    fi
4681  fi
4682
4683
4684
4685  if test "x$BASH" = x; then
4686    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4687  fi
4688
4689
4690
4691
4692
4693  # Publish this variable in the help.
4694
4695
4696  if test "x$CAT" = x; then
4697    # The variable is not set by user, try to locate tool using the code snippet
4698    for ac_prog in cat
4699do
4700  # Extract the first word of "$ac_prog", so it can be a program name with args.
4701set dummy $ac_prog; ac_word=$2
4702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4703$as_echo_n "checking for $ac_word... " >&6; }
4704if ${ac_cv_path_CAT+:} false; then :
4705  $as_echo_n "(cached) " >&6
4706else
4707  case $CAT in
4708  [\\/]* | ?:[\\/]*)
4709  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4710  ;;
4711  *)
4712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4713for as_dir in $PATH
4714do
4715  IFS=$as_save_IFS
4716  test -z "$as_dir" && as_dir=.
4717    for ac_exec_ext in '' $ac_executable_extensions; do
4718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4719    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4721    break 2
4722  fi
4723done
4724  done
4725IFS=$as_save_IFS
4726
4727  ;;
4728esac
4729fi
4730CAT=$ac_cv_path_CAT
4731if test -n "$CAT"; then
4732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4733$as_echo "$CAT" >&6; }
4734else
4735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4736$as_echo "no" >&6; }
4737fi
4738
4739
4740  test -n "$CAT" && break
4741done
4742
4743  else
4744    # The variable is set, but is it from the command line or the environment?
4745
4746    # Try to remove the string !CAT! from our list.
4747    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4748    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4749      # If it failed, the variable was not from the command line. Ignore it,
4750      # but warn the user (except for BASH, which is always set by the calling BASH).
4751      if test "xCAT" != xBASH; then
4752        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4753$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4754      fi
4755      # Try to locate tool using the code snippet
4756      for ac_prog in cat
4757do
4758  # Extract the first word of "$ac_prog", so it can be a program name with args.
4759set dummy $ac_prog; ac_word=$2
4760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4761$as_echo_n "checking for $ac_word... " >&6; }
4762if ${ac_cv_path_CAT+:} false; then :
4763  $as_echo_n "(cached) " >&6
4764else
4765  case $CAT in
4766  [\\/]* | ?:[\\/]*)
4767  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4768  ;;
4769  *)
4770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4771for as_dir in $PATH
4772do
4773  IFS=$as_save_IFS
4774  test -z "$as_dir" && as_dir=.
4775    for ac_exec_ext in '' $ac_executable_extensions; do
4776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4777    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4779    break 2
4780  fi
4781done
4782  done
4783IFS=$as_save_IFS
4784
4785  ;;
4786esac
4787fi
4788CAT=$ac_cv_path_CAT
4789if test -n "$CAT"; then
4790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4791$as_echo "$CAT" >&6; }
4792else
4793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4794$as_echo "no" >&6; }
4795fi
4796
4797
4798  test -n "$CAT" && break
4799done
4800
4801    else
4802      # If it succeeded, then it was overridden by the user. We will use it
4803      # for the tool.
4804
4805      # First remove it from the list of overridden variables, so we can test
4806      # for unknown variables in the end.
4807      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4808
4809      # Check if the provided tool contains a complete path.
4810      tool_specified="$CAT"
4811      tool_basename="${tool_specified##*/}"
4812      if test "x$tool_basename" = "x$tool_specified"; then
4813        # A command without a complete path is provided, search $PATH.
4814        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4815$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4816        # Extract the first word of "$tool_basename", so it can be a program name with args.
4817set dummy $tool_basename; ac_word=$2
4818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4819$as_echo_n "checking for $ac_word... " >&6; }
4820if ${ac_cv_path_CAT+:} false; then :
4821  $as_echo_n "(cached) " >&6
4822else
4823  case $CAT in
4824  [\\/]* | ?:[\\/]*)
4825  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4826  ;;
4827  *)
4828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4829for as_dir in $PATH
4830do
4831  IFS=$as_save_IFS
4832  test -z "$as_dir" && as_dir=.
4833    for ac_exec_ext in '' $ac_executable_extensions; do
4834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4835    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4837    break 2
4838  fi
4839done
4840  done
4841IFS=$as_save_IFS
4842
4843  ;;
4844esac
4845fi
4846CAT=$ac_cv_path_CAT
4847if test -n "$CAT"; then
4848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4849$as_echo "$CAT" >&6; }
4850else
4851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4852$as_echo "no" >&6; }
4853fi
4854
4855
4856        if test "x$CAT" = x; then
4857          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4858        fi
4859      else
4860        # Otherwise we believe it is a complete path. Use it as it is.
4861        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4862$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4863        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4864$as_echo_n "checking for CAT... " >&6; }
4865        if test ! -x "$tool_specified"; then
4866          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4867$as_echo "not found" >&6; }
4868          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4869        fi
4870        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4871$as_echo "$tool_specified" >&6; }
4872      fi
4873    fi
4874  fi
4875
4876
4877
4878  if test "x$CAT" = x; then
4879    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4880  fi
4881
4882
4883
4884
4885
4886  # Publish this variable in the help.
4887
4888
4889  if test "x$CHMOD" = x; then
4890    # The variable is not set by user, try to locate tool using the code snippet
4891    for ac_prog in chmod
4892do
4893  # Extract the first word of "$ac_prog", so it can be a program name with args.
4894set dummy $ac_prog; ac_word=$2
4895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4896$as_echo_n "checking for $ac_word... " >&6; }
4897if ${ac_cv_path_CHMOD+:} false; then :
4898  $as_echo_n "(cached) " >&6
4899else
4900  case $CHMOD in
4901  [\\/]* | ?:[\\/]*)
4902  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4903  ;;
4904  *)
4905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4906for as_dir in $PATH
4907do
4908  IFS=$as_save_IFS
4909  test -z "$as_dir" && as_dir=.
4910    for ac_exec_ext in '' $ac_executable_extensions; do
4911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4912    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4914    break 2
4915  fi
4916done
4917  done
4918IFS=$as_save_IFS
4919
4920  ;;
4921esac
4922fi
4923CHMOD=$ac_cv_path_CHMOD
4924if test -n "$CHMOD"; then
4925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4926$as_echo "$CHMOD" >&6; }
4927else
4928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4929$as_echo "no" >&6; }
4930fi
4931
4932
4933  test -n "$CHMOD" && break
4934done
4935
4936  else
4937    # The variable is set, but is it from the command line or the environment?
4938
4939    # Try to remove the string !CHMOD! from our list.
4940    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
4941    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4942      # If it failed, the variable was not from the command line. Ignore it,
4943      # but warn the user (except for BASH, which is always set by the calling BASH).
4944      if test "xCHMOD" != xBASH; then
4945        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
4946$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
4947      fi
4948      # Try to locate tool using the code snippet
4949      for ac_prog in chmod
4950do
4951  # Extract the first word of "$ac_prog", so it can be a program name with args.
4952set dummy $ac_prog; ac_word=$2
4953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4954$as_echo_n "checking for $ac_word... " >&6; }
4955if ${ac_cv_path_CHMOD+:} false; then :
4956  $as_echo_n "(cached) " >&6
4957else
4958  case $CHMOD in
4959  [\\/]* | ?:[\\/]*)
4960  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4961  ;;
4962  *)
4963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4964for as_dir in $PATH
4965do
4966  IFS=$as_save_IFS
4967  test -z "$as_dir" && as_dir=.
4968    for ac_exec_ext in '' $ac_executable_extensions; do
4969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4970    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4972    break 2
4973  fi
4974done
4975  done
4976IFS=$as_save_IFS
4977
4978  ;;
4979esac
4980fi
4981CHMOD=$ac_cv_path_CHMOD
4982if test -n "$CHMOD"; then
4983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4984$as_echo "$CHMOD" >&6; }
4985else
4986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4987$as_echo "no" >&6; }
4988fi
4989
4990
4991  test -n "$CHMOD" && break
4992done
4993
4994    else
4995      # If it succeeded, then it was overridden by the user. We will use it
4996      # for the tool.
4997
4998      # First remove it from the list of overridden variables, so we can test
4999      # for unknown variables in the end.
5000      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5001
5002      # Check if the provided tool contains a complete path.
5003      tool_specified="$CHMOD"
5004      tool_basename="${tool_specified##*/}"
5005      if test "x$tool_basename" = "x$tool_specified"; then
5006        # A command without a complete path is provided, search $PATH.
5007        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5008$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5009        # Extract the first word of "$tool_basename", so it can be a program name with args.
5010set dummy $tool_basename; ac_word=$2
5011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5012$as_echo_n "checking for $ac_word... " >&6; }
5013if ${ac_cv_path_CHMOD+:} false; then :
5014  $as_echo_n "(cached) " >&6
5015else
5016  case $CHMOD in
5017  [\\/]* | ?:[\\/]*)
5018  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5019  ;;
5020  *)
5021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5022for as_dir in $PATH
5023do
5024  IFS=$as_save_IFS
5025  test -z "$as_dir" && as_dir=.
5026    for ac_exec_ext in '' $ac_executable_extensions; do
5027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5028    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5030    break 2
5031  fi
5032done
5033  done
5034IFS=$as_save_IFS
5035
5036  ;;
5037esac
5038fi
5039CHMOD=$ac_cv_path_CHMOD
5040if test -n "$CHMOD"; then
5041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5042$as_echo "$CHMOD" >&6; }
5043else
5044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5045$as_echo "no" >&6; }
5046fi
5047
5048
5049        if test "x$CHMOD" = x; then
5050          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5051        fi
5052      else
5053        # Otherwise we believe it is a complete path. Use it as it is.
5054        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5055$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5056        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5057$as_echo_n "checking for CHMOD... " >&6; }
5058        if test ! -x "$tool_specified"; then
5059          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5060$as_echo "not found" >&6; }
5061          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5062        fi
5063        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5064$as_echo "$tool_specified" >&6; }
5065      fi
5066    fi
5067  fi
5068
5069
5070
5071  if test "x$CHMOD" = x; then
5072    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5073  fi
5074
5075
5076
5077
5078
5079  # Publish this variable in the help.
5080
5081
5082  if test "x$CMP" = x; then
5083    # The variable is not set by user, try to locate tool using the code snippet
5084    for ac_prog in cmp
5085do
5086  # Extract the first word of "$ac_prog", so it can be a program name with args.
5087set dummy $ac_prog; ac_word=$2
5088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5089$as_echo_n "checking for $ac_word... " >&6; }
5090if ${ac_cv_path_CMP+:} false; then :
5091  $as_echo_n "(cached) " >&6
5092else
5093  case $CMP in
5094  [\\/]* | ?:[\\/]*)
5095  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5096  ;;
5097  *)
5098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5099for as_dir in $PATH
5100do
5101  IFS=$as_save_IFS
5102  test -z "$as_dir" && as_dir=.
5103    for ac_exec_ext in '' $ac_executable_extensions; do
5104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5105    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5107    break 2
5108  fi
5109done
5110  done
5111IFS=$as_save_IFS
5112
5113  ;;
5114esac
5115fi
5116CMP=$ac_cv_path_CMP
5117if test -n "$CMP"; then
5118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5119$as_echo "$CMP" >&6; }
5120else
5121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5122$as_echo "no" >&6; }
5123fi
5124
5125
5126  test -n "$CMP" && break
5127done
5128
5129  else
5130    # The variable is set, but is it from the command line or the environment?
5131
5132    # Try to remove the string !CMP! from our list.
5133    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5134    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5135      # If it failed, the variable was not from the command line. Ignore it,
5136      # but warn the user (except for BASH, which is always set by the calling BASH).
5137      if test "xCMP" != xBASH; then
5138        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5139$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5140      fi
5141      # Try to locate tool using the code snippet
5142      for ac_prog in cmp
5143do
5144  # Extract the first word of "$ac_prog", so it can be a program name with args.
5145set dummy $ac_prog; ac_word=$2
5146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5147$as_echo_n "checking for $ac_word... " >&6; }
5148if ${ac_cv_path_CMP+:} false; then :
5149  $as_echo_n "(cached) " >&6
5150else
5151  case $CMP in
5152  [\\/]* | ?:[\\/]*)
5153  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5154  ;;
5155  *)
5156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5157for as_dir in $PATH
5158do
5159  IFS=$as_save_IFS
5160  test -z "$as_dir" && as_dir=.
5161    for ac_exec_ext in '' $ac_executable_extensions; do
5162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5163    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5165    break 2
5166  fi
5167done
5168  done
5169IFS=$as_save_IFS
5170
5171  ;;
5172esac
5173fi
5174CMP=$ac_cv_path_CMP
5175if test -n "$CMP"; then
5176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5177$as_echo "$CMP" >&6; }
5178else
5179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5180$as_echo "no" >&6; }
5181fi
5182
5183
5184  test -n "$CMP" && break
5185done
5186
5187    else
5188      # If it succeeded, then it was overridden by the user. We will use it
5189      # for the tool.
5190
5191      # First remove it from the list of overridden variables, so we can test
5192      # for unknown variables in the end.
5193      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5194
5195      # Check if the provided tool contains a complete path.
5196      tool_specified="$CMP"
5197      tool_basename="${tool_specified##*/}"
5198      if test "x$tool_basename" = "x$tool_specified"; then
5199        # A command without a complete path is provided, search $PATH.
5200        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5201$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5202        # Extract the first word of "$tool_basename", so it can be a program name with args.
5203set dummy $tool_basename; ac_word=$2
5204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5205$as_echo_n "checking for $ac_word... " >&6; }
5206if ${ac_cv_path_CMP+:} false; then :
5207  $as_echo_n "(cached) " >&6
5208else
5209  case $CMP in
5210  [\\/]* | ?:[\\/]*)
5211  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5212  ;;
5213  *)
5214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5215for as_dir in $PATH
5216do
5217  IFS=$as_save_IFS
5218  test -z "$as_dir" && as_dir=.
5219    for ac_exec_ext in '' $ac_executable_extensions; do
5220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5221    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5223    break 2
5224  fi
5225done
5226  done
5227IFS=$as_save_IFS
5228
5229  ;;
5230esac
5231fi
5232CMP=$ac_cv_path_CMP
5233if test -n "$CMP"; then
5234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5235$as_echo "$CMP" >&6; }
5236else
5237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5238$as_echo "no" >&6; }
5239fi
5240
5241
5242        if test "x$CMP" = x; then
5243          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5244        fi
5245      else
5246        # Otherwise we believe it is a complete path. Use it as it is.
5247        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5248$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5249        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5250$as_echo_n "checking for CMP... " >&6; }
5251        if test ! -x "$tool_specified"; then
5252          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5253$as_echo "not found" >&6; }
5254          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5255        fi
5256        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5257$as_echo "$tool_specified" >&6; }
5258      fi
5259    fi
5260  fi
5261
5262
5263
5264  if test "x$CMP" = x; then
5265    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5266  fi
5267
5268
5269
5270
5271
5272  # Publish this variable in the help.
5273
5274
5275  if test "x$COMM" = x; then
5276    # The variable is not set by user, try to locate tool using the code snippet
5277    for ac_prog in comm
5278do
5279  # Extract the first word of "$ac_prog", so it can be a program name with args.
5280set dummy $ac_prog; ac_word=$2
5281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5282$as_echo_n "checking for $ac_word... " >&6; }
5283if ${ac_cv_path_COMM+:} false; then :
5284  $as_echo_n "(cached) " >&6
5285else
5286  case $COMM in
5287  [\\/]* | ?:[\\/]*)
5288  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5289  ;;
5290  *)
5291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5292for as_dir in $PATH
5293do
5294  IFS=$as_save_IFS
5295  test -z "$as_dir" && as_dir=.
5296    for ac_exec_ext in '' $ac_executable_extensions; do
5297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5298    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5300    break 2
5301  fi
5302done
5303  done
5304IFS=$as_save_IFS
5305
5306  ;;
5307esac
5308fi
5309COMM=$ac_cv_path_COMM
5310if test -n "$COMM"; then
5311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5312$as_echo "$COMM" >&6; }
5313else
5314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5315$as_echo "no" >&6; }
5316fi
5317
5318
5319  test -n "$COMM" && break
5320done
5321
5322  else
5323    # The variable is set, but is it from the command line or the environment?
5324
5325    # Try to remove the string !COMM! from our list.
5326    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5327    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5328      # If it failed, the variable was not from the command line. Ignore it,
5329      # but warn the user (except for BASH, which is always set by the calling BASH).
5330      if test "xCOMM" != xBASH; then
5331        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5332$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5333      fi
5334      # Try to locate tool using the code snippet
5335      for ac_prog in comm
5336do
5337  # Extract the first word of "$ac_prog", so it can be a program name with args.
5338set dummy $ac_prog; ac_word=$2
5339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5340$as_echo_n "checking for $ac_word... " >&6; }
5341if ${ac_cv_path_COMM+:} false; then :
5342  $as_echo_n "(cached) " >&6
5343else
5344  case $COMM in
5345  [\\/]* | ?:[\\/]*)
5346  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5347  ;;
5348  *)
5349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5350for as_dir in $PATH
5351do
5352  IFS=$as_save_IFS
5353  test -z "$as_dir" && as_dir=.
5354    for ac_exec_ext in '' $ac_executable_extensions; do
5355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5356    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5358    break 2
5359  fi
5360done
5361  done
5362IFS=$as_save_IFS
5363
5364  ;;
5365esac
5366fi
5367COMM=$ac_cv_path_COMM
5368if test -n "$COMM"; then
5369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5370$as_echo "$COMM" >&6; }
5371else
5372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5373$as_echo "no" >&6; }
5374fi
5375
5376
5377  test -n "$COMM" && break
5378done
5379
5380    else
5381      # If it succeeded, then it was overridden by the user. We will use it
5382      # for the tool.
5383
5384      # First remove it from the list of overridden variables, so we can test
5385      # for unknown variables in the end.
5386      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5387
5388      # Check if the provided tool contains a complete path.
5389      tool_specified="$COMM"
5390      tool_basename="${tool_specified##*/}"
5391      if test "x$tool_basename" = "x$tool_specified"; then
5392        # A command without a complete path is provided, search $PATH.
5393        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5394$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5395        # Extract the first word of "$tool_basename", so it can be a program name with args.
5396set dummy $tool_basename; ac_word=$2
5397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5398$as_echo_n "checking for $ac_word... " >&6; }
5399if ${ac_cv_path_COMM+:} false; then :
5400  $as_echo_n "(cached) " >&6
5401else
5402  case $COMM in
5403  [\\/]* | ?:[\\/]*)
5404  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5405  ;;
5406  *)
5407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5408for as_dir in $PATH
5409do
5410  IFS=$as_save_IFS
5411  test -z "$as_dir" && as_dir=.
5412    for ac_exec_ext in '' $ac_executable_extensions; do
5413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5414    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5416    break 2
5417  fi
5418done
5419  done
5420IFS=$as_save_IFS
5421
5422  ;;
5423esac
5424fi
5425COMM=$ac_cv_path_COMM
5426if test -n "$COMM"; then
5427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5428$as_echo "$COMM" >&6; }
5429else
5430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5431$as_echo "no" >&6; }
5432fi
5433
5434
5435        if test "x$COMM" = x; then
5436          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5437        fi
5438      else
5439        # Otherwise we believe it is a complete path. Use it as it is.
5440        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5441$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5442        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5443$as_echo_n "checking for COMM... " >&6; }
5444        if test ! -x "$tool_specified"; then
5445          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5446$as_echo "not found" >&6; }
5447          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5448        fi
5449        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5450$as_echo "$tool_specified" >&6; }
5451      fi
5452    fi
5453  fi
5454
5455
5456
5457  if test "x$COMM" = x; then
5458    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5459  fi
5460
5461
5462
5463
5464
5465  # Publish this variable in the help.
5466
5467
5468  if test "x$CP" = x; then
5469    # The variable is not set by user, try to locate tool using the code snippet
5470    for ac_prog in cp
5471do
5472  # Extract the first word of "$ac_prog", so it can be a program name with args.
5473set dummy $ac_prog; ac_word=$2
5474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5475$as_echo_n "checking for $ac_word... " >&6; }
5476if ${ac_cv_path_CP+:} false; then :
5477  $as_echo_n "(cached) " >&6
5478else
5479  case $CP in
5480  [\\/]* | ?:[\\/]*)
5481  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5482  ;;
5483  *)
5484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5485for as_dir in $PATH
5486do
5487  IFS=$as_save_IFS
5488  test -z "$as_dir" && as_dir=.
5489    for ac_exec_ext in '' $ac_executable_extensions; do
5490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5491    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5493    break 2
5494  fi
5495done
5496  done
5497IFS=$as_save_IFS
5498
5499  ;;
5500esac
5501fi
5502CP=$ac_cv_path_CP
5503if test -n "$CP"; then
5504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5505$as_echo "$CP" >&6; }
5506else
5507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5508$as_echo "no" >&6; }
5509fi
5510
5511
5512  test -n "$CP" && break
5513done
5514
5515  else
5516    # The variable is set, but is it from the command line or the environment?
5517
5518    # Try to remove the string !CP! from our list.
5519    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5520    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5521      # If it failed, the variable was not from the command line. Ignore it,
5522      # but warn the user (except for BASH, which is always set by the calling BASH).
5523      if test "xCP" != xBASH; then
5524        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5525$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5526      fi
5527      # Try to locate tool using the code snippet
5528      for ac_prog in cp
5529do
5530  # Extract the first word of "$ac_prog", so it can be a program name with args.
5531set dummy $ac_prog; ac_word=$2
5532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5533$as_echo_n "checking for $ac_word... " >&6; }
5534if ${ac_cv_path_CP+:} false; then :
5535  $as_echo_n "(cached) " >&6
5536else
5537  case $CP in
5538  [\\/]* | ?:[\\/]*)
5539  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5540  ;;
5541  *)
5542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5543for as_dir in $PATH
5544do
5545  IFS=$as_save_IFS
5546  test -z "$as_dir" && as_dir=.
5547    for ac_exec_ext in '' $ac_executable_extensions; do
5548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5549    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5551    break 2
5552  fi
5553done
5554  done
5555IFS=$as_save_IFS
5556
5557  ;;
5558esac
5559fi
5560CP=$ac_cv_path_CP
5561if test -n "$CP"; then
5562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5563$as_echo "$CP" >&6; }
5564else
5565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5566$as_echo "no" >&6; }
5567fi
5568
5569
5570  test -n "$CP" && break
5571done
5572
5573    else
5574      # If it succeeded, then it was overridden by the user. We will use it
5575      # for the tool.
5576
5577      # First remove it from the list of overridden variables, so we can test
5578      # for unknown variables in the end.
5579      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5580
5581      # Check if the provided tool contains a complete path.
5582      tool_specified="$CP"
5583      tool_basename="${tool_specified##*/}"
5584      if test "x$tool_basename" = "x$tool_specified"; then
5585        # A command without a complete path is provided, search $PATH.
5586        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5587$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5588        # Extract the first word of "$tool_basename", so it can be a program name with args.
5589set dummy $tool_basename; ac_word=$2
5590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5591$as_echo_n "checking for $ac_word... " >&6; }
5592if ${ac_cv_path_CP+:} false; then :
5593  $as_echo_n "(cached) " >&6
5594else
5595  case $CP in
5596  [\\/]* | ?:[\\/]*)
5597  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5598  ;;
5599  *)
5600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5601for as_dir in $PATH
5602do
5603  IFS=$as_save_IFS
5604  test -z "$as_dir" && as_dir=.
5605    for ac_exec_ext in '' $ac_executable_extensions; do
5606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5607    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5609    break 2
5610  fi
5611done
5612  done
5613IFS=$as_save_IFS
5614
5615  ;;
5616esac
5617fi
5618CP=$ac_cv_path_CP
5619if test -n "$CP"; then
5620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5621$as_echo "$CP" >&6; }
5622else
5623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5624$as_echo "no" >&6; }
5625fi
5626
5627
5628        if test "x$CP" = x; then
5629          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5630        fi
5631      else
5632        # Otherwise we believe it is a complete path. Use it as it is.
5633        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5634$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5635        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5636$as_echo_n "checking for CP... " >&6; }
5637        if test ! -x "$tool_specified"; then
5638          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5639$as_echo "not found" >&6; }
5640          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5641        fi
5642        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5643$as_echo "$tool_specified" >&6; }
5644      fi
5645    fi
5646  fi
5647
5648
5649
5650  if test "x$CP" = x; then
5651    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5652  fi
5653
5654
5655
5656
5657
5658  # Publish this variable in the help.
5659
5660
5661  if test "x$CPIO" = x; then
5662    # The variable is not set by user, try to locate tool using the code snippet
5663    for ac_prog in cpio
5664do
5665  # Extract the first word of "$ac_prog", so it can be a program name with args.
5666set dummy $ac_prog; ac_word=$2
5667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5668$as_echo_n "checking for $ac_word... " >&6; }
5669if ${ac_cv_path_CPIO+:} false; then :
5670  $as_echo_n "(cached) " >&6
5671else
5672  case $CPIO in
5673  [\\/]* | ?:[\\/]*)
5674  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5675  ;;
5676  *)
5677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5678for as_dir in $PATH
5679do
5680  IFS=$as_save_IFS
5681  test -z "$as_dir" && as_dir=.
5682    for ac_exec_ext in '' $ac_executable_extensions; do
5683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5684    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5686    break 2
5687  fi
5688done
5689  done
5690IFS=$as_save_IFS
5691
5692  ;;
5693esac
5694fi
5695CPIO=$ac_cv_path_CPIO
5696if test -n "$CPIO"; then
5697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5698$as_echo "$CPIO" >&6; }
5699else
5700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5701$as_echo "no" >&6; }
5702fi
5703
5704
5705  test -n "$CPIO" && break
5706done
5707
5708  else
5709    # The variable is set, but is it from the command line or the environment?
5710
5711    # Try to remove the string !CPIO! from our list.
5712    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
5713    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5714      # If it failed, the variable was not from the command line. Ignore it,
5715      # but warn the user (except for BASH, which is always set by the calling BASH).
5716      if test "xCPIO" != xBASH; then
5717        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
5718$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
5719      fi
5720      # Try to locate tool using the code snippet
5721      for ac_prog in cpio
5722do
5723  # Extract the first word of "$ac_prog", so it can be a program name with args.
5724set dummy $ac_prog; ac_word=$2
5725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5726$as_echo_n "checking for $ac_word... " >&6; }
5727if ${ac_cv_path_CPIO+:} false; then :
5728  $as_echo_n "(cached) " >&6
5729else
5730  case $CPIO in
5731  [\\/]* | ?:[\\/]*)
5732  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5733  ;;
5734  *)
5735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5736for as_dir in $PATH
5737do
5738  IFS=$as_save_IFS
5739  test -z "$as_dir" && as_dir=.
5740    for ac_exec_ext in '' $ac_executable_extensions; do
5741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5742    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5744    break 2
5745  fi
5746done
5747  done
5748IFS=$as_save_IFS
5749
5750  ;;
5751esac
5752fi
5753CPIO=$ac_cv_path_CPIO
5754if test -n "$CPIO"; then
5755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5756$as_echo "$CPIO" >&6; }
5757else
5758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5759$as_echo "no" >&6; }
5760fi
5761
5762
5763  test -n "$CPIO" && break
5764done
5765
5766    else
5767      # If it succeeded, then it was overridden by the user. We will use it
5768      # for the tool.
5769
5770      # First remove it from the list of overridden variables, so we can test
5771      # for unknown variables in the end.
5772      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5773
5774      # Check if the provided tool contains a complete path.
5775      tool_specified="$CPIO"
5776      tool_basename="${tool_specified##*/}"
5777      if test "x$tool_basename" = "x$tool_specified"; then
5778        # A command without a complete path is provided, search $PATH.
5779        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
5780$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
5781        # Extract the first word of "$tool_basename", so it can be a program name with args.
5782set dummy $tool_basename; ac_word=$2
5783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5784$as_echo_n "checking for $ac_word... " >&6; }
5785if ${ac_cv_path_CPIO+:} false; then :
5786  $as_echo_n "(cached) " >&6
5787else
5788  case $CPIO in
5789  [\\/]* | ?:[\\/]*)
5790  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5791  ;;
5792  *)
5793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5794for as_dir in $PATH
5795do
5796  IFS=$as_save_IFS
5797  test -z "$as_dir" && as_dir=.
5798    for ac_exec_ext in '' $ac_executable_extensions; do
5799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5800    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5802    break 2
5803  fi
5804done
5805  done
5806IFS=$as_save_IFS
5807
5808  ;;
5809esac
5810fi
5811CPIO=$ac_cv_path_CPIO
5812if test -n "$CPIO"; then
5813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5814$as_echo "$CPIO" >&6; }
5815else
5816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5817$as_echo "no" >&6; }
5818fi
5819
5820
5821        if test "x$CPIO" = x; then
5822          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5823        fi
5824      else
5825        # Otherwise we believe it is a complete path. Use it as it is.
5826        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
5827$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
5828        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
5829$as_echo_n "checking for CPIO... " >&6; }
5830        if test ! -x "$tool_specified"; then
5831          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5832$as_echo "not found" >&6; }
5833          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
5834        fi
5835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5836$as_echo "$tool_specified" >&6; }
5837      fi
5838    fi
5839  fi
5840
5841
5842
5843  if test "x$CPIO" = x; then
5844    as_fn_error $? "Could not find required tool for CPIO" "$LINENO" 5
5845  fi
5846
5847
5848
5849
5850
5851  # Publish this variable in the help.
5852
5853
5854  if test "x$CUT" = x; then
5855    # The variable is not set by user, try to locate tool using the code snippet
5856    for ac_prog in cut
5857do
5858  # Extract the first word of "$ac_prog", so it can be a program name with args.
5859set dummy $ac_prog; ac_word=$2
5860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5861$as_echo_n "checking for $ac_word... " >&6; }
5862if ${ac_cv_path_CUT+:} false; then :
5863  $as_echo_n "(cached) " >&6
5864else
5865  case $CUT in
5866  [\\/]* | ?:[\\/]*)
5867  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5868  ;;
5869  *)
5870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5871for as_dir in $PATH
5872do
5873  IFS=$as_save_IFS
5874  test -z "$as_dir" && as_dir=.
5875    for ac_exec_ext in '' $ac_executable_extensions; do
5876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5877    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5879    break 2
5880  fi
5881done
5882  done
5883IFS=$as_save_IFS
5884
5885  ;;
5886esac
5887fi
5888CUT=$ac_cv_path_CUT
5889if test -n "$CUT"; then
5890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5891$as_echo "$CUT" >&6; }
5892else
5893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5894$as_echo "no" >&6; }
5895fi
5896
5897
5898  test -n "$CUT" && break
5899done
5900
5901  else
5902    # The variable is set, but is it from the command line or the environment?
5903
5904    # Try to remove the string !CUT! from our list.
5905    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5906    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5907      # If it failed, the variable was not from the command line. Ignore it,
5908      # but warn the user (except for BASH, which is always set by the calling BASH).
5909      if test "xCUT" != xBASH; then
5910        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5911$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5912      fi
5913      # Try to locate tool using the code snippet
5914      for ac_prog in cut
5915do
5916  # Extract the first word of "$ac_prog", so it can be a program name with args.
5917set dummy $ac_prog; ac_word=$2
5918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5919$as_echo_n "checking for $ac_word... " >&6; }
5920if ${ac_cv_path_CUT+:} false; then :
5921  $as_echo_n "(cached) " >&6
5922else
5923  case $CUT in
5924  [\\/]* | ?:[\\/]*)
5925  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5926  ;;
5927  *)
5928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5929for as_dir in $PATH
5930do
5931  IFS=$as_save_IFS
5932  test -z "$as_dir" && as_dir=.
5933    for ac_exec_ext in '' $ac_executable_extensions; do
5934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5935    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5937    break 2
5938  fi
5939done
5940  done
5941IFS=$as_save_IFS
5942
5943  ;;
5944esac
5945fi
5946CUT=$ac_cv_path_CUT
5947if test -n "$CUT"; then
5948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5949$as_echo "$CUT" >&6; }
5950else
5951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5952$as_echo "no" >&6; }
5953fi
5954
5955
5956  test -n "$CUT" && break
5957done
5958
5959    else
5960      # If it succeeded, then it was overridden by the user. We will use it
5961      # for the tool.
5962
5963      # First remove it from the list of overridden variables, so we can test
5964      # for unknown variables in the end.
5965      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5966
5967      # Check if the provided tool contains a complete path.
5968      tool_specified="$CUT"
5969      tool_basename="${tool_specified##*/}"
5970      if test "x$tool_basename" = "x$tool_specified"; then
5971        # A command without a complete path is provided, search $PATH.
5972        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5973$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5974        # Extract the first word of "$tool_basename", so it can be a program name with args.
5975set dummy $tool_basename; ac_word=$2
5976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5977$as_echo_n "checking for $ac_word... " >&6; }
5978if ${ac_cv_path_CUT+:} false; then :
5979  $as_echo_n "(cached) " >&6
5980else
5981  case $CUT in
5982  [\\/]* | ?:[\\/]*)
5983  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5984  ;;
5985  *)
5986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5987for as_dir in $PATH
5988do
5989  IFS=$as_save_IFS
5990  test -z "$as_dir" && as_dir=.
5991    for ac_exec_ext in '' $ac_executable_extensions; do
5992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5993    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5995    break 2
5996  fi
5997done
5998  done
5999IFS=$as_save_IFS
6000
6001  ;;
6002esac
6003fi
6004CUT=$ac_cv_path_CUT
6005if test -n "$CUT"; then
6006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6007$as_echo "$CUT" >&6; }
6008else
6009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6010$as_echo "no" >&6; }
6011fi
6012
6013
6014        if test "x$CUT" = x; then
6015          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6016        fi
6017      else
6018        # Otherwise we believe it is a complete path. Use it as it is.
6019        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6020$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6021        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6022$as_echo_n "checking for CUT... " >&6; }
6023        if test ! -x "$tool_specified"; then
6024          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6025$as_echo "not found" >&6; }
6026          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6027        fi
6028        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6029$as_echo "$tool_specified" >&6; }
6030      fi
6031    fi
6032  fi
6033
6034
6035
6036  if test "x$CUT" = x; then
6037    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6038  fi
6039
6040
6041
6042
6043
6044  # Publish this variable in the help.
6045
6046
6047  if test "x$DATE" = x; then
6048    # The variable is not set by user, try to locate tool using the code snippet
6049    for ac_prog in date
6050do
6051  # Extract the first word of "$ac_prog", so it can be a program name with args.
6052set dummy $ac_prog; ac_word=$2
6053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6054$as_echo_n "checking for $ac_word... " >&6; }
6055if ${ac_cv_path_DATE+:} false; then :
6056  $as_echo_n "(cached) " >&6
6057else
6058  case $DATE in
6059  [\\/]* | ?:[\\/]*)
6060  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6061  ;;
6062  *)
6063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6064for as_dir in $PATH
6065do
6066  IFS=$as_save_IFS
6067  test -z "$as_dir" && as_dir=.
6068    for ac_exec_ext in '' $ac_executable_extensions; do
6069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6070    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6072    break 2
6073  fi
6074done
6075  done
6076IFS=$as_save_IFS
6077
6078  ;;
6079esac
6080fi
6081DATE=$ac_cv_path_DATE
6082if test -n "$DATE"; then
6083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6084$as_echo "$DATE" >&6; }
6085else
6086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6087$as_echo "no" >&6; }
6088fi
6089
6090
6091  test -n "$DATE" && break
6092done
6093
6094  else
6095    # The variable is set, but is it from the command line or the environment?
6096
6097    # Try to remove the string !DATE! from our list.
6098    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6099    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6100      # If it failed, the variable was not from the command line. Ignore it,
6101      # but warn the user (except for BASH, which is always set by the calling BASH).
6102      if test "xDATE" != xBASH; then
6103        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6104$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6105      fi
6106      # Try to locate tool using the code snippet
6107      for ac_prog in date
6108do
6109  # Extract the first word of "$ac_prog", so it can be a program name with args.
6110set dummy $ac_prog; ac_word=$2
6111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6112$as_echo_n "checking for $ac_word... " >&6; }
6113if ${ac_cv_path_DATE+:} false; then :
6114  $as_echo_n "(cached) " >&6
6115else
6116  case $DATE in
6117  [\\/]* | ?:[\\/]*)
6118  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6119  ;;
6120  *)
6121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6122for as_dir in $PATH
6123do
6124  IFS=$as_save_IFS
6125  test -z "$as_dir" && as_dir=.
6126    for ac_exec_ext in '' $ac_executable_extensions; do
6127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6128    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6130    break 2
6131  fi
6132done
6133  done
6134IFS=$as_save_IFS
6135
6136  ;;
6137esac
6138fi
6139DATE=$ac_cv_path_DATE
6140if test -n "$DATE"; then
6141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6142$as_echo "$DATE" >&6; }
6143else
6144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6145$as_echo "no" >&6; }
6146fi
6147
6148
6149  test -n "$DATE" && break
6150done
6151
6152    else
6153      # If it succeeded, then it was overridden by the user. We will use it
6154      # for the tool.
6155
6156      # First remove it from the list of overridden variables, so we can test
6157      # for unknown variables in the end.
6158      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6159
6160      # Check if the provided tool contains a complete path.
6161      tool_specified="$DATE"
6162      tool_basename="${tool_specified##*/}"
6163      if test "x$tool_basename" = "x$tool_specified"; then
6164        # A command without a complete path is provided, search $PATH.
6165        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6166$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6167        # Extract the first word of "$tool_basename", so it can be a program name with args.
6168set dummy $tool_basename; ac_word=$2
6169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6170$as_echo_n "checking for $ac_word... " >&6; }
6171if ${ac_cv_path_DATE+:} false; then :
6172  $as_echo_n "(cached) " >&6
6173else
6174  case $DATE in
6175  [\\/]* | ?:[\\/]*)
6176  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6177  ;;
6178  *)
6179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6180for as_dir in $PATH
6181do
6182  IFS=$as_save_IFS
6183  test -z "$as_dir" && as_dir=.
6184    for ac_exec_ext in '' $ac_executable_extensions; do
6185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6186    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6188    break 2
6189  fi
6190done
6191  done
6192IFS=$as_save_IFS
6193
6194  ;;
6195esac
6196fi
6197DATE=$ac_cv_path_DATE
6198if test -n "$DATE"; then
6199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6200$as_echo "$DATE" >&6; }
6201else
6202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6203$as_echo "no" >&6; }
6204fi
6205
6206
6207        if test "x$DATE" = x; then
6208          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6209        fi
6210      else
6211        # Otherwise we believe it is a complete path. Use it as it is.
6212        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6213$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6214        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6215$as_echo_n "checking for DATE... " >&6; }
6216        if test ! -x "$tool_specified"; then
6217          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6218$as_echo "not found" >&6; }
6219          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6220        fi
6221        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6222$as_echo "$tool_specified" >&6; }
6223      fi
6224    fi
6225  fi
6226
6227
6228
6229  if test "x$DATE" = x; then
6230    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6231  fi
6232
6233
6234
6235
6236
6237  # Publish this variable in the help.
6238
6239
6240  if test "x$DIFF" = x; then
6241    # The variable is not set by user, try to locate tool using the code snippet
6242    for ac_prog in gdiff diff
6243do
6244  # Extract the first word of "$ac_prog", so it can be a program name with args.
6245set dummy $ac_prog; ac_word=$2
6246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6247$as_echo_n "checking for $ac_word... " >&6; }
6248if ${ac_cv_path_DIFF+:} false; then :
6249  $as_echo_n "(cached) " >&6
6250else
6251  case $DIFF in
6252  [\\/]* | ?:[\\/]*)
6253  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6254  ;;
6255  *)
6256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6257for as_dir in $PATH
6258do
6259  IFS=$as_save_IFS
6260  test -z "$as_dir" && as_dir=.
6261    for ac_exec_ext in '' $ac_executable_extensions; do
6262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6263    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6265    break 2
6266  fi
6267done
6268  done
6269IFS=$as_save_IFS
6270
6271  ;;
6272esac
6273fi
6274DIFF=$ac_cv_path_DIFF
6275if test -n "$DIFF"; then
6276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6277$as_echo "$DIFF" >&6; }
6278else
6279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6280$as_echo "no" >&6; }
6281fi
6282
6283
6284  test -n "$DIFF" && break
6285done
6286
6287  else
6288    # The variable is set, but is it from the command line or the environment?
6289
6290    # Try to remove the string !DIFF! from our list.
6291    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6292    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6293      # If it failed, the variable was not from the command line. Ignore it,
6294      # but warn the user (except for BASH, which is always set by the calling BASH).
6295      if test "xDIFF" != xBASH; then
6296        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6297$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6298      fi
6299      # Try to locate tool using the code snippet
6300      for ac_prog in gdiff diff
6301do
6302  # Extract the first word of "$ac_prog", so it can be a program name with args.
6303set dummy $ac_prog; ac_word=$2
6304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6305$as_echo_n "checking for $ac_word... " >&6; }
6306if ${ac_cv_path_DIFF+:} false; then :
6307  $as_echo_n "(cached) " >&6
6308else
6309  case $DIFF in
6310  [\\/]* | ?:[\\/]*)
6311  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6312  ;;
6313  *)
6314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6315for as_dir in $PATH
6316do
6317  IFS=$as_save_IFS
6318  test -z "$as_dir" && as_dir=.
6319    for ac_exec_ext in '' $ac_executable_extensions; do
6320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6321    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6323    break 2
6324  fi
6325done
6326  done
6327IFS=$as_save_IFS
6328
6329  ;;
6330esac
6331fi
6332DIFF=$ac_cv_path_DIFF
6333if test -n "$DIFF"; then
6334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6335$as_echo "$DIFF" >&6; }
6336else
6337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6338$as_echo "no" >&6; }
6339fi
6340
6341
6342  test -n "$DIFF" && break
6343done
6344
6345    else
6346      # If it succeeded, then it was overridden by the user. We will use it
6347      # for the tool.
6348
6349      # First remove it from the list of overridden variables, so we can test
6350      # for unknown variables in the end.
6351      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6352
6353      # Check if the provided tool contains a complete path.
6354      tool_specified="$DIFF"
6355      tool_basename="${tool_specified##*/}"
6356      if test "x$tool_basename" = "x$tool_specified"; then
6357        # A command without a complete path is provided, search $PATH.
6358        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6359$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6360        # Extract the first word of "$tool_basename", so it can be a program name with args.
6361set dummy $tool_basename; ac_word=$2
6362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6363$as_echo_n "checking for $ac_word... " >&6; }
6364if ${ac_cv_path_DIFF+:} false; then :
6365  $as_echo_n "(cached) " >&6
6366else
6367  case $DIFF in
6368  [\\/]* | ?:[\\/]*)
6369  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6370  ;;
6371  *)
6372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6373for as_dir in $PATH
6374do
6375  IFS=$as_save_IFS
6376  test -z "$as_dir" && as_dir=.
6377    for ac_exec_ext in '' $ac_executable_extensions; do
6378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6379    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6381    break 2
6382  fi
6383done
6384  done
6385IFS=$as_save_IFS
6386
6387  ;;
6388esac
6389fi
6390DIFF=$ac_cv_path_DIFF
6391if test -n "$DIFF"; then
6392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6393$as_echo "$DIFF" >&6; }
6394else
6395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6396$as_echo "no" >&6; }
6397fi
6398
6399
6400        if test "x$DIFF" = x; then
6401          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6402        fi
6403      else
6404        # Otherwise we believe it is a complete path. Use it as it is.
6405        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6406$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6407        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6408$as_echo_n "checking for DIFF... " >&6; }
6409        if test ! -x "$tool_specified"; then
6410          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6411$as_echo "not found" >&6; }
6412          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6413        fi
6414        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6415$as_echo "$tool_specified" >&6; }
6416      fi
6417    fi
6418  fi
6419
6420
6421
6422  if test "x$DIFF" = x; then
6423    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6424  fi
6425
6426
6427
6428
6429
6430  # Publish this variable in the help.
6431
6432
6433  if test "x$DIRNAME" = x; then
6434    # The variable is not set by user, try to locate tool using the code snippet
6435    for ac_prog in dirname
6436do
6437  # Extract the first word of "$ac_prog", so it can be a program name with args.
6438set dummy $ac_prog; ac_word=$2
6439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6440$as_echo_n "checking for $ac_word... " >&6; }
6441if ${ac_cv_path_DIRNAME+:} false; then :
6442  $as_echo_n "(cached) " >&6
6443else
6444  case $DIRNAME in
6445  [\\/]* | ?:[\\/]*)
6446  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6447  ;;
6448  *)
6449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6450for as_dir in $PATH
6451do
6452  IFS=$as_save_IFS
6453  test -z "$as_dir" && as_dir=.
6454    for ac_exec_ext in '' $ac_executable_extensions; do
6455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6456    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6458    break 2
6459  fi
6460done
6461  done
6462IFS=$as_save_IFS
6463
6464  ;;
6465esac
6466fi
6467DIRNAME=$ac_cv_path_DIRNAME
6468if test -n "$DIRNAME"; then
6469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6470$as_echo "$DIRNAME" >&6; }
6471else
6472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6473$as_echo "no" >&6; }
6474fi
6475
6476
6477  test -n "$DIRNAME" && break
6478done
6479
6480  else
6481    # The variable is set, but is it from the command line or the environment?
6482
6483    # Try to remove the string !DIRNAME! from our list.
6484    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6485    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6486      # If it failed, the variable was not from the command line. Ignore it,
6487      # but warn the user (except for BASH, which is always set by the calling BASH).
6488      if test "xDIRNAME" != xBASH; then
6489        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6490$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6491      fi
6492      # Try to locate tool using the code snippet
6493      for ac_prog in dirname
6494do
6495  # Extract the first word of "$ac_prog", so it can be a program name with args.
6496set dummy $ac_prog; ac_word=$2
6497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6498$as_echo_n "checking for $ac_word... " >&6; }
6499if ${ac_cv_path_DIRNAME+:} false; then :
6500  $as_echo_n "(cached) " >&6
6501else
6502  case $DIRNAME in
6503  [\\/]* | ?:[\\/]*)
6504  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6505  ;;
6506  *)
6507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6508for as_dir in $PATH
6509do
6510  IFS=$as_save_IFS
6511  test -z "$as_dir" && as_dir=.
6512    for ac_exec_ext in '' $ac_executable_extensions; do
6513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6514    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6516    break 2
6517  fi
6518done
6519  done
6520IFS=$as_save_IFS
6521
6522  ;;
6523esac
6524fi
6525DIRNAME=$ac_cv_path_DIRNAME
6526if test -n "$DIRNAME"; then
6527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6528$as_echo "$DIRNAME" >&6; }
6529else
6530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6531$as_echo "no" >&6; }
6532fi
6533
6534
6535  test -n "$DIRNAME" && break
6536done
6537
6538    else
6539      # If it succeeded, then it was overridden by the user. We will use it
6540      # for the tool.
6541
6542      # First remove it from the list of overridden variables, so we can test
6543      # for unknown variables in the end.
6544      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6545
6546      # Check if the provided tool contains a complete path.
6547      tool_specified="$DIRNAME"
6548      tool_basename="${tool_specified##*/}"
6549      if test "x$tool_basename" = "x$tool_specified"; then
6550        # A command without a complete path is provided, search $PATH.
6551        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6552$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6553        # Extract the first word of "$tool_basename", so it can be a program name with args.
6554set dummy $tool_basename; ac_word=$2
6555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6556$as_echo_n "checking for $ac_word... " >&6; }
6557if ${ac_cv_path_DIRNAME+:} false; then :
6558  $as_echo_n "(cached) " >&6
6559else
6560  case $DIRNAME in
6561  [\\/]* | ?:[\\/]*)
6562  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6563  ;;
6564  *)
6565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6566for as_dir in $PATH
6567do
6568  IFS=$as_save_IFS
6569  test -z "$as_dir" && as_dir=.
6570    for ac_exec_ext in '' $ac_executable_extensions; do
6571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6572    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6574    break 2
6575  fi
6576done
6577  done
6578IFS=$as_save_IFS
6579
6580  ;;
6581esac
6582fi
6583DIRNAME=$ac_cv_path_DIRNAME
6584if test -n "$DIRNAME"; then
6585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6586$as_echo "$DIRNAME" >&6; }
6587else
6588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6589$as_echo "no" >&6; }
6590fi
6591
6592
6593        if test "x$DIRNAME" = x; then
6594          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6595        fi
6596      else
6597        # Otherwise we believe it is a complete path. Use it as it is.
6598        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6599$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6600        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6601$as_echo_n "checking for DIRNAME... " >&6; }
6602        if test ! -x "$tool_specified"; then
6603          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6604$as_echo "not found" >&6; }
6605          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6606        fi
6607        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6608$as_echo "$tool_specified" >&6; }
6609      fi
6610    fi
6611  fi
6612
6613
6614
6615  if test "x$DIRNAME" = x; then
6616    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6617  fi
6618
6619
6620
6621
6622
6623  # Publish this variable in the help.
6624
6625
6626  if test "x$ECHO" = x; then
6627    # The variable is not set by user, try to locate tool using the code snippet
6628    for ac_prog in echo
6629do
6630  # Extract the first word of "$ac_prog", so it can be a program name with args.
6631set dummy $ac_prog; ac_word=$2
6632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6633$as_echo_n "checking for $ac_word... " >&6; }
6634if ${ac_cv_path_ECHO+:} false; then :
6635  $as_echo_n "(cached) " >&6
6636else
6637  case $ECHO in
6638  [\\/]* | ?:[\\/]*)
6639  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6640  ;;
6641  *)
6642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6643for as_dir in $PATH
6644do
6645  IFS=$as_save_IFS
6646  test -z "$as_dir" && as_dir=.
6647    for ac_exec_ext in '' $ac_executable_extensions; do
6648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6649    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6651    break 2
6652  fi
6653done
6654  done
6655IFS=$as_save_IFS
6656
6657  ;;
6658esac
6659fi
6660ECHO=$ac_cv_path_ECHO
6661if test -n "$ECHO"; then
6662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6663$as_echo "$ECHO" >&6; }
6664else
6665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6666$as_echo "no" >&6; }
6667fi
6668
6669
6670  test -n "$ECHO" && break
6671done
6672
6673  else
6674    # The variable is set, but is it from the command line or the environment?
6675
6676    # Try to remove the string !ECHO! from our list.
6677    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6678    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6679      # If it failed, the variable was not from the command line. Ignore it,
6680      # but warn the user (except for BASH, which is always set by the calling BASH).
6681      if test "xECHO" != xBASH; then
6682        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6683$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6684      fi
6685      # Try to locate tool using the code snippet
6686      for ac_prog in echo
6687do
6688  # Extract the first word of "$ac_prog", so it can be a program name with args.
6689set dummy $ac_prog; ac_word=$2
6690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6691$as_echo_n "checking for $ac_word... " >&6; }
6692if ${ac_cv_path_ECHO+:} false; then :
6693  $as_echo_n "(cached) " >&6
6694else
6695  case $ECHO in
6696  [\\/]* | ?:[\\/]*)
6697  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6698  ;;
6699  *)
6700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6701for as_dir in $PATH
6702do
6703  IFS=$as_save_IFS
6704  test -z "$as_dir" && as_dir=.
6705    for ac_exec_ext in '' $ac_executable_extensions; do
6706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6707    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6709    break 2
6710  fi
6711done
6712  done
6713IFS=$as_save_IFS
6714
6715  ;;
6716esac
6717fi
6718ECHO=$ac_cv_path_ECHO
6719if test -n "$ECHO"; then
6720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6721$as_echo "$ECHO" >&6; }
6722else
6723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6724$as_echo "no" >&6; }
6725fi
6726
6727
6728  test -n "$ECHO" && break
6729done
6730
6731    else
6732      # If it succeeded, then it was overridden by the user. We will use it
6733      # for the tool.
6734
6735      # First remove it from the list of overridden variables, so we can test
6736      # for unknown variables in the end.
6737      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6738
6739      # Check if the provided tool contains a complete path.
6740      tool_specified="$ECHO"
6741      tool_basename="${tool_specified##*/}"
6742      if test "x$tool_basename" = "x$tool_specified"; then
6743        # A command without a complete path is provided, search $PATH.
6744        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6745$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6746        # Extract the first word of "$tool_basename", so it can be a program name with args.
6747set dummy $tool_basename; ac_word=$2
6748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6749$as_echo_n "checking for $ac_word... " >&6; }
6750if ${ac_cv_path_ECHO+:} false; then :
6751  $as_echo_n "(cached) " >&6
6752else
6753  case $ECHO in
6754  [\\/]* | ?:[\\/]*)
6755  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6756  ;;
6757  *)
6758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6759for as_dir in $PATH
6760do
6761  IFS=$as_save_IFS
6762  test -z "$as_dir" && as_dir=.
6763    for ac_exec_ext in '' $ac_executable_extensions; do
6764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6765    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6767    break 2
6768  fi
6769done
6770  done
6771IFS=$as_save_IFS
6772
6773  ;;
6774esac
6775fi
6776ECHO=$ac_cv_path_ECHO
6777if test -n "$ECHO"; then
6778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6779$as_echo "$ECHO" >&6; }
6780else
6781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6782$as_echo "no" >&6; }
6783fi
6784
6785
6786        if test "x$ECHO" = x; then
6787          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6788        fi
6789      else
6790        # Otherwise we believe it is a complete path. Use it as it is.
6791        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6792$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6793        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6794$as_echo_n "checking for ECHO... " >&6; }
6795        if test ! -x "$tool_specified"; then
6796          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6797$as_echo "not found" >&6; }
6798          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6799        fi
6800        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6801$as_echo "$tool_specified" >&6; }
6802      fi
6803    fi
6804  fi
6805
6806
6807
6808  if test "x$ECHO" = x; then
6809    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6810  fi
6811
6812
6813
6814
6815
6816  # Publish this variable in the help.
6817
6818
6819  if test "x$EXPR" = x; then
6820    # The variable is not set by user, try to locate tool using the code snippet
6821    for ac_prog in expr
6822do
6823  # Extract the first word of "$ac_prog", so it can be a program name with args.
6824set dummy $ac_prog; ac_word=$2
6825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6826$as_echo_n "checking for $ac_word... " >&6; }
6827if ${ac_cv_path_EXPR+:} false; then :
6828  $as_echo_n "(cached) " >&6
6829else
6830  case $EXPR in
6831  [\\/]* | ?:[\\/]*)
6832  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6833  ;;
6834  *)
6835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6836for as_dir in $PATH
6837do
6838  IFS=$as_save_IFS
6839  test -z "$as_dir" && as_dir=.
6840    for ac_exec_ext in '' $ac_executable_extensions; do
6841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6842    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6844    break 2
6845  fi
6846done
6847  done
6848IFS=$as_save_IFS
6849
6850  ;;
6851esac
6852fi
6853EXPR=$ac_cv_path_EXPR
6854if test -n "$EXPR"; then
6855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6856$as_echo "$EXPR" >&6; }
6857else
6858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6859$as_echo "no" >&6; }
6860fi
6861
6862
6863  test -n "$EXPR" && break
6864done
6865
6866  else
6867    # The variable is set, but is it from the command line or the environment?
6868
6869    # Try to remove the string !EXPR! from our list.
6870    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6871    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6872      # If it failed, the variable was not from the command line. Ignore it,
6873      # but warn the user (except for BASH, which is always set by the calling BASH).
6874      if test "xEXPR" != xBASH; then
6875        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6876$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6877      fi
6878      # Try to locate tool using the code snippet
6879      for ac_prog in expr
6880do
6881  # Extract the first word of "$ac_prog", so it can be a program name with args.
6882set dummy $ac_prog; ac_word=$2
6883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6884$as_echo_n "checking for $ac_word... " >&6; }
6885if ${ac_cv_path_EXPR+:} false; then :
6886  $as_echo_n "(cached) " >&6
6887else
6888  case $EXPR in
6889  [\\/]* | ?:[\\/]*)
6890  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6891  ;;
6892  *)
6893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6894for as_dir in $PATH
6895do
6896  IFS=$as_save_IFS
6897  test -z "$as_dir" && as_dir=.
6898    for ac_exec_ext in '' $ac_executable_extensions; do
6899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6900    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6902    break 2
6903  fi
6904done
6905  done
6906IFS=$as_save_IFS
6907
6908  ;;
6909esac
6910fi
6911EXPR=$ac_cv_path_EXPR
6912if test -n "$EXPR"; then
6913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6914$as_echo "$EXPR" >&6; }
6915else
6916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6917$as_echo "no" >&6; }
6918fi
6919
6920
6921  test -n "$EXPR" && break
6922done
6923
6924    else
6925      # If it succeeded, then it was overridden by the user. We will use it
6926      # for the tool.
6927
6928      # First remove it from the list of overridden variables, so we can test
6929      # for unknown variables in the end.
6930      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6931
6932      # Check if the provided tool contains a complete path.
6933      tool_specified="$EXPR"
6934      tool_basename="${tool_specified##*/}"
6935      if test "x$tool_basename" = "x$tool_specified"; then
6936        # A command without a complete path is provided, search $PATH.
6937        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6938$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6939        # Extract the first word of "$tool_basename", so it can be a program name with args.
6940set dummy $tool_basename; ac_word=$2
6941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6942$as_echo_n "checking for $ac_word... " >&6; }
6943if ${ac_cv_path_EXPR+:} false; then :
6944  $as_echo_n "(cached) " >&6
6945else
6946  case $EXPR in
6947  [\\/]* | ?:[\\/]*)
6948  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6949  ;;
6950  *)
6951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6952for as_dir in $PATH
6953do
6954  IFS=$as_save_IFS
6955  test -z "$as_dir" && as_dir=.
6956    for ac_exec_ext in '' $ac_executable_extensions; do
6957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6958    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6960    break 2
6961  fi
6962done
6963  done
6964IFS=$as_save_IFS
6965
6966  ;;
6967esac
6968fi
6969EXPR=$ac_cv_path_EXPR
6970if test -n "$EXPR"; then
6971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6972$as_echo "$EXPR" >&6; }
6973else
6974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6975$as_echo "no" >&6; }
6976fi
6977
6978
6979        if test "x$EXPR" = x; then
6980          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6981        fi
6982      else
6983        # Otherwise we believe it is a complete path. Use it as it is.
6984        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6985$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6986        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6987$as_echo_n "checking for EXPR... " >&6; }
6988        if test ! -x "$tool_specified"; then
6989          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6990$as_echo "not found" >&6; }
6991          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6992        fi
6993        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6994$as_echo "$tool_specified" >&6; }
6995      fi
6996    fi
6997  fi
6998
6999
7000
7001  if test "x$EXPR" = x; then
7002    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7003  fi
7004
7005
7006
7007
7008
7009  # Publish this variable in the help.
7010
7011
7012  if test "x$FILE" = x; then
7013    # The variable is not set by user, try to locate tool using the code snippet
7014    for ac_prog in file
7015do
7016  # Extract the first word of "$ac_prog", so it can be a program name with args.
7017set dummy $ac_prog; ac_word=$2
7018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7019$as_echo_n "checking for $ac_word... " >&6; }
7020if ${ac_cv_path_FILE+:} false; then :
7021  $as_echo_n "(cached) " >&6
7022else
7023  case $FILE in
7024  [\\/]* | ?:[\\/]*)
7025  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7026  ;;
7027  *)
7028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7029for as_dir in $PATH
7030do
7031  IFS=$as_save_IFS
7032  test -z "$as_dir" && as_dir=.
7033    for ac_exec_ext in '' $ac_executable_extensions; do
7034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7035    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7037    break 2
7038  fi
7039done
7040  done
7041IFS=$as_save_IFS
7042
7043  ;;
7044esac
7045fi
7046FILE=$ac_cv_path_FILE
7047if test -n "$FILE"; then
7048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7049$as_echo "$FILE" >&6; }
7050else
7051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7052$as_echo "no" >&6; }
7053fi
7054
7055
7056  test -n "$FILE" && break
7057done
7058
7059  else
7060    # The variable is set, but is it from the command line or the environment?
7061
7062    # Try to remove the string !FILE! from our list.
7063    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7064    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7065      # If it failed, the variable was not from the command line. Ignore it,
7066      # but warn the user (except for BASH, which is always set by the calling BASH).
7067      if test "xFILE" != xBASH; then
7068        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7069$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7070      fi
7071      # Try to locate tool using the code snippet
7072      for ac_prog in file
7073do
7074  # Extract the first word of "$ac_prog", so it can be a program name with args.
7075set dummy $ac_prog; ac_word=$2
7076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7077$as_echo_n "checking for $ac_word... " >&6; }
7078if ${ac_cv_path_FILE+:} false; then :
7079  $as_echo_n "(cached) " >&6
7080else
7081  case $FILE in
7082  [\\/]* | ?:[\\/]*)
7083  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7084  ;;
7085  *)
7086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7087for as_dir in $PATH
7088do
7089  IFS=$as_save_IFS
7090  test -z "$as_dir" && as_dir=.
7091    for ac_exec_ext in '' $ac_executable_extensions; do
7092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7093    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7095    break 2
7096  fi
7097done
7098  done
7099IFS=$as_save_IFS
7100
7101  ;;
7102esac
7103fi
7104FILE=$ac_cv_path_FILE
7105if test -n "$FILE"; then
7106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7107$as_echo "$FILE" >&6; }
7108else
7109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7110$as_echo "no" >&6; }
7111fi
7112
7113
7114  test -n "$FILE" && break
7115done
7116
7117    else
7118      # If it succeeded, then it was overridden by the user. We will use it
7119      # for the tool.
7120
7121      # First remove it from the list of overridden variables, so we can test
7122      # for unknown variables in the end.
7123      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7124
7125      # Check if the provided tool contains a complete path.
7126      tool_specified="$FILE"
7127      tool_basename="${tool_specified##*/}"
7128      if test "x$tool_basename" = "x$tool_specified"; then
7129        # A command without a complete path is provided, search $PATH.
7130        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7131$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7132        # Extract the first word of "$tool_basename", so it can be a program name with args.
7133set dummy $tool_basename; ac_word=$2
7134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7135$as_echo_n "checking for $ac_word... " >&6; }
7136if ${ac_cv_path_FILE+:} false; then :
7137  $as_echo_n "(cached) " >&6
7138else
7139  case $FILE in
7140  [\\/]* | ?:[\\/]*)
7141  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7142  ;;
7143  *)
7144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7145for as_dir in $PATH
7146do
7147  IFS=$as_save_IFS
7148  test -z "$as_dir" && as_dir=.
7149    for ac_exec_ext in '' $ac_executable_extensions; do
7150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7151    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7153    break 2
7154  fi
7155done
7156  done
7157IFS=$as_save_IFS
7158
7159  ;;
7160esac
7161fi
7162FILE=$ac_cv_path_FILE
7163if test -n "$FILE"; then
7164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7165$as_echo "$FILE" >&6; }
7166else
7167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7168$as_echo "no" >&6; }
7169fi
7170
7171
7172        if test "x$FILE" = x; then
7173          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7174        fi
7175      else
7176        # Otherwise we believe it is a complete path. Use it as it is.
7177        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7178$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7179        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7180$as_echo_n "checking for FILE... " >&6; }
7181        if test ! -x "$tool_specified"; then
7182          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7183$as_echo "not found" >&6; }
7184          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7185        fi
7186        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7187$as_echo "$tool_specified" >&6; }
7188      fi
7189    fi
7190  fi
7191
7192
7193
7194  if test "x$FILE" = x; then
7195    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7196  fi
7197
7198
7199
7200
7201
7202  # Publish this variable in the help.
7203
7204
7205  if test "x$FIND" = x; then
7206    # The variable is not set by user, try to locate tool using the code snippet
7207    for ac_prog in find
7208do
7209  # Extract the first word of "$ac_prog", so it can be a program name with args.
7210set dummy $ac_prog; ac_word=$2
7211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7212$as_echo_n "checking for $ac_word... " >&6; }
7213if ${ac_cv_path_FIND+:} false; then :
7214  $as_echo_n "(cached) " >&6
7215else
7216  case $FIND in
7217  [\\/]* | ?:[\\/]*)
7218  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7219  ;;
7220  *)
7221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7222for as_dir in $PATH
7223do
7224  IFS=$as_save_IFS
7225  test -z "$as_dir" && as_dir=.
7226    for ac_exec_ext in '' $ac_executable_extensions; do
7227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7228    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7230    break 2
7231  fi
7232done
7233  done
7234IFS=$as_save_IFS
7235
7236  ;;
7237esac
7238fi
7239FIND=$ac_cv_path_FIND
7240if test -n "$FIND"; then
7241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7242$as_echo "$FIND" >&6; }
7243else
7244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7245$as_echo "no" >&6; }
7246fi
7247
7248
7249  test -n "$FIND" && break
7250done
7251
7252  else
7253    # The variable is set, but is it from the command line or the environment?
7254
7255    # Try to remove the string !FIND! from our list.
7256    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7257    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7258      # If it failed, the variable was not from the command line. Ignore it,
7259      # but warn the user (except for BASH, which is always set by the calling BASH).
7260      if test "xFIND" != xBASH; then
7261        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7262$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7263      fi
7264      # Try to locate tool using the code snippet
7265      for ac_prog in find
7266do
7267  # Extract the first word of "$ac_prog", so it can be a program name with args.
7268set dummy $ac_prog; ac_word=$2
7269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7270$as_echo_n "checking for $ac_word... " >&6; }
7271if ${ac_cv_path_FIND+:} false; then :
7272  $as_echo_n "(cached) " >&6
7273else
7274  case $FIND in
7275  [\\/]* | ?:[\\/]*)
7276  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7277  ;;
7278  *)
7279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7280for as_dir in $PATH
7281do
7282  IFS=$as_save_IFS
7283  test -z "$as_dir" && as_dir=.
7284    for ac_exec_ext in '' $ac_executable_extensions; do
7285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7286    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7288    break 2
7289  fi
7290done
7291  done
7292IFS=$as_save_IFS
7293
7294  ;;
7295esac
7296fi
7297FIND=$ac_cv_path_FIND
7298if test -n "$FIND"; then
7299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7300$as_echo "$FIND" >&6; }
7301else
7302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7303$as_echo "no" >&6; }
7304fi
7305
7306
7307  test -n "$FIND" && break
7308done
7309
7310    else
7311      # If it succeeded, then it was overridden by the user. We will use it
7312      # for the tool.
7313
7314      # First remove it from the list of overridden variables, so we can test
7315      # for unknown variables in the end.
7316      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7317
7318      # Check if the provided tool contains a complete path.
7319      tool_specified="$FIND"
7320      tool_basename="${tool_specified##*/}"
7321      if test "x$tool_basename" = "x$tool_specified"; then
7322        # A command without a complete path is provided, search $PATH.
7323        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7324$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7325        # Extract the first word of "$tool_basename", so it can be a program name with args.
7326set dummy $tool_basename; ac_word=$2
7327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7328$as_echo_n "checking for $ac_word... " >&6; }
7329if ${ac_cv_path_FIND+:} false; then :
7330  $as_echo_n "(cached) " >&6
7331else
7332  case $FIND in
7333  [\\/]* | ?:[\\/]*)
7334  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7335  ;;
7336  *)
7337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7338for as_dir in $PATH
7339do
7340  IFS=$as_save_IFS
7341  test -z "$as_dir" && as_dir=.
7342    for ac_exec_ext in '' $ac_executable_extensions; do
7343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7344    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7346    break 2
7347  fi
7348done
7349  done
7350IFS=$as_save_IFS
7351
7352  ;;
7353esac
7354fi
7355FIND=$ac_cv_path_FIND
7356if test -n "$FIND"; then
7357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7358$as_echo "$FIND" >&6; }
7359else
7360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7361$as_echo "no" >&6; }
7362fi
7363
7364
7365        if test "x$FIND" = x; then
7366          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7367        fi
7368      else
7369        # Otherwise we believe it is a complete path. Use it as it is.
7370        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7371$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7372        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7373$as_echo_n "checking for FIND... " >&6; }
7374        if test ! -x "$tool_specified"; then
7375          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7376$as_echo "not found" >&6; }
7377          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7378        fi
7379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7380$as_echo "$tool_specified" >&6; }
7381      fi
7382    fi
7383  fi
7384
7385
7386
7387  if test "x$FIND" = x; then
7388    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7389  fi
7390
7391
7392
7393
7394
7395  # Publish this variable in the help.
7396
7397
7398  if test "x$HEAD" = x; then
7399    # The variable is not set by user, try to locate tool using the code snippet
7400    for ac_prog in head
7401do
7402  # Extract the first word of "$ac_prog", so it can be a program name with args.
7403set dummy $ac_prog; ac_word=$2
7404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7405$as_echo_n "checking for $ac_word... " >&6; }
7406if ${ac_cv_path_HEAD+:} false; then :
7407  $as_echo_n "(cached) " >&6
7408else
7409  case $HEAD in
7410  [\\/]* | ?:[\\/]*)
7411  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7412  ;;
7413  *)
7414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7415for as_dir in $PATH
7416do
7417  IFS=$as_save_IFS
7418  test -z "$as_dir" && as_dir=.
7419    for ac_exec_ext in '' $ac_executable_extensions; do
7420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7421    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7423    break 2
7424  fi
7425done
7426  done
7427IFS=$as_save_IFS
7428
7429  ;;
7430esac
7431fi
7432HEAD=$ac_cv_path_HEAD
7433if test -n "$HEAD"; then
7434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7435$as_echo "$HEAD" >&6; }
7436else
7437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7438$as_echo "no" >&6; }
7439fi
7440
7441
7442  test -n "$HEAD" && break
7443done
7444
7445  else
7446    # The variable is set, but is it from the command line or the environment?
7447
7448    # Try to remove the string !HEAD! from our list.
7449    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7450    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7451      # If it failed, the variable was not from the command line. Ignore it,
7452      # but warn the user (except for BASH, which is always set by the calling BASH).
7453      if test "xHEAD" != xBASH; then
7454        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7455$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7456      fi
7457      # Try to locate tool using the code snippet
7458      for ac_prog in head
7459do
7460  # Extract the first word of "$ac_prog", so it can be a program name with args.
7461set dummy $ac_prog; ac_word=$2
7462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7463$as_echo_n "checking for $ac_word... " >&6; }
7464if ${ac_cv_path_HEAD+:} false; then :
7465  $as_echo_n "(cached) " >&6
7466else
7467  case $HEAD in
7468  [\\/]* | ?:[\\/]*)
7469  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7470  ;;
7471  *)
7472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7473for as_dir in $PATH
7474do
7475  IFS=$as_save_IFS
7476  test -z "$as_dir" && as_dir=.
7477    for ac_exec_ext in '' $ac_executable_extensions; do
7478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7479    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7481    break 2
7482  fi
7483done
7484  done
7485IFS=$as_save_IFS
7486
7487  ;;
7488esac
7489fi
7490HEAD=$ac_cv_path_HEAD
7491if test -n "$HEAD"; then
7492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7493$as_echo "$HEAD" >&6; }
7494else
7495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7496$as_echo "no" >&6; }
7497fi
7498
7499
7500  test -n "$HEAD" && break
7501done
7502
7503    else
7504      # If it succeeded, then it was overridden by the user. We will use it
7505      # for the tool.
7506
7507      # First remove it from the list of overridden variables, so we can test
7508      # for unknown variables in the end.
7509      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7510
7511      # Check if the provided tool contains a complete path.
7512      tool_specified="$HEAD"
7513      tool_basename="${tool_specified##*/}"
7514      if test "x$tool_basename" = "x$tool_specified"; then
7515        # A command without a complete path is provided, search $PATH.
7516        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7517$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7518        # Extract the first word of "$tool_basename", so it can be a program name with args.
7519set dummy $tool_basename; ac_word=$2
7520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7521$as_echo_n "checking for $ac_word... " >&6; }
7522if ${ac_cv_path_HEAD+:} false; then :
7523  $as_echo_n "(cached) " >&6
7524else
7525  case $HEAD in
7526  [\\/]* | ?:[\\/]*)
7527  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7528  ;;
7529  *)
7530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7531for as_dir in $PATH
7532do
7533  IFS=$as_save_IFS
7534  test -z "$as_dir" && as_dir=.
7535    for ac_exec_ext in '' $ac_executable_extensions; do
7536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7537    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7539    break 2
7540  fi
7541done
7542  done
7543IFS=$as_save_IFS
7544
7545  ;;
7546esac
7547fi
7548HEAD=$ac_cv_path_HEAD
7549if test -n "$HEAD"; then
7550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7551$as_echo "$HEAD" >&6; }
7552else
7553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7554$as_echo "no" >&6; }
7555fi
7556
7557
7558        if test "x$HEAD" = x; then
7559          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7560        fi
7561      else
7562        # Otherwise we believe it is a complete path. Use it as it is.
7563        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7564$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7565        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7566$as_echo_n "checking for HEAD... " >&6; }
7567        if test ! -x "$tool_specified"; then
7568          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7569$as_echo "not found" >&6; }
7570          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7571        fi
7572        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7573$as_echo "$tool_specified" >&6; }
7574      fi
7575    fi
7576  fi
7577
7578
7579
7580  if test "x$HEAD" = x; then
7581    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7582  fi
7583
7584
7585
7586
7587
7588  # Publish this variable in the help.
7589
7590
7591  if test "x$LN" = x; then
7592    # The variable is not set by user, try to locate tool using the code snippet
7593    for ac_prog in ln
7594do
7595  # Extract the first word of "$ac_prog", so it can be a program name with args.
7596set dummy $ac_prog; ac_word=$2
7597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7598$as_echo_n "checking for $ac_word... " >&6; }
7599if ${ac_cv_path_LN+:} false; then :
7600  $as_echo_n "(cached) " >&6
7601else
7602  case $LN in
7603  [\\/]* | ?:[\\/]*)
7604  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7605  ;;
7606  *)
7607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7608for as_dir in $PATH
7609do
7610  IFS=$as_save_IFS
7611  test -z "$as_dir" && as_dir=.
7612    for ac_exec_ext in '' $ac_executable_extensions; do
7613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7614    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7616    break 2
7617  fi
7618done
7619  done
7620IFS=$as_save_IFS
7621
7622  ;;
7623esac
7624fi
7625LN=$ac_cv_path_LN
7626if test -n "$LN"; then
7627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7628$as_echo "$LN" >&6; }
7629else
7630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7631$as_echo "no" >&6; }
7632fi
7633
7634
7635  test -n "$LN" && break
7636done
7637
7638  else
7639    # The variable is set, but is it from the command line or the environment?
7640
7641    # Try to remove the string !LN! from our list.
7642    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7643    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7644      # If it failed, the variable was not from the command line. Ignore it,
7645      # but warn the user (except for BASH, which is always set by the calling BASH).
7646      if test "xLN" != xBASH; then
7647        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7648$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7649      fi
7650      # Try to locate tool using the code snippet
7651      for ac_prog in ln
7652do
7653  # Extract the first word of "$ac_prog", so it can be a program name with args.
7654set dummy $ac_prog; ac_word=$2
7655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7656$as_echo_n "checking for $ac_word... " >&6; }
7657if ${ac_cv_path_LN+:} false; then :
7658  $as_echo_n "(cached) " >&6
7659else
7660  case $LN in
7661  [\\/]* | ?:[\\/]*)
7662  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7663  ;;
7664  *)
7665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7666for as_dir in $PATH
7667do
7668  IFS=$as_save_IFS
7669  test -z "$as_dir" && as_dir=.
7670    for ac_exec_ext in '' $ac_executable_extensions; do
7671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7672    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7674    break 2
7675  fi
7676done
7677  done
7678IFS=$as_save_IFS
7679
7680  ;;
7681esac
7682fi
7683LN=$ac_cv_path_LN
7684if test -n "$LN"; then
7685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7686$as_echo "$LN" >&6; }
7687else
7688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7689$as_echo "no" >&6; }
7690fi
7691
7692
7693  test -n "$LN" && break
7694done
7695
7696    else
7697      # If it succeeded, then it was overridden by the user. We will use it
7698      # for the tool.
7699
7700      # First remove it from the list of overridden variables, so we can test
7701      # for unknown variables in the end.
7702      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7703
7704      # Check if the provided tool contains a complete path.
7705      tool_specified="$LN"
7706      tool_basename="${tool_specified##*/}"
7707      if test "x$tool_basename" = "x$tool_specified"; then
7708        # A command without a complete path is provided, search $PATH.
7709        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7710$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7711        # Extract the first word of "$tool_basename", so it can be a program name with args.
7712set dummy $tool_basename; ac_word=$2
7713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7714$as_echo_n "checking for $ac_word... " >&6; }
7715if ${ac_cv_path_LN+:} false; then :
7716  $as_echo_n "(cached) " >&6
7717else
7718  case $LN in
7719  [\\/]* | ?:[\\/]*)
7720  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7721  ;;
7722  *)
7723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7724for as_dir in $PATH
7725do
7726  IFS=$as_save_IFS
7727  test -z "$as_dir" && as_dir=.
7728    for ac_exec_ext in '' $ac_executable_extensions; do
7729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7730    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7732    break 2
7733  fi
7734done
7735  done
7736IFS=$as_save_IFS
7737
7738  ;;
7739esac
7740fi
7741LN=$ac_cv_path_LN
7742if test -n "$LN"; then
7743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7744$as_echo "$LN" >&6; }
7745else
7746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7747$as_echo "no" >&6; }
7748fi
7749
7750
7751        if test "x$LN" = x; then
7752          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7753        fi
7754      else
7755        # Otherwise we believe it is a complete path. Use it as it is.
7756        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7757$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7758        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7759$as_echo_n "checking for LN... " >&6; }
7760        if test ! -x "$tool_specified"; then
7761          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7762$as_echo "not found" >&6; }
7763          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7764        fi
7765        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7766$as_echo "$tool_specified" >&6; }
7767      fi
7768    fi
7769  fi
7770
7771
7772
7773  if test "x$LN" = x; then
7774    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7775  fi
7776
7777
7778
7779
7780
7781  # Publish this variable in the help.
7782
7783
7784  if test "x$LS" = x; then
7785    # The variable is not set by user, try to locate tool using the code snippet
7786    for ac_prog in ls
7787do
7788  # Extract the first word of "$ac_prog", so it can be a program name with args.
7789set dummy $ac_prog; ac_word=$2
7790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7791$as_echo_n "checking for $ac_word... " >&6; }
7792if ${ac_cv_path_LS+:} false; then :
7793  $as_echo_n "(cached) " >&6
7794else
7795  case $LS in
7796  [\\/]* | ?:[\\/]*)
7797  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7798  ;;
7799  *)
7800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7801for as_dir in $PATH
7802do
7803  IFS=$as_save_IFS
7804  test -z "$as_dir" && as_dir=.
7805    for ac_exec_ext in '' $ac_executable_extensions; do
7806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7807    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7809    break 2
7810  fi
7811done
7812  done
7813IFS=$as_save_IFS
7814
7815  ;;
7816esac
7817fi
7818LS=$ac_cv_path_LS
7819if test -n "$LS"; then
7820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7821$as_echo "$LS" >&6; }
7822else
7823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7824$as_echo "no" >&6; }
7825fi
7826
7827
7828  test -n "$LS" && break
7829done
7830
7831  else
7832    # The variable is set, but is it from the command line or the environment?
7833
7834    # Try to remove the string !LS! from our list.
7835    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7836    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7837      # If it failed, the variable was not from the command line. Ignore it,
7838      # but warn the user (except for BASH, which is always set by the calling BASH).
7839      if test "xLS" != xBASH; then
7840        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7841$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7842      fi
7843      # Try to locate tool using the code snippet
7844      for ac_prog in ls
7845do
7846  # Extract the first word of "$ac_prog", so it can be a program name with args.
7847set dummy $ac_prog; ac_word=$2
7848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7849$as_echo_n "checking for $ac_word... " >&6; }
7850if ${ac_cv_path_LS+:} false; then :
7851  $as_echo_n "(cached) " >&6
7852else
7853  case $LS in
7854  [\\/]* | ?:[\\/]*)
7855  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7856  ;;
7857  *)
7858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7859for as_dir in $PATH
7860do
7861  IFS=$as_save_IFS
7862  test -z "$as_dir" && as_dir=.
7863    for ac_exec_ext in '' $ac_executable_extensions; do
7864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7865    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7867    break 2
7868  fi
7869done
7870  done
7871IFS=$as_save_IFS
7872
7873  ;;
7874esac
7875fi
7876LS=$ac_cv_path_LS
7877if test -n "$LS"; then
7878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7879$as_echo "$LS" >&6; }
7880else
7881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7882$as_echo "no" >&6; }
7883fi
7884
7885
7886  test -n "$LS" && break
7887done
7888
7889    else
7890      # If it succeeded, then it was overridden by the user. We will use it
7891      # for the tool.
7892
7893      # First remove it from the list of overridden variables, so we can test
7894      # for unknown variables in the end.
7895      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7896
7897      # Check if the provided tool contains a complete path.
7898      tool_specified="$LS"
7899      tool_basename="${tool_specified##*/}"
7900      if test "x$tool_basename" = "x$tool_specified"; then
7901        # A command without a complete path is provided, search $PATH.
7902        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7903$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7904        # Extract the first word of "$tool_basename", so it can be a program name with args.
7905set dummy $tool_basename; ac_word=$2
7906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7907$as_echo_n "checking for $ac_word... " >&6; }
7908if ${ac_cv_path_LS+:} false; then :
7909  $as_echo_n "(cached) " >&6
7910else
7911  case $LS in
7912  [\\/]* | ?:[\\/]*)
7913  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7914  ;;
7915  *)
7916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7917for as_dir in $PATH
7918do
7919  IFS=$as_save_IFS
7920  test -z "$as_dir" && as_dir=.
7921    for ac_exec_ext in '' $ac_executable_extensions; do
7922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7923    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7925    break 2
7926  fi
7927done
7928  done
7929IFS=$as_save_IFS
7930
7931  ;;
7932esac
7933fi
7934LS=$ac_cv_path_LS
7935if test -n "$LS"; then
7936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7937$as_echo "$LS" >&6; }
7938else
7939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7940$as_echo "no" >&6; }
7941fi
7942
7943
7944        if test "x$LS" = x; then
7945          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7946        fi
7947      else
7948        # Otherwise we believe it is a complete path. Use it as it is.
7949        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7950$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7951        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7952$as_echo_n "checking for LS... " >&6; }
7953        if test ! -x "$tool_specified"; then
7954          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7955$as_echo "not found" >&6; }
7956          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7957        fi
7958        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7959$as_echo "$tool_specified" >&6; }
7960      fi
7961    fi
7962  fi
7963
7964
7965
7966  if test "x$LS" = x; then
7967    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7968  fi
7969
7970
7971
7972
7973
7974  # Publish this variable in the help.
7975
7976
7977  if test "x$MKDIR" = x; then
7978    # The variable is not set by user, try to locate tool using the code snippet
7979    for ac_prog in mkdir
7980do
7981  # Extract the first word of "$ac_prog", so it can be a program name with args.
7982set dummy $ac_prog; ac_word=$2
7983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7984$as_echo_n "checking for $ac_word... " >&6; }
7985if ${ac_cv_path_MKDIR+:} false; then :
7986  $as_echo_n "(cached) " >&6
7987else
7988  case $MKDIR in
7989  [\\/]* | ?:[\\/]*)
7990  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7991  ;;
7992  *)
7993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7994for as_dir in $PATH
7995do
7996  IFS=$as_save_IFS
7997  test -z "$as_dir" && as_dir=.
7998    for ac_exec_ext in '' $ac_executable_extensions; do
7999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8000    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8002    break 2
8003  fi
8004done
8005  done
8006IFS=$as_save_IFS
8007
8008  ;;
8009esac
8010fi
8011MKDIR=$ac_cv_path_MKDIR
8012if test -n "$MKDIR"; then
8013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8014$as_echo "$MKDIR" >&6; }
8015else
8016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8017$as_echo "no" >&6; }
8018fi
8019
8020
8021  test -n "$MKDIR" && break
8022done
8023
8024  else
8025    # The variable is set, but is it from the command line or the environment?
8026
8027    # Try to remove the string !MKDIR! from our list.
8028    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8029    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8030      # If it failed, the variable was not from the command line. Ignore it,
8031      # but warn the user (except for BASH, which is always set by the calling BASH).
8032      if test "xMKDIR" != xBASH; then
8033        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8034$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8035      fi
8036      # Try to locate tool using the code snippet
8037      for ac_prog in mkdir
8038do
8039  # Extract the first word of "$ac_prog", so it can be a program name with args.
8040set dummy $ac_prog; ac_word=$2
8041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8042$as_echo_n "checking for $ac_word... " >&6; }
8043if ${ac_cv_path_MKDIR+:} false; then :
8044  $as_echo_n "(cached) " >&6
8045else
8046  case $MKDIR in
8047  [\\/]* | ?:[\\/]*)
8048  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8049  ;;
8050  *)
8051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8052for as_dir in $PATH
8053do
8054  IFS=$as_save_IFS
8055  test -z "$as_dir" && as_dir=.
8056    for ac_exec_ext in '' $ac_executable_extensions; do
8057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8058    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8060    break 2
8061  fi
8062done
8063  done
8064IFS=$as_save_IFS
8065
8066  ;;
8067esac
8068fi
8069MKDIR=$ac_cv_path_MKDIR
8070if test -n "$MKDIR"; then
8071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8072$as_echo "$MKDIR" >&6; }
8073else
8074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8075$as_echo "no" >&6; }
8076fi
8077
8078
8079  test -n "$MKDIR" && break
8080done
8081
8082    else
8083      # If it succeeded, then it was overridden by the user. We will use it
8084      # for the tool.
8085
8086      # First remove it from the list of overridden variables, so we can test
8087      # for unknown variables in the end.
8088      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8089
8090      # Check if the provided tool contains a complete path.
8091      tool_specified="$MKDIR"
8092      tool_basename="${tool_specified##*/}"
8093      if test "x$tool_basename" = "x$tool_specified"; then
8094        # A command without a complete path is provided, search $PATH.
8095        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8096$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8097        # Extract the first word of "$tool_basename", so it can be a program name with args.
8098set dummy $tool_basename; ac_word=$2
8099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8100$as_echo_n "checking for $ac_word... " >&6; }
8101if ${ac_cv_path_MKDIR+:} false; then :
8102  $as_echo_n "(cached) " >&6
8103else
8104  case $MKDIR in
8105  [\\/]* | ?:[\\/]*)
8106  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8107  ;;
8108  *)
8109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8110for as_dir in $PATH
8111do
8112  IFS=$as_save_IFS
8113  test -z "$as_dir" && as_dir=.
8114    for ac_exec_ext in '' $ac_executable_extensions; do
8115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8116    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8118    break 2
8119  fi
8120done
8121  done
8122IFS=$as_save_IFS
8123
8124  ;;
8125esac
8126fi
8127MKDIR=$ac_cv_path_MKDIR
8128if test -n "$MKDIR"; then
8129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8130$as_echo "$MKDIR" >&6; }
8131else
8132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8133$as_echo "no" >&6; }
8134fi
8135
8136
8137        if test "x$MKDIR" = x; then
8138          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8139        fi
8140      else
8141        # Otherwise we believe it is a complete path. Use it as it is.
8142        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8143$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8144        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8145$as_echo_n "checking for MKDIR... " >&6; }
8146        if test ! -x "$tool_specified"; then
8147          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8148$as_echo "not found" >&6; }
8149          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8150        fi
8151        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8152$as_echo "$tool_specified" >&6; }
8153      fi
8154    fi
8155  fi
8156
8157
8158
8159  if test "x$MKDIR" = x; then
8160    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8161  fi
8162
8163
8164
8165
8166
8167  # Publish this variable in the help.
8168
8169
8170  if test "x$MKTEMP" = x; then
8171    # The variable is not set by user, try to locate tool using the code snippet
8172    for ac_prog in mktemp
8173do
8174  # Extract the first word of "$ac_prog", so it can be a program name with args.
8175set dummy $ac_prog; ac_word=$2
8176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8177$as_echo_n "checking for $ac_word... " >&6; }
8178if ${ac_cv_path_MKTEMP+:} false; then :
8179  $as_echo_n "(cached) " >&6
8180else
8181  case $MKTEMP in
8182  [\\/]* | ?:[\\/]*)
8183  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8184  ;;
8185  *)
8186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8187for as_dir in $PATH
8188do
8189  IFS=$as_save_IFS
8190  test -z "$as_dir" && as_dir=.
8191    for ac_exec_ext in '' $ac_executable_extensions; do
8192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8193    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8195    break 2
8196  fi
8197done
8198  done
8199IFS=$as_save_IFS
8200
8201  ;;
8202esac
8203fi
8204MKTEMP=$ac_cv_path_MKTEMP
8205if test -n "$MKTEMP"; then
8206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8207$as_echo "$MKTEMP" >&6; }
8208else
8209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8210$as_echo "no" >&6; }
8211fi
8212
8213
8214  test -n "$MKTEMP" && break
8215done
8216
8217  else
8218    # The variable is set, but is it from the command line or the environment?
8219
8220    # Try to remove the string !MKTEMP! from our list.
8221    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8222    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8223      # If it failed, the variable was not from the command line. Ignore it,
8224      # but warn the user (except for BASH, which is always set by the calling BASH).
8225      if test "xMKTEMP" != xBASH; then
8226        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8227$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8228      fi
8229      # Try to locate tool using the code snippet
8230      for ac_prog in mktemp
8231do
8232  # Extract the first word of "$ac_prog", so it can be a program name with args.
8233set dummy $ac_prog; ac_word=$2
8234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8235$as_echo_n "checking for $ac_word... " >&6; }
8236if ${ac_cv_path_MKTEMP+:} false; then :
8237  $as_echo_n "(cached) " >&6
8238else
8239  case $MKTEMP in
8240  [\\/]* | ?:[\\/]*)
8241  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8242  ;;
8243  *)
8244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8245for as_dir in $PATH
8246do
8247  IFS=$as_save_IFS
8248  test -z "$as_dir" && as_dir=.
8249    for ac_exec_ext in '' $ac_executable_extensions; do
8250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8251    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8253    break 2
8254  fi
8255done
8256  done
8257IFS=$as_save_IFS
8258
8259  ;;
8260esac
8261fi
8262MKTEMP=$ac_cv_path_MKTEMP
8263if test -n "$MKTEMP"; then
8264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8265$as_echo "$MKTEMP" >&6; }
8266else
8267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8268$as_echo "no" >&6; }
8269fi
8270
8271
8272  test -n "$MKTEMP" && break
8273done
8274
8275    else
8276      # If it succeeded, then it was overridden by the user. We will use it
8277      # for the tool.
8278
8279      # First remove it from the list of overridden variables, so we can test
8280      # for unknown variables in the end.
8281      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8282
8283      # Check if the provided tool contains a complete path.
8284      tool_specified="$MKTEMP"
8285      tool_basename="${tool_specified##*/}"
8286      if test "x$tool_basename" = "x$tool_specified"; then
8287        # A command without a complete path is provided, search $PATH.
8288        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8289$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8290        # Extract the first word of "$tool_basename", so it can be a program name with args.
8291set dummy $tool_basename; ac_word=$2
8292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8293$as_echo_n "checking for $ac_word... " >&6; }
8294if ${ac_cv_path_MKTEMP+:} false; then :
8295  $as_echo_n "(cached) " >&6
8296else
8297  case $MKTEMP in
8298  [\\/]* | ?:[\\/]*)
8299  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8300  ;;
8301  *)
8302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8303for as_dir in $PATH
8304do
8305  IFS=$as_save_IFS
8306  test -z "$as_dir" && as_dir=.
8307    for ac_exec_ext in '' $ac_executable_extensions; do
8308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8309    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8311    break 2
8312  fi
8313done
8314  done
8315IFS=$as_save_IFS
8316
8317  ;;
8318esac
8319fi
8320MKTEMP=$ac_cv_path_MKTEMP
8321if test -n "$MKTEMP"; then
8322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8323$as_echo "$MKTEMP" >&6; }
8324else
8325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8326$as_echo "no" >&6; }
8327fi
8328
8329
8330        if test "x$MKTEMP" = x; then
8331          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8332        fi
8333      else
8334        # Otherwise we believe it is a complete path. Use it as it is.
8335        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8336$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8337        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8338$as_echo_n "checking for MKTEMP... " >&6; }
8339        if test ! -x "$tool_specified"; then
8340          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8341$as_echo "not found" >&6; }
8342          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8343        fi
8344        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8345$as_echo "$tool_specified" >&6; }
8346      fi
8347    fi
8348  fi
8349
8350
8351
8352  if test "x$MKTEMP" = x; then
8353    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8354  fi
8355
8356
8357
8358
8359
8360  # Publish this variable in the help.
8361
8362
8363  if test "x$MV" = x; then
8364    # The variable is not set by user, try to locate tool using the code snippet
8365    for ac_prog in mv
8366do
8367  # Extract the first word of "$ac_prog", so it can be a program name with args.
8368set dummy $ac_prog; ac_word=$2
8369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8370$as_echo_n "checking for $ac_word... " >&6; }
8371if ${ac_cv_path_MV+:} false; then :
8372  $as_echo_n "(cached) " >&6
8373else
8374  case $MV in
8375  [\\/]* | ?:[\\/]*)
8376  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8377  ;;
8378  *)
8379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8380for as_dir in $PATH
8381do
8382  IFS=$as_save_IFS
8383  test -z "$as_dir" && as_dir=.
8384    for ac_exec_ext in '' $ac_executable_extensions; do
8385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8386    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8388    break 2
8389  fi
8390done
8391  done
8392IFS=$as_save_IFS
8393
8394  ;;
8395esac
8396fi
8397MV=$ac_cv_path_MV
8398if test -n "$MV"; then
8399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8400$as_echo "$MV" >&6; }
8401else
8402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8403$as_echo "no" >&6; }
8404fi
8405
8406
8407  test -n "$MV" && break
8408done
8409
8410  else
8411    # The variable is set, but is it from the command line or the environment?
8412
8413    # Try to remove the string !MV! from our list.
8414    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8415    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8416      # If it failed, the variable was not from the command line. Ignore it,
8417      # but warn the user (except for BASH, which is always set by the calling BASH).
8418      if test "xMV" != xBASH; then
8419        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8420$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8421      fi
8422      # Try to locate tool using the code snippet
8423      for ac_prog in mv
8424do
8425  # Extract the first word of "$ac_prog", so it can be a program name with args.
8426set dummy $ac_prog; ac_word=$2
8427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8428$as_echo_n "checking for $ac_word... " >&6; }
8429if ${ac_cv_path_MV+:} false; then :
8430  $as_echo_n "(cached) " >&6
8431else
8432  case $MV in
8433  [\\/]* | ?:[\\/]*)
8434  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8435  ;;
8436  *)
8437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8438for as_dir in $PATH
8439do
8440  IFS=$as_save_IFS
8441  test -z "$as_dir" && as_dir=.
8442    for ac_exec_ext in '' $ac_executable_extensions; do
8443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8444    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8446    break 2
8447  fi
8448done
8449  done
8450IFS=$as_save_IFS
8451
8452  ;;
8453esac
8454fi
8455MV=$ac_cv_path_MV
8456if test -n "$MV"; then
8457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8458$as_echo "$MV" >&6; }
8459else
8460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8461$as_echo "no" >&6; }
8462fi
8463
8464
8465  test -n "$MV" && break
8466done
8467
8468    else
8469      # If it succeeded, then it was overridden by the user. We will use it
8470      # for the tool.
8471
8472      # First remove it from the list of overridden variables, so we can test
8473      # for unknown variables in the end.
8474      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8475
8476      # Check if the provided tool contains a complete path.
8477      tool_specified="$MV"
8478      tool_basename="${tool_specified##*/}"
8479      if test "x$tool_basename" = "x$tool_specified"; then
8480        # A command without a complete path is provided, search $PATH.
8481        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8482$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8483        # Extract the first word of "$tool_basename", so it can be a program name with args.
8484set dummy $tool_basename; ac_word=$2
8485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8486$as_echo_n "checking for $ac_word... " >&6; }
8487if ${ac_cv_path_MV+:} false; then :
8488  $as_echo_n "(cached) " >&6
8489else
8490  case $MV in
8491  [\\/]* | ?:[\\/]*)
8492  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8493  ;;
8494  *)
8495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8496for as_dir in $PATH
8497do
8498  IFS=$as_save_IFS
8499  test -z "$as_dir" && as_dir=.
8500    for ac_exec_ext in '' $ac_executable_extensions; do
8501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8502    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8504    break 2
8505  fi
8506done
8507  done
8508IFS=$as_save_IFS
8509
8510  ;;
8511esac
8512fi
8513MV=$ac_cv_path_MV
8514if test -n "$MV"; then
8515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8516$as_echo "$MV" >&6; }
8517else
8518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8519$as_echo "no" >&6; }
8520fi
8521
8522
8523        if test "x$MV" = x; then
8524          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8525        fi
8526      else
8527        # Otherwise we believe it is a complete path. Use it as it is.
8528        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8529$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8530        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8531$as_echo_n "checking for MV... " >&6; }
8532        if test ! -x "$tool_specified"; then
8533          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8534$as_echo "not found" >&6; }
8535          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8536        fi
8537        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8538$as_echo "$tool_specified" >&6; }
8539      fi
8540    fi
8541  fi
8542
8543
8544
8545  if test "x$MV" = x; then
8546    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8547  fi
8548
8549
8550
8551
8552
8553  # Publish this variable in the help.
8554
8555
8556  if test "x$NAWK" = x; then
8557    # The variable is not set by user, try to locate tool using the code snippet
8558    for ac_prog in nawk gawk awk
8559do
8560  # Extract the first word of "$ac_prog", so it can be a program name with args.
8561set dummy $ac_prog; ac_word=$2
8562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8563$as_echo_n "checking for $ac_word... " >&6; }
8564if ${ac_cv_path_NAWK+:} false; then :
8565  $as_echo_n "(cached) " >&6
8566else
8567  case $NAWK in
8568  [\\/]* | ?:[\\/]*)
8569  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8570  ;;
8571  *)
8572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8573for as_dir in $PATH
8574do
8575  IFS=$as_save_IFS
8576  test -z "$as_dir" && as_dir=.
8577    for ac_exec_ext in '' $ac_executable_extensions; do
8578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8579    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8581    break 2
8582  fi
8583done
8584  done
8585IFS=$as_save_IFS
8586
8587  ;;
8588esac
8589fi
8590NAWK=$ac_cv_path_NAWK
8591if test -n "$NAWK"; then
8592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8593$as_echo "$NAWK" >&6; }
8594else
8595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8596$as_echo "no" >&6; }
8597fi
8598
8599
8600  test -n "$NAWK" && break
8601done
8602
8603  else
8604    # The variable is set, but is it from the command line or the environment?
8605
8606    # Try to remove the string !NAWK! from our list.
8607    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8608    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8609      # If it failed, the variable was not from the command line. Ignore it,
8610      # but warn the user (except for BASH, which is always set by the calling BASH).
8611      if test "xNAWK" != xBASH; then
8612        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8613$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8614      fi
8615      # Try to locate tool using the code snippet
8616      for ac_prog in nawk gawk awk
8617do
8618  # Extract the first word of "$ac_prog", so it can be a program name with args.
8619set dummy $ac_prog; ac_word=$2
8620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8621$as_echo_n "checking for $ac_word... " >&6; }
8622if ${ac_cv_path_NAWK+:} false; then :
8623  $as_echo_n "(cached) " >&6
8624else
8625  case $NAWK in
8626  [\\/]* | ?:[\\/]*)
8627  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8628  ;;
8629  *)
8630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8631for as_dir in $PATH
8632do
8633  IFS=$as_save_IFS
8634  test -z "$as_dir" && as_dir=.
8635    for ac_exec_ext in '' $ac_executable_extensions; do
8636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8637    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8639    break 2
8640  fi
8641done
8642  done
8643IFS=$as_save_IFS
8644
8645  ;;
8646esac
8647fi
8648NAWK=$ac_cv_path_NAWK
8649if test -n "$NAWK"; then
8650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8651$as_echo "$NAWK" >&6; }
8652else
8653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8654$as_echo "no" >&6; }
8655fi
8656
8657
8658  test -n "$NAWK" && break
8659done
8660
8661    else
8662      # If it succeeded, then it was overridden by the user. We will use it
8663      # for the tool.
8664
8665      # First remove it from the list of overridden variables, so we can test
8666      # for unknown variables in the end.
8667      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8668
8669      # Check if the provided tool contains a complete path.
8670      tool_specified="$NAWK"
8671      tool_basename="${tool_specified##*/}"
8672      if test "x$tool_basename" = "x$tool_specified"; then
8673        # A command without a complete path is provided, search $PATH.
8674        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8675$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8676        # Extract the first word of "$tool_basename", so it can be a program name with args.
8677set dummy $tool_basename; ac_word=$2
8678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8679$as_echo_n "checking for $ac_word... " >&6; }
8680if ${ac_cv_path_NAWK+:} false; then :
8681  $as_echo_n "(cached) " >&6
8682else
8683  case $NAWK in
8684  [\\/]* | ?:[\\/]*)
8685  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8686  ;;
8687  *)
8688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8689for as_dir in $PATH
8690do
8691  IFS=$as_save_IFS
8692  test -z "$as_dir" && as_dir=.
8693    for ac_exec_ext in '' $ac_executable_extensions; do
8694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8695    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8697    break 2
8698  fi
8699done
8700  done
8701IFS=$as_save_IFS
8702
8703  ;;
8704esac
8705fi
8706NAWK=$ac_cv_path_NAWK
8707if test -n "$NAWK"; then
8708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8709$as_echo "$NAWK" >&6; }
8710else
8711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8712$as_echo "no" >&6; }
8713fi
8714
8715
8716        if test "x$NAWK" = x; then
8717          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8718        fi
8719      else
8720        # Otherwise we believe it is a complete path. Use it as it is.
8721        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8722$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8723        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8724$as_echo_n "checking for NAWK... " >&6; }
8725        if test ! -x "$tool_specified"; then
8726          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8727$as_echo "not found" >&6; }
8728          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8729        fi
8730        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8731$as_echo "$tool_specified" >&6; }
8732      fi
8733    fi
8734  fi
8735
8736
8737
8738  if test "x$NAWK" = x; then
8739    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8740  fi
8741
8742
8743
8744
8745
8746  # Publish this variable in the help.
8747
8748
8749  if test "x$PRINTF" = x; then
8750    # The variable is not set by user, try to locate tool using the code snippet
8751    for ac_prog in printf
8752do
8753  # Extract the first word of "$ac_prog", so it can be a program name with args.
8754set dummy $ac_prog; ac_word=$2
8755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8756$as_echo_n "checking for $ac_word... " >&6; }
8757if ${ac_cv_path_PRINTF+:} false; then :
8758  $as_echo_n "(cached) " >&6
8759else
8760  case $PRINTF in
8761  [\\/]* | ?:[\\/]*)
8762  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8763  ;;
8764  *)
8765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8766for as_dir in $PATH
8767do
8768  IFS=$as_save_IFS
8769  test -z "$as_dir" && as_dir=.
8770    for ac_exec_ext in '' $ac_executable_extensions; do
8771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8772    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8774    break 2
8775  fi
8776done
8777  done
8778IFS=$as_save_IFS
8779
8780  ;;
8781esac
8782fi
8783PRINTF=$ac_cv_path_PRINTF
8784if test -n "$PRINTF"; then
8785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8786$as_echo "$PRINTF" >&6; }
8787else
8788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8789$as_echo "no" >&6; }
8790fi
8791
8792
8793  test -n "$PRINTF" && break
8794done
8795
8796  else
8797    # The variable is set, but is it from the command line or the environment?
8798
8799    # Try to remove the string !PRINTF! from our list.
8800    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8801    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8802      # If it failed, the variable was not from the command line. Ignore it,
8803      # but warn the user (except for BASH, which is always set by the calling BASH).
8804      if test "xPRINTF" != xBASH; then
8805        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8806$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8807      fi
8808      # Try to locate tool using the code snippet
8809      for ac_prog in printf
8810do
8811  # Extract the first word of "$ac_prog", so it can be a program name with args.
8812set dummy $ac_prog; ac_word=$2
8813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8814$as_echo_n "checking for $ac_word... " >&6; }
8815if ${ac_cv_path_PRINTF+:} false; then :
8816  $as_echo_n "(cached) " >&6
8817else
8818  case $PRINTF in
8819  [\\/]* | ?:[\\/]*)
8820  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8821  ;;
8822  *)
8823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8824for as_dir in $PATH
8825do
8826  IFS=$as_save_IFS
8827  test -z "$as_dir" && as_dir=.
8828    for ac_exec_ext in '' $ac_executable_extensions; do
8829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8830    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8832    break 2
8833  fi
8834done
8835  done
8836IFS=$as_save_IFS
8837
8838  ;;
8839esac
8840fi
8841PRINTF=$ac_cv_path_PRINTF
8842if test -n "$PRINTF"; then
8843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8844$as_echo "$PRINTF" >&6; }
8845else
8846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8847$as_echo "no" >&6; }
8848fi
8849
8850
8851  test -n "$PRINTF" && break
8852done
8853
8854    else
8855      # If it succeeded, then it was overridden by the user. We will use it
8856      # for the tool.
8857
8858      # First remove it from the list of overridden variables, so we can test
8859      # for unknown variables in the end.
8860      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8861
8862      # Check if the provided tool contains a complete path.
8863      tool_specified="$PRINTF"
8864      tool_basename="${tool_specified##*/}"
8865      if test "x$tool_basename" = "x$tool_specified"; then
8866        # A command without a complete path is provided, search $PATH.
8867        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8868$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8869        # Extract the first word of "$tool_basename", so it can be a program name with args.
8870set dummy $tool_basename; ac_word=$2
8871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8872$as_echo_n "checking for $ac_word... " >&6; }
8873if ${ac_cv_path_PRINTF+:} false; then :
8874  $as_echo_n "(cached) " >&6
8875else
8876  case $PRINTF in
8877  [\\/]* | ?:[\\/]*)
8878  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8879  ;;
8880  *)
8881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8882for as_dir in $PATH
8883do
8884  IFS=$as_save_IFS
8885  test -z "$as_dir" && as_dir=.
8886    for ac_exec_ext in '' $ac_executable_extensions; do
8887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8888    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8890    break 2
8891  fi
8892done
8893  done
8894IFS=$as_save_IFS
8895
8896  ;;
8897esac
8898fi
8899PRINTF=$ac_cv_path_PRINTF
8900if test -n "$PRINTF"; then
8901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8902$as_echo "$PRINTF" >&6; }
8903else
8904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8905$as_echo "no" >&6; }
8906fi
8907
8908
8909        if test "x$PRINTF" = x; then
8910          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8911        fi
8912      else
8913        # Otherwise we believe it is a complete path. Use it as it is.
8914        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8915$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8916        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8917$as_echo_n "checking for PRINTF... " >&6; }
8918        if test ! -x "$tool_specified"; then
8919          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8920$as_echo "not found" >&6; }
8921          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8922        fi
8923        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8924$as_echo "$tool_specified" >&6; }
8925      fi
8926    fi
8927  fi
8928
8929
8930
8931  if test "x$PRINTF" = x; then
8932    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8933  fi
8934
8935
8936
8937
8938
8939  # Publish this variable in the help.
8940
8941
8942  if test "x$RM" = x; then
8943    # The variable is not set by user, try to locate tool using the code snippet
8944    for ac_prog in rm
8945do
8946  # Extract the first word of "$ac_prog", so it can be a program name with args.
8947set dummy $ac_prog; ac_word=$2
8948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8949$as_echo_n "checking for $ac_word... " >&6; }
8950if ${ac_cv_path_RM+:} false; then :
8951  $as_echo_n "(cached) " >&6
8952else
8953  case $RM in
8954  [\\/]* | ?:[\\/]*)
8955  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8956  ;;
8957  *)
8958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8959for as_dir in $PATH
8960do
8961  IFS=$as_save_IFS
8962  test -z "$as_dir" && as_dir=.
8963    for ac_exec_ext in '' $ac_executable_extensions; do
8964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8965    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8967    break 2
8968  fi
8969done
8970  done
8971IFS=$as_save_IFS
8972
8973  ;;
8974esac
8975fi
8976RM=$ac_cv_path_RM
8977if test -n "$RM"; then
8978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8979$as_echo "$RM" >&6; }
8980else
8981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8982$as_echo "no" >&6; }
8983fi
8984
8985
8986  test -n "$RM" && break
8987done
8988
8989  else
8990    # The variable is set, but is it from the command line or the environment?
8991
8992    # Try to remove the string !RM! from our list.
8993    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8994    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8995      # If it failed, the variable was not from the command line. Ignore it,
8996      # but warn the user (except for BASH, which is always set by the calling BASH).
8997      if test "xRM" != xBASH; then
8998        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8999$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9000      fi
9001      # Try to locate tool using the code snippet
9002      for ac_prog in rm
9003do
9004  # Extract the first word of "$ac_prog", so it can be a program name with args.
9005set dummy $ac_prog; ac_word=$2
9006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9007$as_echo_n "checking for $ac_word... " >&6; }
9008if ${ac_cv_path_RM+:} false; then :
9009  $as_echo_n "(cached) " >&6
9010else
9011  case $RM in
9012  [\\/]* | ?:[\\/]*)
9013  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9014  ;;
9015  *)
9016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9017for as_dir in $PATH
9018do
9019  IFS=$as_save_IFS
9020  test -z "$as_dir" && as_dir=.
9021    for ac_exec_ext in '' $ac_executable_extensions; do
9022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9023    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9025    break 2
9026  fi
9027done
9028  done
9029IFS=$as_save_IFS
9030
9031  ;;
9032esac
9033fi
9034RM=$ac_cv_path_RM
9035if test -n "$RM"; then
9036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9037$as_echo "$RM" >&6; }
9038else
9039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9040$as_echo "no" >&6; }
9041fi
9042
9043
9044  test -n "$RM" && break
9045done
9046
9047    else
9048      # If it succeeded, then it was overridden by the user. We will use it
9049      # for the tool.
9050
9051      # First remove it from the list of overridden variables, so we can test
9052      # for unknown variables in the end.
9053      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9054
9055      # Check if the provided tool contains a complete path.
9056      tool_specified="$RM"
9057      tool_basename="${tool_specified##*/}"
9058      if test "x$tool_basename" = "x$tool_specified"; then
9059        # A command without a complete path is provided, search $PATH.
9060        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9061$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9062        # Extract the first word of "$tool_basename", so it can be a program name with args.
9063set dummy $tool_basename; ac_word=$2
9064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9065$as_echo_n "checking for $ac_word... " >&6; }
9066if ${ac_cv_path_RM+:} false; then :
9067  $as_echo_n "(cached) " >&6
9068else
9069  case $RM in
9070  [\\/]* | ?:[\\/]*)
9071  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9072  ;;
9073  *)
9074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9075for as_dir in $PATH
9076do
9077  IFS=$as_save_IFS
9078  test -z "$as_dir" && as_dir=.
9079    for ac_exec_ext in '' $ac_executable_extensions; do
9080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9081    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9083    break 2
9084  fi
9085done
9086  done
9087IFS=$as_save_IFS
9088
9089  ;;
9090esac
9091fi
9092RM=$ac_cv_path_RM
9093if test -n "$RM"; then
9094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9095$as_echo "$RM" >&6; }
9096else
9097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9098$as_echo "no" >&6; }
9099fi
9100
9101
9102        if test "x$RM" = x; then
9103          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9104        fi
9105      else
9106        # Otherwise we believe it is a complete path. Use it as it is.
9107        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9108$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9109        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9110$as_echo_n "checking for RM... " >&6; }
9111        if test ! -x "$tool_specified"; then
9112          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9113$as_echo "not found" >&6; }
9114          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9115        fi
9116        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9117$as_echo "$tool_specified" >&6; }
9118      fi
9119    fi
9120  fi
9121
9122
9123
9124  if test "x$RM" = x; then
9125    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9126  fi
9127
9128
9129
9130
9131
9132  # Publish this variable in the help.
9133
9134
9135  if test "x$SH" = x; then
9136    # The variable is not set by user, try to locate tool using the code snippet
9137    for ac_prog in sh
9138do
9139  # Extract the first word of "$ac_prog", so it can be a program name with args.
9140set dummy $ac_prog; ac_word=$2
9141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9142$as_echo_n "checking for $ac_word... " >&6; }
9143if ${ac_cv_path_SH+:} false; then :
9144  $as_echo_n "(cached) " >&6
9145else
9146  case $SH in
9147  [\\/]* | ?:[\\/]*)
9148  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9149  ;;
9150  *)
9151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9152for as_dir in $PATH
9153do
9154  IFS=$as_save_IFS
9155  test -z "$as_dir" && as_dir=.
9156    for ac_exec_ext in '' $ac_executable_extensions; do
9157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9158    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9160    break 2
9161  fi
9162done
9163  done
9164IFS=$as_save_IFS
9165
9166  ;;
9167esac
9168fi
9169SH=$ac_cv_path_SH
9170if test -n "$SH"; then
9171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9172$as_echo "$SH" >&6; }
9173else
9174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9175$as_echo "no" >&6; }
9176fi
9177
9178
9179  test -n "$SH" && break
9180done
9181
9182  else
9183    # The variable is set, but is it from the command line or the environment?
9184
9185    # Try to remove the string !SH! from our list.
9186    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9187    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9188      # If it failed, the variable was not from the command line. Ignore it,
9189      # but warn the user (except for BASH, which is always set by the calling BASH).
9190      if test "xSH" != xBASH; then
9191        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9192$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9193      fi
9194      # Try to locate tool using the code snippet
9195      for ac_prog in sh
9196do
9197  # Extract the first word of "$ac_prog", so it can be a program name with args.
9198set dummy $ac_prog; ac_word=$2
9199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9200$as_echo_n "checking for $ac_word... " >&6; }
9201if ${ac_cv_path_SH+:} false; then :
9202  $as_echo_n "(cached) " >&6
9203else
9204  case $SH in
9205  [\\/]* | ?:[\\/]*)
9206  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9207  ;;
9208  *)
9209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9210for as_dir in $PATH
9211do
9212  IFS=$as_save_IFS
9213  test -z "$as_dir" && as_dir=.
9214    for ac_exec_ext in '' $ac_executable_extensions; do
9215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9216    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9218    break 2
9219  fi
9220done
9221  done
9222IFS=$as_save_IFS
9223
9224  ;;
9225esac
9226fi
9227SH=$ac_cv_path_SH
9228if test -n "$SH"; then
9229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9230$as_echo "$SH" >&6; }
9231else
9232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9233$as_echo "no" >&6; }
9234fi
9235
9236
9237  test -n "$SH" && break
9238done
9239
9240    else
9241      # If it succeeded, then it was overridden by the user. We will use it
9242      # for the tool.
9243
9244      # First remove it from the list of overridden variables, so we can test
9245      # for unknown variables in the end.
9246      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9247
9248      # Check if the provided tool contains a complete path.
9249      tool_specified="$SH"
9250      tool_basename="${tool_specified##*/}"
9251      if test "x$tool_basename" = "x$tool_specified"; then
9252        # A command without a complete path is provided, search $PATH.
9253        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9254$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9255        # Extract the first word of "$tool_basename", so it can be a program name with args.
9256set dummy $tool_basename; ac_word=$2
9257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9258$as_echo_n "checking for $ac_word... " >&6; }
9259if ${ac_cv_path_SH+:} false; then :
9260  $as_echo_n "(cached) " >&6
9261else
9262  case $SH in
9263  [\\/]* | ?:[\\/]*)
9264  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9265  ;;
9266  *)
9267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9268for as_dir in $PATH
9269do
9270  IFS=$as_save_IFS
9271  test -z "$as_dir" && as_dir=.
9272    for ac_exec_ext in '' $ac_executable_extensions; do
9273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9274    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9276    break 2
9277  fi
9278done
9279  done
9280IFS=$as_save_IFS
9281
9282  ;;
9283esac
9284fi
9285SH=$ac_cv_path_SH
9286if test -n "$SH"; then
9287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9288$as_echo "$SH" >&6; }
9289else
9290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9291$as_echo "no" >&6; }
9292fi
9293
9294
9295        if test "x$SH" = x; then
9296          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9297        fi
9298      else
9299        # Otherwise we believe it is a complete path. Use it as it is.
9300        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9301$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9302        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9303$as_echo_n "checking for SH... " >&6; }
9304        if test ! -x "$tool_specified"; then
9305          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9306$as_echo "not found" >&6; }
9307          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9308        fi
9309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9310$as_echo "$tool_specified" >&6; }
9311      fi
9312    fi
9313  fi
9314
9315
9316
9317  if test "x$SH" = x; then
9318    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9319  fi
9320
9321
9322
9323
9324
9325  # Publish this variable in the help.
9326
9327
9328  if test "x$SORT" = x; then
9329    # The variable is not set by user, try to locate tool using the code snippet
9330    for ac_prog in sort
9331do
9332  # Extract the first word of "$ac_prog", so it can be a program name with args.
9333set dummy $ac_prog; ac_word=$2
9334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9335$as_echo_n "checking for $ac_word... " >&6; }
9336if ${ac_cv_path_SORT+:} false; then :
9337  $as_echo_n "(cached) " >&6
9338else
9339  case $SORT in
9340  [\\/]* | ?:[\\/]*)
9341  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9342  ;;
9343  *)
9344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9345for as_dir in $PATH
9346do
9347  IFS=$as_save_IFS
9348  test -z "$as_dir" && as_dir=.
9349    for ac_exec_ext in '' $ac_executable_extensions; do
9350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9351    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9353    break 2
9354  fi
9355done
9356  done
9357IFS=$as_save_IFS
9358
9359  ;;
9360esac
9361fi
9362SORT=$ac_cv_path_SORT
9363if test -n "$SORT"; then
9364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9365$as_echo "$SORT" >&6; }
9366else
9367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9368$as_echo "no" >&6; }
9369fi
9370
9371
9372  test -n "$SORT" && break
9373done
9374
9375  else
9376    # The variable is set, but is it from the command line or the environment?
9377
9378    # Try to remove the string !SORT! from our list.
9379    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9380    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9381      # If it failed, the variable was not from the command line. Ignore it,
9382      # but warn the user (except for BASH, which is always set by the calling BASH).
9383      if test "xSORT" != xBASH; then
9384        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9385$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9386      fi
9387      # Try to locate tool using the code snippet
9388      for ac_prog in sort
9389do
9390  # Extract the first word of "$ac_prog", so it can be a program name with args.
9391set dummy $ac_prog; ac_word=$2
9392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9393$as_echo_n "checking for $ac_word... " >&6; }
9394if ${ac_cv_path_SORT+:} false; then :
9395  $as_echo_n "(cached) " >&6
9396else
9397  case $SORT in
9398  [\\/]* | ?:[\\/]*)
9399  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9400  ;;
9401  *)
9402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9403for as_dir in $PATH
9404do
9405  IFS=$as_save_IFS
9406  test -z "$as_dir" && as_dir=.
9407    for ac_exec_ext in '' $ac_executable_extensions; do
9408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9409    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9411    break 2
9412  fi
9413done
9414  done
9415IFS=$as_save_IFS
9416
9417  ;;
9418esac
9419fi
9420SORT=$ac_cv_path_SORT
9421if test -n "$SORT"; then
9422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9423$as_echo "$SORT" >&6; }
9424else
9425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9426$as_echo "no" >&6; }
9427fi
9428
9429
9430  test -n "$SORT" && break
9431done
9432
9433    else
9434      # If it succeeded, then it was overridden by the user. We will use it
9435      # for the tool.
9436
9437      # First remove it from the list of overridden variables, so we can test
9438      # for unknown variables in the end.
9439      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9440
9441      # Check if the provided tool contains a complete path.
9442      tool_specified="$SORT"
9443      tool_basename="${tool_specified##*/}"
9444      if test "x$tool_basename" = "x$tool_specified"; then
9445        # A command without a complete path is provided, search $PATH.
9446        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9447$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9448        # Extract the first word of "$tool_basename", so it can be a program name with args.
9449set dummy $tool_basename; ac_word=$2
9450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9451$as_echo_n "checking for $ac_word... " >&6; }
9452if ${ac_cv_path_SORT+:} false; then :
9453  $as_echo_n "(cached) " >&6
9454else
9455  case $SORT in
9456  [\\/]* | ?:[\\/]*)
9457  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9458  ;;
9459  *)
9460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9461for as_dir in $PATH
9462do
9463  IFS=$as_save_IFS
9464  test -z "$as_dir" && as_dir=.
9465    for ac_exec_ext in '' $ac_executable_extensions; do
9466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9467    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9469    break 2
9470  fi
9471done
9472  done
9473IFS=$as_save_IFS
9474
9475  ;;
9476esac
9477fi
9478SORT=$ac_cv_path_SORT
9479if test -n "$SORT"; then
9480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9481$as_echo "$SORT" >&6; }
9482else
9483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9484$as_echo "no" >&6; }
9485fi
9486
9487
9488        if test "x$SORT" = x; then
9489          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9490        fi
9491      else
9492        # Otherwise we believe it is a complete path. Use it as it is.
9493        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9494$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9495        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9496$as_echo_n "checking for SORT... " >&6; }
9497        if test ! -x "$tool_specified"; then
9498          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9499$as_echo "not found" >&6; }
9500          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9501        fi
9502        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9503$as_echo "$tool_specified" >&6; }
9504      fi
9505    fi
9506  fi
9507
9508
9509
9510  if test "x$SORT" = x; then
9511    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9512  fi
9513
9514
9515
9516
9517
9518  # Publish this variable in the help.
9519
9520
9521  if test "x$TAIL" = x; then
9522    # The variable is not set by user, try to locate tool using the code snippet
9523    for ac_prog in tail
9524do
9525  # Extract the first word of "$ac_prog", so it can be a program name with args.
9526set dummy $ac_prog; ac_word=$2
9527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9528$as_echo_n "checking for $ac_word... " >&6; }
9529if ${ac_cv_path_TAIL+:} false; then :
9530  $as_echo_n "(cached) " >&6
9531else
9532  case $TAIL in
9533  [\\/]* | ?:[\\/]*)
9534  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9535  ;;
9536  *)
9537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9538for as_dir in $PATH
9539do
9540  IFS=$as_save_IFS
9541  test -z "$as_dir" && as_dir=.
9542    for ac_exec_ext in '' $ac_executable_extensions; do
9543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9544    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9546    break 2
9547  fi
9548done
9549  done
9550IFS=$as_save_IFS
9551
9552  ;;
9553esac
9554fi
9555TAIL=$ac_cv_path_TAIL
9556if test -n "$TAIL"; then
9557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9558$as_echo "$TAIL" >&6; }
9559else
9560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9561$as_echo "no" >&6; }
9562fi
9563
9564
9565  test -n "$TAIL" && break
9566done
9567
9568  else
9569    # The variable is set, but is it from the command line or the environment?
9570
9571    # Try to remove the string !TAIL! from our list.
9572    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9573    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9574      # If it failed, the variable was not from the command line. Ignore it,
9575      # but warn the user (except for BASH, which is always set by the calling BASH).
9576      if test "xTAIL" != xBASH; then
9577        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9578$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9579      fi
9580      # Try to locate tool using the code snippet
9581      for ac_prog in tail
9582do
9583  # Extract the first word of "$ac_prog", so it can be a program name with args.
9584set dummy $ac_prog; ac_word=$2
9585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9586$as_echo_n "checking for $ac_word... " >&6; }
9587if ${ac_cv_path_TAIL+:} false; then :
9588  $as_echo_n "(cached) " >&6
9589else
9590  case $TAIL in
9591  [\\/]* | ?:[\\/]*)
9592  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9593  ;;
9594  *)
9595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9596for as_dir in $PATH
9597do
9598  IFS=$as_save_IFS
9599  test -z "$as_dir" && as_dir=.
9600    for ac_exec_ext in '' $ac_executable_extensions; do
9601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9602    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9604    break 2
9605  fi
9606done
9607  done
9608IFS=$as_save_IFS
9609
9610  ;;
9611esac
9612fi
9613TAIL=$ac_cv_path_TAIL
9614if test -n "$TAIL"; then
9615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9616$as_echo "$TAIL" >&6; }
9617else
9618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9619$as_echo "no" >&6; }
9620fi
9621
9622
9623  test -n "$TAIL" && break
9624done
9625
9626    else
9627      # If it succeeded, then it was overridden by the user. We will use it
9628      # for the tool.
9629
9630      # First remove it from the list of overridden variables, so we can test
9631      # for unknown variables in the end.
9632      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9633
9634      # Check if the provided tool contains a complete path.
9635      tool_specified="$TAIL"
9636      tool_basename="${tool_specified##*/}"
9637      if test "x$tool_basename" = "x$tool_specified"; then
9638        # A command without a complete path is provided, search $PATH.
9639        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9640$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9641        # Extract the first word of "$tool_basename", so it can be a program name with args.
9642set dummy $tool_basename; ac_word=$2
9643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9644$as_echo_n "checking for $ac_word... " >&6; }
9645if ${ac_cv_path_TAIL+:} false; then :
9646  $as_echo_n "(cached) " >&6
9647else
9648  case $TAIL in
9649  [\\/]* | ?:[\\/]*)
9650  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9651  ;;
9652  *)
9653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9654for as_dir in $PATH
9655do
9656  IFS=$as_save_IFS
9657  test -z "$as_dir" && as_dir=.
9658    for ac_exec_ext in '' $ac_executable_extensions; do
9659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9660    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9662    break 2
9663  fi
9664done
9665  done
9666IFS=$as_save_IFS
9667
9668  ;;
9669esac
9670fi
9671TAIL=$ac_cv_path_TAIL
9672if test -n "$TAIL"; then
9673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9674$as_echo "$TAIL" >&6; }
9675else
9676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9677$as_echo "no" >&6; }
9678fi
9679
9680
9681        if test "x$TAIL" = x; then
9682          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9683        fi
9684      else
9685        # Otherwise we believe it is a complete path. Use it as it is.
9686        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9687$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9688        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9689$as_echo_n "checking for TAIL... " >&6; }
9690        if test ! -x "$tool_specified"; then
9691          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9692$as_echo "not found" >&6; }
9693          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9694        fi
9695        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9696$as_echo "$tool_specified" >&6; }
9697      fi
9698    fi
9699  fi
9700
9701
9702
9703  if test "x$TAIL" = x; then
9704    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9705  fi
9706
9707
9708
9709
9710
9711  # Publish this variable in the help.
9712
9713
9714  if test "x$TAR" = x; then
9715    # The variable is not set by user, try to locate tool using the code snippet
9716    for ac_prog in tar
9717do
9718  # Extract the first word of "$ac_prog", so it can be a program name with args.
9719set dummy $ac_prog; ac_word=$2
9720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9721$as_echo_n "checking for $ac_word... " >&6; }
9722if ${ac_cv_path_TAR+:} false; then :
9723  $as_echo_n "(cached) " >&6
9724else
9725  case $TAR in
9726  [\\/]* | ?:[\\/]*)
9727  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9728  ;;
9729  *)
9730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9731for as_dir in $PATH
9732do
9733  IFS=$as_save_IFS
9734  test -z "$as_dir" && as_dir=.
9735    for ac_exec_ext in '' $ac_executable_extensions; do
9736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9737    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9739    break 2
9740  fi
9741done
9742  done
9743IFS=$as_save_IFS
9744
9745  ;;
9746esac
9747fi
9748TAR=$ac_cv_path_TAR
9749if test -n "$TAR"; then
9750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9751$as_echo "$TAR" >&6; }
9752else
9753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9754$as_echo "no" >&6; }
9755fi
9756
9757
9758  test -n "$TAR" && break
9759done
9760
9761  else
9762    # The variable is set, but is it from the command line or the environment?
9763
9764    # Try to remove the string !TAR! from our list.
9765    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9766    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9767      # If it failed, the variable was not from the command line. Ignore it,
9768      # but warn the user (except for BASH, which is always set by the calling BASH).
9769      if test "xTAR" != xBASH; then
9770        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9771$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9772      fi
9773      # Try to locate tool using the code snippet
9774      for ac_prog in tar
9775do
9776  # Extract the first word of "$ac_prog", so it can be a program name with args.
9777set dummy $ac_prog; ac_word=$2
9778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9779$as_echo_n "checking for $ac_word... " >&6; }
9780if ${ac_cv_path_TAR+:} false; then :
9781  $as_echo_n "(cached) " >&6
9782else
9783  case $TAR in
9784  [\\/]* | ?:[\\/]*)
9785  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9786  ;;
9787  *)
9788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9789for as_dir in $PATH
9790do
9791  IFS=$as_save_IFS
9792  test -z "$as_dir" && as_dir=.
9793    for ac_exec_ext in '' $ac_executable_extensions; do
9794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9795    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9797    break 2
9798  fi
9799done
9800  done
9801IFS=$as_save_IFS
9802
9803  ;;
9804esac
9805fi
9806TAR=$ac_cv_path_TAR
9807if test -n "$TAR"; then
9808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9809$as_echo "$TAR" >&6; }
9810else
9811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9812$as_echo "no" >&6; }
9813fi
9814
9815
9816  test -n "$TAR" && break
9817done
9818
9819    else
9820      # If it succeeded, then it was overridden by the user. We will use it
9821      # for the tool.
9822
9823      # First remove it from the list of overridden variables, so we can test
9824      # for unknown variables in the end.
9825      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9826
9827      # Check if the provided tool contains a complete path.
9828      tool_specified="$TAR"
9829      tool_basename="${tool_specified##*/}"
9830      if test "x$tool_basename" = "x$tool_specified"; then
9831        # A command without a complete path is provided, search $PATH.
9832        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9833$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9834        # Extract the first word of "$tool_basename", so it can be a program name with args.
9835set dummy $tool_basename; ac_word=$2
9836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9837$as_echo_n "checking for $ac_word... " >&6; }
9838if ${ac_cv_path_TAR+:} false; then :
9839  $as_echo_n "(cached) " >&6
9840else
9841  case $TAR in
9842  [\\/]* | ?:[\\/]*)
9843  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9844  ;;
9845  *)
9846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9847for as_dir in $PATH
9848do
9849  IFS=$as_save_IFS
9850  test -z "$as_dir" && as_dir=.
9851    for ac_exec_ext in '' $ac_executable_extensions; do
9852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9853    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9855    break 2
9856  fi
9857done
9858  done
9859IFS=$as_save_IFS
9860
9861  ;;
9862esac
9863fi
9864TAR=$ac_cv_path_TAR
9865if test -n "$TAR"; then
9866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9867$as_echo "$TAR" >&6; }
9868else
9869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9870$as_echo "no" >&6; }
9871fi
9872
9873
9874        if test "x$TAR" = x; then
9875          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9876        fi
9877      else
9878        # Otherwise we believe it is a complete path. Use it as it is.
9879        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9880$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9881        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9882$as_echo_n "checking for TAR... " >&6; }
9883        if test ! -x "$tool_specified"; then
9884          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9885$as_echo "not found" >&6; }
9886          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9887        fi
9888        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9889$as_echo "$tool_specified" >&6; }
9890      fi
9891    fi
9892  fi
9893
9894
9895
9896  if test "x$TAR" = x; then
9897    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9898  fi
9899
9900
9901
9902
9903
9904  # Publish this variable in the help.
9905
9906
9907  if test "x$TEE" = x; then
9908    # The variable is not set by user, try to locate tool using the code snippet
9909    for ac_prog in tee
9910do
9911  # Extract the first word of "$ac_prog", so it can be a program name with args.
9912set dummy $ac_prog; ac_word=$2
9913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9914$as_echo_n "checking for $ac_word... " >&6; }
9915if ${ac_cv_path_TEE+:} false; then :
9916  $as_echo_n "(cached) " >&6
9917else
9918  case $TEE in
9919  [\\/]* | ?:[\\/]*)
9920  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9921  ;;
9922  *)
9923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9924for as_dir in $PATH
9925do
9926  IFS=$as_save_IFS
9927  test -z "$as_dir" && as_dir=.
9928    for ac_exec_ext in '' $ac_executable_extensions; do
9929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9930    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9932    break 2
9933  fi
9934done
9935  done
9936IFS=$as_save_IFS
9937
9938  ;;
9939esac
9940fi
9941TEE=$ac_cv_path_TEE
9942if test -n "$TEE"; then
9943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9944$as_echo "$TEE" >&6; }
9945else
9946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9947$as_echo "no" >&6; }
9948fi
9949
9950
9951  test -n "$TEE" && break
9952done
9953
9954  else
9955    # The variable is set, but is it from the command line or the environment?
9956
9957    # Try to remove the string !TEE! from our list.
9958    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9959    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9960      # If it failed, the variable was not from the command line. Ignore it,
9961      # but warn the user (except for BASH, which is always set by the calling BASH).
9962      if test "xTEE" != xBASH; then
9963        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9964$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9965      fi
9966      # Try to locate tool using the code snippet
9967      for ac_prog in tee
9968do
9969  # Extract the first word of "$ac_prog", so it can be a program name with args.
9970set dummy $ac_prog; ac_word=$2
9971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9972$as_echo_n "checking for $ac_word... " >&6; }
9973if ${ac_cv_path_TEE+:} false; then :
9974  $as_echo_n "(cached) " >&6
9975else
9976  case $TEE in
9977  [\\/]* | ?:[\\/]*)
9978  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9979  ;;
9980  *)
9981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9982for as_dir in $PATH
9983do
9984  IFS=$as_save_IFS
9985  test -z "$as_dir" && as_dir=.
9986    for ac_exec_ext in '' $ac_executable_extensions; do
9987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9988    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9990    break 2
9991  fi
9992done
9993  done
9994IFS=$as_save_IFS
9995
9996  ;;
9997esac
9998fi
9999TEE=$ac_cv_path_TEE
10000if test -n "$TEE"; then
10001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10002$as_echo "$TEE" >&6; }
10003else
10004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10005$as_echo "no" >&6; }
10006fi
10007
10008
10009  test -n "$TEE" && break
10010done
10011
10012    else
10013      # If it succeeded, then it was overridden by the user. We will use it
10014      # for the tool.
10015
10016      # First remove it from the list of overridden variables, so we can test
10017      # for unknown variables in the end.
10018      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10019
10020      # Check if the provided tool contains a complete path.
10021      tool_specified="$TEE"
10022      tool_basename="${tool_specified##*/}"
10023      if test "x$tool_basename" = "x$tool_specified"; then
10024        # A command without a complete path is provided, search $PATH.
10025        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10026$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10027        # Extract the first word of "$tool_basename", so it can be a program name with args.
10028set dummy $tool_basename; ac_word=$2
10029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10030$as_echo_n "checking for $ac_word... " >&6; }
10031if ${ac_cv_path_TEE+:} false; then :
10032  $as_echo_n "(cached) " >&6
10033else
10034  case $TEE in
10035  [\\/]* | ?:[\\/]*)
10036  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10037  ;;
10038  *)
10039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10040for as_dir in $PATH
10041do
10042  IFS=$as_save_IFS
10043  test -z "$as_dir" && as_dir=.
10044    for ac_exec_ext in '' $ac_executable_extensions; do
10045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10046    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10048    break 2
10049  fi
10050done
10051  done
10052IFS=$as_save_IFS
10053
10054  ;;
10055esac
10056fi
10057TEE=$ac_cv_path_TEE
10058if test -n "$TEE"; then
10059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10060$as_echo "$TEE" >&6; }
10061else
10062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10063$as_echo "no" >&6; }
10064fi
10065
10066
10067        if test "x$TEE" = x; then
10068          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10069        fi
10070      else
10071        # Otherwise we believe it is a complete path. Use it as it is.
10072        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10073$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10074        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10075$as_echo_n "checking for TEE... " >&6; }
10076        if test ! -x "$tool_specified"; then
10077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10078$as_echo "not found" >&6; }
10079          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10080        fi
10081        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10082$as_echo "$tool_specified" >&6; }
10083      fi
10084    fi
10085  fi
10086
10087
10088
10089  if test "x$TEE" = x; then
10090    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10091  fi
10092
10093
10094
10095
10096
10097  # Publish this variable in the help.
10098
10099
10100  if test "x$TOUCH" = x; then
10101    # The variable is not set by user, try to locate tool using the code snippet
10102    for ac_prog in touch
10103do
10104  # Extract the first word of "$ac_prog", so it can be a program name with args.
10105set dummy $ac_prog; ac_word=$2
10106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10107$as_echo_n "checking for $ac_word... " >&6; }
10108if ${ac_cv_path_TOUCH+:} false; then :
10109  $as_echo_n "(cached) " >&6
10110else
10111  case $TOUCH in
10112  [\\/]* | ?:[\\/]*)
10113  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10114  ;;
10115  *)
10116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10117for as_dir in $PATH
10118do
10119  IFS=$as_save_IFS
10120  test -z "$as_dir" && as_dir=.
10121    for ac_exec_ext in '' $ac_executable_extensions; do
10122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10123    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10125    break 2
10126  fi
10127done
10128  done
10129IFS=$as_save_IFS
10130
10131  ;;
10132esac
10133fi
10134TOUCH=$ac_cv_path_TOUCH
10135if test -n "$TOUCH"; then
10136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10137$as_echo "$TOUCH" >&6; }
10138else
10139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10140$as_echo "no" >&6; }
10141fi
10142
10143
10144  test -n "$TOUCH" && break
10145done
10146
10147  else
10148    # The variable is set, but is it from the command line or the environment?
10149
10150    # Try to remove the string !TOUCH! from our list.
10151    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10152    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10153      # If it failed, the variable was not from the command line. Ignore it,
10154      # but warn the user (except for BASH, which is always set by the calling BASH).
10155      if test "xTOUCH" != xBASH; then
10156        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10157$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10158      fi
10159      # Try to locate tool using the code snippet
10160      for ac_prog in touch
10161do
10162  # Extract the first word of "$ac_prog", so it can be a program name with args.
10163set dummy $ac_prog; ac_word=$2
10164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10165$as_echo_n "checking for $ac_word... " >&6; }
10166if ${ac_cv_path_TOUCH+:} false; then :
10167  $as_echo_n "(cached) " >&6
10168else
10169  case $TOUCH in
10170  [\\/]* | ?:[\\/]*)
10171  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10172  ;;
10173  *)
10174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10175for as_dir in $PATH
10176do
10177  IFS=$as_save_IFS
10178  test -z "$as_dir" && as_dir=.
10179    for ac_exec_ext in '' $ac_executable_extensions; do
10180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10181    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10183    break 2
10184  fi
10185done
10186  done
10187IFS=$as_save_IFS
10188
10189  ;;
10190esac
10191fi
10192TOUCH=$ac_cv_path_TOUCH
10193if test -n "$TOUCH"; then
10194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10195$as_echo "$TOUCH" >&6; }
10196else
10197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10198$as_echo "no" >&6; }
10199fi
10200
10201
10202  test -n "$TOUCH" && break
10203done
10204
10205    else
10206      # If it succeeded, then it was overridden by the user. We will use it
10207      # for the tool.
10208
10209      # First remove it from the list of overridden variables, so we can test
10210      # for unknown variables in the end.
10211      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10212
10213      # Check if the provided tool contains a complete path.
10214      tool_specified="$TOUCH"
10215      tool_basename="${tool_specified##*/}"
10216      if test "x$tool_basename" = "x$tool_specified"; then
10217        # A command without a complete path is provided, search $PATH.
10218        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10219$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10220        # Extract the first word of "$tool_basename", so it can be a program name with args.
10221set dummy $tool_basename; ac_word=$2
10222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10223$as_echo_n "checking for $ac_word... " >&6; }
10224if ${ac_cv_path_TOUCH+:} false; then :
10225  $as_echo_n "(cached) " >&6
10226else
10227  case $TOUCH in
10228  [\\/]* | ?:[\\/]*)
10229  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10230  ;;
10231  *)
10232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10233for as_dir in $PATH
10234do
10235  IFS=$as_save_IFS
10236  test -z "$as_dir" && as_dir=.
10237    for ac_exec_ext in '' $ac_executable_extensions; do
10238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10239    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10241    break 2
10242  fi
10243done
10244  done
10245IFS=$as_save_IFS
10246
10247  ;;
10248esac
10249fi
10250TOUCH=$ac_cv_path_TOUCH
10251if test -n "$TOUCH"; then
10252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10253$as_echo "$TOUCH" >&6; }
10254else
10255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10256$as_echo "no" >&6; }
10257fi
10258
10259
10260        if test "x$TOUCH" = x; then
10261          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10262        fi
10263      else
10264        # Otherwise we believe it is a complete path. Use it as it is.
10265        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10266$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10267        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10268$as_echo_n "checking for TOUCH... " >&6; }
10269        if test ! -x "$tool_specified"; then
10270          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10271$as_echo "not found" >&6; }
10272          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10273        fi
10274        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10275$as_echo "$tool_specified" >&6; }
10276      fi
10277    fi
10278  fi
10279
10280
10281
10282  if test "x$TOUCH" = x; then
10283    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10284  fi
10285
10286
10287
10288
10289
10290  # Publish this variable in the help.
10291
10292
10293  if test "x$TR" = x; then
10294    # The variable is not set by user, try to locate tool using the code snippet
10295    for ac_prog in tr
10296do
10297  # Extract the first word of "$ac_prog", so it can be a program name with args.
10298set dummy $ac_prog; ac_word=$2
10299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10300$as_echo_n "checking for $ac_word... " >&6; }
10301if ${ac_cv_path_TR+:} false; then :
10302  $as_echo_n "(cached) " >&6
10303else
10304  case $TR in
10305  [\\/]* | ?:[\\/]*)
10306  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10307  ;;
10308  *)
10309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10310for as_dir in $PATH
10311do
10312  IFS=$as_save_IFS
10313  test -z "$as_dir" && as_dir=.
10314    for ac_exec_ext in '' $ac_executable_extensions; do
10315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10316    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10318    break 2
10319  fi
10320done
10321  done
10322IFS=$as_save_IFS
10323
10324  ;;
10325esac
10326fi
10327TR=$ac_cv_path_TR
10328if test -n "$TR"; then
10329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10330$as_echo "$TR" >&6; }
10331else
10332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10333$as_echo "no" >&6; }
10334fi
10335
10336
10337  test -n "$TR" && break
10338done
10339
10340  else
10341    # The variable is set, but is it from the command line or the environment?
10342
10343    # Try to remove the string !TR! from our list.
10344    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10345    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10346      # If it failed, the variable was not from the command line. Ignore it,
10347      # but warn the user (except for BASH, which is always set by the calling BASH).
10348      if test "xTR" != xBASH; then
10349        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10350$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10351      fi
10352      # Try to locate tool using the code snippet
10353      for ac_prog in tr
10354do
10355  # Extract the first word of "$ac_prog", so it can be a program name with args.
10356set dummy $ac_prog; ac_word=$2
10357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10358$as_echo_n "checking for $ac_word... " >&6; }
10359if ${ac_cv_path_TR+:} false; then :
10360  $as_echo_n "(cached) " >&6
10361else
10362  case $TR in
10363  [\\/]* | ?:[\\/]*)
10364  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10365  ;;
10366  *)
10367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10368for as_dir in $PATH
10369do
10370  IFS=$as_save_IFS
10371  test -z "$as_dir" && as_dir=.
10372    for ac_exec_ext in '' $ac_executable_extensions; do
10373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10374    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10376    break 2
10377  fi
10378done
10379  done
10380IFS=$as_save_IFS
10381
10382  ;;
10383esac
10384fi
10385TR=$ac_cv_path_TR
10386if test -n "$TR"; then
10387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10388$as_echo "$TR" >&6; }
10389else
10390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10391$as_echo "no" >&6; }
10392fi
10393
10394
10395  test -n "$TR" && break
10396done
10397
10398    else
10399      # If it succeeded, then it was overridden by the user. We will use it
10400      # for the tool.
10401
10402      # First remove it from the list of overridden variables, so we can test
10403      # for unknown variables in the end.
10404      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10405
10406      # Check if the provided tool contains a complete path.
10407      tool_specified="$TR"
10408      tool_basename="${tool_specified##*/}"
10409      if test "x$tool_basename" = "x$tool_specified"; then
10410        # A command without a complete path is provided, search $PATH.
10411        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10412$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10413        # Extract the first word of "$tool_basename", so it can be a program name with args.
10414set dummy $tool_basename; ac_word=$2
10415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10416$as_echo_n "checking for $ac_word... " >&6; }
10417if ${ac_cv_path_TR+:} false; then :
10418  $as_echo_n "(cached) " >&6
10419else
10420  case $TR in
10421  [\\/]* | ?:[\\/]*)
10422  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10423  ;;
10424  *)
10425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10426for as_dir in $PATH
10427do
10428  IFS=$as_save_IFS
10429  test -z "$as_dir" && as_dir=.
10430    for ac_exec_ext in '' $ac_executable_extensions; do
10431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10432    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10434    break 2
10435  fi
10436done
10437  done
10438IFS=$as_save_IFS
10439
10440  ;;
10441esac
10442fi
10443TR=$ac_cv_path_TR
10444if test -n "$TR"; then
10445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10446$as_echo "$TR" >&6; }
10447else
10448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10449$as_echo "no" >&6; }
10450fi
10451
10452
10453        if test "x$TR" = x; then
10454          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10455        fi
10456      else
10457        # Otherwise we believe it is a complete path. Use it as it is.
10458        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10459$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10460        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10461$as_echo_n "checking for TR... " >&6; }
10462        if test ! -x "$tool_specified"; then
10463          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10464$as_echo "not found" >&6; }
10465          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10466        fi
10467        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10468$as_echo "$tool_specified" >&6; }
10469      fi
10470    fi
10471  fi
10472
10473
10474
10475  if test "x$TR" = x; then
10476    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10477  fi
10478
10479
10480
10481
10482
10483  # Publish this variable in the help.
10484
10485
10486  if test "x$UNAME" = x; then
10487    # The variable is not set by user, try to locate tool using the code snippet
10488    for ac_prog in uname
10489do
10490  # Extract the first word of "$ac_prog", so it can be a program name with args.
10491set dummy $ac_prog; ac_word=$2
10492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10493$as_echo_n "checking for $ac_word... " >&6; }
10494if ${ac_cv_path_UNAME+:} false; then :
10495  $as_echo_n "(cached) " >&6
10496else
10497  case $UNAME in
10498  [\\/]* | ?:[\\/]*)
10499  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10500  ;;
10501  *)
10502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10503for as_dir in $PATH
10504do
10505  IFS=$as_save_IFS
10506  test -z "$as_dir" && as_dir=.
10507    for ac_exec_ext in '' $ac_executable_extensions; do
10508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10509    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10511    break 2
10512  fi
10513done
10514  done
10515IFS=$as_save_IFS
10516
10517  ;;
10518esac
10519fi
10520UNAME=$ac_cv_path_UNAME
10521if test -n "$UNAME"; then
10522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10523$as_echo "$UNAME" >&6; }
10524else
10525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10526$as_echo "no" >&6; }
10527fi
10528
10529
10530  test -n "$UNAME" && break
10531done
10532
10533  else
10534    # The variable is set, but is it from the command line or the environment?
10535
10536    # Try to remove the string !UNAME! from our list.
10537    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10538    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10539      # If it failed, the variable was not from the command line. Ignore it,
10540      # but warn the user (except for BASH, which is always set by the calling BASH).
10541      if test "xUNAME" != xBASH; then
10542        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10543$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10544      fi
10545      # Try to locate tool using the code snippet
10546      for ac_prog in uname
10547do
10548  # Extract the first word of "$ac_prog", so it can be a program name with args.
10549set dummy $ac_prog; ac_word=$2
10550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10551$as_echo_n "checking for $ac_word... " >&6; }
10552if ${ac_cv_path_UNAME+:} false; then :
10553  $as_echo_n "(cached) " >&6
10554else
10555  case $UNAME in
10556  [\\/]* | ?:[\\/]*)
10557  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10558  ;;
10559  *)
10560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10561for as_dir in $PATH
10562do
10563  IFS=$as_save_IFS
10564  test -z "$as_dir" && as_dir=.
10565    for ac_exec_ext in '' $ac_executable_extensions; do
10566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10567    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10569    break 2
10570  fi
10571done
10572  done
10573IFS=$as_save_IFS
10574
10575  ;;
10576esac
10577fi
10578UNAME=$ac_cv_path_UNAME
10579if test -n "$UNAME"; then
10580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10581$as_echo "$UNAME" >&6; }
10582else
10583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10584$as_echo "no" >&6; }
10585fi
10586
10587
10588  test -n "$UNAME" && break
10589done
10590
10591    else
10592      # If it succeeded, then it was overridden by the user. We will use it
10593      # for the tool.
10594
10595      # First remove it from the list of overridden variables, so we can test
10596      # for unknown variables in the end.
10597      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10598
10599      # Check if the provided tool contains a complete path.
10600      tool_specified="$UNAME"
10601      tool_basename="${tool_specified##*/}"
10602      if test "x$tool_basename" = "x$tool_specified"; then
10603        # A command without a complete path is provided, search $PATH.
10604        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10605$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10606        # Extract the first word of "$tool_basename", so it can be a program name with args.
10607set dummy $tool_basename; ac_word=$2
10608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10609$as_echo_n "checking for $ac_word... " >&6; }
10610if ${ac_cv_path_UNAME+:} false; then :
10611  $as_echo_n "(cached) " >&6
10612else
10613  case $UNAME in
10614  [\\/]* | ?:[\\/]*)
10615  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10616  ;;
10617  *)
10618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10619for as_dir in $PATH
10620do
10621  IFS=$as_save_IFS
10622  test -z "$as_dir" && as_dir=.
10623    for ac_exec_ext in '' $ac_executable_extensions; do
10624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10625    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10627    break 2
10628  fi
10629done
10630  done
10631IFS=$as_save_IFS
10632
10633  ;;
10634esac
10635fi
10636UNAME=$ac_cv_path_UNAME
10637if test -n "$UNAME"; then
10638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10639$as_echo "$UNAME" >&6; }
10640else
10641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10642$as_echo "no" >&6; }
10643fi
10644
10645
10646        if test "x$UNAME" = x; then
10647          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10648        fi
10649      else
10650        # Otherwise we believe it is a complete path. Use it as it is.
10651        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10652$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10653        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10654$as_echo_n "checking for UNAME... " >&6; }
10655        if test ! -x "$tool_specified"; then
10656          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10657$as_echo "not found" >&6; }
10658          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10659        fi
10660        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10661$as_echo "$tool_specified" >&6; }
10662      fi
10663    fi
10664  fi
10665
10666
10667
10668  if test "x$UNAME" = x; then
10669    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10670  fi
10671
10672
10673
10674
10675
10676  # Publish this variable in the help.
10677
10678
10679  if test "x$UNIQ" = x; then
10680    # The variable is not set by user, try to locate tool using the code snippet
10681    for ac_prog in uniq
10682do
10683  # Extract the first word of "$ac_prog", so it can be a program name with args.
10684set dummy $ac_prog; ac_word=$2
10685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10686$as_echo_n "checking for $ac_word... " >&6; }
10687if ${ac_cv_path_UNIQ+:} false; then :
10688  $as_echo_n "(cached) " >&6
10689else
10690  case $UNIQ in
10691  [\\/]* | ?:[\\/]*)
10692  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10693  ;;
10694  *)
10695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10696for as_dir in $PATH
10697do
10698  IFS=$as_save_IFS
10699  test -z "$as_dir" && as_dir=.
10700    for ac_exec_ext in '' $ac_executable_extensions; do
10701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10702    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10704    break 2
10705  fi
10706done
10707  done
10708IFS=$as_save_IFS
10709
10710  ;;
10711esac
10712fi
10713UNIQ=$ac_cv_path_UNIQ
10714if test -n "$UNIQ"; then
10715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10716$as_echo "$UNIQ" >&6; }
10717else
10718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10719$as_echo "no" >&6; }
10720fi
10721
10722
10723  test -n "$UNIQ" && break
10724done
10725
10726  else
10727    # The variable is set, but is it from the command line or the environment?
10728
10729    # Try to remove the string !UNIQ! from our list.
10730    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10731    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10732      # If it failed, the variable was not from the command line. Ignore it,
10733      # but warn the user (except for BASH, which is always set by the calling BASH).
10734      if test "xUNIQ" != xBASH; then
10735        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10736$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10737      fi
10738      # Try to locate tool using the code snippet
10739      for ac_prog in uniq
10740do
10741  # Extract the first word of "$ac_prog", so it can be a program name with args.
10742set dummy $ac_prog; ac_word=$2
10743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10744$as_echo_n "checking for $ac_word... " >&6; }
10745if ${ac_cv_path_UNIQ+:} false; then :
10746  $as_echo_n "(cached) " >&6
10747else
10748  case $UNIQ in
10749  [\\/]* | ?:[\\/]*)
10750  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10751  ;;
10752  *)
10753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10754for as_dir in $PATH
10755do
10756  IFS=$as_save_IFS
10757  test -z "$as_dir" && as_dir=.
10758    for ac_exec_ext in '' $ac_executable_extensions; do
10759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10760    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10762    break 2
10763  fi
10764done
10765  done
10766IFS=$as_save_IFS
10767
10768  ;;
10769esac
10770fi
10771UNIQ=$ac_cv_path_UNIQ
10772if test -n "$UNIQ"; then
10773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10774$as_echo "$UNIQ" >&6; }
10775else
10776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10777$as_echo "no" >&6; }
10778fi
10779
10780
10781  test -n "$UNIQ" && break
10782done
10783
10784    else
10785      # If it succeeded, then it was overridden by the user. We will use it
10786      # for the tool.
10787
10788      # First remove it from the list of overridden variables, so we can test
10789      # for unknown variables in the end.
10790      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10791
10792      # Check if the provided tool contains a complete path.
10793      tool_specified="$UNIQ"
10794      tool_basename="${tool_specified##*/}"
10795      if test "x$tool_basename" = "x$tool_specified"; then
10796        # A command without a complete path is provided, search $PATH.
10797        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10798$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10799        # Extract the first word of "$tool_basename", so it can be a program name with args.
10800set dummy $tool_basename; ac_word=$2
10801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10802$as_echo_n "checking for $ac_word... " >&6; }
10803if ${ac_cv_path_UNIQ+:} false; then :
10804  $as_echo_n "(cached) " >&6
10805else
10806  case $UNIQ in
10807  [\\/]* | ?:[\\/]*)
10808  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10809  ;;
10810  *)
10811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10812for as_dir in $PATH
10813do
10814  IFS=$as_save_IFS
10815  test -z "$as_dir" && as_dir=.
10816    for ac_exec_ext in '' $ac_executable_extensions; do
10817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10818    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10820    break 2
10821  fi
10822done
10823  done
10824IFS=$as_save_IFS
10825
10826  ;;
10827esac
10828fi
10829UNIQ=$ac_cv_path_UNIQ
10830if test -n "$UNIQ"; then
10831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10832$as_echo "$UNIQ" >&6; }
10833else
10834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10835$as_echo "no" >&6; }
10836fi
10837
10838
10839        if test "x$UNIQ" = x; then
10840          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10841        fi
10842      else
10843        # Otherwise we believe it is a complete path. Use it as it is.
10844        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10845$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10846        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10847$as_echo_n "checking for UNIQ... " >&6; }
10848        if test ! -x "$tool_specified"; then
10849          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10850$as_echo "not found" >&6; }
10851          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10852        fi
10853        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10854$as_echo "$tool_specified" >&6; }
10855      fi
10856    fi
10857  fi
10858
10859
10860
10861  if test "x$UNIQ" = x; then
10862    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10863  fi
10864
10865
10866
10867
10868
10869  # Publish this variable in the help.
10870
10871
10872  if test "x$WC" = x; then
10873    # The variable is not set by user, try to locate tool using the code snippet
10874    for ac_prog in wc
10875do
10876  # Extract the first word of "$ac_prog", so it can be a program name with args.
10877set dummy $ac_prog; ac_word=$2
10878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10879$as_echo_n "checking for $ac_word... " >&6; }
10880if ${ac_cv_path_WC+:} false; then :
10881  $as_echo_n "(cached) " >&6
10882else
10883  case $WC in
10884  [\\/]* | ?:[\\/]*)
10885  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10886  ;;
10887  *)
10888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10889for as_dir in $PATH
10890do
10891  IFS=$as_save_IFS
10892  test -z "$as_dir" && as_dir=.
10893    for ac_exec_ext in '' $ac_executable_extensions; do
10894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10895    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10897    break 2
10898  fi
10899done
10900  done
10901IFS=$as_save_IFS
10902
10903  ;;
10904esac
10905fi
10906WC=$ac_cv_path_WC
10907if test -n "$WC"; then
10908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10909$as_echo "$WC" >&6; }
10910else
10911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10912$as_echo "no" >&6; }
10913fi
10914
10915
10916  test -n "$WC" && break
10917done
10918
10919  else
10920    # The variable is set, but is it from the command line or the environment?
10921
10922    # Try to remove the string !WC! from our list.
10923    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10924    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10925      # If it failed, the variable was not from the command line. Ignore it,
10926      # but warn the user (except for BASH, which is always set by the calling BASH).
10927      if test "xWC" != xBASH; then
10928        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10929$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10930      fi
10931      # Try to locate tool using the code snippet
10932      for ac_prog in wc
10933do
10934  # Extract the first word of "$ac_prog", so it can be a program name with args.
10935set dummy $ac_prog; ac_word=$2
10936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10937$as_echo_n "checking for $ac_word... " >&6; }
10938if ${ac_cv_path_WC+:} false; then :
10939  $as_echo_n "(cached) " >&6
10940else
10941  case $WC in
10942  [\\/]* | ?:[\\/]*)
10943  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10944  ;;
10945  *)
10946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10947for as_dir in $PATH
10948do
10949  IFS=$as_save_IFS
10950  test -z "$as_dir" && as_dir=.
10951    for ac_exec_ext in '' $ac_executable_extensions; do
10952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10953    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10955    break 2
10956  fi
10957done
10958  done
10959IFS=$as_save_IFS
10960
10961  ;;
10962esac
10963fi
10964WC=$ac_cv_path_WC
10965if test -n "$WC"; then
10966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10967$as_echo "$WC" >&6; }
10968else
10969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10970$as_echo "no" >&6; }
10971fi
10972
10973
10974  test -n "$WC" && break
10975done
10976
10977    else
10978      # If it succeeded, then it was overridden by the user. We will use it
10979      # for the tool.
10980
10981      # First remove it from the list of overridden variables, so we can test
10982      # for unknown variables in the end.
10983      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10984
10985      # Check if the provided tool contains a complete path.
10986      tool_specified="$WC"
10987      tool_basename="${tool_specified##*/}"
10988      if test "x$tool_basename" = "x$tool_specified"; then
10989        # A command without a complete path is provided, search $PATH.
10990        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10991$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10992        # Extract the first word of "$tool_basename", so it can be a program name with args.
10993set dummy $tool_basename; ac_word=$2
10994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10995$as_echo_n "checking for $ac_word... " >&6; }
10996if ${ac_cv_path_WC+:} false; then :
10997  $as_echo_n "(cached) " >&6
10998else
10999  case $WC in
11000  [\\/]* | ?:[\\/]*)
11001  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11002  ;;
11003  *)
11004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11005for as_dir in $PATH
11006do
11007  IFS=$as_save_IFS
11008  test -z "$as_dir" && as_dir=.
11009    for ac_exec_ext in '' $ac_executable_extensions; do
11010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11011    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11013    break 2
11014  fi
11015done
11016  done
11017IFS=$as_save_IFS
11018
11019  ;;
11020esac
11021fi
11022WC=$ac_cv_path_WC
11023if test -n "$WC"; then
11024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11025$as_echo "$WC" >&6; }
11026else
11027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11028$as_echo "no" >&6; }
11029fi
11030
11031
11032        if test "x$WC" = x; then
11033          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11034        fi
11035      else
11036        # Otherwise we believe it is a complete path. Use it as it is.
11037        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11038$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11039        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11040$as_echo_n "checking for WC... " >&6; }
11041        if test ! -x "$tool_specified"; then
11042          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11043$as_echo "not found" >&6; }
11044          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11045        fi
11046        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11047$as_echo "$tool_specified" >&6; }
11048      fi
11049    fi
11050  fi
11051
11052
11053
11054  if test "x$WC" = x; then
11055    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11056  fi
11057
11058
11059
11060
11061
11062  # Publish this variable in the help.
11063
11064
11065  if test "x$WHICH" = x; then
11066    # The variable is not set by user, try to locate tool using the code snippet
11067    for ac_prog in which
11068do
11069  # Extract the first word of "$ac_prog", so it can be a program name with args.
11070set dummy $ac_prog; ac_word=$2
11071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11072$as_echo_n "checking for $ac_word... " >&6; }
11073if ${ac_cv_path_WHICH+:} false; then :
11074  $as_echo_n "(cached) " >&6
11075else
11076  case $WHICH in
11077  [\\/]* | ?:[\\/]*)
11078  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11079  ;;
11080  *)
11081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11082for as_dir in $PATH
11083do
11084  IFS=$as_save_IFS
11085  test -z "$as_dir" && as_dir=.
11086    for ac_exec_ext in '' $ac_executable_extensions; do
11087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11088    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11090    break 2
11091  fi
11092done
11093  done
11094IFS=$as_save_IFS
11095
11096  ;;
11097esac
11098fi
11099WHICH=$ac_cv_path_WHICH
11100if test -n "$WHICH"; then
11101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11102$as_echo "$WHICH" >&6; }
11103else
11104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11105$as_echo "no" >&6; }
11106fi
11107
11108
11109  test -n "$WHICH" && break
11110done
11111
11112  else
11113    # The variable is set, but is it from the command line or the environment?
11114
11115    # Try to remove the string !WHICH! from our list.
11116    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11117    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11118      # If it failed, the variable was not from the command line. Ignore it,
11119      # but warn the user (except for BASH, which is always set by the calling BASH).
11120      if test "xWHICH" != xBASH; then
11121        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11122$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11123      fi
11124      # Try to locate tool using the code snippet
11125      for ac_prog in which
11126do
11127  # Extract the first word of "$ac_prog", so it can be a program name with args.
11128set dummy $ac_prog; ac_word=$2
11129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11130$as_echo_n "checking for $ac_word... " >&6; }
11131if ${ac_cv_path_WHICH+:} false; then :
11132  $as_echo_n "(cached) " >&6
11133else
11134  case $WHICH in
11135  [\\/]* | ?:[\\/]*)
11136  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11137  ;;
11138  *)
11139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11140for as_dir in $PATH
11141do
11142  IFS=$as_save_IFS
11143  test -z "$as_dir" && as_dir=.
11144    for ac_exec_ext in '' $ac_executable_extensions; do
11145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11146    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11148    break 2
11149  fi
11150done
11151  done
11152IFS=$as_save_IFS
11153
11154  ;;
11155esac
11156fi
11157WHICH=$ac_cv_path_WHICH
11158if test -n "$WHICH"; then
11159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11160$as_echo "$WHICH" >&6; }
11161else
11162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11163$as_echo "no" >&6; }
11164fi
11165
11166
11167  test -n "$WHICH" && break
11168done
11169
11170    else
11171      # If it succeeded, then it was overridden by the user. We will use it
11172      # for the tool.
11173
11174      # First remove it from the list of overridden variables, so we can test
11175      # for unknown variables in the end.
11176      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11177
11178      # Check if the provided tool contains a complete path.
11179      tool_specified="$WHICH"
11180      tool_basename="${tool_specified##*/}"
11181      if test "x$tool_basename" = "x$tool_specified"; then
11182        # A command without a complete path is provided, search $PATH.
11183        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11184$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11185        # Extract the first word of "$tool_basename", so it can be a program name with args.
11186set dummy $tool_basename; ac_word=$2
11187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11188$as_echo_n "checking for $ac_word... " >&6; }
11189if ${ac_cv_path_WHICH+:} false; then :
11190  $as_echo_n "(cached) " >&6
11191else
11192  case $WHICH in
11193  [\\/]* | ?:[\\/]*)
11194  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11195  ;;
11196  *)
11197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11198for as_dir in $PATH
11199do
11200  IFS=$as_save_IFS
11201  test -z "$as_dir" && as_dir=.
11202    for ac_exec_ext in '' $ac_executable_extensions; do
11203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11204    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11206    break 2
11207  fi
11208done
11209  done
11210IFS=$as_save_IFS
11211
11212  ;;
11213esac
11214fi
11215WHICH=$ac_cv_path_WHICH
11216if test -n "$WHICH"; then
11217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11218$as_echo "$WHICH" >&6; }
11219else
11220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11221$as_echo "no" >&6; }
11222fi
11223
11224
11225        if test "x$WHICH" = x; then
11226          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11227        fi
11228      else
11229        # Otherwise we believe it is a complete path. Use it as it is.
11230        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11231$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11232        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11233$as_echo_n "checking for WHICH... " >&6; }
11234        if test ! -x "$tool_specified"; then
11235          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11236$as_echo "not found" >&6; }
11237          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11238        fi
11239        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11240$as_echo "$tool_specified" >&6; }
11241      fi
11242    fi
11243  fi
11244
11245
11246
11247  if test "x$WHICH" = x; then
11248    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11249  fi
11250
11251
11252
11253
11254
11255  # Publish this variable in the help.
11256
11257
11258  if test "x$XARGS" = x; then
11259    # The variable is not set by user, try to locate tool using the code snippet
11260    for ac_prog in xargs
11261do
11262  # Extract the first word of "$ac_prog", so it can be a program name with args.
11263set dummy $ac_prog; ac_word=$2
11264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11265$as_echo_n "checking for $ac_word... " >&6; }
11266if ${ac_cv_path_XARGS+:} false; then :
11267  $as_echo_n "(cached) " >&6
11268else
11269  case $XARGS in
11270  [\\/]* | ?:[\\/]*)
11271  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11272  ;;
11273  *)
11274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11275for as_dir in $PATH
11276do
11277  IFS=$as_save_IFS
11278  test -z "$as_dir" && as_dir=.
11279    for ac_exec_ext in '' $ac_executable_extensions; do
11280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11281    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11283    break 2
11284  fi
11285done
11286  done
11287IFS=$as_save_IFS
11288
11289  ;;
11290esac
11291fi
11292XARGS=$ac_cv_path_XARGS
11293if test -n "$XARGS"; then
11294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11295$as_echo "$XARGS" >&6; }
11296else
11297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11298$as_echo "no" >&6; }
11299fi
11300
11301
11302  test -n "$XARGS" && break
11303done
11304
11305  else
11306    # The variable is set, but is it from the command line or the environment?
11307
11308    # Try to remove the string !XARGS! from our list.
11309    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11310    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11311      # If it failed, the variable was not from the command line. Ignore it,
11312      # but warn the user (except for BASH, which is always set by the calling BASH).
11313      if test "xXARGS" != xBASH; then
11314        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11315$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11316      fi
11317      # Try to locate tool using the code snippet
11318      for ac_prog in xargs
11319do
11320  # Extract the first word of "$ac_prog", so it can be a program name with args.
11321set dummy $ac_prog; ac_word=$2
11322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11323$as_echo_n "checking for $ac_word... " >&6; }
11324if ${ac_cv_path_XARGS+:} false; then :
11325  $as_echo_n "(cached) " >&6
11326else
11327  case $XARGS in
11328  [\\/]* | ?:[\\/]*)
11329  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11330  ;;
11331  *)
11332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11333for as_dir in $PATH
11334do
11335  IFS=$as_save_IFS
11336  test -z "$as_dir" && as_dir=.
11337    for ac_exec_ext in '' $ac_executable_extensions; do
11338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11339    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11341    break 2
11342  fi
11343done
11344  done
11345IFS=$as_save_IFS
11346
11347  ;;
11348esac
11349fi
11350XARGS=$ac_cv_path_XARGS
11351if test -n "$XARGS"; then
11352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11353$as_echo "$XARGS" >&6; }
11354else
11355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11356$as_echo "no" >&6; }
11357fi
11358
11359
11360  test -n "$XARGS" && break
11361done
11362
11363    else
11364      # If it succeeded, then it was overridden by the user. We will use it
11365      # for the tool.
11366
11367      # First remove it from the list of overridden variables, so we can test
11368      # for unknown variables in the end.
11369      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11370
11371      # Check if the provided tool contains a complete path.
11372      tool_specified="$XARGS"
11373      tool_basename="${tool_specified##*/}"
11374      if test "x$tool_basename" = "x$tool_specified"; then
11375        # A command without a complete path is provided, search $PATH.
11376        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11377$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11378        # Extract the first word of "$tool_basename", so it can be a program name with args.
11379set dummy $tool_basename; ac_word=$2
11380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11381$as_echo_n "checking for $ac_word... " >&6; }
11382if ${ac_cv_path_XARGS+:} false; then :
11383  $as_echo_n "(cached) " >&6
11384else
11385  case $XARGS in
11386  [\\/]* | ?:[\\/]*)
11387  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11388  ;;
11389  *)
11390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11391for as_dir in $PATH
11392do
11393  IFS=$as_save_IFS
11394  test -z "$as_dir" && as_dir=.
11395    for ac_exec_ext in '' $ac_executable_extensions; do
11396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11397    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11399    break 2
11400  fi
11401done
11402  done
11403IFS=$as_save_IFS
11404
11405  ;;
11406esac
11407fi
11408XARGS=$ac_cv_path_XARGS
11409if test -n "$XARGS"; then
11410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11411$as_echo "$XARGS" >&6; }
11412else
11413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11414$as_echo "no" >&6; }
11415fi
11416
11417
11418        if test "x$XARGS" = x; then
11419          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11420        fi
11421      else
11422        # Otherwise we believe it is a complete path. Use it as it is.
11423        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11424$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11425        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11426$as_echo_n "checking for XARGS... " >&6; }
11427        if test ! -x "$tool_specified"; then
11428          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11429$as_echo "not found" >&6; }
11430          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11431        fi
11432        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11433$as_echo "$tool_specified" >&6; }
11434      fi
11435    fi
11436  fi
11437
11438
11439
11440  if test "x$XARGS" = x; then
11441    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11442  fi
11443
11444
11445
11446  # Then required tools that require some special treatment.
11447
11448
11449  # Publish this variable in the help.
11450
11451
11452  if test "x$AWK" = x; then
11453    # The variable is not set by user, try to locate tool using the code snippet
11454    for ac_prog in gawk mawk nawk awk
11455do
11456  # Extract the first word of "$ac_prog", so it can be a program name with args.
11457set dummy $ac_prog; ac_word=$2
11458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11459$as_echo_n "checking for $ac_word... " >&6; }
11460if ${ac_cv_prog_AWK+:} false; then :
11461  $as_echo_n "(cached) " >&6
11462else
11463  if test -n "$AWK"; then
11464  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11465else
11466as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11467for as_dir in $PATH
11468do
11469  IFS=$as_save_IFS
11470  test -z "$as_dir" && as_dir=.
11471    for ac_exec_ext in '' $ac_executable_extensions; do
11472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11473    ac_cv_prog_AWK="$ac_prog"
11474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11475    break 2
11476  fi
11477done
11478  done
11479IFS=$as_save_IFS
11480
11481fi
11482fi
11483AWK=$ac_cv_prog_AWK
11484if test -n "$AWK"; then
11485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11486$as_echo "$AWK" >&6; }
11487else
11488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11489$as_echo "no" >&6; }
11490fi
11491
11492
11493  test -n "$AWK" && break
11494done
11495
11496  else
11497    # The variable is set, but is it from the command line or the environment?
11498
11499    # Try to remove the string !AWK! from our list.
11500    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11501    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11502      # If it failed, the variable was not from the command line. Ignore it,
11503      # but warn the user (except for BASH, which is always set by the calling BASH).
11504      if test "xAWK" != xBASH; then
11505        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11506$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11507      fi
11508      # Try to locate tool using the code snippet
11509      for ac_prog in gawk mawk nawk awk
11510do
11511  # Extract the first word of "$ac_prog", so it can be a program name with args.
11512set dummy $ac_prog; ac_word=$2
11513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11514$as_echo_n "checking for $ac_word... " >&6; }
11515if ${ac_cv_prog_AWK+:} false; then :
11516  $as_echo_n "(cached) " >&6
11517else
11518  if test -n "$AWK"; then
11519  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11520else
11521as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11522for as_dir in $PATH
11523do
11524  IFS=$as_save_IFS
11525  test -z "$as_dir" && as_dir=.
11526    for ac_exec_ext in '' $ac_executable_extensions; do
11527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11528    ac_cv_prog_AWK="$ac_prog"
11529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11530    break 2
11531  fi
11532done
11533  done
11534IFS=$as_save_IFS
11535
11536fi
11537fi
11538AWK=$ac_cv_prog_AWK
11539if test -n "$AWK"; then
11540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11541$as_echo "$AWK" >&6; }
11542else
11543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11544$as_echo "no" >&6; }
11545fi
11546
11547
11548  test -n "$AWK" && break
11549done
11550
11551    else
11552      # If it succeeded, then it was overridden by the user. We will use it
11553      # for the tool.
11554
11555      # First remove it from the list of overridden variables, so we can test
11556      # for unknown variables in the end.
11557      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11558
11559      # Check if the provided tool contains a complete path.
11560      tool_specified="$AWK"
11561      tool_basename="${tool_specified##*/}"
11562      if test "x$tool_basename" = "x$tool_specified"; then
11563        # A command without a complete path is provided, search $PATH.
11564        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11565$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11566        # Extract the first word of "$tool_basename", so it can be a program name with args.
11567set dummy $tool_basename; ac_word=$2
11568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11569$as_echo_n "checking for $ac_word... " >&6; }
11570if ${ac_cv_path_AWK+:} false; then :
11571  $as_echo_n "(cached) " >&6
11572else
11573  case $AWK in
11574  [\\/]* | ?:[\\/]*)
11575  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11576  ;;
11577  *)
11578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11579for as_dir in $PATH
11580do
11581  IFS=$as_save_IFS
11582  test -z "$as_dir" && as_dir=.
11583    for ac_exec_ext in '' $ac_executable_extensions; do
11584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11585    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11587    break 2
11588  fi
11589done
11590  done
11591IFS=$as_save_IFS
11592
11593  ;;
11594esac
11595fi
11596AWK=$ac_cv_path_AWK
11597if test -n "$AWK"; then
11598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11599$as_echo "$AWK" >&6; }
11600else
11601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11602$as_echo "no" >&6; }
11603fi
11604
11605
11606        if test "x$AWK" = x; then
11607          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11608        fi
11609      else
11610        # Otherwise we believe it is a complete path. Use it as it is.
11611        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11612$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11613        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11614$as_echo_n "checking for AWK... " >&6; }
11615        if test ! -x "$tool_specified"; then
11616          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11617$as_echo "not found" >&6; }
11618          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11619        fi
11620        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11621$as_echo "$tool_specified" >&6; }
11622      fi
11623    fi
11624  fi
11625
11626
11627  if test "x$AWK" = x; then
11628    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11629  fi
11630
11631
11632
11633
11634  # Publish this variable in the help.
11635
11636
11637  if test "x$GREP" = x; then
11638    # The variable is not set by user, try to locate tool using the code snippet
11639    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11640$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11641if ${ac_cv_path_GREP+:} false; then :
11642  $as_echo_n "(cached) " >&6
11643else
11644  if test -z "$GREP"; then
11645  ac_path_GREP_found=false
11646  # Loop through the user's path and test for each of PROGNAME-LIST
11647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11648for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11649do
11650  IFS=$as_save_IFS
11651  test -z "$as_dir" && as_dir=.
11652    for ac_prog in grep ggrep; do
11653    for ac_exec_ext in '' $ac_executable_extensions; do
11654      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11655      as_fn_executable_p "$ac_path_GREP" || continue
11656# Check for GNU ac_path_GREP and select it if it is found.
11657  # Check for GNU $ac_path_GREP
11658case `"$ac_path_GREP" --version 2>&1` in
11659*GNU*)
11660  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11661*)
11662  ac_count=0
11663  $as_echo_n 0123456789 >"conftest.in"
11664  while :
11665  do
11666    cat "conftest.in" "conftest.in" >"conftest.tmp"
11667    mv "conftest.tmp" "conftest.in"
11668    cp "conftest.in" "conftest.nl"
11669    $as_echo 'GREP' >> "conftest.nl"
11670    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11671    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11672    as_fn_arith $ac_count + 1 && ac_count=$as_val
11673    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11674      # Best one so far, save it but keep looking for a better one
11675      ac_cv_path_GREP="$ac_path_GREP"
11676      ac_path_GREP_max=$ac_count
11677    fi
11678    # 10*(2^10) chars as input seems more than enough
11679    test $ac_count -gt 10 && break
11680  done
11681  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11682esac
11683
11684      $ac_path_GREP_found && break 3
11685    done
11686  done
11687  done
11688IFS=$as_save_IFS
11689  if test -z "$ac_cv_path_GREP"; then
11690    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11691  fi
11692else
11693  ac_cv_path_GREP=$GREP
11694fi
11695
11696fi
11697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11698$as_echo "$ac_cv_path_GREP" >&6; }
11699 GREP="$ac_cv_path_GREP"
11700
11701
11702  else
11703    # The variable is set, but is it from the command line or the environment?
11704
11705    # Try to remove the string !GREP! from our list.
11706    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11707    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11708      # If it failed, the variable was not from the command line. Ignore it,
11709      # but warn the user (except for BASH, which is always set by the calling BASH).
11710      if test "xGREP" != xBASH; then
11711        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11712$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11713      fi
11714      # Try to locate tool using the code snippet
11715      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11716$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11717if ${ac_cv_path_GREP+:} false; then :
11718  $as_echo_n "(cached) " >&6
11719else
11720  if test -z "$GREP"; then
11721  ac_path_GREP_found=false
11722  # Loop through the user's path and test for each of PROGNAME-LIST
11723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11724for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11725do
11726  IFS=$as_save_IFS
11727  test -z "$as_dir" && as_dir=.
11728    for ac_prog in grep ggrep; do
11729    for ac_exec_ext in '' $ac_executable_extensions; do
11730      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11731      as_fn_executable_p "$ac_path_GREP" || continue
11732# Check for GNU ac_path_GREP and select it if it is found.
11733  # Check for GNU $ac_path_GREP
11734case `"$ac_path_GREP" --version 2>&1` in
11735*GNU*)
11736  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11737*)
11738  ac_count=0
11739  $as_echo_n 0123456789 >"conftest.in"
11740  while :
11741  do
11742    cat "conftest.in" "conftest.in" >"conftest.tmp"
11743    mv "conftest.tmp" "conftest.in"
11744    cp "conftest.in" "conftest.nl"
11745    $as_echo 'GREP' >> "conftest.nl"
11746    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11747    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11748    as_fn_arith $ac_count + 1 && ac_count=$as_val
11749    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11750      # Best one so far, save it but keep looking for a better one
11751      ac_cv_path_GREP="$ac_path_GREP"
11752      ac_path_GREP_max=$ac_count
11753    fi
11754    # 10*(2^10) chars as input seems more than enough
11755    test $ac_count -gt 10 && break
11756  done
11757  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11758esac
11759
11760      $ac_path_GREP_found && break 3
11761    done
11762  done
11763  done
11764IFS=$as_save_IFS
11765  if test -z "$ac_cv_path_GREP"; then
11766    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11767  fi
11768else
11769  ac_cv_path_GREP=$GREP
11770fi
11771
11772fi
11773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11774$as_echo "$ac_cv_path_GREP" >&6; }
11775 GREP="$ac_cv_path_GREP"
11776
11777
11778    else
11779      # If it succeeded, then it was overridden by the user. We will use it
11780      # for the tool.
11781
11782      # First remove it from the list of overridden variables, so we can test
11783      # for unknown variables in the end.
11784      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11785
11786      # Check if the provided tool contains a complete path.
11787      tool_specified="$GREP"
11788      tool_basename="${tool_specified##*/}"
11789      if test "x$tool_basename" = "x$tool_specified"; then
11790        # A command without a complete path is provided, search $PATH.
11791        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11792$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11793        # Extract the first word of "$tool_basename", so it can be a program name with args.
11794set dummy $tool_basename; ac_word=$2
11795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11796$as_echo_n "checking for $ac_word... " >&6; }
11797if ${ac_cv_path_GREP+:} false; then :
11798  $as_echo_n "(cached) " >&6
11799else
11800  case $GREP in
11801  [\\/]* | ?:[\\/]*)
11802  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11803  ;;
11804  *)
11805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11806for as_dir in $PATH
11807do
11808  IFS=$as_save_IFS
11809  test -z "$as_dir" && as_dir=.
11810    for ac_exec_ext in '' $ac_executable_extensions; do
11811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11812    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11814    break 2
11815  fi
11816done
11817  done
11818IFS=$as_save_IFS
11819
11820  ;;
11821esac
11822fi
11823GREP=$ac_cv_path_GREP
11824if test -n "$GREP"; then
11825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11826$as_echo "$GREP" >&6; }
11827else
11828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11829$as_echo "no" >&6; }
11830fi
11831
11832
11833        if test "x$GREP" = x; then
11834          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11835        fi
11836      else
11837        # Otherwise we believe it is a complete path. Use it as it is.
11838        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11839$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11840        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11841$as_echo_n "checking for GREP... " >&6; }
11842        if test ! -x "$tool_specified"; then
11843          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11844$as_echo "not found" >&6; }
11845          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11846        fi
11847        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11848$as_echo "$tool_specified" >&6; }
11849      fi
11850    fi
11851  fi
11852
11853
11854  if test "x$GREP" = x; then
11855    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11856  fi
11857
11858
11859
11860
11861  # Publish this variable in the help.
11862
11863
11864  if test "x$EGREP" = x; then
11865    # The variable is not set by user, try to locate tool using the code snippet
11866    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11867$as_echo_n "checking for egrep... " >&6; }
11868if ${ac_cv_path_EGREP+:} false; then :
11869  $as_echo_n "(cached) " >&6
11870else
11871  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11872   then ac_cv_path_EGREP="$GREP -E"
11873   else
11874     if test -z "$EGREP"; then
11875  ac_path_EGREP_found=false
11876  # Loop through the user's path and test for each of PROGNAME-LIST
11877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11878for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11879do
11880  IFS=$as_save_IFS
11881  test -z "$as_dir" && as_dir=.
11882    for ac_prog in egrep; do
11883    for ac_exec_ext in '' $ac_executable_extensions; do
11884      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11885      as_fn_executable_p "$ac_path_EGREP" || continue
11886# Check for GNU ac_path_EGREP and select it if it is found.
11887  # Check for GNU $ac_path_EGREP
11888case `"$ac_path_EGREP" --version 2>&1` in
11889*GNU*)
11890  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11891*)
11892  ac_count=0
11893  $as_echo_n 0123456789 >"conftest.in"
11894  while :
11895  do
11896    cat "conftest.in" "conftest.in" >"conftest.tmp"
11897    mv "conftest.tmp" "conftest.in"
11898    cp "conftest.in" "conftest.nl"
11899    $as_echo 'EGREP' >> "conftest.nl"
11900    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11901    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11902    as_fn_arith $ac_count + 1 && ac_count=$as_val
11903    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11904      # Best one so far, save it but keep looking for a better one
11905      ac_cv_path_EGREP="$ac_path_EGREP"
11906      ac_path_EGREP_max=$ac_count
11907    fi
11908    # 10*(2^10) chars as input seems more than enough
11909    test $ac_count -gt 10 && break
11910  done
11911  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11912esac
11913
11914      $ac_path_EGREP_found && break 3
11915    done
11916  done
11917  done
11918IFS=$as_save_IFS
11919  if test -z "$ac_cv_path_EGREP"; then
11920    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11921  fi
11922else
11923  ac_cv_path_EGREP=$EGREP
11924fi
11925
11926   fi
11927fi
11928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11929$as_echo "$ac_cv_path_EGREP" >&6; }
11930 EGREP="$ac_cv_path_EGREP"
11931
11932
11933  else
11934    # The variable is set, but is it from the command line or the environment?
11935
11936    # Try to remove the string !EGREP! from our list.
11937    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11938    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11939      # If it failed, the variable was not from the command line. Ignore it,
11940      # but warn the user (except for BASH, which is always set by the calling BASH).
11941      if test "xEGREP" != xBASH; then
11942        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11943$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11944      fi
11945      # Try to locate tool using the code snippet
11946      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11947$as_echo_n "checking for egrep... " >&6; }
11948if ${ac_cv_path_EGREP+:} false; then :
11949  $as_echo_n "(cached) " >&6
11950else
11951  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11952   then ac_cv_path_EGREP="$GREP -E"
11953   else
11954     if test -z "$EGREP"; then
11955  ac_path_EGREP_found=false
11956  # Loop through the user's path and test for each of PROGNAME-LIST
11957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11958for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11959do
11960  IFS=$as_save_IFS
11961  test -z "$as_dir" && as_dir=.
11962    for ac_prog in egrep; do
11963    for ac_exec_ext in '' $ac_executable_extensions; do
11964      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11965      as_fn_executable_p "$ac_path_EGREP" || continue
11966# Check for GNU ac_path_EGREP and select it if it is found.
11967  # Check for GNU $ac_path_EGREP
11968case `"$ac_path_EGREP" --version 2>&1` in
11969*GNU*)
11970  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11971*)
11972  ac_count=0
11973  $as_echo_n 0123456789 >"conftest.in"
11974  while :
11975  do
11976    cat "conftest.in" "conftest.in" >"conftest.tmp"
11977    mv "conftest.tmp" "conftest.in"
11978    cp "conftest.in" "conftest.nl"
11979    $as_echo 'EGREP' >> "conftest.nl"
11980    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11981    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11982    as_fn_arith $ac_count + 1 && ac_count=$as_val
11983    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11984      # Best one so far, save it but keep looking for a better one
11985      ac_cv_path_EGREP="$ac_path_EGREP"
11986      ac_path_EGREP_max=$ac_count
11987    fi
11988    # 10*(2^10) chars as input seems more than enough
11989    test $ac_count -gt 10 && break
11990  done
11991  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11992esac
11993
11994      $ac_path_EGREP_found && break 3
11995    done
11996  done
11997  done
11998IFS=$as_save_IFS
11999  if test -z "$ac_cv_path_EGREP"; then
12000    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12001  fi
12002else
12003  ac_cv_path_EGREP=$EGREP
12004fi
12005
12006   fi
12007fi
12008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12009$as_echo "$ac_cv_path_EGREP" >&6; }
12010 EGREP="$ac_cv_path_EGREP"
12011
12012
12013    else
12014      # If it succeeded, then it was overridden by the user. We will use it
12015      # for the tool.
12016
12017      # First remove it from the list of overridden variables, so we can test
12018      # for unknown variables in the end.
12019      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12020
12021      # Check if the provided tool contains a complete path.
12022      tool_specified="$EGREP"
12023      tool_basename="${tool_specified##*/}"
12024      if test "x$tool_basename" = "x$tool_specified"; then
12025        # A command without a complete path is provided, search $PATH.
12026        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12027$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12028        # Extract the first word of "$tool_basename", so it can be a program name with args.
12029set dummy $tool_basename; ac_word=$2
12030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12031$as_echo_n "checking for $ac_word... " >&6; }
12032if ${ac_cv_path_EGREP+:} false; then :
12033  $as_echo_n "(cached) " >&6
12034else
12035  case $EGREP in
12036  [\\/]* | ?:[\\/]*)
12037  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12038  ;;
12039  *)
12040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12041for as_dir in $PATH
12042do
12043  IFS=$as_save_IFS
12044  test -z "$as_dir" && as_dir=.
12045    for ac_exec_ext in '' $ac_executable_extensions; do
12046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12047    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12049    break 2
12050  fi
12051done
12052  done
12053IFS=$as_save_IFS
12054
12055  ;;
12056esac
12057fi
12058EGREP=$ac_cv_path_EGREP
12059if test -n "$EGREP"; then
12060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12061$as_echo "$EGREP" >&6; }
12062else
12063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12064$as_echo "no" >&6; }
12065fi
12066
12067
12068        if test "x$EGREP" = x; then
12069          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12070        fi
12071      else
12072        # Otherwise we believe it is a complete path. Use it as it is.
12073        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12074$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12075        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12076$as_echo_n "checking for EGREP... " >&6; }
12077        if test ! -x "$tool_specified"; then
12078          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12079$as_echo "not found" >&6; }
12080          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12081        fi
12082        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12083$as_echo "$tool_specified" >&6; }
12084      fi
12085    fi
12086  fi
12087
12088
12089  if test "x$EGREP" = x; then
12090    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12091  fi
12092
12093
12094
12095
12096  # Publish this variable in the help.
12097
12098
12099  if test "x$FGREP" = x; then
12100    # The variable is not set by user, try to locate tool using the code snippet
12101    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12102$as_echo_n "checking for fgrep... " >&6; }
12103if ${ac_cv_path_FGREP+:} false; then :
12104  $as_echo_n "(cached) " >&6
12105else
12106  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12107   then ac_cv_path_FGREP="$GREP -F"
12108   else
12109     if test -z "$FGREP"; then
12110  ac_path_FGREP_found=false
12111  # Loop through the user's path and test for each of PROGNAME-LIST
12112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12113for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12114do
12115  IFS=$as_save_IFS
12116  test -z "$as_dir" && as_dir=.
12117    for ac_prog in fgrep; do
12118    for ac_exec_ext in '' $ac_executable_extensions; do
12119      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12120      as_fn_executable_p "$ac_path_FGREP" || continue
12121# Check for GNU ac_path_FGREP and select it if it is found.
12122  # Check for GNU $ac_path_FGREP
12123case `"$ac_path_FGREP" --version 2>&1` in
12124*GNU*)
12125  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12126*)
12127  ac_count=0
12128  $as_echo_n 0123456789 >"conftest.in"
12129  while :
12130  do
12131    cat "conftest.in" "conftest.in" >"conftest.tmp"
12132    mv "conftest.tmp" "conftest.in"
12133    cp "conftest.in" "conftest.nl"
12134    $as_echo 'FGREP' >> "conftest.nl"
12135    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12136    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12137    as_fn_arith $ac_count + 1 && ac_count=$as_val
12138    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12139      # Best one so far, save it but keep looking for a better one
12140      ac_cv_path_FGREP="$ac_path_FGREP"
12141      ac_path_FGREP_max=$ac_count
12142    fi
12143    # 10*(2^10) chars as input seems more than enough
12144    test $ac_count -gt 10 && break
12145  done
12146  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12147esac
12148
12149      $ac_path_FGREP_found && break 3
12150    done
12151  done
12152  done
12153IFS=$as_save_IFS
12154  if test -z "$ac_cv_path_FGREP"; then
12155    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12156  fi
12157else
12158  ac_cv_path_FGREP=$FGREP
12159fi
12160
12161   fi
12162fi
12163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12164$as_echo "$ac_cv_path_FGREP" >&6; }
12165 FGREP="$ac_cv_path_FGREP"
12166
12167
12168  else
12169    # The variable is set, but is it from the command line or the environment?
12170
12171    # Try to remove the string !FGREP! from our list.
12172    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12173    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12174      # If it failed, the variable was not from the command line. Ignore it,
12175      # but warn the user (except for BASH, which is always set by the calling BASH).
12176      if test "xFGREP" != xBASH; then
12177        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12178$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12179      fi
12180      # Try to locate tool using the code snippet
12181      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12182$as_echo_n "checking for fgrep... " >&6; }
12183if ${ac_cv_path_FGREP+:} false; then :
12184  $as_echo_n "(cached) " >&6
12185else
12186  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12187   then ac_cv_path_FGREP="$GREP -F"
12188   else
12189     if test -z "$FGREP"; then
12190  ac_path_FGREP_found=false
12191  # Loop through the user's path and test for each of PROGNAME-LIST
12192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12193for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12194do
12195  IFS=$as_save_IFS
12196  test -z "$as_dir" && as_dir=.
12197    for ac_prog in fgrep; do
12198    for ac_exec_ext in '' $ac_executable_extensions; do
12199      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12200      as_fn_executable_p "$ac_path_FGREP" || continue
12201# Check for GNU ac_path_FGREP and select it if it is found.
12202  # Check for GNU $ac_path_FGREP
12203case `"$ac_path_FGREP" --version 2>&1` in
12204*GNU*)
12205  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12206*)
12207  ac_count=0
12208  $as_echo_n 0123456789 >"conftest.in"
12209  while :
12210  do
12211    cat "conftest.in" "conftest.in" >"conftest.tmp"
12212    mv "conftest.tmp" "conftest.in"
12213    cp "conftest.in" "conftest.nl"
12214    $as_echo 'FGREP' >> "conftest.nl"
12215    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12216    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12217    as_fn_arith $ac_count + 1 && ac_count=$as_val
12218    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12219      # Best one so far, save it but keep looking for a better one
12220      ac_cv_path_FGREP="$ac_path_FGREP"
12221      ac_path_FGREP_max=$ac_count
12222    fi
12223    # 10*(2^10) chars as input seems more than enough
12224    test $ac_count -gt 10 && break
12225  done
12226  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12227esac
12228
12229      $ac_path_FGREP_found && break 3
12230    done
12231  done
12232  done
12233IFS=$as_save_IFS
12234  if test -z "$ac_cv_path_FGREP"; then
12235    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12236  fi
12237else
12238  ac_cv_path_FGREP=$FGREP
12239fi
12240
12241   fi
12242fi
12243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12244$as_echo "$ac_cv_path_FGREP" >&6; }
12245 FGREP="$ac_cv_path_FGREP"
12246
12247
12248    else
12249      # If it succeeded, then it was overridden by the user. We will use it
12250      # for the tool.
12251
12252      # First remove it from the list of overridden variables, so we can test
12253      # for unknown variables in the end.
12254      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12255
12256      # Check if the provided tool contains a complete path.
12257      tool_specified="$FGREP"
12258      tool_basename="${tool_specified##*/}"
12259      if test "x$tool_basename" = "x$tool_specified"; then
12260        # A command without a complete path is provided, search $PATH.
12261        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12262$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12263        # Extract the first word of "$tool_basename", so it can be a program name with args.
12264set dummy $tool_basename; ac_word=$2
12265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12266$as_echo_n "checking for $ac_word... " >&6; }
12267if ${ac_cv_path_FGREP+:} false; then :
12268  $as_echo_n "(cached) " >&6
12269else
12270  case $FGREP in
12271  [\\/]* | ?:[\\/]*)
12272  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12273  ;;
12274  *)
12275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12276for as_dir in $PATH
12277do
12278  IFS=$as_save_IFS
12279  test -z "$as_dir" && as_dir=.
12280    for ac_exec_ext in '' $ac_executable_extensions; do
12281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12282    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12284    break 2
12285  fi
12286done
12287  done
12288IFS=$as_save_IFS
12289
12290  ;;
12291esac
12292fi
12293FGREP=$ac_cv_path_FGREP
12294if test -n "$FGREP"; then
12295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12296$as_echo "$FGREP" >&6; }
12297else
12298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12299$as_echo "no" >&6; }
12300fi
12301
12302
12303        if test "x$FGREP" = x; then
12304          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12305        fi
12306      else
12307        # Otherwise we believe it is a complete path. Use it as it is.
12308        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12309$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12310        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12311$as_echo_n "checking for FGREP... " >&6; }
12312        if test ! -x "$tool_specified"; then
12313          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12314$as_echo "not found" >&6; }
12315          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12316        fi
12317        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12318$as_echo "$tool_specified" >&6; }
12319      fi
12320    fi
12321  fi
12322
12323
12324  if test "x$FGREP" = x; then
12325    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12326  fi
12327
12328
12329
12330
12331  # Publish this variable in the help.
12332
12333
12334  if test "x$SED" = x; then
12335    # The variable is not set by user, try to locate tool using the code snippet
12336    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12337$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12338if ${ac_cv_path_SED+:} false; then :
12339  $as_echo_n "(cached) " >&6
12340else
12341            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12342     for ac_i in 1 2 3 4 5 6 7; do
12343       ac_script="$ac_script$as_nl$ac_script"
12344     done
12345     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12346     { ac_script=; unset ac_script;}
12347     if test -z "$SED"; then
12348  ac_path_SED_found=false
12349  # Loop through the user's path and test for each of PROGNAME-LIST
12350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12351for as_dir in $PATH
12352do
12353  IFS=$as_save_IFS
12354  test -z "$as_dir" && as_dir=.
12355    for ac_prog in sed gsed; do
12356    for ac_exec_ext in '' $ac_executable_extensions; do
12357      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12358      as_fn_executable_p "$ac_path_SED" || continue
12359# Check for GNU ac_path_SED and select it if it is found.
12360  # Check for GNU $ac_path_SED
12361case `"$ac_path_SED" --version 2>&1` in
12362*GNU*)
12363  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12364*)
12365  ac_count=0
12366  $as_echo_n 0123456789 >"conftest.in"
12367  while :
12368  do
12369    cat "conftest.in" "conftest.in" >"conftest.tmp"
12370    mv "conftest.tmp" "conftest.in"
12371    cp "conftest.in" "conftest.nl"
12372    $as_echo '' >> "conftest.nl"
12373    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12374    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12375    as_fn_arith $ac_count + 1 && ac_count=$as_val
12376    if test $ac_count -gt ${ac_path_SED_max-0}; then
12377      # Best one so far, save it but keep looking for a better one
12378      ac_cv_path_SED="$ac_path_SED"
12379      ac_path_SED_max=$ac_count
12380    fi
12381    # 10*(2^10) chars as input seems more than enough
12382    test $ac_count -gt 10 && break
12383  done
12384  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12385esac
12386
12387      $ac_path_SED_found && break 3
12388    done
12389  done
12390  done
12391IFS=$as_save_IFS
12392  if test -z "$ac_cv_path_SED"; then
12393    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12394  fi
12395else
12396  ac_cv_path_SED=$SED
12397fi
12398
12399fi
12400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12401$as_echo "$ac_cv_path_SED" >&6; }
12402 SED="$ac_cv_path_SED"
12403  rm -f conftest.sed
12404
12405  else
12406    # The variable is set, but is it from the command line or the environment?
12407
12408    # Try to remove the string !SED! from our list.
12409    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12410    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12411      # If it failed, the variable was not from the command line. Ignore it,
12412      # but warn the user (except for BASH, which is always set by the calling BASH).
12413      if test "xSED" != xBASH; then
12414        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12415$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12416      fi
12417      # Try to locate tool using the code snippet
12418      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12419$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12420if ${ac_cv_path_SED+:} false; then :
12421  $as_echo_n "(cached) " >&6
12422else
12423            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12424     for ac_i in 1 2 3 4 5 6 7; do
12425       ac_script="$ac_script$as_nl$ac_script"
12426     done
12427     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12428     { ac_script=; unset ac_script;}
12429     if test -z "$SED"; then
12430  ac_path_SED_found=false
12431  # Loop through the user's path and test for each of PROGNAME-LIST
12432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12433for as_dir in $PATH
12434do
12435  IFS=$as_save_IFS
12436  test -z "$as_dir" && as_dir=.
12437    for ac_prog in sed gsed; do
12438    for ac_exec_ext in '' $ac_executable_extensions; do
12439      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12440      as_fn_executable_p "$ac_path_SED" || continue
12441# Check for GNU ac_path_SED and select it if it is found.
12442  # Check for GNU $ac_path_SED
12443case `"$ac_path_SED" --version 2>&1` in
12444*GNU*)
12445  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12446*)
12447  ac_count=0
12448  $as_echo_n 0123456789 >"conftest.in"
12449  while :
12450  do
12451    cat "conftest.in" "conftest.in" >"conftest.tmp"
12452    mv "conftest.tmp" "conftest.in"
12453    cp "conftest.in" "conftest.nl"
12454    $as_echo '' >> "conftest.nl"
12455    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12456    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12457    as_fn_arith $ac_count + 1 && ac_count=$as_val
12458    if test $ac_count -gt ${ac_path_SED_max-0}; then
12459      # Best one so far, save it but keep looking for a better one
12460      ac_cv_path_SED="$ac_path_SED"
12461      ac_path_SED_max=$ac_count
12462    fi
12463    # 10*(2^10) chars as input seems more than enough
12464    test $ac_count -gt 10 && break
12465  done
12466  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12467esac
12468
12469      $ac_path_SED_found && break 3
12470    done
12471  done
12472  done
12473IFS=$as_save_IFS
12474  if test -z "$ac_cv_path_SED"; then
12475    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12476  fi
12477else
12478  ac_cv_path_SED=$SED
12479fi
12480
12481fi
12482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12483$as_echo "$ac_cv_path_SED" >&6; }
12484 SED="$ac_cv_path_SED"
12485  rm -f conftest.sed
12486
12487    else
12488      # If it succeeded, then it was overridden by the user. We will use it
12489      # for the tool.
12490
12491      # First remove it from the list of overridden variables, so we can test
12492      # for unknown variables in the end.
12493      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12494
12495      # Check if the provided tool contains a complete path.
12496      tool_specified="$SED"
12497      tool_basename="${tool_specified##*/}"
12498      if test "x$tool_basename" = "x$tool_specified"; then
12499        # A command without a complete path is provided, search $PATH.
12500        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12501$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12502        # Extract the first word of "$tool_basename", so it can be a program name with args.
12503set dummy $tool_basename; ac_word=$2
12504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12505$as_echo_n "checking for $ac_word... " >&6; }
12506if ${ac_cv_path_SED+:} false; then :
12507  $as_echo_n "(cached) " >&6
12508else
12509  case $SED in
12510  [\\/]* | ?:[\\/]*)
12511  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12512  ;;
12513  *)
12514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12515for as_dir in $PATH
12516do
12517  IFS=$as_save_IFS
12518  test -z "$as_dir" && as_dir=.
12519    for ac_exec_ext in '' $ac_executable_extensions; do
12520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12521    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12523    break 2
12524  fi
12525done
12526  done
12527IFS=$as_save_IFS
12528
12529  ;;
12530esac
12531fi
12532SED=$ac_cv_path_SED
12533if test -n "$SED"; then
12534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12535$as_echo "$SED" >&6; }
12536else
12537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12538$as_echo "no" >&6; }
12539fi
12540
12541
12542        if test "x$SED" = x; then
12543          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12544        fi
12545      else
12546        # Otherwise we believe it is a complete path. Use it as it is.
12547        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12548$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12549        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12550$as_echo_n "checking for SED... " >&6; }
12551        if test ! -x "$tool_specified"; then
12552          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12553$as_echo "not found" >&6; }
12554          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12555        fi
12556        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12557$as_echo "$tool_specified" >&6; }
12558      fi
12559    fi
12560  fi
12561
12562
12563  if test "x$SED" = x; then
12564    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12565  fi
12566
12567
12568
12569  # Always force rm.
12570  RM="$RM -f"
12571
12572  # pwd behaves differently on various platforms and some don't support the -L flag.
12573  # Always use the bash builtin pwd to get uniform behavior.
12574  THEPWDCMD=pwd
12575
12576  # These are not required on all platforms
12577
12578
12579  # Publish this variable in the help.
12580
12581
12582  if test "x$CYGPATH" = x; then
12583    # The variable is not set by user, try to locate tool using the code snippet
12584    for ac_prog in cygpath
12585do
12586  # Extract the first word of "$ac_prog", so it can be a program name with args.
12587set dummy $ac_prog; ac_word=$2
12588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12589$as_echo_n "checking for $ac_word... " >&6; }
12590if ${ac_cv_path_CYGPATH+:} false; then :
12591  $as_echo_n "(cached) " >&6
12592else
12593  case $CYGPATH in
12594  [\\/]* | ?:[\\/]*)
12595  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12596  ;;
12597  *)
12598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12599for as_dir in $PATH
12600do
12601  IFS=$as_save_IFS
12602  test -z "$as_dir" && as_dir=.
12603    for ac_exec_ext in '' $ac_executable_extensions; do
12604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12605    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12607    break 2
12608  fi
12609done
12610  done
12611IFS=$as_save_IFS
12612
12613  ;;
12614esac
12615fi
12616CYGPATH=$ac_cv_path_CYGPATH
12617if test -n "$CYGPATH"; then
12618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12619$as_echo "$CYGPATH" >&6; }
12620else
12621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12622$as_echo "no" >&6; }
12623fi
12624
12625
12626  test -n "$CYGPATH" && break
12627done
12628
12629  else
12630    # The variable is set, but is it from the command line or the environment?
12631
12632    # Try to remove the string !CYGPATH! from our list.
12633    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12634    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12635      # If it failed, the variable was not from the command line. Ignore it,
12636      # but warn the user (except for BASH, which is always set by the calling BASH).
12637      if test "xCYGPATH" != xBASH; then
12638        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12639$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12640      fi
12641      # Try to locate tool using the code snippet
12642      for ac_prog in cygpath
12643do
12644  # Extract the first word of "$ac_prog", so it can be a program name with args.
12645set dummy $ac_prog; ac_word=$2
12646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12647$as_echo_n "checking for $ac_word... " >&6; }
12648if ${ac_cv_path_CYGPATH+:} false; then :
12649  $as_echo_n "(cached) " >&6
12650else
12651  case $CYGPATH in
12652  [\\/]* | ?:[\\/]*)
12653  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12654  ;;
12655  *)
12656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12657for as_dir in $PATH
12658do
12659  IFS=$as_save_IFS
12660  test -z "$as_dir" && as_dir=.
12661    for ac_exec_ext in '' $ac_executable_extensions; do
12662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12663    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12665    break 2
12666  fi
12667done
12668  done
12669IFS=$as_save_IFS
12670
12671  ;;
12672esac
12673fi
12674CYGPATH=$ac_cv_path_CYGPATH
12675if test -n "$CYGPATH"; then
12676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12677$as_echo "$CYGPATH" >&6; }
12678else
12679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12680$as_echo "no" >&6; }
12681fi
12682
12683
12684  test -n "$CYGPATH" && break
12685done
12686
12687    else
12688      # If it succeeded, then it was overridden by the user. We will use it
12689      # for the tool.
12690
12691      # First remove it from the list of overridden variables, so we can test
12692      # for unknown variables in the end.
12693      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12694
12695      # Check if the provided tool contains a complete path.
12696      tool_specified="$CYGPATH"
12697      tool_basename="${tool_specified##*/}"
12698      if test "x$tool_basename" = "x$tool_specified"; then
12699        # A command without a complete path is provided, search $PATH.
12700        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12701$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12702        # Extract the first word of "$tool_basename", so it can be a program name with args.
12703set dummy $tool_basename; ac_word=$2
12704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12705$as_echo_n "checking for $ac_word... " >&6; }
12706if ${ac_cv_path_CYGPATH+:} false; then :
12707  $as_echo_n "(cached) " >&6
12708else
12709  case $CYGPATH in
12710  [\\/]* | ?:[\\/]*)
12711  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12712  ;;
12713  *)
12714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12715for as_dir in $PATH
12716do
12717  IFS=$as_save_IFS
12718  test -z "$as_dir" && as_dir=.
12719    for ac_exec_ext in '' $ac_executable_extensions; do
12720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12721    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12723    break 2
12724  fi
12725done
12726  done
12727IFS=$as_save_IFS
12728
12729  ;;
12730esac
12731fi
12732CYGPATH=$ac_cv_path_CYGPATH
12733if test -n "$CYGPATH"; then
12734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12735$as_echo "$CYGPATH" >&6; }
12736else
12737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12738$as_echo "no" >&6; }
12739fi
12740
12741
12742        if test "x$CYGPATH" = x; then
12743          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12744        fi
12745      else
12746        # Otherwise we believe it is a complete path. Use it as it is.
12747        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12748$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12749        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12750$as_echo_n "checking for CYGPATH... " >&6; }
12751        if test ! -x "$tool_specified"; then
12752          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12753$as_echo "not found" >&6; }
12754          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12755        fi
12756        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12757$as_echo "$tool_specified" >&6; }
12758      fi
12759    fi
12760  fi
12761
12762
12763
12764
12765  # Publish this variable in the help.
12766
12767
12768  if test "x$READLINK" = x; then
12769    # The variable is not set by user, try to locate tool using the code snippet
12770    for ac_prog in greadlink readlink
12771do
12772  # Extract the first word of "$ac_prog", so it can be a program name with args.
12773set dummy $ac_prog; ac_word=$2
12774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12775$as_echo_n "checking for $ac_word... " >&6; }
12776if ${ac_cv_path_READLINK+:} false; then :
12777  $as_echo_n "(cached) " >&6
12778else
12779  case $READLINK in
12780  [\\/]* | ?:[\\/]*)
12781  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12782  ;;
12783  *)
12784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12785for as_dir in $PATH
12786do
12787  IFS=$as_save_IFS
12788  test -z "$as_dir" && as_dir=.
12789    for ac_exec_ext in '' $ac_executable_extensions; do
12790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12791    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12793    break 2
12794  fi
12795done
12796  done
12797IFS=$as_save_IFS
12798
12799  ;;
12800esac
12801fi
12802READLINK=$ac_cv_path_READLINK
12803if test -n "$READLINK"; then
12804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12805$as_echo "$READLINK" >&6; }
12806else
12807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12808$as_echo "no" >&6; }
12809fi
12810
12811
12812  test -n "$READLINK" && break
12813done
12814
12815  else
12816    # The variable is set, but is it from the command line or the environment?
12817
12818    # Try to remove the string !READLINK! from our list.
12819    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12820    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12821      # If it failed, the variable was not from the command line. Ignore it,
12822      # but warn the user (except for BASH, which is always set by the calling BASH).
12823      if test "xREADLINK" != xBASH; then
12824        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12825$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12826      fi
12827      # Try to locate tool using the code snippet
12828      for ac_prog in greadlink readlink
12829do
12830  # Extract the first word of "$ac_prog", so it can be a program name with args.
12831set dummy $ac_prog; ac_word=$2
12832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12833$as_echo_n "checking for $ac_word... " >&6; }
12834if ${ac_cv_path_READLINK+:} false; then :
12835  $as_echo_n "(cached) " >&6
12836else
12837  case $READLINK in
12838  [\\/]* | ?:[\\/]*)
12839  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12840  ;;
12841  *)
12842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12843for as_dir in $PATH
12844do
12845  IFS=$as_save_IFS
12846  test -z "$as_dir" && as_dir=.
12847    for ac_exec_ext in '' $ac_executable_extensions; do
12848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12849    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12851    break 2
12852  fi
12853done
12854  done
12855IFS=$as_save_IFS
12856
12857  ;;
12858esac
12859fi
12860READLINK=$ac_cv_path_READLINK
12861if test -n "$READLINK"; then
12862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12863$as_echo "$READLINK" >&6; }
12864else
12865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12866$as_echo "no" >&6; }
12867fi
12868
12869
12870  test -n "$READLINK" && break
12871done
12872
12873    else
12874      # If it succeeded, then it was overridden by the user. We will use it
12875      # for the tool.
12876
12877      # First remove it from the list of overridden variables, so we can test
12878      # for unknown variables in the end.
12879      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12880
12881      # Check if the provided tool contains a complete path.
12882      tool_specified="$READLINK"
12883      tool_basename="${tool_specified##*/}"
12884      if test "x$tool_basename" = "x$tool_specified"; then
12885        # A command without a complete path is provided, search $PATH.
12886        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12887$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12888        # Extract the first word of "$tool_basename", so it can be a program name with args.
12889set dummy $tool_basename; ac_word=$2
12890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12891$as_echo_n "checking for $ac_word... " >&6; }
12892if ${ac_cv_path_READLINK+:} false; then :
12893  $as_echo_n "(cached) " >&6
12894else
12895  case $READLINK in
12896  [\\/]* | ?:[\\/]*)
12897  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12898  ;;
12899  *)
12900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12901for as_dir in $PATH
12902do
12903  IFS=$as_save_IFS
12904  test -z "$as_dir" && as_dir=.
12905    for ac_exec_ext in '' $ac_executable_extensions; do
12906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12907    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12909    break 2
12910  fi
12911done
12912  done
12913IFS=$as_save_IFS
12914
12915  ;;
12916esac
12917fi
12918READLINK=$ac_cv_path_READLINK
12919if test -n "$READLINK"; then
12920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12921$as_echo "$READLINK" >&6; }
12922else
12923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12924$as_echo "no" >&6; }
12925fi
12926
12927
12928        if test "x$READLINK" = x; then
12929          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12930        fi
12931      else
12932        # Otherwise we believe it is a complete path. Use it as it is.
12933        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12934$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12935        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12936$as_echo_n "checking for READLINK... " >&6; }
12937        if test ! -x "$tool_specified"; then
12938          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12939$as_echo "not found" >&6; }
12940          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12941        fi
12942        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12943$as_echo "$tool_specified" >&6; }
12944      fi
12945    fi
12946  fi
12947
12948
12949
12950
12951  # Publish this variable in the help.
12952
12953
12954  if test "x$DF" = x; then
12955    # The variable is not set by user, try to locate tool using the code snippet
12956    for ac_prog in df
12957do
12958  # Extract the first word of "$ac_prog", so it can be a program name with args.
12959set dummy $ac_prog; ac_word=$2
12960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12961$as_echo_n "checking for $ac_word... " >&6; }
12962if ${ac_cv_path_DF+:} false; then :
12963  $as_echo_n "(cached) " >&6
12964else
12965  case $DF in
12966  [\\/]* | ?:[\\/]*)
12967  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12968  ;;
12969  *)
12970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12971for as_dir in $PATH
12972do
12973  IFS=$as_save_IFS
12974  test -z "$as_dir" && as_dir=.
12975    for ac_exec_ext in '' $ac_executable_extensions; do
12976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12977    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12979    break 2
12980  fi
12981done
12982  done
12983IFS=$as_save_IFS
12984
12985  ;;
12986esac
12987fi
12988DF=$ac_cv_path_DF
12989if test -n "$DF"; then
12990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12991$as_echo "$DF" >&6; }
12992else
12993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12994$as_echo "no" >&6; }
12995fi
12996
12997
12998  test -n "$DF" && break
12999done
13000
13001  else
13002    # The variable is set, but is it from the command line or the environment?
13003
13004    # Try to remove the string !DF! from our list.
13005    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13006    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13007      # If it failed, the variable was not from the command line. Ignore it,
13008      # but warn the user (except for BASH, which is always set by the calling BASH).
13009      if test "xDF" != xBASH; then
13010        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13011$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13012      fi
13013      # Try to locate tool using the code snippet
13014      for ac_prog in df
13015do
13016  # Extract the first word of "$ac_prog", so it can be a program name with args.
13017set dummy $ac_prog; ac_word=$2
13018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13019$as_echo_n "checking for $ac_word... " >&6; }
13020if ${ac_cv_path_DF+:} false; then :
13021  $as_echo_n "(cached) " >&6
13022else
13023  case $DF in
13024  [\\/]* | ?:[\\/]*)
13025  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13026  ;;
13027  *)
13028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13029for as_dir in $PATH
13030do
13031  IFS=$as_save_IFS
13032  test -z "$as_dir" && as_dir=.
13033    for ac_exec_ext in '' $ac_executable_extensions; do
13034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13035    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13037    break 2
13038  fi
13039done
13040  done
13041IFS=$as_save_IFS
13042
13043  ;;
13044esac
13045fi
13046DF=$ac_cv_path_DF
13047if test -n "$DF"; then
13048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13049$as_echo "$DF" >&6; }
13050else
13051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13052$as_echo "no" >&6; }
13053fi
13054
13055
13056  test -n "$DF" && break
13057done
13058
13059    else
13060      # If it succeeded, then it was overridden by the user. We will use it
13061      # for the tool.
13062
13063      # First remove it from the list of overridden variables, so we can test
13064      # for unknown variables in the end.
13065      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13066
13067      # Check if the provided tool contains a complete path.
13068      tool_specified="$DF"
13069      tool_basename="${tool_specified##*/}"
13070      if test "x$tool_basename" = "x$tool_specified"; then
13071        # A command without a complete path is provided, search $PATH.
13072        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13073$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13074        # Extract the first word of "$tool_basename", so it can be a program name with args.
13075set dummy $tool_basename; ac_word=$2
13076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13077$as_echo_n "checking for $ac_word... " >&6; }
13078if ${ac_cv_path_DF+:} false; then :
13079  $as_echo_n "(cached) " >&6
13080else
13081  case $DF in
13082  [\\/]* | ?:[\\/]*)
13083  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13084  ;;
13085  *)
13086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13087for as_dir in $PATH
13088do
13089  IFS=$as_save_IFS
13090  test -z "$as_dir" && as_dir=.
13091    for ac_exec_ext in '' $ac_executable_extensions; do
13092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13093    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13095    break 2
13096  fi
13097done
13098  done
13099IFS=$as_save_IFS
13100
13101  ;;
13102esac
13103fi
13104DF=$ac_cv_path_DF
13105if test -n "$DF"; then
13106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13107$as_echo "$DF" >&6; }
13108else
13109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13110$as_echo "no" >&6; }
13111fi
13112
13113
13114        if test "x$DF" = x; then
13115          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13116        fi
13117      else
13118        # Otherwise we believe it is a complete path. Use it as it is.
13119        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13120$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13121        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13122$as_echo_n "checking for DF... " >&6; }
13123        if test ! -x "$tool_specified"; then
13124          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13125$as_echo "not found" >&6; }
13126          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13127        fi
13128        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13129$as_echo "$tool_specified" >&6; }
13130      fi
13131    fi
13132  fi
13133
13134
13135
13136
13137  # Publish this variable in the help.
13138
13139
13140  if test "x$SETFILE" = x; then
13141    # The variable is not set by user, try to locate tool using the code snippet
13142    for ac_prog in SetFile
13143do
13144  # Extract the first word of "$ac_prog", so it can be a program name with args.
13145set dummy $ac_prog; ac_word=$2
13146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13147$as_echo_n "checking for $ac_word... " >&6; }
13148if ${ac_cv_path_SETFILE+:} false; then :
13149  $as_echo_n "(cached) " >&6
13150else
13151  case $SETFILE in
13152  [\\/]* | ?:[\\/]*)
13153  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13154  ;;
13155  *)
13156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13157for as_dir in $PATH
13158do
13159  IFS=$as_save_IFS
13160  test -z "$as_dir" && as_dir=.
13161    for ac_exec_ext in '' $ac_executable_extensions; do
13162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13163    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13165    break 2
13166  fi
13167done
13168  done
13169IFS=$as_save_IFS
13170
13171  ;;
13172esac
13173fi
13174SETFILE=$ac_cv_path_SETFILE
13175if test -n "$SETFILE"; then
13176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13177$as_echo "$SETFILE" >&6; }
13178else
13179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13180$as_echo "no" >&6; }
13181fi
13182
13183
13184  test -n "$SETFILE" && break
13185done
13186
13187  else
13188    # The variable is set, but is it from the command line or the environment?
13189
13190    # Try to remove the string !SETFILE! from our list.
13191    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13192    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13193      # If it failed, the variable was not from the command line. Ignore it,
13194      # but warn the user (except for BASH, which is always set by the calling BASH).
13195      if test "xSETFILE" != xBASH; then
13196        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13197$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13198      fi
13199      # Try to locate tool using the code snippet
13200      for ac_prog in SetFile
13201do
13202  # Extract the first word of "$ac_prog", so it can be a program name with args.
13203set dummy $ac_prog; ac_word=$2
13204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13205$as_echo_n "checking for $ac_word... " >&6; }
13206if ${ac_cv_path_SETFILE+:} false; then :
13207  $as_echo_n "(cached) " >&6
13208else
13209  case $SETFILE in
13210  [\\/]* | ?:[\\/]*)
13211  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13212  ;;
13213  *)
13214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13215for as_dir in $PATH
13216do
13217  IFS=$as_save_IFS
13218  test -z "$as_dir" && as_dir=.
13219    for ac_exec_ext in '' $ac_executable_extensions; do
13220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13221    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13223    break 2
13224  fi
13225done
13226  done
13227IFS=$as_save_IFS
13228
13229  ;;
13230esac
13231fi
13232SETFILE=$ac_cv_path_SETFILE
13233if test -n "$SETFILE"; then
13234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13235$as_echo "$SETFILE" >&6; }
13236else
13237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13238$as_echo "no" >&6; }
13239fi
13240
13241
13242  test -n "$SETFILE" && break
13243done
13244
13245    else
13246      # If it succeeded, then it was overridden by the user. We will use it
13247      # for the tool.
13248
13249      # First remove it from the list of overridden variables, so we can test
13250      # for unknown variables in the end.
13251      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13252
13253      # Check if the provided tool contains a complete path.
13254      tool_specified="$SETFILE"
13255      tool_basename="${tool_specified##*/}"
13256      if test "x$tool_basename" = "x$tool_specified"; then
13257        # A command without a complete path is provided, search $PATH.
13258        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13259$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13260        # Extract the first word of "$tool_basename", so it can be a program name with args.
13261set dummy $tool_basename; ac_word=$2
13262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13263$as_echo_n "checking for $ac_word... " >&6; }
13264if ${ac_cv_path_SETFILE+:} false; then :
13265  $as_echo_n "(cached) " >&6
13266else
13267  case $SETFILE in
13268  [\\/]* | ?:[\\/]*)
13269  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13270  ;;
13271  *)
13272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13273for as_dir in $PATH
13274do
13275  IFS=$as_save_IFS
13276  test -z "$as_dir" && as_dir=.
13277    for ac_exec_ext in '' $ac_executable_extensions; do
13278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13279    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13281    break 2
13282  fi
13283done
13284  done
13285IFS=$as_save_IFS
13286
13287  ;;
13288esac
13289fi
13290SETFILE=$ac_cv_path_SETFILE
13291if test -n "$SETFILE"; then
13292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13293$as_echo "$SETFILE" >&6; }
13294else
13295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13296$as_echo "no" >&6; }
13297fi
13298
13299
13300        if test "x$SETFILE" = x; then
13301          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13302        fi
13303      else
13304        # Otherwise we believe it is a complete path. Use it as it is.
13305        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13306$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13307        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13308$as_echo_n "checking for SETFILE... " >&6; }
13309        if test ! -x "$tool_specified"; then
13310          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13311$as_echo "not found" >&6; }
13312          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13313        fi
13314        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13315$as_echo "$tool_specified" >&6; }
13316      fi
13317    fi
13318  fi
13319
13320
13321
13322
13323# Now we can determine OpenJDK build and target platforms. This is required to
13324# have early on.
13325# Make sure we can run config.sub.
13326$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13327  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13328
13329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13330$as_echo_n "checking build system type... " >&6; }
13331if ${ac_cv_build+:} false; then :
13332  $as_echo_n "(cached) " >&6
13333else
13334  ac_build_alias=$build_alias
13335test "x$ac_build_alias" = x &&
13336  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13337test "x$ac_build_alias" = x &&
13338  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13339ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13340  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13341
13342fi
13343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13344$as_echo "$ac_cv_build" >&6; }
13345case $ac_cv_build in
13346*-*-*) ;;
13347*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13348esac
13349build=$ac_cv_build
13350ac_save_IFS=$IFS; IFS='-'
13351set x $ac_cv_build
13352shift
13353build_cpu=$1
13354build_vendor=$2
13355shift; shift
13356# Remember, the first character of IFS is used to create $*,
13357# except with old shells:
13358build_os=$*
13359IFS=$ac_save_IFS
13360case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13361
13362
13363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13364$as_echo_n "checking host system type... " >&6; }
13365if ${ac_cv_host+:} false; then :
13366  $as_echo_n "(cached) " >&6
13367else
13368  if test "x$host_alias" = x; then
13369  ac_cv_host=$ac_cv_build
13370else
13371  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13372    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13373fi
13374
13375fi
13376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13377$as_echo "$ac_cv_host" >&6; }
13378case $ac_cv_host in
13379*-*-*) ;;
13380*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13381esac
13382host=$ac_cv_host
13383ac_save_IFS=$IFS; IFS='-'
13384set x $ac_cv_host
13385shift
13386host_cpu=$1
13387host_vendor=$2
13388shift; shift
13389# Remember, the first character of IFS is used to create $*,
13390# except with old shells:
13391host_os=$*
13392IFS=$ac_save_IFS
13393case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13394
13395
13396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13397$as_echo_n "checking target system type... " >&6; }
13398if ${ac_cv_target+:} false; then :
13399  $as_echo_n "(cached) " >&6
13400else
13401  if test "x$target_alias" = x; then
13402  ac_cv_target=$ac_cv_host
13403else
13404  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13405    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13406fi
13407
13408fi
13409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13410$as_echo "$ac_cv_target" >&6; }
13411case $ac_cv_target in
13412*-*-*) ;;
13413*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13414esac
13415target=$ac_cv_target
13416ac_save_IFS=$IFS; IFS='-'
13417set x $ac_cv_target
13418shift
13419target_cpu=$1
13420target_vendor=$2
13421shift; shift
13422# Remember, the first character of IFS is used to create $*,
13423# except with old shells:
13424target_os=$*
13425IFS=$ac_save_IFS
13426case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13427
13428
13429# The aliases save the names the user supplied, while $host etc.
13430# will get canonicalized.
13431test -n "$target_alias" &&
13432  test "$program_prefix$program_suffix$program_transform_name" = \
13433    NONENONEs,x,x, &&
13434  program_prefix=${target_alias}-
13435
13436  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13437  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13438  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13439  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13440  # to use the configure naming style.
13441
13442
13443
13444
13445
13446  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13447  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13448  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13449  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13450  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13451  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13452
13453
13454
13455  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13456
13457  case "$build_os" in
13458    *linux*)
13459      VAR_OS=linux
13460      VAR_OS_API=posix
13461      VAR_OS_ENV=linux
13462      ;;
13463    *solaris*)
13464      VAR_OS=solaris
13465      VAR_OS_API=posix
13466      VAR_OS_ENV=solaris
13467      ;;
13468    *darwin*)
13469      VAR_OS=macosx
13470      VAR_OS_API=posix
13471      VAR_OS_ENV=macosx
13472      ;;
13473    *bsd*)
13474      VAR_OS=bsd
13475      VAR_OS_API=posix
13476      VAR_OS_ENV=bsd
13477      ;;
13478    *cygwin*)
13479      VAR_OS=windows
13480      VAR_OS_API=winapi
13481      VAR_OS_ENV=windows.cygwin
13482      ;;
13483    *mingw*)
13484      VAR_OS=windows
13485      VAR_OS_API=winapi
13486      VAR_OS_ENV=windows.msys
13487      ;;
13488    *aix*)
13489      VAR_OS=aix
13490      VAR_OS_API=posix
13491      VAR_OS_ENV=aix
13492      ;;
13493    *)
13494      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13495      ;;
13496  esac
13497
13498
13499  # First argument is the cpu name from the trip/quad
13500  case "$build_cpu" in
13501    x86_64)
13502      VAR_CPU=x86_64
13503      VAR_CPU_ARCH=x86
13504      VAR_CPU_BITS=64
13505      VAR_CPU_ENDIAN=little
13506      ;;
13507    i?86)
13508      VAR_CPU=x86
13509      VAR_CPU_ARCH=x86
13510      VAR_CPU_BITS=32
13511      VAR_CPU_ENDIAN=little
13512      ;;
13513    arm*)
13514      VAR_CPU=arm
13515      VAR_CPU_ARCH=arm
13516      VAR_CPU_BITS=32
13517      VAR_CPU_ENDIAN=little
13518      ;;
13519    powerpc)
13520      VAR_CPU=ppc
13521      VAR_CPU_ARCH=ppc
13522      VAR_CPU_BITS=32
13523      VAR_CPU_ENDIAN=big
13524      ;;
13525    powerpc64)
13526      VAR_CPU=ppc64
13527      VAR_CPU_ARCH=ppc
13528      VAR_CPU_BITS=64
13529      VAR_CPU_ENDIAN=big
13530      ;;
13531    powerpc64le)
13532      VAR_CPU=ppc64
13533      VAR_CPU_ARCH=ppc
13534      VAR_CPU_BITS=64
13535      VAR_CPU_ENDIAN=little
13536      ;;
13537    s390)
13538      VAR_CPU=s390
13539      VAR_CPU_ARCH=s390
13540      VAR_CPU_BITS=32
13541      VAR_CPU_ENDIAN=big
13542      ;;
13543    s390x)
13544      VAR_CPU=s390x
13545      VAR_CPU_ARCH=s390
13546      VAR_CPU_BITS=64
13547      VAR_CPU_ENDIAN=big
13548      ;;
13549    sparc)
13550      VAR_CPU=sparc
13551      VAR_CPU_ARCH=sparc
13552      VAR_CPU_BITS=32
13553      VAR_CPU_ENDIAN=big
13554      ;;
13555    sparcv9)
13556      VAR_CPU=sparcv9
13557      VAR_CPU_ARCH=sparc
13558      VAR_CPU_BITS=64
13559      VAR_CPU_ENDIAN=big
13560      ;;
13561    *)
13562      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13563      ;;
13564  esac
13565
13566  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13567  OPENJDK_BUILD_OS="$VAR_OS"
13568  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13569  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13570  OPENJDK_BUILD_CPU="$VAR_CPU"
13571  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13572  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13573  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13574
13575
13576
13577
13578
13579
13580
13581  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13582$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13584$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13585
13586  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13587
13588  case "$host_os" in
13589    *linux*)
13590      VAR_OS=linux
13591      VAR_OS_API=posix
13592      VAR_OS_ENV=linux
13593      ;;
13594    *solaris*)
13595      VAR_OS=solaris
13596      VAR_OS_API=posix
13597      VAR_OS_ENV=solaris
13598      ;;
13599    *darwin*)
13600      VAR_OS=macosx
13601      VAR_OS_API=posix
13602      VAR_OS_ENV=macosx
13603      ;;
13604    *bsd*)
13605      VAR_OS=bsd
13606      VAR_OS_API=posix
13607      VAR_OS_ENV=bsd
13608      ;;
13609    *cygwin*)
13610      VAR_OS=windows
13611      VAR_OS_API=winapi
13612      VAR_OS_ENV=windows.cygwin
13613      ;;
13614    *mingw*)
13615      VAR_OS=windows
13616      VAR_OS_API=winapi
13617      VAR_OS_ENV=windows.msys
13618      ;;
13619    *aix*)
13620      VAR_OS=aix
13621      VAR_OS_API=posix
13622      VAR_OS_ENV=aix
13623      ;;
13624    *)
13625      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13626      ;;
13627  esac
13628
13629
13630  # First argument is the cpu name from the trip/quad
13631  case "$host_cpu" in
13632    x86_64)
13633      VAR_CPU=x86_64
13634      VAR_CPU_ARCH=x86
13635      VAR_CPU_BITS=64
13636      VAR_CPU_ENDIAN=little
13637      ;;
13638    i?86)
13639      VAR_CPU=x86
13640      VAR_CPU_ARCH=x86
13641      VAR_CPU_BITS=32
13642      VAR_CPU_ENDIAN=little
13643      ;;
13644    arm*)
13645      VAR_CPU=arm
13646      VAR_CPU_ARCH=arm
13647      VAR_CPU_BITS=32
13648      VAR_CPU_ENDIAN=little
13649      ;;
13650    powerpc)
13651      VAR_CPU=ppc
13652      VAR_CPU_ARCH=ppc
13653      VAR_CPU_BITS=32
13654      VAR_CPU_ENDIAN=big
13655      ;;
13656    powerpc64)
13657      VAR_CPU=ppc64
13658      VAR_CPU_ARCH=ppc
13659      VAR_CPU_BITS=64
13660      VAR_CPU_ENDIAN=big
13661      ;;
13662    powerpc64le)
13663      VAR_CPU=ppc64
13664      VAR_CPU_ARCH=ppc
13665      VAR_CPU_BITS=64
13666      VAR_CPU_ENDIAN=little
13667      ;;
13668    s390)
13669      VAR_CPU=s390
13670      VAR_CPU_ARCH=s390
13671      VAR_CPU_BITS=32
13672      VAR_CPU_ENDIAN=big
13673      ;;
13674    s390x)
13675      VAR_CPU=s390x
13676      VAR_CPU_ARCH=s390
13677      VAR_CPU_BITS=64
13678      VAR_CPU_ENDIAN=big
13679      ;;
13680    sparc)
13681      VAR_CPU=sparc
13682      VAR_CPU_ARCH=sparc
13683      VAR_CPU_BITS=32
13684      VAR_CPU_ENDIAN=big
13685      ;;
13686    sparcv9)
13687      VAR_CPU=sparcv9
13688      VAR_CPU_ARCH=sparc
13689      VAR_CPU_BITS=64
13690      VAR_CPU_ENDIAN=big
13691      ;;
13692    *)
13693      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13694      ;;
13695  esac
13696
13697  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13698  OPENJDK_TARGET_OS="$VAR_OS"
13699  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13700  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13701  OPENJDK_TARGET_CPU="$VAR_CPU"
13702  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13703  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13704  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13705
13706
13707
13708
13709
13710
13711
13712  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13713$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13715$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13716
13717
13718
13719# Check whether --with-target-bits was given.
13720if test "${with_target_bits+set}" = set; then :
13721  withval=$with_target_bits;
13722fi
13723
13724
13725  # We have three types of compiles:
13726  # native  == normal compilation, target system == build system
13727  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13728  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13729  #
13730  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13731    # We're doing a proper cross-compilation
13732    COMPILE_TYPE="cross"
13733  else
13734    COMPILE_TYPE="native"
13735  fi
13736
13737  if test "x$with_target_bits" != x; then
13738    if test "x$COMPILE_TYPE" = "xcross"; then
13739      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13740    fi
13741
13742    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13743      # A reduced build is requested
13744      COMPILE_TYPE="reduced"
13745      OPENJDK_TARGET_CPU_BITS=32
13746      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13747        OPENJDK_TARGET_CPU=x86
13748      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13749        OPENJDK_TARGET_CPU=sparc
13750      else
13751        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13752      fi
13753    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13754      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
13755    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13756      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13757$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13758    else
13759      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13760    fi
13761  fi
13762
13763
13764  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13765$as_echo_n "checking compilation type... " >&6; }
13766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13767$as_echo "$COMPILE_TYPE" >&6; }
13768
13769
13770  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13771    REQUIRED_OS_NAME=SunOS
13772    REQUIRED_OS_VERSION=5.10
13773  fi
13774  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13775    REQUIRED_OS_NAME=Linux
13776    REQUIRED_OS_VERSION=2.6
13777  fi
13778  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13779    REQUIRED_OS_NAME=Windows
13780    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13781      REQUIRED_OS_VERSION=5.2
13782    else
13783      REQUIRED_OS_VERSION=5.1
13784    fi
13785  fi
13786  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13787    REQUIRED_OS_NAME=Darwin
13788    REQUIRED_OS_VERSION=11.2
13789  fi
13790
13791
13792
13793
13794
13795  # Also store the legacy naming of the cpu.
13796  # Ie i586 and amd64 instead of x86 and x86_64
13797  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13798  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13799    OPENJDK_TARGET_CPU_LEGACY="i586"
13800  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13801    # On all platforms except MacOSX replace x86_64 with amd64.
13802    OPENJDK_TARGET_CPU_LEGACY="amd64"
13803  fi
13804
13805
13806  # And the second legacy naming of the cpu.
13807  # Ie i386 and amd64 instead of x86 and x86_64.
13808  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13809  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13810    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13811  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13812    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13813  fi
13814
13815
13816  # This is the name of the cpu (but using i386 and amd64 instead of
13817  # x86 and x86_64, respectively), preceeded by a /, to be used when
13818  # locating libraries. On macosx, it's empty, though.
13819  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13820  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13821    OPENJDK_TARGET_CPU_LIBDIR=""
13822  fi
13823
13824
13825  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13826  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13827  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13828  OPENJDK_TARGET_CPU_ISADIR=""
13829  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13830    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13831      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13832    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13833      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13834    fi
13835  fi
13836
13837
13838  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13839  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13840  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13841    # On linux only, we replace x86 with i386.
13842    OPENJDK_TARGET_CPU_OSARCH="i386"
13843  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13844    # On all platforms except macosx, we replace x86_64 with amd64.
13845    OPENJDK_TARGET_CPU_OSARCH="amd64"
13846  fi
13847
13848
13849  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13850  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13851    OPENJDK_TARGET_CPU_JLI="i386"
13852  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13853    # On all platforms except macosx, we replace x86_64 with amd64.
13854    OPENJDK_TARGET_CPU_JLI="amd64"
13855  fi
13856  # Now setup the -D flags for building libjli.
13857  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13858  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13859    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13860      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13861    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13862      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13863    fi
13864  fi
13865
13866
13867  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13868  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13869    OPENJDK_TARGET_OS_API_DIR="solaris"
13870  fi
13871  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13872    OPENJDK_TARGET_OS_API_DIR="windows"
13873  fi
13874
13875
13876  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13877      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13878  else
13879      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13880  fi
13881
13882
13883  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13884    A_LP64="LP64:="
13885    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13886    # unpack200.exe
13887    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13888      ADD_LP64="-D_LP64=1"
13889    fi
13890  fi
13891  LP64=$A_LP64
13892
13893
13894  if test "x$COMPILE_TYPE" = "xcross"; then
13895    # FIXME: ... or should this include reduced builds..?
13896    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13897  else
13898    DEFINE_CROSS_COMPILE_ARCH=""
13899  fi
13900
13901
13902  # ZERO_ARCHDEF is used to enable architecture-specific code
13903  case "${OPENJDK_TARGET_CPU}" in
13904    ppc*)    ZERO_ARCHDEF=PPC   ;;
13905    s390*)   ZERO_ARCHDEF=S390  ;;
13906    sparc*)  ZERO_ARCHDEF=SPARC ;;
13907    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13908    x86)     ZERO_ARCHDEF=IA32  ;;
13909    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13910  esac
13911
13912
13913
13914
13915# Continue setting up basic stuff. Most remaining code require fundamental tools.
13916
13917  # Save the current directory this script was started from
13918  CURDIR="$PWD"
13919
13920  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13921    PATH_SEP=";"
13922
13923  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13924  if test $SRC_ROOT_LENGTH -gt 100; then
13925    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13926  fi
13927
13928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13929    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13930$as_echo_n "checking cygwin release... " >&6; }
13931    CYGWIN_VERSION=`$UNAME -r`
13932    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13933$as_echo "$CYGWIN_VERSION" >&6; }
13934    WINDOWS_ENV_VENDOR='cygwin'
13935    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13936
13937    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
13938    if test "x$CYGWIN_VERSION_OK" = x; then
13939      { $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
13940$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;}
13941      as_fn_error $? "Cannot continue" "$LINENO" 5
13942    fi
13943    if test "x$CYGPATH" = x; then
13944      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13945    fi
13946    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13947$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13948    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13949    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13950    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13951    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13952    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13953$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13954    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13955    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13956    if test "x$test_cygdrive_prefix" = x; then
13957      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13958    fi
13959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13960    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13961$as_echo_n "checking msys release... " >&6; }
13962    MSYS_VERSION=`$UNAME -r`
13963    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13964$as_echo "$MSYS_VERSION" >&6; }
13965
13966    WINDOWS_ENV_VENDOR='msys'
13967    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13968
13969    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13970$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13971    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13972    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13973
13974  windows_path="$MSYS_ROOT_PATH"
13975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13976    unix_path=`$CYGPATH -u "$windows_path"`
13977    MSYS_ROOT_PATH="$unix_path"
13978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13980    MSYS_ROOT_PATH="$unix_path"
13981  fi
13982
13983    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13984$as_echo "$MSYS_ROOT_PATH" >&6; }
13985    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13986  else
13987    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13988  fi
13989
13990  # Test if windows or unix (cygwin/msys) find is first in path.
13991  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13992$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13993  FIND_BINARY_OUTPUT=`find --version 2>&1`
13994  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13995    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13996$as_echo "unix style" >&6; }
13997  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13998    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13999$as_echo "Windows" >&6; }
14000    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14001$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14002    { $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
14003$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14004    as_fn_error $? "Cannot continue" "$LINENO" 5
14005  else
14006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14007$as_echo "unknown" >&6; }
14008    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14009$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14010  fi
14011
14012  else
14013    PATH_SEP=":"
14014  fi
14015
14016
14017  # We get the top-level directory from the supporting wrappers.
14018  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14019$as_echo_n "checking for top-level directory... " >&6; }
14020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14021$as_echo "$TOPDIR" >&6; }
14022
14023
14024  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14025
14026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14027
14028  # Input might be given as Windows format, start by converting to
14029  # unix format.
14030  path="$CURDIR"
14031  new_path=`$CYGPATH -u "$path"`
14032
14033  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14034  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14035  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14036  # "foo.exe" is OK but "foo" is an error.
14037  #
14038  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14039  # It is also a way to make sure we got the proper file name for the real test later on.
14040  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14041  if test "x$test_shortpath" = x; then
14042    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14043$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14044    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14045  fi
14046
14047  # Call helper function which possibly converts this using DOS-style short mode.
14048  # If so, the updated path is stored in $new_path.
14049
14050  input_path="$new_path"
14051  # Check if we need to convert this using DOS-style short mode. If the path
14052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14053  # take no chances and rewrite it.
14054  # Note: m4 eats our [], so we need to use [ and ] instead.
14055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14056  if test "x$has_forbidden_chars" != x; then
14057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14058    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14059    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14060    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14061      # Going to short mode and back again did indeed matter. Since short mode is
14062      # case insensitive, let's make it lowercase to improve readability.
14063      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14064      # Now convert it back to Unix-stile (cygpath)
14065      input_path=`$CYGPATH -u "$shortmode_path"`
14066      new_path="$input_path"
14067    fi
14068  fi
14069
14070  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14071  if test "x$test_cygdrive_prefix" = x; then
14072    # As a simple fix, exclude /usr/bin since it's not a real path.
14073    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14074      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14075      # a path prefixed by /cygdrive for fixpath to work.
14076      new_path="$CYGWIN_ROOT_PATH$input_path"
14077    fi
14078  fi
14079
14080
14081  if test "x$path" != "x$new_path"; then
14082    CURDIR="$new_path"
14083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14084$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14085  fi
14086
14087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14088
14089  path="$CURDIR"
14090  has_colon=`$ECHO $path | $GREP ^.:`
14091  new_path="$path"
14092  if test "x$has_colon" = x; then
14093    # Not in mixed or Windows style, start by that.
14094    new_path=`cmd //c echo $path`
14095  fi
14096
14097
14098  input_path="$new_path"
14099  # Check if we need to convert this using DOS-style short mode. If the path
14100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14101  # take no chances and rewrite it.
14102  # Note: m4 eats our [], so we need to use [ and ] instead.
14103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14104  if test "x$has_forbidden_chars" != x; then
14105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14106    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14107  fi
14108
14109
14110  windows_path="$new_path"
14111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14112    unix_path=`$CYGPATH -u "$windows_path"`
14113    new_path="$unix_path"
14114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14116    new_path="$unix_path"
14117  fi
14118
14119  if test "x$path" != "x$new_path"; then
14120    CURDIR="$new_path"
14121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14122$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14123  fi
14124
14125  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14126  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14127
14128  else
14129    # We're on a posix platform. Hooray! :)
14130    path="$CURDIR"
14131    has_space=`$ECHO "$path" | $GREP " "`
14132    if test "x$has_space" != x; then
14133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14134$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14135      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14136    fi
14137
14138    # Use eval to expand a potential ~
14139    eval path="$path"
14140    if test ! -f "$path" && test ! -d "$path"; then
14141      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14142    fi
14143
14144    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14145  fi
14146
14147
14148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14149
14150  # Input might be given as Windows format, start by converting to
14151  # unix format.
14152  path="$TOPDIR"
14153  new_path=`$CYGPATH -u "$path"`
14154
14155  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14156  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14157  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14158  # "foo.exe" is OK but "foo" is an error.
14159  #
14160  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14161  # It is also a way to make sure we got the proper file name for the real test later on.
14162  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14163  if test "x$test_shortpath" = x; then
14164    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14165$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14166    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14167  fi
14168
14169  # Call helper function which possibly converts this using DOS-style short mode.
14170  # If so, the updated path is stored in $new_path.
14171
14172  input_path="$new_path"
14173  # Check if we need to convert this using DOS-style short mode. If the path
14174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14175  # take no chances and rewrite it.
14176  # Note: m4 eats our [], so we need to use [ and ] instead.
14177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14178  if test "x$has_forbidden_chars" != x; then
14179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14180    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14181    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14182    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14183      # Going to short mode and back again did indeed matter. Since short mode is
14184      # case insensitive, let's make it lowercase to improve readability.
14185      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14186      # Now convert it back to Unix-stile (cygpath)
14187      input_path=`$CYGPATH -u "$shortmode_path"`
14188      new_path="$input_path"
14189    fi
14190  fi
14191
14192  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14193  if test "x$test_cygdrive_prefix" = x; then
14194    # As a simple fix, exclude /usr/bin since it's not a real path.
14195    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14196      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14197      # a path prefixed by /cygdrive for fixpath to work.
14198      new_path="$CYGWIN_ROOT_PATH$input_path"
14199    fi
14200  fi
14201
14202
14203  if test "x$path" != "x$new_path"; then
14204    TOPDIR="$new_path"
14205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14206$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14207  fi
14208
14209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14210
14211  path="$TOPDIR"
14212  has_colon=`$ECHO $path | $GREP ^.:`
14213  new_path="$path"
14214  if test "x$has_colon" = x; then
14215    # Not in mixed or Windows style, start by that.
14216    new_path=`cmd //c echo $path`
14217  fi
14218
14219
14220  input_path="$new_path"
14221  # Check if we need to convert this using DOS-style short mode. If the path
14222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14223  # take no chances and rewrite it.
14224  # Note: m4 eats our [], so we need to use [ and ] instead.
14225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14226  if test "x$has_forbidden_chars" != x; then
14227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14229  fi
14230
14231
14232  windows_path="$new_path"
14233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14234    unix_path=`$CYGPATH -u "$windows_path"`
14235    new_path="$unix_path"
14236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14238    new_path="$unix_path"
14239  fi
14240
14241  if test "x$path" != "x$new_path"; then
14242    TOPDIR="$new_path"
14243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14244$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14245  fi
14246
14247  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14248  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14249
14250  else
14251    # We're on a posix platform. Hooray! :)
14252    path="$TOPDIR"
14253    has_space=`$ECHO "$path" | $GREP " "`
14254    if test "x$has_space" != x; then
14255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14256$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14257      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14258    fi
14259
14260    # Use eval to expand a potential ~
14261    eval path="$path"
14262    if test ! -f "$path" && test ! -d "$path"; then
14263      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14264    fi
14265
14266    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14267  fi
14268
14269  # SRC_ROOT is a traditional alias for TOPDIR.
14270  SRC_ROOT=$TOPDIR
14271
14272  # Locate the directory of this script.
14273  AUTOCONF_DIR=$TOPDIR/common/autoconf
14274
14275
14276  # Setup default logging of stdout and stderr to build.log in the output root.
14277  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14278  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14279  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14280
14281
14282
14283
14284
14285# Check if it's a pure open build or if custom sources are to be used.
14286
14287  # Check whether --enable-openjdk-only was given.
14288if test "${enable_openjdk_only+set}" = set; then :
14289  enableval=$enable_openjdk_only;
14290else
14291  enable_openjdk_only="no"
14292fi
14293
14294
14295  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14296$as_echo_n "checking for presence of closed sources... " >&6; }
14297  if test -d "$SRC_ROOT/jdk/src/closed"; then
14298    CLOSED_SOURCE_PRESENT=yes
14299  else
14300    CLOSED_SOURCE_PRESENT=no
14301  fi
14302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14303$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14304
14305  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14306$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14307  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14309$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14310
14311  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14312    OPENJDK=true
14313    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14314      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14315$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14316    fi
14317  else
14318    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14319      OPENJDK=true
14320    else
14321      OPENJDK=false
14322    fi
14323  fi
14324
14325  if test "x$OPENJDK" = "xtrue"; then
14326    SET_OPENJDK="OPENJDK=true"
14327  fi
14328
14329
14330
14331  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14332  # the IncludeCustomExtension macro.
14333
14334
14335# Check whether --with-custom-make-dir was given.
14336if test "${with_custom_make_dir+set}" = set; then :
14337  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
14338$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14339fi
14340
14341
14342
14343
14344# These are needed to be able to create a configuration name (and thus the output directory)
14345
14346  ###############################################################################
14347  #
14348  # Check which variant of the JDK that we want to build.
14349  # Currently we have:
14350  #    normal:   standard edition
14351  # but the custom make system may add other variants
14352  #
14353  # Effectively the JDK variant gives a name to a specific set of
14354  # modules to compile into the JDK. In the future, these modules
14355  # might even be Jigsaw modules.
14356  #
14357  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14358$as_echo_n "checking which variant of the JDK to build... " >&6; }
14359
14360# Check whether --with-jdk-variant was given.
14361if test "${with_jdk_variant+set}" = set; then :
14362  withval=$with_jdk_variant;
14363fi
14364
14365
14366  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14367    JDK_VARIANT="normal"
14368  else
14369    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14370  fi
14371
14372
14373
14374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14375$as_echo "$JDK_VARIANT" >&6; }
14376
14377
14378###############################################################################
14379#
14380# Check which interpreter of the JVM we want to build.
14381# Currently we have:
14382#    template: Template interpreter (the default)
14383#    cpp     : C++ interpreter
14384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14385$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14386
14387# Check whether --with-jvm-interpreter was given.
14388if test "${with_jvm_interpreter+set}" = set; then :
14389  withval=$with_jvm_interpreter;
14390fi
14391
14392
14393if test "x$with_jvm_interpreter" = x; then
14394     with_jvm_interpreter="template"
14395fi
14396
14397JVM_INTERPRETER="$with_jvm_interpreter"
14398
14399if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14400   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14401fi
14402
14403
14404
14405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14406$as_echo "$with_jvm_interpreter" >&6; }
14407
14408
14409
14410  ###############################################################################
14411  #
14412  # Check which variants of the JVM that we want to build.
14413  # Currently we have:
14414  #    server: normal interpreter and a tiered C1/C2 compiler
14415  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14416  #    minimal1: reduced form of client with optional VM services and features stripped out
14417  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14418  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14419  #    zero: no machine code interpreter, no compiler
14420  #    zeroshark: zero interpreter and shark/llvm compiler backend
14421#    core: interpreter only, no compiler (only works on some platforms)
14422  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14423$as_echo_n "checking which variants of the JVM to build... " >&6; }
14424
14425# Check whether --with-jvm-variants was given.
14426if test "${with_jvm_variants+set}" = set; then :
14427  withval=$with_jvm_variants;
14428fi
14429
14430
14431  if test "x$with_jvm_variants" = x; then
14432    with_jvm_variants="server"
14433  fi
14434
14435  JVM_VARIANTS=",$with_jvm_variants,"
14436  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,//'`
14437
14438  if test "x$TEST_VARIANTS" != "x,"; then
14439     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14440  fi
14441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14442$as_echo "$with_jvm_variants" >&6; }
14443
14444  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14445  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14446  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14447  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14448  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14449  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14450  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14451
14452  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14453    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14454      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14455    fi
14456  fi
14457  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14458    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14459      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14460    fi
14461  fi
14462  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14463    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14464      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14465    fi
14466  fi
14467
14468  # Replace the commas with AND for use in the build directory name.
14469  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14470  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/'`
14471  if test "x$COUNT_VARIANTS" != "x,1"; then
14472    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14473  else
14474    BUILDING_MULTIPLE_JVM_VARIANTS=no
14475  fi
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486  INCLUDE_SA=true
14487  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14488    INCLUDE_SA=false
14489  fi
14490  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14491    INCLUDE_SA=false
14492  fi
14493  if test "x$VAR_CPU" = xppc64 ; then
14494    INCLUDE_SA=false
14495  fi
14496
14497
14498  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14499    MACOSX_UNIVERSAL="true"
14500  fi
14501
14502
14503
14504
14505  ###############################################################################
14506  #
14507  # Set the debug level
14508  #    release: no debug information, all optimizations, no asserts.
14509  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14510  #    fastdebug: debug information (-g), all optimizations, all asserts
14511  #    slowdebug: debug information (-g), no optimizations, all asserts
14512  #
14513  DEBUG_LEVEL="release"
14514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14515$as_echo_n "checking which debug level to use... " >&6; }
14516  # Check whether --enable-debug was given.
14517if test "${enable_debug+set}" = set; then :
14518  enableval=$enable_debug;
14519        ENABLE_DEBUG="${enableval}"
14520        DEBUG_LEVEL="fastdebug"
14521
14522else
14523  ENABLE_DEBUG="no"
14524fi
14525
14526
14527
14528# Check whether --with-debug-level was given.
14529if test "${with_debug_level+set}" = set; then :
14530  withval=$with_debug_level;
14531        DEBUG_LEVEL="${withval}"
14532        if test "x$ENABLE_DEBUG" = xyes; then
14533          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14534        fi
14535
14536fi
14537
14538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14539$as_echo "$DEBUG_LEVEL" >&6; }
14540
14541  if test "x$DEBUG_LEVEL" != xrelease && \
14542      test "x$DEBUG_LEVEL" != xoptimized && \
14543      test "x$DEBUG_LEVEL" != xfastdebug && \
14544      test "x$DEBUG_LEVEL" != xslowdebug; then
14545    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14546  fi
14547
14548
14549  ###############################################################################
14550  #
14551  # Setup legacy vars/targets and new vars to deal with different debug levels.
14552  #
14553
14554  case $DEBUG_LEVEL in
14555    release )
14556      VARIANT="OPT"
14557      FASTDEBUG="false"
14558      DEBUG_CLASSFILES="false"
14559      BUILD_VARIANT_RELEASE=""
14560      HOTSPOT_DEBUG_LEVEL="product"
14561      HOTSPOT_EXPORT="product"
14562      ;;
14563    fastdebug )
14564      VARIANT="DBG"
14565      FASTDEBUG="true"
14566      DEBUG_CLASSFILES="true"
14567      BUILD_VARIANT_RELEASE="-fastdebug"
14568      HOTSPOT_DEBUG_LEVEL="fastdebug"
14569      HOTSPOT_EXPORT="fastdebug"
14570      ;;
14571    slowdebug )
14572      VARIANT="DBG"
14573      FASTDEBUG="false"
14574      DEBUG_CLASSFILES="true"
14575      BUILD_VARIANT_RELEASE="-debug"
14576      HOTSPOT_DEBUG_LEVEL="jvmg"
14577      HOTSPOT_EXPORT="debug"
14578      ;;
14579    optimized )
14580      VARIANT="OPT"
14581      FASTDEBUG="false"
14582      DEBUG_CLASSFILES="false"
14583      BUILD_VARIANT_RELEASE="-optimized"
14584      HOTSPOT_DEBUG_LEVEL="optimized"
14585      HOTSPOT_EXPORT="optimized"
14586      ;;
14587  esac
14588
14589  # The debug level 'optimized' is a little special because it is currently only
14590  # applicable to the HotSpot build where it means to build a completely
14591  # optimized version of the VM without any debugging code (like for the
14592  # 'release' debug level which is called 'product' in the HotSpot build) but
14593  # with the exception that it can contain additional code which is otherwise
14594  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14595  # test new and/or experimental features which are not intended for customer
14596  # shipment. Because these new features need to be tested and benchmarked in
14597  # real world scenarios, we want to build the containing JDK at the 'release'
14598  # debug level.
14599  if test "x$DEBUG_LEVEL" = xoptimized; then
14600    DEBUG_LEVEL="release"
14601  fi
14602
14603  #####
14604  # Generate the legacy makefile targets for hotspot.
14605  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14606  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14607  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14608  # But until then ...
14609  HOTSPOT_TARGET=""
14610
14611  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14612    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14613  fi
14614
14615  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14616    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14617  fi
14618
14619  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14620    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14621  fi
14622
14623  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14624    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14625  fi
14626
14627  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14628    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14629  fi
14630
14631  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14632    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14633  fi
14634
14635  if test "x$JVM_VARIANT_CORE" = xtrue; then
14636    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14637  fi
14638
14639  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14640
14641  # On Macosx universal binaries are produced, but they only contain
14642  # 64 bit intel. This invalidates control of which jvms are built
14643  # from configure, but only server is valid anyway. Fix this
14644  # when hotspot makefiles are rewritten.
14645  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14646    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14647  fi
14648
14649  #####
14650
14651
14652
14653
14654
14655
14656
14657
14658# With basic setup done, call the custom early hook.
14659
14660
14661# Check if we have devkits, extra paths or sysroot set.
14662
14663
14664# Check whether --with-devkit was given.
14665if test "${with_devkit+set}" = set; then :
14666  withval=$with_devkit;
14667
14668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14669
14670  # Input might be given as Windows format, start by converting to
14671  # unix format.
14672  path="$with_devkit"
14673  new_path=`$CYGPATH -u "$path"`
14674
14675  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14676  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14677  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14678  # "foo.exe" is OK but "foo" is an error.
14679  #
14680  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14681  # It is also a way to make sure we got the proper file name for the real test later on.
14682  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14683  if test "x$test_shortpath" = x; then
14684    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14685$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14686    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14687  fi
14688
14689  # Call helper function which possibly converts this using DOS-style short mode.
14690  # If so, the updated path is stored in $new_path.
14691
14692  input_path="$new_path"
14693  # Check if we need to convert this using DOS-style short mode. If the path
14694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14695  # take no chances and rewrite it.
14696  # Note: m4 eats our [], so we need to use [ and ] instead.
14697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14698  if test "x$has_forbidden_chars" != x; then
14699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14700    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14701    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14702    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14703      # Going to short mode and back again did indeed matter. Since short mode is
14704      # case insensitive, let's make it lowercase to improve readability.
14705      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14706      # Now convert it back to Unix-stile (cygpath)
14707      input_path=`$CYGPATH -u "$shortmode_path"`
14708      new_path="$input_path"
14709    fi
14710  fi
14711
14712  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14713  if test "x$test_cygdrive_prefix" = x; then
14714    # As a simple fix, exclude /usr/bin since it's not a real path.
14715    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14716      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14717      # a path prefixed by /cygdrive for fixpath to work.
14718      new_path="$CYGWIN_ROOT_PATH$input_path"
14719    fi
14720  fi
14721
14722
14723  if test "x$path" != "x$new_path"; then
14724    with_devkit="$new_path"
14725    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14726$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14727  fi
14728
14729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14730
14731  path="$with_devkit"
14732  has_colon=`$ECHO $path | $GREP ^.:`
14733  new_path="$path"
14734  if test "x$has_colon" = x; then
14735    # Not in mixed or Windows style, start by that.
14736    new_path=`cmd //c echo $path`
14737  fi
14738
14739
14740  input_path="$new_path"
14741  # Check if we need to convert this using DOS-style short mode. If the path
14742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14743  # take no chances and rewrite it.
14744  # Note: m4 eats our [], so we need to use [ and ] instead.
14745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14746  if test "x$has_forbidden_chars" != x; then
14747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14748    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14749  fi
14750
14751
14752  windows_path="$new_path"
14753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14754    unix_path=`$CYGPATH -u "$windows_path"`
14755    new_path="$unix_path"
14756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14758    new_path="$unix_path"
14759  fi
14760
14761  if test "x$path" != "x$new_path"; then
14762    with_devkit="$new_path"
14763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14764$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14765  fi
14766
14767  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14768  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14769
14770  else
14771    # We're on a posix platform. Hooray! :)
14772    path="$with_devkit"
14773    has_space=`$ECHO "$path" | $GREP " "`
14774    if test "x$has_space" != x; then
14775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14776$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14777      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14778    fi
14779
14780    # Use eval to expand a potential ~
14781    eval path="$path"
14782    if test ! -f "$path" && test ! -d "$path"; then
14783      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14784    fi
14785
14786    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14787  fi
14788
14789        DEVKIT_ROOT="$with_devkit"
14790        # Check for a meta data info file in the root of the devkit
14791        if test -f "$DEVKIT_ROOT/devkit.info"; then
14792          # This potentially sets the following:
14793          # DEVKIT_NAME: A descriptive name of the devkit
14794          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14795          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14796          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14797          . $DEVKIT_ROOT/devkit.info
14798        fi
14799
14800        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14801$as_echo_n "checking for devkit... " >&6; }
14802        if test "x$DEVKIT_NAME" != x; then
14803          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14804$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14805        else
14806          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14807$as_echo "$DEVKIT_ROOT" >&6; }
14808        fi
14809
14810        if test "x$DEVKIT_EXTRA_PATH" != x; then
14811
14812  if test "x$DEVKIT_EXTRA_PATH" != x; then
14813    if test "x$EXTRA_PATH" = x; then
14814      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14815    else
14816      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14817    fi
14818  fi
14819
14820        fi
14821
14822        # Fallback default of just /bin if DEVKIT_PATH is not defined
14823        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14824          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14825        fi
14826
14827  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14828    if test "x$TOOLCHAIN_PATH" = x; then
14829      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14830    else
14831      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14832    fi
14833  fi
14834
14835
14836        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14837        # places for backwards compatiblity.
14838        if test "x$DEVKIT_SYSROOT" != x; then
14839          SYSROOT="$DEVKIT_SYSROOT"
14840        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14841          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14842        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14843          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14844        fi
14845
14846
14847fi
14848
14849
14850  # You can force the sysroot if the sysroot encoded into the compiler tools
14851  # is not correct.
14852
14853# Check whether --with-sys-root was given.
14854if test "${with_sys_root+set}" = set; then :
14855  withval=$with_sys_root; SYSROOT=$with_sys_root
14856
14857fi
14858
14859
14860
14861# Check whether --with-sysroot was given.
14862if test "${with_sysroot+set}" = set; then :
14863  withval=$with_sysroot; SYSROOT=$with_sysroot
14864
14865fi
14866
14867
14868
14869# Check whether --with-tools-dir was given.
14870if test "${with_tools_dir+set}" = set; then :
14871  withval=$with_tools_dir;
14872  if test "x$with_tools_dir" != x; then
14873    if test "x$TOOLCHAIN_PATH" = x; then
14874      TOOLCHAIN_PATH="$with_tools_dir"
14875    else
14876      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14877    fi
14878  fi
14879
14880
14881fi
14882
14883
14884
14885# Check whether --with-toolchain-path was given.
14886if test "${with_toolchain_path+set}" = set; then :
14887  withval=$with_toolchain_path;
14888  if test "x$with_toolchain_path" != x; then
14889    if test "x$TOOLCHAIN_PATH" = x; then
14890      TOOLCHAIN_PATH="$with_toolchain_path"
14891    else
14892      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14893    fi
14894  fi
14895
14896
14897fi
14898
14899
14900
14901# Check whether --with-extra-path was given.
14902if test "${with_extra_path+set}" = set; then :
14903  withval=$with_extra_path;
14904  if test "x$with_extra_path" != x; then
14905    if test "x$EXTRA_PATH" = x; then
14906      EXTRA_PATH="$with_extra_path"
14907    else
14908      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14909    fi
14910  fi
14911
14912
14913fi
14914
14915
14916  # Prepend the extra path to the global path
14917
14918  if test "x$EXTRA_PATH" != x; then
14919    if test "x$PATH" = x; then
14920      PATH="$EXTRA_PATH"
14921    else
14922      PATH="$EXTRA_PATH:$PATH"
14923    fi
14924  fi
14925
14926
14927  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
14928    # Add extra search paths on solaris for utilities like ar and as etc...
14929    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
14930  fi
14931
14932  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
14933$as_echo_n "checking for sysroot... " >&6; }
14934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
14935$as_echo "$SYSROOT" >&6; }
14936  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
14937$as_echo_n "checking for toolchain path... " >&6; }
14938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
14939$as_echo "$TOOLCHAIN_PATH" >&6; }
14940  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
14941$as_echo_n "checking for extra path... " >&6; }
14942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
14943$as_echo "$EXTRA_PATH" >&6; }
14944
14945
14946# To properly create a configuration name, we need to have the OpenJDK target
14947# and options (variants and debug level) parsed.
14948
14949
14950
14951# Check whether --with-conf-name was given.
14952if test "${with_conf_name+set}" = set; then :
14953  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
14954fi
14955
14956
14957  # Test from where we are running configure, in or outside of src root.
14958  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
14959$as_echo_n "checking where to store configuration... " >&6; }
14960  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
14961      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
14962      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
14963    # We are running configure from the src root.
14964    # Create a default ./build/target-variant-debuglevel output root.
14965    if test "x${CONF_NAME}" = x; then
14966      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
14967$as_echo "in default location" >&6; }
14968      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
14969    else
14970      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
14971$as_echo "in build directory with custom name" >&6; }
14972    fi
14973    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
14974    $MKDIR -p "$OUTPUT_ROOT"
14975    if test ! -d "$OUTPUT_ROOT"; then
14976      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
14977    fi
14978  else
14979    # We are running configure from outside of the src dir.
14980    # Then use the current directory as output dir!
14981    # If configuration is situated in normal build directory, just use the build
14982    # directory name as configuration name, otherwise use the complete path.
14983    if test "x${CONF_NAME}" = x; then
14984      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
14985    fi
14986    OUTPUT_ROOT="$CURDIR"
14987    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
14988$as_echo "in current directory" >&6; }
14989
14990    # WARNING: This might be a bad thing to do. You need to be sure you want to
14991    # have a configuration in this directory. Do some sanity checks!
14992
14993    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
14994      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
14995      # other files
14996      files_present=`$LS $OUTPUT_ROOT`
14997      # Configure has already touched config.log and confdefs.h in the current dir when this check
14998      # is performed.
14999      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15000      | $TR -d '\n'`
15001      if test "x$filtered_files" != x; then
15002        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15003$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15004        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15005$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15006        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15007$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15008        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15009$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15010        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15011$as_echo "$as_me: seriously mess up just about everything." >&6;}
15012        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15013$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15014        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15015$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15016        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15017      fi
15018    fi
15019  fi
15020  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15021$as_echo_n "checking what configuration name to use... " >&6; }
15022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15023$as_echo "$CONF_NAME" >&6; }
15024
15025
15026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15027
15028  # Input might be given as Windows format, start by converting to
15029  # unix format.
15030  path="$OUTPUT_ROOT"
15031  new_path=`$CYGPATH -u "$path"`
15032
15033  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15034  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15035  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15036  # "foo.exe" is OK but "foo" is an error.
15037  #
15038  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15039  # It is also a way to make sure we got the proper file name for the real test later on.
15040  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15041  if test "x$test_shortpath" = x; then
15042    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15043$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15044    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15045  fi
15046
15047  # Call helper function which possibly converts this using DOS-style short mode.
15048  # If so, the updated path is stored in $new_path.
15049
15050  input_path="$new_path"
15051  # Check if we need to convert this using DOS-style short mode. If the path
15052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15053  # take no chances and rewrite it.
15054  # Note: m4 eats our [], so we need to use [ and ] instead.
15055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15056  if test "x$has_forbidden_chars" != x; then
15057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15058    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15059    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15060    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15061      # Going to short mode and back again did indeed matter. Since short mode is
15062      # case insensitive, let's make it lowercase to improve readability.
15063      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15064      # Now convert it back to Unix-stile (cygpath)
15065      input_path=`$CYGPATH -u "$shortmode_path"`
15066      new_path="$input_path"
15067    fi
15068  fi
15069
15070  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15071  if test "x$test_cygdrive_prefix" = x; then
15072    # As a simple fix, exclude /usr/bin since it's not a real path.
15073    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15074      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15075      # a path prefixed by /cygdrive for fixpath to work.
15076      new_path="$CYGWIN_ROOT_PATH$input_path"
15077    fi
15078  fi
15079
15080
15081  if test "x$path" != "x$new_path"; then
15082    OUTPUT_ROOT="$new_path"
15083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15084$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15085  fi
15086
15087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15088
15089  path="$OUTPUT_ROOT"
15090  has_colon=`$ECHO $path | $GREP ^.:`
15091  new_path="$path"
15092  if test "x$has_colon" = x; then
15093    # Not in mixed or Windows style, start by that.
15094    new_path=`cmd //c echo $path`
15095  fi
15096
15097
15098  input_path="$new_path"
15099  # Check if we need to convert this using DOS-style short mode. If the path
15100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15101  # take no chances and rewrite it.
15102  # Note: m4 eats our [], so we need to use [ and ] instead.
15103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15104  if test "x$has_forbidden_chars" != x; then
15105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15106    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15107  fi
15108
15109
15110  windows_path="$new_path"
15111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15112    unix_path=`$CYGPATH -u "$windows_path"`
15113    new_path="$unix_path"
15114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15116    new_path="$unix_path"
15117  fi
15118
15119  if test "x$path" != "x$new_path"; then
15120    OUTPUT_ROOT="$new_path"
15121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15122$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15123  fi
15124
15125  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15126  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15127
15128  else
15129    # We're on a posix platform. Hooray! :)
15130    path="$OUTPUT_ROOT"
15131    has_space=`$ECHO "$path" | $GREP " "`
15132    if test "x$has_space" != x; then
15133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15134$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15135      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15136    fi
15137
15138    # Use eval to expand a potential ~
15139    eval path="$path"
15140    if test ! -f "$path" && test ! -d "$path"; then
15141      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15142    fi
15143
15144    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15145  fi
15146
15147
15148  SPEC=$OUTPUT_ROOT/spec.gmk
15149
15150  CONF_NAME=$CONF_NAME
15151
15152  OUTPUT_ROOT=$OUTPUT_ROOT
15153
15154
15155  # Most of the probed defines are put into config.h
15156  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
15157
15158  # The spec.gmk file contains all variables for the make system.
15159  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15160
15161  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15162  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15163
15164  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15165  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15166
15167  # The compare.sh is used to compare the build output to other builds.
15168  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15169
15170  # Spec.sh is currently used by compare-objects.sh
15171  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
15172
15173  # The generated Makefile knows where the spec.gmk is and where the source is.
15174  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15175  # which will look for generated configurations
15176  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15177
15178
15179
15180# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15181
15182  for ac_prog in apt-get yum port pkgutil pkgadd
15183do
15184  # Extract the first word of "$ac_prog", so it can be a program name with args.
15185set dummy $ac_prog; ac_word=$2
15186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15187$as_echo_n "checking for $ac_word... " >&6; }
15188if ${ac_cv_prog_PKGHANDLER+:} false; then :
15189  $as_echo_n "(cached) " >&6
15190else
15191  if test -n "$PKGHANDLER"; then
15192  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15193else
15194as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15195for as_dir in $PATH
15196do
15197  IFS=$as_save_IFS
15198  test -z "$as_dir" && as_dir=.
15199    for ac_exec_ext in '' $ac_executable_extensions; do
15200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15201    ac_cv_prog_PKGHANDLER="$ac_prog"
15202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15203    break 2
15204  fi
15205done
15206  done
15207IFS=$as_save_IFS
15208
15209fi
15210fi
15211PKGHANDLER=$ac_cv_prog_PKGHANDLER
15212if test -n "$PKGHANDLER"; then
15213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15214$as_echo "$PKGHANDLER" >&6; }
15215else
15216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15217$as_echo "no" >&6; }
15218fi
15219
15220
15221  test -n "$PKGHANDLER" && break
15222done
15223
15224
15225
15226# Setup tools that requires more complex handling, or that is not needed by the configure script.
15227
15228
15229  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15230  if test "x$MAKE" != x; then
15231    # User has supplied a make, test it.
15232    if test ! -f "$MAKE"; then
15233      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15234    fi
15235
15236  MAKE_CANDIDATE=""$MAKE""
15237  DESCRIPTION="user supplied MAKE=$MAKE"
15238  if test "x$MAKE_CANDIDATE" != x; then
15239    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15240$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15241    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15242    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15243    if test "x$IS_GNU_MAKE" = x; then
15244      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15245$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15246    else
15247      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15248      if test "x$IS_MODERN_MAKE" = x; then
15249        { $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
15250$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;}
15251      else
15252        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15253          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15254            MAKE_EXPECTED_ENV='cygwin'
15255          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15256            MAKE_EXPECTED_ENV='msys'
15257          else
15258            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15259          fi
15260          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15261          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15262        else
15263          # Not relevant for non-Windows
15264          IS_MAKE_CORRECT_ENV=true
15265        fi
15266        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15267          { $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
15268$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;}
15269        else
15270          FOUND_MAKE=$MAKE_CANDIDATE
15271
15272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15273
15274  # First separate the path from the arguments. This will split at the first
15275  # space.
15276  complete="$FOUND_MAKE"
15277  path="${complete%% *}"
15278  tmp="$complete EOL"
15279  arguments="${tmp#* }"
15280
15281  # Input might be given as Windows format, start by converting to
15282  # unix format.
15283  new_path=`$CYGPATH -u "$path"`
15284
15285  # Now try to locate executable using which
15286  new_path=`$WHICH "$new_path" 2> /dev/null`
15287  # bat and cmd files are not always considered executable in cygwin causing which
15288  # to not find them
15289  if test "x$new_path" = x \
15290      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15291      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15292    new_path=`$CYGPATH -u "$path"`
15293  fi
15294  if test "x$new_path" = x; then
15295    # Oops. Which didn't find the executable.
15296    # The splitting of arguments from the executable at a space might have been incorrect,
15297    # since paths with space are more likely in Windows. Give it another try with the whole
15298    # argument.
15299    path="$complete"
15300    arguments="EOL"
15301    new_path=`$CYGPATH -u "$path"`
15302    new_path=`$WHICH "$new_path" 2> /dev/null`
15303    # bat and cmd files are not always considered executable in cygwin causing which
15304    # to not find them
15305    if test "x$new_path" = x \
15306        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15307        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15308      new_path=`$CYGPATH -u "$path"`
15309    fi
15310    if test "x$new_path" = x; then
15311      # It's still not found. Now this is an unrecoverable error.
15312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15313$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15314      has_space=`$ECHO "$complete" | $GREP " "`
15315      if test "x$has_space" != x; then
15316        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15317$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15318      fi
15319      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15320    fi
15321  fi
15322
15323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15326  # "foo.exe" is OK but "foo" is an error.
15327  #
15328  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15329  # It is also a way to make sure we got the proper file name for the real test later on.
15330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15331  if test "x$test_shortpath" = x; then
15332    # Short path failed, file does not exist as specified.
15333    # Try adding .exe or .cmd
15334    if test -f "${new_path}.exe"; then
15335      input_to_shortpath="${new_path}.exe"
15336    elif test -f "${new_path}.cmd"; then
15337      input_to_shortpath="${new_path}.cmd"
15338    else
15339      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15340$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15341      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15342$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15343      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15344    fi
15345  else
15346    input_to_shortpath="$new_path"
15347  fi
15348
15349  # Call helper function which possibly converts this using DOS-style short mode.
15350  # If so, the updated path is stored in $new_path.
15351  new_path="$input_to_shortpath"
15352
15353  input_path="$input_to_shortpath"
15354  # Check if we need to convert this using DOS-style short mode. If the path
15355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15356  # take no chances and rewrite it.
15357  # Note: m4 eats our [], so we need to use [ and ] instead.
15358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15359  if test "x$has_forbidden_chars" != x; then
15360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15361    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15362    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15363    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15364      # Going to short mode and back again did indeed matter. Since short mode is
15365      # case insensitive, let's make it lowercase to improve readability.
15366      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15367      # Now convert it back to Unix-stile (cygpath)
15368      input_path=`$CYGPATH -u "$shortmode_path"`
15369      new_path="$input_path"
15370    fi
15371  fi
15372
15373  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15374  if test "x$test_cygdrive_prefix" = x; then
15375    # As a simple fix, exclude /usr/bin since it's not a real path.
15376    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15377      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15378      # a path prefixed by /cygdrive for fixpath to work.
15379      new_path="$CYGWIN_ROOT_PATH$input_path"
15380    fi
15381  fi
15382
15383  # remove trailing .exe if any
15384  new_path="${new_path/%.exe/}"
15385
15386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15387
15388  # First separate the path from the arguments. This will split at the first
15389  # space.
15390  complete="$FOUND_MAKE"
15391  path="${complete%% *}"
15392  tmp="$complete EOL"
15393  arguments="${tmp#* }"
15394
15395  # Input might be given as Windows format, start by converting to
15396  # unix format.
15397  new_path="$path"
15398
15399  windows_path="$new_path"
15400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15401    unix_path=`$CYGPATH -u "$windows_path"`
15402    new_path="$unix_path"
15403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15405    new_path="$unix_path"
15406  fi
15407
15408
15409  # Now try to locate executable using which
15410  new_path=`$WHICH "$new_path" 2> /dev/null`
15411
15412  if test "x$new_path" = x; then
15413    # Oops. Which didn't find the executable.
15414    # The splitting of arguments from the executable at a space might have been incorrect,
15415    # since paths with space are more likely in Windows. Give it another try with the whole
15416    # argument.
15417    path="$complete"
15418    arguments="EOL"
15419    new_path="$path"
15420
15421  windows_path="$new_path"
15422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15423    unix_path=`$CYGPATH -u "$windows_path"`
15424    new_path="$unix_path"
15425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15427    new_path="$unix_path"
15428  fi
15429
15430
15431    new_path=`$WHICH "$new_path" 2> /dev/null`
15432
15433    if test "x$new_path" = x; then
15434      # It's still not found. Now this is an unrecoverable error.
15435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15436$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15437      has_space=`$ECHO "$complete" | $GREP " "`
15438      if test "x$has_space" != x; then
15439        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15440$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15441      fi
15442      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15443    fi
15444  fi
15445
15446  # Now new_path has a complete unix path to the binary
15447  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15448    # Keep paths in /bin as-is, but remove trailing .exe if any
15449    new_path="${new_path/%.exe/}"
15450    # Do not save /bin paths to all_fixpath_prefixes!
15451  else
15452    # Not in mixed or Windows style, start by that.
15453    new_path=`cmd //c echo $new_path`
15454
15455  input_path="$new_path"
15456  # Check if we need to convert this using DOS-style short mode. If the path
15457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15458  # take no chances and rewrite it.
15459  # Note: m4 eats our [], so we need to use [ and ] instead.
15460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15461  if test "x$has_forbidden_chars" != x; then
15462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15464  fi
15465
15466    # Output is in $new_path
15467
15468  windows_path="$new_path"
15469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15470    unix_path=`$CYGPATH -u "$windows_path"`
15471    new_path="$unix_path"
15472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15474    new_path="$unix_path"
15475  fi
15476
15477    # remove trailing .exe if any
15478    new_path="${new_path/%.exe/}"
15479
15480    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15481    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15482  fi
15483
15484  else
15485    # We're on a posix platform. Hooray! :)
15486    # First separate the path from the arguments. This will split at the first
15487    # space.
15488    complete="$FOUND_MAKE"
15489    path="${complete%% *}"
15490    tmp="$complete EOL"
15491    arguments="${tmp#* }"
15492
15493    # Cannot rely on the command "which" here since it doesn't always work.
15494    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15495    if test -z "$is_absolute_path"; then
15496      # Path to executable is not absolute. Find it.
15497      IFS_save="$IFS"
15498      IFS=:
15499      for p in $PATH; do
15500        if test -f "$p/$path" && test -x "$p/$path"; then
15501          new_path="$p/$path"
15502          break
15503        fi
15504      done
15505      IFS="$IFS_save"
15506    else
15507      # This is an absolute path, we can use it without further modifications.
15508      new_path="$path"
15509    fi
15510
15511    if test "x$new_path" = x; then
15512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15513$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15514      has_space=`$ECHO "$complete" | $GREP " "`
15515      if test "x$has_space" != x; then
15516        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15517$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15518      fi
15519      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15520    fi
15521  fi
15522
15523  # Now join together the path and the arguments once again
15524  if test "x$arguments" != xEOL; then
15525    new_complete="$new_path ${arguments% *}"
15526  else
15527    new_complete="$new_path"
15528  fi
15529
15530  if test "x$complete" != "x$new_complete"; then
15531    FOUND_MAKE="$new_complete"
15532    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15533$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15534  fi
15535
15536        fi
15537      fi
15538    fi
15539  fi
15540
15541    if test "x$FOUND_MAKE" = x; then
15542      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15543    fi
15544  else
15545    # Try our hardest to locate a correct version of GNU make
15546    for ac_prog in gmake
15547do
15548  # Extract the first word of "$ac_prog", so it can be a program name with args.
15549set dummy $ac_prog; ac_word=$2
15550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15551$as_echo_n "checking for $ac_word... " >&6; }
15552if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15553  $as_echo_n "(cached) " >&6
15554else
15555  case $CHECK_GMAKE in
15556  [\\/]* | ?:[\\/]*)
15557  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15558  ;;
15559  *)
15560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15561for as_dir in $PATH
15562do
15563  IFS=$as_save_IFS
15564  test -z "$as_dir" && as_dir=.
15565    for ac_exec_ext in '' $ac_executable_extensions; do
15566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15567    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15569    break 2
15570  fi
15571done
15572  done
15573IFS=$as_save_IFS
15574
15575  ;;
15576esac
15577fi
15578CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15579if test -n "$CHECK_GMAKE"; then
15580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15581$as_echo "$CHECK_GMAKE" >&6; }
15582else
15583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15584$as_echo "no" >&6; }
15585fi
15586
15587
15588  test -n "$CHECK_GMAKE" && break
15589done
15590
15591
15592  MAKE_CANDIDATE=""$CHECK_GMAKE""
15593  DESCRIPTION="gmake in PATH"
15594  if test "x$MAKE_CANDIDATE" != x; then
15595    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15596$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15597    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15598    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15599    if test "x$IS_GNU_MAKE" = x; then
15600      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15601$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15602    else
15603      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15604      if test "x$IS_MODERN_MAKE" = x; then
15605        { $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
15606$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;}
15607      else
15608        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15609          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15610            MAKE_EXPECTED_ENV='cygwin'
15611          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15612            MAKE_EXPECTED_ENV='msys'
15613          else
15614            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15615          fi
15616          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15617          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15618        else
15619          # Not relevant for non-Windows
15620          IS_MAKE_CORRECT_ENV=true
15621        fi
15622        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15623          { $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
15624$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;}
15625        else
15626          FOUND_MAKE=$MAKE_CANDIDATE
15627
15628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15629
15630  # First separate the path from the arguments. This will split at the first
15631  # space.
15632  complete="$FOUND_MAKE"
15633  path="${complete%% *}"
15634  tmp="$complete EOL"
15635  arguments="${tmp#* }"
15636
15637  # Input might be given as Windows format, start by converting to
15638  # unix format.
15639  new_path=`$CYGPATH -u "$path"`
15640
15641  # Now try to locate executable using which
15642  new_path=`$WHICH "$new_path" 2> /dev/null`
15643  # bat and cmd files are not always considered executable in cygwin causing which
15644  # to not find them
15645  if test "x$new_path" = x \
15646      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15647      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15648    new_path=`$CYGPATH -u "$path"`
15649  fi
15650  if test "x$new_path" = x; then
15651    # Oops. Which didn't find the executable.
15652    # The splitting of arguments from the executable at a space might have been incorrect,
15653    # since paths with space are more likely in Windows. Give it another try with the whole
15654    # argument.
15655    path="$complete"
15656    arguments="EOL"
15657    new_path=`$CYGPATH -u "$path"`
15658    new_path=`$WHICH "$new_path" 2> /dev/null`
15659    # bat and cmd files are not always considered executable in cygwin causing which
15660    # to not find them
15661    if test "x$new_path" = x \
15662        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15663        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15664      new_path=`$CYGPATH -u "$path"`
15665    fi
15666    if test "x$new_path" = x; then
15667      # It's still not found. Now this is an unrecoverable error.
15668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15669$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15670      has_space=`$ECHO "$complete" | $GREP " "`
15671      if test "x$has_space" != x; then
15672        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15673$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15674      fi
15675      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15676    fi
15677  fi
15678
15679  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15680  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15681  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15682  # "foo.exe" is OK but "foo" is an error.
15683  #
15684  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15685  # It is also a way to make sure we got the proper file name for the real test later on.
15686  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15687  if test "x$test_shortpath" = x; then
15688    # Short path failed, file does not exist as specified.
15689    # Try adding .exe or .cmd
15690    if test -f "${new_path}.exe"; then
15691      input_to_shortpath="${new_path}.exe"
15692    elif test -f "${new_path}.cmd"; then
15693      input_to_shortpath="${new_path}.cmd"
15694    else
15695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15696$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15697      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15698$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15699      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15700    fi
15701  else
15702    input_to_shortpath="$new_path"
15703  fi
15704
15705  # Call helper function which possibly converts this using DOS-style short mode.
15706  # If so, the updated path is stored in $new_path.
15707  new_path="$input_to_shortpath"
15708
15709  input_path="$input_to_shortpath"
15710  # Check if we need to convert this using DOS-style short mode. If the path
15711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15712  # take no chances and rewrite it.
15713  # Note: m4 eats our [], so we need to use [ and ] instead.
15714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15715  if test "x$has_forbidden_chars" != x; then
15716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15720      # Going to short mode and back again did indeed matter. Since short mode is
15721      # case insensitive, let's make it lowercase to improve readability.
15722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15723      # Now convert it back to Unix-stile (cygpath)
15724      input_path=`$CYGPATH -u "$shortmode_path"`
15725      new_path="$input_path"
15726    fi
15727  fi
15728
15729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15730  if test "x$test_cygdrive_prefix" = x; then
15731    # As a simple fix, exclude /usr/bin since it's not a real path.
15732    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15734      # a path prefixed by /cygdrive for fixpath to work.
15735      new_path="$CYGWIN_ROOT_PATH$input_path"
15736    fi
15737  fi
15738
15739  # remove trailing .exe if any
15740  new_path="${new_path/%.exe/}"
15741
15742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15743
15744  # First separate the path from the arguments. This will split at the first
15745  # space.
15746  complete="$FOUND_MAKE"
15747  path="${complete%% *}"
15748  tmp="$complete EOL"
15749  arguments="${tmp#* }"
15750
15751  # Input might be given as Windows format, start by converting to
15752  # unix format.
15753  new_path="$path"
15754
15755  windows_path="$new_path"
15756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15757    unix_path=`$CYGPATH -u "$windows_path"`
15758    new_path="$unix_path"
15759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15761    new_path="$unix_path"
15762  fi
15763
15764
15765  # Now try to locate executable using which
15766  new_path=`$WHICH "$new_path" 2> /dev/null`
15767
15768  if test "x$new_path" = x; then
15769    # Oops. Which didn't find the executable.
15770    # The splitting of arguments from the executable at a space might have been incorrect,
15771    # since paths with space are more likely in Windows. Give it another try with the whole
15772    # argument.
15773    path="$complete"
15774    arguments="EOL"
15775    new_path="$path"
15776
15777  windows_path="$new_path"
15778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15779    unix_path=`$CYGPATH -u "$windows_path"`
15780    new_path="$unix_path"
15781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15783    new_path="$unix_path"
15784  fi
15785
15786
15787    new_path=`$WHICH "$new_path" 2> /dev/null`
15788
15789    if test "x$new_path" = x; then
15790      # It's still not found. Now this is an unrecoverable error.
15791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15792$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15793      has_space=`$ECHO "$complete" | $GREP " "`
15794      if test "x$has_space" != x; then
15795        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15796$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15797      fi
15798      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15799    fi
15800  fi
15801
15802  # Now new_path has a complete unix path to the binary
15803  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15804    # Keep paths in /bin as-is, but remove trailing .exe if any
15805    new_path="${new_path/%.exe/}"
15806    # Do not save /bin paths to all_fixpath_prefixes!
15807  else
15808    # Not in mixed or Windows style, start by that.
15809    new_path=`cmd //c echo $new_path`
15810
15811  input_path="$new_path"
15812  # Check if we need to convert this using DOS-style short mode. If the path
15813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15814  # take no chances and rewrite it.
15815  # Note: m4 eats our [], so we need to use [ and ] instead.
15816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15817  if test "x$has_forbidden_chars" != x; then
15818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15819    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15820  fi
15821
15822    # Output is in $new_path
15823
15824  windows_path="$new_path"
15825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15826    unix_path=`$CYGPATH -u "$windows_path"`
15827    new_path="$unix_path"
15828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15830    new_path="$unix_path"
15831  fi
15832
15833    # remove trailing .exe if any
15834    new_path="${new_path/%.exe/}"
15835
15836    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15837    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15838  fi
15839
15840  else
15841    # We're on a posix platform. Hooray! :)
15842    # First separate the path from the arguments. This will split at the first
15843    # space.
15844    complete="$FOUND_MAKE"
15845    path="${complete%% *}"
15846    tmp="$complete EOL"
15847    arguments="${tmp#* }"
15848
15849    # Cannot rely on the command "which" here since it doesn't always work.
15850    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15851    if test -z "$is_absolute_path"; then
15852      # Path to executable is not absolute. Find it.
15853      IFS_save="$IFS"
15854      IFS=:
15855      for p in $PATH; do
15856        if test -f "$p/$path" && test -x "$p/$path"; then
15857          new_path="$p/$path"
15858          break
15859        fi
15860      done
15861      IFS="$IFS_save"
15862    else
15863      # This is an absolute path, we can use it without further modifications.
15864      new_path="$path"
15865    fi
15866
15867    if test "x$new_path" = x; then
15868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15869$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15870      has_space=`$ECHO "$complete" | $GREP " "`
15871      if test "x$has_space" != x; then
15872        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15873$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15874      fi
15875      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15876    fi
15877  fi
15878
15879  # Now join together the path and the arguments once again
15880  if test "x$arguments" != xEOL; then
15881    new_complete="$new_path ${arguments% *}"
15882  else
15883    new_complete="$new_path"
15884  fi
15885
15886  if test "x$complete" != "x$new_complete"; then
15887    FOUND_MAKE="$new_complete"
15888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15889$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15890  fi
15891
15892        fi
15893      fi
15894    fi
15895  fi
15896
15897
15898    if test "x$FOUND_MAKE" = x; then
15899      for ac_prog in make
15900do
15901  # Extract the first word of "$ac_prog", so it can be a program name with args.
15902set dummy $ac_prog; ac_word=$2
15903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15904$as_echo_n "checking for $ac_word... " >&6; }
15905if ${ac_cv_path_CHECK_MAKE+:} false; then :
15906  $as_echo_n "(cached) " >&6
15907else
15908  case $CHECK_MAKE in
15909  [\\/]* | ?:[\\/]*)
15910  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
15911  ;;
15912  *)
15913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15914for as_dir in $PATH
15915do
15916  IFS=$as_save_IFS
15917  test -z "$as_dir" && as_dir=.
15918    for ac_exec_ext in '' $ac_executable_extensions; do
15919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15920    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
15921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15922    break 2
15923  fi
15924done
15925  done
15926IFS=$as_save_IFS
15927
15928  ;;
15929esac
15930fi
15931CHECK_MAKE=$ac_cv_path_CHECK_MAKE
15932if test -n "$CHECK_MAKE"; then
15933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
15934$as_echo "$CHECK_MAKE" >&6; }
15935else
15936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15937$as_echo "no" >&6; }
15938fi
15939
15940
15941  test -n "$CHECK_MAKE" && break
15942done
15943
15944
15945  MAKE_CANDIDATE=""$CHECK_MAKE""
15946  DESCRIPTION="make in PATH"
15947  if test "x$MAKE_CANDIDATE" != x; then
15948    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15949$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15950    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15951    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15952    if test "x$IS_GNU_MAKE" = x; then
15953      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15954$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15955    else
15956      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15957      if test "x$IS_MODERN_MAKE" = x; then
15958        { $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
15959$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;}
15960      else
15961        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15962          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15963            MAKE_EXPECTED_ENV='cygwin'
15964          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15965            MAKE_EXPECTED_ENV='msys'
15966          else
15967            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15968          fi
15969          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15970          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15971        else
15972          # Not relevant for non-Windows
15973          IS_MAKE_CORRECT_ENV=true
15974        fi
15975        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15976          { $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
15977$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;}
15978        else
15979          FOUND_MAKE=$MAKE_CANDIDATE
15980
15981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15982
15983  # First separate the path from the arguments. This will split at the first
15984  # space.
15985  complete="$FOUND_MAKE"
15986  path="${complete%% *}"
15987  tmp="$complete EOL"
15988  arguments="${tmp#* }"
15989
15990  # Input might be given as Windows format, start by converting to
15991  # unix format.
15992  new_path=`$CYGPATH -u "$path"`
15993
15994  # Now try to locate executable using which
15995  new_path=`$WHICH "$new_path" 2> /dev/null`
15996  # bat and cmd files are not always considered executable in cygwin causing which
15997  # to not find them
15998  if test "x$new_path" = x \
15999      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16000      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16001    new_path=`$CYGPATH -u "$path"`
16002  fi
16003  if test "x$new_path" = x; then
16004    # Oops. Which didn't find the executable.
16005    # The splitting of arguments from the executable at a space might have been incorrect,
16006    # since paths with space are more likely in Windows. Give it another try with the whole
16007    # argument.
16008    path="$complete"
16009    arguments="EOL"
16010    new_path=`$CYGPATH -u "$path"`
16011    new_path=`$WHICH "$new_path" 2> /dev/null`
16012    # bat and cmd files are not always considered executable in cygwin causing which
16013    # to not find them
16014    if test "x$new_path" = x \
16015        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16016        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16017      new_path=`$CYGPATH -u "$path"`
16018    fi
16019    if test "x$new_path" = x; then
16020      # It's still not found. Now this is an unrecoverable error.
16021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16022$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16023      has_space=`$ECHO "$complete" | $GREP " "`
16024      if test "x$has_space" != x; then
16025        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16026$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16027      fi
16028      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16029    fi
16030  fi
16031
16032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16035  # "foo.exe" is OK but "foo" is an error.
16036  #
16037  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16038  # It is also a way to make sure we got the proper file name for the real test later on.
16039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16040  if test "x$test_shortpath" = x; then
16041    # Short path failed, file does not exist as specified.
16042    # Try adding .exe or .cmd
16043    if test -f "${new_path}.exe"; then
16044      input_to_shortpath="${new_path}.exe"
16045    elif test -f "${new_path}.cmd"; then
16046      input_to_shortpath="${new_path}.cmd"
16047    else
16048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16049$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16050      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16051$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16052      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16053    fi
16054  else
16055    input_to_shortpath="$new_path"
16056  fi
16057
16058  # Call helper function which possibly converts this using DOS-style short mode.
16059  # If so, the updated path is stored in $new_path.
16060  new_path="$input_to_shortpath"
16061
16062  input_path="$input_to_shortpath"
16063  # Check if we need to convert this using DOS-style short mode. If the path
16064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16065  # take no chances and rewrite it.
16066  # Note: m4 eats our [], so we need to use [ and ] instead.
16067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16068  if test "x$has_forbidden_chars" != x; then
16069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16070    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16071    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16072    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16073      # Going to short mode and back again did indeed matter. Since short mode is
16074      # case insensitive, let's make it lowercase to improve readability.
16075      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16076      # Now convert it back to Unix-stile (cygpath)
16077      input_path=`$CYGPATH -u "$shortmode_path"`
16078      new_path="$input_path"
16079    fi
16080  fi
16081
16082  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16083  if test "x$test_cygdrive_prefix" = x; then
16084    # As a simple fix, exclude /usr/bin since it's not a real path.
16085    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16086      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16087      # a path prefixed by /cygdrive for fixpath to work.
16088      new_path="$CYGWIN_ROOT_PATH$input_path"
16089    fi
16090  fi
16091
16092  # remove trailing .exe if any
16093  new_path="${new_path/%.exe/}"
16094
16095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16096
16097  # First separate the path from the arguments. This will split at the first
16098  # space.
16099  complete="$FOUND_MAKE"
16100  path="${complete%% *}"
16101  tmp="$complete EOL"
16102  arguments="${tmp#* }"
16103
16104  # Input might be given as Windows format, start by converting to
16105  # unix format.
16106  new_path="$path"
16107
16108  windows_path="$new_path"
16109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16110    unix_path=`$CYGPATH -u "$windows_path"`
16111    new_path="$unix_path"
16112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16114    new_path="$unix_path"
16115  fi
16116
16117
16118  # Now try to locate executable using which
16119  new_path=`$WHICH "$new_path" 2> /dev/null`
16120
16121  if test "x$new_path" = x; then
16122    # Oops. Which didn't find the executable.
16123    # The splitting of arguments from the executable at a space might have been incorrect,
16124    # since paths with space are more likely in Windows. Give it another try with the whole
16125    # argument.
16126    path="$complete"
16127    arguments="EOL"
16128    new_path="$path"
16129
16130  windows_path="$new_path"
16131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16132    unix_path=`$CYGPATH -u "$windows_path"`
16133    new_path="$unix_path"
16134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16136    new_path="$unix_path"
16137  fi
16138
16139
16140    new_path=`$WHICH "$new_path" 2> /dev/null`
16141
16142    if test "x$new_path" = x; then
16143      # It's still not found. Now this is an unrecoverable error.
16144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16145$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16146      has_space=`$ECHO "$complete" | $GREP " "`
16147      if test "x$has_space" != x; then
16148        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16149$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16150      fi
16151      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16152    fi
16153  fi
16154
16155  # Now new_path has a complete unix path to the binary
16156  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16157    # Keep paths in /bin as-is, but remove trailing .exe if any
16158    new_path="${new_path/%.exe/}"
16159    # Do not save /bin paths to all_fixpath_prefixes!
16160  else
16161    # Not in mixed or Windows style, start by that.
16162    new_path=`cmd //c echo $new_path`
16163
16164  input_path="$new_path"
16165  # Check if we need to convert this using DOS-style short mode. If the path
16166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16167  # take no chances and rewrite it.
16168  # Note: m4 eats our [], so we need to use [ and ] instead.
16169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16170  if test "x$has_forbidden_chars" != x; then
16171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16172    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16173  fi
16174
16175    # Output is in $new_path
16176
16177  windows_path="$new_path"
16178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16179    unix_path=`$CYGPATH -u "$windows_path"`
16180    new_path="$unix_path"
16181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16183    new_path="$unix_path"
16184  fi
16185
16186    # remove trailing .exe if any
16187    new_path="${new_path/%.exe/}"
16188
16189    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16190    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16191  fi
16192
16193  else
16194    # We're on a posix platform. Hooray! :)
16195    # First separate the path from the arguments. This will split at the first
16196    # space.
16197    complete="$FOUND_MAKE"
16198    path="${complete%% *}"
16199    tmp="$complete EOL"
16200    arguments="${tmp#* }"
16201
16202    # Cannot rely on the command "which" here since it doesn't always work.
16203    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16204    if test -z "$is_absolute_path"; then
16205      # Path to executable is not absolute. Find it.
16206      IFS_save="$IFS"
16207      IFS=:
16208      for p in $PATH; do
16209        if test -f "$p/$path" && test -x "$p/$path"; then
16210          new_path="$p/$path"
16211          break
16212        fi
16213      done
16214      IFS="$IFS_save"
16215    else
16216      # This is an absolute path, we can use it without further modifications.
16217      new_path="$path"
16218    fi
16219
16220    if test "x$new_path" = x; then
16221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16222$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16223      has_space=`$ECHO "$complete" | $GREP " "`
16224      if test "x$has_space" != x; then
16225        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16226$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16227      fi
16228      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16229    fi
16230  fi
16231
16232  # Now join together the path and the arguments once again
16233  if test "x$arguments" != xEOL; then
16234    new_complete="$new_path ${arguments% *}"
16235  else
16236    new_complete="$new_path"
16237  fi
16238
16239  if test "x$complete" != "x$new_complete"; then
16240    FOUND_MAKE="$new_complete"
16241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16242$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16243  fi
16244
16245        fi
16246      fi
16247    fi
16248  fi
16249
16250    fi
16251
16252    if test "x$FOUND_MAKE" = x; then
16253      if test "x$TOOLCHAIN_PATH" != x; then
16254        # We have a toolchain path, check that as well before giving up.
16255        OLD_PATH=$PATH
16256        PATH=$TOOLCHAIN_PATH:$PATH
16257        for ac_prog in gmake
16258do
16259  # Extract the first word of "$ac_prog", so it can be a program name with args.
16260set dummy $ac_prog; ac_word=$2
16261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16262$as_echo_n "checking for $ac_word... " >&6; }
16263if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16264  $as_echo_n "(cached) " >&6
16265else
16266  case $CHECK_TOOLSDIR_GMAKE in
16267  [\\/]* | ?:[\\/]*)
16268  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16269  ;;
16270  *)
16271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16272for as_dir in $PATH
16273do
16274  IFS=$as_save_IFS
16275  test -z "$as_dir" && as_dir=.
16276    for ac_exec_ext in '' $ac_executable_extensions; do
16277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16278    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16280    break 2
16281  fi
16282done
16283  done
16284IFS=$as_save_IFS
16285
16286  ;;
16287esac
16288fi
16289CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16290if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16292$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16293else
16294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16295$as_echo "no" >&6; }
16296fi
16297
16298
16299  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16300done
16301
16302
16303  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16304  DESCRIPTION="gmake in tools-dir"
16305  if test "x$MAKE_CANDIDATE" != x; then
16306    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16307$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16308    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16309    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16310    if test "x$IS_GNU_MAKE" = x; then
16311      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16312$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16313    else
16314      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16315      if test "x$IS_MODERN_MAKE" = x; then
16316        { $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
16317$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;}
16318      else
16319        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16320          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16321            MAKE_EXPECTED_ENV='cygwin'
16322          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16323            MAKE_EXPECTED_ENV='msys'
16324          else
16325            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16326          fi
16327          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16328          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16329        else
16330          # Not relevant for non-Windows
16331          IS_MAKE_CORRECT_ENV=true
16332        fi
16333        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16334          { $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
16335$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;}
16336        else
16337          FOUND_MAKE=$MAKE_CANDIDATE
16338
16339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16340
16341  # First separate the path from the arguments. This will split at the first
16342  # space.
16343  complete="$FOUND_MAKE"
16344  path="${complete%% *}"
16345  tmp="$complete EOL"
16346  arguments="${tmp#* }"
16347
16348  # Input might be given as Windows format, start by converting to
16349  # unix format.
16350  new_path=`$CYGPATH -u "$path"`
16351
16352  # Now try to locate executable using which
16353  new_path=`$WHICH "$new_path" 2> /dev/null`
16354  # bat and cmd files are not always considered executable in cygwin causing which
16355  # to not find them
16356  if test "x$new_path" = x \
16357      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16358      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16359    new_path=`$CYGPATH -u "$path"`
16360  fi
16361  if test "x$new_path" = x; then
16362    # Oops. Which didn't find the executable.
16363    # The splitting of arguments from the executable at a space might have been incorrect,
16364    # since paths with space are more likely in Windows. Give it another try with the whole
16365    # argument.
16366    path="$complete"
16367    arguments="EOL"
16368    new_path=`$CYGPATH -u "$path"`
16369    new_path=`$WHICH "$new_path" 2> /dev/null`
16370    # bat and cmd files are not always considered executable in cygwin causing which
16371    # to not find them
16372    if test "x$new_path" = x \
16373        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16374        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16375      new_path=`$CYGPATH -u "$path"`
16376    fi
16377    if test "x$new_path" = x; then
16378      # It's still not found. Now this is an unrecoverable error.
16379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16380$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16381      has_space=`$ECHO "$complete" | $GREP " "`
16382      if test "x$has_space" != x; then
16383        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16384$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16385      fi
16386      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16387    fi
16388  fi
16389
16390  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16391  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16392  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16393  # "foo.exe" is OK but "foo" is an error.
16394  #
16395  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16396  # It is also a way to make sure we got the proper file name for the real test later on.
16397  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16398  if test "x$test_shortpath" = x; then
16399    # Short path failed, file does not exist as specified.
16400    # Try adding .exe or .cmd
16401    if test -f "${new_path}.exe"; then
16402      input_to_shortpath="${new_path}.exe"
16403    elif test -f "${new_path}.cmd"; then
16404      input_to_shortpath="${new_path}.cmd"
16405    else
16406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16407$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16408      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16409$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16410      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16411    fi
16412  else
16413    input_to_shortpath="$new_path"
16414  fi
16415
16416  # Call helper function which possibly converts this using DOS-style short mode.
16417  # If so, the updated path is stored in $new_path.
16418  new_path="$input_to_shortpath"
16419
16420  input_path="$input_to_shortpath"
16421  # Check if we need to convert this using DOS-style short mode. If the path
16422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16423  # take no chances and rewrite it.
16424  # Note: m4 eats our [], so we need to use [ and ] instead.
16425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16426  if test "x$has_forbidden_chars" != x; then
16427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16431      # Going to short mode and back again did indeed matter. Since short mode is
16432      # case insensitive, let's make it lowercase to improve readability.
16433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16434      # Now convert it back to Unix-stile (cygpath)
16435      input_path=`$CYGPATH -u "$shortmode_path"`
16436      new_path="$input_path"
16437    fi
16438  fi
16439
16440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16441  if test "x$test_cygdrive_prefix" = x; then
16442    # As a simple fix, exclude /usr/bin since it's not a real path.
16443    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16445      # a path prefixed by /cygdrive for fixpath to work.
16446      new_path="$CYGWIN_ROOT_PATH$input_path"
16447    fi
16448  fi
16449
16450  # remove trailing .exe if any
16451  new_path="${new_path/%.exe/}"
16452
16453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16454
16455  # First separate the path from the arguments. This will split at the first
16456  # space.
16457  complete="$FOUND_MAKE"
16458  path="${complete%% *}"
16459  tmp="$complete EOL"
16460  arguments="${tmp#* }"
16461
16462  # Input might be given as Windows format, start by converting to
16463  # unix format.
16464  new_path="$path"
16465
16466  windows_path="$new_path"
16467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16468    unix_path=`$CYGPATH -u "$windows_path"`
16469    new_path="$unix_path"
16470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16472    new_path="$unix_path"
16473  fi
16474
16475
16476  # Now try to locate executable using which
16477  new_path=`$WHICH "$new_path" 2> /dev/null`
16478
16479  if test "x$new_path" = x; then
16480    # Oops. Which didn't find the executable.
16481    # The splitting of arguments from the executable at a space might have been incorrect,
16482    # since paths with space are more likely in Windows. Give it another try with the whole
16483    # argument.
16484    path="$complete"
16485    arguments="EOL"
16486    new_path="$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
16498    new_path=`$WHICH "$new_path" 2> /dev/null`
16499
16500    if test "x$new_path" = x; then
16501      # It's still not found. Now this is an unrecoverable error.
16502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16503$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16504      has_space=`$ECHO "$complete" | $GREP " "`
16505      if test "x$has_space" != x; then
16506        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16507$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16508      fi
16509      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16510    fi
16511  fi
16512
16513  # Now new_path has a complete unix path to the binary
16514  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16515    # Keep paths in /bin as-is, but remove trailing .exe if any
16516    new_path="${new_path/%.exe/}"
16517    # Do not save /bin paths to all_fixpath_prefixes!
16518  else
16519    # Not in mixed or Windows style, start by that.
16520    new_path=`cmd //c echo $new_path`
16521
16522  input_path="$new_path"
16523  # Check if we need to convert this using DOS-style short mode. If the path
16524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16525  # take no chances and rewrite it.
16526  # Note: m4 eats our [], so we need to use [ and ] instead.
16527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16528  if test "x$has_forbidden_chars" != x; then
16529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16530    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16531  fi
16532
16533    # Output is in $new_path
16534
16535  windows_path="$new_path"
16536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16537    unix_path=`$CYGPATH -u "$windows_path"`
16538    new_path="$unix_path"
16539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16541    new_path="$unix_path"
16542  fi
16543
16544    # remove trailing .exe if any
16545    new_path="${new_path/%.exe/}"
16546
16547    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16548    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16549  fi
16550
16551  else
16552    # We're on a posix platform. Hooray! :)
16553    # First separate the path from the arguments. This will split at the first
16554    # space.
16555    complete="$FOUND_MAKE"
16556    path="${complete%% *}"
16557    tmp="$complete EOL"
16558    arguments="${tmp#* }"
16559
16560    # Cannot rely on the command "which" here since it doesn't always work.
16561    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16562    if test -z "$is_absolute_path"; then
16563      # Path to executable is not absolute. Find it.
16564      IFS_save="$IFS"
16565      IFS=:
16566      for p in $PATH; do
16567        if test -f "$p/$path" && test -x "$p/$path"; then
16568          new_path="$p/$path"
16569          break
16570        fi
16571      done
16572      IFS="$IFS_save"
16573    else
16574      # This is an absolute path, we can use it without further modifications.
16575      new_path="$path"
16576    fi
16577
16578    if test "x$new_path" = x; then
16579      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16580$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16581      has_space=`$ECHO "$complete" | $GREP " "`
16582      if test "x$has_space" != x; then
16583        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16584$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16585      fi
16586      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16587    fi
16588  fi
16589
16590  # Now join together the path and the arguments once again
16591  if test "x$arguments" != xEOL; then
16592    new_complete="$new_path ${arguments% *}"
16593  else
16594    new_complete="$new_path"
16595  fi
16596
16597  if test "x$complete" != "x$new_complete"; then
16598    FOUND_MAKE="$new_complete"
16599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16600$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16601  fi
16602
16603        fi
16604      fi
16605    fi
16606  fi
16607
16608        if test "x$FOUND_MAKE" = x; then
16609          for ac_prog in make
16610do
16611  # Extract the first word of "$ac_prog", so it can be a program name with args.
16612set dummy $ac_prog; ac_word=$2
16613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16614$as_echo_n "checking for $ac_word... " >&6; }
16615if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16616  $as_echo_n "(cached) " >&6
16617else
16618  case $CHECK_TOOLSDIR_MAKE in
16619  [\\/]* | ?:[\\/]*)
16620  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16621  ;;
16622  *)
16623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16624for as_dir in $PATH
16625do
16626  IFS=$as_save_IFS
16627  test -z "$as_dir" && as_dir=.
16628    for ac_exec_ext in '' $ac_executable_extensions; do
16629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16630    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16632    break 2
16633  fi
16634done
16635  done
16636IFS=$as_save_IFS
16637
16638  ;;
16639esac
16640fi
16641CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16642if test -n "$CHECK_TOOLSDIR_MAKE"; then
16643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16644$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16645else
16646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16647$as_echo "no" >&6; }
16648fi
16649
16650
16651  test -n "$CHECK_TOOLSDIR_MAKE" && break
16652done
16653
16654
16655  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16656  DESCRIPTION="make in tools-dir"
16657  if test "x$MAKE_CANDIDATE" != x; then
16658    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16659$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16660    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16661    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16662    if test "x$IS_GNU_MAKE" = x; then
16663      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16664$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16665    else
16666      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16667      if test "x$IS_MODERN_MAKE" = x; then
16668        { $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
16669$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;}
16670      else
16671        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16672          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16673            MAKE_EXPECTED_ENV='cygwin'
16674          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16675            MAKE_EXPECTED_ENV='msys'
16676          else
16677            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16678          fi
16679          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16680          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16681        else
16682          # Not relevant for non-Windows
16683          IS_MAKE_CORRECT_ENV=true
16684        fi
16685        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16686          { $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
16687$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;}
16688        else
16689          FOUND_MAKE=$MAKE_CANDIDATE
16690
16691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16692
16693  # First separate the path from the arguments. This will split at the first
16694  # space.
16695  complete="$FOUND_MAKE"
16696  path="${complete%% *}"
16697  tmp="$complete EOL"
16698  arguments="${tmp#* }"
16699
16700  # Input might be given as Windows format, start by converting to
16701  # unix format.
16702  new_path=`$CYGPATH -u "$path"`
16703
16704  # Now try to locate executable using which
16705  new_path=`$WHICH "$new_path" 2> /dev/null`
16706  # bat and cmd files are not always considered executable in cygwin causing which
16707  # to not find them
16708  if test "x$new_path" = x \
16709      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16710      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16711    new_path=`$CYGPATH -u "$path"`
16712  fi
16713  if test "x$new_path" = x; then
16714    # Oops. Which didn't find the executable.
16715    # The splitting of arguments from the executable at a space might have been incorrect,
16716    # since paths with space are more likely in Windows. Give it another try with the whole
16717    # argument.
16718    path="$complete"
16719    arguments="EOL"
16720    new_path=`$CYGPATH -u "$path"`
16721    new_path=`$WHICH "$new_path" 2> /dev/null`
16722    # bat and cmd files are not always considered executable in cygwin causing which
16723    # to not find them
16724    if test "x$new_path" = x \
16725        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16726        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16727      new_path=`$CYGPATH -u "$path"`
16728    fi
16729    if test "x$new_path" = x; then
16730      # It's still not found. Now this is an unrecoverable error.
16731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16732$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16733      has_space=`$ECHO "$complete" | $GREP " "`
16734      if test "x$has_space" != x; then
16735        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16736$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16737      fi
16738      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16739    fi
16740  fi
16741
16742  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16743  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16744  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16745  # "foo.exe" is OK but "foo" is an error.
16746  #
16747  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16748  # It is also a way to make sure we got the proper file name for the real test later on.
16749  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16750  if test "x$test_shortpath" = x; then
16751    # Short path failed, file does not exist as specified.
16752    # Try adding .exe or .cmd
16753    if test -f "${new_path}.exe"; then
16754      input_to_shortpath="${new_path}.exe"
16755    elif test -f "${new_path}.cmd"; then
16756      input_to_shortpath="${new_path}.cmd"
16757    else
16758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16759$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16760      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16761$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16762      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16763    fi
16764  else
16765    input_to_shortpath="$new_path"
16766  fi
16767
16768  # Call helper function which possibly converts this using DOS-style short mode.
16769  # If so, the updated path is stored in $new_path.
16770  new_path="$input_to_shortpath"
16771
16772  input_path="$input_to_shortpath"
16773  # Check if we need to convert this using DOS-style short mode. If the path
16774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16775  # take no chances and rewrite it.
16776  # Note: m4 eats our [], so we need to use [ and ] instead.
16777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16778  if test "x$has_forbidden_chars" != x; then
16779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16780    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16781    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16782    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16783      # Going to short mode and back again did indeed matter. Since short mode is
16784      # case insensitive, let's make it lowercase to improve readability.
16785      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16786      # Now convert it back to Unix-stile (cygpath)
16787      input_path=`$CYGPATH -u "$shortmode_path"`
16788      new_path="$input_path"
16789    fi
16790  fi
16791
16792  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16793  if test "x$test_cygdrive_prefix" = x; then
16794    # As a simple fix, exclude /usr/bin since it's not a real path.
16795    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16796      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16797      # a path prefixed by /cygdrive for fixpath to work.
16798      new_path="$CYGWIN_ROOT_PATH$input_path"
16799    fi
16800  fi
16801
16802  # remove trailing .exe if any
16803  new_path="${new_path/%.exe/}"
16804
16805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16806
16807  # First separate the path from the arguments. This will split at the first
16808  # space.
16809  complete="$FOUND_MAKE"
16810  path="${complete%% *}"
16811  tmp="$complete EOL"
16812  arguments="${tmp#* }"
16813
16814  # Input might be given as Windows format, start by converting to
16815  # unix format.
16816  new_path="$path"
16817
16818  windows_path="$new_path"
16819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16820    unix_path=`$CYGPATH -u "$windows_path"`
16821    new_path="$unix_path"
16822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16824    new_path="$unix_path"
16825  fi
16826
16827
16828  # Now try to locate executable using which
16829  new_path=`$WHICH "$new_path" 2> /dev/null`
16830
16831  if test "x$new_path" = x; then
16832    # Oops. Which didn't find the executable.
16833    # The splitting of arguments from the executable at a space might have been incorrect,
16834    # since paths with space are more likely in Windows. Give it another try with the whole
16835    # argument.
16836    path="$complete"
16837    arguments="EOL"
16838    new_path="$path"
16839
16840  windows_path="$new_path"
16841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16842    unix_path=`$CYGPATH -u "$windows_path"`
16843    new_path="$unix_path"
16844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16846    new_path="$unix_path"
16847  fi
16848
16849
16850    new_path=`$WHICH "$new_path" 2> /dev/null`
16851
16852    if test "x$new_path" = x; then
16853      # It's still not found. Now this is an unrecoverable error.
16854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16855$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16856      has_space=`$ECHO "$complete" | $GREP " "`
16857      if test "x$has_space" != x; then
16858        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16859$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16860      fi
16861      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16862    fi
16863  fi
16864
16865  # Now new_path has a complete unix path to the binary
16866  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16867    # Keep paths in /bin as-is, but remove trailing .exe if any
16868    new_path="${new_path/%.exe/}"
16869    # Do not save /bin paths to all_fixpath_prefixes!
16870  else
16871    # Not in mixed or Windows style, start by that.
16872    new_path=`cmd //c echo $new_path`
16873
16874  input_path="$new_path"
16875  # Check if we need to convert this using DOS-style short mode. If the path
16876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16877  # take no chances and rewrite it.
16878  # Note: m4 eats our [], so we need to use [ and ] instead.
16879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16880  if test "x$has_forbidden_chars" != x; then
16881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16882    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16883  fi
16884
16885    # Output is in $new_path
16886
16887  windows_path="$new_path"
16888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16889    unix_path=`$CYGPATH -u "$windows_path"`
16890    new_path="$unix_path"
16891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16893    new_path="$unix_path"
16894  fi
16895
16896    # remove trailing .exe if any
16897    new_path="${new_path/%.exe/}"
16898
16899    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16900    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16901  fi
16902
16903  else
16904    # We're on a posix platform. Hooray! :)
16905    # First separate the path from the arguments. This will split at the first
16906    # space.
16907    complete="$FOUND_MAKE"
16908    path="${complete%% *}"
16909    tmp="$complete EOL"
16910    arguments="${tmp#* }"
16911
16912    # Cannot rely on the command "which" here since it doesn't always work.
16913    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16914    if test -z "$is_absolute_path"; then
16915      # Path to executable is not absolute. Find it.
16916      IFS_save="$IFS"
16917      IFS=:
16918      for p in $PATH; do
16919        if test -f "$p/$path" && test -x "$p/$path"; then
16920          new_path="$p/$path"
16921          break
16922        fi
16923      done
16924      IFS="$IFS_save"
16925    else
16926      # This is an absolute path, we can use it without further modifications.
16927      new_path="$path"
16928    fi
16929
16930    if test "x$new_path" = x; then
16931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16932$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16933      has_space=`$ECHO "$complete" | $GREP " "`
16934      if test "x$has_space" != x; then
16935        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16936$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16937      fi
16938      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16939    fi
16940  fi
16941
16942  # Now join together the path and the arguments once again
16943  if test "x$arguments" != xEOL; then
16944    new_complete="$new_path ${arguments% *}"
16945  else
16946    new_complete="$new_path"
16947  fi
16948
16949  if test "x$complete" != "x$new_complete"; then
16950    FOUND_MAKE="$new_complete"
16951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16952$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16953  fi
16954
16955        fi
16956      fi
16957    fi
16958  fi
16959
16960        fi
16961        PATH=$OLD_PATH
16962      fi
16963    fi
16964
16965    if test "x$FOUND_MAKE" = x; then
16966      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
16967    fi
16968  fi
16969
16970  MAKE=$FOUND_MAKE
16971
16972  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
16973$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
16974
16975
16976
16977  # Test if find supports -delete
16978  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
16979$as_echo_n "checking if find supports -delete... " >&6; }
16980  FIND_DELETE="-delete"
16981
16982  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
16983
16984  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
16985
16986  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
16987  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
16988    # No, it does not.
16989    rm $DELETEDIR/TestIfFindSupportsDelete
16990    FIND_DELETE="-exec rm \{\} \+"
16991    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16992$as_echo "no" >&6; }
16993  else
16994    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16995$as_echo "yes" >&6; }
16996  fi
16997  rmdir $DELETEDIR
16998
16999
17000
17001  # These tools might not be installed by default,
17002  # need hint on how to install them.
17003
17004
17005
17006  # Publish this variable in the help.
17007
17008
17009  if test "x$UNZIP" = x; then
17010    # The variable is not set by user, try to locate tool using the code snippet
17011    for ac_prog in unzip
17012do
17013  # Extract the first word of "$ac_prog", so it can be a program name with args.
17014set dummy $ac_prog; ac_word=$2
17015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17016$as_echo_n "checking for $ac_word... " >&6; }
17017if ${ac_cv_path_UNZIP+:} false; then :
17018  $as_echo_n "(cached) " >&6
17019else
17020  case $UNZIP in
17021  [\\/]* | ?:[\\/]*)
17022  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17023  ;;
17024  *)
17025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17026for as_dir in $PATH
17027do
17028  IFS=$as_save_IFS
17029  test -z "$as_dir" && as_dir=.
17030    for ac_exec_ext in '' $ac_executable_extensions; do
17031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17032    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17034    break 2
17035  fi
17036done
17037  done
17038IFS=$as_save_IFS
17039
17040  ;;
17041esac
17042fi
17043UNZIP=$ac_cv_path_UNZIP
17044if test -n "$UNZIP"; then
17045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17046$as_echo "$UNZIP" >&6; }
17047else
17048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17049$as_echo "no" >&6; }
17050fi
17051
17052
17053  test -n "$UNZIP" && break
17054done
17055
17056  else
17057    # The variable is set, but is it from the command line or the environment?
17058
17059    # Try to remove the string !UNZIP! from our list.
17060    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17061    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17062      # If it failed, the variable was not from the command line. Ignore it,
17063      # but warn the user (except for BASH, which is always set by the calling BASH).
17064      if test "xUNZIP" != xBASH; then
17065        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17066$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17067      fi
17068      # Try to locate tool using the code snippet
17069      for ac_prog in unzip
17070do
17071  # Extract the first word of "$ac_prog", so it can be a program name with args.
17072set dummy $ac_prog; ac_word=$2
17073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17074$as_echo_n "checking for $ac_word... " >&6; }
17075if ${ac_cv_path_UNZIP+:} false; then :
17076  $as_echo_n "(cached) " >&6
17077else
17078  case $UNZIP in
17079  [\\/]* | ?:[\\/]*)
17080  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17081  ;;
17082  *)
17083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17084for as_dir in $PATH
17085do
17086  IFS=$as_save_IFS
17087  test -z "$as_dir" && as_dir=.
17088    for ac_exec_ext in '' $ac_executable_extensions; do
17089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17090    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17092    break 2
17093  fi
17094done
17095  done
17096IFS=$as_save_IFS
17097
17098  ;;
17099esac
17100fi
17101UNZIP=$ac_cv_path_UNZIP
17102if test -n "$UNZIP"; then
17103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17104$as_echo "$UNZIP" >&6; }
17105else
17106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17107$as_echo "no" >&6; }
17108fi
17109
17110
17111  test -n "$UNZIP" && break
17112done
17113
17114    else
17115      # If it succeeded, then it was overridden by the user. We will use it
17116      # for the tool.
17117
17118      # First remove it from the list of overridden variables, so we can test
17119      # for unknown variables in the end.
17120      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17121
17122      # Check if the provided tool contains a complete path.
17123      tool_specified="$UNZIP"
17124      tool_basename="${tool_specified##*/}"
17125      if test "x$tool_basename" = "x$tool_specified"; then
17126        # A command without a complete path is provided, search $PATH.
17127        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17128$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17129        # Extract the first word of "$tool_basename", so it can be a program name with args.
17130set dummy $tool_basename; ac_word=$2
17131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17132$as_echo_n "checking for $ac_word... " >&6; }
17133if ${ac_cv_path_UNZIP+:} false; then :
17134  $as_echo_n "(cached) " >&6
17135else
17136  case $UNZIP in
17137  [\\/]* | ?:[\\/]*)
17138  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17139  ;;
17140  *)
17141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17142for as_dir in $PATH
17143do
17144  IFS=$as_save_IFS
17145  test -z "$as_dir" && as_dir=.
17146    for ac_exec_ext in '' $ac_executable_extensions; do
17147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17148    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17150    break 2
17151  fi
17152done
17153  done
17154IFS=$as_save_IFS
17155
17156  ;;
17157esac
17158fi
17159UNZIP=$ac_cv_path_UNZIP
17160if test -n "$UNZIP"; then
17161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17162$as_echo "$UNZIP" >&6; }
17163else
17164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17165$as_echo "no" >&6; }
17166fi
17167
17168
17169        if test "x$UNZIP" = x; then
17170          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17171        fi
17172      else
17173        # Otherwise we believe it is a complete path. Use it as it is.
17174        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17175$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17176        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17177$as_echo_n "checking for UNZIP... " >&6; }
17178        if test ! -x "$tool_specified"; then
17179          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17180$as_echo "not found" >&6; }
17181          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17182        fi
17183        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17184$as_echo "$tool_specified" >&6; }
17185      fi
17186    fi
17187  fi
17188
17189
17190
17191  if test "x$UNZIP" = x; then
17192    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17193  fi
17194
17195
17196
17197
17198
17199  # Publish this variable in the help.
17200
17201
17202  if test "x$ZIP" = x; then
17203    # The variable is not set by user, try to locate tool using the code snippet
17204    for ac_prog in zip
17205do
17206  # Extract the first word of "$ac_prog", so it can be a program name with args.
17207set dummy $ac_prog; ac_word=$2
17208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17209$as_echo_n "checking for $ac_word... " >&6; }
17210if ${ac_cv_path_ZIP+:} false; then :
17211  $as_echo_n "(cached) " >&6
17212else
17213  case $ZIP in
17214  [\\/]* | ?:[\\/]*)
17215  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17216  ;;
17217  *)
17218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17219for as_dir in $PATH
17220do
17221  IFS=$as_save_IFS
17222  test -z "$as_dir" && as_dir=.
17223    for ac_exec_ext in '' $ac_executable_extensions; do
17224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17225    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17227    break 2
17228  fi
17229done
17230  done
17231IFS=$as_save_IFS
17232
17233  ;;
17234esac
17235fi
17236ZIP=$ac_cv_path_ZIP
17237if test -n "$ZIP"; then
17238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17239$as_echo "$ZIP" >&6; }
17240else
17241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17242$as_echo "no" >&6; }
17243fi
17244
17245
17246  test -n "$ZIP" && break
17247done
17248
17249  else
17250    # The variable is set, but is it from the command line or the environment?
17251
17252    # Try to remove the string !ZIP! from our list.
17253    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17254    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17255      # If it failed, the variable was not from the command line. Ignore it,
17256      # but warn the user (except for BASH, which is always set by the calling BASH).
17257      if test "xZIP" != xBASH; then
17258        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17259$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17260      fi
17261      # Try to locate tool using the code snippet
17262      for ac_prog in zip
17263do
17264  # Extract the first word of "$ac_prog", so it can be a program name with args.
17265set dummy $ac_prog; ac_word=$2
17266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17267$as_echo_n "checking for $ac_word... " >&6; }
17268if ${ac_cv_path_ZIP+:} false; then :
17269  $as_echo_n "(cached) " >&6
17270else
17271  case $ZIP in
17272  [\\/]* | ?:[\\/]*)
17273  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17274  ;;
17275  *)
17276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17277for as_dir in $PATH
17278do
17279  IFS=$as_save_IFS
17280  test -z "$as_dir" && as_dir=.
17281    for ac_exec_ext in '' $ac_executable_extensions; do
17282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17283    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17285    break 2
17286  fi
17287done
17288  done
17289IFS=$as_save_IFS
17290
17291  ;;
17292esac
17293fi
17294ZIP=$ac_cv_path_ZIP
17295if test -n "$ZIP"; then
17296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17297$as_echo "$ZIP" >&6; }
17298else
17299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17300$as_echo "no" >&6; }
17301fi
17302
17303
17304  test -n "$ZIP" && break
17305done
17306
17307    else
17308      # If it succeeded, then it was overridden by the user. We will use it
17309      # for the tool.
17310
17311      # First remove it from the list of overridden variables, so we can test
17312      # for unknown variables in the end.
17313      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17314
17315      # Check if the provided tool contains a complete path.
17316      tool_specified="$ZIP"
17317      tool_basename="${tool_specified##*/}"
17318      if test "x$tool_basename" = "x$tool_specified"; then
17319        # A command without a complete path is provided, search $PATH.
17320        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17321$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17322        # Extract the first word of "$tool_basename", so it can be a program name with args.
17323set dummy $tool_basename; ac_word=$2
17324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17325$as_echo_n "checking for $ac_word... " >&6; }
17326if ${ac_cv_path_ZIP+:} false; then :
17327  $as_echo_n "(cached) " >&6
17328else
17329  case $ZIP in
17330  [\\/]* | ?:[\\/]*)
17331  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17332  ;;
17333  *)
17334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17335for as_dir in $PATH
17336do
17337  IFS=$as_save_IFS
17338  test -z "$as_dir" && as_dir=.
17339    for ac_exec_ext in '' $ac_executable_extensions; do
17340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17341    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17343    break 2
17344  fi
17345done
17346  done
17347IFS=$as_save_IFS
17348
17349  ;;
17350esac
17351fi
17352ZIP=$ac_cv_path_ZIP
17353if test -n "$ZIP"; then
17354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17355$as_echo "$ZIP" >&6; }
17356else
17357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17358$as_echo "no" >&6; }
17359fi
17360
17361
17362        if test "x$ZIP" = x; then
17363          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17364        fi
17365      else
17366        # Otherwise we believe it is a complete path. Use it as it is.
17367        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17368$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17369        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17370$as_echo_n "checking for ZIP... " >&6; }
17371        if test ! -x "$tool_specified"; then
17372          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17373$as_echo "not found" >&6; }
17374          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17375        fi
17376        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17377$as_echo "$tool_specified" >&6; }
17378      fi
17379    fi
17380  fi
17381
17382
17383
17384  if test "x$ZIP" = x; then
17385    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17386  fi
17387
17388
17389
17390  # Non-required basic tools
17391
17392
17393
17394  # Publish this variable in the help.
17395
17396
17397  if test "x$LDD" = x; then
17398    # The variable is not set by user, try to locate tool using the code snippet
17399    for ac_prog in ldd
17400do
17401  # Extract the first word of "$ac_prog", so it can be a program name with args.
17402set dummy $ac_prog; ac_word=$2
17403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17404$as_echo_n "checking for $ac_word... " >&6; }
17405if ${ac_cv_path_LDD+:} false; then :
17406  $as_echo_n "(cached) " >&6
17407else
17408  case $LDD in
17409  [\\/]* | ?:[\\/]*)
17410  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17411  ;;
17412  *)
17413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17414for as_dir in $PATH
17415do
17416  IFS=$as_save_IFS
17417  test -z "$as_dir" && as_dir=.
17418    for ac_exec_ext in '' $ac_executable_extensions; do
17419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17420    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17422    break 2
17423  fi
17424done
17425  done
17426IFS=$as_save_IFS
17427
17428  ;;
17429esac
17430fi
17431LDD=$ac_cv_path_LDD
17432if test -n "$LDD"; then
17433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17434$as_echo "$LDD" >&6; }
17435else
17436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17437$as_echo "no" >&6; }
17438fi
17439
17440
17441  test -n "$LDD" && break
17442done
17443
17444  else
17445    # The variable is set, but is it from the command line or the environment?
17446
17447    # Try to remove the string !LDD! from our list.
17448    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17449    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17450      # If it failed, the variable was not from the command line. Ignore it,
17451      # but warn the user (except for BASH, which is always set by the calling BASH).
17452      if test "xLDD" != xBASH; then
17453        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17454$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17455      fi
17456      # Try to locate tool using the code snippet
17457      for ac_prog in ldd
17458do
17459  # Extract the first word of "$ac_prog", so it can be a program name with args.
17460set dummy $ac_prog; ac_word=$2
17461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17462$as_echo_n "checking for $ac_word... " >&6; }
17463if ${ac_cv_path_LDD+:} false; then :
17464  $as_echo_n "(cached) " >&6
17465else
17466  case $LDD in
17467  [\\/]* | ?:[\\/]*)
17468  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17469  ;;
17470  *)
17471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17472for as_dir in $PATH
17473do
17474  IFS=$as_save_IFS
17475  test -z "$as_dir" && as_dir=.
17476    for ac_exec_ext in '' $ac_executable_extensions; do
17477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17478    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17480    break 2
17481  fi
17482done
17483  done
17484IFS=$as_save_IFS
17485
17486  ;;
17487esac
17488fi
17489LDD=$ac_cv_path_LDD
17490if test -n "$LDD"; then
17491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17492$as_echo "$LDD" >&6; }
17493else
17494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17495$as_echo "no" >&6; }
17496fi
17497
17498
17499  test -n "$LDD" && break
17500done
17501
17502    else
17503      # If it succeeded, then it was overridden by the user. We will use it
17504      # for the tool.
17505
17506      # First remove it from the list of overridden variables, so we can test
17507      # for unknown variables in the end.
17508      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17509
17510      # Check if the provided tool contains a complete path.
17511      tool_specified="$LDD"
17512      tool_basename="${tool_specified##*/}"
17513      if test "x$tool_basename" = "x$tool_specified"; then
17514        # A command without a complete path is provided, search $PATH.
17515        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17516$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17517        # Extract the first word of "$tool_basename", so it can be a program name with args.
17518set dummy $tool_basename; ac_word=$2
17519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17520$as_echo_n "checking for $ac_word... " >&6; }
17521if ${ac_cv_path_LDD+:} false; then :
17522  $as_echo_n "(cached) " >&6
17523else
17524  case $LDD in
17525  [\\/]* | ?:[\\/]*)
17526  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17527  ;;
17528  *)
17529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17530for as_dir in $PATH
17531do
17532  IFS=$as_save_IFS
17533  test -z "$as_dir" && as_dir=.
17534    for ac_exec_ext in '' $ac_executable_extensions; do
17535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17536    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17538    break 2
17539  fi
17540done
17541  done
17542IFS=$as_save_IFS
17543
17544  ;;
17545esac
17546fi
17547LDD=$ac_cv_path_LDD
17548if test -n "$LDD"; then
17549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17550$as_echo "$LDD" >&6; }
17551else
17552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17553$as_echo "no" >&6; }
17554fi
17555
17556
17557        if test "x$LDD" = x; then
17558          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17559        fi
17560      else
17561        # Otherwise we believe it is a complete path. Use it as it is.
17562        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17563$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17564        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17565$as_echo_n "checking for LDD... " >&6; }
17566        if test ! -x "$tool_specified"; then
17567          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17568$as_echo "not found" >&6; }
17569          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17570        fi
17571        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17572$as_echo "$tool_specified" >&6; }
17573      fi
17574    fi
17575  fi
17576
17577
17578  if test "x$LDD" = "x"; then
17579    # List shared lib dependencies is used for
17580    # debug output and checking for forbidden dependencies.
17581    # We can build without it.
17582    LDD="true"
17583  fi
17584
17585
17586  # Publish this variable in the help.
17587
17588
17589  if test "x$OTOOL" = x; then
17590    # The variable is not set by user, try to locate tool using the code snippet
17591    for ac_prog in otool
17592do
17593  # Extract the first word of "$ac_prog", so it can be a program name with args.
17594set dummy $ac_prog; ac_word=$2
17595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17596$as_echo_n "checking for $ac_word... " >&6; }
17597if ${ac_cv_path_OTOOL+:} false; then :
17598  $as_echo_n "(cached) " >&6
17599else
17600  case $OTOOL in
17601  [\\/]* | ?:[\\/]*)
17602  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17603  ;;
17604  *)
17605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17606for as_dir in $PATH
17607do
17608  IFS=$as_save_IFS
17609  test -z "$as_dir" && as_dir=.
17610    for ac_exec_ext in '' $ac_executable_extensions; do
17611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17612    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17614    break 2
17615  fi
17616done
17617  done
17618IFS=$as_save_IFS
17619
17620  ;;
17621esac
17622fi
17623OTOOL=$ac_cv_path_OTOOL
17624if test -n "$OTOOL"; then
17625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17626$as_echo "$OTOOL" >&6; }
17627else
17628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17629$as_echo "no" >&6; }
17630fi
17631
17632
17633  test -n "$OTOOL" && break
17634done
17635
17636  else
17637    # The variable is set, but is it from the command line or the environment?
17638
17639    # Try to remove the string !OTOOL! from our list.
17640    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17641    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17642      # If it failed, the variable was not from the command line. Ignore it,
17643      # but warn the user (except for BASH, which is always set by the calling BASH).
17644      if test "xOTOOL" != xBASH; then
17645        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17646$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17647      fi
17648      # Try to locate tool using the code snippet
17649      for ac_prog in otool
17650do
17651  # Extract the first word of "$ac_prog", so it can be a program name with args.
17652set dummy $ac_prog; ac_word=$2
17653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17654$as_echo_n "checking for $ac_word... " >&6; }
17655if ${ac_cv_path_OTOOL+:} false; then :
17656  $as_echo_n "(cached) " >&6
17657else
17658  case $OTOOL in
17659  [\\/]* | ?:[\\/]*)
17660  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17661  ;;
17662  *)
17663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17664for as_dir in $PATH
17665do
17666  IFS=$as_save_IFS
17667  test -z "$as_dir" && as_dir=.
17668    for ac_exec_ext in '' $ac_executable_extensions; do
17669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17670    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17672    break 2
17673  fi
17674done
17675  done
17676IFS=$as_save_IFS
17677
17678  ;;
17679esac
17680fi
17681OTOOL=$ac_cv_path_OTOOL
17682if test -n "$OTOOL"; then
17683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17684$as_echo "$OTOOL" >&6; }
17685else
17686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17687$as_echo "no" >&6; }
17688fi
17689
17690
17691  test -n "$OTOOL" && break
17692done
17693
17694    else
17695      # If it succeeded, then it was overridden by the user. We will use it
17696      # for the tool.
17697
17698      # First remove it from the list of overridden variables, so we can test
17699      # for unknown variables in the end.
17700      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17701
17702      # Check if the provided tool contains a complete path.
17703      tool_specified="$OTOOL"
17704      tool_basename="${tool_specified##*/}"
17705      if test "x$tool_basename" = "x$tool_specified"; then
17706        # A command without a complete path is provided, search $PATH.
17707        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17708$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17709        # Extract the first word of "$tool_basename", so it can be a program name with args.
17710set dummy $tool_basename; ac_word=$2
17711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17712$as_echo_n "checking for $ac_word... " >&6; }
17713if ${ac_cv_path_OTOOL+:} false; then :
17714  $as_echo_n "(cached) " >&6
17715else
17716  case $OTOOL in
17717  [\\/]* | ?:[\\/]*)
17718  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17719  ;;
17720  *)
17721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17722for as_dir in $PATH
17723do
17724  IFS=$as_save_IFS
17725  test -z "$as_dir" && as_dir=.
17726    for ac_exec_ext in '' $ac_executable_extensions; do
17727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17728    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17730    break 2
17731  fi
17732done
17733  done
17734IFS=$as_save_IFS
17735
17736  ;;
17737esac
17738fi
17739OTOOL=$ac_cv_path_OTOOL
17740if test -n "$OTOOL"; then
17741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17742$as_echo "$OTOOL" >&6; }
17743else
17744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17745$as_echo "no" >&6; }
17746fi
17747
17748
17749        if test "x$OTOOL" = x; then
17750          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17751        fi
17752      else
17753        # Otherwise we believe it is a complete path. Use it as it is.
17754        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
17755$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
17756        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
17757$as_echo_n "checking for OTOOL... " >&6; }
17758        if test ! -x "$tool_specified"; then
17759          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17760$as_echo "not found" >&6; }
17761          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
17762        fi
17763        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17764$as_echo "$tool_specified" >&6; }
17765      fi
17766    fi
17767  fi
17768
17769
17770  if test "x$OTOOL" = "x"; then
17771    OTOOL="true"
17772  fi
17773
17774
17775  # Publish this variable in the help.
17776
17777
17778  if test "x$READELF" = x; then
17779    # The variable is not set by user, try to locate tool using the code snippet
17780    for ac_prog in greadelf readelf
17781do
17782  # Extract the first word of "$ac_prog", so it can be a program name with args.
17783set dummy $ac_prog; ac_word=$2
17784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17785$as_echo_n "checking for $ac_word... " >&6; }
17786if ${ac_cv_path_READELF+:} false; then :
17787  $as_echo_n "(cached) " >&6
17788else
17789  case $READELF in
17790  [\\/]* | ?:[\\/]*)
17791  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17792  ;;
17793  *)
17794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17795for as_dir in $PATH
17796do
17797  IFS=$as_save_IFS
17798  test -z "$as_dir" && as_dir=.
17799    for ac_exec_ext in '' $ac_executable_extensions; do
17800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17801    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17803    break 2
17804  fi
17805done
17806  done
17807IFS=$as_save_IFS
17808
17809  ;;
17810esac
17811fi
17812READELF=$ac_cv_path_READELF
17813if test -n "$READELF"; then
17814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17815$as_echo "$READELF" >&6; }
17816else
17817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17818$as_echo "no" >&6; }
17819fi
17820
17821
17822  test -n "$READELF" && break
17823done
17824
17825  else
17826    # The variable is set, but is it from the command line or the environment?
17827
17828    # Try to remove the string !READELF! from our list.
17829    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17830    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17831      # If it failed, the variable was not from the command line. Ignore it,
17832      # but warn the user (except for BASH, which is always set by the calling BASH).
17833      if test "xREADELF" != xBASH; then
17834        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17835$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17836      fi
17837      # Try to locate tool using the code snippet
17838      for ac_prog in greadelf readelf
17839do
17840  # Extract the first word of "$ac_prog", so it can be a program name with args.
17841set dummy $ac_prog; ac_word=$2
17842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17843$as_echo_n "checking for $ac_word... " >&6; }
17844if ${ac_cv_path_READELF+:} false; then :
17845  $as_echo_n "(cached) " >&6
17846else
17847  case $READELF in
17848  [\\/]* | ?:[\\/]*)
17849  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17850  ;;
17851  *)
17852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17853for as_dir in $PATH
17854do
17855  IFS=$as_save_IFS
17856  test -z "$as_dir" && as_dir=.
17857    for ac_exec_ext in '' $ac_executable_extensions; do
17858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17859    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17861    break 2
17862  fi
17863done
17864  done
17865IFS=$as_save_IFS
17866
17867  ;;
17868esac
17869fi
17870READELF=$ac_cv_path_READELF
17871if test -n "$READELF"; then
17872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17873$as_echo "$READELF" >&6; }
17874else
17875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17876$as_echo "no" >&6; }
17877fi
17878
17879
17880  test -n "$READELF" && break
17881done
17882
17883    else
17884      # If it succeeded, then it was overridden by the user. We will use it
17885      # for the tool.
17886
17887      # First remove it from the list of overridden variables, so we can test
17888      # for unknown variables in the end.
17889      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17890
17891      # Check if the provided tool contains a complete path.
17892      tool_specified="$READELF"
17893      tool_basename="${tool_specified##*/}"
17894      if test "x$tool_basename" = "x$tool_specified"; then
17895        # A command without a complete path is provided, search $PATH.
17896        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17897$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17898        # Extract the first word of "$tool_basename", so it can be a program name with args.
17899set dummy $tool_basename; ac_word=$2
17900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17901$as_echo_n "checking for $ac_word... " >&6; }
17902if ${ac_cv_path_READELF+:} false; then :
17903  $as_echo_n "(cached) " >&6
17904else
17905  case $READELF in
17906  [\\/]* | ?:[\\/]*)
17907  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17908  ;;
17909  *)
17910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17911for as_dir in $PATH
17912do
17913  IFS=$as_save_IFS
17914  test -z "$as_dir" && as_dir=.
17915    for ac_exec_ext in '' $ac_executable_extensions; do
17916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17917    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17919    break 2
17920  fi
17921done
17922  done
17923IFS=$as_save_IFS
17924
17925  ;;
17926esac
17927fi
17928READELF=$ac_cv_path_READELF
17929if test -n "$READELF"; then
17930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17931$as_echo "$READELF" >&6; }
17932else
17933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17934$as_echo "no" >&6; }
17935fi
17936
17937
17938        if test "x$READELF" = x; then
17939          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17940        fi
17941      else
17942        # Otherwise we believe it is a complete path. Use it as it is.
17943        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
17944$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
17945        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
17946$as_echo_n "checking for READELF... " >&6; }
17947        if test ! -x "$tool_specified"; then
17948          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17949$as_echo "not found" >&6; }
17950          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
17951        fi
17952        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17953$as_echo "$tool_specified" >&6; }
17954      fi
17955    fi
17956  fi
17957
17958
17959
17960
17961  # Publish this variable in the help.
17962
17963
17964  if test "x$HG" = x; then
17965    # The variable is not set by user, try to locate tool using the code snippet
17966    for ac_prog in hg
17967do
17968  # Extract the first word of "$ac_prog", so it can be a program name with args.
17969set dummy $ac_prog; ac_word=$2
17970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17971$as_echo_n "checking for $ac_word... " >&6; }
17972if ${ac_cv_path_HG+:} false; then :
17973  $as_echo_n "(cached) " >&6
17974else
17975  case $HG in
17976  [\\/]* | ?:[\\/]*)
17977  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17978  ;;
17979  *)
17980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17981for as_dir in $PATH
17982do
17983  IFS=$as_save_IFS
17984  test -z "$as_dir" && as_dir=.
17985    for ac_exec_ext in '' $ac_executable_extensions; do
17986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17987    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17989    break 2
17990  fi
17991done
17992  done
17993IFS=$as_save_IFS
17994
17995  ;;
17996esac
17997fi
17998HG=$ac_cv_path_HG
17999if test -n "$HG"; then
18000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18001$as_echo "$HG" >&6; }
18002else
18003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18004$as_echo "no" >&6; }
18005fi
18006
18007
18008  test -n "$HG" && break
18009done
18010
18011  else
18012    # The variable is set, but is it from the command line or the environment?
18013
18014    # Try to remove the string !HG! from our list.
18015    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18016    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18017      # If it failed, the variable was not from the command line. Ignore it,
18018      # but warn the user (except for BASH, which is always set by the calling BASH).
18019      if test "xHG" != xBASH; then
18020        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18021$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18022      fi
18023      # Try to locate tool using the code snippet
18024      for ac_prog in hg
18025do
18026  # Extract the first word of "$ac_prog", so it can be a program name with args.
18027set dummy $ac_prog; ac_word=$2
18028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18029$as_echo_n "checking for $ac_word... " >&6; }
18030if ${ac_cv_path_HG+:} false; then :
18031  $as_echo_n "(cached) " >&6
18032else
18033  case $HG in
18034  [\\/]* | ?:[\\/]*)
18035  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18036  ;;
18037  *)
18038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18039for as_dir in $PATH
18040do
18041  IFS=$as_save_IFS
18042  test -z "$as_dir" && as_dir=.
18043    for ac_exec_ext in '' $ac_executable_extensions; do
18044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18045    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18047    break 2
18048  fi
18049done
18050  done
18051IFS=$as_save_IFS
18052
18053  ;;
18054esac
18055fi
18056HG=$ac_cv_path_HG
18057if test -n "$HG"; then
18058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18059$as_echo "$HG" >&6; }
18060else
18061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18062$as_echo "no" >&6; }
18063fi
18064
18065
18066  test -n "$HG" && break
18067done
18068
18069    else
18070      # If it succeeded, then it was overridden by the user. We will use it
18071      # for the tool.
18072
18073      # First remove it from the list of overridden variables, so we can test
18074      # for unknown variables in the end.
18075      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18076
18077      # Check if the provided tool contains a complete path.
18078      tool_specified="$HG"
18079      tool_basename="${tool_specified##*/}"
18080      if test "x$tool_basename" = "x$tool_specified"; then
18081        # A command without a complete path is provided, search $PATH.
18082        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18083$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18084        # Extract the first word of "$tool_basename", so it can be a program name with args.
18085set dummy $tool_basename; ac_word=$2
18086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18087$as_echo_n "checking for $ac_word... " >&6; }
18088if ${ac_cv_path_HG+:} false; then :
18089  $as_echo_n "(cached) " >&6
18090else
18091  case $HG in
18092  [\\/]* | ?:[\\/]*)
18093  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18094  ;;
18095  *)
18096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18097for as_dir in $PATH
18098do
18099  IFS=$as_save_IFS
18100  test -z "$as_dir" && as_dir=.
18101    for ac_exec_ext in '' $ac_executable_extensions; do
18102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18103    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18105    break 2
18106  fi
18107done
18108  done
18109IFS=$as_save_IFS
18110
18111  ;;
18112esac
18113fi
18114HG=$ac_cv_path_HG
18115if test -n "$HG"; then
18116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18117$as_echo "$HG" >&6; }
18118else
18119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18120$as_echo "no" >&6; }
18121fi
18122
18123
18124        if test "x$HG" = x; then
18125          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18126        fi
18127      else
18128        # Otherwise we believe it is a complete path. Use it as it is.
18129        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18130$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18131        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18132$as_echo_n "checking for HG... " >&6; }
18133        if test ! -x "$tool_specified"; then
18134          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18135$as_echo "not found" >&6; }
18136          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18137        fi
18138        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18139$as_echo "$tool_specified" >&6; }
18140      fi
18141    fi
18142  fi
18143
18144
18145
18146
18147  # Publish this variable in the help.
18148
18149
18150  if test "x$STAT" = x; then
18151    # The variable is not set by user, try to locate tool using the code snippet
18152    for ac_prog in stat
18153do
18154  # Extract the first word of "$ac_prog", so it can be a program name with args.
18155set dummy $ac_prog; ac_word=$2
18156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18157$as_echo_n "checking for $ac_word... " >&6; }
18158if ${ac_cv_path_STAT+:} false; then :
18159  $as_echo_n "(cached) " >&6
18160else
18161  case $STAT in
18162  [\\/]* | ?:[\\/]*)
18163  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18164  ;;
18165  *)
18166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18167for as_dir in $PATH
18168do
18169  IFS=$as_save_IFS
18170  test -z "$as_dir" && as_dir=.
18171    for ac_exec_ext in '' $ac_executable_extensions; do
18172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18173    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18175    break 2
18176  fi
18177done
18178  done
18179IFS=$as_save_IFS
18180
18181  ;;
18182esac
18183fi
18184STAT=$ac_cv_path_STAT
18185if test -n "$STAT"; then
18186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18187$as_echo "$STAT" >&6; }
18188else
18189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18190$as_echo "no" >&6; }
18191fi
18192
18193
18194  test -n "$STAT" && break
18195done
18196
18197  else
18198    # The variable is set, but is it from the command line or the environment?
18199
18200    # Try to remove the string !STAT! from our list.
18201    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18202    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18203      # If it failed, the variable was not from the command line. Ignore it,
18204      # but warn the user (except for BASH, which is always set by the calling BASH).
18205      if test "xSTAT" != xBASH; then
18206        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18207$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18208      fi
18209      # Try to locate tool using the code snippet
18210      for ac_prog in stat
18211do
18212  # Extract the first word of "$ac_prog", so it can be a program name with args.
18213set dummy $ac_prog; ac_word=$2
18214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18215$as_echo_n "checking for $ac_word... " >&6; }
18216if ${ac_cv_path_STAT+:} false; then :
18217  $as_echo_n "(cached) " >&6
18218else
18219  case $STAT in
18220  [\\/]* | ?:[\\/]*)
18221  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18222  ;;
18223  *)
18224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18225for as_dir in $PATH
18226do
18227  IFS=$as_save_IFS
18228  test -z "$as_dir" && as_dir=.
18229    for ac_exec_ext in '' $ac_executable_extensions; do
18230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18231    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18233    break 2
18234  fi
18235done
18236  done
18237IFS=$as_save_IFS
18238
18239  ;;
18240esac
18241fi
18242STAT=$ac_cv_path_STAT
18243if test -n "$STAT"; then
18244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18245$as_echo "$STAT" >&6; }
18246else
18247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18248$as_echo "no" >&6; }
18249fi
18250
18251
18252  test -n "$STAT" && break
18253done
18254
18255    else
18256      # If it succeeded, then it was overridden by the user. We will use it
18257      # for the tool.
18258
18259      # First remove it from the list of overridden variables, so we can test
18260      # for unknown variables in the end.
18261      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18262
18263      # Check if the provided tool contains a complete path.
18264      tool_specified="$STAT"
18265      tool_basename="${tool_specified##*/}"
18266      if test "x$tool_basename" = "x$tool_specified"; then
18267        # A command without a complete path is provided, search $PATH.
18268        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18269$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18270        # Extract the first word of "$tool_basename", so it can be a program name with args.
18271set dummy $tool_basename; ac_word=$2
18272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18273$as_echo_n "checking for $ac_word... " >&6; }
18274if ${ac_cv_path_STAT+:} false; then :
18275  $as_echo_n "(cached) " >&6
18276else
18277  case $STAT in
18278  [\\/]* | ?:[\\/]*)
18279  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18280  ;;
18281  *)
18282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18283for as_dir in $PATH
18284do
18285  IFS=$as_save_IFS
18286  test -z "$as_dir" && as_dir=.
18287    for ac_exec_ext in '' $ac_executable_extensions; do
18288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18289    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18291    break 2
18292  fi
18293done
18294  done
18295IFS=$as_save_IFS
18296
18297  ;;
18298esac
18299fi
18300STAT=$ac_cv_path_STAT
18301if test -n "$STAT"; then
18302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18303$as_echo "$STAT" >&6; }
18304else
18305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18306$as_echo "no" >&6; }
18307fi
18308
18309
18310        if test "x$STAT" = x; then
18311          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18312        fi
18313      else
18314        # Otherwise we believe it is a complete path. Use it as it is.
18315        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18316$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18317        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18318$as_echo_n "checking for STAT... " >&6; }
18319        if test ! -x "$tool_specified"; then
18320          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18321$as_echo "not found" >&6; }
18322          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18323        fi
18324        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18325$as_echo "$tool_specified" >&6; }
18326      fi
18327    fi
18328  fi
18329
18330
18331
18332
18333  # Publish this variable in the help.
18334
18335
18336  if test "x$TIME" = x; then
18337    # The variable is not set by user, try to locate tool using the code snippet
18338    for ac_prog in time
18339do
18340  # Extract the first word of "$ac_prog", so it can be a program name with args.
18341set dummy $ac_prog; ac_word=$2
18342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18343$as_echo_n "checking for $ac_word... " >&6; }
18344if ${ac_cv_path_TIME+:} false; then :
18345  $as_echo_n "(cached) " >&6
18346else
18347  case $TIME in
18348  [\\/]* | ?:[\\/]*)
18349  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18350  ;;
18351  *)
18352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18353for as_dir in $PATH
18354do
18355  IFS=$as_save_IFS
18356  test -z "$as_dir" && as_dir=.
18357    for ac_exec_ext in '' $ac_executable_extensions; do
18358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18359    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18361    break 2
18362  fi
18363done
18364  done
18365IFS=$as_save_IFS
18366
18367  ;;
18368esac
18369fi
18370TIME=$ac_cv_path_TIME
18371if test -n "$TIME"; then
18372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18373$as_echo "$TIME" >&6; }
18374else
18375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18376$as_echo "no" >&6; }
18377fi
18378
18379
18380  test -n "$TIME" && break
18381done
18382
18383  else
18384    # The variable is set, but is it from the command line or the environment?
18385
18386    # Try to remove the string !TIME! from our list.
18387    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18388    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18389      # If it failed, the variable was not from the command line. Ignore it,
18390      # but warn the user (except for BASH, which is always set by the calling BASH).
18391      if test "xTIME" != xBASH; then
18392        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18393$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18394      fi
18395      # Try to locate tool using the code snippet
18396      for ac_prog in time
18397do
18398  # Extract the first word of "$ac_prog", so it can be a program name with args.
18399set dummy $ac_prog; ac_word=$2
18400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18401$as_echo_n "checking for $ac_word... " >&6; }
18402if ${ac_cv_path_TIME+:} false; then :
18403  $as_echo_n "(cached) " >&6
18404else
18405  case $TIME in
18406  [\\/]* | ?:[\\/]*)
18407  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18408  ;;
18409  *)
18410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18411for as_dir in $PATH
18412do
18413  IFS=$as_save_IFS
18414  test -z "$as_dir" && as_dir=.
18415    for ac_exec_ext in '' $ac_executable_extensions; do
18416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18417    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18419    break 2
18420  fi
18421done
18422  done
18423IFS=$as_save_IFS
18424
18425  ;;
18426esac
18427fi
18428TIME=$ac_cv_path_TIME
18429if test -n "$TIME"; then
18430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18431$as_echo "$TIME" >&6; }
18432else
18433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18434$as_echo "no" >&6; }
18435fi
18436
18437
18438  test -n "$TIME" && break
18439done
18440
18441    else
18442      # If it succeeded, then it was overridden by the user. We will use it
18443      # for the tool.
18444
18445      # First remove it from the list of overridden variables, so we can test
18446      # for unknown variables in the end.
18447      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18448
18449      # Check if the provided tool contains a complete path.
18450      tool_specified="$TIME"
18451      tool_basename="${tool_specified##*/}"
18452      if test "x$tool_basename" = "x$tool_specified"; then
18453        # A command without a complete path is provided, search $PATH.
18454        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18455$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18456        # Extract the first word of "$tool_basename", so it can be a program name with args.
18457set dummy $tool_basename; ac_word=$2
18458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18459$as_echo_n "checking for $ac_word... " >&6; }
18460if ${ac_cv_path_TIME+:} false; then :
18461  $as_echo_n "(cached) " >&6
18462else
18463  case $TIME in
18464  [\\/]* | ?:[\\/]*)
18465  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18466  ;;
18467  *)
18468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18469for as_dir in $PATH
18470do
18471  IFS=$as_save_IFS
18472  test -z "$as_dir" && as_dir=.
18473    for ac_exec_ext in '' $ac_executable_extensions; do
18474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18475    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18477    break 2
18478  fi
18479done
18480  done
18481IFS=$as_save_IFS
18482
18483  ;;
18484esac
18485fi
18486TIME=$ac_cv_path_TIME
18487if test -n "$TIME"; then
18488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18489$as_echo "$TIME" >&6; }
18490else
18491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18492$as_echo "no" >&6; }
18493fi
18494
18495
18496        if test "x$TIME" = x; then
18497          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18498        fi
18499      else
18500        # Otherwise we believe it is a complete path. Use it as it is.
18501        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18502$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18503        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18504$as_echo_n "checking for TIME... " >&6; }
18505        if test ! -x "$tool_specified"; then
18506          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18507$as_echo "not found" >&6; }
18508          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18509        fi
18510        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18511$as_echo "$tool_specified" >&6; }
18512      fi
18513    fi
18514  fi
18515
18516
18517  # Check if it's GNU time
18518  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18519  if test "x$IS_GNU_TIME" != x; then
18520    IS_GNU_TIME=yes
18521  else
18522    IS_GNU_TIME=no
18523  fi
18524
18525
18526  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18527
18528
18529
18530  # Publish this variable in the help.
18531
18532
18533  if test "x$COMM" = x; then
18534    # The variable is not set by user, try to locate tool using the code snippet
18535    for ac_prog in comm
18536do
18537  # Extract the first word of "$ac_prog", so it can be a program name with args.
18538set dummy $ac_prog; ac_word=$2
18539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18540$as_echo_n "checking for $ac_word... " >&6; }
18541if ${ac_cv_path_COMM+:} false; then :
18542  $as_echo_n "(cached) " >&6
18543else
18544  case $COMM in
18545  [\\/]* | ?:[\\/]*)
18546  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18547  ;;
18548  *)
18549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18550for as_dir in $PATH
18551do
18552  IFS=$as_save_IFS
18553  test -z "$as_dir" && as_dir=.
18554    for ac_exec_ext in '' $ac_executable_extensions; do
18555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18556    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18558    break 2
18559  fi
18560done
18561  done
18562IFS=$as_save_IFS
18563
18564  ;;
18565esac
18566fi
18567COMM=$ac_cv_path_COMM
18568if test -n "$COMM"; then
18569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18570$as_echo "$COMM" >&6; }
18571else
18572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18573$as_echo "no" >&6; }
18574fi
18575
18576
18577  test -n "$COMM" && break
18578done
18579
18580  else
18581    # The variable is set, but is it from the command line or the environment?
18582
18583    # Try to remove the string !COMM! from our list.
18584    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18585    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18586      # If it failed, the variable was not from the command line. Ignore it,
18587      # but warn the user (except for BASH, which is always set by the calling BASH).
18588      if test "xCOMM" != xBASH; then
18589        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18590$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18591      fi
18592      # Try to locate tool using the code snippet
18593      for ac_prog in comm
18594do
18595  # Extract the first word of "$ac_prog", so it can be a program name with args.
18596set dummy $ac_prog; ac_word=$2
18597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18598$as_echo_n "checking for $ac_word... " >&6; }
18599if ${ac_cv_path_COMM+:} false; then :
18600  $as_echo_n "(cached) " >&6
18601else
18602  case $COMM in
18603  [\\/]* | ?:[\\/]*)
18604  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18605  ;;
18606  *)
18607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18608for as_dir in $PATH
18609do
18610  IFS=$as_save_IFS
18611  test -z "$as_dir" && as_dir=.
18612    for ac_exec_ext in '' $ac_executable_extensions; do
18613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18614    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18616    break 2
18617  fi
18618done
18619  done
18620IFS=$as_save_IFS
18621
18622  ;;
18623esac
18624fi
18625COMM=$ac_cv_path_COMM
18626if test -n "$COMM"; then
18627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18628$as_echo "$COMM" >&6; }
18629else
18630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18631$as_echo "no" >&6; }
18632fi
18633
18634
18635  test -n "$COMM" && break
18636done
18637
18638    else
18639      # If it succeeded, then it was overridden by the user. We will use it
18640      # for the tool.
18641
18642      # First remove it from the list of overridden variables, so we can test
18643      # for unknown variables in the end.
18644      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18645
18646      # Check if the provided tool contains a complete path.
18647      tool_specified="$COMM"
18648      tool_basename="${tool_specified##*/}"
18649      if test "x$tool_basename" = "x$tool_specified"; then
18650        # A command without a complete path is provided, search $PATH.
18651        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18652$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18653        # Extract the first word of "$tool_basename", so it can be a program name with args.
18654set dummy $tool_basename; ac_word=$2
18655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18656$as_echo_n "checking for $ac_word... " >&6; }
18657if ${ac_cv_path_COMM+:} false; then :
18658  $as_echo_n "(cached) " >&6
18659else
18660  case $COMM in
18661  [\\/]* | ?:[\\/]*)
18662  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18663  ;;
18664  *)
18665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18666for as_dir in $PATH
18667do
18668  IFS=$as_save_IFS
18669  test -z "$as_dir" && as_dir=.
18670    for ac_exec_ext in '' $ac_executable_extensions; do
18671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18672    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18674    break 2
18675  fi
18676done
18677  done
18678IFS=$as_save_IFS
18679
18680  ;;
18681esac
18682fi
18683COMM=$ac_cv_path_COMM
18684if test -n "$COMM"; then
18685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18686$as_echo "$COMM" >&6; }
18687else
18688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18689$as_echo "no" >&6; }
18690fi
18691
18692
18693        if test "x$COMM" = x; then
18694          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18695        fi
18696      else
18697        # Otherwise we believe it is a complete path. Use it as it is.
18698        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18699$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18700        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18701$as_echo_n "checking for COMM... " >&6; }
18702        if test ! -x "$tool_specified"; then
18703          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18704$as_echo "not found" >&6; }
18705          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18706        fi
18707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18708$as_echo "$tool_specified" >&6; }
18709      fi
18710    fi
18711  fi
18712
18713
18714
18715  if test "x$COMM" = x; then
18716    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18717  fi
18718
18719
18720  fi
18721
18722  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18723
18724
18725
18726  # Publish this variable in the help.
18727
18728
18729  if test "x$DSYMUTIL" = x; then
18730    # The variable is not set by user, try to locate tool using the code snippet
18731    for ac_prog in dsymutil
18732do
18733  # Extract the first word of "$ac_prog", so it can be a program name with args.
18734set dummy $ac_prog; ac_word=$2
18735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18736$as_echo_n "checking for $ac_word... " >&6; }
18737if ${ac_cv_path_DSYMUTIL+:} false; then :
18738  $as_echo_n "(cached) " >&6
18739else
18740  case $DSYMUTIL in
18741  [\\/]* | ?:[\\/]*)
18742  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18743  ;;
18744  *)
18745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18746for as_dir in $PATH
18747do
18748  IFS=$as_save_IFS
18749  test -z "$as_dir" && as_dir=.
18750    for ac_exec_ext in '' $ac_executable_extensions; do
18751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18752    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18754    break 2
18755  fi
18756done
18757  done
18758IFS=$as_save_IFS
18759
18760  ;;
18761esac
18762fi
18763DSYMUTIL=$ac_cv_path_DSYMUTIL
18764if test -n "$DSYMUTIL"; then
18765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18766$as_echo "$DSYMUTIL" >&6; }
18767else
18768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18769$as_echo "no" >&6; }
18770fi
18771
18772
18773  test -n "$DSYMUTIL" && break
18774done
18775
18776  else
18777    # The variable is set, but is it from the command line or the environment?
18778
18779    # Try to remove the string !DSYMUTIL! from our list.
18780    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18781    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18782      # If it failed, the variable was not from the command line. Ignore it,
18783      # but warn the user (except for BASH, which is always set by the calling BASH).
18784      if test "xDSYMUTIL" != xBASH; then
18785        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18786$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18787      fi
18788      # Try to locate tool using the code snippet
18789      for ac_prog in dsymutil
18790do
18791  # Extract the first word of "$ac_prog", so it can be a program name with args.
18792set dummy $ac_prog; ac_word=$2
18793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18794$as_echo_n "checking for $ac_word... " >&6; }
18795if ${ac_cv_path_DSYMUTIL+:} false; then :
18796  $as_echo_n "(cached) " >&6
18797else
18798  case $DSYMUTIL in
18799  [\\/]* | ?:[\\/]*)
18800  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18801  ;;
18802  *)
18803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18804for as_dir in $PATH
18805do
18806  IFS=$as_save_IFS
18807  test -z "$as_dir" && as_dir=.
18808    for ac_exec_ext in '' $ac_executable_extensions; do
18809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18810    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18812    break 2
18813  fi
18814done
18815  done
18816IFS=$as_save_IFS
18817
18818  ;;
18819esac
18820fi
18821DSYMUTIL=$ac_cv_path_DSYMUTIL
18822if test -n "$DSYMUTIL"; then
18823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18824$as_echo "$DSYMUTIL" >&6; }
18825else
18826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18827$as_echo "no" >&6; }
18828fi
18829
18830
18831  test -n "$DSYMUTIL" && break
18832done
18833
18834    else
18835      # If it succeeded, then it was overridden by the user. We will use it
18836      # for the tool.
18837
18838      # First remove it from the list of overridden variables, so we can test
18839      # for unknown variables in the end.
18840      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18841
18842      # Check if the provided tool contains a complete path.
18843      tool_specified="$DSYMUTIL"
18844      tool_basename="${tool_specified##*/}"
18845      if test "x$tool_basename" = "x$tool_specified"; then
18846        # A command without a complete path is provided, search $PATH.
18847        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18848$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18849        # Extract the first word of "$tool_basename", so it can be a program name with args.
18850set dummy $tool_basename; ac_word=$2
18851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18852$as_echo_n "checking for $ac_word... " >&6; }
18853if ${ac_cv_path_DSYMUTIL+:} false; then :
18854  $as_echo_n "(cached) " >&6
18855else
18856  case $DSYMUTIL in
18857  [\\/]* | ?:[\\/]*)
18858  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18859  ;;
18860  *)
18861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18862for as_dir in $PATH
18863do
18864  IFS=$as_save_IFS
18865  test -z "$as_dir" && as_dir=.
18866    for ac_exec_ext in '' $ac_executable_extensions; do
18867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18868    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18870    break 2
18871  fi
18872done
18873  done
18874IFS=$as_save_IFS
18875
18876  ;;
18877esac
18878fi
18879DSYMUTIL=$ac_cv_path_DSYMUTIL
18880if test -n "$DSYMUTIL"; then
18881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18882$as_echo "$DSYMUTIL" >&6; }
18883else
18884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18885$as_echo "no" >&6; }
18886fi
18887
18888
18889        if test "x$DSYMUTIL" = x; then
18890          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18891        fi
18892      else
18893        # Otherwise we believe it is a complete path. Use it as it is.
18894        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18895$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18896        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18897$as_echo_n "checking for DSYMUTIL... " >&6; }
18898        if test ! -x "$tool_specified"; then
18899          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18900$as_echo "not found" >&6; }
18901          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18902        fi
18903        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18904$as_echo "$tool_specified" >&6; }
18905      fi
18906    fi
18907  fi
18908
18909
18910
18911  if test "x$DSYMUTIL" = x; then
18912    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
18913  fi
18914
18915
18916
18917
18918
18919  # Publish this variable in the help.
18920
18921
18922  if test "x$XATTR" = x; then
18923    # The variable is not set by user, try to locate tool using the code snippet
18924    for ac_prog in xattr
18925do
18926  # Extract the first word of "$ac_prog", so it can be a program name with args.
18927set dummy $ac_prog; ac_word=$2
18928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18929$as_echo_n "checking for $ac_word... " >&6; }
18930if ${ac_cv_path_XATTR+:} false; then :
18931  $as_echo_n "(cached) " >&6
18932else
18933  case $XATTR in
18934  [\\/]* | ?:[\\/]*)
18935  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18936  ;;
18937  *)
18938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18939for as_dir in $PATH
18940do
18941  IFS=$as_save_IFS
18942  test -z "$as_dir" && as_dir=.
18943    for ac_exec_ext in '' $ac_executable_extensions; do
18944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18945    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18947    break 2
18948  fi
18949done
18950  done
18951IFS=$as_save_IFS
18952
18953  ;;
18954esac
18955fi
18956XATTR=$ac_cv_path_XATTR
18957if test -n "$XATTR"; then
18958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18959$as_echo "$XATTR" >&6; }
18960else
18961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18962$as_echo "no" >&6; }
18963fi
18964
18965
18966  test -n "$XATTR" && break
18967done
18968
18969  else
18970    # The variable is set, but is it from the command line or the environment?
18971
18972    # Try to remove the string !XATTR! from our list.
18973    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
18974    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18975      # If it failed, the variable was not from the command line. Ignore it,
18976      # but warn the user (except for BASH, which is always set by the calling BASH).
18977      if test "xXATTR" != xBASH; then
18978        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
18979$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
18980      fi
18981      # Try to locate tool using the code snippet
18982      for ac_prog in xattr
18983do
18984  # Extract the first word of "$ac_prog", so it can be a program name with args.
18985set dummy $ac_prog; ac_word=$2
18986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18987$as_echo_n "checking for $ac_word... " >&6; }
18988if ${ac_cv_path_XATTR+:} false; then :
18989  $as_echo_n "(cached) " >&6
18990else
18991  case $XATTR in
18992  [\\/]* | ?:[\\/]*)
18993  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18994  ;;
18995  *)
18996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18997for as_dir in $PATH
18998do
18999  IFS=$as_save_IFS
19000  test -z "$as_dir" && as_dir=.
19001    for ac_exec_ext in '' $ac_executable_extensions; do
19002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19003    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19005    break 2
19006  fi
19007done
19008  done
19009IFS=$as_save_IFS
19010
19011  ;;
19012esac
19013fi
19014XATTR=$ac_cv_path_XATTR
19015if test -n "$XATTR"; then
19016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19017$as_echo "$XATTR" >&6; }
19018else
19019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19020$as_echo "no" >&6; }
19021fi
19022
19023
19024  test -n "$XATTR" && break
19025done
19026
19027    else
19028      # If it succeeded, then it was overridden by the user. We will use it
19029      # for the tool.
19030
19031      # First remove it from the list of overridden variables, so we can test
19032      # for unknown variables in the end.
19033      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19034
19035      # Check if the provided tool contains a complete path.
19036      tool_specified="$XATTR"
19037      tool_basename="${tool_specified##*/}"
19038      if test "x$tool_basename" = "x$tool_specified"; then
19039        # A command without a complete path is provided, search $PATH.
19040        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19041$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19042        # Extract the first word of "$tool_basename", so it can be a program name with args.
19043set dummy $tool_basename; ac_word=$2
19044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19045$as_echo_n "checking for $ac_word... " >&6; }
19046if ${ac_cv_path_XATTR+:} false; then :
19047  $as_echo_n "(cached) " >&6
19048else
19049  case $XATTR in
19050  [\\/]* | ?:[\\/]*)
19051  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19052  ;;
19053  *)
19054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19055for as_dir in $PATH
19056do
19057  IFS=$as_save_IFS
19058  test -z "$as_dir" && as_dir=.
19059    for ac_exec_ext in '' $ac_executable_extensions; do
19060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19061    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19063    break 2
19064  fi
19065done
19066  done
19067IFS=$as_save_IFS
19068
19069  ;;
19070esac
19071fi
19072XATTR=$ac_cv_path_XATTR
19073if test -n "$XATTR"; then
19074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19075$as_echo "$XATTR" >&6; }
19076else
19077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19078$as_echo "no" >&6; }
19079fi
19080
19081
19082        if test "x$XATTR" = x; then
19083          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19084        fi
19085      else
19086        # Otherwise we believe it is a complete path. Use it as it is.
19087        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19088$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19089        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19090$as_echo_n "checking for XATTR... " >&6; }
19091        if test ! -x "$tool_specified"; then
19092          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19093$as_echo "not found" >&6; }
19094          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19095        fi
19096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19097$as_echo "$tool_specified" >&6; }
19098      fi
19099    fi
19100  fi
19101
19102
19103
19104  if test "x$XATTR" = x; then
19105    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19106  fi
19107
19108
19109
19110
19111  # Publish this variable in the help.
19112
19113
19114  if test "x$CODESIGN" = x; then
19115    # The variable is not set by user, try to locate tool using the code snippet
19116    for ac_prog in codesign
19117do
19118  # Extract the first word of "$ac_prog", so it can be a program name with args.
19119set dummy $ac_prog; ac_word=$2
19120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19121$as_echo_n "checking for $ac_word... " >&6; }
19122if ${ac_cv_path_CODESIGN+:} false; then :
19123  $as_echo_n "(cached) " >&6
19124else
19125  case $CODESIGN in
19126  [\\/]* | ?:[\\/]*)
19127  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19128  ;;
19129  *)
19130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19131for as_dir in $PATH
19132do
19133  IFS=$as_save_IFS
19134  test -z "$as_dir" && as_dir=.
19135    for ac_exec_ext in '' $ac_executable_extensions; do
19136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19137    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19139    break 2
19140  fi
19141done
19142  done
19143IFS=$as_save_IFS
19144
19145  ;;
19146esac
19147fi
19148CODESIGN=$ac_cv_path_CODESIGN
19149if test -n "$CODESIGN"; then
19150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19151$as_echo "$CODESIGN" >&6; }
19152else
19153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19154$as_echo "no" >&6; }
19155fi
19156
19157
19158  test -n "$CODESIGN" && break
19159done
19160
19161  else
19162    # The variable is set, but is it from the command line or the environment?
19163
19164    # Try to remove the string !CODESIGN! from our list.
19165    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19166    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19167      # If it failed, the variable was not from the command line. Ignore it,
19168      # but warn the user (except for BASH, which is always set by the calling BASH).
19169      if test "xCODESIGN" != xBASH; then
19170        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19171$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19172      fi
19173      # Try to locate tool using the code snippet
19174      for ac_prog in codesign
19175do
19176  # Extract the first word of "$ac_prog", so it can be a program name with args.
19177set dummy $ac_prog; ac_word=$2
19178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19179$as_echo_n "checking for $ac_word... " >&6; }
19180if ${ac_cv_path_CODESIGN+:} false; then :
19181  $as_echo_n "(cached) " >&6
19182else
19183  case $CODESIGN in
19184  [\\/]* | ?:[\\/]*)
19185  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19186  ;;
19187  *)
19188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19189for as_dir in $PATH
19190do
19191  IFS=$as_save_IFS
19192  test -z "$as_dir" && as_dir=.
19193    for ac_exec_ext in '' $ac_executable_extensions; do
19194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19195    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19197    break 2
19198  fi
19199done
19200  done
19201IFS=$as_save_IFS
19202
19203  ;;
19204esac
19205fi
19206CODESIGN=$ac_cv_path_CODESIGN
19207if test -n "$CODESIGN"; then
19208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19209$as_echo "$CODESIGN" >&6; }
19210else
19211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19212$as_echo "no" >&6; }
19213fi
19214
19215
19216  test -n "$CODESIGN" && break
19217done
19218
19219    else
19220      # If it succeeded, then it was overridden by the user. We will use it
19221      # for the tool.
19222
19223      # First remove it from the list of overridden variables, so we can test
19224      # for unknown variables in the end.
19225      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19226
19227      # Check if the provided tool contains a complete path.
19228      tool_specified="$CODESIGN"
19229      tool_basename="${tool_specified##*/}"
19230      if test "x$tool_basename" = "x$tool_specified"; then
19231        # A command without a complete path is provided, search $PATH.
19232        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19233$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19234        # Extract the first word of "$tool_basename", so it can be a program name with args.
19235set dummy $tool_basename; ac_word=$2
19236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19237$as_echo_n "checking for $ac_word... " >&6; }
19238if ${ac_cv_path_CODESIGN+:} false; then :
19239  $as_echo_n "(cached) " >&6
19240else
19241  case $CODESIGN in
19242  [\\/]* | ?:[\\/]*)
19243  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19244  ;;
19245  *)
19246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19247for as_dir in $PATH
19248do
19249  IFS=$as_save_IFS
19250  test -z "$as_dir" && as_dir=.
19251    for ac_exec_ext in '' $ac_executable_extensions; do
19252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19253    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19255    break 2
19256  fi
19257done
19258  done
19259IFS=$as_save_IFS
19260
19261  ;;
19262esac
19263fi
19264CODESIGN=$ac_cv_path_CODESIGN
19265if test -n "$CODESIGN"; then
19266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19267$as_echo "$CODESIGN" >&6; }
19268else
19269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19270$as_echo "no" >&6; }
19271fi
19272
19273
19274        if test "x$CODESIGN" = x; then
19275          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19276        fi
19277      else
19278        # Otherwise we believe it is a complete path. Use it as it is.
19279        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19280$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19281        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19282$as_echo_n "checking for CODESIGN... " >&6; }
19283        if test ! -x "$tool_specified"; then
19284          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19285$as_echo "not found" >&6; }
19286          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19287        fi
19288        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19289$as_echo "$tool_specified" >&6; }
19290      fi
19291    fi
19292  fi
19293
19294
19295    if test "x$CODESIGN" != "x"; then
19296      # Verify that the openjdk_codesign certificate is present
19297      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19298$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19299      rm -f codesign-testfile
19300      touch codesign-testfile
19301      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19302      rm -f codesign-testfile
19303      if test "x$CODESIGN" = x; then
19304        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19305$as_echo "no" >&6; }
19306      else
19307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19308$as_echo "yes" >&6; }
19309      fi
19310    fi
19311  fi
19312
19313
19314# Check if pkg-config is available.
19315
19316
19317if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19318	if test -n "$ac_tool_prefix"; then
19319  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19320set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19322$as_echo_n "checking for $ac_word... " >&6; }
19323if ${ac_cv_path_PKG_CONFIG+:} false; then :
19324  $as_echo_n "(cached) " >&6
19325else
19326  case $PKG_CONFIG in
19327  [\\/]* | ?:[\\/]*)
19328  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19329  ;;
19330  *)
19331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19332for as_dir in $PATH
19333do
19334  IFS=$as_save_IFS
19335  test -z "$as_dir" && as_dir=.
19336    for ac_exec_ext in '' $ac_executable_extensions; do
19337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19338    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19340    break 2
19341  fi
19342done
19343  done
19344IFS=$as_save_IFS
19345
19346  ;;
19347esac
19348fi
19349PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19350if test -n "$PKG_CONFIG"; then
19351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19352$as_echo "$PKG_CONFIG" >&6; }
19353else
19354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19355$as_echo "no" >&6; }
19356fi
19357
19358
19359fi
19360if test -z "$ac_cv_path_PKG_CONFIG"; then
19361  ac_pt_PKG_CONFIG=$PKG_CONFIG
19362  # Extract the first word of "pkg-config", so it can be a program name with args.
19363set dummy pkg-config; ac_word=$2
19364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19365$as_echo_n "checking for $ac_word... " >&6; }
19366if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19367  $as_echo_n "(cached) " >&6
19368else
19369  case $ac_pt_PKG_CONFIG in
19370  [\\/]* | ?:[\\/]*)
19371  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19372  ;;
19373  *)
19374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19375for as_dir in $PATH
19376do
19377  IFS=$as_save_IFS
19378  test -z "$as_dir" && as_dir=.
19379    for ac_exec_ext in '' $ac_executable_extensions; do
19380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19381    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19383    break 2
19384  fi
19385done
19386  done
19387IFS=$as_save_IFS
19388
19389  ;;
19390esac
19391fi
19392ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19393if test -n "$ac_pt_PKG_CONFIG"; then
19394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19395$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19396else
19397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19398$as_echo "no" >&6; }
19399fi
19400
19401  if test "x$ac_pt_PKG_CONFIG" = x; then
19402    PKG_CONFIG=""
19403  else
19404    case $cross_compiling:$ac_tool_warned in
19405yes:)
19406{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19407$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19408ac_tool_warned=yes ;;
19409esac
19410    PKG_CONFIG=$ac_pt_PKG_CONFIG
19411  fi
19412else
19413  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19414fi
19415
19416fi
19417if test -n "$PKG_CONFIG"; then
19418	_pkg_min_version=0.9.0
19419	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19420$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19421	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19422		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19423$as_echo "yes" >&6; }
19424	else
19425		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19426$as_echo "no" >&6; }
19427		PKG_CONFIG=""
19428	fi
19429
19430fi
19431
19432# After basic tools have been setup, we can check build os specific details.
19433
19434  ###############################################################################
19435
19436  # Note that this is the build platform OS version!
19437
19438  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19439  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19440  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19441  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19442
19443
19444
19445
19446
19447# Setup builddeps, for automatic downloading of tools we need.
19448# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19449# boot-jdk setup, but we need to have basic tools setup first.
19450
19451
19452# Check whether --with-builddeps-conf was given.
19453if test "${with_builddeps_conf+set}" = set; then :
19454  withval=$with_builddeps_conf;
19455fi
19456
19457
19458
19459# Check whether --with-builddeps-server was given.
19460if test "${with_builddeps_server+set}" = set; then :
19461  withval=$with_builddeps_server;
19462fi
19463
19464
19465
19466# Check whether --with-builddeps-dir was given.
19467if test "${with_builddeps_dir+set}" = set; then :
19468  withval=$with_builddeps_dir;
19469else
19470  with_builddeps_dir=/localhome/builddeps
19471fi
19472
19473
19474
19475# Check whether --with-builddeps-group was given.
19476if test "${with_builddeps_group+set}" = set; then :
19477  withval=$with_builddeps_group;
19478fi
19479
19480
19481
19482
19483  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19484    if test "x$with_builddeps_conf" != x; then
19485      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19486$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19487      builddepsfile=$with_builddeps_conf
19488      if test -s $builddepsfile; then
19489        . $builddepsfile
19490        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19491$as_echo "loaded!" >&6; }
19492      else
19493        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19494      fi
19495    else
19496      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19497$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19498      builddepsfile=`mktemp`
19499      touch $builddepsfile
19500      # Put all found confs into a single file.
19501      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19502      # Source the file to acquire the variables
19503      if test -s $builddepsfile; then
19504        . $builddepsfile
19505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19506$as_echo "found at least one!" >&6; }
19507      else
19508        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19509      fi
19510    fi
19511    # Create build and target names that use _ instead of "-" and ".".
19512    # This is necessary to use them in variable names.
19513    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19514    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19515    # Extract rewrite information for build and target
19516    eval rewritten_build=\${REWRITE_${build_var}}
19517    if test "x$rewritten_build" = x; then
19518      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19519      echo Build stays the same $rewritten_build
19520    else
19521      echo Rewriting build for builddeps into $rewritten_build
19522    fi
19523    eval rewritten_target=\${REWRITE_${target_var}}
19524    if test "x$rewritten_target" = x; then
19525      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19526      echo Target stays the same $rewritten_target
19527    else
19528      echo Rewriting target for builddeps into $rewritten_target
19529    fi
19530    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19531    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19532  fi
19533  for ac_prog in 7z unzip
19534do
19535  # Extract the first word of "$ac_prog", so it can be a program name with args.
19536set dummy $ac_prog; ac_word=$2
19537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19538$as_echo_n "checking for $ac_word... " >&6; }
19539if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19540  $as_echo_n "(cached) " >&6
19541else
19542  if test -n "$BDEPS_UNZIP"; then
19543  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19544else
19545as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19546for as_dir in $PATH
19547do
19548  IFS=$as_save_IFS
19549  test -z "$as_dir" && as_dir=.
19550    for ac_exec_ext in '' $ac_executable_extensions; do
19551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19552    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19554    break 2
19555  fi
19556done
19557  done
19558IFS=$as_save_IFS
19559
19560fi
19561fi
19562BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19563if test -n "$BDEPS_UNZIP"; then
19564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19565$as_echo "$BDEPS_UNZIP" >&6; }
19566else
19567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19568$as_echo "no" >&6; }
19569fi
19570
19571
19572  test -n "$BDEPS_UNZIP" && break
19573done
19574
19575  if test "x$BDEPS_UNZIP" = x7z; then
19576    BDEPS_UNZIP="7z x"
19577  fi
19578
19579  for ac_prog in wget lftp ftp
19580do
19581  # Extract the first word of "$ac_prog", so it can be a program name with args.
19582set dummy $ac_prog; ac_word=$2
19583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19584$as_echo_n "checking for $ac_word... " >&6; }
19585if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19586  $as_echo_n "(cached) " >&6
19587else
19588  if test -n "$BDEPS_FTP"; then
19589  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19590else
19591as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19592for as_dir in $PATH
19593do
19594  IFS=$as_save_IFS
19595  test -z "$as_dir" && as_dir=.
19596    for ac_exec_ext in '' $ac_executable_extensions; do
19597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19598    ac_cv_prog_BDEPS_FTP="$ac_prog"
19599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19600    break 2
19601  fi
19602done
19603  done
19604IFS=$as_save_IFS
19605
19606fi
19607fi
19608BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19609if test -n "$BDEPS_FTP"; then
19610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19611$as_echo "$BDEPS_FTP" >&6; }
19612else
19613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19614$as_echo "no" >&6; }
19615fi
19616
19617
19618  test -n "$BDEPS_FTP" && break
19619done
19620
19621
19622
19623###############################################################################
19624#
19625# Determine OpenJDK variants, options and version numbers.
19626#
19627###############################################################################
19628
19629# We need build & target for this.
19630
19631
19632  ###############################################################################
19633  #
19634  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19635  # We always build headless support.
19636  #
19637  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19638$as_echo_n "checking headful support... " >&6; }
19639  # Check whether --enable-headful was given.
19640if test "${enable_headful+set}" = set; then :
19641  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19642else
19643  SUPPORT_HEADFUL=yes
19644fi
19645
19646
19647  SUPPORT_HEADLESS=yes
19648  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19649
19650  if test "x$SUPPORT_HEADFUL" = xyes; then
19651    # We are building both headful and headless.
19652    headful_msg="include support for both headful and headless"
19653  fi
19654
19655  if test "x$SUPPORT_HEADFUL" = xno; then
19656    # Thus we are building headless only.
19657    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19658    headful_msg="headless only"
19659  fi
19660
19661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19662$as_echo "$headful_msg" >&6; }
19663
19664
19665
19666
19667
19668  # Control wether Hotspot runs Queens test after build.
19669  # Check whether --enable-hotspot-test-in-build was given.
19670if test "${enable_hotspot_test_in_build+set}" = set; then :
19671  enableval=$enable_hotspot_test_in_build;
19672else
19673  enable_hotspot_test_in_build=no
19674fi
19675
19676  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19677    TEST_IN_BUILD=true
19678  else
19679    TEST_IN_BUILD=false
19680  fi
19681
19682
19683  ###############################################################################
19684  #
19685  # Choose cacerts source file
19686  #
19687
19688# Check whether --with-cacerts-file was given.
19689if test "${with_cacerts_file+set}" = set; then :
19690  withval=$with_cacerts_file;
19691fi
19692
19693  if test "x$with_cacerts_file" != x; then
19694    CACERTS_FILE=$with_cacerts_file
19695  else
19696    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19697  fi
19698
19699
19700  ###############################################################################
19701  #
19702  # Enable or disable unlimited crypto
19703  #
19704  # Check whether --enable-unlimited-crypto was given.
19705if test "${enable_unlimited_crypto+set}" = set; then :
19706  enableval=$enable_unlimited_crypto;
19707else
19708  enable_unlimited_crypto=no
19709fi
19710
19711  if test "x$enable_unlimited_crypto" = "xyes"; then
19712    UNLIMITED_CRYPTO=true
19713  else
19714    UNLIMITED_CRYPTO=false
19715  fi
19716
19717
19718  ###############################################################################
19719  #
19720  # Enable or disable the elliptic curve crypto implementation
19721  #
19722
19723
19724  ###############################################################################
19725  #
19726  # --enable-rmiconnector-iiop
19727  #
19728  # Check whether --enable-rmiconnector-iiop was given.
19729if test "${enable_rmiconnector_iiop+set}" = set; then :
19730  enableval=$enable_rmiconnector_iiop;
19731fi
19732
19733  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19734    RMICONNECTOR_IIOP=true
19735  else
19736    RMICONNECTOR_IIOP=false
19737  fi
19738
19739
19740  ###############################################################################
19741  #
19742  # Compress jars
19743  #
19744  COMPRESS_JARS=false
19745
19746
19747
19748
19749  # Source the version numbers
19750  . $AUTOCONF_DIR/version-numbers
19751
19752  # Get the settings from parameters
19753
19754# Check whether --with-milestone was given.
19755if test "${with_milestone+set}" = set; then :
19756  withval=$with_milestone;
19757fi
19758
19759  if test "x$with_milestone" = xyes; then
19760    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19761  elif test "x$with_milestone" != x; then
19762    MILESTONE="$with_milestone"
19763  fi
19764  if test "x$MILESTONE" = x; then
19765    MILESTONE=internal
19766  fi
19767
19768
19769# Check whether --with-update-version was given.
19770if test "${with_update_version+set}" = set; then :
19771  withval=$with_update_version;
19772fi
19773
19774  if test "x$with_update_version" = xyes; then
19775    as_fn_error $? "Update version must have a value" "$LINENO" 5
19776  elif test "x$with_update_version" != x; then
19777    JDK_UPDATE_VERSION="$with_update_version"
19778    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19779    # to a bug in expr (which reduces it to just X). To work around this, we
19780    # always add a 0 to one digit update versions.
19781    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19782      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19783    fi
19784  fi
19785
19786
19787# Check whether --with-user-release-suffix was given.
19788if test "${with_user_release_suffix+set}" = set; then :
19789  withval=$with_user_release_suffix;
19790fi
19791
19792  if test "x$with_user_release_suffix" = xyes; then
19793    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19794  elif test "x$with_user_release_suffix" != x; then
19795    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19796  fi
19797
19798
19799# Check whether --with-build-number was given.
19800if test "${with_build_number+set}" = set; then :
19801  withval=$with_build_number;
19802fi
19803
19804  if test "x$with_build_number" = xyes; then
19805    as_fn_error $? "Build number must have a value" "$LINENO" 5
19806  elif test "x$with_build_number" != x; then
19807    JDK_BUILD_NUMBER="$with_build_number"
19808  fi
19809  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19810  if test "x$JDK_BUILD_NUMBER" = x; then
19811    JDK_BUILD_NUMBER=b00
19812    if test "x$USER_RELEASE_SUFFIX" = x; then
19813      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19814      # Avoid [:alnum:] since it depends on the locale.
19815      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19816      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19817    fi
19818  fi
19819
19820  # Now set the JDK version, milestone, build number etc.
19821
19822
19823
19824
19825
19826
19827
19828
19829
19830
19831
19832
19833
19834
19835
19836  COPYRIGHT_YEAR=`date +'%Y'`
19837
19838
19839  if test "x$JDK_UPDATE_VERSION" != x; then
19840    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19841  else
19842    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19843  fi
19844
19845
19846  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19847
19848
19849
19850###############################################################################
19851#
19852# Setup BootJDK, used to bootstrap the build.
19853#
19854###############################################################################
19855
19856
19857  BOOT_JDK_FOUND=no
19858
19859# Check whether --with-boot-jdk was given.
19860if test "${with_boot_jdk+set}" = set; then :
19861  withval=$with_boot_jdk;
19862fi
19863
19864
19865  # We look for the Boot JDK through various means, going from more certain to
19866  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19867  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19868  # must check if this is indeed valid; otherwise we'll continue looking.
19869
19870  # Test: Is bootjdk explicitely set by command line arguments?
19871
19872  if test "x$BOOT_JDK_FOUND" = xno; then
19873    # Now execute the test
19874
19875  if test "x$with_boot_jdk" != x; then
19876    BOOT_JDK=$with_boot_jdk
19877    BOOT_JDK_FOUND=maybe
19878    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19879$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19880  fi
19881
19882
19883    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19884    if test "x$BOOT_JDK_FOUND" = xmaybe; then
19885      # Do we have a bin/java?
19886      if test ! -x "$BOOT_JDK/bin/java"; then
19887        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19888$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19889        BOOT_JDK_FOUND=no
19890      else
19891        # Do we have a bin/javac?
19892        if test ! -x "$BOOT_JDK/bin/javac"; then
19893          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19894$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19895          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19896$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19897          BOOT_JDK_FOUND=no
19898        else
19899          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19900          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19901            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19902$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19903            BOOT_JDK_FOUND=no
19904          else
19905            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19906            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19907
19908            # Extra M4 quote needed to protect [] in grep expression.
19909            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
19910            if test "x$FOUND_CORRECT_VERSION" = x; then
19911              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19912$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19913              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
19914$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
19915              BOOT_JDK_FOUND=no
19916            else
19917              # We're done! :-)
19918              BOOT_JDK_FOUND=yes
19919
19920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19921
19922  # Input might be given as Windows format, start by converting to
19923  # unix format.
19924  path="$BOOT_JDK"
19925  new_path=`$CYGPATH -u "$path"`
19926
19927  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19928  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19929  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19930  # "foo.exe" is OK but "foo" is an error.
19931  #
19932  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19933  # It is also a way to make sure we got the proper file name for the real test later on.
19934  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19935  if test "x$test_shortpath" = x; then
19936    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19937$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19938    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19939  fi
19940
19941  # Call helper function which possibly converts this using DOS-style short mode.
19942  # If so, the updated path is stored in $new_path.
19943
19944  input_path="$new_path"
19945  # Check if we need to convert this using DOS-style short mode. If the path
19946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19947  # take no chances and rewrite it.
19948  # Note: m4 eats our [], so we need to use [ and ] instead.
19949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19950  if test "x$has_forbidden_chars" != x; then
19951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19952    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19953    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19954    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19955      # Going to short mode and back again did indeed matter. Since short mode is
19956      # case insensitive, let's make it lowercase to improve readability.
19957      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19958      # Now convert it back to Unix-stile (cygpath)
19959      input_path=`$CYGPATH -u "$shortmode_path"`
19960      new_path="$input_path"
19961    fi
19962  fi
19963
19964  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19965  if test "x$test_cygdrive_prefix" = x; then
19966    # As a simple fix, exclude /usr/bin since it's not a real path.
19967    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19968      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19969      # a path prefixed by /cygdrive for fixpath to work.
19970      new_path="$CYGWIN_ROOT_PATH$input_path"
19971    fi
19972  fi
19973
19974
19975  if test "x$path" != "x$new_path"; then
19976    BOOT_JDK="$new_path"
19977    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19978$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19979  fi
19980
19981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19982
19983  path="$BOOT_JDK"
19984  has_colon=`$ECHO $path | $GREP ^.:`
19985  new_path="$path"
19986  if test "x$has_colon" = x; then
19987    # Not in mixed or Windows style, start by that.
19988    new_path=`cmd //c echo $path`
19989  fi
19990
19991
19992  input_path="$new_path"
19993  # Check if we need to convert this using DOS-style short mode. If the path
19994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19995  # take no chances and rewrite it.
19996  # Note: m4 eats our [], so we need to use [ and ] instead.
19997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19998  if test "x$has_forbidden_chars" != x; then
19999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20001  fi
20002
20003
20004  windows_path="$new_path"
20005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20006    unix_path=`$CYGPATH -u "$windows_path"`
20007    new_path="$unix_path"
20008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20010    new_path="$unix_path"
20011  fi
20012
20013  if test "x$path" != "x$new_path"; then
20014    BOOT_JDK="$new_path"
20015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20016$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20017  fi
20018
20019  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20020  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20021
20022  else
20023    # We're on a posix platform. Hooray! :)
20024    path="$BOOT_JDK"
20025    has_space=`$ECHO "$path" | $GREP " "`
20026    if test "x$has_space" != x; then
20027      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20028$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20029      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20030    fi
20031
20032    # Use eval to expand a potential ~
20033    eval path="$path"
20034    if test ! -f "$path" && test ! -d "$path"; then
20035      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20036    fi
20037
20038    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20039  fi
20040
20041              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20042$as_echo_n "checking for Boot JDK... " >&6; }
20043              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20044$as_echo "$BOOT_JDK" >&6; }
20045              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20046$as_echo_n "checking Boot JDK version... " >&6; }
20047              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20048              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20049$as_echo "$BOOT_JDK_VERSION" >&6; }
20050            fi # end check jdk version
20051          fi # end check rt.jar
20052        fi # end check javac
20053      fi # end check java
20054    fi # end check boot jdk found
20055  fi
20056
20057  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20058    # Having specified an argument which is incorrect will produce an instant failure;
20059    # we should not go on looking
20060    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20061  fi
20062
20063  # Test: Is bootjdk available from builddeps?
20064
20065  if test "x$BOOT_JDK_FOUND" = xno; then
20066    # Now execute the test
20067
20068
20069
20070  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20071    # Source the builddeps file again, to make sure it uses the latest variables!
20072    . $builddepsfile
20073    # Look for a target and build machine specific resource!
20074    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20075    if test "x$resource" = x; then
20076      # Ok, lets instead look for a target specific resource
20077      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20078    fi
20079    if test "x$resource" = x; then
20080      # Ok, lets instead look for a build specific resource
20081      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20082    fi
20083    if test "x$resource" = x; then
20084      # Ok, lets instead look for a generic resource
20085      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20086      resource=${builddep_bootjdk}
20087    fi
20088    if test "x$resource" != x; then
20089      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20090$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20091      # If the resource in the builddeps.conf file is an existing directory,
20092      # for example /java/linux/cups
20093      if test -d ${resource}; then
20094        depdir=${resource}
20095      else
20096
20097  # bootjdk is for example mymodule
20098  # $resource is for example libs/general/libmymod_1_2_3.zip
20099  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20100  # $with_builddeps_dir is for example /localhome/builddeps
20101  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20102  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20103  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20104  filename=`basename $resource`
20105  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20106  filebase=${filename%%.*}
20107  extension=${filename#*.}
20108  installdir=$with_builddeps_dir/$filebase
20109  if test ! -f $installdir/$filename.unpacked; then
20110    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20111$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20112    if test ! -d $installdir; then
20113      mkdir -p $installdir
20114    fi
20115    if test ! -d $installdir; then
20116      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20117    fi
20118    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20119    touch $tmpfile
20120    if test ! -f $tmpfile; then
20121      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20122    fi
20123
20124  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20125  # $tmpfile is the local file name for the downloaded file.
20126  VALID_TOOL=no
20127  if test "x$BDEPS_FTP" = xwget; then
20128    VALID_TOOL=yes
20129    wget -O $tmpfile $with_builddeps_server/$resource
20130  fi
20131  if test "x$BDEPS_FTP" = xlftp; then
20132    VALID_TOOL=yes
20133    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20134  fi
20135  if test "x$BDEPS_FTP" = xftp; then
20136    VALID_TOOL=yes
20137    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20138    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20139    FTPUSERPWD=${FTPSERVER%%@*}
20140    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20141      FTPUSER=${userpwd%%:*}
20142      FTPPWD=${userpwd#*@}
20143      FTPSERVER=${FTPSERVER#*@}
20144    else
20145      FTPUSER=ftp
20146      FTPPWD=ftp
20147    fi
20148    # the "pass" command does not work on some
20149    # ftp clients (read ftp.exe) but if it works,
20150    # passive mode is better!
20151    ( \
20152        echo "user $FTPUSER $FTPPWD"        ; \
20153        echo "pass"                         ; \
20154        echo "bin"                          ; \
20155        echo "get $FTPPATH $tmpfile"              ; \
20156    ) | ftp -in $FTPSERVER
20157  fi
20158  if test "x$VALID_TOOL" != xyes; then
20159    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20160  fi
20161
20162    mv $tmpfile $installdir/$filename
20163    if test ! -s $installdir/$filename; then
20164      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20165    fi
20166    case "$extension" in
20167      zip)  echo "Unzipping $installdir/$filename..."
20168        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20169        ;;
20170      tar.gz) echo "Untaring $installdir/$filename..."
20171        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20172        ;;
20173      tgz) echo "Untaring $installdir/$filename..."
20174        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20175        ;;
20176      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20177        ;;
20178    esac
20179  fi
20180  if test -f $installdir/$filename.unpacked; then
20181    depdir=$installdir
20182  fi
20183
20184      fi
20185      # Source the builddeps file again, because in the previous command, the depdir
20186      # was updated to point at the current build dependency install directory.
20187      . $builddepsfile
20188      # Now extract variables from the builddeps.conf files.
20189      theroot=${builddep_bootjdk_ROOT}
20190      thecflags=${builddep_bootjdk_CFLAGS}
20191      thelibs=${builddep_bootjdk_LIBS}
20192      if test "x$depdir" = x; then
20193        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20194      fi
20195      BOOT_JDK=$depdir
20196      if test "x$theroot" != x; then
20197        BOOT_JDK="$theroot"
20198      fi
20199      if test "x$thecflags" != x; then
20200        BOOT_JDK_CFLAGS="$thecflags"
20201      fi
20202      if test "x$thelibs" != x; then
20203        BOOT_JDK_LIBS="$thelibs"
20204      fi
20205      BOOT_JDK_FOUND=maybe
20206      else BOOT_JDK_FOUND=no
20207
20208    fi
20209    else BOOT_JDK_FOUND=no
20210
20211  fi
20212
20213
20214
20215    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20216    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20217      # Do we have a bin/java?
20218      if test ! -x "$BOOT_JDK/bin/java"; then
20219        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20220$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20221        BOOT_JDK_FOUND=no
20222      else
20223        # Do we have a bin/javac?
20224        if test ! -x "$BOOT_JDK/bin/javac"; then
20225          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20226$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20227          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20228$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20229          BOOT_JDK_FOUND=no
20230        else
20231          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20232          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20233            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20234$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20235            BOOT_JDK_FOUND=no
20236          else
20237            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20238            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20239
20240            # Extra M4 quote needed to protect [] in grep expression.
20241            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20242            if test "x$FOUND_CORRECT_VERSION" = x; then
20243              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20244$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20245              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20246$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20247              BOOT_JDK_FOUND=no
20248            else
20249              # We're done! :-)
20250              BOOT_JDK_FOUND=yes
20251
20252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20253
20254  # Input might be given as Windows format, start by converting to
20255  # unix format.
20256  path="$BOOT_JDK"
20257  new_path=`$CYGPATH -u "$path"`
20258
20259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20262  # "foo.exe" is OK but "foo" is an error.
20263  #
20264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20265  # It is also a way to make sure we got the proper file name for the real test later on.
20266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20267  if test "x$test_shortpath" = x; then
20268    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20269$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20270    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20271  fi
20272
20273  # Call helper function which possibly converts this using DOS-style short mode.
20274  # If so, the updated path is stored in $new_path.
20275
20276  input_path="$new_path"
20277  # Check if we need to convert this using DOS-style short mode. If the path
20278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20279  # take no chances and rewrite it.
20280  # Note: m4 eats our [], so we need to use [ and ] instead.
20281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20282  if test "x$has_forbidden_chars" != x; then
20283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20287      # Going to short mode and back again did indeed matter. Since short mode is
20288      # case insensitive, let's make it lowercase to improve readability.
20289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20290      # Now convert it back to Unix-stile (cygpath)
20291      input_path=`$CYGPATH -u "$shortmode_path"`
20292      new_path="$input_path"
20293    fi
20294  fi
20295
20296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20297  if test "x$test_cygdrive_prefix" = x; then
20298    # As a simple fix, exclude /usr/bin since it's not a real path.
20299    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20301      # a path prefixed by /cygdrive for fixpath to work.
20302      new_path="$CYGWIN_ROOT_PATH$input_path"
20303    fi
20304  fi
20305
20306
20307  if test "x$path" != "x$new_path"; then
20308    BOOT_JDK="$new_path"
20309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20310$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20311  fi
20312
20313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20314
20315  path="$BOOT_JDK"
20316  has_colon=`$ECHO $path | $GREP ^.:`
20317  new_path="$path"
20318  if test "x$has_colon" = x; then
20319    # Not in mixed or Windows style, start by that.
20320    new_path=`cmd //c echo $path`
20321  fi
20322
20323
20324  input_path="$new_path"
20325  # Check if we need to convert this using DOS-style short mode. If the path
20326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20327  # take no chances and rewrite it.
20328  # Note: m4 eats our [], so we need to use [ and ] instead.
20329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20330  if test "x$has_forbidden_chars" != x; then
20331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20333  fi
20334
20335
20336  windows_path="$new_path"
20337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20338    unix_path=`$CYGPATH -u "$windows_path"`
20339    new_path="$unix_path"
20340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20342    new_path="$unix_path"
20343  fi
20344
20345  if test "x$path" != "x$new_path"; then
20346    BOOT_JDK="$new_path"
20347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20348$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20349  fi
20350
20351  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20352  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20353
20354  else
20355    # We're on a posix platform. Hooray! :)
20356    path="$BOOT_JDK"
20357    has_space=`$ECHO "$path" | $GREP " "`
20358    if test "x$has_space" != x; then
20359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20360$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20361      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20362    fi
20363
20364    # Use eval to expand a potential ~
20365    eval path="$path"
20366    if test ! -f "$path" && test ! -d "$path"; then
20367      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20368    fi
20369
20370    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20371  fi
20372
20373              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20374$as_echo_n "checking for Boot JDK... " >&6; }
20375              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20376$as_echo "$BOOT_JDK" >&6; }
20377              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20378$as_echo_n "checking Boot JDK version... " >&6; }
20379              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20380              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20381$as_echo "$BOOT_JDK_VERSION" >&6; }
20382            fi # end check jdk version
20383          fi # end check rt.jar
20384        fi # end check javac
20385      fi # end check java
20386    fi # end check boot jdk found
20387  fi
20388
20389
20390  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20391
20392  if test "x$BOOT_JDK_FOUND" = xno; then
20393    # Now execute the test
20394
20395  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20396    # First check at user selected default
20397
20398  if test "x$BOOT_JDK_FOUND" = xno; then
20399    # Now execute the test
20400
20401  if test -x /usr/libexec/java_home; then
20402    BOOT_JDK=`/usr/libexec/java_home `
20403    BOOT_JDK_FOUND=maybe
20404    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20405$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20406  fi
20407
20408
20409    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20410    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20411      # Do we have a bin/java?
20412      if test ! -x "$BOOT_JDK/bin/java"; then
20413        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20414$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20415        BOOT_JDK_FOUND=no
20416      else
20417        # Do we have a bin/javac?
20418        if test ! -x "$BOOT_JDK/bin/javac"; then
20419          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20420$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20421          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20422$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20423          BOOT_JDK_FOUND=no
20424        else
20425          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20426          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20427            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20429            BOOT_JDK_FOUND=no
20430          else
20431            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20432            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20433
20434            # Extra M4 quote needed to protect [] in grep expression.
20435            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20436            if test "x$FOUND_CORRECT_VERSION" = x; then
20437              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20438$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20439              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20440$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20441              BOOT_JDK_FOUND=no
20442            else
20443              # We're done! :-)
20444              BOOT_JDK_FOUND=yes
20445
20446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20447
20448  # Input might be given as Windows format, start by converting to
20449  # unix format.
20450  path="$BOOT_JDK"
20451  new_path=`$CYGPATH -u "$path"`
20452
20453  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20454  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20455  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20456  # "foo.exe" is OK but "foo" is an error.
20457  #
20458  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20459  # It is also a way to make sure we got the proper file name for the real test later on.
20460  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20461  if test "x$test_shortpath" = x; then
20462    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20463$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20464    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20465  fi
20466
20467  # Call helper function which possibly converts this using DOS-style short mode.
20468  # If so, the updated path is stored in $new_path.
20469
20470  input_path="$new_path"
20471  # Check if we need to convert this using DOS-style short mode. If the path
20472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20473  # take no chances and rewrite it.
20474  # Note: m4 eats our [], so we need to use [ and ] instead.
20475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20476  if test "x$has_forbidden_chars" != x; then
20477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20478    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20479    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20480    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20481      # Going to short mode and back again did indeed matter. Since short mode is
20482      # case insensitive, let's make it lowercase to improve readability.
20483      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20484      # Now convert it back to Unix-stile (cygpath)
20485      input_path=`$CYGPATH -u "$shortmode_path"`
20486      new_path="$input_path"
20487    fi
20488  fi
20489
20490  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20491  if test "x$test_cygdrive_prefix" = x; then
20492    # As a simple fix, exclude /usr/bin since it's not a real path.
20493    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20494      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20495      # a path prefixed by /cygdrive for fixpath to work.
20496      new_path="$CYGWIN_ROOT_PATH$input_path"
20497    fi
20498  fi
20499
20500
20501  if test "x$path" != "x$new_path"; then
20502    BOOT_JDK="$new_path"
20503    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20504$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20505  fi
20506
20507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20508
20509  path="$BOOT_JDK"
20510  has_colon=`$ECHO $path | $GREP ^.:`
20511  new_path="$path"
20512  if test "x$has_colon" = x; then
20513    # Not in mixed or Windows style, start by that.
20514    new_path=`cmd //c echo $path`
20515  fi
20516
20517
20518  input_path="$new_path"
20519  # Check if we need to convert this using DOS-style short mode. If the path
20520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20521  # take no chances and rewrite it.
20522  # Note: m4 eats our [], so we need to use [ and ] instead.
20523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20524  if test "x$has_forbidden_chars" != x; then
20525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20526    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20527  fi
20528
20529
20530  windows_path="$new_path"
20531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20532    unix_path=`$CYGPATH -u "$windows_path"`
20533    new_path="$unix_path"
20534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20536    new_path="$unix_path"
20537  fi
20538
20539  if test "x$path" != "x$new_path"; then
20540    BOOT_JDK="$new_path"
20541    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20542$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20543  fi
20544
20545  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20546  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20547
20548  else
20549    # We're on a posix platform. Hooray! :)
20550    path="$BOOT_JDK"
20551    has_space=`$ECHO "$path" | $GREP " "`
20552    if test "x$has_space" != x; then
20553      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20554$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20555      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20556    fi
20557
20558    # Use eval to expand a potential ~
20559    eval path="$path"
20560    if test ! -f "$path" && test ! -d "$path"; then
20561      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20562    fi
20563
20564    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20565  fi
20566
20567              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20568$as_echo_n "checking for Boot JDK... " >&6; }
20569              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20570$as_echo "$BOOT_JDK" >&6; }
20571              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20572$as_echo_n "checking Boot JDK version... " >&6; }
20573              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20574              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20575$as_echo "$BOOT_JDK_VERSION" >&6; }
20576            fi # end check jdk version
20577          fi # end check rt.jar
20578        fi # end check javac
20579      fi # end check java
20580    fi # end check boot jdk found
20581  fi
20582
20583    # If that did not work out (e.g. too old), try explicit versions instead
20584
20585  if test "x$BOOT_JDK_FOUND" = xno; then
20586    # Now execute the test
20587
20588  if test -x /usr/libexec/java_home; then
20589    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20590    BOOT_JDK_FOUND=maybe
20591    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20592$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20593  fi
20594
20595
20596    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20597    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20598      # Do we have a bin/java?
20599      if test ! -x "$BOOT_JDK/bin/java"; then
20600        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20601$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20602        BOOT_JDK_FOUND=no
20603      else
20604        # Do we have a bin/javac?
20605        if test ! -x "$BOOT_JDK/bin/javac"; then
20606          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20608          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20609$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20610          BOOT_JDK_FOUND=no
20611        else
20612          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20613          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20614            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20615$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20616            BOOT_JDK_FOUND=no
20617          else
20618            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20619            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20620
20621            # Extra M4 quote needed to protect [] in grep expression.
20622            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20623            if test "x$FOUND_CORRECT_VERSION" = x; then
20624              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20625$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20626              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20627$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20628              BOOT_JDK_FOUND=no
20629            else
20630              # We're done! :-)
20631              BOOT_JDK_FOUND=yes
20632
20633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20634
20635  # Input might be given as Windows format, start by converting to
20636  # unix format.
20637  path="$BOOT_JDK"
20638  new_path=`$CYGPATH -u "$path"`
20639
20640  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20641  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20642  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20643  # "foo.exe" is OK but "foo" is an error.
20644  #
20645  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20646  # It is also a way to make sure we got the proper file name for the real test later on.
20647  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20648  if test "x$test_shortpath" = x; then
20649    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20650$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20651    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20652  fi
20653
20654  # Call helper function which possibly converts this using DOS-style short mode.
20655  # If so, the updated path is stored in $new_path.
20656
20657  input_path="$new_path"
20658  # Check if we need to convert this using DOS-style short mode. If the path
20659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20660  # take no chances and rewrite it.
20661  # Note: m4 eats our [], so we need to use [ and ] instead.
20662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20663  if test "x$has_forbidden_chars" != x; then
20664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20665    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20666    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20667    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20668      # Going to short mode and back again did indeed matter. Since short mode is
20669      # case insensitive, let's make it lowercase to improve readability.
20670      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20671      # Now convert it back to Unix-stile (cygpath)
20672      input_path=`$CYGPATH -u "$shortmode_path"`
20673      new_path="$input_path"
20674    fi
20675  fi
20676
20677  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20678  if test "x$test_cygdrive_prefix" = x; then
20679    # As a simple fix, exclude /usr/bin since it's not a real path.
20680    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20681      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20682      # a path prefixed by /cygdrive for fixpath to work.
20683      new_path="$CYGWIN_ROOT_PATH$input_path"
20684    fi
20685  fi
20686
20687
20688  if test "x$path" != "x$new_path"; then
20689    BOOT_JDK="$new_path"
20690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20691$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20692  fi
20693
20694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20695
20696  path="$BOOT_JDK"
20697  has_colon=`$ECHO $path | $GREP ^.:`
20698  new_path="$path"
20699  if test "x$has_colon" = x; then
20700    # Not in mixed or Windows style, start by that.
20701    new_path=`cmd //c echo $path`
20702  fi
20703
20704
20705  input_path="$new_path"
20706  # Check if we need to convert this using DOS-style short mode. If the path
20707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20708  # take no chances and rewrite it.
20709  # Note: m4 eats our [], so we need to use [ and ] instead.
20710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20711  if test "x$has_forbidden_chars" != x; then
20712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20713    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20714  fi
20715
20716
20717  windows_path="$new_path"
20718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20719    unix_path=`$CYGPATH -u "$windows_path"`
20720    new_path="$unix_path"
20721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20723    new_path="$unix_path"
20724  fi
20725
20726  if test "x$path" != "x$new_path"; then
20727    BOOT_JDK="$new_path"
20728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20729$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20730  fi
20731
20732  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20733  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20734
20735  else
20736    # We're on a posix platform. Hooray! :)
20737    path="$BOOT_JDK"
20738    has_space=`$ECHO "$path" | $GREP " "`
20739    if test "x$has_space" != x; then
20740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20741$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20742      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20743    fi
20744
20745    # Use eval to expand a potential ~
20746    eval path="$path"
20747    if test ! -f "$path" && test ! -d "$path"; then
20748      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20749    fi
20750
20751    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20752  fi
20753
20754              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20755$as_echo_n "checking for Boot JDK... " >&6; }
20756              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20757$as_echo "$BOOT_JDK" >&6; }
20758              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20759$as_echo_n "checking Boot JDK version... " >&6; }
20760              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20761              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20762$as_echo "$BOOT_JDK_VERSION" >&6; }
20763            fi # end check jdk version
20764          fi # end check rt.jar
20765        fi # end check javac
20766      fi # end check java
20767    fi # end check boot jdk found
20768  fi
20769
20770
20771  if test "x$BOOT_JDK_FOUND" = xno; then
20772    # Now execute the test
20773
20774  if test -x /usr/libexec/java_home; then
20775    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20776    BOOT_JDK_FOUND=maybe
20777    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20778$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20779  fi
20780
20781
20782    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20783    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20784      # Do we have a bin/java?
20785      if test ! -x "$BOOT_JDK/bin/java"; then
20786        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20787$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20788        BOOT_JDK_FOUND=no
20789      else
20790        # Do we have a bin/javac?
20791        if test ! -x "$BOOT_JDK/bin/javac"; then
20792          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20793$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20794          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20795$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20796          BOOT_JDK_FOUND=no
20797        else
20798          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20799          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20800            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20801$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20802            BOOT_JDK_FOUND=no
20803          else
20804            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20805            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20806
20807            # Extra M4 quote needed to protect [] in grep expression.
20808            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20809            if test "x$FOUND_CORRECT_VERSION" = x; then
20810              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20812              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20813$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20814              BOOT_JDK_FOUND=no
20815            else
20816              # We're done! :-)
20817              BOOT_JDK_FOUND=yes
20818
20819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20820
20821  # Input might be given as Windows format, start by converting to
20822  # unix format.
20823  path="$BOOT_JDK"
20824  new_path=`$CYGPATH -u "$path"`
20825
20826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20829  # "foo.exe" is OK but "foo" is an error.
20830  #
20831  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20832  # It is also a way to make sure we got the proper file name for the real test later on.
20833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20834  if test "x$test_shortpath" = x; then
20835    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20836$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20837    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20838  fi
20839
20840  # Call helper function which possibly converts this using DOS-style short mode.
20841  # If so, the updated path is stored in $new_path.
20842
20843  input_path="$new_path"
20844  # Check if we need to convert this using DOS-style short mode. If the path
20845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20846  # take no chances and rewrite it.
20847  # Note: m4 eats our [], so we need to use [ and ] instead.
20848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20849  if test "x$has_forbidden_chars" != x; then
20850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20851    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20852    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20853    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20854      # Going to short mode and back again did indeed matter. Since short mode is
20855      # case insensitive, let's make it lowercase to improve readability.
20856      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20857      # Now convert it back to Unix-stile (cygpath)
20858      input_path=`$CYGPATH -u "$shortmode_path"`
20859      new_path="$input_path"
20860    fi
20861  fi
20862
20863  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20864  if test "x$test_cygdrive_prefix" = x; then
20865    # As a simple fix, exclude /usr/bin since it's not a real path.
20866    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20867      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20868      # a path prefixed by /cygdrive for fixpath to work.
20869      new_path="$CYGWIN_ROOT_PATH$input_path"
20870    fi
20871  fi
20872
20873
20874  if test "x$path" != "x$new_path"; then
20875    BOOT_JDK="$new_path"
20876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20877$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20878  fi
20879
20880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20881
20882  path="$BOOT_JDK"
20883  has_colon=`$ECHO $path | $GREP ^.:`
20884  new_path="$path"
20885  if test "x$has_colon" = x; then
20886    # Not in mixed or Windows style, start by that.
20887    new_path=`cmd //c echo $path`
20888  fi
20889
20890
20891  input_path="$new_path"
20892  # Check if we need to convert this using DOS-style short mode. If the path
20893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20894  # take no chances and rewrite it.
20895  # Note: m4 eats our [], so we need to use [ and ] instead.
20896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20897  if test "x$has_forbidden_chars" != x; then
20898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20900  fi
20901
20902
20903  windows_path="$new_path"
20904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20905    unix_path=`$CYGPATH -u "$windows_path"`
20906    new_path="$unix_path"
20907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20909    new_path="$unix_path"
20910  fi
20911
20912  if test "x$path" != "x$new_path"; then
20913    BOOT_JDK="$new_path"
20914    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20915$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20916  fi
20917
20918  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20919  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20920
20921  else
20922    # We're on a posix platform. Hooray! :)
20923    path="$BOOT_JDK"
20924    has_space=`$ECHO "$path" | $GREP " "`
20925    if test "x$has_space" != x; then
20926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20927$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20928      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20929    fi
20930
20931    # Use eval to expand a potential ~
20932    eval path="$path"
20933    if test ! -f "$path" && test ! -d "$path"; then
20934      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20935    fi
20936
20937    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20938  fi
20939
20940              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20941$as_echo_n "checking for Boot JDK... " >&6; }
20942              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20943$as_echo "$BOOT_JDK" >&6; }
20944              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20945$as_echo_n "checking Boot JDK version... " >&6; }
20946              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20947              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20948$as_echo "$BOOT_JDK_VERSION" >&6; }
20949            fi # end check jdk version
20950          fi # end check rt.jar
20951        fi # end check javac
20952      fi # end check java
20953    fi # end check boot jdk found
20954  fi
20955
20956
20957  if test "x$BOOT_JDK_FOUND" = xno; then
20958    # Now execute the test
20959
20960  if test -x /usr/libexec/java_home; then
20961    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
20962    BOOT_JDK_FOUND=maybe
20963    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
20964$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
20965  fi
20966
20967
20968    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20969    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20970      # Do we have a bin/java?
20971      if test ! -x "$BOOT_JDK/bin/java"; then
20972        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20973$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20974        BOOT_JDK_FOUND=no
20975      else
20976        # Do we have a bin/javac?
20977        if test ! -x "$BOOT_JDK/bin/javac"; then
20978          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20979$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20980          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20981$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20982          BOOT_JDK_FOUND=no
20983        else
20984          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20985          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20986            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20987$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20988            BOOT_JDK_FOUND=no
20989          else
20990            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20991            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20992
20993            # Extra M4 quote needed to protect [] in grep expression.
20994            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20995            if test "x$FOUND_CORRECT_VERSION" = x; then
20996              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20997$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20998              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20999$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21000              BOOT_JDK_FOUND=no
21001            else
21002              # We're done! :-)
21003              BOOT_JDK_FOUND=yes
21004
21005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21006
21007  # Input might be given as Windows format, start by converting to
21008  # unix format.
21009  path="$BOOT_JDK"
21010  new_path=`$CYGPATH -u "$path"`
21011
21012  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21013  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21014  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21015  # "foo.exe" is OK but "foo" is an error.
21016  #
21017  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21018  # It is also a way to make sure we got the proper file name for the real test later on.
21019  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21020  if test "x$test_shortpath" = x; then
21021    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21022$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21023    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21024  fi
21025
21026  # Call helper function which possibly converts this using DOS-style short mode.
21027  # If so, the updated path is stored in $new_path.
21028
21029  input_path="$new_path"
21030  # Check if we need to convert this using DOS-style short mode. If the path
21031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21032  # take no chances and rewrite it.
21033  # Note: m4 eats our [], so we need to use [ and ] instead.
21034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21035  if test "x$has_forbidden_chars" != x; then
21036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21037    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21038    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21039    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21040      # Going to short mode and back again did indeed matter. Since short mode is
21041      # case insensitive, let's make it lowercase to improve readability.
21042      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21043      # Now convert it back to Unix-stile (cygpath)
21044      input_path=`$CYGPATH -u "$shortmode_path"`
21045      new_path="$input_path"
21046    fi
21047  fi
21048
21049  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21050  if test "x$test_cygdrive_prefix" = x; then
21051    # As a simple fix, exclude /usr/bin since it's not a real path.
21052    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21053      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21054      # a path prefixed by /cygdrive for fixpath to work.
21055      new_path="$CYGWIN_ROOT_PATH$input_path"
21056    fi
21057  fi
21058
21059
21060  if test "x$path" != "x$new_path"; then
21061    BOOT_JDK="$new_path"
21062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21063$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21064  fi
21065
21066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21067
21068  path="$BOOT_JDK"
21069  has_colon=`$ECHO $path | $GREP ^.:`
21070  new_path="$path"
21071  if test "x$has_colon" = x; then
21072    # Not in mixed or Windows style, start by that.
21073    new_path=`cmd //c echo $path`
21074  fi
21075
21076
21077  input_path="$new_path"
21078  # Check if we need to convert this using DOS-style short mode. If the path
21079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21080  # take no chances and rewrite it.
21081  # Note: m4 eats our [], so we need to use [ and ] instead.
21082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21083  if test "x$has_forbidden_chars" != x; then
21084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21085    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21086  fi
21087
21088
21089  windows_path="$new_path"
21090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21091    unix_path=`$CYGPATH -u "$windows_path"`
21092    new_path="$unix_path"
21093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21095    new_path="$unix_path"
21096  fi
21097
21098  if test "x$path" != "x$new_path"; then
21099    BOOT_JDK="$new_path"
21100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21101$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21102  fi
21103
21104  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21105  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21106
21107  else
21108    # We're on a posix platform. Hooray! :)
21109    path="$BOOT_JDK"
21110    has_space=`$ECHO "$path" | $GREP " "`
21111    if test "x$has_space" != x; then
21112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21113$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21114      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21115    fi
21116
21117    # Use eval to expand a potential ~
21118    eval path="$path"
21119    if test ! -f "$path" && test ! -d "$path"; then
21120      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21121    fi
21122
21123    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21124  fi
21125
21126              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21127$as_echo_n "checking for Boot JDK... " >&6; }
21128              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21129$as_echo "$BOOT_JDK" >&6; }
21130              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21131$as_echo_n "checking Boot JDK version... " >&6; }
21132              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21133              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21134$as_echo "$BOOT_JDK_VERSION" >&6; }
21135            fi # end check jdk version
21136          fi # end check rt.jar
21137        fi # end check javac
21138      fi # end check java
21139    fi # end check boot jdk found
21140  fi
21141
21142  fi
21143
21144
21145    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21146    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21147      # Do we have a bin/java?
21148      if test ! -x "$BOOT_JDK/bin/java"; then
21149        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21150$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21151        BOOT_JDK_FOUND=no
21152      else
21153        # Do we have a bin/javac?
21154        if test ! -x "$BOOT_JDK/bin/javac"; then
21155          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21156$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21157          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21158$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21159          BOOT_JDK_FOUND=no
21160        else
21161          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21162          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21163            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21164$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21165            BOOT_JDK_FOUND=no
21166          else
21167            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21168            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21169
21170            # Extra M4 quote needed to protect [] in grep expression.
21171            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21172            if test "x$FOUND_CORRECT_VERSION" = x; then
21173              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21174$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21175              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21176$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21177              BOOT_JDK_FOUND=no
21178            else
21179              # We're done! :-)
21180              BOOT_JDK_FOUND=yes
21181
21182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21183
21184  # Input might be given as Windows format, start by converting to
21185  # unix format.
21186  path="$BOOT_JDK"
21187  new_path=`$CYGPATH -u "$path"`
21188
21189  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21190  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21191  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21192  # "foo.exe" is OK but "foo" is an error.
21193  #
21194  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21195  # It is also a way to make sure we got the proper file name for the real test later on.
21196  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21197  if test "x$test_shortpath" = x; then
21198    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21199$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21200    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21201  fi
21202
21203  # Call helper function which possibly converts this using DOS-style short mode.
21204  # If so, the updated path is stored in $new_path.
21205
21206  input_path="$new_path"
21207  # Check if we need to convert this using DOS-style short mode. If the path
21208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21209  # take no chances and rewrite it.
21210  # Note: m4 eats our [], so we need to use [ and ] instead.
21211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21212  if test "x$has_forbidden_chars" != x; then
21213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21217      # Going to short mode and back again did indeed matter. Since short mode is
21218      # case insensitive, let's make it lowercase to improve readability.
21219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21220      # Now convert it back to Unix-stile (cygpath)
21221      input_path=`$CYGPATH -u "$shortmode_path"`
21222      new_path="$input_path"
21223    fi
21224  fi
21225
21226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21227  if test "x$test_cygdrive_prefix" = x; then
21228    # As a simple fix, exclude /usr/bin since it's not a real path.
21229    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21231      # a path prefixed by /cygdrive for fixpath to work.
21232      new_path="$CYGWIN_ROOT_PATH$input_path"
21233    fi
21234  fi
21235
21236
21237  if test "x$path" != "x$new_path"; then
21238    BOOT_JDK="$new_path"
21239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21240$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21241  fi
21242
21243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21244
21245  path="$BOOT_JDK"
21246  has_colon=`$ECHO $path | $GREP ^.:`
21247  new_path="$path"
21248  if test "x$has_colon" = x; then
21249    # Not in mixed or Windows style, start by that.
21250    new_path=`cmd //c echo $path`
21251  fi
21252
21253
21254  input_path="$new_path"
21255  # Check if we need to convert this using DOS-style short mode. If the path
21256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21257  # take no chances and rewrite it.
21258  # Note: m4 eats our [], so we need to use [ and ] instead.
21259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21260  if test "x$has_forbidden_chars" != x; then
21261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21263  fi
21264
21265
21266  windows_path="$new_path"
21267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21268    unix_path=`$CYGPATH -u "$windows_path"`
21269    new_path="$unix_path"
21270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21272    new_path="$unix_path"
21273  fi
21274
21275  if test "x$path" != "x$new_path"; then
21276    BOOT_JDK="$new_path"
21277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21278$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21279  fi
21280
21281  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21282  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21283
21284  else
21285    # We're on a posix platform. Hooray! :)
21286    path="$BOOT_JDK"
21287    has_space=`$ECHO "$path" | $GREP " "`
21288    if test "x$has_space" != x; then
21289      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21290$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21291      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21292    fi
21293
21294    # Use eval to expand a potential ~
21295    eval path="$path"
21296    if test ! -f "$path" && test ! -d "$path"; then
21297      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21298    fi
21299
21300    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21301  fi
21302
21303              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21304$as_echo_n "checking for Boot JDK... " >&6; }
21305              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21306$as_echo "$BOOT_JDK" >&6; }
21307              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21308$as_echo_n "checking Boot JDK version... " >&6; }
21309              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21310              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21311$as_echo "$BOOT_JDK_VERSION" >&6; }
21312            fi # end check jdk version
21313          fi # end check rt.jar
21314        fi # end check javac
21315      fi # end check java
21316    fi # end check boot jdk found
21317  fi
21318
21319
21320  # Test: Is $JAVA_HOME set?
21321
21322  if test "x$BOOT_JDK_FOUND" = xno; then
21323    # Now execute the test
21324
21325  if test "x$JAVA_HOME" != x; then
21326    JAVA_HOME_PROCESSED="$JAVA_HOME"
21327
21328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21329
21330  # Input might be given as Windows format, start by converting to
21331  # unix format.
21332  path="$JAVA_HOME_PROCESSED"
21333  new_path=`$CYGPATH -u "$path"`
21334
21335  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21336  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21337  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21338  # "foo.exe" is OK but "foo" is an error.
21339  #
21340  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21341  # It is also a way to make sure we got the proper file name for the real test later on.
21342  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21343  if test "x$test_shortpath" = x; then
21344    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21345$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21346    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21347  fi
21348
21349  # Call helper function which possibly converts this using DOS-style short mode.
21350  # If so, the updated path is stored in $new_path.
21351
21352  input_path="$new_path"
21353  # Check if we need to convert this using DOS-style short mode. If the path
21354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21355  # take no chances and rewrite it.
21356  # Note: m4 eats our [], so we need to use [ and ] instead.
21357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21358  if test "x$has_forbidden_chars" != x; then
21359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21363      # Going to short mode and back again did indeed matter. Since short mode is
21364      # case insensitive, let's make it lowercase to improve readability.
21365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21366      # Now convert it back to Unix-stile (cygpath)
21367      input_path=`$CYGPATH -u "$shortmode_path"`
21368      new_path="$input_path"
21369    fi
21370  fi
21371
21372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21373  if test "x$test_cygdrive_prefix" = x; then
21374    # As a simple fix, exclude /usr/bin since it's not a real path.
21375    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21377      # a path prefixed by /cygdrive for fixpath to work.
21378      new_path="$CYGWIN_ROOT_PATH$input_path"
21379    fi
21380  fi
21381
21382
21383  if test "x$path" != "x$new_path"; then
21384    JAVA_HOME_PROCESSED="$new_path"
21385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21386$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21387  fi
21388
21389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21390
21391  path="$JAVA_HOME_PROCESSED"
21392  has_colon=`$ECHO $path | $GREP ^.:`
21393  new_path="$path"
21394  if test "x$has_colon" = x; then
21395    # Not in mixed or Windows style, start by that.
21396    new_path=`cmd //c echo $path`
21397  fi
21398
21399
21400  input_path="$new_path"
21401  # Check if we need to convert this using DOS-style short mode. If the path
21402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21403  # take no chances and rewrite it.
21404  # Note: m4 eats our [], so we need to use [ and ] instead.
21405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21406  if test "x$has_forbidden_chars" != x; then
21407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21408    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21409  fi
21410
21411
21412  windows_path="$new_path"
21413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21414    unix_path=`$CYGPATH -u "$windows_path"`
21415    new_path="$unix_path"
21416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21418    new_path="$unix_path"
21419  fi
21420
21421  if test "x$path" != "x$new_path"; then
21422    JAVA_HOME_PROCESSED="$new_path"
21423    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21424$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21425  fi
21426
21427  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21428  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21429
21430  else
21431    # We're on a posix platform. Hooray! :)
21432    path="$JAVA_HOME_PROCESSED"
21433    has_space=`$ECHO "$path" | $GREP " "`
21434    if test "x$has_space" != x; then
21435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21436$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21437      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21438    fi
21439
21440    # Use eval to expand a potential ~
21441    eval path="$path"
21442    if test ! -f "$path" && test ! -d "$path"; then
21443      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21444    fi
21445
21446    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21447  fi
21448
21449    if test ! -d "$JAVA_HOME_PROCESSED"; then
21450      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21451$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21452    else
21453      # Aha, the user has set a JAVA_HOME
21454      # let us use that as the Boot JDK.
21455      BOOT_JDK="$JAVA_HOME_PROCESSED"
21456      BOOT_JDK_FOUND=maybe
21457      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21458$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21459    fi
21460  fi
21461
21462
21463    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21464    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21465      # Do we have a bin/java?
21466      if test ! -x "$BOOT_JDK/bin/java"; then
21467        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21468$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21469        BOOT_JDK_FOUND=no
21470      else
21471        # Do we have a bin/javac?
21472        if test ! -x "$BOOT_JDK/bin/javac"; then
21473          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21474$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21475          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21476$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21477          BOOT_JDK_FOUND=no
21478        else
21479          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21480          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21481            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21482$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21483            BOOT_JDK_FOUND=no
21484          else
21485            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21486            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21487
21488            # Extra M4 quote needed to protect [] in grep expression.
21489            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21490            if test "x$FOUND_CORRECT_VERSION" = x; then
21491              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21492$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21493              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21494$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21495              BOOT_JDK_FOUND=no
21496            else
21497              # We're done! :-)
21498              BOOT_JDK_FOUND=yes
21499
21500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21501
21502  # Input might be given as Windows format, start by converting to
21503  # unix format.
21504  path="$BOOT_JDK"
21505  new_path=`$CYGPATH -u "$path"`
21506
21507  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21508  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21509  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21510  # "foo.exe" is OK but "foo" is an error.
21511  #
21512  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21513  # It is also a way to make sure we got the proper file name for the real test later on.
21514  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21515  if test "x$test_shortpath" = x; then
21516    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21517$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21518    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21519  fi
21520
21521  # Call helper function which possibly converts this using DOS-style short mode.
21522  # If so, the updated path is stored in $new_path.
21523
21524  input_path="$new_path"
21525  # Check if we need to convert this using DOS-style short mode. If the path
21526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21527  # take no chances and rewrite it.
21528  # Note: m4 eats our [], so we need to use [ and ] instead.
21529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21530  if test "x$has_forbidden_chars" != x; then
21531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21532    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21533    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21534    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21535      # Going to short mode and back again did indeed matter. Since short mode is
21536      # case insensitive, let's make it lowercase to improve readability.
21537      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21538      # Now convert it back to Unix-stile (cygpath)
21539      input_path=`$CYGPATH -u "$shortmode_path"`
21540      new_path="$input_path"
21541    fi
21542  fi
21543
21544  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21545  if test "x$test_cygdrive_prefix" = x; then
21546    # As a simple fix, exclude /usr/bin since it's not a real path.
21547    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21548      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21549      # a path prefixed by /cygdrive for fixpath to work.
21550      new_path="$CYGWIN_ROOT_PATH$input_path"
21551    fi
21552  fi
21553
21554
21555  if test "x$path" != "x$new_path"; then
21556    BOOT_JDK="$new_path"
21557    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21558$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21559  fi
21560
21561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21562
21563  path="$BOOT_JDK"
21564  has_colon=`$ECHO $path | $GREP ^.:`
21565  new_path="$path"
21566  if test "x$has_colon" = x; then
21567    # Not in mixed or Windows style, start by that.
21568    new_path=`cmd //c echo $path`
21569  fi
21570
21571
21572  input_path="$new_path"
21573  # Check if we need to convert this using DOS-style short mode. If the path
21574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21575  # take no chances and rewrite it.
21576  # Note: m4 eats our [], so we need to use [ and ] instead.
21577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21578  if test "x$has_forbidden_chars" != x; then
21579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21580    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21581  fi
21582
21583
21584  windows_path="$new_path"
21585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21586    unix_path=`$CYGPATH -u "$windows_path"`
21587    new_path="$unix_path"
21588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21590    new_path="$unix_path"
21591  fi
21592
21593  if test "x$path" != "x$new_path"; then
21594    BOOT_JDK="$new_path"
21595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21596$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21597  fi
21598
21599  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21600  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21601
21602  else
21603    # We're on a posix platform. Hooray! :)
21604    path="$BOOT_JDK"
21605    has_space=`$ECHO "$path" | $GREP " "`
21606    if test "x$has_space" != x; then
21607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21608$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21609      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21610    fi
21611
21612    # Use eval to expand a potential ~
21613    eval path="$path"
21614    if test ! -f "$path" && test ! -d "$path"; then
21615      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21616    fi
21617
21618    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21619  fi
21620
21621              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21622$as_echo_n "checking for Boot JDK... " >&6; }
21623              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21624$as_echo "$BOOT_JDK" >&6; }
21625              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21626$as_echo_n "checking Boot JDK version... " >&6; }
21627              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21628              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21629$as_echo "$BOOT_JDK_VERSION" >&6; }
21630            fi # end check jdk version
21631          fi # end check rt.jar
21632        fi # end check javac
21633      fi # end check java
21634    fi # end check boot jdk found
21635  fi
21636
21637
21638  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21639
21640  if test "x$BOOT_JDK_FOUND" = xno; then
21641    # Now execute the test
21642
21643  # Extract the first word of "javac", so it can be a program name with args.
21644set dummy javac; ac_word=$2
21645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21646$as_echo_n "checking for $ac_word... " >&6; }
21647if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21648  $as_echo_n "(cached) " >&6
21649else
21650  case $JAVAC_CHECK in
21651  [\\/]* | ?:[\\/]*)
21652  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21653  ;;
21654  *)
21655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21656for as_dir in $PATH
21657do
21658  IFS=$as_save_IFS
21659  test -z "$as_dir" && as_dir=.
21660    for ac_exec_ext in '' $ac_executable_extensions; do
21661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21662    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21664    break 2
21665  fi
21666done
21667  done
21668IFS=$as_save_IFS
21669
21670  ;;
21671esac
21672fi
21673JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21674if test -n "$JAVAC_CHECK"; then
21675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21676$as_echo "$JAVAC_CHECK" >&6; }
21677else
21678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21679$as_echo "no" >&6; }
21680fi
21681
21682
21683  # Extract the first word of "java", so it can be a program name with args.
21684set dummy java; ac_word=$2
21685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21686$as_echo_n "checking for $ac_word... " >&6; }
21687if ${ac_cv_path_JAVA_CHECK+:} false; then :
21688  $as_echo_n "(cached) " >&6
21689else
21690  case $JAVA_CHECK in
21691  [\\/]* | ?:[\\/]*)
21692  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21693  ;;
21694  *)
21695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21696for as_dir in $PATH
21697do
21698  IFS=$as_save_IFS
21699  test -z "$as_dir" && as_dir=.
21700    for ac_exec_ext in '' $ac_executable_extensions; do
21701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21702    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21704    break 2
21705  fi
21706done
21707  done
21708IFS=$as_save_IFS
21709
21710  ;;
21711esac
21712fi
21713JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21714if test -n "$JAVA_CHECK"; then
21715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21716$as_echo "$JAVA_CHECK" >&6; }
21717else
21718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21719$as_echo "no" >&6; }
21720fi
21721
21722
21723  BINARY="$JAVAC_CHECK"
21724  if test "x$JAVAC_CHECK" = x; then
21725    BINARY="$JAVA_CHECK"
21726  fi
21727  if test "x$BINARY" != x; then
21728    # So there is a java(c) binary, it might be part of a JDK.
21729    # Lets find the JDK/JRE directory by following symbolic links.
21730    # Linux/GNU systems often have links from /usr/bin/java to
21731    # /etc/alternatives/java to the real JDK binary.
21732
21733  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21734    # Follow a chain of symbolic links. Use readlink
21735    # where it exists, else fall back to horribly
21736    # complicated shell code.
21737    if test "x$READLINK_TESTED" != yes; then
21738      # On MacOSX there is a readlink tool with a different
21739      # purpose than the GNU readlink tool. Check the found readlink.
21740      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21741      if test "x$ISGNU" = x; then
21742        # A readlink that we do not know how to use.
21743        # Are there other non-GNU readlinks out there?
21744        READLINK_TESTED=yes
21745        READLINK=
21746      fi
21747    fi
21748
21749    if test "x$READLINK" != x; then
21750      BINARY=`$READLINK -f $BINARY`
21751    else
21752      # Save the current directory for restoring afterwards
21753      STARTDIR=$PWD
21754      COUNTER=0
21755      sym_link_dir=`$DIRNAME $BINARY`
21756      sym_link_file=`$BASENAME $BINARY`
21757      cd $sym_link_dir
21758      # Use -P flag to resolve symlinks in directories.
21759      cd `$THEPWDCMD -P`
21760      sym_link_dir=`$THEPWDCMD -P`
21761      # Resolve file symlinks
21762      while test $COUNTER -lt 20; do
21763        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21764        if test "x$ISLINK" == x; then
21765          # This is not a symbolic link! We are done!
21766          break
21767        fi
21768        # Again resolve directory symlinks since the target of the just found
21769        # link could be in a different directory
21770        cd `$DIRNAME $ISLINK`
21771        sym_link_dir=`$THEPWDCMD -P`
21772        sym_link_file=`$BASENAME $ISLINK`
21773        let COUNTER=COUNTER+1
21774      done
21775      cd $STARTDIR
21776      BINARY=$sym_link_dir/$sym_link_file
21777    fi
21778  fi
21779
21780    BOOT_JDK=`dirname "$BINARY"`
21781    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21782    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21783      # Looks like we found ourselves an JDK
21784      BOOT_JDK_FOUND=maybe
21785      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21786$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21787    fi
21788  fi
21789
21790
21791    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21792    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21793      # Do we have a bin/java?
21794      if test ! -x "$BOOT_JDK/bin/java"; then
21795        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21796$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21797        BOOT_JDK_FOUND=no
21798      else
21799        # Do we have a bin/javac?
21800        if test ! -x "$BOOT_JDK/bin/javac"; then
21801          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21803          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21804$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21805          BOOT_JDK_FOUND=no
21806        else
21807          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21808          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21809            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21810$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21811            BOOT_JDK_FOUND=no
21812          else
21813            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21814            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21815
21816            # Extra M4 quote needed to protect [] in grep expression.
21817            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21818            if test "x$FOUND_CORRECT_VERSION" = x; then
21819              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21820$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21821              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21822$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21823              BOOT_JDK_FOUND=no
21824            else
21825              # We're done! :-)
21826              BOOT_JDK_FOUND=yes
21827
21828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21829
21830  # Input might be given as Windows format, start by converting to
21831  # unix format.
21832  path="$BOOT_JDK"
21833  new_path=`$CYGPATH -u "$path"`
21834
21835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21838  # "foo.exe" is OK but "foo" is an error.
21839  #
21840  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21841  # It is also a way to make sure we got the proper file name for the real test later on.
21842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21843  if test "x$test_shortpath" = x; then
21844    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21845$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21846    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21847  fi
21848
21849  # Call helper function which possibly converts this using DOS-style short mode.
21850  # If so, the updated path is stored in $new_path.
21851
21852  input_path="$new_path"
21853  # Check if we need to convert this using DOS-style short mode. If the path
21854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21855  # take no chances and rewrite it.
21856  # Note: m4 eats our [], so we need to use [ and ] instead.
21857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21858  if test "x$has_forbidden_chars" != x; then
21859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21863      # Going to short mode and back again did indeed matter. Since short mode is
21864      # case insensitive, let's make it lowercase to improve readability.
21865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21866      # Now convert it back to Unix-stile (cygpath)
21867      input_path=`$CYGPATH -u "$shortmode_path"`
21868      new_path="$input_path"
21869    fi
21870  fi
21871
21872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21873  if test "x$test_cygdrive_prefix" = x; then
21874    # As a simple fix, exclude /usr/bin since it's not a real path.
21875    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21877      # a path prefixed by /cygdrive for fixpath to work.
21878      new_path="$CYGWIN_ROOT_PATH$input_path"
21879    fi
21880  fi
21881
21882
21883  if test "x$path" != "x$new_path"; then
21884    BOOT_JDK="$new_path"
21885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21886$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21887  fi
21888
21889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21890
21891  path="$BOOT_JDK"
21892  has_colon=`$ECHO $path | $GREP ^.:`
21893  new_path="$path"
21894  if test "x$has_colon" = x; then
21895    # Not in mixed or Windows style, start by that.
21896    new_path=`cmd //c echo $path`
21897  fi
21898
21899
21900  input_path="$new_path"
21901  # Check if we need to convert this using DOS-style short mode. If the path
21902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21903  # take no chances and rewrite it.
21904  # Note: m4 eats our [], so we need to use [ and ] instead.
21905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21906  if test "x$has_forbidden_chars" != x; then
21907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21909  fi
21910
21911
21912  windows_path="$new_path"
21913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21914    unix_path=`$CYGPATH -u "$windows_path"`
21915    new_path="$unix_path"
21916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21918    new_path="$unix_path"
21919  fi
21920
21921  if test "x$path" != "x$new_path"; then
21922    BOOT_JDK="$new_path"
21923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21924$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21925  fi
21926
21927  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21928  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21929
21930  else
21931    # We're on a posix platform. Hooray! :)
21932    path="$BOOT_JDK"
21933    has_space=`$ECHO "$path" | $GREP " "`
21934    if test "x$has_space" != x; then
21935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21936$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21937      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21938    fi
21939
21940    # Use eval to expand a potential ~
21941    eval path="$path"
21942    if test ! -f "$path" && test ! -d "$path"; then
21943      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21944    fi
21945
21946    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21947  fi
21948
21949              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21950$as_echo_n "checking for Boot JDK... " >&6; }
21951              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21952$as_echo "$BOOT_JDK" >&6; }
21953              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21954$as_echo_n "checking Boot JDK version... " >&6; }
21955              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21956              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21957$as_echo "$BOOT_JDK_VERSION" >&6; }
21958            fi # end check jdk version
21959          fi # end check rt.jar
21960        fi # end check javac
21961      fi # end check java
21962    fi # end check boot jdk found
21963  fi
21964
21965
21966  # Test: Is there a JDK installed in default, well-known locations?
21967
21968  if test "x$BOOT_JDK_FOUND" = xno; then
21969    # Now execute the test
21970
21971  if test "x$OPENJDK_TARGET_OS" = xwindows; then
21972
21973  if test "x$BOOT_JDK_FOUND" = xno; then
21974    # Now execute the test
21975
21976  if test "x$ProgramW6432" != x; then
21977    VIRTUAL_DIR="$ProgramW6432/Java"
21978
21979  windows_path="$VIRTUAL_DIR"
21980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21981    unix_path=`$CYGPATH -u "$windows_path"`
21982    VIRTUAL_DIR="$unix_path"
21983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21985    VIRTUAL_DIR="$unix_path"
21986  fi
21987
21988
21989  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21990  BOOT_JDK_SUFFIX=""
21991  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21992  if test "x$ALL_JDKS_FOUND" != x; then
21993    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21994
21995  if test "x$BOOT_JDK_FOUND" = xno; then
21996    # Now execute the test
21997
21998        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21999        if test -d "$BOOT_JDK"; then
22000          BOOT_JDK_FOUND=maybe
22001          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22002$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22003        fi
22004
22005
22006    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22007    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22008      # Do we have a bin/java?
22009      if test ! -x "$BOOT_JDK/bin/java"; then
22010        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22011$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22012        BOOT_JDK_FOUND=no
22013      else
22014        # Do we have a bin/javac?
22015        if test ! -x "$BOOT_JDK/bin/javac"; then
22016          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22017$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22018          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22019$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22020          BOOT_JDK_FOUND=no
22021        else
22022          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22023          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22024            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22025$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22026            BOOT_JDK_FOUND=no
22027          else
22028            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22029            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22030
22031            # Extra M4 quote needed to protect [] in grep expression.
22032            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22033            if test "x$FOUND_CORRECT_VERSION" = x; then
22034              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22035$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22036              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22037$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22038              BOOT_JDK_FOUND=no
22039            else
22040              # We're done! :-)
22041              BOOT_JDK_FOUND=yes
22042
22043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22044
22045  # Input might be given as Windows format, start by converting to
22046  # unix format.
22047  path="$BOOT_JDK"
22048  new_path=`$CYGPATH -u "$path"`
22049
22050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22053  # "foo.exe" is OK but "foo" is an error.
22054  #
22055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22056  # It is also a way to make sure we got the proper file name for the real test later on.
22057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22058  if test "x$test_shortpath" = x; then
22059    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22060$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22061    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22062  fi
22063
22064  # Call helper function which possibly converts this using DOS-style short mode.
22065  # If so, the updated path is stored in $new_path.
22066
22067  input_path="$new_path"
22068  # Check if we need to convert this using DOS-style short mode. If the path
22069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22070  # take no chances and rewrite it.
22071  # Note: m4 eats our [], so we need to use [ and ] instead.
22072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22073  if test "x$has_forbidden_chars" != x; then
22074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22078      # Going to short mode and back again did indeed matter. Since short mode is
22079      # case insensitive, let's make it lowercase to improve readability.
22080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22081      # Now convert it back to Unix-stile (cygpath)
22082      input_path=`$CYGPATH -u "$shortmode_path"`
22083      new_path="$input_path"
22084    fi
22085  fi
22086
22087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22088  if test "x$test_cygdrive_prefix" = x; then
22089    # As a simple fix, exclude /usr/bin since it's not a real path.
22090    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22092      # a path prefixed by /cygdrive for fixpath to work.
22093      new_path="$CYGWIN_ROOT_PATH$input_path"
22094    fi
22095  fi
22096
22097
22098  if test "x$path" != "x$new_path"; then
22099    BOOT_JDK="$new_path"
22100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22101$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22102  fi
22103
22104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22105
22106  path="$BOOT_JDK"
22107  has_colon=`$ECHO $path | $GREP ^.:`
22108  new_path="$path"
22109  if test "x$has_colon" = x; then
22110    # Not in mixed or Windows style, start by that.
22111    new_path=`cmd //c echo $path`
22112  fi
22113
22114
22115  input_path="$new_path"
22116  # Check if we need to convert this using DOS-style short mode. If the path
22117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22118  # take no chances and rewrite it.
22119  # Note: m4 eats our [], so we need to use [ and ] instead.
22120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22121  if test "x$has_forbidden_chars" != x; then
22122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22124  fi
22125
22126
22127  windows_path="$new_path"
22128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22129    unix_path=`$CYGPATH -u "$windows_path"`
22130    new_path="$unix_path"
22131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22133    new_path="$unix_path"
22134  fi
22135
22136  if test "x$path" != "x$new_path"; then
22137    BOOT_JDK="$new_path"
22138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22139$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22140  fi
22141
22142  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22143  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22144
22145  else
22146    # We're on a posix platform. Hooray! :)
22147    path="$BOOT_JDK"
22148    has_space=`$ECHO "$path" | $GREP " "`
22149    if test "x$has_space" != x; then
22150      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22151$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22152      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22153    fi
22154
22155    # Use eval to expand a potential ~
22156    eval path="$path"
22157    if test ! -f "$path" && test ! -d "$path"; then
22158      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22159    fi
22160
22161    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22162  fi
22163
22164              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22165$as_echo_n "checking for Boot JDK... " >&6; }
22166              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22167$as_echo "$BOOT_JDK" >&6; }
22168              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22169$as_echo_n "checking Boot JDK version... " >&6; }
22170              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22171              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22172$as_echo "$BOOT_JDK_VERSION" >&6; }
22173            fi # end check jdk version
22174          fi # end check rt.jar
22175        fi # end check javac
22176      fi # end check java
22177    fi # end check boot jdk found
22178  fi
22179
22180    done
22181  fi
22182
22183  fi
22184
22185
22186    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22187    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22188      # Do we have a bin/java?
22189      if test ! -x "$BOOT_JDK/bin/java"; then
22190        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22192        BOOT_JDK_FOUND=no
22193      else
22194        # Do we have a bin/javac?
22195        if test ! -x "$BOOT_JDK/bin/javac"; then
22196          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22198          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22199$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22200          BOOT_JDK_FOUND=no
22201        else
22202          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22203          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22204            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22206            BOOT_JDK_FOUND=no
22207          else
22208            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22209            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22210
22211            # Extra M4 quote needed to protect [] in grep expression.
22212            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22213            if test "x$FOUND_CORRECT_VERSION" = x; then
22214              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22215$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22216              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22217$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22218              BOOT_JDK_FOUND=no
22219            else
22220              # We're done! :-)
22221              BOOT_JDK_FOUND=yes
22222
22223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22224
22225  # Input might be given as Windows format, start by converting to
22226  # unix format.
22227  path="$BOOT_JDK"
22228  new_path=`$CYGPATH -u "$path"`
22229
22230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22233  # "foo.exe" is OK but "foo" is an error.
22234  #
22235  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22236  # It is also a way to make sure we got the proper file name for the real test later on.
22237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22238  if test "x$test_shortpath" = x; then
22239    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22240$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22241    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22242  fi
22243
22244  # Call helper function which possibly converts this using DOS-style short mode.
22245  # If so, the updated path is stored in $new_path.
22246
22247  input_path="$new_path"
22248  # Check if we need to convert this using DOS-style short mode. If the path
22249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22250  # take no chances and rewrite it.
22251  # Note: m4 eats our [], so we need to use [ and ] instead.
22252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22253  if test "x$has_forbidden_chars" != x; then
22254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22255    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22256    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22257    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22258      # Going to short mode and back again did indeed matter. Since short mode is
22259      # case insensitive, let's make it lowercase to improve readability.
22260      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22261      # Now convert it back to Unix-stile (cygpath)
22262      input_path=`$CYGPATH -u "$shortmode_path"`
22263      new_path="$input_path"
22264    fi
22265  fi
22266
22267  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22268  if test "x$test_cygdrive_prefix" = x; then
22269    # As a simple fix, exclude /usr/bin since it's not a real path.
22270    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22271      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22272      # a path prefixed by /cygdrive for fixpath to work.
22273      new_path="$CYGWIN_ROOT_PATH$input_path"
22274    fi
22275  fi
22276
22277
22278  if test "x$path" != "x$new_path"; then
22279    BOOT_JDK="$new_path"
22280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22281$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22282  fi
22283
22284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22285
22286  path="$BOOT_JDK"
22287  has_colon=`$ECHO $path | $GREP ^.:`
22288  new_path="$path"
22289  if test "x$has_colon" = x; then
22290    # Not in mixed or Windows style, start by that.
22291    new_path=`cmd //c echo $path`
22292  fi
22293
22294
22295  input_path="$new_path"
22296  # Check if we need to convert this using DOS-style short mode. If the path
22297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22298  # take no chances and rewrite it.
22299  # Note: m4 eats our [], so we need to use [ and ] instead.
22300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22301  if test "x$has_forbidden_chars" != x; then
22302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22304  fi
22305
22306
22307  windows_path="$new_path"
22308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22309    unix_path=`$CYGPATH -u "$windows_path"`
22310    new_path="$unix_path"
22311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22313    new_path="$unix_path"
22314  fi
22315
22316  if test "x$path" != "x$new_path"; then
22317    BOOT_JDK="$new_path"
22318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22319$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22320  fi
22321
22322  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22323  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22324
22325  else
22326    # We're on a posix platform. Hooray! :)
22327    path="$BOOT_JDK"
22328    has_space=`$ECHO "$path" | $GREP " "`
22329    if test "x$has_space" != x; then
22330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22331$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22332      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22333    fi
22334
22335    # Use eval to expand a potential ~
22336    eval path="$path"
22337    if test ! -f "$path" && test ! -d "$path"; then
22338      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22339    fi
22340
22341    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22342  fi
22343
22344              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22345$as_echo_n "checking for Boot JDK... " >&6; }
22346              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22347$as_echo "$BOOT_JDK" >&6; }
22348              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22349$as_echo_n "checking Boot JDK version... " >&6; }
22350              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22351              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22352$as_echo "$BOOT_JDK_VERSION" >&6; }
22353            fi # end check jdk version
22354          fi # end check rt.jar
22355        fi # end check javac
22356      fi # end check java
22357    fi # end check boot jdk found
22358  fi
22359
22360
22361  if test "x$BOOT_JDK_FOUND" = xno; then
22362    # Now execute the test
22363
22364  if test "x$PROGRAMW6432" != x; then
22365    VIRTUAL_DIR="$PROGRAMW6432/Java"
22366
22367  windows_path="$VIRTUAL_DIR"
22368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22369    unix_path=`$CYGPATH -u "$windows_path"`
22370    VIRTUAL_DIR="$unix_path"
22371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22373    VIRTUAL_DIR="$unix_path"
22374  fi
22375
22376
22377  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22378  BOOT_JDK_SUFFIX=""
22379  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22380  if test "x$ALL_JDKS_FOUND" != x; then
22381    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22382
22383  if test "x$BOOT_JDK_FOUND" = xno; then
22384    # Now execute the test
22385
22386        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22387        if test -d "$BOOT_JDK"; then
22388          BOOT_JDK_FOUND=maybe
22389          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22390$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22391        fi
22392
22393
22394    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22395    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22396      # Do we have a bin/java?
22397      if test ! -x "$BOOT_JDK/bin/java"; then
22398        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22399$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22400        BOOT_JDK_FOUND=no
22401      else
22402        # Do we have a bin/javac?
22403        if test ! -x "$BOOT_JDK/bin/javac"; then
22404          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22405$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22406          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22407$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22408          BOOT_JDK_FOUND=no
22409        else
22410          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22411          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22412            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22413$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22414            BOOT_JDK_FOUND=no
22415          else
22416            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22417            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22418
22419            # Extra M4 quote needed to protect [] in grep expression.
22420            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22421            if test "x$FOUND_CORRECT_VERSION" = x; then
22422              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22423$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22424              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22425$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22426              BOOT_JDK_FOUND=no
22427            else
22428              # We're done! :-)
22429              BOOT_JDK_FOUND=yes
22430
22431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22432
22433  # Input might be given as Windows format, start by converting to
22434  # unix format.
22435  path="$BOOT_JDK"
22436  new_path=`$CYGPATH -u "$path"`
22437
22438  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22439  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22440  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22441  # "foo.exe" is OK but "foo" is an error.
22442  #
22443  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22444  # It is also a way to make sure we got the proper file name for the real test later on.
22445  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22446  if test "x$test_shortpath" = x; then
22447    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22448$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22449    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22450  fi
22451
22452  # Call helper function which possibly converts this using DOS-style short mode.
22453  # If so, the updated path is stored in $new_path.
22454
22455  input_path="$new_path"
22456  # Check if we need to convert this using DOS-style short mode. If the path
22457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22458  # take no chances and rewrite it.
22459  # Note: m4 eats our [], so we need to use [ and ] instead.
22460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22461  if test "x$has_forbidden_chars" != x; then
22462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22466      # Going to short mode and back again did indeed matter. Since short mode is
22467      # case insensitive, let's make it lowercase to improve readability.
22468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22469      # Now convert it back to Unix-stile (cygpath)
22470      input_path=`$CYGPATH -u "$shortmode_path"`
22471      new_path="$input_path"
22472    fi
22473  fi
22474
22475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22476  if test "x$test_cygdrive_prefix" = x; then
22477    # As a simple fix, exclude /usr/bin since it's not a real path.
22478    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22480      # a path prefixed by /cygdrive for fixpath to work.
22481      new_path="$CYGWIN_ROOT_PATH$input_path"
22482    fi
22483  fi
22484
22485
22486  if test "x$path" != "x$new_path"; then
22487    BOOT_JDK="$new_path"
22488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22489$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22490  fi
22491
22492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22493
22494  path="$BOOT_JDK"
22495  has_colon=`$ECHO $path | $GREP ^.:`
22496  new_path="$path"
22497  if test "x$has_colon" = x; then
22498    # Not in mixed or Windows style, start by that.
22499    new_path=`cmd //c echo $path`
22500  fi
22501
22502
22503  input_path="$new_path"
22504  # Check if we need to convert this using DOS-style short mode. If the path
22505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22506  # take no chances and rewrite it.
22507  # Note: m4 eats our [], so we need to use [ and ] instead.
22508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22509  if test "x$has_forbidden_chars" != x; then
22510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22512  fi
22513
22514
22515  windows_path="$new_path"
22516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22517    unix_path=`$CYGPATH -u "$windows_path"`
22518    new_path="$unix_path"
22519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22521    new_path="$unix_path"
22522  fi
22523
22524  if test "x$path" != "x$new_path"; then
22525    BOOT_JDK="$new_path"
22526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22527$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22528  fi
22529
22530  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22531  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22532
22533  else
22534    # We're on a posix platform. Hooray! :)
22535    path="$BOOT_JDK"
22536    has_space=`$ECHO "$path" | $GREP " "`
22537    if test "x$has_space" != x; then
22538      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22539$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22540      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22541    fi
22542
22543    # Use eval to expand a potential ~
22544    eval path="$path"
22545    if test ! -f "$path" && test ! -d "$path"; then
22546      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22547    fi
22548
22549    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22550  fi
22551
22552              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22553$as_echo_n "checking for Boot JDK... " >&6; }
22554              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22555$as_echo "$BOOT_JDK" >&6; }
22556              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22557$as_echo_n "checking Boot JDK version... " >&6; }
22558              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22559              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22560$as_echo "$BOOT_JDK_VERSION" >&6; }
22561            fi # end check jdk version
22562          fi # end check rt.jar
22563        fi # end check javac
22564      fi # end check java
22565    fi # end check boot jdk found
22566  fi
22567
22568    done
22569  fi
22570
22571  fi
22572
22573
22574    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22575    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22576      # Do we have a bin/java?
22577      if test ! -x "$BOOT_JDK/bin/java"; then
22578        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22579$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22580        BOOT_JDK_FOUND=no
22581      else
22582        # Do we have a bin/javac?
22583        if test ! -x "$BOOT_JDK/bin/javac"; then
22584          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22586          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22587$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22588          BOOT_JDK_FOUND=no
22589        else
22590          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22591          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22592            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22593$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22594            BOOT_JDK_FOUND=no
22595          else
22596            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22597            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22598
22599            # Extra M4 quote needed to protect [] in grep expression.
22600            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22601            if test "x$FOUND_CORRECT_VERSION" = x; then
22602              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22603$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22604              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22605$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22606              BOOT_JDK_FOUND=no
22607            else
22608              # We're done! :-)
22609              BOOT_JDK_FOUND=yes
22610
22611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22612
22613  # Input might be given as Windows format, start by converting to
22614  # unix format.
22615  path="$BOOT_JDK"
22616  new_path=`$CYGPATH -u "$path"`
22617
22618  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22619  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22620  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22621  # "foo.exe" is OK but "foo" is an error.
22622  #
22623  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22624  # It is also a way to make sure we got the proper file name for the real test later on.
22625  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22626  if test "x$test_shortpath" = x; then
22627    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22628$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22629    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22630  fi
22631
22632  # Call helper function which possibly converts this using DOS-style short mode.
22633  # If so, the updated path is stored in $new_path.
22634
22635  input_path="$new_path"
22636  # Check if we need to convert this using DOS-style short mode. If the path
22637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22638  # take no chances and rewrite it.
22639  # Note: m4 eats our [], so we need to use [ and ] instead.
22640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22641  if test "x$has_forbidden_chars" != x; then
22642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22643    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22644    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22645    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22646      # Going to short mode and back again did indeed matter. Since short mode is
22647      # case insensitive, let's make it lowercase to improve readability.
22648      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22649      # Now convert it back to Unix-stile (cygpath)
22650      input_path=`$CYGPATH -u "$shortmode_path"`
22651      new_path="$input_path"
22652    fi
22653  fi
22654
22655  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22656  if test "x$test_cygdrive_prefix" = x; then
22657    # As a simple fix, exclude /usr/bin since it's not a real path.
22658    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22659      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22660      # a path prefixed by /cygdrive for fixpath to work.
22661      new_path="$CYGWIN_ROOT_PATH$input_path"
22662    fi
22663  fi
22664
22665
22666  if test "x$path" != "x$new_path"; then
22667    BOOT_JDK="$new_path"
22668    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22669$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22670  fi
22671
22672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22673
22674  path="$BOOT_JDK"
22675  has_colon=`$ECHO $path | $GREP ^.:`
22676  new_path="$path"
22677  if test "x$has_colon" = x; then
22678    # Not in mixed or Windows style, start by that.
22679    new_path=`cmd //c echo $path`
22680  fi
22681
22682
22683  input_path="$new_path"
22684  # Check if we need to convert this using DOS-style short mode. If the path
22685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22686  # take no chances and rewrite it.
22687  # Note: m4 eats our [], so we need to use [ and ] instead.
22688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22689  if test "x$has_forbidden_chars" != x; then
22690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22691    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22692  fi
22693
22694
22695  windows_path="$new_path"
22696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22697    unix_path=`$CYGPATH -u "$windows_path"`
22698    new_path="$unix_path"
22699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22701    new_path="$unix_path"
22702  fi
22703
22704  if test "x$path" != "x$new_path"; then
22705    BOOT_JDK="$new_path"
22706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22707$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22708  fi
22709
22710  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22711  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22712
22713  else
22714    # We're on a posix platform. Hooray! :)
22715    path="$BOOT_JDK"
22716    has_space=`$ECHO "$path" | $GREP " "`
22717    if test "x$has_space" != x; then
22718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22719$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22720      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22721    fi
22722
22723    # Use eval to expand a potential ~
22724    eval path="$path"
22725    if test ! -f "$path" && test ! -d "$path"; then
22726      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22727    fi
22728
22729    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22730  fi
22731
22732              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22733$as_echo_n "checking for Boot JDK... " >&6; }
22734              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22735$as_echo "$BOOT_JDK" >&6; }
22736              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22737$as_echo_n "checking Boot JDK version... " >&6; }
22738              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22739              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22740$as_echo "$BOOT_JDK_VERSION" >&6; }
22741            fi # end check jdk version
22742          fi # end check rt.jar
22743        fi # end check javac
22744      fi # end check java
22745    fi # end check boot jdk found
22746  fi
22747
22748
22749  if test "x$BOOT_JDK_FOUND" = xno; then
22750    # Now execute the test
22751
22752  if test "x$PROGRAMFILES" != x; then
22753    VIRTUAL_DIR="$PROGRAMFILES/Java"
22754
22755  windows_path="$VIRTUAL_DIR"
22756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22757    unix_path=`$CYGPATH -u "$windows_path"`
22758    VIRTUAL_DIR="$unix_path"
22759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22761    VIRTUAL_DIR="$unix_path"
22762  fi
22763
22764
22765  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22766  BOOT_JDK_SUFFIX=""
22767  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22768  if test "x$ALL_JDKS_FOUND" != x; then
22769    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22770
22771  if test "x$BOOT_JDK_FOUND" = xno; then
22772    # Now execute the test
22773
22774        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22775        if test -d "$BOOT_JDK"; then
22776          BOOT_JDK_FOUND=maybe
22777          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22778$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22779        fi
22780
22781
22782    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22783    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22784      # Do we have a bin/java?
22785      if test ! -x "$BOOT_JDK/bin/java"; then
22786        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22787$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22788        BOOT_JDK_FOUND=no
22789      else
22790        # Do we have a bin/javac?
22791        if test ! -x "$BOOT_JDK/bin/javac"; then
22792          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22793$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22794          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22795$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22796          BOOT_JDK_FOUND=no
22797        else
22798          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22799          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22800            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22801$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22802            BOOT_JDK_FOUND=no
22803          else
22804            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22805            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22806
22807            # Extra M4 quote needed to protect [] in grep expression.
22808            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22809            if test "x$FOUND_CORRECT_VERSION" = x; then
22810              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22812              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22813$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22814              BOOT_JDK_FOUND=no
22815            else
22816              # We're done! :-)
22817              BOOT_JDK_FOUND=yes
22818
22819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22820
22821  # Input might be given as Windows format, start by converting to
22822  # unix format.
22823  path="$BOOT_JDK"
22824  new_path=`$CYGPATH -u "$path"`
22825
22826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22829  # "foo.exe" is OK but "foo" is an error.
22830  #
22831  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22832  # It is also a way to make sure we got the proper file name for the real test later on.
22833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22834  if test "x$test_shortpath" = x; then
22835    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22836$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22837    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22838  fi
22839
22840  # Call helper function which possibly converts this using DOS-style short mode.
22841  # If so, the updated path is stored in $new_path.
22842
22843  input_path="$new_path"
22844  # Check if we need to convert this using DOS-style short mode. If the path
22845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22846  # take no chances and rewrite it.
22847  # Note: m4 eats our [], so we need to use [ and ] instead.
22848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22849  if test "x$has_forbidden_chars" != x; then
22850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22851    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22852    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22853    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22854      # Going to short mode and back again did indeed matter. Since short mode is
22855      # case insensitive, let's make it lowercase to improve readability.
22856      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22857      # Now convert it back to Unix-stile (cygpath)
22858      input_path=`$CYGPATH -u "$shortmode_path"`
22859      new_path="$input_path"
22860    fi
22861  fi
22862
22863  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22864  if test "x$test_cygdrive_prefix" = x; then
22865    # As a simple fix, exclude /usr/bin since it's not a real path.
22866    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22867      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22868      # a path prefixed by /cygdrive for fixpath to work.
22869      new_path="$CYGWIN_ROOT_PATH$input_path"
22870    fi
22871  fi
22872
22873
22874  if test "x$path" != "x$new_path"; then
22875    BOOT_JDK="$new_path"
22876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22877$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22878  fi
22879
22880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22881
22882  path="$BOOT_JDK"
22883  has_colon=`$ECHO $path | $GREP ^.:`
22884  new_path="$path"
22885  if test "x$has_colon" = x; then
22886    # Not in mixed or Windows style, start by that.
22887    new_path=`cmd //c echo $path`
22888  fi
22889
22890
22891  input_path="$new_path"
22892  # Check if we need to convert this using DOS-style short mode. If the path
22893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22894  # take no chances and rewrite it.
22895  # Note: m4 eats our [], so we need to use [ and ] instead.
22896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22897  if test "x$has_forbidden_chars" != x; then
22898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22900  fi
22901
22902
22903  windows_path="$new_path"
22904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22905    unix_path=`$CYGPATH -u "$windows_path"`
22906    new_path="$unix_path"
22907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22909    new_path="$unix_path"
22910  fi
22911
22912  if test "x$path" != "x$new_path"; then
22913    BOOT_JDK="$new_path"
22914    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22915$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22916  fi
22917
22918  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22919  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22920
22921  else
22922    # We're on a posix platform. Hooray! :)
22923    path="$BOOT_JDK"
22924    has_space=`$ECHO "$path" | $GREP " "`
22925    if test "x$has_space" != x; then
22926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22927$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22928      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22929    fi
22930
22931    # Use eval to expand a potential ~
22932    eval path="$path"
22933    if test ! -f "$path" && test ! -d "$path"; then
22934      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22935    fi
22936
22937    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22938  fi
22939
22940              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22941$as_echo_n "checking for Boot JDK... " >&6; }
22942              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22943$as_echo "$BOOT_JDK" >&6; }
22944              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22945$as_echo_n "checking Boot JDK version... " >&6; }
22946              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22947              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22948$as_echo "$BOOT_JDK_VERSION" >&6; }
22949            fi # end check jdk version
22950          fi # end check rt.jar
22951        fi # end check javac
22952      fi # end check java
22953    fi # end check boot jdk found
22954  fi
22955
22956    done
22957  fi
22958
22959  fi
22960
22961
22962    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22963    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22964      # Do we have a bin/java?
22965      if test ! -x "$BOOT_JDK/bin/java"; then
22966        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22968        BOOT_JDK_FOUND=no
22969      else
22970        # Do we have a bin/javac?
22971        if test ! -x "$BOOT_JDK/bin/javac"; then
22972          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22973$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22974          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22975$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22976          BOOT_JDK_FOUND=no
22977        else
22978          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22979          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22980            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22981$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22982            BOOT_JDK_FOUND=no
22983          else
22984            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22985            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22986
22987            # Extra M4 quote needed to protect [] in grep expression.
22988            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22989            if test "x$FOUND_CORRECT_VERSION" = x; then
22990              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22991$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22992              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22993$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22994              BOOT_JDK_FOUND=no
22995            else
22996              # We're done! :-)
22997              BOOT_JDK_FOUND=yes
22998
22999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23000
23001  # Input might be given as Windows format, start by converting to
23002  # unix format.
23003  path="$BOOT_JDK"
23004  new_path=`$CYGPATH -u "$path"`
23005
23006  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23007  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23008  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23009  # "foo.exe" is OK but "foo" is an error.
23010  #
23011  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23012  # It is also a way to make sure we got the proper file name for the real test later on.
23013  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23014  if test "x$test_shortpath" = x; then
23015    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23016$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23017    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23018  fi
23019
23020  # Call helper function which possibly converts this using DOS-style short mode.
23021  # If so, the updated path is stored in $new_path.
23022
23023  input_path="$new_path"
23024  # Check if we need to convert this using DOS-style short mode. If the path
23025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23026  # take no chances and rewrite it.
23027  # Note: m4 eats our [], so we need to use [ and ] instead.
23028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23029  if test "x$has_forbidden_chars" != x; then
23030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23031    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23032    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23033    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23034      # Going to short mode and back again did indeed matter. Since short mode is
23035      # case insensitive, let's make it lowercase to improve readability.
23036      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23037      # Now convert it back to Unix-stile (cygpath)
23038      input_path=`$CYGPATH -u "$shortmode_path"`
23039      new_path="$input_path"
23040    fi
23041  fi
23042
23043  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23044  if test "x$test_cygdrive_prefix" = x; then
23045    # As a simple fix, exclude /usr/bin since it's not a real path.
23046    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23047      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23048      # a path prefixed by /cygdrive for fixpath to work.
23049      new_path="$CYGWIN_ROOT_PATH$input_path"
23050    fi
23051  fi
23052
23053
23054  if test "x$path" != "x$new_path"; then
23055    BOOT_JDK="$new_path"
23056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23057$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23058  fi
23059
23060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23061
23062  path="$BOOT_JDK"
23063  has_colon=`$ECHO $path | $GREP ^.:`
23064  new_path="$path"
23065  if test "x$has_colon" = x; then
23066    # Not in mixed or Windows style, start by that.
23067    new_path=`cmd //c echo $path`
23068  fi
23069
23070
23071  input_path="$new_path"
23072  # Check if we need to convert this using DOS-style short mode. If the path
23073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23074  # take no chances and rewrite it.
23075  # Note: m4 eats our [], so we need to use [ and ] instead.
23076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23077  if test "x$has_forbidden_chars" != x; then
23078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23079    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23080  fi
23081
23082
23083  windows_path="$new_path"
23084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23085    unix_path=`$CYGPATH -u "$windows_path"`
23086    new_path="$unix_path"
23087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23089    new_path="$unix_path"
23090  fi
23091
23092  if test "x$path" != "x$new_path"; then
23093    BOOT_JDK="$new_path"
23094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23095$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23096  fi
23097
23098  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23099  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23100
23101  else
23102    # We're on a posix platform. Hooray! :)
23103    path="$BOOT_JDK"
23104    has_space=`$ECHO "$path" | $GREP " "`
23105    if test "x$has_space" != x; then
23106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23107$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23108      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23109    fi
23110
23111    # Use eval to expand a potential ~
23112    eval path="$path"
23113    if test ! -f "$path" && test ! -d "$path"; then
23114      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23115    fi
23116
23117    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23118  fi
23119
23120              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23121$as_echo_n "checking for Boot JDK... " >&6; }
23122              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23123$as_echo "$BOOT_JDK" >&6; }
23124              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23125$as_echo_n "checking Boot JDK version... " >&6; }
23126              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23127              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23128$as_echo "$BOOT_JDK_VERSION" >&6; }
23129            fi # end check jdk version
23130          fi # end check rt.jar
23131        fi # end check javac
23132      fi # end check java
23133    fi # end check boot jdk found
23134  fi
23135
23136
23137  if test "x$BOOT_JDK_FOUND" = xno; then
23138    # Now execute the test
23139
23140  if test "x$ProgramFiles" != x; then
23141    VIRTUAL_DIR="$ProgramFiles/Java"
23142
23143  windows_path="$VIRTUAL_DIR"
23144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23145    unix_path=`$CYGPATH -u "$windows_path"`
23146    VIRTUAL_DIR="$unix_path"
23147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23149    VIRTUAL_DIR="$unix_path"
23150  fi
23151
23152
23153  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23154  BOOT_JDK_SUFFIX=""
23155  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23156  if test "x$ALL_JDKS_FOUND" != x; then
23157    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23158
23159  if test "x$BOOT_JDK_FOUND" = xno; then
23160    # Now execute the test
23161
23162        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23163        if test -d "$BOOT_JDK"; then
23164          BOOT_JDK_FOUND=maybe
23165          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23166$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23167        fi
23168
23169
23170    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23171    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23172      # Do we have a bin/java?
23173      if test ! -x "$BOOT_JDK/bin/java"; then
23174        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23175$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23176        BOOT_JDK_FOUND=no
23177      else
23178        # Do we have a bin/javac?
23179        if test ! -x "$BOOT_JDK/bin/javac"; then
23180          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23181$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23182          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23183$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23184          BOOT_JDK_FOUND=no
23185        else
23186          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23187          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23188            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23190            BOOT_JDK_FOUND=no
23191          else
23192            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23193            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23194
23195            # Extra M4 quote needed to protect [] in grep expression.
23196            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23197            if test "x$FOUND_CORRECT_VERSION" = x; then
23198              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23200              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23201$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23202              BOOT_JDK_FOUND=no
23203            else
23204              # We're done! :-)
23205              BOOT_JDK_FOUND=yes
23206
23207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23208
23209  # Input might be given as Windows format, start by converting to
23210  # unix format.
23211  path="$BOOT_JDK"
23212  new_path=`$CYGPATH -u "$path"`
23213
23214  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23215  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23216  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23217  # "foo.exe" is OK but "foo" is an error.
23218  #
23219  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23220  # It is also a way to make sure we got the proper file name for the real test later on.
23221  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23222  if test "x$test_shortpath" = x; then
23223    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23224$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23225    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23226  fi
23227
23228  # Call helper function which possibly converts this using DOS-style short mode.
23229  # If so, the updated path is stored in $new_path.
23230
23231  input_path="$new_path"
23232  # Check if we need to convert this using DOS-style short mode. If the path
23233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23234  # take no chances and rewrite it.
23235  # Note: m4 eats our [], so we need to use [ and ] instead.
23236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23237  if test "x$has_forbidden_chars" != x; then
23238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23239    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23240    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23241    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23242      # Going to short mode and back again did indeed matter. Since short mode is
23243      # case insensitive, let's make it lowercase to improve readability.
23244      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23245      # Now convert it back to Unix-stile (cygpath)
23246      input_path=`$CYGPATH -u "$shortmode_path"`
23247      new_path="$input_path"
23248    fi
23249  fi
23250
23251  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23252  if test "x$test_cygdrive_prefix" = x; then
23253    # As a simple fix, exclude /usr/bin since it's not a real path.
23254    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23255      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23256      # a path prefixed by /cygdrive for fixpath to work.
23257      new_path="$CYGWIN_ROOT_PATH$input_path"
23258    fi
23259  fi
23260
23261
23262  if test "x$path" != "x$new_path"; then
23263    BOOT_JDK="$new_path"
23264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23265$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23266  fi
23267
23268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23269
23270  path="$BOOT_JDK"
23271  has_colon=`$ECHO $path | $GREP ^.:`
23272  new_path="$path"
23273  if test "x$has_colon" = x; then
23274    # Not in mixed or Windows style, start by that.
23275    new_path=`cmd //c echo $path`
23276  fi
23277
23278
23279  input_path="$new_path"
23280  # Check if we need to convert this using DOS-style short mode. If the path
23281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23282  # take no chances and rewrite it.
23283  # Note: m4 eats our [], so we need to use [ and ] instead.
23284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23285  if test "x$has_forbidden_chars" != x; then
23286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23287    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23288  fi
23289
23290
23291  windows_path="$new_path"
23292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23293    unix_path=`$CYGPATH -u "$windows_path"`
23294    new_path="$unix_path"
23295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23297    new_path="$unix_path"
23298  fi
23299
23300  if test "x$path" != "x$new_path"; then
23301    BOOT_JDK="$new_path"
23302    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23303$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23304  fi
23305
23306  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23307  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23308
23309  else
23310    # We're on a posix platform. Hooray! :)
23311    path="$BOOT_JDK"
23312    has_space=`$ECHO "$path" | $GREP " "`
23313    if test "x$has_space" != x; then
23314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23315$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23316      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23317    fi
23318
23319    # Use eval to expand a potential ~
23320    eval path="$path"
23321    if test ! -f "$path" && test ! -d "$path"; then
23322      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23323    fi
23324
23325    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23326  fi
23327
23328              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23329$as_echo_n "checking for Boot JDK... " >&6; }
23330              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23331$as_echo "$BOOT_JDK" >&6; }
23332              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23333$as_echo_n "checking Boot JDK version... " >&6; }
23334              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23335              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23336$as_echo "$BOOT_JDK_VERSION" >&6; }
23337            fi # end check jdk version
23338          fi # end check rt.jar
23339        fi # end check javac
23340      fi # end check java
23341    fi # end check boot jdk found
23342  fi
23343
23344    done
23345  fi
23346
23347  fi
23348
23349
23350    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23351    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23352      # Do we have a bin/java?
23353      if test ! -x "$BOOT_JDK/bin/java"; then
23354        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23355$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23356        BOOT_JDK_FOUND=no
23357      else
23358        # Do we have a bin/javac?
23359        if test ! -x "$BOOT_JDK/bin/javac"; then
23360          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23361$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23362          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23363$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23364          BOOT_JDK_FOUND=no
23365        else
23366          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23367          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23368            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23369$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23370            BOOT_JDK_FOUND=no
23371          else
23372            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23373            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23374
23375            # Extra M4 quote needed to protect [] in grep expression.
23376            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23377            if test "x$FOUND_CORRECT_VERSION" = x; then
23378              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23379$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23380              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23381$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23382              BOOT_JDK_FOUND=no
23383            else
23384              # We're done! :-)
23385              BOOT_JDK_FOUND=yes
23386
23387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23388
23389  # Input might be given as Windows format, start by converting to
23390  # unix format.
23391  path="$BOOT_JDK"
23392  new_path=`$CYGPATH -u "$path"`
23393
23394  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23395  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23396  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23397  # "foo.exe" is OK but "foo" is an error.
23398  #
23399  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23400  # It is also a way to make sure we got the proper file name for the real test later on.
23401  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23402  if test "x$test_shortpath" = x; then
23403    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23404$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23405    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23406  fi
23407
23408  # Call helper function which possibly converts this using DOS-style short mode.
23409  # If so, the updated path is stored in $new_path.
23410
23411  input_path="$new_path"
23412  # Check if we need to convert this using DOS-style short mode. If the path
23413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23414  # take no chances and rewrite it.
23415  # Note: m4 eats our [], so we need to use [ and ] instead.
23416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23417  if test "x$has_forbidden_chars" != x; then
23418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23419    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23420    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23421    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23422      # Going to short mode and back again did indeed matter. Since short mode is
23423      # case insensitive, let's make it lowercase to improve readability.
23424      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23425      # Now convert it back to Unix-stile (cygpath)
23426      input_path=`$CYGPATH -u "$shortmode_path"`
23427      new_path="$input_path"
23428    fi
23429  fi
23430
23431  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23432  if test "x$test_cygdrive_prefix" = x; then
23433    # As a simple fix, exclude /usr/bin since it's not a real path.
23434    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23435      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23436      # a path prefixed by /cygdrive for fixpath to work.
23437      new_path="$CYGWIN_ROOT_PATH$input_path"
23438    fi
23439  fi
23440
23441
23442  if test "x$path" != "x$new_path"; then
23443    BOOT_JDK="$new_path"
23444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23445$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23446  fi
23447
23448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23449
23450  path="$BOOT_JDK"
23451  has_colon=`$ECHO $path | $GREP ^.:`
23452  new_path="$path"
23453  if test "x$has_colon" = x; then
23454    # Not in mixed or Windows style, start by that.
23455    new_path=`cmd //c echo $path`
23456  fi
23457
23458
23459  input_path="$new_path"
23460  # Check if we need to convert this using DOS-style short mode. If the path
23461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23462  # take no chances and rewrite it.
23463  # Note: m4 eats our [], so we need to use [ and ] instead.
23464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23465  if test "x$has_forbidden_chars" != x; then
23466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23467    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23468  fi
23469
23470
23471  windows_path="$new_path"
23472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23473    unix_path=`$CYGPATH -u "$windows_path"`
23474    new_path="$unix_path"
23475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23477    new_path="$unix_path"
23478  fi
23479
23480  if test "x$path" != "x$new_path"; then
23481    BOOT_JDK="$new_path"
23482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23483$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23484  fi
23485
23486  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23487  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23488
23489  else
23490    # We're on a posix platform. Hooray! :)
23491    path="$BOOT_JDK"
23492    has_space=`$ECHO "$path" | $GREP " "`
23493    if test "x$has_space" != x; then
23494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23495$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23496      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23497    fi
23498
23499    # Use eval to expand a potential ~
23500    eval path="$path"
23501    if test ! -f "$path" && test ! -d "$path"; then
23502      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23503    fi
23504
23505    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23506  fi
23507
23508              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23509$as_echo_n "checking for Boot JDK... " >&6; }
23510              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23511$as_echo "$BOOT_JDK" >&6; }
23512              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23513$as_echo_n "checking Boot JDK version... " >&6; }
23514              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23515              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23516$as_echo "$BOOT_JDK_VERSION" >&6; }
23517            fi # end check jdk version
23518          fi # end check rt.jar
23519        fi # end check javac
23520      fi # end check java
23521    fi # end check boot jdk found
23522  fi
23523
23524
23525  if test "x$BOOT_JDK_FOUND" = xno; then
23526    # Now execute the test
23527
23528  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23529  BOOT_JDK_SUFFIX=""
23530  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23531  if test "x$ALL_JDKS_FOUND" != x; then
23532    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23533
23534  if test "x$BOOT_JDK_FOUND" = xno; then
23535    # Now execute the test
23536
23537        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23538        if test -d "$BOOT_JDK"; then
23539          BOOT_JDK_FOUND=maybe
23540          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23541$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23542        fi
23543
23544
23545    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23546    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23547      # Do we have a bin/java?
23548      if test ! -x "$BOOT_JDK/bin/java"; then
23549        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23550$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23551        BOOT_JDK_FOUND=no
23552      else
23553        # Do we have a bin/javac?
23554        if test ! -x "$BOOT_JDK/bin/javac"; then
23555          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23556$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23557          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23558$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23559          BOOT_JDK_FOUND=no
23560        else
23561          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23562          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23563            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23564$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23565            BOOT_JDK_FOUND=no
23566          else
23567            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23568            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23569
23570            # Extra M4 quote needed to protect [] in grep expression.
23571            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23572            if test "x$FOUND_CORRECT_VERSION" = x; then
23573              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23574$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23575              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23576$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23577              BOOT_JDK_FOUND=no
23578            else
23579              # We're done! :-)
23580              BOOT_JDK_FOUND=yes
23581
23582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23583
23584  # Input might be given as Windows format, start by converting to
23585  # unix format.
23586  path="$BOOT_JDK"
23587  new_path=`$CYGPATH -u "$path"`
23588
23589  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23590  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23591  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23592  # "foo.exe" is OK but "foo" is an error.
23593  #
23594  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23595  # It is also a way to make sure we got the proper file name for the real test later on.
23596  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23597  if test "x$test_shortpath" = x; then
23598    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23599$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23600    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23601  fi
23602
23603  # Call helper function which possibly converts this using DOS-style short mode.
23604  # If so, the updated path is stored in $new_path.
23605
23606  input_path="$new_path"
23607  # Check if we need to convert this using DOS-style short mode. If the path
23608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23609  # take no chances and rewrite it.
23610  # Note: m4 eats our [], so we need to use [ and ] instead.
23611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23612  if test "x$has_forbidden_chars" != x; then
23613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23614    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23615    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23616    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23617      # Going to short mode and back again did indeed matter. Since short mode is
23618      # case insensitive, let's make it lowercase to improve readability.
23619      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23620      # Now convert it back to Unix-stile (cygpath)
23621      input_path=`$CYGPATH -u "$shortmode_path"`
23622      new_path="$input_path"
23623    fi
23624  fi
23625
23626  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23627  if test "x$test_cygdrive_prefix" = x; then
23628    # As a simple fix, exclude /usr/bin since it's not a real path.
23629    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23630      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23631      # a path prefixed by /cygdrive for fixpath to work.
23632      new_path="$CYGWIN_ROOT_PATH$input_path"
23633    fi
23634  fi
23635
23636
23637  if test "x$path" != "x$new_path"; then
23638    BOOT_JDK="$new_path"
23639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23640$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23641  fi
23642
23643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23644
23645  path="$BOOT_JDK"
23646  has_colon=`$ECHO $path | $GREP ^.:`
23647  new_path="$path"
23648  if test "x$has_colon" = x; then
23649    # Not in mixed or Windows style, start by that.
23650    new_path=`cmd //c echo $path`
23651  fi
23652
23653
23654  input_path="$new_path"
23655  # Check if we need to convert this using DOS-style short mode. If the path
23656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23657  # take no chances and rewrite it.
23658  # Note: m4 eats our [], so we need to use [ and ] instead.
23659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23660  if test "x$has_forbidden_chars" != x; then
23661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23662    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23663  fi
23664
23665
23666  windows_path="$new_path"
23667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23668    unix_path=`$CYGPATH -u "$windows_path"`
23669    new_path="$unix_path"
23670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23672    new_path="$unix_path"
23673  fi
23674
23675  if test "x$path" != "x$new_path"; then
23676    BOOT_JDK="$new_path"
23677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23678$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23679  fi
23680
23681  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23682  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23683
23684  else
23685    # We're on a posix platform. Hooray! :)
23686    path="$BOOT_JDK"
23687    has_space=`$ECHO "$path" | $GREP " "`
23688    if test "x$has_space" != x; then
23689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23690$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23691      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23692    fi
23693
23694    # Use eval to expand a potential ~
23695    eval path="$path"
23696    if test ! -f "$path" && test ! -d "$path"; then
23697      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23698    fi
23699
23700    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23701  fi
23702
23703              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23704$as_echo_n "checking for Boot JDK... " >&6; }
23705              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23706$as_echo "$BOOT_JDK" >&6; }
23707              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23708$as_echo_n "checking Boot JDK version... " >&6; }
23709              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23710              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23711$as_echo "$BOOT_JDK_VERSION" >&6; }
23712            fi # end check jdk version
23713          fi # end check rt.jar
23714        fi # end check javac
23715      fi # end check java
23716    fi # end check boot jdk found
23717  fi
23718
23719    done
23720  fi
23721
23722
23723    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23724    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23725      # Do we have a bin/java?
23726      if test ! -x "$BOOT_JDK/bin/java"; then
23727        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23728$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23729        BOOT_JDK_FOUND=no
23730      else
23731        # Do we have a bin/javac?
23732        if test ! -x "$BOOT_JDK/bin/javac"; then
23733          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23734$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23735          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23736$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23737          BOOT_JDK_FOUND=no
23738        else
23739          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23740          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23741            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23742$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23743            BOOT_JDK_FOUND=no
23744          else
23745            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23746            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23747
23748            # Extra M4 quote needed to protect [] in grep expression.
23749            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23750            if test "x$FOUND_CORRECT_VERSION" = x; then
23751              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23752$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23753              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23754$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23755              BOOT_JDK_FOUND=no
23756            else
23757              # We're done! :-)
23758              BOOT_JDK_FOUND=yes
23759
23760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23761
23762  # Input might be given as Windows format, start by converting to
23763  # unix format.
23764  path="$BOOT_JDK"
23765  new_path=`$CYGPATH -u "$path"`
23766
23767  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23768  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23769  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23770  # "foo.exe" is OK but "foo" is an error.
23771  #
23772  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23773  # It is also a way to make sure we got the proper file name for the real test later on.
23774  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23775  if test "x$test_shortpath" = x; then
23776    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23777$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23778    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23779  fi
23780
23781  # Call helper function which possibly converts this using DOS-style short mode.
23782  # If so, the updated path is stored in $new_path.
23783
23784  input_path="$new_path"
23785  # Check if we need to convert this using DOS-style short mode. If the path
23786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23787  # take no chances and rewrite it.
23788  # Note: m4 eats our [], so we need to use [ and ] instead.
23789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23790  if test "x$has_forbidden_chars" != x; then
23791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23792    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23793    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23794    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23795      # Going to short mode and back again did indeed matter. Since short mode is
23796      # case insensitive, let's make it lowercase to improve readability.
23797      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23798      # Now convert it back to Unix-stile (cygpath)
23799      input_path=`$CYGPATH -u "$shortmode_path"`
23800      new_path="$input_path"
23801    fi
23802  fi
23803
23804  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23805  if test "x$test_cygdrive_prefix" = x; then
23806    # As a simple fix, exclude /usr/bin since it's not a real path.
23807    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23808      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23809      # a path prefixed by /cygdrive for fixpath to work.
23810      new_path="$CYGWIN_ROOT_PATH$input_path"
23811    fi
23812  fi
23813
23814
23815  if test "x$path" != "x$new_path"; then
23816    BOOT_JDK="$new_path"
23817    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23818$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23819  fi
23820
23821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23822
23823  path="$BOOT_JDK"
23824  has_colon=`$ECHO $path | $GREP ^.:`
23825  new_path="$path"
23826  if test "x$has_colon" = x; then
23827    # Not in mixed or Windows style, start by that.
23828    new_path=`cmd //c echo $path`
23829  fi
23830
23831
23832  input_path="$new_path"
23833  # Check if we need to convert this using DOS-style short mode. If the path
23834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23835  # take no chances and rewrite it.
23836  # Note: m4 eats our [], so we need to use [ and ] instead.
23837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23838  if test "x$has_forbidden_chars" != x; then
23839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23840    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23841  fi
23842
23843
23844  windows_path="$new_path"
23845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23846    unix_path=`$CYGPATH -u "$windows_path"`
23847    new_path="$unix_path"
23848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23850    new_path="$unix_path"
23851  fi
23852
23853  if test "x$path" != "x$new_path"; then
23854    BOOT_JDK="$new_path"
23855    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23856$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23857  fi
23858
23859  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23860  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23861
23862  else
23863    # We're on a posix platform. Hooray! :)
23864    path="$BOOT_JDK"
23865    has_space=`$ECHO "$path" | $GREP " "`
23866    if test "x$has_space" != x; then
23867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23868$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23869      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23870    fi
23871
23872    # Use eval to expand a potential ~
23873    eval path="$path"
23874    if test ! -f "$path" && test ! -d "$path"; then
23875      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23876    fi
23877
23878    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23879  fi
23880
23881              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23882$as_echo_n "checking for Boot JDK... " >&6; }
23883              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23884$as_echo "$BOOT_JDK" >&6; }
23885              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23886$as_echo_n "checking Boot JDK version... " >&6; }
23887              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23888              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23889$as_echo "$BOOT_JDK_VERSION" >&6; }
23890            fi # end check jdk version
23891          fi # end check rt.jar
23892        fi # end check javac
23893      fi # end check java
23894    fi # end check boot jdk found
23895  fi
23896
23897  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23898
23899  if test "x$BOOT_JDK_FOUND" = xno; then
23900    # Now execute the test
23901
23902  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23903  BOOT_JDK_SUFFIX="/Contents/Home"
23904  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23905  if test "x$ALL_JDKS_FOUND" != x; then
23906    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23907
23908  if test "x$BOOT_JDK_FOUND" = xno; then
23909    # Now execute the test
23910
23911        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23912        if test -d "$BOOT_JDK"; then
23913          BOOT_JDK_FOUND=maybe
23914          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23915$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23916        fi
23917
23918
23919    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23920    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23921      # Do we have a bin/java?
23922      if test ! -x "$BOOT_JDK/bin/java"; then
23923        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23924$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23925        BOOT_JDK_FOUND=no
23926      else
23927        # Do we have a bin/javac?
23928        if test ! -x "$BOOT_JDK/bin/javac"; then
23929          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23930$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23931          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23932$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23933          BOOT_JDK_FOUND=no
23934        else
23935          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23936          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23937            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23938$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23939            BOOT_JDK_FOUND=no
23940          else
23941            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23942            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23943
23944            # Extra M4 quote needed to protect [] in grep expression.
23945            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23946            if test "x$FOUND_CORRECT_VERSION" = x; then
23947              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23948$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23949              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23950$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23951              BOOT_JDK_FOUND=no
23952            else
23953              # We're done! :-)
23954              BOOT_JDK_FOUND=yes
23955
23956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23957
23958  # Input might be given as Windows format, start by converting to
23959  # unix format.
23960  path="$BOOT_JDK"
23961  new_path=`$CYGPATH -u "$path"`
23962
23963  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23964  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23965  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23966  # "foo.exe" is OK but "foo" is an error.
23967  #
23968  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23969  # It is also a way to make sure we got the proper file name for the real test later on.
23970  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23971  if test "x$test_shortpath" = x; then
23972    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23973$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23974    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23975  fi
23976
23977  # Call helper function which possibly converts this using DOS-style short mode.
23978  # If so, the updated path is stored in $new_path.
23979
23980  input_path="$new_path"
23981  # Check if we need to convert this using DOS-style short mode. If the path
23982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23983  # take no chances and rewrite it.
23984  # Note: m4 eats our [], so we need to use [ and ] instead.
23985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23986  if test "x$has_forbidden_chars" != x; then
23987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23991      # Going to short mode and back again did indeed matter. Since short mode is
23992      # case insensitive, let's make it lowercase to improve readability.
23993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23994      # Now convert it back to Unix-stile (cygpath)
23995      input_path=`$CYGPATH -u "$shortmode_path"`
23996      new_path="$input_path"
23997    fi
23998  fi
23999
24000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24001  if test "x$test_cygdrive_prefix" = x; then
24002    # As a simple fix, exclude /usr/bin since it's not a real path.
24003    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24005      # a path prefixed by /cygdrive for fixpath to work.
24006      new_path="$CYGWIN_ROOT_PATH$input_path"
24007    fi
24008  fi
24009
24010
24011  if test "x$path" != "x$new_path"; then
24012    BOOT_JDK="$new_path"
24013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24014$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24015  fi
24016
24017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24018
24019  path="$BOOT_JDK"
24020  has_colon=`$ECHO $path | $GREP ^.:`
24021  new_path="$path"
24022  if test "x$has_colon" = x; then
24023    # Not in mixed or Windows style, start by that.
24024    new_path=`cmd //c echo $path`
24025  fi
24026
24027
24028  input_path="$new_path"
24029  # Check if we need to convert this using DOS-style short mode. If the path
24030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24031  # take no chances and rewrite it.
24032  # Note: m4 eats our [], so we need to use [ and ] instead.
24033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24034  if test "x$has_forbidden_chars" != x; then
24035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24036    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24037  fi
24038
24039
24040  windows_path="$new_path"
24041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24042    unix_path=`$CYGPATH -u "$windows_path"`
24043    new_path="$unix_path"
24044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24046    new_path="$unix_path"
24047  fi
24048
24049  if test "x$path" != "x$new_path"; then
24050    BOOT_JDK="$new_path"
24051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24052$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24053  fi
24054
24055  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24056  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24057
24058  else
24059    # We're on a posix platform. Hooray! :)
24060    path="$BOOT_JDK"
24061    has_space=`$ECHO "$path" | $GREP " "`
24062    if test "x$has_space" != x; then
24063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24064$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24065      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24066    fi
24067
24068    # Use eval to expand a potential ~
24069    eval path="$path"
24070    if test ! -f "$path" && test ! -d "$path"; then
24071      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24072    fi
24073
24074    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24075  fi
24076
24077              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24078$as_echo_n "checking for Boot JDK... " >&6; }
24079              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24080$as_echo "$BOOT_JDK" >&6; }
24081              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24082$as_echo_n "checking Boot JDK version... " >&6; }
24083              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24084              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24085$as_echo "$BOOT_JDK_VERSION" >&6; }
24086            fi # end check jdk version
24087          fi # end check rt.jar
24088        fi # end check javac
24089      fi # end check java
24090    fi # end check boot jdk found
24091  fi
24092
24093    done
24094  fi
24095
24096
24097    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24098    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24099      # Do we have a bin/java?
24100      if test ! -x "$BOOT_JDK/bin/java"; then
24101        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24102$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24103        BOOT_JDK_FOUND=no
24104      else
24105        # Do we have a bin/javac?
24106        if test ! -x "$BOOT_JDK/bin/javac"; then
24107          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24108$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24109          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24110$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24111          BOOT_JDK_FOUND=no
24112        else
24113          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24114          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24115            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24116$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24117            BOOT_JDK_FOUND=no
24118          else
24119            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24120            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24121
24122            # Extra M4 quote needed to protect [] in grep expression.
24123            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24124            if test "x$FOUND_CORRECT_VERSION" = x; then
24125              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24126$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24127              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24128$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24129              BOOT_JDK_FOUND=no
24130            else
24131              # We're done! :-)
24132              BOOT_JDK_FOUND=yes
24133
24134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24135
24136  # Input might be given as Windows format, start by converting to
24137  # unix format.
24138  path="$BOOT_JDK"
24139  new_path=`$CYGPATH -u "$path"`
24140
24141  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24142  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24143  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24144  # "foo.exe" is OK but "foo" is an error.
24145  #
24146  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24147  # It is also a way to make sure we got the proper file name for the real test later on.
24148  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24149  if test "x$test_shortpath" = x; then
24150    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24151$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24152    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24153  fi
24154
24155  # Call helper function which possibly converts this using DOS-style short mode.
24156  # If so, the updated path is stored in $new_path.
24157
24158  input_path="$new_path"
24159  # Check if we need to convert this using DOS-style short mode. If the path
24160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24161  # take no chances and rewrite it.
24162  # Note: m4 eats our [], so we need to use [ and ] instead.
24163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24164  if test "x$has_forbidden_chars" != x; then
24165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24166    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24167    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24168    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24169      # Going to short mode and back again did indeed matter. Since short mode is
24170      # case insensitive, let's make it lowercase to improve readability.
24171      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24172      # Now convert it back to Unix-stile (cygpath)
24173      input_path=`$CYGPATH -u "$shortmode_path"`
24174      new_path="$input_path"
24175    fi
24176  fi
24177
24178  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24179  if test "x$test_cygdrive_prefix" = x; then
24180    # As a simple fix, exclude /usr/bin since it's not a real path.
24181    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24182      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24183      # a path prefixed by /cygdrive for fixpath to work.
24184      new_path="$CYGWIN_ROOT_PATH$input_path"
24185    fi
24186  fi
24187
24188
24189  if test "x$path" != "x$new_path"; then
24190    BOOT_JDK="$new_path"
24191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24192$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24193  fi
24194
24195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24196
24197  path="$BOOT_JDK"
24198  has_colon=`$ECHO $path | $GREP ^.:`
24199  new_path="$path"
24200  if test "x$has_colon" = x; then
24201    # Not in mixed or Windows style, start by that.
24202    new_path=`cmd //c echo $path`
24203  fi
24204
24205
24206  input_path="$new_path"
24207  # Check if we need to convert this using DOS-style short mode. If the path
24208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24209  # take no chances and rewrite it.
24210  # Note: m4 eats our [], so we need to use [ and ] instead.
24211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24212  if test "x$has_forbidden_chars" != x; then
24213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24214    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24215  fi
24216
24217
24218  windows_path="$new_path"
24219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24220    unix_path=`$CYGPATH -u "$windows_path"`
24221    new_path="$unix_path"
24222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24224    new_path="$unix_path"
24225  fi
24226
24227  if test "x$path" != "x$new_path"; then
24228    BOOT_JDK="$new_path"
24229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24230$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24231  fi
24232
24233  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24234  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24235
24236  else
24237    # We're on a posix platform. Hooray! :)
24238    path="$BOOT_JDK"
24239    has_space=`$ECHO "$path" | $GREP " "`
24240    if test "x$has_space" != x; then
24241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24242$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24243      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24244    fi
24245
24246    # Use eval to expand a potential ~
24247    eval path="$path"
24248    if test ! -f "$path" && test ! -d "$path"; then
24249      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24250    fi
24251
24252    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24253  fi
24254
24255              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24256$as_echo_n "checking for Boot JDK... " >&6; }
24257              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24258$as_echo "$BOOT_JDK" >&6; }
24259              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24260$as_echo_n "checking Boot JDK version... " >&6; }
24261              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24262              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24263$as_echo "$BOOT_JDK_VERSION" >&6; }
24264            fi # end check jdk version
24265          fi # end check rt.jar
24266        fi # end check javac
24267      fi # end check java
24268    fi # end check boot jdk found
24269  fi
24270
24271
24272  if test "x$BOOT_JDK_FOUND" = xno; then
24273    # Now execute the test
24274
24275  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24276  BOOT_JDK_SUFFIX="/Contents/Home"
24277  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24278  if test "x$ALL_JDKS_FOUND" != x; then
24279    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24280
24281  if test "x$BOOT_JDK_FOUND" = xno; then
24282    # Now execute the test
24283
24284        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24285        if test -d "$BOOT_JDK"; then
24286          BOOT_JDK_FOUND=maybe
24287          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24288$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24289        fi
24290
24291
24292    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24293    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24294      # Do we have a bin/java?
24295      if test ! -x "$BOOT_JDK/bin/java"; then
24296        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24298        BOOT_JDK_FOUND=no
24299      else
24300        # Do we have a bin/javac?
24301        if test ! -x "$BOOT_JDK/bin/javac"; then
24302          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24303$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24304          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24305$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24306          BOOT_JDK_FOUND=no
24307        else
24308          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24309          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24310            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24311$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24312            BOOT_JDK_FOUND=no
24313          else
24314            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24315            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24316
24317            # Extra M4 quote needed to protect [] in grep expression.
24318            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24319            if test "x$FOUND_CORRECT_VERSION" = x; then
24320              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24322              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24323$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24324              BOOT_JDK_FOUND=no
24325            else
24326              # We're done! :-)
24327              BOOT_JDK_FOUND=yes
24328
24329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24330
24331  # Input might be given as Windows format, start by converting to
24332  # unix format.
24333  path="$BOOT_JDK"
24334  new_path=`$CYGPATH -u "$path"`
24335
24336  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24337  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24338  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24339  # "foo.exe" is OK but "foo" is an error.
24340  #
24341  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24342  # It is also a way to make sure we got the proper file name for the real test later on.
24343  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24344  if test "x$test_shortpath" = x; then
24345    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24346$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24347    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24348  fi
24349
24350  # Call helper function which possibly converts this using DOS-style short mode.
24351  # If so, the updated path is stored in $new_path.
24352
24353  input_path="$new_path"
24354  # Check if we need to convert this using DOS-style short mode. If the path
24355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24356  # take no chances and rewrite it.
24357  # Note: m4 eats our [], so we need to use [ and ] instead.
24358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24359  if test "x$has_forbidden_chars" != x; then
24360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24361    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24362    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24363    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24364      # Going to short mode and back again did indeed matter. Since short mode is
24365      # case insensitive, let's make it lowercase to improve readability.
24366      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24367      # Now convert it back to Unix-stile (cygpath)
24368      input_path=`$CYGPATH -u "$shortmode_path"`
24369      new_path="$input_path"
24370    fi
24371  fi
24372
24373  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24374  if test "x$test_cygdrive_prefix" = x; then
24375    # As a simple fix, exclude /usr/bin since it's not a real path.
24376    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24377      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24378      # a path prefixed by /cygdrive for fixpath to work.
24379      new_path="$CYGWIN_ROOT_PATH$input_path"
24380    fi
24381  fi
24382
24383
24384  if test "x$path" != "x$new_path"; then
24385    BOOT_JDK="$new_path"
24386    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24387$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24388  fi
24389
24390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24391
24392  path="$BOOT_JDK"
24393  has_colon=`$ECHO $path | $GREP ^.:`
24394  new_path="$path"
24395  if test "x$has_colon" = x; then
24396    # Not in mixed or Windows style, start by that.
24397    new_path=`cmd //c echo $path`
24398  fi
24399
24400
24401  input_path="$new_path"
24402  # Check if we need to convert this using DOS-style short mode. If the path
24403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24404  # take no chances and rewrite it.
24405  # Note: m4 eats our [], so we need to use [ and ] instead.
24406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24407  if test "x$has_forbidden_chars" != x; then
24408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24409    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24410  fi
24411
24412
24413  windows_path="$new_path"
24414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24415    unix_path=`$CYGPATH -u "$windows_path"`
24416    new_path="$unix_path"
24417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24419    new_path="$unix_path"
24420  fi
24421
24422  if test "x$path" != "x$new_path"; then
24423    BOOT_JDK="$new_path"
24424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24425$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24426  fi
24427
24428  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24429  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24430
24431  else
24432    # We're on a posix platform. Hooray! :)
24433    path="$BOOT_JDK"
24434    has_space=`$ECHO "$path" | $GREP " "`
24435    if test "x$has_space" != x; then
24436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24437$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24438      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24439    fi
24440
24441    # Use eval to expand a potential ~
24442    eval path="$path"
24443    if test ! -f "$path" && test ! -d "$path"; then
24444      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24445    fi
24446
24447    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24448  fi
24449
24450              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24451$as_echo_n "checking for Boot JDK... " >&6; }
24452              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24453$as_echo "$BOOT_JDK" >&6; }
24454              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24455$as_echo_n "checking Boot JDK version... " >&6; }
24456              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24457              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24458$as_echo "$BOOT_JDK_VERSION" >&6; }
24459            fi # end check jdk version
24460          fi # end check rt.jar
24461        fi # end check javac
24462      fi # end check java
24463    fi # end check boot jdk found
24464  fi
24465
24466    done
24467  fi
24468
24469
24470    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24471    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24472      # Do we have a bin/java?
24473      if test ! -x "$BOOT_JDK/bin/java"; then
24474        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24475$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24476        BOOT_JDK_FOUND=no
24477      else
24478        # Do we have a bin/javac?
24479        if test ! -x "$BOOT_JDK/bin/javac"; then
24480          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24481$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24482          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24483$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24484          BOOT_JDK_FOUND=no
24485        else
24486          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24487          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24488            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24489$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24490            BOOT_JDK_FOUND=no
24491          else
24492            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24493            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24494
24495            # Extra M4 quote needed to protect [] in grep expression.
24496            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24497            if test "x$FOUND_CORRECT_VERSION" = x; then
24498              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24499$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24500              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24501$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24502              BOOT_JDK_FOUND=no
24503            else
24504              # We're done! :-)
24505              BOOT_JDK_FOUND=yes
24506
24507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24508
24509  # Input might be given as Windows format, start by converting to
24510  # unix format.
24511  path="$BOOT_JDK"
24512  new_path=`$CYGPATH -u "$path"`
24513
24514  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24515  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24516  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24517  # "foo.exe" is OK but "foo" is an error.
24518  #
24519  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24520  # It is also a way to make sure we got the proper file name for the real test later on.
24521  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24522  if test "x$test_shortpath" = x; then
24523    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24524$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24525    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24526  fi
24527
24528  # Call helper function which possibly converts this using DOS-style short mode.
24529  # If so, the updated path is stored in $new_path.
24530
24531  input_path="$new_path"
24532  # Check if we need to convert this using DOS-style short mode. If the path
24533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24534  # take no chances and rewrite it.
24535  # Note: m4 eats our [], so we need to use [ and ] instead.
24536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24537  if test "x$has_forbidden_chars" != x; then
24538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24539    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24540    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24541    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24542      # Going to short mode and back again did indeed matter. Since short mode is
24543      # case insensitive, let's make it lowercase to improve readability.
24544      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24545      # Now convert it back to Unix-stile (cygpath)
24546      input_path=`$CYGPATH -u "$shortmode_path"`
24547      new_path="$input_path"
24548    fi
24549  fi
24550
24551  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24552  if test "x$test_cygdrive_prefix" = x; then
24553    # As a simple fix, exclude /usr/bin since it's not a real path.
24554    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24555      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24556      # a path prefixed by /cygdrive for fixpath to work.
24557      new_path="$CYGWIN_ROOT_PATH$input_path"
24558    fi
24559  fi
24560
24561
24562  if test "x$path" != "x$new_path"; then
24563    BOOT_JDK="$new_path"
24564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24565$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24566  fi
24567
24568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24569
24570  path="$BOOT_JDK"
24571  has_colon=`$ECHO $path | $GREP ^.:`
24572  new_path="$path"
24573  if test "x$has_colon" = x; then
24574    # Not in mixed or Windows style, start by that.
24575    new_path=`cmd //c echo $path`
24576  fi
24577
24578
24579  input_path="$new_path"
24580  # Check if we need to convert this using DOS-style short mode. If the path
24581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24582  # take no chances and rewrite it.
24583  # Note: m4 eats our [], so we need to use [ and ] instead.
24584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24585  if test "x$has_forbidden_chars" != x; then
24586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24587    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24588  fi
24589
24590
24591  windows_path="$new_path"
24592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24593    unix_path=`$CYGPATH -u "$windows_path"`
24594    new_path="$unix_path"
24595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24597    new_path="$unix_path"
24598  fi
24599
24600  if test "x$path" != "x$new_path"; then
24601    BOOT_JDK="$new_path"
24602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24603$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24604  fi
24605
24606  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24607  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24608
24609  else
24610    # We're on a posix platform. Hooray! :)
24611    path="$BOOT_JDK"
24612    has_space=`$ECHO "$path" | $GREP " "`
24613    if test "x$has_space" != x; then
24614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24615$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24616      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24617    fi
24618
24619    # Use eval to expand a potential ~
24620    eval path="$path"
24621    if test ! -f "$path" && test ! -d "$path"; then
24622      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24623    fi
24624
24625    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24626  fi
24627
24628              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24629$as_echo_n "checking for Boot JDK... " >&6; }
24630              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24631$as_echo "$BOOT_JDK" >&6; }
24632              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24633$as_echo_n "checking Boot JDK version... " >&6; }
24634              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24635              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24636$as_echo "$BOOT_JDK_VERSION" >&6; }
24637            fi # end check jdk version
24638          fi # end check rt.jar
24639        fi # end check javac
24640      fi # end check java
24641    fi # end check boot jdk found
24642  fi
24643
24644  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24645
24646  if test "x$BOOT_JDK_FOUND" = xno; then
24647    # Now execute the test
24648
24649  BOOT_JDK_PREFIX="/usr/lib/jvm"
24650  BOOT_JDK_SUFFIX=""
24651  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24652  if test "x$ALL_JDKS_FOUND" != x; then
24653    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24654
24655  if test "x$BOOT_JDK_FOUND" = xno; then
24656    # Now execute the test
24657
24658        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24659        if test -d "$BOOT_JDK"; then
24660          BOOT_JDK_FOUND=maybe
24661          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24662$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24663        fi
24664
24665
24666    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24667    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24668      # Do we have a bin/java?
24669      if test ! -x "$BOOT_JDK/bin/java"; then
24670        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24671$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24672        BOOT_JDK_FOUND=no
24673      else
24674        # Do we have a bin/javac?
24675        if test ! -x "$BOOT_JDK/bin/javac"; then
24676          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24677$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24678          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24679$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24680          BOOT_JDK_FOUND=no
24681        else
24682          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24683          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24684            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24685$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24686            BOOT_JDK_FOUND=no
24687          else
24688            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24689            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24690
24691            # Extra M4 quote needed to protect [] in grep expression.
24692            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24693            if test "x$FOUND_CORRECT_VERSION" = x; then
24694              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24695$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24696              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24697$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24698              BOOT_JDK_FOUND=no
24699            else
24700              # We're done! :-)
24701              BOOT_JDK_FOUND=yes
24702
24703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24704
24705  # Input might be given as Windows format, start by converting to
24706  # unix format.
24707  path="$BOOT_JDK"
24708  new_path=`$CYGPATH -u "$path"`
24709
24710  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24711  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24712  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24713  # "foo.exe" is OK but "foo" is an error.
24714  #
24715  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24716  # It is also a way to make sure we got the proper file name for the real test later on.
24717  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24718  if test "x$test_shortpath" = x; then
24719    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24720$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24721    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24722  fi
24723
24724  # Call helper function which possibly converts this using DOS-style short mode.
24725  # If so, the updated path is stored in $new_path.
24726
24727  input_path="$new_path"
24728  # Check if we need to convert this using DOS-style short mode. If the path
24729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24730  # take no chances and rewrite it.
24731  # Note: m4 eats our [], so we need to use [ and ] instead.
24732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24733  if test "x$has_forbidden_chars" != x; then
24734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24738      # Going to short mode and back again did indeed matter. Since short mode is
24739      # case insensitive, let's make it lowercase to improve readability.
24740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24741      # Now convert it back to Unix-stile (cygpath)
24742      input_path=`$CYGPATH -u "$shortmode_path"`
24743      new_path="$input_path"
24744    fi
24745  fi
24746
24747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24748  if test "x$test_cygdrive_prefix" = x; then
24749    # As a simple fix, exclude /usr/bin since it's not a real path.
24750    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24752      # a path prefixed by /cygdrive for fixpath to work.
24753      new_path="$CYGWIN_ROOT_PATH$input_path"
24754    fi
24755  fi
24756
24757
24758  if test "x$path" != "x$new_path"; then
24759    BOOT_JDK="$new_path"
24760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24761$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24762  fi
24763
24764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24765
24766  path="$BOOT_JDK"
24767  has_colon=`$ECHO $path | $GREP ^.:`
24768  new_path="$path"
24769  if test "x$has_colon" = x; then
24770    # Not in mixed or Windows style, start by that.
24771    new_path=`cmd //c echo $path`
24772  fi
24773
24774
24775  input_path="$new_path"
24776  # Check if we need to convert this using DOS-style short mode. If the path
24777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24778  # take no chances and rewrite it.
24779  # Note: m4 eats our [], so we need to use [ and ] instead.
24780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24781  if test "x$has_forbidden_chars" != x; then
24782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24784  fi
24785
24786
24787  windows_path="$new_path"
24788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24789    unix_path=`$CYGPATH -u "$windows_path"`
24790    new_path="$unix_path"
24791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24793    new_path="$unix_path"
24794  fi
24795
24796  if test "x$path" != "x$new_path"; then
24797    BOOT_JDK="$new_path"
24798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24799$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24800  fi
24801
24802  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24803  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24804
24805  else
24806    # We're on a posix platform. Hooray! :)
24807    path="$BOOT_JDK"
24808    has_space=`$ECHO "$path" | $GREP " "`
24809    if test "x$has_space" != x; then
24810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24811$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24812      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24813    fi
24814
24815    # Use eval to expand a potential ~
24816    eval path="$path"
24817    if test ! -f "$path" && test ! -d "$path"; then
24818      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24819    fi
24820
24821    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24822  fi
24823
24824              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24825$as_echo_n "checking for Boot JDK... " >&6; }
24826              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24827$as_echo "$BOOT_JDK" >&6; }
24828              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24829$as_echo_n "checking Boot JDK version... " >&6; }
24830              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24831              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24832$as_echo "$BOOT_JDK_VERSION" >&6; }
24833            fi # end check jdk version
24834          fi # end check rt.jar
24835        fi # end check javac
24836      fi # end check java
24837    fi # end check boot jdk found
24838  fi
24839
24840    done
24841  fi
24842
24843
24844    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24845    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24846      # Do we have a bin/java?
24847      if test ! -x "$BOOT_JDK/bin/java"; then
24848        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24849$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24850        BOOT_JDK_FOUND=no
24851      else
24852        # Do we have a bin/javac?
24853        if test ! -x "$BOOT_JDK/bin/javac"; then
24854          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24855$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24856          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24857$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24858          BOOT_JDK_FOUND=no
24859        else
24860          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24861          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24862            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24863$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24864            BOOT_JDK_FOUND=no
24865          else
24866            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24867            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24868
24869            # Extra M4 quote needed to protect [] in grep expression.
24870            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24871            if test "x$FOUND_CORRECT_VERSION" = x; then
24872              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24873$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24874              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24875$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24876              BOOT_JDK_FOUND=no
24877            else
24878              # We're done! :-)
24879              BOOT_JDK_FOUND=yes
24880
24881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24882
24883  # Input might be given as Windows format, start by converting to
24884  # unix format.
24885  path="$BOOT_JDK"
24886  new_path=`$CYGPATH -u "$path"`
24887
24888  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24889  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24890  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24891  # "foo.exe" is OK but "foo" is an error.
24892  #
24893  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24894  # It is also a way to make sure we got the proper file name for the real test later on.
24895  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24896  if test "x$test_shortpath" = x; then
24897    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24898$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24899    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24900  fi
24901
24902  # Call helper function which possibly converts this using DOS-style short mode.
24903  # If so, the updated path is stored in $new_path.
24904
24905  input_path="$new_path"
24906  # Check if we need to convert this using DOS-style short mode. If the path
24907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24908  # take no chances and rewrite it.
24909  # Note: m4 eats our [], so we need to use [ and ] instead.
24910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24911  if test "x$has_forbidden_chars" != x; then
24912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24913    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24914    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24915    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24916      # Going to short mode and back again did indeed matter. Since short mode is
24917      # case insensitive, let's make it lowercase to improve readability.
24918      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24919      # Now convert it back to Unix-stile (cygpath)
24920      input_path=`$CYGPATH -u "$shortmode_path"`
24921      new_path="$input_path"
24922    fi
24923  fi
24924
24925  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24926  if test "x$test_cygdrive_prefix" = x; then
24927    # As a simple fix, exclude /usr/bin since it's not a real path.
24928    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24929      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24930      # a path prefixed by /cygdrive for fixpath to work.
24931      new_path="$CYGWIN_ROOT_PATH$input_path"
24932    fi
24933  fi
24934
24935
24936  if test "x$path" != "x$new_path"; then
24937    BOOT_JDK="$new_path"
24938    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24939$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24940  fi
24941
24942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24943
24944  path="$BOOT_JDK"
24945  has_colon=`$ECHO $path | $GREP ^.:`
24946  new_path="$path"
24947  if test "x$has_colon" = x; then
24948    # Not in mixed or Windows style, start by that.
24949    new_path=`cmd //c echo $path`
24950  fi
24951
24952
24953  input_path="$new_path"
24954  # Check if we need to convert this using DOS-style short mode. If the path
24955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24956  # take no chances and rewrite it.
24957  # Note: m4 eats our [], so we need to use [ and ] instead.
24958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24959  if test "x$has_forbidden_chars" != x; then
24960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24961    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24962  fi
24963
24964
24965  windows_path="$new_path"
24966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24967    unix_path=`$CYGPATH -u "$windows_path"`
24968    new_path="$unix_path"
24969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24971    new_path="$unix_path"
24972  fi
24973
24974  if test "x$path" != "x$new_path"; then
24975    BOOT_JDK="$new_path"
24976    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24977$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24978  fi
24979
24980  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24981  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24982
24983  else
24984    # We're on a posix platform. Hooray! :)
24985    path="$BOOT_JDK"
24986    has_space=`$ECHO "$path" | $GREP " "`
24987    if test "x$has_space" != x; then
24988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24989$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24990      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24991    fi
24992
24993    # Use eval to expand a potential ~
24994    eval path="$path"
24995    if test ! -f "$path" && test ! -d "$path"; then
24996      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24997    fi
24998
24999    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25000  fi
25001
25002              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25003$as_echo_n "checking for Boot JDK... " >&6; }
25004              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25005$as_echo "$BOOT_JDK" >&6; }
25006              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25007$as_echo_n "checking Boot JDK version... " >&6; }
25008              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25009              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25010$as_echo "$BOOT_JDK_VERSION" >&6; }
25011            fi # end check jdk version
25012          fi # end check rt.jar
25013        fi # end check javac
25014      fi # end check java
25015    fi # end check boot jdk found
25016  fi
25017
25018  fi
25019
25020
25021    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25022    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25023      # Do we have a bin/java?
25024      if test ! -x "$BOOT_JDK/bin/java"; then
25025        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25026$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25027        BOOT_JDK_FOUND=no
25028      else
25029        # Do we have a bin/javac?
25030        if test ! -x "$BOOT_JDK/bin/javac"; then
25031          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25032$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25033          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25034$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25035          BOOT_JDK_FOUND=no
25036        else
25037          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25038          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25039            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25040$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25041            BOOT_JDK_FOUND=no
25042          else
25043            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25044            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25045
25046            # Extra M4 quote needed to protect [] in grep expression.
25047            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
25048            if test "x$FOUND_CORRECT_VERSION" = x; then
25049              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25051              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
25052$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
25053              BOOT_JDK_FOUND=no
25054            else
25055              # We're done! :-)
25056              BOOT_JDK_FOUND=yes
25057
25058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25059
25060  # Input might be given as Windows format, start by converting to
25061  # unix format.
25062  path="$BOOT_JDK"
25063  new_path=`$CYGPATH -u "$path"`
25064
25065  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25066  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25067  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25068  # "foo.exe" is OK but "foo" is an error.
25069  #
25070  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25071  # It is also a way to make sure we got the proper file name for the real test later on.
25072  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25073  if test "x$test_shortpath" = x; then
25074    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25075$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25076    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25077  fi
25078
25079  # Call helper function which possibly converts this using DOS-style short mode.
25080  # If so, the updated path is stored in $new_path.
25081
25082  input_path="$new_path"
25083  # Check if we need to convert this using DOS-style short mode. If the path
25084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25085  # take no chances and rewrite it.
25086  # Note: m4 eats our [], so we need to use [ and ] instead.
25087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25088  if test "x$has_forbidden_chars" != x; then
25089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25090    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25091    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25092    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25093      # Going to short mode and back again did indeed matter. Since short mode is
25094      # case insensitive, let's make it lowercase to improve readability.
25095      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25096      # Now convert it back to Unix-stile (cygpath)
25097      input_path=`$CYGPATH -u "$shortmode_path"`
25098      new_path="$input_path"
25099    fi
25100  fi
25101
25102  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25103  if test "x$test_cygdrive_prefix" = x; then
25104    # As a simple fix, exclude /usr/bin since it's not a real path.
25105    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25106      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25107      # a path prefixed by /cygdrive for fixpath to work.
25108      new_path="$CYGWIN_ROOT_PATH$input_path"
25109    fi
25110  fi
25111
25112
25113  if test "x$path" != "x$new_path"; then
25114    BOOT_JDK="$new_path"
25115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25116$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25117  fi
25118
25119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25120
25121  path="$BOOT_JDK"
25122  has_colon=`$ECHO $path | $GREP ^.:`
25123  new_path="$path"
25124  if test "x$has_colon" = x; then
25125    # Not in mixed or Windows style, start by that.
25126    new_path=`cmd //c echo $path`
25127  fi
25128
25129
25130  input_path="$new_path"
25131  # Check if we need to convert this using DOS-style short mode. If the path
25132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25133  # take no chances and rewrite it.
25134  # Note: m4 eats our [], so we need to use [ and ] instead.
25135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25136  if test "x$has_forbidden_chars" != x; then
25137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25138    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25139  fi
25140
25141
25142  windows_path="$new_path"
25143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25144    unix_path=`$CYGPATH -u "$windows_path"`
25145    new_path="$unix_path"
25146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25148    new_path="$unix_path"
25149  fi
25150
25151  if test "x$path" != "x$new_path"; then
25152    BOOT_JDK="$new_path"
25153    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25154$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25155  fi
25156
25157  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25158  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25159
25160  else
25161    # We're on a posix platform. Hooray! :)
25162    path="$BOOT_JDK"
25163    has_space=`$ECHO "$path" | $GREP " "`
25164    if test "x$has_space" != x; then
25165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25166$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25167      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25168    fi
25169
25170    # Use eval to expand a potential ~
25171    eval path="$path"
25172    if test ! -f "$path" && test ! -d "$path"; then
25173      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25174    fi
25175
25176    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25177  fi
25178
25179              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25180$as_echo_n "checking for Boot JDK... " >&6; }
25181              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25182$as_echo "$BOOT_JDK" >&6; }
25183              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25184$as_echo_n "checking Boot JDK version... " >&6; }
25185              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25186              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25187$as_echo "$BOOT_JDK_VERSION" >&6; }
25188            fi # end check jdk version
25189          fi # end check rt.jar
25190        fi # end check javac
25191      fi # end check java
25192    fi # end check boot jdk found
25193  fi
25194
25195
25196  # If we haven't found anything yet, we've truly lost. Give up.
25197  if test "x$BOOT_JDK_FOUND" = xno; then
25198
25199  # Print a helpful message on how to acquire the necessary build dependency.
25200  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25201  MISSING_DEPENDENCY=openjdk
25202
25203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25204    cygwin_help $MISSING_DEPENDENCY
25205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25206    msys_help $MISSING_DEPENDENCY
25207  else
25208    PKGHANDLER_COMMAND=
25209
25210    case $PKGHANDLER in
25211      apt-get)
25212        apt_help     $MISSING_DEPENDENCY ;;
25213      yum)
25214        yum_help     $MISSING_DEPENDENCY ;;
25215      port)
25216        port_help    $MISSING_DEPENDENCY ;;
25217      pkgutil)
25218        pkgutil_help $MISSING_DEPENDENCY ;;
25219      pkgadd)
25220        pkgadd_help  $MISSING_DEPENDENCY ;;
25221    esac
25222
25223    if test "x$PKGHANDLER_COMMAND" != x; then
25224      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25225    fi
25226  fi
25227
25228    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25229$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25230    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25231$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25232    as_fn_error $? "Cannot continue" "$LINENO" 5
25233  fi
25234
25235  # Setup proper paths for what we found
25236  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
25237  if test ! -f "$BOOT_RTJAR"; then
25238    # On MacOSX it is called classes.jar
25239    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
25240    if test -f "$BOOT_RTJAR"; then
25241      # Remove the ..
25242      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
25243    fi
25244  fi
25245  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
25246  BOOT_JDK="$BOOT_JDK"
25247
25248
25249
25250
25251  # Setup tools from the Boot JDK.
25252
25253  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25254
25255  # Publish this variable in the help.
25256
25257
25258  if test "x$JAVA" = x; then
25259    # The variable is not set by user, try to locate tool using the code snippet
25260
25261      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25262$as_echo_n "checking for java in Boot JDK... " >&6; }
25263      JAVA=$BOOT_JDK/bin/java
25264      if test ! -x $JAVA; then
25265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25266$as_echo "not found" >&6; }
25267        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25268$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25269        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25270      fi
25271      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25272$as_echo "ok" >&6; }
25273
25274
25275  else
25276    # The variable is set, but is it from the command line or the environment?
25277
25278    # Try to remove the string !JAVA! from our list.
25279    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25280    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25281      # If it failed, the variable was not from the command line. Ignore it,
25282      # but warn the user (except for BASH, which is always set by the calling BASH).
25283      if test "xJAVA" != xBASH; then
25284        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25285$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25286      fi
25287      # Try to locate tool using the code snippet
25288
25289      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25290$as_echo_n "checking for java in Boot JDK... " >&6; }
25291      JAVA=$BOOT_JDK/bin/java
25292      if test ! -x $JAVA; then
25293        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25294$as_echo "not found" >&6; }
25295        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25296$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25297        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25298      fi
25299      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25300$as_echo "ok" >&6; }
25301
25302
25303    else
25304      # If it succeeded, then it was overridden by the user. We will use it
25305      # for the tool.
25306
25307      # First remove it from the list of overridden variables, so we can test
25308      # for unknown variables in the end.
25309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25310
25311      # Check if the provided tool contains a complete path.
25312      tool_specified="$JAVA"
25313      tool_basename="${tool_specified##*/}"
25314      if test "x$tool_basename" = "x$tool_specified"; then
25315        # A command without a complete path is provided, search $PATH.
25316        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25317$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25318        # Extract the first word of "$tool_basename", so it can be a program name with args.
25319set dummy $tool_basename; ac_word=$2
25320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25321$as_echo_n "checking for $ac_word... " >&6; }
25322if ${ac_cv_path_JAVA+:} false; then :
25323  $as_echo_n "(cached) " >&6
25324else
25325  case $JAVA in
25326  [\\/]* | ?:[\\/]*)
25327  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25328  ;;
25329  *)
25330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25331for as_dir in $PATH
25332do
25333  IFS=$as_save_IFS
25334  test -z "$as_dir" && as_dir=.
25335    for ac_exec_ext in '' $ac_executable_extensions; do
25336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25337    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25339    break 2
25340  fi
25341done
25342  done
25343IFS=$as_save_IFS
25344
25345  ;;
25346esac
25347fi
25348JAVA=$ac_cv_path_JAVA
25349if test -n "$JAVA"; then
25350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25351$as_echo "$JAVA" >&6; }
25352else
25353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25354$as_echo "no" >&6; }
25355fi
25356
25357
25358        if test "x$JAVA" = x; then
25359          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25360        fi
25361      else
25362        # Otherwise we believe it is a complete path. Use it as it is.
25363        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25364$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25365        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25366$as_echo_n "checking for JAVA... " >&6; }
25367        if test ! -x "$tool_specified"; then
25368          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25369$as_echo "not found" >&6; }
25370          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25371        fi
25372        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25373$as_echo "$tool_specified" >&6; }
25374      fi
25375    fi
25376  fi
25377
25378
25379
25380  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25381
25382  # Publish this variable in the help.
25383
25384
25385  if test "x$JAVAC" = x; then
25386    # The variable is not set by user, try to locate tool using the code snippet
25387
25388      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25389$as_echo_n "checking for javac in Boot JDK... " >&6; }
25390      JAVAC=$BOOT_JDK/bin/javac
25391      if test ! -x $JAVAC; then
25392        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25393$as_echo "not found" >&6; }
25394        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25395$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25396        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25397      fi
25398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25399$as_echo "ok" >&6; }
25400
25401
25402  else
25403    # The variable is set, but is it from the command line or the environment?
25404
25405    # Try to remove the string !JAVAC! from our list.
25406    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25407    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25408      # If it failed, the variable was not from the command line. Ignore it,
25409      # but warn the user (except for BASH, which is always set by the calling BASH).
25410      if test "xJAVAC" != xBASH; then
25411        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25412$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25413      fi
25414      # Try to locate tool using the code snippet
25415
25416      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25417$as_echo_n "checking for javac in Boot JDK... " >&6; }
25418      JAVAC=$BOOT_JDK/bin/javac
25419      if test ! -x $JAVAC; then
25420        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25421$as_echo "not found" >&6; }
25422        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25423$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25424        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25425      fi
25426      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25427$as_echo "ok" >&6; }
25428
25429
25430    else
25431      # If it succeeded, then it was overridden by the user. We will use it
25432      # for the tool.
25433
25434      # First remove it from the list of overridden variables, so we can test
25435      # for unknown variables in the end.
25436      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25437
25438      # Check if the provided tool contains a complete path.
25439      tool_specified="$JAVAC"
25440      tool_basename="${tool_specified##*/}"
25441      if test "x$tool_basename" = "x$tool_specified"; then
25442        # A command without a complete path is provided, search $PATH.
25443        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25444$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25445        # Extract the first word of "$tool_basename", so it can be a program name with args.
25446set dummy $tool_basename; ac_word=$2
25447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25448$as_echo_n "checking for $ac_word... " >&6; }
25449if ${ac_cv_path_JAVAC+:} false; then :
25450  $as_echo_n "(cached) " >&6
25451else
25452  case $JAVAC in
25453  [\\/]* | ?:[\\/]*)
25454  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25455  ;;
25456  *)
25457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25458for as_dir in $PATH
25459do
25460  IFS=$as_save_IFS
25461  test -z "$as_dir" && as_dir=.
25462    for ac_exec_ext in '' $ac_executable_extensions; do
25463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25464    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25466    break 2
25467  fi
25468done
25469  done
25470IFS=$as_save_IFS
25471
25472  ;;
25473esac
25474fi
25475JAVAC=$ac_cv_path_JAVAC
25476if test -n "$JAVAC"; then
25477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25478$as_echo "$JAVAC" >&6; }
25479else
25480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25481$as_echo "no" >&6; }
25482fi
25483
25484
25485        if test "x$JAVAC" = x; then
25486          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25487        fi
25488      else
25489        # Otherwise we believe it is a complete path. Use it as it is.
25490        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25491$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25492        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25493$as_echo_n "checking for JAVAC... " >&6; }
25494        if test ! -x "$tool_specified"; then
25495          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25496$as_echo "not found" >&6; }
25497          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25498        fi
25499        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25500$as_echo "$tool_specified" >&6; }
25501      fi
25502    fi
25503  fi
25504
25505
25506
25507  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25508
25509  # Publish this variable in the help.
25510
25511
25512  if test "x$JAVAH" = x; then
25513    # The variable is not set by user, try to locate tool using the code snippet
25514
25515      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25516$as_echo_n "checking for javah in Boot JDK... " >&6; }
25517      JAVAH=$BOOT_JDK/bin/javah
25518      if test ! -x $JAVAH; then
25519        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25520$as_echo "not found" >&6; }
25521        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25522$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25523        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25524      fi
25525      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25526$as_echo "ok" >&6; }
25527
25528
25529  else
25530    # The variable is set, but is it from the command line or the environment?
25531
25532    # Try to remove the string !JAVAH! from our list.
25533    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25534    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25535      # If it failed, the variable was not from the command line. Ignore it,
25536      # but warn the user (except for BASH, which is always set by the calling BASH).
25537      if test "xJAVAH" != xBASH; then
25538        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25539$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25540      fi
25541      # Try to locate tool using the code snippet
25542
25543      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25544$as_echo_n "checking for javah in Boot JDK... " >&6; }
25545      JAVAH=$BOOT_JDK/bin/javah
25546      if test ! -x $JAVAH; then
25547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25548$as_echo "not found" >&6; }
25549        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25550$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25551        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25552      fi
25553      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25554$as_echo "ok" >&6; }
25555
25556
25557    else
25558      # If it succeeded, then it was overridden by the user. We will use it
25559      # for the tool.
25560
25561      # First remove it from the list of overridden variables, so we can test
25562      # for unknown variables in the end.
25563      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25564
25565      # Check if the provided tool contains a complete path.
25566      tool_specified="$JAVAH"
25567      tool_basename="${tool_specified##*/}"
25568      if test "x$tool_basename" = "x$tool_specified"; then
25569        # A command without a complete path is provided, search $PATH.
25570        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25571$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25572        # Extract the first word of "$tool_basename", so it can be a program name with args.
25573set dummy $tool_basename; ac_word=$2
25574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25575$as_echo_n "checking for $ac_word... " >&6; }
25576if ${ac_cv_path_JAVAH+:} false; then :
25577  $as_echo_n "(cached) " >&6
25578else
25579  case $JAVAH in
25580  [\\/]* | ?:[\\/]*)
25581  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25582  ;;
25583  *)
25584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25585for as_dir in $PATH
25586do
25587  IFS=$as_save_IFS
25588  test -z "$as_dir" && as_dir=.
25589    for ac_exec_ext in '' $ac_executable_extensions; do
25590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25591    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25593    break 2
25594  fi
25595done
25596  done
25597IFS=$as_save_IFS
25598
25599  ;;
25600esac
25601fi
25602JAVAH=$ac_cv_path_JAVAH
25603if test -n "$JAVAH"; then
25604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25605$as_echo "$JAVAH" >&6; }
25606else
25607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25608$as_echo "no" >&6; }
25609fi
25610
25611
25612        if test "x$JAVAH" = x; then
25613          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25614        fi
25615      else
25616        # Otherwise we believe it is a complete path. Use it as it is.
25617        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25618$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25619        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25620$as_echo_n "checking for JAVAH... " >&6; }
25621        if test ! -x "$tool_specified"; then
25622          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25623$as_echo "not found" >&6; }
25624          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25625        fi
25626        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25627$as_echo "$tool_specified" >&6; }
25628      fi
25629    fi
25630  fi
25631
25632
25633
25634  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25635
25636  # Publish this variable in the help.
25637
25638
25639  if test "x$JAR" = x; then
25640    # The variable is not set by user, try to locate tool using the code snippet
25641
25642      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25643$as_echo_n "checking for jar in Boot JDK... " >&6; }
25644      JAR=$BOOT_JDK/bin/jar
25645      if test ! -x $JAR; then
25646        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25647$as_echo "not found" >&6; }
25648        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25649$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25650        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25651      fi
25652      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25653$as_echo "ok" >&6; }
25654
25655
25656  else
25657    # The variable is set, but is it from the command line or the environment?
25658
25659    # Try to remove the string !JAR! from our list.
25660    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25661    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25662      # If it failed, the variable was not from the command line. Ignore it,
25663      # but warn the user (except for BASH, which is always set by the calling BASH).
25664      if test "xJAR" != xBASH; then
25665        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25666$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25667      fi
25668      # Try to locate tool using the code snippet
25669
25670      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25671$as_echo_n "checking for jar in Boot JDK... " >&6; }
25672      JAR=$BOOT_JDK/bin/jar
25673      if test ! -x $JAR; then
25674        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25675$as_echo "not found" >&6; }
25676        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25677$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25678        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25679      fi
25680      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25681$as_echo "ok" >&6; }
25682
25683
25684    else
25685      # If it succeeded, then it was overridden by the user. We will use it
25686      # for the tool.
25687
25688      # First remove it from the list of overridden variables, so we can test
25689      # for unknown variables in the end.
25690      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25691
25692      # Check if the provided tool contains a complete path.
25693      tool_specified="$JAR"
25694      tool_basename="${tool_specified##*/}"
25695      if test "x$tool_basename" = "x$tool_specified"; then
25696        # A command without a complete path is provided, search $PATH.
25697        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25698$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25699        # Extract the first word of "$tool_basename", so it can be a program name with args.
25700set dummy $tool_basename; ac_word=$2
25701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25702$as_echo_n "checking for $ac_word... " >&6; }
25703if ${ac_cv_path_JAR+:} false; then :
25704  $as_echo_n "(cached) " >&6
25705else
25706  case $JAR in
25707  [\\/]* | ?:[\\/]*)
25708  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25709  ;;
25710  *)
25711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25712for as_dir in $PATH
25713do
25714  IFS=$as_save_IFS
25715  test -z "$as_dir" && as_dir=.
25716    for ac_exec_ext in '' $ac_executable_extensions; do
25717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25718    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25720    break 2
25721  fi
25722done
25723  done
25724IFS=$as_save_IFS
25725
25726  ;;
25727esac
25728fi
25729JAR=$ac_cv_path_JAR
25730if test -n "$JAR"; then
25731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25732$as_echo "$JAR" >&6; }
25733else
25734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25735$as_echo "no" >&6; }
25736fi
25737
25738
25739        if test "x$JAR" = x; then
25740          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25741        fi
25742      else
25743        # Otherwise we believe it is a complete path. Use it as it is.
25744        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25745$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25746        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25747$as_echo_n "checking for JAR... " >&6; }
25748        if test ! -x "$tool_specified"; then
25749          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25750$as_echo "not found" >&6; }
25751          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25752        fi
25753        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25754$as_echo "$tool_specified" >&6; }
25755      fi
25756    fi
25757  fi
25758
25759
25760
25761  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25762
25763  # Publish this variable in the help.
25764
25765
25766  if test "x$NATIVE2ASCII" = x; then
25767    # The variable is not set by user, try to locate tool using the code snippet
25768
25769      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25770$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25771      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25772      if test ! -x $NATIVE2ASCII; then
25773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25774$as_echo "not found" >&6; }
25775        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25776$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25777        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25778      fi
25779      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25780$as_echo "ok" >&6; }
25781
25782
25783  else
25784    # The variable is set, but is it from the command line or the environment?
25785
25786    # Try to remove the string !NATIVE2ASCII! from our list.
25787    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25788    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25789      # If it failed, the variable was not from the command line. Ignore it,
25790      # but warn the user (except for BASH, which is always set by the calling BASH).
25791      if test "xNATIVE2ASCII" != xBASH; then
25792        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25793$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25794      fi
25795      # Try to locate tool using the code snippet
25796
25797      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25798$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25799      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25800      if test ! -x $NATIVE2ASCII; then
25801        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25802$as_echo "not found" >&6; }
25803        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25804$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25805        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25806      fi
25807      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25808$as_echo "ok" >&6; }
25809
25810
25811    else
25812      # If it succeeded, then it was overridden by the user. We will use it
25813      # for the tool.
25814
25815      # First remove it from the list of overridden variables, so we can test
25816      # for unknown variables in the end.
25817      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25818
25819      # Check if the provided tool contains a complete path.
25820      tool_specified="$NATIVE2ASCII"
25821      tool_basename="${tool_specified##*/}"
25822      if test "x$tool_basename" = "x$tool_specified"; then
25823        # A command without a complete path is provided, search $PATH.
25824        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25825$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25826        # Extract the first word of "$tool_basename", so it can be a program name with args.
25827set dummy $tool_basename; ac_word=$2
25828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25829$as_echo_n "checking for $ac_word... " >&6; }
25830if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25831  $as_echo_n "(cached) " >&6
25832else
25833  case $NATIVE2ASCII in
25834  [\\/]* | ?:[\\/]*)
25835  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25836  ;;
25837  *)
25838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25839for as_dir in $PATH
25840do
25841  IFS=$as_save_IFS
25842  test -z "$as_dir" && as_dir=.
25843    for ac_exec_ext in '' $ac_executable_extensions; do
25844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25845    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25847    break 2
25848  fi
25849done
25850  done
25851IFS=$as_save_IFS
25852
25853  ;;
25854esac
25855fi
25856NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25857if test -n "$NATIVE2ASCII"; then
25858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25859$as_echo "$NATIVE2ASCII" >&6; }
25860else
25861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25862$as_echo "no" >&6; }
25863fi
25864
25865
25866        if test "x$NATIVE2ASCII" = x; then
25867          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25868        fi
25869      else
25870        # Otherwise we believe it is a complete path. Use it as it is.
25871        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25872$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25873        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25874$as_echo_n "checking for NATIVE2ASCII... " >&6; }
25875        if test ! -x "$tool_specified"; then
25876          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25877$as_echo "not found" >&6; }
25878          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25879        fi
25880        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25881$as_echo "$tool_specified" >&6; }
25882      fi
25883    fi
25884  fi
25885
25886
25887
25888  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25889
25890  # Publish this variable in the help.
25891
25892
25893  if test "x$JARSIGNER" = x; then
25894    # The variable is not set by user, try to locate tool using the code snippet
25895
25896      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25897$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25898      JARSIGNER=$BOOT_JDK/bin/jarsigner
25899      if test ! -x $JARSIGNER; then
25900        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25901$as_echo "not found" >&6; }
25902        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25903$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25904        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25905      fi
25906      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25907$as_echo "ok" >&6; }
25908
25909
25910  else
25911    # The variable is set, but is it from the command line or the environment?
25912
25913    # Try to remove the string !JARSIGNER! from our list.
25914    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
25915    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25916      # If it failed, the variable was not from the command line. Ignore it,
25917      # but warn the user (except for BASH, which is always set by the calling BASH).
25918      if test "xJARSIGNER" != xBASH; then
25919        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
25920$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
25921      fi
25922      # Try to locate tool using the code snippet
25923
25924      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25925$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25926      JARSIGNER=$BOOT_JDK/bin/jarsigner
25927      if test ! -x $JARSIGNER; then
25928        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25929$as_echo "not found" >&6; }
25930        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25931$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25932        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25933      fi
25934      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25935$as_echo "ok" >&6; }
25936
25937
25938    else
25939      # If it succeeded, then it was overridden by the user. We will use it
25940      # for the tool.
25941
25942      # First remove it from the list of overridden variables, so we can test
25943      # for unknown variables in the end.
25944      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25945
25946      # Check if the provided tool contains a complete path.
25947      tool_specified="$JARSIGNER"
25948      tool_basename="${tool_specified##*/}"
25949      if test "x$tool_basename" = "x$tool_specified"; then
25950        # A command without a complete path is provided, search $PATH.
25951        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
25952$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
25953        # Extract the first word of "$tool_basename", so it can be a program name with args.
25954set dummy $tool_basename; ac_word=$2
25955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25956$as_echo_n "checking for $ac_word... " >&6; }
25957if ${ac_cv_path_JARSIGNER+:} false; then :
25958  $as_echo_n "(cached) " >&6
25959else
25960  case $JARSIGNER in
25961  [\\/]* | ?:[\\/]*)
25962  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
25963  ;;
25964  *)
25965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25966for as_dir in $PATH
25967do
25968  IFS=$as_save_IFS
25969  test -z "$as_dir" && as_dir=.
25970    for ac_exec_ext in '' $ac_executable_extensions; do
25971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25972    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
25973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25974    break 2
25975  fi
25976done
25977  done
25978IFS=$as_save_IFS
25979
25980  ;;
25981esac
25982fi
25983JARSIGNER=$ac_cv_path_JARSIGNER
25984if test -n "$JARSIGNER"; then
25985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
25986$as_echo "$JARSIGNER" >&6; }
25987else
25988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25989$as_echo "no" >&6; }
25990fi
25991
25992
25993        if test "x$JARSIGNER" = x; then
25994          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25995        fi
25996      else
25997        # Otherwise we believe it is a complete path. Use it as it is.
25998        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
25999$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26000        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26001$as_echo_n "checking for JARSIGNER... " >&6; }
26002        if test ! -x "$tool_specified"; then
26003          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26004$as_echo "not found" >&6; }
26005          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26006        fi
26007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26008$as_echo "$tool_specified" >&6; }
26009      fi
26010    fi
26011  fi
26012
26013
26014
26015  # Finally, set some other options...
26016
26017  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
26018  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
26019
26020
26021
26022
26023  ##############################################################################
26024  #
26025  # Specify jvm options for anything that is run with the Boot JDK.
26026  # Not all JVM:s accept the same arguments on the command line.
26027  #
26028
26029# Check whether --with-boot-jdk-jvmargs was given.
26030if test "${with_boot_jdk_jvmargs+set}" = set; then :
26031  withval=$with_boot_jdk_jvmargs;
26032fi
26033
26034
26035  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
26036$as_echo_n "checking flags for boot jdk java command ... " >&6; }
26037
26038  # Disable special log output when a debug build is used as Boot JDK...
26039
26040  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
26041  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
26042  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
26043  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26044  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26045  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26046    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
26047    JVM_ARG_OK=true
26048  else
26049    $ECHO "Arg failed:" >&5
26050    $ECHO "$OUTPUT" >&5
26051    JVM_ARG_OK=false
26052  fi
26053
26054
26055  # Apply user provided options.
26056
26057  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
26058  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
26059  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
26060  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26061  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26062  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26063    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
26064    JVM_ARG_OK=true
26065  else
26066    $ECHO "Arg failed:" >&5
26067    $ECHO "$OUTPUT" >&5
26068    JVM_ARG_OK=false
26069  fi
26070
26071
26072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
26073$as_echo "$boot_jdk_jvmargs" >&6; }
26074
26075  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
26076  JAVA_FLAGS=$boot_jdk_jvmargs
26077
26078
26079
26080  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
26081$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
26082
26083  # Starting amount of heap memory.
26084
26085  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
26086  $ECHO "Command: $JAVA -Xms64M -version" >&5
26087  OUTPUT=`$JAVA -Xms64M -version 2>&1`
26088  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26089  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26090  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26091    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
26092    JVM_ARG_OK=true
26093  else
26094    $ECHO "Arg failed:" >&5
26095    $ECHO "$OUTPUT" >&5
26096    JVM_ARG_OK=false
26097  fi
26098
26099
26100  # Maximum amount of heap memory.
26101  # Maximum stack size.
26102  if test "x$BUILD_NUM_BITS" = x32; then
26103    JVM_MAX_HEAP=1100M
26104    STACK_SIZE=768
26105  else
26106    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
26107    # pointers are used. Apparently, we need to increase the heap and stack
26108    # space for the jvm. More specifically, when running javac to build huge
26109    # jdk batch
26110    JVM_MAX_HEAP=1600M
26111    STACK_SIZE=1536
26112  fi
26113
26114  $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
26115  $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
26116  OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
26117  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26118  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26119  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26120    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
26121    JVM_ARG_OK=true
26122  else
26123    $ECHO "Arg failed:" >&5
26124    $ECHO "$OUTPUT" >&5
26125    JVM_ARG_OK=false
26126  fi
26127
26128
26129  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
26130  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
26131  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
26132  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26133  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26134  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26135    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
26136    JVM_ARG_OK=true
26137  else
26138    $ECHO "Arg failed:" >&5
26139    $ECHO "$OUTPUT" >&5
26140    JVM_ARG_OK=false
26141  fi
26142
26143
26144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
26145$as_echo "$boot_jdk_jvmargs_big" >&6; }
26146
26147  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
26148
26149
26150
26151  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
26152$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
26153
26154  # Use serial gc for small short lived tools if possible
26155
26156  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
26157  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
26158  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
26159  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26160  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26161  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26162    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
26163    JVM_ARG_OK=true
26164  else
26165    $ECHO "Arg failed:" >&5
26166    $ECHO "$OUTPUT" >&5
26167    JVM_ARG_OK=false
26168  fi
26169
26170
26171  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
26172  $ECHO "Command: $JAVA -Xms32M -version" >&5
26173  OUTPUT=`$JAVA -Xms32M -version 2>&1`
26174  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26175  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26176  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26177    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
26178    JVM_ARG_OK=true
26179  else
26180    $ECHO "Arg failed:" >&5
26181    $ECHO "$OUTPUT" >&5
26182    JVM_ARG_OK=false
26183  fi
26184
26185
26186  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
26187  $ECHO "Command: $JAVA -Xmx512M -version" >&5
26188  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
26189  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26190  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26191  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26192    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
26193    JVM_ARG_OK=true
26194  else
26195    $ECHO "Arg failed:" >&5
26196    $ECHO "$OUTPUT" >&5
26197    JVM_ARG_OK=false
26198  fi
26199
26200
26201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
26202$as_echo "$boot_jdk_jvmargs_small" >&6; }
26203
26204  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
26205
26206
26207
26208###############################################################################
26209#
26210# Configure the sources to use. We can add or override individual directories.
26211#
26212###############################################################################
26213
26214
26215  # Where are the sources. Any of these can be overridden
26216  # using --with-override-corba and the likes.
26217  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26218  CORBA_TOPDIR="$SRC_ROOT/corba"
26219  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26220  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26221  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26222  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26223  JDK_TOPDIR="$SRC_ROOT/jdk"
26224
26225
26226
26227
26228
26229
26230
26231
26232
26233
26234  ###############################################################################
26235  #
26236  # Pickup additional source for a component from outside of the source root
26237  # or override source for a component.
26238  #
26239
26240# Check whether --with-add-source-root was given.
26241if test "${with_add_source_root+set}" = set; then :
26242  withval=$with_add_source_root;
26243fi
26244
26245
26246
26247# Check whether --with-override-source-root was given.
26248if test "${with_override_source_root+set}" = set; then :
26249  withval=$with_override_source_root;
26250fi
26251
26252
26253
26254# Check whether --with-adds-and-overrides was given.
26255if test "${with_adds_and_overrides+set}" = set; then :
26256  withval=$with_adds_and_overrides;
26257fi
26258
26259
26260  if test "x$with_adds_and_overrides" != x; then
26261    with_add_source_root="$with_adds_and_overrides/adds"
26262    with_override_source_root="$with_adds_and_overrides/overrides"
26263  fi
26264
26265  if test "x$with_add_source_root" != x; then
26266    if ! test -d $with_add_source_root; then
26267      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26268    fi
26269    CURDIR="$PWD"
26270    cd "$with_add_source_root"
26271    ADD_SRC_ROOT="`pwd`"
26272    cd "$CURDIR"
26273    # Verify that the addon source root does not have any root makefiles.
26274    # If it does, then it is usually an error, prevent this.
26275    if test -f $with_add_source_root/langtools/make/Makefile; then
26276      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
26277    fi
26278    if test -f $with_add_source_root/corba/make/Makefile; then
26279      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
26280    fi
26281    if test -f $with_add_source_root/jaxp/make/Makefile; then
26282      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
26283    fi
26284    if test -f $with_add_source_root/jaxws/make/Makefile; then
26285      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
26286    fi
26287    if test -f $with_add_source_root/hotspot/make/Makefile; then
26288      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
26289    fi
26290    if test -f $with_add_source_root/nashorn/make/Makefile; then
26291      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
26292    fi
26293    if test -f $with_add_source_root/jdk/make/Makefile; then
26294      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
26295    fi
26296  fi
26297
26298
26299  if test "x$with_override_source_root" != x; then
26300    if ! test -d $with_override_source_root; then
26301      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26302    fi
26303    CURDIR="$PWD"
26304    cd "$with_override_source_root"
26305    OVERRIDE_SRC_ROOT="`pwd`"
26306    cd "$CURDIR"
26307    if test -f $with_override_source_root/langtools/make/Makefile; then
26308      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
26309    fi
26310    if test -f $with_override_source_root/corba/make/Makefile; then
26311      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
26312    fi
26313    if test -f $with_override_source_root/jaxp/make/Makefile; then
26314      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
26315    fi
26316    if test -f $with_override_source_root/jaxws/make/Makefile; then
26317      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
26318    fi
26319    if test -f $with_override_source_root/hotspot/make/Makefile; then
26320      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
26321    fi
26322    if test -f $with_override_source_root/nashorn/make/Makefile; then
26323      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
26324    fi
26325    if test -f $with_override_source_root/jdk/make/Makefile; then
26326      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
26327    fi
26328  fi
26329
26330
26331  ###############################################################################
26332  #
26333  # Override a repo completely, this is used for example when you have 3 small
26334  # development sandboxes of the langtools sources and want to avoid having 3 full
26335  # OpenJDK sources checked out on disk.
26336  #
26337  # Assuming that the 3 langtools sandboxes are located here:
26338  # /home/fredrik/sandbox1/langtools
26339  # /home/fredrik/sandbox2/langtools
26340  # /home/fredrik/sandbox3/langtools
26341  #
26342  # From the source root you create build subdirs manually:
26343  #     mkdir -p build1 build2 build3
26344  # in each build directory run:
26345  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26346  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26347  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26348  #
26349
26350
26351# Check whether --with-override-langtools was given.
26352if test "${with_override_langtools+set}" = set; then :
26353  withval=$with_override_langtools;
26354fi
26355
26356
26357
26358# Check whether --with-override-corba was given.
26359if test "${with_override_corba+set}" = set; then :
26360  withval=$with_override_corba;
26361fi
26362
26363
26364
26365# Check whether --with-override-jaxp was given.
26366if test "${with_override_jaxp+set}" = set; then :
26367  withval=$with_override_jaxp;
26368fi
26369
26370
26371
26372# Check whether --with-override-jaxws was given.
26373if test "${with_override_jaxws+set}" = set; then :
26374  withval=$with_override_jaxws;
26375fi
26376
26377
26378
26379# Check whether --with-override-hotspot was given.
26380if test "${with_override_hotspot+set}" = set; then :
26381  withval=$with_override_hotspot;
26382fi
26383
26384
26385
26386# Check whether --with-override-nashorn was given.
26387if test "${with_override_nashorn+set}" = set; then :
26388  withval=$with_override_nashorn;
26389fi
26390
26391
26392
26393# Check whether --with-override-jdk was given.
26394if test "${with_override_jdk+set}" = set; then :
26395  withval=$with_override_jdk;
26396fi
26397
26398
26399  if test "x$with_override_langtools" != x; then
26400    CURDIR="$PWD"
26401    cd "$with_override_langtools"
26402    LANGTOOLS_TOPDIR="`pwd`"
26403    cd "$CURDIR"
26404    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26405      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26406    fi
26407    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26408$as_echo_n "checking if langtools should be overridden... " >&6; }
26409    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26410$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26411  fi
26412  if test "x$with_override_corba" != x; then
26413    CURDIR="$PWD"
26414    cd "$with_override_corba"
26415    CORBA_TOPDIR="`pwd`"
26416    cd "$CURDIR"
26417    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26418      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26419    fi
26420    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26421$as_echo_n "checking if corba should be overridden... " >&6; }
26422    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26423$as_echo "yes with $CORBA_TOPDIR" >&6; }
26424  fi
26425  if test "x$with_override_jaxp" != x; then
26426    CURDIR="$PWD"
26427    cd "$with_override_jaxp"
26428    JAXP_TOPDIR="`pwd`"
26429    cd "$CURDIR"
26430    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26431      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26432    fi
26433    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26434$as_echo_n "checking if jaxp should be overridden... " >&6; }
26435    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26436$as_echo "yes with $JAXP_TOPDIR" >&6; }
26437  fi
26438  if test "x$with_override_jaxws" != x; then
26439    CURDIR="$PWD"
26440    cd "$with_override_jaxws"
26441    JAXWS_TOPDIR="`pwd`"
26442    cd "$CURDIR"
26443    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26444      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26445    fi
26446    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26447$as_echo_n "checking if jaxws should be overridden... " >&6; }
26448    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26449$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26450  fi
26451  if test "x$with_override_hotspot" != x; then
26452    CURDIR="$PWD"
26453    cd "$with_override_hotspot"
26454    HOTSPOT_TOPDIR="`pwd`"
26455    cd "$CURDIR"
26456    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26457      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26458    fi
26459    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26460$as_echo_n "checking if hotspot should be overridden... " >&6; }
26461    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26462$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26463  fi
26464  if test "x$with_override_nashorn" != x; then
26465    CURDIR="$PWD"
26466    cd "$with_override_nashorn"
26467    NASHORN_TOPDIR="`pwd`"
26468    cd "$CURDIR"
26469    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26470      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26471    fi
26472    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26473$as_echo_n "checking if nashorn should be overridden... " >&6; }
26474    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26475$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26476  fi
26477  if test "x$with_override_jdk" != x; then
26478    CURDIR="$PWD"
26479    cd "$with_override_jdk"
26480    JDK_TOPDIR="`pwd`"
26481    cd "$CURDIR"
26482    if ! test -f $JDK_TOPDIR/make/Makefile; then
26483      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26484    fi
26485    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26486$as_echo_n "checking if JDK should be overridden... " >&6; }
26487    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26488$as_echo "yes with $JDK_TOPDIR" >&6; }
26489  fi
26490
26491
26492  BUILD_OUTPUT="$OUTPUT_ROOT"
26493
26494
26495  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26496  BUILD_HOTSPOT=true
26497
26498
26499
26500# Check whether --with-import-hotspot was given.
26501if test "${with_import_hotspot+set}" = set; then :
26502  withval=$with_import_hotspot;
26503fi
26504
26505  if test "x$with_import_hotspot" != x; then
26506    CURDIR="$PWD"
26507    cd "$with_import_hotspot"
26508    HOTSPOT_DIST="`pwd`"
26509    cd "$CURDIR"
26510    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26511      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26512    fi
26513    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26514$as_echo_n "checking if hotspot should be imported... " >&6; }
26515    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26516$as_echo "yes from $HOTSPOT_DIST" >&6; }
26517    BUILD_HOTSPOT=false
26518  fi
26519
26520  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26521
26522
26523###############################################################################
26524#
26525# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26526# native code.
26527#
26528###############################################################################
26529
26530# First determine the toolchain type (compiler family)
26531
26532
26533# Check whether --with-toolchain-type was given.
26534if test "${with_toolchain_type+set}" = set; then :
26535  withval=$with_toolchain_type;
26536fi
26537
26538
26539  # Use indirect variable referencing
26540  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26541  VALID_TOOLCHAINS=${!toolchain_var_name}
26542
26543  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26544    # On Mac OS X, default toolchain to clang after Xcode 5
26545    XCODE_VERSION_OUTPUT=`xcodebuild -version 2>&1 | $HEAD -n 1`
26546    $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26547    if test $? -ne 0; then
26548      as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26549    fi
26550    XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26551        $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26552        $CUT -f 1 -d .`
26553    { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26554$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26555    if test $XCODE_MAJOR_VERSION -ge 5; then
26556        DEFAULT_TOOLCHAIN="clang"
26557    else
26558        DEFAULT_TOOLCHAIN="gcc"
26559    fi
26560  else
26561    # First toolchain type in the list is the default
26562    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26563  fi
26564
26565  if test "x$with_toolchain_type" = xlist; then
26566    # List all toolchains
26567    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26568$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26569    for toolchain in $VALID_TOOLCHAINS; do
26570      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26571      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26572      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26573    done
26574
26575    exit 0
26576  elif test "x$with_toolchain_type" != x; then
26577    # User override; check that it is valid
26578    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26579      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26580$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26581      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26582$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26583      as_fn_error $? "Cannot continue." "$LINENO" 5
26584    fi
26585    TOOLCHAIN_TYPE=$with_toolchain_type
26586  else
26587    # No flag given, use default
26588    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26589  fi
26590
26591
26592  TOOLCHAIN_CC_BINARY_clang="clang"
26593  TOOLCHAIN_CC_BINARY_gcc="gcc"
26594  TOOLCHAIN_CC_BINARY_microsoft="cl"
26595  TOOLCHAIN_CC_BINARY_solstudio="cc"
26596  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26597
26598  TOOLCHAIN_CXX_BINARY_clang="clang++"
26599  TOOLCHAIN_CXX_BINARY_gcc="g++"
26600  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26601  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26602  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26603
26604  # Use indirect variable referencing
26605  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26606  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26607  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26608  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26609  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26610  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26611
26612
26613  # Define filename patterns
26614  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26615    LIBRARY_PREFIX=
26616    SHARED_LIBRARY_SUFFIX='.dll'
26617    STATIC_LIBRARY_SUFFIX='.lib'
26618    SHARED_LIBRARY='$1.dll'
26619    STATIC_LIBRARY='$1.lib'
26620    OBJ_SUFFIX='.obj'
26621    EXE_SUFFIX='.exe'
26622  else
26623    LIBRARY_PREFIX=lib
26624    SHARED_LIBRARY_SUFFIX='.so'
26625    STATIC_LIBRARY_SUFFIX='.a'
26626    SHARED_LIBRARY='lib$1.so'
26627    STATIC_LIBRARY='lib$1.a'
26628    OBJ_SUFFIX='.o'
26629    EXE_SUFFIX=''
26630    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26631      SHARED_LIBRARY='lib$1.dylib'
26632      SHARED_LIBRARY_SUFFIX='.dylib'
26633    fi
26634  fi
26635
26636
26637
26638
26639
26640
26641
26642
26643
26644
26645  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26646    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26647$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26648  else
26649    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26650$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26651  fi
26652
26653
26654# Then detect the actual binaries needed
26655
26656  # FIXME: Is this needed?
26657  ac_ext=cpp
26658ac_cpp='$CXXCPP $CPPFLAGS'
26659ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26660ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26661ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26662
26663
26664  # Store the CFLAGS etc passed to the configure script.
26665  ORG_CFLAGS="$CFLAGS"
26666  ORG_CXXFLAGS="$CXXFLAGS"
26667  ORG_OBJCFLAGS="$OBJCFLAGS"
26668
26669  # On Windows, we need to detect the visual studio installation first.
26670  # This will change the PATH, but we need to keep that new PATH even
26671  # after toolchain detection is done, since the compiler (on x86) uses
26672  # it for DLL resolution in runtime.
26673  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26674
26675  # Store path to cygwin link.exe to help excluding it when searching for
26676  # VS linker. This must be done before changing the PATH when looking for VS.
26677  # Extract the first word of "link", so it can be a program name with args.
26678set dummy link; ac_word=$2
26679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26680$as_echo_n "checking for $ac_word... " >&6; }
26681if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26682  $as_echo_n "(cached) " >&6
26683else
26684  case $CYGWIN_LINK in
26685  [\\/]* | ?:[\\/]*)
26686  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26687  ;;
26688  *)
26689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26690for as_dir in $PATH
26691do
26692  IFS=$as_save_IFS
26693  test -z "$as_dir" && as_dir=.
26694    for ac_exec_ext in '' $ac_executable_extensions; do
26695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26696    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26698    break 2
26699  fi
26700done
26701  done
26702IFS=$as_save_IFS
26703
26704  ;;
26705esac
26706fi
26707CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26708if test -n "$CYGWIN_LINK"; then
26709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26710$as_echo "$CYGWIN_LINK" >&6; }
26711else
26712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26713$as_echo "no" >&6; }
26714fi
26715
26716
26717  if test "x$CYGWIN_LINK" != x; then
26718    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26719$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26720    "$CYGWIN_LINK" --version > /dev/null
26721    if test $? -eq 0 ; then
26722      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26723$as_echo "yes" >&6; }
26724    else
26725      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26726$as_echo "no" >&6; }
26727      # This might be the VS linker. Don't exclude it later on.
26728      CYGWIN_LINK=""
26729    fi
26730  fi
26731
26732  # First-hand choice is to locate and run the vsvars bat file.
26733
26734  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26735    VCVARSFILE="vc/bin/vcvars32.bat"
26736  else
26737    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26738  fi
26739
26740  VS_ENV_CMD=""
26741  VS_ENV_ARGS=""
26742  if test "x$with_toolsdir" != x; then
26743
26744  if test "x$VS_ENV_CMD" = x; then
26745    VS100BASE="$with_toolsdir/../.."
26746    METHOD="--with-tools-dir"
26747
26748  windows_path="$VS100BASE"
26749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26750    unix_path=`$CYGPATH -u "$windows_path"`
26751    VS100BASE="$unix_path"
26752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26754    VS100BASE="$unix_path"
26755  fi
26756
26757    if test -d "$VS100BASE"; then
26758      if test -f "$VS100BASE/$VCVARSFILE"; then
26759        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26760$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26761        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26762      else
26763        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26764$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26765        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26766$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26767      fi
26768    fi
26769  fi
26770
26771  fi
26772
26773  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26774    # Having specified an argument which is incorrect will produce an instant failure;
26775    # we should not go on looking
26776    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26777$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26778    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26779$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26780    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26781  fi
26782
26783  if test "x$VS100COMNTOOLS" != x; then
26784
26785  if test "x$VS_ENV_CMD" = x; then
26786    VS100BASE="$VS100COMNTOOLS/../.."
26787    METHOD="VS100COMNTOOLS variable"
26788
26789  windows_path="$VS100BASE"
26790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26791    unix_path=`$CYGPATH -u "$windows_path"`
26792    VS100BASE="$unix_path"
26793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26795    VS100BASE="$unix_path"
26796  fi
26797
26798    if test -d "$VS100BASE"; then
26799      if test -f "$VS100BASE/$VCVARSFILE"; then
26800        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26801$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26802        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26803      else
26804        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26805$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26806        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26807$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26808      fi
26809    fi
26810  fi
26811
26812  fi
26813  if test "x$PROGRAMFILES" != x; then
26814
26815  if test "x$VS_ENV_CMD" = x; then
26816    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26817    METHOD="well-known name"
26818
26819  windows_path="$VS100BASE"
26820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26821    unix_path=`$CYGPATH -u "$windows_path"`
26822    VS100BASE="$unix_path"
26823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26825    VS100BASE="$unix_path"
26826  fi
26827
26828    if test -d "$VS100BASE"; then
26829      if test -f "$VS100BASE/$VCVARSFILE"; then
26830        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26831$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26832        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26833      else
26834        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26835$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26836        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26837$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26838      fi
26839    fi
26840  fi
26841
26842  fi
26843
26844  if test "x$VS_ENV_CMD" = x; then
26845    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26846    METHOD="well-known name"
26847
26848  windows_path="$VS100BASE"
26849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26850    unix_path=`$CYGPATH -u "$windows_path"`
26851    VS100BASE="$unix_path"
26852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26854    VS100BASE="$unix_path"
26855  fi
26856
26857    if test -d "$VS100BASE"; then
26858      if test -f "$VS100BASE/$VCVARSFILE"; then
26859        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26860$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26861        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26862      else
26863        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26864$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26865        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26866$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26867      fi
26868    fi
26869  fi
26870
26871
26872  if test "x$VS_ENV_CMD" = x; then
26873    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26874    METHOD="well-known name"
26875
26876  windows_path="$VS100BASE"
26877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26878    unix_path=`$CYGPATH -u "$windows_path"`
26879    VS100BASE="$unix_path"
26880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26882    VS100BASE="$unix_path"
26883  fi
26884
26885    if test -d "$VS100BASE"; then
26886      if test -f "$VS100BASE/$VCVARSFILE"; then
26887        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26888$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26889        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26890      else
26891        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26892$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26893        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26894$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26895      fi
26896    fi
26897  fi
26898
26899
26900  if test "x$ProgramW6432" != x; then
26901
26902  if test "x$VS_ENV_CMD" = x; then
26903    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26904    METHOD="well-known name"
26905
26906  windows_path="$WIN_SDK_BASE"
26907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26908    unix_path=`$CYGPATH -u "$windows_path"`
26909    WIN_SDK_BASE="$unix_path"
26910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26912    WIN_SDK_BASE="$unix_path"
26913  fi
26914
26915    if test -d "$WIN_SDK_BASE"; then
26916      # There have been cases of partial or broken SDK installations. A missing
26917      # lib dir is not going to work.
26918      if test ! -d "$WIN_SDK_BASE/../lib"; then
26919        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26920$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26921        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26922$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26923      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26924        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26925$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26926        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26927        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26928          VS_ENV_ARGS="/x86"
26929        else
26930          VS_ENV_ARGS="/x64"
26931        fi
26932      else
26933        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26934$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26935        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26936$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26937      fi
26938    fi
26939  fi
26940
26941  fi
26942  if test "x$PROGRAMW6432" != x; then
26943
26944  if test "x$VS_ENV_CMD" = x; then
26945    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
26946    METHOD="well-known name"
26947
26948  windows_path="$WIN_SDK_BASE"
26949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26950    unix_path=`$CYGPATH -u "$windows_path"`
26951    WIN_SDK_BASE="$unix_path"
26952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26954    WIN_SDK_BASE="$unix_path"
26955  fi
26956
26957    if test -d "$WIN_SDK_BASE"; then
26958      # There have been cases of partial or broken SDK installations. A missing
26959      # lib dir is not going to work.
26960      if test ! -d "$WIN_SDK_BASE/../lib"; then
26961        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26962$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26963        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26964$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26965      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26966        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26967$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26968        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26969        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26970          VS_ENV_ARGS="/x86"
26971        else
26972          VS_ENV_ARGS="/x64"
26973        fi
26974      else
26975        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26976$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26977        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26978$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26979      fi
26980    fi
26981  fi
26982
26983  fi
26984  if test "x$PROGRAMFILES" != x; then
26985
26986  if test "x$VS_ENV_CMD" = x; then
26987    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
26988    METHOD="well-known name"
26989
26990  windows_path="$WIN_SDK_BASE"
26991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26992    unix_path=`$CYGPATH -u "$windows_path"`
26993    WIN_SDK_BASE="$unix_path"
26994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26996    WIN_SDK_BASE="$unix_path"
26997  fi
26998
26999    if test -d "$WIN_SDK_BASE"; then
27000      # There have been cases of partial or broken SDK installations. A missing
27001      # lib dir is not going to work.
27002      if test ! -d "$WIN_SDK_BASE/../lib"; then
27003        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27004$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27005        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27006$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27007      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27008        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27009$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27010        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27011        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27012          VS_ENV_ARGS="/x86"
27013        else
27014          VS_ENV_ARGS="/x64"
27015        fi
27016      else
27017        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27018$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27019        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27020$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27021      fi
27022    fi
27023  fi
27024
27025  fi
27026
27027  if test "x$VS_ENV_CMD" = x; then
27028    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
27029    METHOD="well-known name"
27030
27031  windows_path="$WIN_SDK_BASE"
27032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27033    unix_path=`$CYGPATH -u "$windows_path"`
27034    WIN_SDK_BASE="$unix_path"
27035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27037    WIN_SDK_BASE="$unix_path"
27038  fi
27039
27040    if test -d "$WIN_SDK_BASE"; then
27041      # There have been cases of partial or broken SDK installations. A missing
27042      # lib dir is not going to work.
27043      if test ! -d "$WIN_SDK_BASE/../lib"; then
27044        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27045$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27046        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27047$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27048      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27049        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27050$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27051        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27052        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27053          VS_ENV_ARGS="/x86"
27054        else
27055          VS_ENV_ARGS="/x64"
27056        fi
27057      else
27058        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27059$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27060        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27061$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27062      fi
27063    fi
27064  fi
27065
27066
27067  if test "x$VS_ENV_CMD" = x; then
27068    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
27069    METHOD="well-known name"
27070
27071  windows_path="$WIN_SDK_BASE"
27072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27073    unix_path=`$CYGPATH -u "$windows_path"`
27074    WIN_SDK_BASE="$unix_path"
27075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27077    WIN_SDK_BASE="$unix_path"
27078  fi
27079
27080    if test -d "$WIN_SDK_BASE"; then
27081      # There have been cases of partial or broken SDK installations. A missing
27082      # lib dir is not going to work.
27083      if test ! -d "$WIN_SDK_BASE/../lib"; then
27084        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27085$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27086        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27087$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27088      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27089        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27090$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27091        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27092        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27093          VS_ENV_ARGS="/x86"
27094        else
27095          VS_ENV_ARGS="/x64"
27096        fi
27097      else
27098        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27099$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27100        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27101$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27102      fi
27103    fi
27104  fi
27105
27106
27107  if test "x$VS_ENV_CMD" != x; then
27108    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27109
27110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27111
27112  # First separate the path from the arguments. This will split at the first
27113  # space.
27114  complete="$VS_ENV_CMD"
27115  path="${complete%% *}"
27116  tmp="$complete EOL"
27117  arguments="${tmp#* }"
27118
27119  # Input might be given as Windows format, start by converting to
27120  # unix format.
27121  new_path=`$CYGPATH -u "$path"`
27122
27123  # Now try to locate executable using which
27124  new_path=`$WHICH "$new_path" 2> /dev/null`
27125  # bat and cmd files are not always considered executable in cygwin causing which
27126  # to not find them
27127  if test "x$new_path" = x \
27128      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27129      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27130    new_path=`$CYGPATH -u "$path"`
27131  fi
27132  if test "x$new_path" = x; then
27133    # Oops. Which didn't find the executable.
27134    # The splitting of arguments from the executable at a space might have been incorrect,
27135    # since paths with space are more likely in Windows. Give it another try with the whole
27136    # argument.
27137    path="$complete"
27138    arguments="EOL"
27139    new_path=`$CYGPATH -u "$path"`
27140    new_path=`$WHICH "$new_path" 2> /dev/null`
27141    # bat and cmd files are not always considered executable in cygwin causing which
27142    # to not find them
27143    if test "x$new_path" = x \
27144        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27145        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27146      new_path=`$CYGPATH -u "$path"`
27147    fi
27148    if test "x$new_path" = x; then
27149      # It's still not found. Now this is an unrecoverable error.
27150      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27151$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27152      has_space=`$ECHO "$complete" | $GREP " "`
27153      if test "x$has_space" != x; then
27154        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27155$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27156      fi
27157      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27158    fi
27159  fi
27160
27161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27164  # "foo.exe" is OK but "foo" is an error.
27165  #
27166  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27167  # It is also a way to make sure we got the proper file name for the real test later on.
27168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27169  if test "x$test_shortpath" = x; then
27170    # Short path failed, file does not exist as specified.
27171    # Try adding .exe or .cmd
27172    if test -f "${new_path}.exe"; then
27173      input_to_shortpath="${new_path}.exe"
27174    elif test -f "${new_path}.cmd"; then
27175      input_to_shortpath="${new_path}.cmd"
27176    else
27177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27178$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27179      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27180$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27181      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27182    fi
27183  else
27184    input_to_shortpath="$new_path"
27185  fi
27186
27187  # Call helper function which possibly converts this using DOS-style short mode.
27188  # If so, the updated path is stored in $new_path.
27189  new_path="$input_to_shortpath"
27190
27191  input_path="$input_to_shortpath"
27192  # Check if we need to convert this using DOS-style short mode. If the path
27193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27194  # take no chances and rewrite it.
27195  # Note: m4 eats our [], so we need to use [ and ] instead.
27196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27197  if test "x$has_forbidden_chars" != x; then
27198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27199    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27200    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27201    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27202      # Going to short mode and back again did indeed matter. Since short mode is
27203      # case insensitive, let's make it lowercase to improve readability.
27204      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27205      # Now convert it back to Unix-stile (cygpath)
27206      input_path=`$CYGPATH -u "$shortmode_path"`
27207      new_path="$input_path"
27208    fi
27209  fi
27210
27211  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27212  if test "x$test_cygdrive_prefix" = x; then
27213    # As a simple fix, exclude /usr/bin since it's not a real path.
27214    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27215      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27216      # a path prefixed by /cygdrive for fixpath to work.
27217      new_path="$CYGWIN_ROOT_PATH$input_path"
27218    fi
27219  fi
27220
27221  # remove trailing .exe if any
27222  new_path="${new_path/%.exe/}"
27223
27224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27225
27226  # First separate the path from the arguments. This will split at the first
27227  # space.
27228  complete="$VS_ENV_CMD"
27229  path="${complete%% *}"
27230  tmp="$complete EOL"
27231  arguments="${tmp#* }"
27232
27233  # Input might be given as Windows format, start by converting to
27234  # unix format.
27235  new_path="$path"
27236
27237  windows_path="$new_path"
27238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27239    unix_path=`$CYGPATH -u "$windows_path"`
27240    new_path="$unix_path"
27241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27243    new_path="$unix_path"
27244  fi
27245
27246
27247  # Now try to locate executable using which
27248  new_path=`$WHICH "$new_path" 2> /dev/null`
27249
27250  if test "x$new_path" = x; then
27251    # Oops. Which didn't find the executable.
27252    # The splitting of arguments from the executable at a space might have been incorrect,
27253    # since paths with space are more likely in Windows. Give it another try with the whole
27254    # argument.
27255    path="$complete"
27256    arguments="EOL"
27257    new_path="$path"
27258
27259  windows_path="$new_path"
27260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27261    unix_path=`$CYGPATH -u "$windows_path"`
27262    new_path="$unix_path"
27263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27265    new_path="$unix_path"
27266  fi
27267
27268
27269    new_path=`$WHICH "$new_path" 2> /dev/null`
27270
27271    if test "x$new_path" = x; then
27272      # It's still not found. Now this is an unrecoverable error.
27273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27274$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27275      has_space=`$ECHO "$complete" | $GREP " "`
27276      if test "x$has_space" != x; then
27277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27279      fi
27280      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27281    fi
27282  fi
27283
27284  # Now new_path has a complete unix path to the binary
27285  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27286    # Keep paths in /bin as-is, but remove trailing .exe if any
27287    new_path="${new_path/%.exe/}"
27288    # Do not save /bin paths to all_fixpath_prefixes!
27289  else
27290    # Not in mixed or Windows style, start by that.
27291    new_path=`cmd //c echo $new_path`
27292
27293  input_path="$new_path"
27294  # Check if we need to convert this using DOS-style short mode. If the path
27295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27296  # take no chances and rewrite it.
27297  # Note: m4 eats our [], so we need to use [ and ] instead.
27298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27299  if test "x$has_forbidden_chars" != x; then
27300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27301    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27302  fi
27303
27304    # Output is in $new_path
27305
27306  windows_path="$new_path"
27307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27308    unix_path=`$CYGPATH -u "$windows_path"`
27309    new_path="$unix_path"
27310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27312    new_path="$unix_path"
27313  fi
27314
27315    # remove trailing .exe if any
27316    new_path="${new_path/%.exe/}"
27317
27318    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27319    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27320  fi
27321
27322  else
27323    # We're on a posix platform. Hooray! :)
27324    # First separate the path from the arguments. This will split at the first
27325    # space.
27326    complete="$VS_ENV_CMD"
27327    path="${complete%% *}"
27328    tmp="$complete EOL"
27329    arguments="${tmp#* }"
27330
27331    # Cannot rely on the command "which" here since it doesn't always work.
27332    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27333    if test -z "$is_absolute_path"; then
27334      # Path to executable is not absolute. Find it.
27335      IFS_save="$IFS"
27336      IFS=:
27337      for p in $PATH; do
27338        if test -f "$p/$path" && test -x "$p/$path"; then
27339          new_path="$p/$path"
27340          break
27341        fi
27342      done
27343      IFS="$IFS_save"
27344    else
27345      # This is an absolute path, we can use it without further modifications.
27346      new_path="$path"
27347    fi
27348
27349    if test "x$new_path" = x; then
27350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27351$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27352      has_space=`$ECHO "$complete" | $GREP " "`
27353      if test "x$has_space" != x; then
27354        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27355$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27356      fi
27357      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27358    fi
27359  fi
27360
27361  # Now join together the path and the arguments once again
27362  if test "x$arguments" != xEOL; then
27363    new_complete="$new_path ${arguments% *}"
27364  else
27365    new_complete="$new_path"
27366  fi
27367
27368  if test "x$complete" != "x$new_complete"; then
27369    VS_ENV_CMD="$new_complete"
27370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27371$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27372  fi
27373
27374
27375    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27376    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27377$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27378
27379    # We need to create a couple of temporary files.
27380    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27381    $MKDIR -p $VS_ENV_TMP_DIR
27382
27383    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27384    # Instead create a shell script which will set the relevant variables when run.
27385    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27386
27387  unix_path="$WINPATH_VS_ENV_CMD"
27388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27389    windows_path=`$CYGPATH -m "$unix_path"`
27390    WINPATH_VS_ENV_CMD="$windows_path"
27391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27392    windows_path=`cmd //c echo $unix_path`
27393    WINPATH_VS_ENV_CMD="$windows_path"
27394  fi
27395
27396    WINPATH_BASH="$BASH"
27397
27398  unix_path="$WINPATH_BASH"
27399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27400    windows_path=`$CYGPATH -m "$unix_path"`
27401    WINPATH_BASH="$windows_path"
27402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27403    windows_path=`cmd //c echo $unix_path`
27404    WINPATH_BASH="$windows_path"
27405  fi
27406
27407
27408    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27409    # script (executable by bash) that will setup the important variables.
27410    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27411    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27412    # This will end up something like:
27413    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27414    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27415    # These will end up something like:
27416    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27417    # The trailing space for everyone except PATH is no typo, but is needed due
27418    # to trailing \ in the Windows paths. These will be stripped later.
27419    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27420    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27421    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27422    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27423    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27424    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27425
27426    # Now execute the newly created bat file.
27427    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27428    # Change directory so we don't need to mess with Windows paths in redirects.
27429    cd $VS_ENV_TMP_DIR
27430    cmd /c extract-vs-env.bat | $CAT
27431    cd $CURDIR
27432
27433    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27434      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27435$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27436      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27437$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27438      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27439$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27440      as_fn_error $? "Cannot continue" "$LINENO" 5
27441    fi
27442
27443    # Now set all paths and other env variables. This will allow the rest of
27444    # the configure script to find and run the compiler in the proper way.
27445    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27446$as_echo "$as_me: Setting extracted environment variables" >&6;}
27447    . $VS_ENV_TMP_DIR/set-vs-env.sh
27448    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27449    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27450  else
27451    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27452    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27453$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27454  fi
27455
27456  # At this point, we should have correct variables in the environment, or we can't continue.
27457  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27458$as_echo_n "checking for Visual Studio variables... " >&6; }
27459
27460  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27461    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27462      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27463$as_echo "present but broken" >&6; }
27464      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27465    else
27466      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27467$as_echo "ok" >&6; }
27468      # Remove any trailing "\" and " " from the variables.
27469      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27470      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27471      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27472      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27473      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27474      # Remove any paths containing # (typically F#) as that messes up make. This
27475      # is needed if visual studio was installed with F# support.
27476      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27477
27478
27479
27480
27481    fi
27482  else
27483    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27484$as_echo "not found" >&6; }
27485
27486    if test "x$VS_ENV_CMD" = x; then
27487      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27488$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27489      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27490$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27491    else
27492      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27493$as_echo "$as_me: Running the extraction script failed." >&6;}
27494    fi
27495    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27496$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27497    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27498$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27499    as_fn_error $? "Cannot continue" "$LINENO" 5
27500  fi
27501
27502    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27503    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27504    PATH="$VS_PATH"
27505    # The microsoft toolchain also requires INCLUDE and LIB to be set.
27506    export INCLUDE="$VS_INCLUDE"
27507    export LIB="$VS_LIB"
27508  fi
27509
27510  # autoconf magic only relies on PATH, so update it if tools dir is specified
27511  OLD_PATH="$PATH"
27512
27513  # For solaris we really need solaris tools, and not the GNU equivalent.
27514  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27515  # so add that to path before starting to probe.
27516  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27517  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27518    PATH="/usr/ccs/bin:$PATH"
27519  fi
27520
27521  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27522  # override all other locations.
27523  if test "x$TOOLCHAIN_PATH" != x; then
27524    PATH=$TOOLCHAIN_PATH:$PATH
27525  fi
27526
27527
27528  #
27529  # Setup the compilers (CC and CXX)
27530  #
27531
27532  COMPILER_NAME=C
27533  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27534
27535  if test "x$CC" != x; then
27536    # User has supplied compiler name already, always let that override.
27537    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27538$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27539    if test "x`basename $CC`" = "x$CC"; then
27540      # A command without a complete path is provided, search $PATH.
27541
27542      for ac_prog in $CC
27543do
27544  # Extract the first word of "$ac_prog", so it can be a program name with args.
27545set dummy $ac_prog; ac_word=$2
27546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27547$as_echo_n "checking for $ac_word... " >&6; }
27548if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27549  $as_echo_n "(cached) " >&6
27550else
27551  case $POTENTIAL_CC in
27552  [\\/]* | ?:[\\/]*)
27553  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27554  ;;
27555  *)
27556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27557for as_dir in $PATH
27558do
27559  IFS=$as_save_IFS
27560  test -z "$as_dir" && as_dir=.
27561    for ac_exec_ext in '' $ac_executable_extensions; do
27562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27563    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27565    break 2
27566  fi
27567done
27568  done
27569IFS=$as_save_IFS
27570
27571  ;;
27572esac
27573fi
27574POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27575if test -n "$POTENTIAL_CC"; then
27576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27577$as_echo "$POTENTIAL_CC" >&6; }
27578else
27579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27580$as_echo "no" >&6; }
27581fi
27582
27583
27584  test -n "$POTENTIAL_CC" && break
27585done
27586
27587      if test "x$POTENTIAL_CC" != x; then
27588        CC=$POTENTIAL_CC
27589      else
27590        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27591      fi
27592    else
27593      # Otherwise it might already be a complete path
27594      if test ! -x "$CC"; then
27595        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27596      fi
27597    fi
27598  else
27599    # No user supplied value. Locate compiler ourselves.
27600
27601    # If we are cross compiling, assume cross compilation tools follows the
27602    # cross compilation standard where they are prefixed with the autoconf
27603    # standard name for the target. For example the binary
27604    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27605    # If we are not cross compiling, then the default compiler name will be
27606    # used.
27607
27608    CC=
27609    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27610    # before checking the rest of the PATH.
27611    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27612    # step, this should not be necessary.
27613    if test -n "$TOOLCHAIN_PATH"; then
27614      PATH_save="$PATH"
27615      PATH="$TOOLCHAIN_PATH"
27616      for ac_prog in $SEARCH_LIST
27617do
27618  # Extract the first word of "$ac_prog", so it can be a program name with args.
27619set dummy $ac_prog; ac_word=$2
27620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27621$as_echo_n "checking for $ac_word... " >&6; }
27622if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27623  $as_echo_n "(cached) " >&6
27624else
27625  case $TOOLCHAIN_PATH_CC in
27626  [\\/]* | ?:[\\/]*)
27627  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27628  ;;
27629  *)
27630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27631for as_dir in $PATH
27632do
27633  IFS=$as_save_IFS
27634  test -z "$as_dir" && as_dir=.
27635    for ac_exec_ext in '' $ac_executable_extensions; do
27636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27637    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27639    break 2
27640  fi
27641done
27642  done
27643IFS=$as_save_IFS
27644
27645  ;;
27646esac
27647fi
27648TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27649if test -n "$TOOLCHAIN_PATH_CC"; then
27650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27651$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27652else
27653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27654$as_echo "no" >&6; }
27655fi
27656
27657
27658  test -n "$TOOLCHAIN_PATH_CC" && break
27659done
27660
27661      CC=$TOOLCHAIN_PATH_CC
27662      PATH="$PATH_save"
27663    fi
27664
27665    # AC_PATH_PROGS can't be run multiple times with the same variable,
27666    # so create a new name for this run.
27667    if test "x$CC" = x; then
27668      for ac_prog in $SEARCH_LIST
27669do
27670  # Extract the first word of "$ac_prog", so it can be a program name with args.
27671set dummy $ac_prog; ac_word=$2
27672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27673$as_echo_n "checking for $ac_word... " >&6; }
27674if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27675  $as_echo_n "(cached) " >&6
27676else
27677  case $POTENTIAL_CC in
27678  [\\/]* | ?:[\\/]*)
27679  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27680  ;;
27681  *)
27682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27683for as_dir in $PATH
27684do
27685  IFS=$as_save_IFS
27686  test -z "$as_dir" && as_dir=.
27687    for ac_exec_ext in '' $ac_executable_extensions; do
27688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27689    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27691    break 2
27692  fi
27693done
27694  done
27695IFS=$as_save_IFS
27696
27697  ;;
27698esac
27699fi
27700POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27701if test -n "$POTENTIAL_CC"; then
27702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27703$as_echo "$POTENTIAL_CC" >&6; }
27704else
27705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27706$as_echo "no" >&6; }
27707fi
27708
27709
27710  test -n "$POTENTIAL_CC" && break
27711done
27712
27713      CC=$POTENTIAL_CC
27714    fi
27715
27716    if test "x$CC" = x; then
27717
27718  # Print a helpful message on how to acquire the necessary build dependency.
27719  # devkit is the help tag: freetype, cups, pulse, alsa etc
27720  MISSING_DEPENDENCY=devkit
27721
27722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27723    cygwin_help $MISSING_DEPENDENCY
27724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27725    msys_help $MISSING_DEPENDENCY
27726  else
27727    PKGHANDLER_COMMAND=
27728
27729    case $PKGHANDLER in
27730      apt-get)
27731        apt_help     $MISSING_DEPENDENCY ;;
27732      yum)
27733        yum_help     $MISSING_DEPENDENCY ;;
27734      port)
27735        port_help    $MISSING_DEPENDENCY ;;
27736      pkgutil)
27737        pkgutil_help $MISSING_DEPENDENCY ;;
27738      pkgadd)
27739        pkgadd_help  $MISSING_DEPENDENCY ;;
27740    esac
27741
27742    if test "x$PKGHANDLER_COMMAND" != x; then
27743      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27744    fi
27745  fi
27746
27747      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27748    fi
27749  fi
27750
27751  # Now we have a compiler binary in CC. Make sure it's okay.
27752
27753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27754
27755  # First separate the path from the arguments. This will split at the first
27756  # space.
27757  complete="$CC"
27758  path="${complete%% *}"
27759  tmp="$complete EOL"
27760  arguments="${tmp#* }"
27761
27762  # Input might be given as Windows format, start by converting to
27763  # unix format.
27764  new_path=`$CYGPATH -u "$path"`
27765
27766  # Now try to locate executable using which
27767  new_path=`$WHICH "$new_path" 2> /dev/null`
27768  # bat and cmd files are not always considered executable in cygwin causing which
27769  # to not find them
27770  if test "x$new_path" = x \
27771      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27772      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27773    new_path=`$CYGPATH -u "$path"`
27774  fi
27775  if test "x$new_path" = x; then
27776    # Oops. Which didn't find the executable.
27777    # The splitting of arguments from the executable at a space might have been incorrect,
27778    # since paths with space are more likely in Windows. Give it another try with the whole
27779    # argument.
27780    path="$complete"
27781    arguments="EOL"
27782    new_path=`$CYGPATH -u "$path"`
27783    new_path=`$WHICH "$new_path" 2> /dev/null`
27784    # bat and cmd files are not always considered executable in cygwin causing which
27785    # to not find them
27786    if test "x$new_path" = x \
27787        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27788        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27789      new_path=`$CYGPATH -u "$path"`
27790    fi
27791    if test "x$new_path" = x; then
27792      # It's still not found. Now this is an unrecoverable error.
27793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27794$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27795      has_space=`$ECHO "$complete" | $GREP " "`
27796      if test "x$has_space" != x; then
27797        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27798$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27799      fi
27800      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27801    fi
27802  fi
27803
27804  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27805  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27806  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27807  # "foo.exe" is OK but "foo" is an error.
27808  #
27809  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27810  # It is also a way to make sure we got the proper file name for the real test later on.
27811  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27812  if test "x$test_shortpath" = x; then
27813    # Short path failed, file does not exist as specified.
27814    # Try adding .exe or .cmd
27815    if test -f "${new_path}.exe"; then
27816      input_to_shortpath="${new_path}.exe"
27817    elif test -f "${new_path}.cmd"; then
27818      input_to_shortpath="${new_path}.cmd"
27819    else
27820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27821$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27822      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27823$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27824      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27825    fi
27826  else
27827    input_to_shortpath="$new_path"
27828  fi
27829
27830  # Call helper function which possibly converts this using DOS-style short mode.
27831  # If so, the updated path is stored in $new_path.
27832  new_path="$input_to_shortpath"
27833
27834  input_path="$input_to_shortpath"
27835  # Check if we need to convert this using DOS-style short mode. If the path
27836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27837  # take no chances and rewrite it.
27838  # Note: m4 eats our [], so we need to use [ and ] instead.
27839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27840  if test "x$has_forbidden_chars" != x; then
27841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27842    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27843    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27844    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27845      # Going to short mode and back again did indeed matter. Since short mode is
27846      # case insensitive, let's make it lowercase to improve readability.
27847      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27848      # Now convert it back to Unix-stile (cygpath)
27849      input_path=`$CYGPATH -u "$shortmode_path"`
27850      new_path="$input_path"
27851    fi
27852  fi
27853
27854  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27855  if test "x$test_cygdrive_prefix" = x; then
27856    # As a simple fix, exclude /usr/bin since it's not a real path.
27857    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27858      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27859      # a path prefixed by /cygdrive for fixpath to work.
27860      new_path="$CYGWIN_ROOT_PATH$input_path"
27861    fi
27862  fi
27863
27864  # remove trailing .exe if any
27865  new_path="${new_path/%.exe/}"
27866
27867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27868
27869  # First separate the path from the arguments. This will split at the first
27870  # space.
27871  complete="$CC"
27872  path="${complete%% *}"
27873  tmp="$complete EOL"
27874  arguments="${tmp#* }"
27875
27876  # Input might be given as Windows format, start by converting to
27877  # unix format.
27878  new_path="$path"
27879
27880  windows_path="$new_path"
27881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27882    unix_path=`$CYGPATH -u "$windows_path"`
27883    new_path="$unix_path"
27884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27886    new_path="$unix_path"
27887  fi
27888
27889
27890  # Now try to locate executable using which
27891  new_path=`$WHICH "$new_path" 2> /dev/null`
27892
27893  if test "x$new_path" = x; then
27894    # Oops. Which didn't find the executable.
27895    # The splitting of arguments from the executable at a space might have been incorrect,
27896    # since paths with space are more likely in Windows. Give it another try with the whole
27897    # argument.
27898    path="$complete"
27899    arguments="EOL"
27900    new_path="$path"
27901
27902  windows_path="$new_path"
27903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27904    unix_path=`$CYGPATH -u "$windows_path"`
27905    new_path="$unix_path"
27906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27908    new_path="$unix_path"
27909  fi
27910
27911
27912    new_path=`$WHICH "$new_path" 2> /dev/null`
27913
27914    if test "x$new_path" = x; then
27915      # It's still not found. Now this is an unrecoverable error.
27916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27917$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27918      has_space=`$ECHO "$complete" | $GREP " "`
27919      if test "x$has_space" != x; then
27920        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27921$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27922      fi
27923      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27924    fi
27925  fi
27926
27927  # Now new_path has a complete unix path to the binary
27928  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27929    # Keep paths in /bin as-is, but remove trailing .exe if any
27930    new_path="${new_path/%.exe/}"
27931    # Do not save /bin paths to all_fixpath_prefixes!
27932  else
27933    # Not in mixed or Windows style, start by that.
27934    new_path=`cmd //c echo $new_path`
27935
27936  input_path="$new_path"
27937  # Check if we need to convert this using DOS-style short mode. If the path
27938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27939  # take no chances and rewrite it.
27940  # Note: m4 eats our [], so we need to use [ and ] instead.
27941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27942  if test "x$has_forbidden_chars" != x; then
27943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27944    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27945  fi
27946
27947    # Output is in $new_path
27948
27949  windows_path="$new_path"
27950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27951    unix_path=`$CYGPATH -u "$windows_path"`
27952    new_path="$unix_path"
27953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27955    new_path="$unix_path"
27956  fi
27957
27958    # remove trailing .exe if any
27959    new_path="${new_path/%.exe/}"
27960
27961    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27962    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27963  fi
27964
27965  else
27966    # We're on a posix platform. Hooray! :)
27967    # First separate the path from the arguments. This will split at the first
27968    # space.
27969    complete="$CC"
27970    path="${complete%% *}"
27971    tmp="$complete EOL"
27972    arguments="${tmp#* }"
27973
27974    # Cannot rely on the command "which" here since it doesn't always work.
27975    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27976    if test -z "$is_absolute_path"; then
27977      # Path to executable is not absolute. Find it.
27978      IFS_save="$IFS"
27979      IFS=:
27980      for p in $PATH; do
27981        if test -f "$p/$path" && test -x "$p/$path"; then
27982          new_path="$p/$path"
27983          break
27984        fi
27985      done
27986      IFS="$IFS_save"
27987    else
27988      # This is an absolute path, we can use it without further modifications.
27989      new_path="$path"
27990    fi
27991
27992    if test "x$new_path" = x; then
27993      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27994$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27995      has_space=`$ECHO "$complete" | $GREP " "`
27996      if test "x$has_space" != x; then
27997        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27998$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27999      fi
28000      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28001    fi
28002  fi
28003
28004  # Now join together the path and the arguments once again
28005  if test "x$arguments" != xEOL; then
28006    new_complete="$new_path ${arguments% *}"
28007  else
28008    new_complete="$new_path"
28009  fi
28010
28011  if test "x$complete" != "x$new_complete"; then
28012    CC="$new_complete"
28013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28014$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28015  fi
28016
28017  TEST_COMPILER="$CC"
28018  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28019  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28020  if test "x$OPENJDK_BUILD_OS" != xaix; then
28021    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28022    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28023$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28024
28025  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28026    # Follow a chain of symbolic links. Use readlink
28027    # where it exists, else fall back to horribly
28028    # complicated shell code.
28029    if test "x$READLINK_TESTED" != yes; then
28030      # On MacOSX there is a readlink tool with a different
28031      # purpose than the GNU readlink tool. Check the found readlink.
28032      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28033      if test "x$ISGNU" = x; then
28034        # A readlink that we do not know how to use.
28035        # Are there other non-GNU readlinks out there?
28036        READLINK_TESTED=yes
28037        READLINK=
28038      fi
28039    fi
28040
28041    if test "x$READLINK" != x; then
28042      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28043    else
28044      # Save the current directory for restoring afterwards
28045      STARTDIR=$PWD
28046      COUNTER=0
28047      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28048      sym_link_file=`$BASENAME $TEST_COMPILER`
28049      cd $sym_link_dir
28050      # Use -P flag to resolve symlinks in directories.
28051      cd `$THEPWDCMD -P`
28052      sym_link_dir=`$THEPWDCMD -P`
28053      # Resolve file symlinks
28054      while test $COUNTER -lt 20; do
28055        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28056        if test "x$ISLINK" == x; then
28057          # This is not a symbolic link! We are done!
28058          break
28059        fi
28060        # Again resolve directory symlinks since the target of the just found
28061        # link could be in a different directory
28062        cd `$DIRNAME $ISLINK`
28063        sym_link_dir=`$THEPWDCMD -P`
28064        sym_link_file=`$BASENAME $ISLINK`
28065        let COUNTER=COUNTER+1
28066      done
28067      cd $STARTDIR
28068      TEST_COMPILER=$sym_link_dir/$sym_link_file
28069    fi
28070  fi
28071
28072    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28073$as_echo "$TEST_COMPILER" >&6; }
28074  fi
28075  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28076$as_echo_n "checking if CC is disguised ccache... " >&6; }
28077
28078  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28079  if test "x$COMPILER_BASENAME" = "xccache"; then
28080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28081$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28082    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28083    # We want to control ccache invocation ourselves, so ignore this cc and try
28084    # searching again.
28085
28086    # Remove the path to the fake ccache cc from the PATH
28087    RETRY_COMPILER_SAVED_PATH="$PATH"
28088    COMPILER_DIRNAME=`$DIRNAME $CC`
28089    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28090
28091    # Try again looking for our compiler
28092    if test -n "$ac_tool_prefix"; then
28093  for ac_prog in $TOOLCHAIN_CC_BINARY
28094  do
28095    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28096set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28098$as_echo_n "checking for $ac_word... " >&6; }
28099if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28100  $as_echo_n "(cached) " >&6
28101else
28102  if test -n "$PROPER_COMPILER_CC"; then
28103  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28104else
28105as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28106for as_dir in $PATH
28107do
28108  IFS=$as_save_IFS
28109  test -z "$as_dir" && as_dir=.
28110    for ac_exec_ext in '' $ac_executable_extensions; do
28111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28112    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28114    break 2
28115  fi
28116done
28117  done
28118IFS=$as_save_IFS
28119
28120fi
28121fi
28122PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28123if test -n "$PROPER_COMPILER_CC"; then
28124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28125$as_echo "$PROPER_COMPILER_CC" >&6; }
28126else
28127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28128$as_echo "no" >&6; }
28129fi
28130
28131
28132    test -n "$PROPER_COMPILER_CC" && break
28133  done
28134fi
28135if test -z "$PROPER_COMPILER_CC"; then
28136  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28137  for ac_prog in $TOOLCHAIN_CC_BINARY
28138do
28139  # Extract the first word of "$ac_prog", so it can be a program name with args.
28140set dummy $ac_prog; ac_word=$2
28141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28142$as_echo_n "checking for $ac_word... " >&6; }
28143if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28144  $as_echo_n "(cached) " >&6
28145else
28146  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28147  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28148else
28149as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28150for as_dir in $PATH
28151do
28152  IFS=$as_save_IFS
28153  test -z "$as_dir" && as_dir=.
28154    for ac_exec_ext in '' $ac_executable_extensions; do
28155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28156    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28158    break 2
28159  fi
28160done
28161  done
28162IFS=$as_save_IFS
28163
28164fi
28165fi
28166ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28167if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28169$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28170else
28171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28172$as_echo "no" >&6; }
28173fi
28174
28175
28176  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28177done
28178
28179  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28180    PROPER_COMPILER_CC=""
28181  else
28182    case $cross_compiling:$ac_tool_warned in
28183yes:)
28184{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28185$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28186ac_tool_warned=yes ;;
28187esac
28188    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28189  fi
28190fi
28191
28192
28193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28194
28195  # First separate the path from the arguments. This will split at the first
28196  # space.
28197  complete="$PROPER_COMPILER_CC"
28198  path="${complete%% *}"
28199  tmp="$complete EOL"
28200  arguments="${tmp#* }"
28201
28202  # Input might be given as Windows format, start by converting to
28203  # unix format.
28204  new_path=`$CYGPATH -u "$path"`
28205
28206  # Now try to locate executable using which
28207  new_path=`$WHICH "$new_path" 2> /dev/null`
28208  # bat and cmd files are not always considered executable in cygwin causing which
28209  # to not find them
28210  if test "x$new_path" = x \
28211      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28212      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28213    new_path=`$CYGPATH -u "$path"`
28214  fi
28215  if test "x$new_path" = x; then
28216    # Oops. Which didn't find the executable.
28217    # The splitting of arguments from the executable at a space might have been incorrect,
28218    # since paths with space are more likely in Windows. Give it another try with the whole
28219    # argument.
28220    path="$complete"
28221    arguments="EOL"
28222    new_path=`$CYGPATH -u "$path"`
28223    new_path=`$WHICH "$new_path" 2> /dev/null`
28224    # bat and cmd files are not always considered executable in cygwin causing which
28225    # to not find them
28226    if test "x$new_path" = x \
28227        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28228        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28229      new_path=`$CYGPATH -u "$path"`
28230    fi
28231    if test "x$new_path" = x; then
28232      # It's still not found. Now this is an unrecoverable error.
28233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28234$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28235      has_space=`$ECHO "$complete" | $GREP " "`
28236      if test "x$has_space" != x; then
28237        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28238$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28239      fi
28240      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28241    fi
28242  fi
28243
28244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28247  # "foo.exe" is OK but "foo" is an error.
28248  #
28249  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28250  # It is also a way to make sure we got the proper file name for the real test later on.
28251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28252  if test "x$test_shortpath" = x; then
28253    # Short path failed, file does not exist as specified.
28254    # Try adding .exe or .cmd
28255    if test -f "${new_path}.exe"; then
28256      input_to_shortpath="${new_path}.exe"
28257    elif test -f "${new_path}.cmd"; then
28258      input_to_shortpath="${new_path}.cmd"
28259    else
28260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28261$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28262      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28263$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28264      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28265    fi
28266  else
28267    input_to_shortpath="$new_path"
28268  fi
28269
28270  # Call helper function which possibly converts this using DOS-style short mode.
28271  # If so, the updated path is stored in $new_path.
28272  new_path="$input_to_shortpath"
28273
28274  input_path="$input_to_shortpath"
28275  # Check if we need to convert this using DOS-style short mode. If the path
28276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28277  # take no chances and rewrite it.
28278  # Note: m4 eats our [], so we need to use [ and ] instead.
28279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28280  if test "x$has_forbidden_chars" != x; then
28281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28285      # Going to short mode and back again did indeed matter. Since short mode is
28286      # case insensitive, let's make it lowercase to improve readability.
28287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28288      # Now convert it back to Unix-stile (cygpath)
28289      input_path=`$CYGPATH -u "$shortmode_path"`
28290      new_path="$input_path"
28291    fi
28292  fi
28293
28294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28295  if test "x$test_cygdrive_prefix" = x; then
28296    # As a simple fix, exclude /usr/bin since it's not a real path.
28297    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28299      # a path prefixed by /cygdrive for fixpath to work.
28300      new_path="$CYGWIN_ROOT_PATH$input_path"
28301    fi
28302  fi
28303
28304  # remove trailing .exe if any
28305  new_path="${new_path/%.exe/}"
28306
28307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28308
28309  # First separate the path from the arguments. This will split at the first
28310  # space.
28311  complete="$PROPER_COMPILER_CC"
28312  path="${complete%% *}"
28313  tmp="$complete EOL"
28314  arguments="${tmp#* }"
28315
28316  # Input might be given as Windows format, start by converting to
28317  # unix format.
28318  new_path="$path"
28319
28320  windows_path="$new_path"
28321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28322    unix_path=`$CYGPATH -u "$windows_path"`
28323    new_path="$unix_path"
28324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28326    new_path="$unix_path"
28327  fi
28328
28329
28330  # Now try to locate executable using which
28331  new_path=`$WHICH "$new_path" 2> /dev/null`
28332
28333  if test "x$new_path" = x; then
28334    # Oops. Which didn't find the executable.
28335    # The splitting of arguments from the executable at a space might have been incorrect,
28336    # since paths with space are more likely in Windows. Give it another try with the whole
28337    # argument.
28338    path="$complete"
28339    arguments="EOL"
28340    new_path="$path"
28341
28342  windows_path="$new_path"
28343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28344    unix_path=`$CYGPATH -u "$windows_path"`
28345    new_path="$unix_path"
28346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28348    new_path="$unix_path"
28349  fi
28350
28351
28352    new_path=`$WHICH "$new_path" 2> /dev/null`
28353
28354    if test "x$new_path" = x; then
28355      # It's still not found. Now this is an unrecoverable error.
28356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28357$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28358      has_space=`$ECHO "$complete" | $GREP " "`
28359      if test "x$has_space" != x; then
28360        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28361$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28362      fi
28363      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28364    fi
28365  fi
28366
28367  # Now new_path has a complete unix path to the binary
28368  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28369    # Keep paths in /bin as-is, but remove trailing .exe if any
28370    new_path="${new_path/%.exe/}"
28371    # Do not save /bin paths to all_fixpath_prefixes!
28372  else
28373    # Not in mixed or Windows style, start by that.
28374    new_path=`cmd //c echo $new_path`
28375
28376  input_path="$new_path"
28377  # Check if we need to convert this using DOS-style short mode. If the path
28378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28379  # take no chances and rewrite it.
28380  # Note: m4 eats our [], so we need to use [ and ] instead.
28381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28382  if test "x$has_forbidden_chars" != x; then
28383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28384    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28385  fi
28386
28387    # Output is in $new_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    # remove trailing .exe if any
28399    new_path="${new_path/%.exe/}"
28400
28401    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28402    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28403  fi
28404
28405  else
28406    # We're on a posix platform. Hooray! :)
28407    # First separate the path from the arguments. This will split at the first
28408    # space.
28409    complete="$PROPER_COMPILER_CC"
28410    path="${complete%% *}"
28411    tmp="$complete EOL"
28412    arguments="${tmp#* }"
28413
28414    # Cannot rely on the command "which" here since it doesn't always work.
28415    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28416    if test -z "$is_absolute_path"; then
28417      # Path to executable is not absolute. Find it.
28418      IFS_save="$IFS"
28419      IFS=:
28420      for p in $PATH; do
28421        if test -f "$p/$path" && test -x "$p/$path"; then
28422          new_path="$p/$path"
28423          break
28424        fi
28425      done
28426      IFS="$IFS_save"
28427    else
28428      # This is an absolute path, we can use it without further modifications.
28429      new_path="$path"
28430    fi
28431
28432    if test "x$new_path" = x; then
28433      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28434$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28435      has_space=`$ECHO "$complete" | $GREP " "`
28436      if test "x$has_space" != x; then
28437        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28438$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28439      fi
28440      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28441    fi
28442  fi
28443
28444  # Now join together the path and the arguments once again
28445  if test "x$arguments" != xEOL; then
28446    new_complete="$new_path ${arguments% *}"
28447  else
28448    new_complete="$new_path"
28449  fi
28450
28451  if test "x$complete" != "x$new_complete"; then
28452    PROPER_COMPILER_CC="$new_complete"
28453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28454$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28455  fi
28456
28457    PATH="$RETRY_COMPILER_SAVED_PATH"
28458
28459    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28460$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28461
28462  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28463    # Follow a chain of symbolic links. Use readlink
28464    # where it exists, else fall back to horribly
28465    # complicated shell code.
28466    if test "x$READLINK_TESTED" != yes; then
28467      # On MacOSX there is a readlink tool with a different
28468      # purpose than the GNU readlink tool. Check the found readlink.
28469      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28470      if test "x$ISGNU" = x; then
28471        # A readlink that we do not know how to use.
28472        # Are there other non-GNU readlinks out there?
28473        READLINK_TESTED=yes
28474        READLINK=
28475      fi
28476    fi
28477
28478    if test "x$READLINK" != x; then
28479      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28480    else
28481      # Save the current directory for restoring afterwards
28482      STARTDIR=$PWD
28483      COUNTER=0
28484      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28485      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28486      cd $sym_link_dir
28487      # Use -P flag to resolve symlinks in directories.
28488      cd `$THEPWDCMD -P`
28489      sym_link_dir=`$THEPWDCMD -P`
28490      # Resolve file symlinks
28491      while test $COUNTER -lt 20; do
28492        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28493        if test "x$ISLINK" == x; then
28494          # This is not a symbolic link! We are done!
28495          break
28496        fi
28497        # Again resolve directory symlinks since the target of the just found
28498        # link could be in a different directory
28499        cd `$DIRNAME $ISLINK`
28500        sym_link_dir=`$THEPWDCMD -P`
28501        sym_link_file=`$BASENAME $ISLINK`
28502        let COUNTER=COUNTER+1
28503      done
28504      cd $STARTDIR
28505      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28506    fi
28507  fi
28508
28509    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28510$as_echo "$PROPER_COMPILER_CC" >&6; }
28511    CC="$PROPER_COMPILER_CC"
28512  else
28513    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28514$as_echo "no, keeping CC" >&6; }
28515  fi
28516
28517
28518  COMPILER=$CC
28519  COMPILER_NAME=$COMPILER_NAME
28520
28521  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28522    # cc -V output typically looks like
28523    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28524    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28525    # Check that this is likely to be the Solaris Studio cc.
28526    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28527    if test $? -ne 0; then
28528      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28529      { $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
28530$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28531      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28532$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28533      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28534$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28535      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28536    fi
28537    # Remove usage instructions (if present), and
28538    # collapse compiler output into a single line
28539    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28540        $SED -e 's/ *[Uu]sage:.*//'`
28541    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28542        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28543  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28544    # xlc -qversion output typically looks like
28545    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28546    #     Version: 11.01.0000.0015
28547    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28548    # Check that this is likely to be the IBM XL C compiler.
28549    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28550    if test $? -ne 0; then
28551      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28552      { $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
28553$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28554      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28555$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28556      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28557$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28558      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28559    fi
28560    # Collapse compiler output into a single line
28561    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28562    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28563        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28564  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28565    # There is no specific version flag, but all output starts with a version string.
28566    # First line typically looks something like:
28567    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28568    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28569    # Check that this is likely to be Microsoft CL.EXE.
28570    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28571    if test $? -ne 0; then
28572      { $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
28573$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28574      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28575$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28576      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28577    fi
28578    # Collapse compiler output into a single line
28579    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28580    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28581        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28582  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28583    # gcc --version output typically looks like
28584    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28585    #     Copyright (C) 2013 Free Software Foundation, Inc.
28586    #     This is free software; see the source for copying conditions.  There is NO
28587    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28588    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28589    # Check that this is likely to be GCC.
28590    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28591    if test $? -ne 0; then
28592      { $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
28593$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28594      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28595$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28596      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28597    fi
28598    # Remove Copyright and legalese from version string, and
28599    # collapse into a single line
28600    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28601        $SED -e 's/ *Copyright .*//'`
28602    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28603        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28604  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28605    # clang --version output typically looks like
28606    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28607    #    clang version 3.3 (tags/RELEASE_33/final)
28608    # or
28609    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28610    #    Target: x86_64-pc-linux-gnu
28611    #    Thread model: posix
28612    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28613    # Check that this is likely to be clang
28614    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28615    if test $? -ne 0; then
28616      { $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
28617$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28618      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28619$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28620      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28621    fi
28622    # Collapse compiler output into a single line
28623    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28624    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28625        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28626  else
28627      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28628  fi
28629  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28630  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28631  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28632  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28633
28634  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28635$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28636
28637
28638  # Now that we have resolved CC ourself, let autoconf have its go at it
28639  ac_ext=c
28640ac_cpp='$CPP $CPPFLAGS'
28641ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28642ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28643ac_compiler_gnu=$ac_cv_c_compiler_gnu
28644if test -n "$ac_tool_prefix"; then
28645  for ac_prog in $CC
28646  do
28647    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28648set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28650$as_echo_n "checking for $ac_word... " >&6; }
28651if ${ac_cv_prog_CC+:} false; then :
28652  $as_echo_n "(cached) " >&6
28653else
28654  if test -n "$CC"; then
28655  ac_cv_prog_CC="$CC" # Let the user override the test.
28656else
28657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28658for as_dir in $PATH
28659do
28660  IFS=$as_save_IFS
28661  test -z "$as_dir" && as_dir=.
28662    for ac_exec_ext in '' $ac_executable_extensions; do
28663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28664    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28666    break 2
28667  fi
28668done
28669  done
28670IFS=$as_save_IFS
28671
28672fi
28673fi
28674CC=$ac_cv_prog_CC
28675if test -n "$CC"; then
28676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28677$as_echo "$CC" >&6; }
28678else
28679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28680$as_echo "no" >&6; }
28681fi
28682
28683
28684    test -n "$CC" && break
28685  done
28686fi
28687if test -z "$CC"; then
28688  ac_ct_CC=$CC
28689  for ac_prog in $CC
28690do
28691  # Extract the first word of "$ac_prog", so it can be a program name with args.
28692set dummy $ac_prog; ac_word=$2
28693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28694$as_echo_n "checking for $ac_word... " >&6; }
28695if ${ac_cv_prog_ac_ct_CC+:} false; then :
28696  $as_echo_n "(cached) " >&6
28697else
28698  if test -n "$ac_ct_CC"; then
28699  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28700else
28701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28702for as_dir in $PATH
28703do
28704  IFS=$as_save_IFS
28705  test -z "$as_dir" && as_dir=.
28706    for ac_exec_ext in '' $ac_executable_extensions; do
28707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28708    ac_cv_prog_ac_ct_CC="$ac_prog"
28709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28710    break 2
28711  fi
28712done
28713  done
28714IFS=$as_save_IFS
28715
28716fi
28717fi
28718ac_ct_CC=$ac_cv_prog_ac_ct_CC
28719if test -n "$ac_ct_CC"; then
28720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28721$as_echo "$ac_ct_CC" >&6; }
28722else
28723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28724$as_echo "no" >&6; }
28725fi
28726
28727
28728  test -n "$ac_ct_CC" && break
28729done
28730
28731  if test "x$ac_ct_CC" = x; then
28732    CC=""
28733  else
28734    case $cross_compiling:$ac_tool_warned in
28735yes:)
28736{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28737$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28738ac_tool_warned=yes ;;
28739esac
28740    CC=$ac_ct_CC
28741  fi
28742fi
28743
28744
28745test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28747as_fn_error $? "no acceptable C compiler found in \$PATH
28748See \`config.log' for more details" "$LINENO" 5; }
28749
28750# Provide some information about the compiler.
28751$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28752set X $ac_compile
28753ac_compiler=$2
28754for ac_option in --version -v -V -qversion; do
28755  { { ac_try="$ac_compiler $ac_option >&5"
28756case "(($ac_try" in
28757  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28758  *) ac_try_echo=$ac_try;;
28759esac
28760eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28761$as_echo "$ac_try_echo"; } >&5
28762  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28763  ac_status=$?
28764  if test -s conftest.err; then
28765    sed '10a\
28766... rest of stderr output deleted ...
28767         10q' conftest.err >conftest.er1
28768    cat conftest.er1 >&5
28769  fi
28770  rm -f conftest.er1 conftest.err
28771  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28772  test $ac_status = 0; }
28773done
28774
28775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28776/* end confdefs.h.  */
28777
28778int
28779main ()
28780{
28781
28782  ;
28783  return 0;
28784}
28785_ACEOF
28786ac_clean_files_save=$ac_clean_files
28787ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28788# Try to create an executable without -o first, disregard a.out.
28789# It will help us diagnose broken compilers, and finding out an intuition
28790# of exeext.
28791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28792$as_echo_n "checking whether the C compiler works... " >&6; }
28793ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28794
28795# The possible output files:
28796ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28797
28798ac_rmfiles=
28799for ac_file in $ac_files
28800do
28801  case $ac_file in
28802    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28803    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28804  esac
28805done
28806rm -f $ac_rmfiles
28807
28808if { { ac_try="$ac_link_default"
28809case "(($ac_try" in
28810  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28811  *) ac_try_echo=$ac_try;;
28812esac
28813eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28814$as_echo "$ac_try_echo"; } >&5
28815  (eval "$ac_link_default") 2>&5
28816  ac_status=$?
28817  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28818  test $ac_status = 0; }; then :
28819  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28820# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28821# in a Makefile.  We should not override ac_cv_exeext if it was cached,
28822# so that the user can short-circuit this test for compilers unknown to
28823# Autoconf.
28824for ac_file in $ac_files ''
28825do
28826  test -f "$ac_file" || continue
28827  case $ac_file in
28828    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28829	;;
28830    [ab].out )
28831	# We found the default executable, but exeext='' is most
28832	# certainly right.
28833	break;;
28834    *.* )
28835	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28836	then :; else
28837	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28838	fi
28839	# We set ac_cv_exeext here because the later test for it is not
28840	# safe: cross compilers may not add the suffix if given an `-o'
28841	# argument, so we may need to know it at that point already.
28842	# Even if this section looks crufty: it has the advantage of
28843	# actually working.
28844	break;;
28845    * )
28846	break;;
28847  esac
28848done
28849test "$ac_cv_exeext" = no && ac_cv_exeext=
28850
28851else
28852  ac_file=''
28853fi
28854if test -z "$ac_file"; then :
28855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28856$as_echo "no" >&6; }
28857$as_echo "$as_me: failed program was:" >&5
28858sed 's/^/| /' conftest.$ac_ext >&5
28859
28860{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28861$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28862as_fn_error 77 "C compiler cannot create executables
28863See \`config.log' for more details" "$LINENO" 5; }
28864else
28865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28866$as_echo "yes" >&6; }
28867fi
28868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28869$as_echo_n "checking for C compiler default output file name... " >&6; }
28870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28871$as_echo "$ac_file" >&6; }
28872ac_exeext=$ac_cv_exeext
28873
28874rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28875ac_clean_files=$ac_clean_files_save
28876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28877$as_echo_n "checking for suffix of executables... " >&6; }
28878if { { ac_try="$ac_link"
28879case "(($ac_try" in
28880  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28881  *) ac_try_echo=$ac_try;;
28882esac
28883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28884$as_echo "$ac_try_echo"; } >&5
28885  (eval "$ac_link") 2>&5
28886  ac_status=$?
28887  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28888  test $ac_status = 0; }; then :
28889  # If both `conftest.exe' and `conftest' are `present' (well, observable)
28890# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28891# work properly (i.e., refer to `conftest.exe'), while it won't with
28892# `rm'.
28893for ac_file in conftest.exe conftest conftest.*; do
28894  test -f "$ac_file" || continue
28895  case $ac_file in
28896    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28897    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28898	  break;;
28899    * ) break;;
28900  esac
28901done
28902else
28903  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28904$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28905as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28906See \`config.log' for more details" "$LINENO" 5; }
28907fi
28908rm -f conftest conftest$ac_cv_exeext
28909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28910$as_echo "$ac_cv_exeext" >&6; }
28911
28912rm -f conftest.$ac_ext
28913EXEEXT=$ac_cv_exeext
28914ac_exeext=$EXEEXT
28915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28916/* end confdefs.h.  */
28917#include <stdio.h>
28918int
28919main ()
28920{
28921FILE *f = fopen ("conftest.out", "w");
28922 return ferror (f) || fclose (f) != 0;
28923
28924  ;
28925  return 0;
28926}
28927_ACEOF
28928ac_clean_files="$ac_clean_files conftest.out"
28929# Check that the compiler produces executables we can run.  If not, either
28930# the compiler is broken, or we cross compile.
28931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28932$as_echo_n "checking whether we are cross compiling... " >&6; }
28933if test "$cross_compiling" != yes; then
28934  { { ac_try="$ac_link"
28935case "(($ac_try" in
28936  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28937  *) ac_try_echo=$ac_try;;
28938esac
28939eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28940$as_echo "$ac_try_echo"; } >&5
28941  (eval "$ac_link") 2>&5
28942  ac_status=$?
28943  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28944  test $ac_status = 0; }
28945  if { ac_try='./conftest$ac_cv_exeext'
28946  { { case "(($ac_try" in
28947  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28948  *) ac_try_echo=$ac_try;;
28949esac
28950eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28951$as_echo "$ac_try_echo"; } >&5
28952  (eval "$ac_try") 2>&5
28953  ac_status=$?
28954  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28955  test $ac_status = 0; }; }; then
28956    cross_compiling=no
28957  else
28958    if test "$cross_compiling" = maybe; then
28959	cross_compiling=yes
28960    else
28961	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28962$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28963as_fn_error $? "cannot run C compiled programs.
28964If you meant to cross compile, use \`--host'.
28965See \`config.log' for more details" "$LINENO" 5; }
28966    fi
28967  fi
28968fi
28969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
28970$as_echo "$cross_compiling" >&6; }
28971
28972rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
28973ac_clean_files=$ac_clean_files_save
28974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
28975$as_echo_n "checking for suffix of object files... " >&6; }
28976if ${ac_cv_objext+:} false; then :
28977  $as_echo_n "(cached) " >&6
28978else
28979  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28980/* end confdefs.h.  */
28981
28982int
28983main ()
28984{
28985
28986  ;
28987  return 0;
28988}
28989_ACEOF
28990rm -f conftest.o conftest.obj
28991if { { ac_try="$ac_compile"
28992case "(($ac_try" in
28993  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28994  *) ac_try_echo=$ac_try;;
28995esac
28996eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28997$as_echo "$ac_try_echo"; } >&5
28998  (eval "$ac_compile") 2>&5
28999  ac_status=$?
29000  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29001  test $ac_status = 0; }; then :
29002  for ac_file in conftest.o conftest.obj conftest.*; do
29003  test -f "$ac_file" || continue;
29004  case $ac_file in
29005    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29006    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29007       break;;
29008  esac
29009done
29010else
29011  $as_echo "$as_me: failed program was:" >&5
29012sed 's/^/| /' conftest.$ac_ext >&5
29013
29014{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29015$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29016as_fn_error $? "cannot compute suffix of object files: cannot compile
29017See \`config.log' for more details" "$LINENO" 5; }
29018fi
29019rm -f conftest.$ac_cv_objext conftest.$ac_ext
29020fi
29021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29022$as_echo "$ac_cv_objext" >&6; }
29023OBJEXT=$ac_cv_objext
29024ac_objext=$OBJEXT
29025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29026$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29027if ${ac_cv_c_compiler_gnu+:} false; then :
29028  $as_echo_n "(cached) " >&6
29029else
29030  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29031/* end confdefs.h.  */
29032
29033int
29034main ()
29035{
29036#ifndef __GNUC__
29037       choke me
29038#endif
29039
29040  ;
29041  return 0;
29042}
29043_ACEOF
29044if ac_fn_c_try_compile "$LINENO"; then :
29045  ac_compiler_gnu=yes
29046else
29047  ac_compiler_gnu=no
29048fi
29049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29050ac_cv_c_compiler_gnu=$ac_compiler_gnu
29051
29052fi
29053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29054$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29055if test $ac_compiler_gnu = yes; then
29056  GCC=yes
29057else
29058  GCC=
29059fi
29060ac_test_CFLAGS=${CFLAGS+set}
29061ac_save_CFLAGS=$CFLAGS
29062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29063$as_echo_n "checking whether $CC accepts -g... " >&6; }
29064if ${ac_cv_prog_cc_g+:} false; then :
29065  $as_echo_n "(cached) " >&6
29066else
29067  ac_save_c_werror_flag=$ac_c_werror_flag
29068   ac_c_werror_flag=yes
29069   ac_cv_prog_cc_g=no
29070   CFLAGS="-g"
29071   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29072/* end confdefs.h.  */
29073
29074int
29075main ()
29076{
29077
29078  ;
29079  return 0;
29080}
29081_ACEOF
29082if ac_fn_c_try_compile "$LINENO"; then :
29083  ac_cv_prog_cc_g=yes
29084else
29085  CFLAGS=""
29086      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29087/* end confdefs.h.  */
29088
29089int
29090main ()
29091{
29092
29093  ;
29094  return 0;
29095}
29096_ACEOF
29097if ac_fn_c_try_compile "$LINENO"; then :
29098
29099else
29100  ac_c_werror_flag=$ac_save_c_werror_flag
29101	 CFLAGS="-g"
29102	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29103/* end confdefs.h.  */
29104
29105int
29106main ()
29107{
29108
29109  ;
29110  return 0;
29111}
29112_ACEOF
29113if ac_fn_c_try_compile "$LINENO"; then :
29114  ac_cv_prog_cc_g=yes
29115fi
29116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29117fi
29118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29119fi
29120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29121   ac_c_werror_flag=$ac_save_c_werror_flag
29122fi
29123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29124$as_echo "$ac_cv_prog_cc_g" >&6; }
29125if test "$ac_test_CFLAGS" = set; then
29126  CFLAGS=$ac_save_CFLAGS
29127elif test $ac_cv_prog_cc_g = yes; then
29128  if test "$GCC" = yes; then
29129    CFLAGS="-g -O2"
29130  else
29131    CFLAGS="-g"
29132  fi
29133else
29134  if test "$GCC" = yes; then
29135    CFLAGS="-O2"
29136  else
29137    CFLAGS=
29138  fi
29139fi
29140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29141$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29142if ${ac_cv_prog_cc_c89+:} false; then :
29143  $as_echo_n "(cached) " >&6
29144else
29145  ac_cv_prog_cc_c89=no
29146ac_save_CC=$CC
29147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29148/* end confdefs.h.  */
29149#include <stdarg.h>
29150#include <stdio.h>
29151struct stat;
29152/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29153struct buf { int x; };
29154FILE * (*rcsopen) (struct buf *, struct stat *, int);
29155static char *e (p, i)
29156     char **p;
29157     int i;
29158{
29159  return p[i];
29160}
29161static char *f (char * (*g) (char **, int), char **p, ...)
29162{
29163  char *s;
29164  va_list v;
29165  va_start (v,p);
29166  s = g (p, va_arg (v,int));
29167  va_end (v);
29168  return s;
29169}
29170
29171/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29172   function prototypes and stuff, but not '\xHH' hex character constants.
29173   These don't provoke an error unfortunately, instead are silently treated
29174   as 'x'.  The following induces an error, until -std is added to get
29175   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29176   array size at least.  It's necessary to write '\x00'==0 to get something
29177   that's true only with -std.  */
29178int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29179
29180/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29181   inside strings and character constants.  */
29182#define FOO(x) 'x'
29183int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29184
29185int test (int i, double x);
29186struct s1 {int (*f) (int a);};
29187struct s2 {int (*f) (double a);};
29188int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29189int argc;
29190char **argv;
29191int
29192main ()
29193{
29194return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29195  ;
29196  return 0;
29197}
29198_ACEOF
29199for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29200	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29201do
29202  CC="$ac_save_CC $ac_arg"
29203  if ac_fn_c_try_compile "$LINENO"; then :
29204  ac_cv_prog_cc_c89=$ac_arg
29205fi
29206rm -f core conftest.err conftest.$ac_objext
29207  test "x$ac_cv_prog_cc_c89" != "xno" && break
29208done
29209rm -f conftest.$ac_ext
29210CC=$ac_save_CC
29211
29212fi
29213# AC_CACHE_VAL
29214case "x$ac_cv_prog_cc_c89" in
29215  x)
29216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29217$as_echo "none needed" >&6; } ;;
29218  xno)
29219    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29220$as_echo "unsupported" >&6; } ;;
29221  *)
29222    CC="$CC $ac_cv_prog_cc_c89"
29223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29224$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29225esac
29226if test "x$ac_cv_prog_cc_c89" != xno; then :
29227
29228fi
29229
29230ac_ext=cpp
29231ac_cpp='$CXXCPP $CPPFLAGS'
29232ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29233ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29234ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29235
29236
29237
29238  COMPILER_NAME=C++
29239  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29240
29241  if test "x$CXX" != x; then
29242    # User has supplied compiler name already, always let that override.
29243    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29244$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29245    if test "x`basename $CXX`" = "x$CXX"; then
29246      # A command without a complete path is provided, search $PATH.
29247
29248      for ac_prog in $CXX
29249do
29250  # Extract the first word of "$ac_prog", so it can be a program name with args.
29251set dummy $ac_prog; ac_word=$2
29252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29253$as_echo_n "checking for $ac_word... " >&6; }
29254if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29255  $as_echo_n "(cached) " >&6
29256else
29257  case $POTENTIAL_CXX in
29258  [\\/]* | ?:[\\/]*)
29259  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29260  ;;
29261  *)
29262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29263for as_dir in $PATH
29264do
29265  IFS=$as_save_IFS
29266  test -z "$as_dir" && as_dir=.
29267    for ac_exec_ext in '' $ac_executable_extensions; do
29268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29269    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29271    break 2
29272  fi
29273done
29274  done
29275IFS=$as_save_IFS
29276
29277  ;;
29278esac
29279fi
29280POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29281if test -n "$POTENTIAL_CXX"; then
29282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29283$as_echo "$POTENTIAL_CXX" >&6; }
29284else
29285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29286$as_echo "no" >&6; }
29287fi
29288
29289
29290  test -n "$POTENTIAL_CXX" && break
29291done
29292
29293      if test "x$POTENTIAL_CXX" != x; then
29294        CXX=$POTENTIAL_CXX
29295      else
29296        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29297      fi
29298    else
29299      # Otherwise it might already be a complete path
29300      if test ! -x "$CXX"; then
29301        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29302      fi
29303    fi
29304  else
29305    # No user supplied value. Locate compiler ourselves.
29306
29307    # If we are cross compiling, assume cross compilation tools follows the
29308    # cross compilation standard where they are prefixed with the autoconf
29309    # standard name for the target. For example the binary
29310    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29311    # If we are not cross compiling, then the default compiler name will be
29312    # used.
29313
29314    CXX=
29315    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29316    # before checking the rest of the PATH.
29317    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29318    # step, this should not be necessary.
29319    if test -n "$TOOLCHAIN_PATH"; then
29320      PATH_save="$PATH"
29321      PATH="$TOOLCHAIN_PATH"
29322      for ac_prog in $SEARCH_LIST
29323do
29324  # Extract the first word of "$ac_prog", so it can be a program name with args.
29325set dummy $ac_prog; ac_word=$2
29326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29327$as_echo_n "checking for $ac_word... " >&6; }
29328if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29329  $as_echo_n "(cached) " >&6
29330else
29331  case $TOOLCHAIN_PATH_CXX in
29332  [\\/]* | ?:[\\/]*)
29333  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29334  ;;
29335  *)
29336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29337for as_dir in $PATH
29338do
29339  IFS=$as_save_IFS
29340  test -z "$as_dir" && as_dir=.
29341    for ac_exec_ext in '' $ac_executable_extensions; do
29342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29343    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29345    break 2
29346  fi
29347done
29348  done
29349IFS=$as_save_IFS
29350
29351  ;;
29352esac
29353fi
29354TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29355if test -n "$TOOLCHAIN_PATH_CXX"; then
29356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29357$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29358else
29359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29360$as_echo "no" >&6; }
29361fi
29362
29363
29364  test -n "$TOOLCHAIN_PATH_CXX" && break
29365done
29366
29367      CXX=$TOOLCHAIN_PATH_CXX
29368      PATH="$PATH_save"
29369    fi
29370
29371    # AC_PATH_PROGS can't be run multiple times with the same variable,
29372    # so create a new name for this run.
29373    if test "x$CXX" = x; then
29374      for ac_prog in $SEARCH_LIST
29375do
29376  # Extract the first word of "$ac_prog", so it can be a program name with args.
29377set dummy $ac_prog; ac_word=$2
29378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29379$as_echo_n "checking for $ac_word... " >&6; }
29380if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29381  $as_echo_n "(cached) " >&6
29382else
29383  case $POTENTIAL_CXX in
29384  [\\/]* | ?:[\\/]*)
29385  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29386  ;;
29387  *)
29388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29389for as_dir in $PATH
29390do
29391  IFS=$as_save_IFS
29392  test -z "$as_dir" && as_dir=.
29393    for ac_exec_ext in '' $ac_executable_extensions; do
29394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29395    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29397    break 2
29398  fi
29399done
29400  done
29401IFS=$as_save_IFS
29402
29403  ;;
29404esac
29405fi
29406POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29407if test -n "$POTENTIAL_CXX"; then
29408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29409$as_echo "$POTENTIAL_CXX" >&6; }
29410else
29411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29412$as_echo "no" >&6; }
29413fi
29414
29415
29416  test -n "$POTENTIAL_CXX" && break
29417done
29418
29419      CXX=$POTENTIAL_CXX
29420    fi
29421
29422    if test "x$CXX" = x; then
29423
29424  # Print a helpful message on how to acquire the necessary build dependency.
29425  # devkit is the help tag: freetype, cups, pulse, alsa etc
29426  MISSING_DEPENDENCY=devkit
29427
29428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29429    cygwin_help $MISSING_DEPENDENCY
29430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29431    msys_help $MISSING_DEPENDENCY
29432  else
29433    PKGHANDLER_COMMAND=
29434
29435    case $PKGHANDLER in
29436      apt-get)
29437        apt_help     $MISSING_DEPENDENCY ;;
29438      yum)
29439        yum_help     $MISSING_DEPENDENCY ;;
29440      port)
29441        port_help    $MISSING_DEPENDENCY ;;
29442      pkgutil)
29443        pkgutil_help $MISSING_DEPENDENCY ;;
29444      pkgadd)
29445        pkgadd_help  $MISSING_DEPENDENCY ;;
29446    esac
29447
29448    if test "x$PKGHANDLER_COMMAND" != x; then
29449      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29450    fi
29451  fi
29452
29453      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29454    fi
29455  fi
29456
29457  # Now we have a compiler binary in CXX. Make sure it's okay.
29458
29459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29460
29461  # First separate the path from the arguments. This will split at the first
29462  # space.
29463  complete="$CXX"
29464  path="${complete%% *}"
29465  tmp="$complete EOL"
29466  arguments="${tmp#* }"
29467
29468  # Input might be given as Windows format, start by converting to
29469  # unix format.
29470  new_path=`$CYGPATH -u "$path"`
29471
29472  # Now try to locate executable using which
29473  new_path=`$WHICH "$new_path" 2> /dev/null`
29474  # bat and cmd files are not always considered executable in cygwin causing which
29475  # to not find them
29476  if test "x$new_path" = x \
29477      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29478      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29479    new_path=`$CYGPATH -u "$path"`
29480  fi
29481  if test "x$new_path" = x; then
29482    # Oops. Which didn't find the executable.
29483    # The splitting of arguments from the executable at a space might have been incorrect,
29484    # since paths with space are more likely in Windows. Give it another try with the whole
29485    # argument.
29486    path="$complete"
29487    arguments="EOL"
29488    new_path=`$CYGPATH -u "$path"`
29489    new_path=`$WHICH "$new_path" 2> /dev/null`
29490    # bat and cmd files are not always considered executable in cygwin causing which
29491    # to not find them
29492    if test "x$new_path" = x \
29493        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29494        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29495      new_path=`$CYGPATH -u "$path"`
29496    fi
29497    if test "x$new_path" = x; then
29498      # It's still not found. Now this is an unrecoverable error.
29499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29500$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29501      has_space=`$ECHO "$complete" | $GREP " "`
29502      if test "x$has_space" != x; then
29503        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29504$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29505      fi
29506      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29507    fi
29508  fi
29509
29510  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29511  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29512  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29513  # "foo.exe" is OK but "foo" is an error.
29514  #
29515  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29516  # It is also a way to make sure we got the proper file name for the real test later on.
29517  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29518  if test "x$test_shortpath" = x; then
29519    # Short path failed, file does not exist as specified.
29520    # Try adding .exe or .cmd
29521    if test -f "${new_path}.exe"; then
29522      input_to_shortpath="${new_path}.exe"
29523    elif test -f "${new_path}.cmd"; then
29524      input_to_shortpath="${new_path}.cmd"
29525    else
29526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29527$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29528      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29529$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29530      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29531    fi
29532  else
29533    input_to_shortpath="$new_path"
29534  fi
29535
29536  # Call helper function which possibly converts this using DOS-style short mode.
29537  # If so, the updated path is stored in $new_path.
29538  new_path="$input_to_shortpath"
29539
29540  input_path="$input_to_shortpath"
29541  # Check if we need to convert this using DOS-style short mode. If the path
29542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29543  # take no chances and rewrite it.
29544  # Note: m4 eats our [], so we need to use [ and ] instead.
29545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29546  if test "x$has_forbidden_chars" != x; then
29547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29548    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29549    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29550    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29551      # Going to short mode and back again did indeed matter. Since short mode is
29552      # case insensitive, let's make it lowercase to improve readability.
29553      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29554      # Now convert it back to Unix-stile (cygpath)
29555      input_path=`$CYGPATH -u "$shortmode_path"`
29556      new_path="$input_path"
29557    fi
29558  fi
29559
29560  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29561  if test "x$test_cygdrive_prefix" = x; then
29562    # As a simple fix, exclude /usr/bin since it's not a real path.
29563    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29564      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29565      # a path prefixed by /cygdrive for fixpath to work.
29566      new_path="$CYGWIN_ROOT_PATH$input_path"
29567    fi
29568  fi
29569
29570  # remove trailing .exe if any
29571  new_path="${new_path/%.exe/}"
29572
29573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29574
29575  # First separate the path from the arguments. This will split at the first
29576  # space.
29577  complete="$CXX"
29578  path="${complete%% *}"
29579  tmp="$complete EOL"
29580  arguments="${tmp#* }"
29581
29582  # Input might be given as Windows format, start by converting to
29583  # unix format.
29584  new_path="$path"
29585
29586  windows_path="$new_path"
29587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29588    unix_path=`$CYGPATH -u "$windows_path"`
29589    new_path="$unix_path"
29590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29592    new_path="$unix_path"
29593  fi
29594
29595
29596  # Now try to locate executable using which
29597  new_path=`$WHICH "$new_path" 2> /dev/null`
29598
29599  if test "x$new_path" = x; then
29600    # Oops. Which didn't find the executable.
29601    # The splitting of arguments from the executable at a space might have been incorrect,
29602    # since paths with space are more likely in Windows. Give it another try with the whole
29603    # argument.
29604    path="$complete"
29605    arguments="EOL"
29606    new_path="$path"
29607
29608  windows_path="$new_path"
29609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29610    unix_path=`$CYGPATH -u "$windows_path"`
29611    new_path="$unix_path"
29612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29614    new_path="$unix_path"
29615  fi
29616
29617
29618    new_path=`$WHICH "$new_path" 2> /dev/null`
29619
29620    if test "x$new_path" = x; then
29621      # It's still not found. Now this is an unrecoverable error.
29622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29623$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29624      has_space=`$ECHO "$complete" | $GREP " "`
29625      if test "x$has_space" != x; then
29626        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29627$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29628      fi
29629      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29630    fi
29631  fi
29632
29633  # Now new_path has a complete unix path to the binary
29634  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29635    # Keep paths in /bin as-is, but remove trailing .exe if any
29636    new_path="${new_path/%.exe/}"
29637    # Do not save /bin paths to all_fixpath_prefixes!
29638  else
29639    # Not in mixed or Windows style, start by that.
29640    new_path=`cmd //c echo $new_path`
29641
29642  input_path="$new_path"
29643  # Check if we need to convert this using DOS-style short mode. If the path
29644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29645  # take no chances and rewrite it.
29646  # Note: m4 eats our [], so we need to use [ and ] instead.
29647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29648  if test "x$has_forbidden_chars" != x; then
29649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29650    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29651  fi
29652
29653    # Output is in $new_path
29654
29655  windows_path="$new_path"
29656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29657    unix_path=`$CYGPATH -u "$windows_path"`
29658    new_path="$unix_path"
29659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29661    new_path="$unix_path"
29662  fi
29663
29664    # remove trailing .exe if any
29665    new_path="${new_path/%.exe/}"
29666
29667    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29668    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29669  fi
29670
29671  else
29672    # We're on a posix platform. Hooray! :)
29673    # First separate the path from the arguments. This will split at the first
29674    # space.
29675    complete="$CXX"
29676    path="${complete%% *}"
29677    tmp="$complete EOL"
29678    arguments="${tmp#* }"
29679
29680    # Cannot rely on the command "which" here since it doesn't always work.
29681    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29682    if test -z "$is_absolute_path"; then
29683      # Path to executable is not absolute. Find it.
29684      IFS_save="$IFS"
29685      IFS=:
29686      for p in $PATH; do
29687        if test -f "$p/$path" && test -x "$p/$path"; then
29688          new_path="$p/$path"
29689          break
29690        fi
29691      done
29692      IFS="$IFS_save"
29693    else
29694      # This is an absolute path, we can use it without further modifications.
29695      new_path="$path"
29696    fi
29697
29698    if test "x$new_path" = x; then
29699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29700$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29701      has_space=`$ECHO "$complete" | $GREP " "`
29702      if test "x$has_space" != x; then
29703        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29704$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29705      fi
29706      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29707    fi
29708  fi
29709
29710  # Now join together the path and the arguments once again
29711  if test "x$arguments" != xEOL; then
29712    new_complete="$new_path ${arguments% *}"
29713  else
29714    new_complete="$new_path"
29715  fi
29716
29717  if test "x$complete" != "x$new_complete"; then
29718    CXX="$new_complete"
29719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29720$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29721  fi
29722
29723  TEST_COMPILER="$CXX"
29724  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29725  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29726  if test "x$OPENJDK_BUILD_OS" != xaix; then
29727    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29728    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29729$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29730
29731  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29732    # Follow a chain of symbolic links. Use readlink
29733    # where it exists, else fall back to horribly
29734    # complicated shell code.
29735    if test "x$READLINK_TESTED" != yes; then
29736      # On MacOSX there is a readlink tool with a different
29737      # purpose than the GNU readlink tool. Check the found readlink.
29738      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29739      if test "x$ISGNU" = x; then
29740        # A readlink that we do not know how to use.
29741        # Are there other non-GNU readlinks out there?
29742        READLINK_TESTED=yes
29743        READLINK=
29744      fi
29745    fi
29746
29747    if test "x$READLINK" != x; then
29748      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29749    else
29750      # Save the current directory for restoring afterwards
29751      STARTDIR=$PWD
29752      COUNTER=0
29753      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29754      sym_link_file=`$BASENAME $TEST_COMPILER`
29755      cd $sym_link_dir
29756      # Use -P flag to resolve symlinks in directories.
29757      cd `$THEPWDCMD -P`
29758      sym_link_dir=`$THEPWDCMD -P`
29759      # Resolve file symlinks
29760      while test $COUNTER -lt 20; do
29761        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29762        if test "x$ISLINK" == x; then
29763          # This is not a symbolic link! We are done!
29764          break
29765        fi
29766        # Again resolve directory symlinks since the target of the just found
29767        # link could be in a different directory
29768        cd `$DIRNAME $ISLINK`
29769        sym_link_dir=`$THEPWDCMD -P`
29770        sym_link_file=`$BASENAME $ISLINK`
29771        let COUNTER=COUNTER+1
29772      done
29773      cd $STARTDIR
29774      TEST_COMPILER=$sym_link_dir/$sym_link_file
29775    fi
29776  fi
29777
29778    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29779$as_echo "$TEST_COMPILER" >&6; }
29780  fi
29781  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29782$as_echo_n "checking if CXX is disguised ccache... " >&6; }
29783
29784  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29785  if test "x$COMPILER_BASENAME" = "xccache"; then
29786    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29787$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29788    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29789    # We want to control ccache invocation ourselves, so ignore this cc and try
29790    # searching again.
29791
29792    # Remove the path to the fake ccache cc from the PATH
29793    RETRY_COMPILER_SAVED_PATH="$PATH"
29794    COMPILER_DIRNAME=`$DIRNAME $CXX`
29795    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29796
29797    # Try again looking for our compiler
29798    if test -n "$ac_tool_prefix"; then
29799  for ac_prog in $TOOLCHAIN_CXX_BINARY
29800  do
29801    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29802set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29804$as_echo_n "checking for $ac_word... " >&6; }
29805if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29806  $as_echo_n "(cached) " >&6
29807else
29808  if test -n "$PROPER_COMPILER_CXX"; then
29809  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29810else
29811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29812for as_dir in $PATH
29813do
29814  IFS=$as_save_IFS
29815  test -z "$as_dir" && as_dir=.
29816    for ac_exec_ext in '' $ac_executable_extensions; do
29817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29818    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29820    break 2
29821  fi
29822done
29823  done
29824IFS=$as_save_IFS
29825
29826fi
29827fi
29828PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29829if test -n "$PROPER_COMPILER_CXX"; then
29830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29831$as_echo "$PROPER_COMPILER_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 "$PROPER_COMPILER_CXX" && break
29839  done
29840fi
29841if test -z "$PROPER_COMPILER_CXX"; then
29842  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29843  for ac_prog in $TOOLCHAIN_CXX_BINARY
29844do
29845  # Extract the first word of "$ac_prog", so it can be a program name with args.
29846set dummy $ac_prog; ac_word=$2
29847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29848$as_echo_n "checking for $ac_word... " >&6; }
29849if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29850  $as_echo_n "(cached) " >&6
29851else
29852  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29853  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29854else
29855as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29856for as_dir in $PATH
29857do
29858  IFS=$as_save_IFS
29859  test -z "$as_dir" && as_dir=.
29860    for ac_exec_ext in '' $ac_executable_extensions; do
29861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29862    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29864    break 2
29865  fi
29866done
29867  done
29868IFS=$as_save_IFS
29869
29870fi
29871fi
29872ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29873if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29875$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29876else
29877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29878$as_echo "no" >&6; }
29879fi
29880
29881
29882  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29883done
29884
29885  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29886    PROPER_COMPILER_CXX=""
29887  else
29888    case $cross_compiling:$ac_tool_warned in
29889yes:)
29890{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29891$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29892ac_tool_warned=yes ;;
29893esac
29894    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29895  fi
29896fi
29897
29898
29899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29900
29901  # First separate the path from the arguments. This will split at the first
29902  # space.
29903  complete="$PROPER_COMPILER_CXX"
29904  path="${complete%% *}"
29905  tmp="$complete EOL"
29906  arguments="${tmp#* }"
29907
29908  # Input might be given as Windows format, start by converting to
29909  # unix format.
29910  new_path=`$CYGPATH -u "$path"`
29911
29912  # Now try to locate executable using which
29913  new_path=`$WHICH "$new_path" 2> /dev/null`
29914  # bat and cmd files are not always considered executable in cygwin causing which
29915  # to not find them
29916  if test "x$new_path" = x \
29917      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29918      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29919    new_path=`$CYGPATH -u "$path"`
29920  fi
29921  if test "x$new_path" = x; then
29922    # Oops. Which didn't find the executable.
29923    # The splitting of arguments from the executable at a space might have been incorrect,
29924    # since paths with space are more likely in Windows. Give it another try with the whole
29925    # argument.
29926    path="$complete"
29927    arguments="EOL"
29928    new_path=`$CYGPATH -u "$path"`
29929    new_path=`$WHICH "$new_path" 2> /dev/null`
29930    # bat and cmd files are not always considered executable in cygwin causing which
29931    # to not find them
29932    if test "x$new_path" = x \
29933        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29934        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29935      new_path=`$CYGPATH -u "$path"`
29936    fi
29937    if test "x$new_path" = x; then
29938      # It's still not found. Now this is an unrecoverable error.
29939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29940$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29941      has_space=`$ECHO "$complete" | $GREP " "`
29942      if test "x$has_space" != x; then
29943        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29944$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29945      fi
29946      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29947    fi
29948  fi
29949
29950  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29951  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29952  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29953  # "foo.exe" is OK but "foo" is an error.
29954  #
29955  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29956  # It is also a way to make sure we got the proper file name for the real test later on.
29957  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29958  if test "x$test_shortpath" = x; then
29959    # Short path failed, file does not exist as specified.
29960    # Try adding .exe or .cmd
29961    if test -f "${new_path}.exe"; then
29962      input_to_shortpath="${new_path}.exe"
29963    elif test -f "${new_path}.cmd"; then
29964      input_to_shortpath="${new_path}.cmd"
29965    else
29966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
29967$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
29968      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29969$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29970      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29971    fi
29972  else
29973    input_to_shortpath="$new_path"
29974  fi
29975
29976  # Call helper function which possibly converts this using DOS-style short mode.
29977  # If so, the updated path is stored in $new_path.
29978  new_path="$input_to_shortpath"
29979
29980  input_path="$input_to_shortpath"
29981  # Check if we need to convert this using DOS-style short mode. If the path
29982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29983  # take no chances and rewrite it.
29984  # Note: m4 eats our [], so we need to use [ and ] instead.
29985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29986  if test "x$has_forbidden_chars" != x; then
29987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29991      # Going to short mode and back again did indeed matter. Since short mode is
29992      # case insensitive, let's make it lowercase to improve readability.
29993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29994      # Now convert it back to Unix-stile (cygpath)
29995      input_path=`$CYGPATH -u "$shortmode_path"`
29996      new_path="$input_path"
29997    fi
29998  fi
29999
30000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30001  if test "x$test_cygdrive_prefix" = x; then
30002    # As a simple fix, exclude /usr/bin since it's not a real path.
30003    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30005      # a path prefixed by /cygdrive for fixpath to work.
30006      new_path="$CYGWIN_ROOT_PATH$input_path"
30007    fi
30008  fi
30009
30010  # remove trailing .exe if any
30011  new_path="${new_path/%.exe/}"
30012
30013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30014
30015  # First separate the path from the arguments. This will split at the first
30016  # space.
30017  complete="$PROPER_COMPILER_CXX"
30018  path="${complete%% *}"
30019  tmp="$complete EOL"
30020  arguments="${tmp#* }"
30021
30022  # Input might be given as Windows format, start by converting to
30023  # unix format.
30024  new_path="$path"
30025
30026  windows_path="$new_path"
30027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30028    unix_path=`$CYGPATH -u "$windows_path"`
30029    new_path="$unix_path"
30030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30032    new_path="$unix_path"
30033  fi
30034
30035
30036  # Now try to locate executable using which
30037  new_path=`$WHICH "$new_path" 2> /dev/null`
30038
30039  if test "x$new_path" = x; then
30040    # Oops. Which didn't find the executable.
30041    # The splitting of arguments from the executable at a space might have been incorrect,
30042    # since paths with space are more likely in Windows. Give it another try with the whole
30043    # argument.
30044    path="$complete"
30045    arguments="EOL"
30046    new_path="$path"
30047
30048  windows_path="$new_path"
30049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30050    unix_path=`$CYGPATH -u "$windows_path"`
30051    new_path="$unix_path"
30052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30054    new_path="$unix_path"
30055  fi
30056
30057
30058    new_path=`$WHICH "$new_path" 2> /dev/null`
30059
30060    if test "x$new_path" = x; then
30061      # It's still not found. Now this is an unrecoverable error.
30062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30063$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30064      has_space=`$ECHO "$complete" | $GREP " "`
30065      if test "x$has_space" != x; then
30066        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30067$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30068      fi
30069      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30070    fi
30071  fi
30072
30073  # Now new_path has a complete unix path to the binary
30074  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30075    # Keep paths in /bin as-is, but remove trailing .exe if any
30076    new_path="${new_path/%.exe/}"
30077    # Do not save /bin paths to all_fixpath_prefixes!
30078  else
30079    # Not in mixed or Windows style, start by that.
30080    new_path=`cmd //c echo $new_path`
30081
30082  input_path="$new_path"
30083  # Check if we need to convert this using DOS-style short mode. If the path
30084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30085  # take no chances and rewrite it.
30086  # Note: m4 eats our [], so we need to use [ and ] instead.
30087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30088  if test "x$has_forbidden_chars" != x; then
30089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30091  fi
30092
30093    # Output is in $new_path
30094
30095  windows_path="$new_path"
30096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30097    unix_path=`$CYGPATH -u "$windows_path"`
30098    new_path="$unix_path"
30099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30101    new_path="$unix_path"
30102  fi
30103
30104    # remove trailing .exe if any
30105    new_path="${new_path/%.exe/}"
30106
30107    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30108    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30109  fi
30110
30111  else
30112    # We're on a posix platform. Hooray! :)
30113    # First separate the path from the arguments. This will split at the first
30114    # space.
30115    complete="$PROPER_COMPILER_CXX"
30116    path="${complete%% *}"
30117    tmp="$complete EOL"
30118    arguments="${tmp#* }"
30119
30120    # Cannot rely on the command "which" here since it doesn't always work.
30121    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30122    if test -z "$is_absolute_path"; then
30123      # Path to executable is not absolute. Find it.
30124      IFS_save="$IFS"
30125      IFS=:
30126      for p in $PATH; do
30127        if test -f "$p/$path" && test -x "$p/$path"; then
30128          new_path="$p/$path"
30129          break
30130        fi
30131      done
30132      IFS="$IFS_save"
30133    else
30134      # This is an absolute path, we can use it without further modifications.
30135      new_path="$path"
30136    fi
30137
30138    if test "x$new_path" = x; then
30139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30140$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30141      has_space=`$ECHO "$complete" | $GREP " "`
30142      if test "x$has_space" != x; then
30143        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30144$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30145      fi
30146      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30147    fi
30148  fi
30149
30150  # Now join together the path and the arguments once again
30151  if test "x$arguments" != xEOL; then
30152    new_complete="$new_path ${arguments% *}"
30153  else
30154    new_complete="$new_path"
30155  fi
30156
30157  if test "x$complete" != "x$new_complete"; then
30158    PROPER_COMPILER_CXX="$new_complete"
30159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30160$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30161  fi
30162
30163    PATH="$RETRY_COMPILER_SAVED_PATH"
30164
30165    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30166$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30167
30168  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30169    # Follow a chain of symbolic links. Use readlink
30170    # where it exists, else fall back to horribly
30171    # complicated shell code.
30172    if test "x$READLINK_TESTED" != yes; then
30173      # On MacOSX there is a readlink tool with a different
30174      # purpose than the GNU readlink tool. Check the found readlink.
30175      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30176      if test "x$ISGNU" = x; then
30177        # A readlink that we do not know how to use.
30178        # Are there other non-GNU readlinks out there?
30179        READLINK_TESTED=yes
30180        READLINK=
30181      fi
30182    fi
30183
30184    if test "x$READLINK" != x; then
30185      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30186    else
30187      # Save the current directory for restoring afterwards
30188      STARTDIR=$PWD
30189      COUNTER=0
30190      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30191      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30192      cd $sym_link_dir
30193      # Use -P flag to resolve symlinks in directories.
30194      cd `$THEPWDCMD -P`
30195      sym_link_dir=`$THEPWDCMD -P`
30196      # Resolve file symlinks
30197      while test $COUNTER -lt 20; do
30198        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30199        if test "x$ISLINK" == x; then
30200          # This is not a symbolic link! We are done!
30201          break
30202        fi
30203        # Again resolve directory symlinks since the target of the just found
30204        # link could be in a different directory
30205        cd `$DIRNAME $ISLINK`
30206        sym_link_dir=`$THEPWDCMD -P`
30207        sym_link_file=`$BASENAME $ISLINK`
30208        let COUNTER=COUNTER+1
30209      done
30210      cd $STARTDIR
30211      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30212    fi
30213  fi
30214
30215    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30216$as_echo "$PROPER_COMPILER_CXX" >&6; }
30217    CXX="$PROPER_COMPILER_CXX"
30218  else
30219    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30220$as_echo "no, keeping CXX" >&6; }
30221  fi
30222
30223
30224  COMPILER=$CXX
30225  COMPILER_NAME=$COMPILER_NAME
30226
30227  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30228    # cc -V output typically looks like
30229    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30230    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30231    # Check that this is likely to be the Solaris Studio cc.
30232    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30233    if test $? -ne 0; then
30234      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30235      { $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
30236$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30237      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30238$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30239      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30240$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30241      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30242    fi
30243    # Remove usage instructions (if present), and
30244    # collapse compiler output into a single line
30245    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30246        $SED -e 's/ *[Uu]sage:.*//'`
30247    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30248        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30249  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30250    # xlc -qversion output typically looks like
30251    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30252    #     Version: 11.01.0000.0015
30253    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30254    # Check that this is likely to be the IBM XL C compiler.
30255    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30256    if test $? -ne 0; then
30257      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30258      { $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
30259$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30260      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30261$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30262      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30263$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30264      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30265    fi
30266    # Collapse compiler output into a single line
30267    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30268    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30269        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30270  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30271    # There is no specific version flag, but all output starts with a version string.
30272    # First line typically looks something like:
30273    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30274    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30275    # Check that this is likely to be Microsoft CL.EXE.
30276    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30277    if test $? -ne 0; then
30278      { $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
30279$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30280      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30281$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30282      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30283    fi
30284    # Collapse compiler output into a single line
30285    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30286    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30287        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30288  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30289    # gcc --version output typically looks like
30290    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30291    #     Copyright (C) 2013 Free Software Foundation, Inc.
30292    #     This is free software; see the source for copying conditions.  There is NO
30293    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30294    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30295    # Check that this is likely to be GCC.
30296    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30297    if test $? -ne 0; then
30298      { $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
30299$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30300      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30301$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30302      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30303    fi
30304    # Remove Copyright and legalese from version string, and
30305    # collapse into a single line
30306    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30307        $SED -e 's/ *Copyright .*//'`
30308    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30309        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30310  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30311    # clang --version output typically looks like
30312    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30313    #    clang version 3.3 (tags/RELEASE_33/final)
30314    # or
30315    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30316    #    Target: x86_64-pc-linux-gnu
30317    #    Thread model: posix
30318    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30319    # Check that this is likely to be clang
30320    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30321    if test $? -ne 0; then
30322      { $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
30323$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30324      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30325$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30326      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30327    fi
30328    # Collapse compiler output into a single line
30329    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30330    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30331        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30332  else
30333      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30334  fi
30335  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30336  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30337  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30338  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30339
30340  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30341$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30342
30343
30344  # Now that we have resolved CXX ourself, let autoconf have its go at it
30345  ac_ext=cpp
30346ac_cpp='$CXXCPP $CPPFLAGS'
30347ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30348ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30349ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30350if test -z "$CXX"; then
30351  if test -n "$CCC"; then
30352    CXX=$CCC
30353  else
30354    if test -n "$ac_tool_prefix"; then
30355  for ac_prog in $CXX
30356  do
30357    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30358set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30360$as_echo_n "checking for $ac_word... " >&6; }
30361if ${ac_cv_prog_CXX+:} false; then :
30362  $as_echo_n "(cached) " >&6
30363else
30364  if test -n "$CXX"; then
30365  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30366else
30367as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30368for as_dir in $PATH
30369do
30370  IFS=$as_save_IFS
30371  test -z "$as_dir" && as_dir=.
30372    for ac_exec_ext in '' $ac_executable_extensions; do
30373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30374    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30376    break 2
30377  fi
30378done
30379  done
30380IFS=$as_save_IFS
30381
30382fi
30383fi
30384CXX=$ac_cv_prog_CXX
30385if test -n "$CXX"; then
30386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30387$as_echo "$CXX" >&6; }
30388else
30389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30390$as_echo "no" >&6; }
30391fi
30392
30393
30394    test -n "$CXX" && break
30395  done
30396fi
30397if test -z "$CXX"; then
30398  ac_ct_CXX=$CXX
30399  for ac_prog in $CXX
30400do
30401  # Extract the first word of "$ac_prog", so it can be a program name with args.
30402set dummy $ac_prog; ac_word=$2
30403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30404$as_echo_n "checking for $ac_word... " >&6; }
30405if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30406  $as_echo_n "(cached) " >&6
30407else
30408  if test -n "$ac_ct_CXX"; then
30409  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30410else
30411as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30412for as_dir in $PATH
30413do
30414  IFS=$as_save_IFS
30415  test -z "$as_dir" && as_dir=.
30416    for ac_exec_ext in '' $ac_executable_extensions; do
30417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30418    ac_cv_prog_ac_ct_CXX="$ac_prog"
30419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30420    break 2
30421  fi
30422done
30423  done
30424IFS=$as_save_IFS
30425
30426fi
30427fi
30428ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30429if test -n "$ac_ct_CXX"; then
30430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30431$as_echo "$ac_ct_CXX" >&6; }
30432else
30433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30434$as_echo "no" >&6; }
30435fi
30436
30437
30438  test -n "$ac_ct_CXX" && break
30439done
30440
30441  if test "x$ac_ct_CXX" = x; then
30442    CXX="g++"
30443  else
30444    case $cross_compiling:$ac_tool_warned in
30445yes:)
30446{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30447$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30448ac_tool_warned=yes ;;
30449esac
30450    CXX=$ac_ct_CXX
30451  fi
30452fi
30453
30454  fi
30455fi
30456# Provide some information about the compiler.
30457$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30458set X $ac_compile
30459ac_compiler=$2
30460for ac_option in --version -v -V -qversion; do
30461  { { ac_try="$ac_compiler $ac_option >&5"
30462case "(($ac_try" in
30463  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30464  *) ac_try_echo=$ac_try;;
30465esac
30466eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30467$as_echo "$ac_try_echo"; } >&5
30468  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30469  ac_status=$?
30470  if test -s conftest.err; then
30471    sed '10a\
30472... rest of stderr output deleted ...
30473         10q' conftest.err >conftest.er1
30474    cat conftest.er1 >&5
30475  fi
30476  rm -f conftest.er1 conftest.err
30477  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30478  test $ac_status = 0; }
30479done
30480
30481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30482$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30483if ${ac_cv_cxx_compiler_gnu+:} false; then :
30484  $as_echo_n "(cached) " >&6
30485else
30486  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30487/* end confdefs.h.  */
30488
30489int
30490main ()
30491{
30492#ifndef __GNUC__
30493       choke me
30494#endif
30495
30496  ;
30497  return 0;
30498}
30499_ACEOF
30500if ac_fn_cxx_try_compile "$LINENO"; then :
30501  ac_compiler_gnu=yes
30502else
30503  ac_compiler_gnu=no
30504fi
30505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30506ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30507
30508fi
30509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30510$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30511if test $ac_compiler_gnu = yes; then
30512  GXX=yes
30513else
30514  GXX=
30515fi
30516ac_test_CXXFLAGS=${CXXFLAGS+set}
30517ac_save_CXXFLAGS=$CXXFLAGS
30518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30519$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30520if ${ac_cv_prog_cxx_g+:} false; then :
30521  $as_echo_n "(cached) " >&6
30522else
30523  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30524   ac_cxx_werror_flag=yes
30525   ac_cv_prog_cxx_g=no
30526   CXXFLAGS="-g"
30527   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30528/* end confdefs.h.  */
30529
30530int
30531main ()
30532{
30533
30534  ;
30535  return 0;
30536}
30537_ACEOF
30538if ac_fn_cxx_try_compile "$LINENO"; then :
30539  ac_cv_prog_cxx_g=yes
30540else
30541  CXXFLAGS=""
30542      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30543/* end confdefs.h.  */
30544
30545int
30546main ()
30547{
30548
30549  ;
30550  return 0;
30551}
30552_ACEOF
30553if ac_fn_cxx_try_compile "$LINENO"; then :
30554
30555else
30556  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30557	 CXXFLAGS="-g"
30558	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30559/* end confdefs.h.  */
30560
30561int
30562main ()
30563{
30564
30565  ;
30566  return 0;
30567}
30568_ACEOF
30569if ac_fn_cxx_try_compile "$LINENO"; then :
30570  ac_cv_prog_cxx_g=yes
30571fi
30572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30573fi
30574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30575fi
30576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30577   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30578fi
30579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30580$as_echo "$ac_cv_prog_cxx_g" >&6; }
30581if test "$ac_test_CXXFLAGS" = set; then
30582  CXXFLAGS=$ac_save_CXXFLAGS
30583elif test $ac_cv_prog_cxx_g = yes; then
30584  if test "$GXX" = yes; then
30585    CXXFLAGS="-g -O2"
30586  else
30587    CXXFLAGS="-g"
30588  fi
30589else
30590  if test "$GXX" = yes; then
30591    CXXFLAGS="-O2"
30592  else
30593    CXXFLAGS=
30594  fi
30595fi
30596ac_ext=cpp
30597ac_cpp='$CXXCPP $CPPFLAGS'
30598ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30599ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30600ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30601
30602
30603  #
30604  # Setup the preprocessor (CPP and CXXCPP)
30605  #
30606  ac_ext=c
30607ac_cpp='$CPP $CPPFLAGS'
30608ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30609ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30610ac_compiler_gnu=$ac_cv_c_compiler_gnu
30611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30612$as_echo_n "checking how to run the C preprocessor... " >&6; }
30613# On Suns, sometimes $CPP names a directory.
30614if test -n "$CPP" && test -d "$CPP"; then
30615  CPP=
30616fi
30617if test -z "$CPP"; then
30618  if ${ac_cv_prog_CPP+:} false; then :
30619  $as_echo_n "(cached) " >&6
30620else
30621      # Double quotes because CPP needs to be expanded
30622    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30623    do
30624      ac_preproc_ok=false
30625for ac_c_preproc_warn_flag in '' yes
30626do
30627  # Use a header file that comes with gcc, so configuring glibc
30628  # with a fresh cross-compiler works.
30629  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30630  # <limits.h> exists even on freestanding compilers.
30631  # On the NeXT, cc -E runs the code through the compiler's parser,
30632  # not just through cpp. "Syntax error" is here to catch this case.
30633  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30634/* end confdefs.h.  */
30635#ifdef __STDC__
30636# include <limits.h>
30637#else
30638# include <assert.h>
30639#endif
30640		     Syntax error
30641_ACEOF
30642if ac_fn_c_try_cpp "$LINENO"; then :
30643
30644else
30645  # Broken: fails on valid input.
30646continue
30647fi
30648rm -f conftest.err conftest.i conftest.$ac_ext
30649
30650  # OK, works on sane cases.  Now check whether nonexistent headers
30651  # can be detected and how.
30652  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30653/* end confdefs.h.  */
30654#include <ac_nonexistent.h>
30655_ACEOF
30656if ac_fn_c_try_cpp "$LINENO"; then :
30657  # Broken: success on invalid input.
30658continue
30659else
30660  # Passes both tests.
30661ac_preproc_ok=:
30662break
30663fi
30664rm -f conftest.err conftest.i conftest.$ac_ext
30665
30666done
30667# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30668rm -f conftest.i conftest.err conftest.$ac_ext
30669if $ac_preproc_ok; then :
30670  break
30671fi
30672
30673    done
30674    ac_cv_prog_CPP=$CPP
30675
30676fi
30677  CPP=$ac_cv_prog_CPP
30678else
30679  ac_cv_prog_CPP=$CPP
30680fi
30681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30682$as_echo "$CPP" >&6; }
30683ac_preproc_ok=false
30684for ac_c_preproc_warn_flag in '' yes
30685do
30686  # Use a header file that comes with gcc, so configuring glibc
30687  # with a fresh cross-compiler works.
30688  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30689  # <limits.h> exists even on freestanding compilers.
30690  # On the NeXT, cc -E runs the code through the compiler's parser,
30691  # not just through cpp. "Syntax error" is here to catch this case.
30692  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30693/* end confdefs.h.  */
30694#ifdef __STDC__
30695# include <limits.h>
30696#else
30697# include <assert.h>
30698#endif
30699		     Syntax error
30700_ACEOF
30701if ac_fn_c_try_cpp "$LINENO"; then :
30702
30703else
30704  # Broken: fails on valid input.
30705continue
30706fi
30707rm -f conftest.err conftest.i conftest.$ac_ext
30708
30709  # OK, works on sane cases.  Now check whether nonexistent headers
30710  # can be detected and how.
30711  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30712/* end confdefs.h.  */
30713#include <ac_nonexistent.h>
30714_ACEOF
30715if ac_fn_c_try_cpp "$LINENO"; then :
30716  # Broken: success on invalid input.
30717continue
30718else
30719  # Passes both tests.
30720ac_preproc_ok=:
30721break
30722fi
30723rm -f conftest.err conftest.i conftest.$ac_ext
30724
30725done
30726# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30727rm -f conftest.i conftest.err conftest.$ac_ext
30728if $ac_preproc_ok; then :
30729
30730else
30731  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30732$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30733as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30734See \`config.log' for more details" "$LINENO" 5; }
30735fi
30736
30737ac_ext=cpp
30738ac_cpp='$CXXCPP $CPPFLAGS'
30739ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30740ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30741ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30742
30743
30744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30745
30746  # First separate the path from the arguments. This will split at the first
30747  # space.
30748  complete="$CPP"
30749  path="${complete%% *}"
30750  tmp="$complete EOL"
30751  arguments="${tmp#* }"
30752
30753  # Input might be given as Windows format, start by converting to
30754  # unix format.
30755  new_path=`$CYGPATH -u "$path"`
30756
30757  # Now try to locate executable using which
30758  new_path=`$WHICH "$new_path" 2> /dev/null`
30759  # bat and cmd files are not always considered executable in cygwin causing which
30760  # to not find them
30761  if test "x$new_path" = x \
30762      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30763      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30764    new_path=`$CYGPATH -u "$path"`
30765  fi
30766  if test "x$new_path" = x; then
30767    # Oops. Which didn't find the executable.
30768    # The splitting of arguments from the executable at a space might have been incorrect,
30769    # since paths with space are more likely in Windows. Give it another try with the whole
30770    # argument.
30771    path="$complete"
30772    arguments="EOL"
30773    new_path=`$CYGPATH -u "$path"`
30774    new_path=`$WHICH "$new_path" 2> /dev/null`
30775    # bat and cmd files are not always considered executable in cygwin causing which
30776    # to not find them
30777    if test "x$new_path" = x \
30778        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30779        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30780      new_path=`$CYGPATH -u "$path"`
30781    fi
30782    if test "x$new_path" = x; then
30783      # It's still not found. Now this is an unrecoverable error.
30784      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30785$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30786      has_space=`$ECHO "$complete" | $GREP " "`
30787      if test "x$has_space" != x; then
30788        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30789$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30790      fi
30791      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30792    fi
30793  fi
30794
30795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30798  # "foo.exe" is OK but "foo" is an error.
30799  #
30800  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30801  # It is also a way to make sure we got the proper file name for the real test later on.
30802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30803  if test "x$test_shortpath" = x; then
30804    # Short path failed, file does not exist as specified.
30805    # Try adding .exe or .cmd
30806    if test -f "${new_path}.exe"; then
30807      input_to_shortpath="${new_path}.exe"
30808    elif test -f "${new_path}.cmd"; then
30809      input_to_shortpath="${new_path}.cmd"
30810    else
30811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30812$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30813      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30814$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30815      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30816    fi
30817  else
30818    input_to_shortpath="$new_path"
30819  fi
30820
30821  # Call helper function which possibly converts this using DOS-style short mode.
30822  # If so, the updated path is stored in $new_path.
30823  new_path="$input_to_shortpath"
30824
30825  input_path="$input_to_shortpath"
30826  # Check if we need to convert this using DOS-style short mode. If the path
30827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30828  # take no chances and rewrite it.
30829  # Note: m4 eats our [], so we need to use [ and ] instead.
30830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30831  if test "x$has_forbidden_chars" != x; then
30832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30836      # Going to short mode and back again did indeed matter. Since short mode is
30837      # case insensitive, let's make it lowercase to improve readability.
30838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30839      # Now convert it back to Unix-stile (cygpath)
30840      input_path=`$CYGPATH -u "$shortmode_path"`
30841      new_path="$input_path"
30842    fi
30843  fi
30844
30845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30846  if test "x$test_cygdrive_prefix" = x; then
30847    # As a simple fix, exclude /usr/bin since it's not a real path.
30848    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30850      # a path prefixed by /cygdrive for fixpath to work.
30851      new_path="$CYGWIN_ROOT_PATH$input_path"
30852    fi
30853  fi
30854
30855  # remove trailing .exe if any
30856  new_path="${new_path/%.exe/}"
30857
30858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30859
30860  # First separate the path from the arguments. This will split at the first
30861  # space.
30862  complete="$CPP"
30863  path="${complete%% *}"
30864  tmp="$complete EOL"
30865  arguments="${tmp#* }"
30866
30867  # Input might be given as Windows format, start by converting to
30868  # unix format.
30869  new_path="$path"
30870
30871  windows_path="$new_path"
30872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30873    unix_path=`$CYGPATH -u "$windows_path"`
30874    new_path="$unix_path"
30875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30877    new_path="$unix_path"
30878  fi
30879
30880
30881  # Now try to locate executable using which
30882  new_path=`$WHICH "$new_path" 2> /dev/null`
30883
30884  if test "x$new_path" = x; then
30885    # Oops. Which didn't find the executable.
30886    # The splitting of arguments from the executable at a space might have been incorrect,
30887    # since paths with space are more likely in Windows. Give it another try with the whole
30888    # argument.
30889    path="$complete"
30890    arguments="EOL"
30891    new_path="$path"
30892
30893  windows_path="$new_path"
30894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30895    unix_path=`$CYGPATH -u "$windows_path"`
30896    new_path="$unix_path"
30897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30899    new_path="$unix_path"
30900  fi
30901
30902
30903    new_path=`$WHICH "$new_path" 2> /dev/null`
30904
30905    if test "x$new_path" = x; then
30906      # It's still not found. Now this is an unrecoverable error.
30907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30908$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30909      has_space=`$ECHO "$complete" | $GREP " "`
30910      if test "x$has_space" != x; then
30911        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30912$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30913      fi
30914      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30915    fi
30916  fi
30917
30918  # Now new_path has a complete unix path to the binary
30919  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30920    # Keep paths in /bin as-is, but remove trailing .exe if any
30921    new_path="${new_path/%.exe/}"
30922    # Do not save /bin paths to all_fixpath_prefixes!
30923  else
30924    # Not in mixed or Windows style, start by that.
30925    new_path=`cmd //c echo $new_path`
30926
30927  input_path="$new_path"
30928  # Check if we need to convert this using DOS-style short mode. If the path
30929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30930  # take no chances and rewrite it.
30931  # Note: m4 eats our [], so we need to use [ and ] instead.
30932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30933  if test "x$has_forbidden_chars" != x; then
30934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30935    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30936  fi
30937
30938    # Output is in $new_path
30939
30940  windows_path="$new_path"
30941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30942    unix_path=`$CYGPATH -u "$windows_path"`
30943    new_path="$unix_path"
30944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30946    new_path="$unix_path"
30947  fi
30948
30949    # remove trailing .exe if any
30950    new_path="${new_path/%.exe/}"
30951
30952    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30953    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30954  fi
30955
30956  else
30957    # We're on a posix platform. Hooray! :)
30958    # First separate the path from the arguments. This will split at the first
30959    # space.
30960    complete="$CPP"
30961    path="${complete%% *}"
30962    tmp="$complete EOL"
30963    arguments="${tmp#* }"
30964
30965    # Cannot rely on the command "which" here since it doesn't always work.
30966    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30967    if test -z "$is_absolute_path"; then
30968      # Path to executable is not absolute. Find it.
30969      IFS_save="$IFS"
30970      IFS=:
30971      for p in $PATH; do
30972        if test -f "$p/$path" && test -x "$p/$path"; then
30973          new_path="$p/$path"
30974          break
30975        fi
30976      done
30977      IFS="$IFS_save"
30978    else
30979      # This is an absolute path, we can use it without further modifications.
30980      new_path="$path"
30981    fi
30982
30983    if test "x$new_path" = x; then
30984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30985$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30986      has_space=`$ECHO "$complete" | $GREP " "`
30987      if test "x$has_space" != x; then
30988        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30989$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30990      fi
30991      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30992    fi
30993  fi
30994
30995  # Now join together the path and the arguments once again
30996  if test "x$arguments" != xEOL; then
30997    new_complete="$new_path ${arguments% *}"
30998  else
30999    new_complete="$new_path"
31000  fi
31001
31002  if test "x$complete" != "x$new_complete"; then
31003    CPP="$new_complete"
31004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31005$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31006  fi
31007
31008  ac_ext=cpp
31009ac_cpp='$CXXCPP $CPPFLAGS'
31010ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31011ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31012ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31014$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31015if test -z "$CXXCPP"; then
31016  if ${ac_cv_prog_CXXCPP+:} false; then :
31017  $as_echo_n "(cached) " >&6
31018else
31019      # Double quotes because CXXCPP needs to be expanded
31020    for CXXCPP in "$CXX -E" "/lib/cpp"
31021    do
31022      ac_preproc_ok=false
31023for ac_cxx_preproc_warn_flag in '' yes
31024do
31025  # Use a header file that comes with gcc, so configuring glibc
31026  # with a fresh cross-compiler works.
31027  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31028  # <limits.h> exists even on freestanding compilers.
31029  # On the NeXT, cc -E runs the code through the compiler's parser,
31030  # not just through cpp. "Syntax error" is here to catch this case.
31031  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31032/* end confdefs.h.  */
31033#ifdef __STDC__
31034# include <limits.h>
31035#else
31036# include <assert.h>
31037#endif
31038		     Syntax error
31039_ACEOF
31040if ac_fn_cxx_try_cpp "$LINENO"; then :
31041
31042else
31043  # Broken: fails on valid input.
31044continue
31045fi
31046rm -f conftest.err conftest.i conftest.$ac_ext
31047
31048  # OK, works on sane cases.  Now check whether nonexistent headers
31049  # can be detected and how.
31050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31051/* end confdefs.h.  */
31052#include <ac_nonexistent.h>
31053_ACEOF
31054if ac_fn_cxx_try_cpp "$LINENO"; then :
31055  # Broken: success on invalid input.
31056continue
31057else
31058  # Passes both tests.
31059ac_preproc_ok=:
31060break
31061fi
31062rm -f conftest.err conftest.i conftest.$ac_ext
31063
31064done
31065# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31066rm -f conftest.i conftest.err conftest.$ac_ext
31067if $ac_preproc_ok; then :
31068  break
31069fi
31070
31071    done
31072    ac_cv_prog_CXXCPP=$CXXCPP
31073
31074fi
31075  CXXCPP=$ac_cv_prog_CXXCPP
31076else
31077  ac_cv_prog_CXXCPP=$CXXCPP
31078fi
31079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31080$as_echo "$CXXCPP" >&6; }
31081ac_preproc_ok=false
31082for ac_cxx_preproc_warn_flag in '' yes
31083do
31084  # Use a header file that comes with gcc, so configuring glibc
31085  # with a fresh cross-compiler works.
31086  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31087  # <limits.h> exists even on freestanding compilers.
31088  # On the NeXT, cc -E runs the code through the compiler's parser,
31089  # not just through cpp. "Syntax error" is here to catch this case.
31090  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31091/* end confdefs.h.  */
31092#ifdef __STDC__
31093# include <limits.h>
31094#else
31095# include <assert.h>
31096#endif
31097		     Syntax error
31098_ACEOF
31099if ac_fn_cxx_try_cpp "$LINENO"; then :
31100
31101else
31102  # Broken: fails on valid input.
31103continue
31104fi
31105rm -f conftest.err conftest.i conftest.$ac_ext
31106
31107  # OK, works on sane cases.  Now check whether nonexistent headers
31108  # can be detected and how.
31109  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31110/* end confdefs.h.  */
31111#include <ac_nonexistent.h>
31112_ACEOF
31113if ac_fn_cxx_try_cpp "$LINENO"; then :
31114  # Broken: success on invalid input.
31115continue
31116else
31117  # Passes both tests.
31118ac_preproc_ok=:
31119break
31120fi
31121rm -f conftest.err conftest.i conftest.$ac_ext
31122
31123done
31124# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31125rm -f conftest.i conftest.err conftest.$ac_ext
31126if $ac_preproc_ok; then :
31127
31128else
31129  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31130$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31131as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31132See \`config.log' for more details" "$LINENO" 5; }
31133fi
31134
31135ac_ext=cpp
31136ac_cpp='$CXXCPP $CPPFLAGS'
31137ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31138ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31139ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31140
31141
31142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31143
31144  # First separate the path from the arguments. This will split at the first
31145  # space.
31146  complete="$CXXCPP"
31147  path="${complete%% *}"
31148  tmp="$complete EOL"
31149  arguments="${tmp#* }"
31150
31151  # Input might be given as Windows format, start by converting to
31152  # unix format.
31153  new_path=`$CYGPATH -u "$path"`
31154
31155  # Now try to locate executable using which
31156  new_path=`$WHICH "$new_path" 2> /dev/null`
31157  # bat and cmd files are not always considered executable in cygwin causing which
31158  # to not find them
31159  if test "x$new_path" = x \
31160      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31161      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31162    new_path=`$CYGPATH -u "$path"`
31163  fi
31164  if test "x$new_path" = x; then
31165    # Oops. Which didn't find the executable.
31166    # The splitting of arguments from the executable at a space might have been incorrect,
31167    # since paths with space are more likely in Windows. Give it another try with the whole
31168    # argument.
31169    path="$complete"
31170    arguments="EOL"
31171    new_path=`$CYGPATH -u "$path"`
31172    new_path=`$WHICH "$new_path" 2> /dev/null`
31173    # bat and cmd files are not always considered executable in cygwin causing which
31174    # to not find them
31175    if test "x$new_path" = x \
31176        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31177        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31178      new_path=`$CYGPATH -u "$path"`
31179    fi
31180    if test "x$new_path" = x; then
31181      # It's still not found. Now this is an unrecoverable error.
31182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31183$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31184      has_space=`$ECHO "$complete" | $GREP " "`
31185      if test "x$has_space" != x; then
31186        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31187$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31188      fi
31189      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31190    fi
31191  fi
31192
31193  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31194  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31195  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31196  # "foo.exe" is OK but "foo" is an error.
31197  #
31198  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31199  # It is also a way to make sure we got the proper file name for the real test later on.
31200  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31201  if test "x$test_shortpath" = x; then
31202    # Short path failed, file does not exist as specified.
31203    # Try adding .exe or .cmd
31204    if test -f "${new_path}.exe"; then
31205      input_to_shortpath="${new_path}.exe"
31206    elif test -f "${new_path}.cmd"; then
31207      input_to_shortpath="${new_path}.cmd"
31208    else
31209      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31210$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31211      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31212$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31213      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31214    fi
31215  else
31216    input_to_shortpath="$new_path"
31217  fi
31218
31219  # Call helper function which possibly converts this using DOS-style short mode.
31220  # If so, the updated path is stored in $new_path.
31221  new_path="$input_to_shortpath"
31222
31223  input_path="$input_to_shortpath"
31224  # Check if we need to convert this using DOS-style short mode. If the path
31225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31226  # take no chances and rewrite it.
31227  # Note: m4 eats our [], so we need to use [ and ] instead.
31228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31229  if test "x$has_forbidden_chars" != x; then
31230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31234      # Going to short mode and back again did indeed matter. Since short mode is
31235      # case insensitive, let's make it lowercase to improve readability.
31236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31237      # Now convert it back to Unix-stile (cygpath)
31238      input_path=`$CYGPATH -u "$shortmode_path"`
31239      new_path="$input_path"
31240    fi
31241  fi
31242
31243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31244  if test "x$test_cygdrive_prefix" = x; then
31245    # As a simple fix, exclude /usr/bin since it's not a real path.
31246    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31248      # a path prefixed by /cygdrive for fixpath to work.
31249      new_path="$CYGWIN_ROOT_PATH$input_path"
31250    fi
31251  fi
31252
31253  # remove trailing .exe if any
31254  new_path="${new_path/%.exe/}"
31255
31256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31257
31258  # First separate the path from the arguments. This will split at the first
31259  # space.
31260  complete="$CXXCPP"
31261  path="${complete%% *}"
31262  tmp="$complete EOL"
31263  arguments="${tmp#* }"
31264
31265  # Input might be given as Windows format, start by converting to
31266  # unix format.
31267  new_path="$path"
31268
31269  windows_path="$new_path"
31270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31271    unix_path=`$CYGPATH -u "$windows_path"`
31272    new_path="$unix_path"
31273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31275    new_path="$unix_path"
31276  fi
31277
31278
31279  # Now try to locate executable using which
31280  new_path=`$WHICH "$new_path" 2> /dev/null`
31281
31282  if test "x$new_path" = x; then
31283    # Oops. Which didn't find the executable.
31284    # The splitting of arguments from the executable at a space might have been incorrect,
31285    # since paths with space are more likely in Windows. Give it another try with the whole
31286    # argument.
31287    path="$complete"
31288    arguments="EOL"
31289    new_path="$path"
31290
31291  windows_path="$new_path"
31292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31293    unix_path=`$CYGPATH -u "$windows_path"`
31294    new_path="$unix_path"
31295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31297    new_path="$unix_path"
31298  fi
31299
31300
31301    new_path=`$WHICH "$new_path" 2> /dev/null`
31302
31303    if test "x$new_path" = x; then
31304      # It's still not found. Now this is an unrecoverable error.
31305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31306$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31307      has_space=`$ECHO "$complete" | $GREP " "`
31308      if test "x$has_space" != x; then
31309        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31310$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31311      fi
31312      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31313    fi
31314  fi
31315
31316  # Now new_path has a complete unix path to the binary
31317  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31318    # Keep paths in /bin as-is, but remove trailing .exe if any
31319    new_path="${new_path/%.exe/}"
31320    # Do not save /bin paths to all_fixpath_prefixes!
31321  else
31322    # Not in mixed or Windows style, start by that.
31323    new_path=`cmd //c echo $new_path`
31324
31325  input_path="$new_path"
31326  # Check if we need to convert this using DOS-style short mode. If the path
31327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31328  # take no chances and rewrite it.
31329  # Note: m4 eats our [], so we need to use [ and ] instead.
31330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31331  if test "x$has_forbidden_chars" != x; then
31332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31333    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31334  fi
31335
31336    # Output is in $new_path
31337
31338  windows_path="$new_path"
31339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31340    unix_path=`$CYGPATH -u "$windows_path"`
31341    new_path="$unix_path"
31342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31344    new_path="$unix_path"
31345  fi
31346
31347    # remove trailing .exe if any
31348    new_path="${new_path/%.exe/}"
31349
31350    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31351    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31352  fi
31353
31354  else
31355    # We're on a posix platform. Hooray! :)
31356    # First separate the path from the arguments. This will split at the first
31357    # space.
31358    complete="$CXXCPP"
31359    path="${complete%% *}"
31360    tmp="$complete EOL"
31361    arguments="${tmp#* }"
31362
31363    # Cannot rely on the command "which" here since it doesn't always work.
31364    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31365    if test -z "$is_absolute_path"; then
31366      # Path to executable is not absolute. Find it.
31367      IFS_save="$IFS"
31368      IFS=:
31369      for p in $PATH; do
31370        if test -f "$p/$path" && test -x "$p/$path"; then
31371          new_path="$p/$path"
31372          break
31373        fi
31374      done
31375      IFS="$IFS_save"
31376    else
31377      # This is an absolute path, we can use it without further modifications.
31378      new_path="$path"
31379    fi
31380
31381    if test "x$new_path" = x; then
31382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31383$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31384      has_space=`$ECHO "$complete" | $GREP " "`
31385      if test "x$has_space" != x; then
31386        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31387$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31388      fi
31389      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31390    fi
31391  fi
31392
31393  # Now join together the path and the arguments once again
31394  if test "x$arguments" != xEOL; then
31395    new_complete="$new_path ${arguments% *}"
31396  else
31397    new_complete="$new_path"
31398  fi
31399
31400  if test "x$complete" != "x$new_complete"; then
31401    CXXCPP="$new_complete"
31402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31403$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31404  fi
31405
31406
31407  #
31408  # Setup the linker (LD)
31409  #
31410  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31411    # In the Microsoft toolchain we have a separate LD command "link".
31412    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31413    # a cygwin program for something completely different.
31414    # Extract the first word of "link", so it can be a program name with args.
31415set dummy link; ac_word=$2
31416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31417$as_echo_n "checking for $ac_word... " >&6; }
31418if ${ac_cv_prog_LD+:} false; then :
31419  $as_echo_n "(cached) " >&6
31420else
31421  if test -n "$LD"; then
31422  ac_cv_prog_LD="$LD" # Let the user override the test.
31423else
31424  ac_prog_rejected=no
31425as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31426for as_dir in $PATH
31427do
31428  IFS=$as_save_IFS
31429  test -z "$as_dir" && as_dir=.
31430    for ac_exec_ext in '' $ac_executable_extensions; do
31431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31432    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31433       ac_prog_rejected=yes
31434       continue
31435     fi
31436    ac_cv_prog_LD="link"
31437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31438    break 2
31439  fi
31440done
31441  done
31442IFS=$as_save_IFS
31443
31444if test $ac_prog_rejected = yes; then
31445  # We found a bogon in the path, so make sure we never use it.
31446  set dummy $ac_cv_prog_LD
31447  shift
31448  if test $# != 0; then
31449    # We chose a different compiler from the bogus one.
31450    # However, it has the same basename, so the bogon will be chosen
31451    # first if we set LD to just the basename; use the full file name.
31452    shift
31453    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31454  fi
31455fi
31456fi
31457fi
31458LD=$ac_cv_prog_LD
31459if test -n "$LD"; then
31460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31461$as_echo "$LD" >&6; }
31462else
31463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31464$as_echo "no" >&6; }
31465fi
31466
31467
31468
31469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31470
31471  # First separate the path from the arguments. This will split at the first
31472  # space.
31473  complete="$LD"
31474  path="${complete%% *}"
31475  tmp="$complete EOL"
31476  arguments="${tmp#* }"
31477
31478  # Input might be given as Windows format, start by converting to
31479  # unix format.
31480  new_path=`$CYGPATH -u "$path"`
31481
31482  # Now try to locate executable using which
31483  new_path=`$WHICH "$new_path" 2> /dev/null`
31484  # bat and cmd files are not always considered executable in cygwin causing which
31485  # to not find them
31486  if test "x$new_path" = x \
31487      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31488      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31489    new_path=`$CYGPATH -u "$path"`
31490  fi
31491  if test "x$new_path" = x; then
31492    # Oops. Which didn't find the executable.
31493    # The splitting of arguments from the executable at a space might have been incorrect,
31494    # since paths with space are more likely in Windows. Give it another try with the whole
31495    # argument.
31496    path="$complete"
31497    arguments="EOL"
31498    new_path=`$CYGPATH -u "$path"`
31499    new_path=`$WHICH "$new_path" 2> /dev/null`
31500    # bat and cmd files are not always considered executable in cygwin causing which
31501    # to not find them
31502    if test "x$new_path" = x \
31503        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31504        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31505      new_path=`$CYGPATH -u "$path"`
31506    fi
31507    if test "x$new_path" = x; then
31508      # It's still not found. Now this is an unrecoverable error.
31509      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31510$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31511      has_space=`$ECHO "$complete" | $GREP " "`
31512      if test "x$has_space" != x; then
31513        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31514$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31515      fi
31516      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31517    fi
31518  fi
31519
31520  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31521  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31522  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31523  # "foo.exe" is OK but "foo" is an error.
31524  #
31525  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31526  # It is also a way to make sure we got the proper file name for the real test later on.
31527  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31528  if test "x$test_shortpath" = x; then
31529    # Short path failed, file does not exist as specified.
31530    # Try adding .exe or .cmd
31531    if test -f "${new_path}.exe"; then
31532      input_to_shortpath="${new_path}.exe"
31533    elif test -f "${new_path}.cmd"; then
31534      input_to_shortpath="${new_path}.cmd"
31535    else
31536      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31537$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31538      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31539$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31540      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31541    fi
31542  else
31543    input_to_shortpath="$new_path"
31544  fi
31545
31546  # Call helper function which possibly converts this using DOS-style short mode.
31547  # If so, the updated path is stored in $new_path.
31548  new_path="$input_to_shortpath"
31549
31550  input_path="$input_to_shortpath"
31551  # Check if we need to convert this using DOS-style short mode. If the path
31552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31553  # take no chances and rewrite it.
31554  # Note: m4 eats our [], so we need to use [ and ] instead.
31555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31556  if test "x$has_forbidden_chars" != x; then
31557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31558    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31559    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31560    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31561      # Going to short mode and back again did indeed matter. Since short mode is
31562      # case insensitive, let's make it lowercase to improve readability.
31563      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31564      # Now convert it back to Unix-stile (cygpath)
31565      input_path=`$CYGPATH -u "$shortmode_path"`
31566      new_path="$input_path"
31567    fi
31568  fi
31569
31570  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31571  if test "x$test_cygdrive_prefix" = x; then
31572    # As a simple fix, exclude /usr/bin since it's not a real path.
31573    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31574      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31575      # a path prefixed by /cygdrive for fixpath to work.
31576      new_path="$CYGWIN_ROOT_PATH$input_path"
31577    fi
31578  fi
31579
31580  # remove trailing .exe if any
31581  new_path="${new_path/%.exe/}"
31582
31583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31584
31585  # First separate the path from the arguments. This will split at the first
31586  # space.
31587  complete="$LD"
31588  path="${complete%% *}"
31589  tmp="$complete EOL"
31590  arguments="${tmp#* }"
31591
31592  # Input might be given as Windows format, start by converting to
31593  # unix format.
31594  new_path="$path"
31595
31596  windows_path="$new_path"
31597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31598    unix_path=`$CYGPATH -u "$windows_path"`
31599    new_path="$unix_path"
31600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31602    new_path="$unix_path"
31603  fi
31604
31605
31606  # Now try to locate executable using which
31607  new_path=`$WHICH "$new_path" 2> /dev/null`
31608
31609  if test "x$new_path" = x; then
31610    # Oops. Which didn't find the executable.
31611    # The splitting of arguments from the executable at a space might have been incorrect,
31612    # since paths with space are more likely in Windows. Give it another try with the whole
31613    # argument.
31614    path="$complete"
31615    arguments="EOL"
31616    new_path="$path"
31617
31618  windows_path="$new_path"
31619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31620    unix_path=`$CYGPATH -u "$windows_path"`
31621    new_path="$unix_path"
31622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31624    new_path="$unix_path"
31625  fi
31626
31627
31628    new_path=`$WHICH "$new_path" 2> /dev/null`
31629
31630    if test "x$new_path" = x; then
31631      # It's still not found. Now this is an unrecoverable error.
31632      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31633$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31634      has_space=`$ECHO "$complete" | $GREP " "`
31635      if test "x$has_space" != x; then
31636        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31637$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31638      fi
31639      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31640    fi
31641  fi
31642
31643  # Now new_path has a complete unix path to the binary
31644  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31645    # Keep paths in /bin as-is, but remove trailing .exe if any
31646    new_path="${new_path/%.exe/}"
31647    # Do not save /bin paths to all_fixpath_prefixes!
31648  else
31649    # Not in mixed or Windows style, start by that.
31650    new_path=`cmd //c echo $new_path`
31651
31652  input_path="$new_path"
31653  # Check if we need to convert this using DOS-style short mode. If the path
31654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31655  # take no chances and rewrite it.
31656  # Note: m4 eats our [], so we need to use [ and ] instead.
31657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31658  if test "x$has_forbidden_chars" != x; then
31659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31661  fi
31662
31663    # Output is in $new_path
31664
31665  windows_path="$new_path"
31666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31667    unix_path=`$CYGPATH -u "$windows_path"`
31668    new_path="$unix_path"
31669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31671    new_path="$unix_path"
31672  fi
31673
31674    # remove trailing .exe if any
31675    new_path="${new_path/%.exe/}"
31676
31677    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31678    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31679  fi
31680
31681  else
31682    # We're on a posix platform. Hooray! :)
31683    # First separate the path from the arguments. This will split at the first
31684    # space.
31685    complete="$LD"
31686    path="${complete%% *}"
31687    tmp="$complete EOL"
31688    arguments="${tmp#* }"
31689
31690    # Cannot rely on the command "which" here since it doesn't always work.
31691    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31692    if test -z "$is_absolute_path"; then
31693      # Path to executable is not absolute. Find it.
31694      IFS_save="$IFS"
31695      IFS=:
31696      for p in $PATH; do
31697        if test -f "$p/$path" && test -x "$p/$path"; then
31698          new_path="$p/$path"
31699          break
31700        fi
31701      done
31702      IFS="$IFS_save"
31703    else
31704      # This is an absolute path, we can use it without further modifications.
31705      new_path="$path"
31706    fi
31707
31708    if test "x$new_path" = x; then
31709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31710$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31711      has_space=`$ECHO "$complete" | $GREP " "`
31712      if test "x$has_space" != x; then
31713        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31714$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31715      fi
31716      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31717    fi
31718  fi
31719
31720  # Now join together the path and the arguments once again
31721  if test "x$arguments" != xEOL; then
31722    new_complete="$new_path ${arguments% *}"
31723  else
31724    new_complete="$new_path"
31725  fi
31726
31727  if test "x$complete" != "x$new_complete"; then
31728    LD="$new_complete"
31729    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31730$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31731  fi
31732
31733    # Verify that we indeed succeeded with this trick.
31734    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31735$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31736    "$LD" --version > /dev/null
31737    if test $? -eq 0 ; then
31738      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31739$as_echo "no" >&6; }
31740      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31741    else
31742      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31743$as_echo "yes" >&6; }
31744    fi
31745    LDCXX="$LD"
31746  else
31747    # All other toolchains use the compiler to link.
31748    LD="$CC"
31749    LDCXX="$CXX"
31750  fi
31751
31752  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31753
31754
31755  #
31756  # Setup the assembler (AS)
31757  #
31758  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31759    # FIXME: should this really be solaris, or solstudio?
31760
31761
31762  # Publish this variable in the help.
31763
31764
31765  if test "x$AS" = x; then
31766    # The variable is not set by user, try to locate tool using the code snippet
31767    for ac_prog in as
31768do
31769  # Extract the first word of "$ac_prog", so it can be a program name with args.
31770set dummy $ac_prog; ac_word=$2
31771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31772$as_echo_n "checking for $ac_word... " >&6; }
31773if ${ac_cv_path_AS+:} false; then :
31774  $as_echo_n "(cached) " >&6
31775else
31776  case $AS in
31777  [\\/]* | ?:[\\/]*)
31778  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31779  ;;
31780  *)
31781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31782for as_dir in $PATH
31783do
31784  IFS=$as_save_IFS
31785  test -z "$as_dir" && as_dir=.
31786    for ac_exec_ext in '' $ac_executable_extensions; do
31787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31788    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31790    break 2
31791  fi
31792done
31793  done
31794IFS=$as_save_IFS
31795
31796  ;;
31797esac
31798fi
31799AS=$ac_cv_path_AS
31800if test -n "$AS"; then
31801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31802$as_echo "$AS" >&6; }
31803else
31804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31805$as_echo "no" >&6; }
31806fi
31807
31808
31809  test -n "$AS" && break
31810done
31811
31812  else
31813    # The variable is set, but is it from the command line or the environment?
31814
31815    # Try to remove the string !AS! from our list.
31816    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31817    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31818      # If it failed, the variable was not from the command line. Ignore it,
31819      # but warn the user (except for BASH, which is always set by the calling BASH).
31820      if test "xAS" != xBASH; then
31821        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31822$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31823      fi
31824      # Try to locate tool using the code snippet
31825      for ac_prog in as
31826do
31827  # Extract the first word of "$ac_prog", so it can be a program name with args.
31828set dummy $ac_prog; ac_word=$2
31829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31830$as_echo_n "checking for $ac_word... " >&6; }
31831if ${ac_cv_path_AS+:} false; then :
31832  $as_echo_n "(cached) " >&6
31833else
31834  case $AS in
31835  [\\/]* | ?:[\\/]*)
31836  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31837  ;;
31838  *)
31839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31840for as_dir in $PATH
31841do
31842  IFS=$as_save_IFS
31843  test -z "$as_dir" && as_dir=.
31844    for ac_exec_ext in '' $ac_executable_extensions; do
31845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31846    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31848    break 2
31849  fi
31850done
31851  done
31852IFS=$as_save_IFS
31853
31854  ;;
31855esac
31856fi
31857AS=$ac_cv_path_AS
31858if test -n "$AS"; then
31859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31860$as_echo "$AS" >&6; }
31861else
31862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31863$as_echo "no" >&6; }
31864fi
31865
31866
31867  test -n "$AS" && break
31868done
31869
31870    else
31871      # If it succeeded, then it was overridden by the user. We will use it
31872      # for the tool.
31873
31874      # First remove it from the list of overridden variables, so we can test
31875      # for unknown variables in the end.
31876      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31877
31878      # Check if the provided tool contains a complete path.
31879      tool_specified="$AS"
31880      tool_basename="${tool_specified##*/}"
31881      if test "x$tool_basename" = "x$tool_specified"; then
31882        # A command without a complete path is provided, search $PATH.
31883        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
31884$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
31885        # Extract the first word of "$tool_basename", so it can be a program name with args.
31886set dummy $tool_basename; ac_word=$2
31887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31888$as_echo_n "checking for $ac_word... " >&6; }
31889if ${ac_cv_path_AS+:} false; then :
31890  $as_echo_n "(cached) " >&6
31891else
31892  case $AS in
31893  [\\/]* | ?:[\\/]*)
31894  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31895  ;;
31896  *)
31897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31898for as_dir in $PATH
31899do
31900  IFS=$as_save_IFS
31901  test -z "$as_dir" && as_dir=.
31902    for ac_exec_ext in '' $ac_executable_extensions; do
31903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31904    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31906    break 2
31907  fi
31908done
31909  done
31910IFS=$as_save_IFS
31911
31912  ;;
31913esac
31914fi
31915AS=$ac_cv_path_AS
31916if test -n "$AS"; then
31917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31918$as_echo "$AS" >&6; }
31919else
31920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31921$as_echo "no" >&6; }
31922fi
31923
31924
31925        if test "x$AS" = x; then
31926          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31927        fi
31928      else
31929        # Otherwise we believe it is a complete path. Use it as it is.
31930        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
31931$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
31932        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
31933$as_echo_n "checking for AS... " >&6; }
31934        if test ! -x "$tool_specified"; then
31935          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31936$as_echo "not found" >&6; }
31937          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
31938        fi
31939        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31940$as_echo "$tool_specified" >&6; }
31941      fi
31942    fi
31943  fi
31944
31945
31946
31947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31948
31949  # First separate the path from the arguments. This will split at the first
31950  # space.
31951  complete="$AS"
31952  path="${complete%% *}"
31953  tmp="$complete EOL"
31954  arguments="${tmp#* }"
31955
31956  # Input might be given as Windows format, start by converting to
31957  # unix format.
31958  new_path=`$CYGPATH -u "$path"`
31959
31960  # Now try to locate executable using which
31961  new_path=`$WHICH "$new_path" 2> /dev/null`
31962  # bat and cmd files are not always considered executable in cygwin causing which
31963  # to not find them
31964  if test "x$new_path" = x \
31965      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31966      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31967    new_path=`$CYGPATH -u "$path"`
31968  fi
31969  if test "x$new_path" = x; then
31970    # Oops. Which didn't find the executable.
31971    # The splitting of arguments from the executable at a space might have been incorrect,
31972    # since paths with space are more likely in Windows. Give it another try with the whole
31973    # argument.
31974    path="$complete"
31975    arguments="EOL"
31976    new_path=`$CYGPATH -u "$path"`
31977    new_path=`$WHICH "$new_path" 2> /dev/null`
31978    # bat and cmd files are not always considered executable in cygwin causing which
31979    # to not find them
31980    if test "x$new_path" = x \
31981        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31982        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31983      new_path=`$CYGPATH -u "$path"`
31984    fi
31985    if test "x$new_path" = x; then
31986      # It's still not found. Now this is an unrecoverable error.
31987      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31988$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31989      has_space=`$ECHO "$complete" | $GREP " "`
31990      if test "x$has_space" != x; then
31991        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31992$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31993      fi
31994      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31995    fi
31996  fi
31997
31998  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31999  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32000  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32001  # "foo.exe" is OK but "foo" is an error.
32002  #
32003  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32004  # It is also a way to make sure we got the proper file name for the real test later on.
32005  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32006  if test "x$test_shortpath" = x; then
32007    # Short path failed, file does not exist as specified.
32008    # Try adding .exe or .cmd
32009    if test -f "${new_path}.exe"; then
32010      input_to_shortpath="${new_path}.exe"
32011    elif test -f "${new_path}.cmd"; then
32012      input_to_shortpath="${new_path}.cmd"
32013    else
32014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32015$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32016      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32017$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32018      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32019    fi
32020  else
32021    input_to_shortpath="$new_path"
32022  fi
32023
32024  # Call helper function which possibly converts this using DOS-style short mode.
32025  # If so, the updated path is stored in $new_path.
32026  new_path="$input_to_shortpath"
32027
32028  input_path="$input_to_shortpath"
32029  # Check if we need to convert this using DOS-style short mode. If the path
32030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32031  # take no chances and rewrite it.
32032  # Note: m4 eats our [], so we need to use [ and ] instead.
32033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32034  if test "x$has_forbidden_chars" != x; then
32035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32036    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32037    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32038    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32039      # Going to short mode and back again did indeed matter. Since short mode is
32040      # case insensitive, let's make it lowercase to improve readability.
32041      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32042      # Now convert it back to Unix-stile (cygpath)
32043      input_path=`$CYGPATH -u "$shortmode_path"`
32044      new_path="$input_path"
32045    fi
32046  fi
32047
32048  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32049  if test "x$test_cygdrive_prefix" = x; then
32050    # As a simple fix, exclude /usr/bin since it's not a real path.
32051    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32052      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32053      # a path prefixed by /cygdrive for fixpath to work.
32054      new_path="$CYGWIN_ROOT_PATH$input_path"
32055    fi
32056  fi
32057
32058  # remove trailing .exe if any
32059  new_path="${new_path/%.exe/}"
32060
32061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32062
32063  # First separate the path from the arguments. This will split at the first
32064  # space.
32065  complete="$AS"
32066  path="${complete%% *}"
32067  tmp="$complete EOL"
32068  arguments="${tmp#* }"
32069
32070  # Input might be given as Windows format, start by converting to
32071  # unix format.
32072  new_path="$path"
32073
32074  windows_path="$new_path"
32075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32076    unix_path=`$CYGPATH -u "$windows_path"`
32077    new_path="$unix_path"
32078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32080    new_path="$unix_path"
32081  fi
32082
32083
32084  # Now try to locate executable using which
32085  new_path=`$WHICH "$new_path" 2> /dev/null`
32086
32087  if test "x$new_path" = x; then
32088    # Oops. Which didn't find the executable.
32089    # The splitting of arguments from the executable at a space might have been incorrect,
32090    # since paths with space are more likely in Windows. Give it another try with the whole
32091    # argument.
32092    path="$complete"
32093    arguments="EOL"
32094    new_path="$path"
32095
32096  windows_path="$new_path"
32097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32098    unix_path=`$CYGPATH -u "$windows_path"`
32099    new_path="$unix_path"
32100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32102    new_path="$unix_path"
32103  fi
32104
32105
32106    new_path=`$WHICH "$new_path" 2> /dev/null`
32107
32108    if test "x$new_path" = x; then
32109      # It's still not found. Now this is an unrecoverable error.
32110      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32111$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32112      has_space=`$ECHO "$complete" | $GREP " "`
32113      if test "x$has_space" != x; then
32114        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32115$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32116      fi
32117      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32118    fi
32119  fi
32120
32121  # Now new_path has a complete unix path to the binary
32122  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32123    # Keep paths in /bin as-is, but remove trailing .exe if any
32124    new_path="${new_path/%.exe/}"
32125    # Do not save /bin paths to all_fixpath_prefixes!
32126  else
32127    # Not in mixed or Windows style, start by that.
32128    new_path=`cmd //c echo $new_path`
32129
32130  input_path="$new_path"
32131  # Check if we need to convert this using DOS-style short mode. If the path
32132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32133  # take no chances and rewrite it.
32134  # Note: m4 eats our [], so we need to use [ and ] instead.
32135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32136  if test "x$has_forbidden_chars" != x; then
32137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32138    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32139  fi
32140
32141    # Output is in $new_path
32142
32143  windows_path="$new_path"
32144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32145    unix_path=`$CYGPATH -u "$windows_path"`
32146    new_path="$unix_path"
32147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32149    new_path="$unix_path"
32150  fi
32151
32152    # remove trailing .exe if any
32153    new_path="${new_path/%.exe/}"
32154
32155    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32156    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32157  fi
32158
32159  else
32160    # We're on a posix platform. Hooray! :)
32161    # First separate the path from the arguments. This will split at the first
32162    # space.
32163    complete="$AS"
32164    path="${complete%% *}"
32165    tmp="$complete EOL"
32166    arguments="${tmp#* }"
32167
32168    # Cannot rely on the command "which" here since it doesn't always work.
32169    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32170    if test -z "$is_absolute_path"; then
32171      # Path to executable is not absolute. Find it.
32172      IFS_save="$IFS"
32173      IFS=:
32174      for p in $PATH; do
32175        if test -f "$p/$path" && test -x "$p/$path"; then
32176          new_path="$p/$path"
32177          break
32178        fi
32179      done
32180      IFS="$IFS_save"
32181    else
32182      # This is an absolute path, we can use it without further modifications.
32183      new_path="$path"
32184    fi
32185
32186    if test "x$new_path" = x; then
32187      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32188$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32189      has_space=`$ECHO "$complete" | $GREP " "`
32190      if test "x$has_space" != x; then
32191        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32192$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32193      fi
32194      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32195    fi
32196  fi
32197
32198  # Now join together the path and the arguments once again
32199  if test "x$arguments" != xEOL; then
32200    new_complete="$new_path ${arguments% *}"
32201  else
32202    new_complete="$new_path"
32203  fi
32204
32205  if test "x$complete" != "x$new_complete"; then
32206    AS="$new_complete"
32207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32208$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32209  fi
32210
32211  else
32212    # FIXME: is this correct for microsoft?
32213    AS="$CC -c"
32214  fi
32215
32216
32217  #
32218  # Setup the archiver (AR)
32219  #
32220  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32221    # The corresponding ar tool is lib.exe (used to create static libraries)
32222    # Extract the first word of "lib", so it can be a program name with args.
32223set dummy lib; ac_word=$2
32224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32225$as_echo_n "checking for $ac_word... " >&6; }
32226if ${ac_cv_prog_AR+:} false; then :
32227  $as_echo_n "(cached) " >&6
32228else
32229  if test -n "$AR"; then
32230  ac_cv_prog_AR="$AR" # Let the user override the test.
32231else
32232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32233for as_dir in $PATH
32234do
32235  IFS=$as_save_IFS
32236  test -z "$as_dir" && as_dir=.
32237    for ac_exec_ext in '' $ac_executable_extensions; do
32238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32239    ac_cv_prog_AR="lib"
32240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32241    break 2
32242  fi
32243done
32244  done
32245IFS=$as_save_IFS
32246
32247fi
32248fi
32249AR=$ac_cv_prog_AR
32250if test -n "$AR"; then
32251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32252$as_echo "$AR" >&6; }
32253else
32254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32255$as_echo "no" >&6; }
32256fi
32257
32258
32259  else
32260
32261
32262  # Publish this variable in the help.
32263
32264
32265  if test "x$AR" = x; then
32266    # The variable is not set by user, try to locate tool using the code snippet
32267    if test -n "$ac_tool_prefix"; then
32268  for ac_prog in ar
32269  do
32270    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32271set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32273$as_echo_n "checking for $ac_word... " >&6; }
32274if ${ac_cv_prog_AR+:} false; then :
32275  $as_echo_n "(cached) " >&6
32276else
32277  if test -n "$AR"; then
32278  ac_cv_prog_AR="$AR" # Let the user override the test.
32279else
32280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32281for as_dir in $PATH
32282do
32283  IFS=$as_save_IFS
32284  test -z "$as_dir" && as_dir=.
32285    for ac_exec_ext in '' $ac_executable_extensions; do
32286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32287    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32289    break 2
32290  fi
32291done
32292  done
32293IFS=$as_save_IFS
32294
32295fi
32296fi
32297AR=$ac_cv_prog_AR
32298if test -n "$AR"; then
32299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32300$as_echo "$AR" >&6; }
32301else
32302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32303$as_echo "no" >&6; }
32304fi
32305
32306
32307    test -n "$AR" && break
32308  done
32309fi
32310if test -z "$AR"; then
32311  ac_ct_AR=$AR
32312  for ac_prog in ar
32313do
32314  # Extract the first word of "$ac_prog", so it can be a program name with args.
32315set dummy $ac_prog; ac_word=$2
32316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32317$as_echo_n "checking for $ac_word... " >&6; }
32318if ${ac_cv_prog_ac_ct_AR+:} false; then :
32319  $as_echo_n "(cached) " >&6
32320else
32321  if test -n "$ac_ct_AR"; then
32322  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32323else
32324as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32325for as_dir in $PATH
32326do
32327  IFS=$as_save_IFS
32328  test -z "$as_dir" && as_dir=.
32329    for ac_exec_ext in '' $ac_executable_extensions; do
32330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32331    ac_cv_prog_ac_ct_AR="$ac_prog"
32332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32333    break 2
32334  fi
32335done
32336  done
32337IFS=$as_save_IFS
32338
32339fi
32340fi
32341ac_ct_AR=$ac_cv_prog_ac_ct_AR
32342if test -n "$ac_ct_AR"; then
32343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32344$as_echo "$ac_ct_AR" >&6; }
32345else
32346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32347$as_echo "no" >&6; }
32348fi
32349
32350
32351  test -n "$ac_ct_AR" && break
32352done
32353
32354  if test "x$ac_ct_AR" = x; then
32355    AR=""
32356  else
32357    case $cross_compiling:$ac_tool_warned in
32358yes:)
32359{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32360$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32361ac_tool_warned=yes ;;
32362esac
32363    AR=$ac_ct_AR
32364  fi
32365fi
32366
32367  else
32368    # The variable is set, but is it from the command line or the environment?
32369
32370    # Try to remove the string !AR! from our list.
32371    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32372    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32373      # If it failed, the variable was not from the command line. Ignore it,
32374      # but warn the user (except for BASH, which is always set by the calling BASH).
32375      if test "xAR" != xBASH; then
32376        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32377$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32378      fi
32379      # Try to locate tool using the code snippet
32380      if test -n "$ac_tool_prefix"; then
32381  for ac_prog in ar
32382  do
32383    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32384set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32386$as_echo_n "checking for $ac_word... " >&6; }
32387if ${ac_cv_prog_AR+:} false; then :
32388  $as_echo_n "(cached) " >&6
32389else
32390  if test -n "$AR"; then
32391  ac_cv_prog_AR="$AR" # Let the user override the test.
32392else
32393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32394for as_dir in $PATH
32395do
32396  IFS=$as_save_IFS
32397  test -z "$as_dir" && as_dir=.
32398    for ac_exec_ext in '' $ac_executable_extensions; do
32399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32400    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32402    break 2
32403  fi
32404done
32405  done
32406IFS=$as_save_IFS
32407
32408fi
32409fi
32410AR=$ac_cv_prog_AR
32411if test -n "$AR"; then
32412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32413$as_echo "$AR" >&6; }
32414else
32415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32416$as_echo "no" >&6; }
32417fi
32418
32419
32420    test -n "$AR" && break
32421  done
32422fi
32423if test -z "$AR"; then
32424  ac_ct_AR=$AR
32425  for ac_prog in ar
32426do
32427  # Extract the first word of "$ac_prog", so it can be a program name with args.
32428set dummy $ac_prog; ac_word=$2
32429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32430$as_echo_n "checking for $ac_word... " >&6; }
32431if ${ac_cv_prog_ac_ct_AR+:} false; then :
32432  $as_echo_n "(cached) " >&6
32433else
32434  if test -n "$ac_ct_AR"; then
32435  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32436else
32437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32438for as_dir in $PATH
32439do
32440  IFS=$as_save_IFS
32441  test -z "$as_dir" && as_dir=.
32442    for ac_exec_ext in '' $ac_executable_extensions; do
32443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32444    ac_cv_prog_ac_ct_AR="$ac_prog"
32445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32446    break 2
32447  fi
32448done
32449  done
32450IFS=$as_save_IFS
32451
32452fi
32453fi
32454ac_ct_AR=$ac_cv_prog_ac_ct_AR
32455if test -n "$ac_ct_AR"; then
32456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32457$as_echo "$ac_ct_AR" >&6; }
32458else
32459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32460$as_echo "no" >&6; }
32461fi
32462
32463
32464  test -n "$ac_ct_AR" && break
32465done
32466
32467  if test "x$ac_ct_AR" = x; then
32468    AR=""
32469  else
32470    case $cross_compiling:$ac_tool_warned in
32471yes:)
32472{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32473$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32474ac_tool_warned=yes ;;
32475esac
32476    AR=$ac_ct_AR
32477  fi
32478fi
32479
32480    else
32481      # If it succeeded, then it was overridden by the user. We will use it
32482      # for the tool.
32483
32484      # First remove it from the list of overridden variables, so we can test
32485      # for unknown variables in the end.
32486      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32487
32488      # Check if the provided tool contains a complete path.
32489      tool_specified="$AR"
32490      tool_basename="${tool_specified##*/}"
32491      if test "x$tool_basename" = "x$tool_specified"; then
32492        # A command without a complete path is provided, search $PATH.
32493        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32494$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32495        # Extract the first word of "$tool_basename", so it can be a program name with args.
32496set dummy $tool_basename; ac_word=$2
32497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32498$as_echo_n "checking for $ac_word... " >&6; }
32499if ${ac_cv_path_AR+:} false; then :
32500  $as_echo_n "(cached) " >&6
32501else
32502  case $AR in
32503  [\\/]* | ?:[\\/]*)
32504  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32505  ;;
32506  *)
32507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32508for as_dir in $PATH
32509do
32510  IFS=$as_save_IFS
32511  test -z "$as_dir" && as_dir=.
32512    for ac_exec_ext in '' $ac_executable_extensions; do
32513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32514    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32516    break 2
32517  fi
32518done
32519  done
32520IFS=$as_save_IFS
32521
32522  ;;
32523esac
32524fi
32525AR=$ac_cv_path_AR
32526if test -n "$AR"; then
32527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32528$as_echo "$AR" >&6; }
32529else
32530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32531$as_echo "no" >&6; }
32532fi
32533
32534
32535        if test "x$AR" = x; then
32536          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32537        fi
32538      else
32539        # Otherwise we believe it is a complete path. Use it as it is.
32540        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32541$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32542        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32543$as_echo_n "checking for AR... " >&6; }
32544        if test ! -x "$tool_specified"; then
32545          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32546$as_echo "not found" >&6; }
32547          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32548        fi
32549        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32550$as_echo "$tool_specified" >&6; }
32551      fi
32552    fi
32553  fi
32554
32555
32556  fi
32557
32558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32559
32560  # First separate the path from the arguments. This will split at the first
32561  # space.
32562  complete="$AR"
32563  path="${complete%% *}"
32564  tmp="$complete EOL"
32565  arguments="${tmp#* }"
32566
32567  # Input might be given as Windows format, start by converting to
32568  # unix format.
32569  new_path=`$CYGPATH -u "$path"`
32570
32571  # Now try to locate executable using which
32572  new_path=`$WHICH "$new_path" 2> /dev/null`
32573  # bat and cmd files are not always considered executable in cygwin causing which
32574  # to not find them
32575  if test "x$new_path" = x \
32576      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32577      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32578    new_path=`$CYGPATH -u "$path"`
32579  fi
32580  if test "x$new_path" = x; then
32581    # Oops. Which didn't find the executable.
32582    # The splitting of arguments from the executable at a space might have been incorrect,
32583    # since paths with space are more likely in Windows. Give it another try with the whole
32584    # argument.
32585    path="$complete"
32586    arguments="EOL"
32587    new_path=`$CYGPATH -u "$path"`
32588    new_path=`$WHICH "$new_path" 2> /dev/null`
32589    # bat and cmd files are not always considered executable in cygwin causing which
32590    # to not find them
32591    if test "x$new_path" = x \
32592        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32593        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32594      new_path=`$CYGPATH -u "$path"`
32595    fi
32596    if test "x$new_path" = x; then
32597      # It's still not found. Now this is an unrecoverable error.
32598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32599$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32600      has_space=`$ECHO "$complete" | $GREP " "`
32601      if test "x$has_space" != x; then
32602        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32603$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32604      fi
32605      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32606    fi
32607  fi
32608
32609  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32610  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32611  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32612  # "foo.exe" is OK but "foo" is an error.
32613  #
32614  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32615  # It is also a way to make sure we got the proper file name for the real test later on.
32616  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32617  if test "x$test_shortpath" = x; then
32618    # Short path failed, file does not exist as specified.
32619    # Try adding .exe or .cmd
32620    if test -f "${new_path}.exe"; then
32621      input_to_shortpath="${new_path}.exe"
32622    elif test -f "${new_path}.cmd"; then
32623      input_to_shortpath="${new_path}.cmd"
32624    else
32625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32626$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32627      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32628$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32629      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32630    fi
32631  else
32632    input_to_shortpath="$new_path"
32633  fi
32634
32635  # Call helper function which possibly converts this using DOS-style short mode.
32636  # If so, the updated path is stored in $new_path.
32637  new_path="$input_to_shortpath"
32638
32639  input_path="$input_to_shortpath"
32640  # Check if we need to convert this using DOS-style short mode. If the path
32641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32642  # take no chances and rewrite it.
32643  # Note: m4 eats our [], so we need to use [ and ] instead.
32644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32645  if test "x$has_forbidden_chars" != x; then
32646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32647    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32648    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32649    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32650      # Going to short mode and back again did indeed matter. Since short mode is
32651      # case insensitive, let's make it lowercase to improve readability.
32652      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32653      # Now convert it back to Unix-stile (cygpath)
32654      input_path=`$CYGPATH -u "$shortmode_path"`
32655      new_path="$input_path"
32656    fi
32657  fi
32658
32659  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32660  if test "x$test_cygdrive_prefix" = x; then
32661    # As a simple fix, exclude /usr/bin since it's not a real path.
32662    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32663      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32664      # a path prefixed by /cygdrive for fixpath to work.
32665      new_path="$CYGWIN_ROOT_PATH$input_path"
32666    fi
32667  fi
32668
32669  # remove trailing .exe if any
32670  new_path="${new_path/%.exe/}"
32671
32672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32673
32674  # First separate the path from the arguments. This will split at the first
32675  # space.
32676  complete="$AR"
32677  path="${complete%% *}"
32678  tmp="$complete EOL"
32679  arguments="${tmp#* }"
32680
32681  # Input might be given as Windows format, start by converting to
32682  # unix format.
32683  new_path="$path"
32684
32685  windows_path="$new_path"
32686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32687    unix_path=`$CYGPATH -u "$windows_path"`
32688    new_path="$unix_path"
32689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32691    new_path="$unix_path"
32692  fi
32693
32694
32695  # Now try to locate executable using which
32696  new_path=`$WHICH "$new_path" 2> /dev/null`
32697
32698  if test "x$new_path" = x; then
32699    # Oops. Which didn't find the executable.
32700    # The splitting of arguments from the executable at a space might have been incorrect,
32701    # since paths with space are more likely in Windows. Give it another try with the whole
32702    # argument.
32703    path="$complete"
32704    arguments="EOL"
32705    new_path="$path"
32706
32707  windows_path="$new_path"
32708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32709    unix_path=`$CYGPATH -u "$windows_path"`
32710    new_path="$unix_path"
32711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32713    new_path="$unix_path"
32714  fi
32715
32716
32717    new_path=`$WHICH "$new_path" 2> /dev/null`
32718
32719    if test "x$new_path" = x; then
32720      # It's still not found. Now this is an unrecoverable error.
32721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32722$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32723      has_space=`$ECHO "$complete" | $GREP " "`
32724      if test "x$has_space" != x; then
32725        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32726$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32727      fi
32728      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32729    fi
32730  fi
32731
32732  # Now new_path has a complete unix path to the binary
32733  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32734    # Keep paths in /bin as-is, but remove trailing .exe if any
32735    new_path="${new_path/%.exe/}"
32736    # Do not save /bin paths to all_fixpath_prefixes!
32737  else
32738    # Not in mixed or Windows style, start by that.
32739    new_path=`cmd //c echo $new_path`
32740
32741  input_path="$new_path"
32742  # Check if we need to convert this using DOS-style short mode. If the path
32743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32744  # take no chances and rewrite it.
32745  # Note: m4 eats our [], so we need to use [ and ] instead.
32746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32747  if test "x$has_forbidden_chars" != x; then
32748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32749    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32750  fi
32751
32752    # Output is in $new_path
32753
32754  windows_path="$new_path"
32755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32756    unix_path=`$CYGPATH -u "$windows_path"`
32757    new_path="$unix_path"
32758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32760    new_path="$unix_path"
32761  fi
32762
32763    # remove trailing .exe if any
32764    new_path="${new_path/%.exe/}"
32765
32766    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32767    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32768  fi
32769
32770  else
32771    # We're on a posix platform. Hooray! :)
32772    # First separate the path from the arguments. This will split at the first
32773    # space.
32774    complete="$AR"
32775    path="${complete%% *}"
32776    tmp="$complete EOL"
32777    arguments="${tmp#* }"
32778
32779    # Cannot rely on the command "which" here since it doesn't always work.
32780    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32781    if test -z "$is_absolute_path"; then
32782      # Path to executable is not absolute. Find it.
32783      IFS_save="$IFS"
32784      IFS=:
32785      for p in $PATH; do
32786        if test -f "$p/$path" && test -x "$p/$path"; then
32787          new_path="$p/$path"
32788          break
32789        fi
32790      done
32791      IFS="$IFS_save"
32792    else
32793      # This is an absolute path, we can use it without further modifications.
32794      new_path="$path"
32795    fi
32796
32797    if test "x$new_path" = x; then
32798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32799$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32800      has_space=`$ECHO "$complete" | $GREP " "`
32801      if test "x$has_space" != x; then
32802        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32803$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32804      fi
32805      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32806    fi
32807  fi
32808
32809  # Now join together the path and the arguments once again
32810  if test "x$arguments" != xEOL; then
32811    new_complete="$new_path ${arguments% *}"
32812  else
32813    new_complete="$new_path"
32814  fi
32815
32816  if test "x$complete" != "x$new_complete"; then
32817    AR="$new_complete"
32818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32819$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32820  fi
32821
32822
32823
32824  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32825    ac_ext=m
32826ac_cpp='$OBJCPP $CPPFLAGS'
32827ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32828ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32829ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32830if test -n "$ac_tool_prefix"; then
32831  for ac_prog in gcc objcc objc cc CC
32832  do
32833    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32834set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32836$as_echo_n "checking for $ac_word... " >&6; }
32837if ${ac_cv_prog_OBJC+:} false; then :
32838  $as_echo_n "(cached) " >&6
32839else
32840  if test -n "$OBJC"; then
32841  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32842else
32843as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32844for as_dir in $PATH
32845do
32846  IFS=$as_save_IFS
32847  test -z "$as_dir" && as_dir=.
32848    for ac_exec_ext in '' $ac_executable_extensions; do
32849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32850    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32852    break 2
32853  fi
32854done
32855  done
32856IFS=$as_save_IFS
32857
32858fi
32859fi
32860OBJC=$ac_cv_prog_OBJC
32861if test -n "$OBJC"; then
32862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32863$as_echo "$OBJC" >&6; }
32864else
32865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32866$as_echo "no" >&6; }
32867fi
32868
32869
32870    test -n "$OBJC" && break
32871  done
32872fi
32873if test -z "$OBJC"; then
32874  ac_ct_OBJC=$OBJC
32875  for ac_prog in gcc objcc objc cc CC
32876do
32877  # Extract the first word of "$ac_prog", so it can be a program name with args.
32878set dummy $ac_prog; ac_word=$2
32879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32880$as_echo_n "checking for $ac_word... " >&6; }
32881if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32882  $as_echo_n "(cached) " >&6
32883else
32884  if test -n "$ac_ct_OBJC"; then
32885  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32886else
32887as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32888for as_dir in $PATH
32889do
32890  IFS=$as_save_IFS
32891  test -z "$as_dir" && as_dir=.
32892    for ac_exec_ext in '' $ac_executable_extensions; do
32893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32894    ac_cv_prog_ac_ct_OBJC="$ac_prog"
32895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32896    break 2
32897  fi
32898done
32899  done
32900IFS=$as_save_IFS
32901
32902fi
32903fi
32904ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32905if test -n "$ac_ct_OBJC"; then
32906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32907$as_echo "$ac_ct_OBJC" >&6; }
32908else
32909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32910$as_echo "no" >&6; }
32911fi
32912
32913
32914  test -n "$ac_ct_OBJC" && break
32915done
32916
32917  if test "x$ac_ct_OBJC" = x; then
32918    OBJC="gcc"
32919  else
32920    case $cross_compiling:$ac_tool_warned in
32921yes:)
32922{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32923$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32924ac_tool_warned=yes ;;
32925esac
32926    OBJC=$ac_ct_OBJC
32927  fi
32928fi
32929
32930# Provide some information about the compiler.
32931$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32932set X $ac_compile
32933ac_compiler=$2
32934for ac_option in --version -v -V -qversion; do
32935  { { ac_try="$ac_compiler $ac_option >&5"
32936case "(($ac_try" in
32937  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32938  *) ac_try_echo=$ac_try;;
32939esac
32940eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32941$as_echo "$ac_try_echo"; } >&5
32942  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32943  ac_status=$?
32944  if test -s conftest.err; then
32945    sed '10a\
32946... rest of stderr output deleted ...
32947         10q' conftest.err >conftest.er1
32948    cat conftest.er1 >&5
32949  fi
32950  rm -f conftest.er1 conftest.err
32951  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32952  test $ac_status = 0; }
32953done
32954
32955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
32956$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
32957if ${ac_cv_objc_compiler_gnu+:} false; then :
32958  $as_echo_n "(cached) " >&6
32959else
32960  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32961/* end confdefs.h.  */
32962
32963int
32964main ()
32965{
32966#ifndef __GNUC__
32967       choke me
32968#endif
32969
32970  ;
32971  return 0;
32972}
32973_ACEOF
32974if ac_fn_objc_try_compile "$LINENO"; then :
32975  ac_compiler_gnu=yes
32976else
32977  ac_compiler_gnu=no
32978fi
32979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32980ac_cv_objc_compiler_gnu=$ac_compiler_gnu
32981
32982fi
32983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
32984$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
32985if test $ac_compiler_gnu = yes; then
32986  GOBJC=yes
32987else
32988  GOBJC=
32989fi
32990ac_test_OBJCFLAGS=${OBJCFLAGS+set}
32991ac_save_OBJCFLAGS=$OBJCFLAGS
32992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
32993$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
32994if ${ac_cv_prog_objc_g+:} false; then :
32995  $as_echo_n "(cached) " >&6
32996else
32997  ac_save_objc_werror_flag=$ac_objc_werror_flag
32998   ac_objc_werror_flag=yes
32999   ac_cv_prog_objc_g=no
33000   OBJCFLAGS="-g"
33001   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33002/* end confdefs.h.  */
33003
33004int
33005main ()
33006{
33007
33008  ;
33009  return 0;
33010}
33011_ACEOF
33012if ac_fn_objc_try_compile "$LINENO"; then :
33013  ac_cv_prog_objc_g=yes
33014else
33015  OBJCFLAGS=""
33016      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33017/* end confdefs.h.  */
33018
33019int
33020main ()
33021{
33022
33023  ;
33024  return 0;
33025}
33026_ACEOF
33027if ac_fn_objc_try_compile "$LINENO"; then :
33028
33029else
33030  ac_objc_werror_flag=$ac_save_objc_werror_flag
33031	 OBJCFLAGS="-g"
33032	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33033/* end confdefs.h.  */
33034
33035int
33036main ()
33037{
33038
33039  ;
33040  return 0;
33041}
33042_ACEOF
33043if ac_fn_objc_try_compile "$LINENO"; then :
33044  ac_cv_prog_objc_g=yes
33045fi
33046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33047fi
33048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33049fi
33050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33051   ac_objc_werror_flag=$ac_save_objc_werror_flag
33052fi
33053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33054$as_echo "$ac_cv_prog_objc_g" >&6; }
33055if test "$ac_test_OBJCFLAGS" = set; then
33056  OBJCFLAGS=$ac_save_OBJCFLAGS
33057elif test $ac_cv_prog_objc_g = yes; then
33058  if test "$GOBJC" = yes; then
33059    OBJCFLAGS="-g -O2"
33060  else
33061    OBJCFLAGS="-g"
33062  fi
33063else
33064  if test "$GOBJC" = yes; then
33065    OBJCFLAGS="-O2"
33066  else
33067    OBJCFLAGS=
33068  fi
33069fi
33070ac_ext=cpp
33071ac_cpp='$CXXCPP $CPPFLAGS'
33072ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33073ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33074ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33075
33076
33077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33078
33079  # First separate the path from the arguments. This will split at the first
33080  # space.
33081  complete="$OBJC"
33082  path="${complete%% *}"
33083  tmp="$complete EOL"
33084  arguments="${tmp#* }"
33085
33086  # Input might be given as Windows format, start by converting to
33087  # unix format.
33088  new_path=`$CYGPATH -u "$path"`
33089
33090  # Now try to locate executable using which
33091  new_path=`$WHICH "$new_path" 2> /dev/null`
33092  # bat and cmd files are not always considered executable in cygwin causing which
33093  # to not find them
33094  if test "x$new_path" = x \
33095      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33096      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33097    new_path=`$CYGPATH -u "$path"`
33098  fi
33099  if test "x$new_path" = x; then
33100    # Oops. Which didn't find the executable.
33101    # The splitting of arguments from the executable at a space might have been incorrect,
33102    # since paths with space are more likely in Windows. Give it another try with the whole
33103    # argument.
33104    path="$complete"
33105    arguments="EOL"
33106    new_path=`$CYGPATH -u "$path"`
33107    new_path=`$WHICH "$new_path" 2> /dev/null`
33108    # bat and cmd files are not always considered executable in cygwin causing which
33109    # to not find them
33110    if test "x$new_path" = x \
33111        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33112        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33113      new_path=`$CYGPATH -u "$path"`
33114    fi
33115    if test "x$new_path" = x; then
33116      # It's still not found. Now this is an unrecoverable error.
33117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33118$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33119      has_space=`$ECHO "$complete" | $GREP " "`
33120      if test "x$has_space" != x; then
33121        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33122$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33123      fi
33124      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33125    fi
33126  fi
33127
33128  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33129  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33130  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33131  # "foo.exe" is OK but "foo" is an error.
33132  #
33133  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33134  # It is also a way to make sure we got the proper file name for the real test later on.
33135  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33136  if test "x$test_shortpath" = x; then
33137    # Short path failed, file does not exist as specified.
33138    # Try adding .exe or .cmd
33139    if test -f "${new_path}.exe"; then
33140      input_to_shortpath="${new_path}.exe"
33141    elif test -f "${new_path}.cmd"; then
33142      input_to_shortpath="${new_path}.cmd"
33143    else
33144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33145$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33146      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33147$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33148      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33149    fi
33150  else
33151    input_to_shortpath="$new_path"
33152  fi
33153
33154  # Call helper function which possibly converts this using DOS-style short mode.
33155  # If so, the updated path is stored in $new_path.
33156  new_path="$input_to_shortpath"
33157
33158  input_path="$input_to_shortpath"
33159  # Check if we need to convert this using DOS-style short mode. If the path
33160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33161  # take no chances and rewrite it.
33162  # Note: m4 eats our [], so we need to use [ and ] instead.
33163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33164  if test "x$has_forbidden_chars" != x; then
33165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33166    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33167    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33168    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33169      # Going to short mode and back again did indeed matter. Since short mode is
33170      # case insensitive, let's make it lowercase to improve readability.
33171      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33172      # Now convert it back to Unix-stile (cygpath)
33173      input_path=`$CYGPATH -u "$shortmode_path"`
33174      new_path="$input_path"
33175    fi
33176  fi
33177
33178  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33179  if test "x$test_cygdrive_prefix" = x; then
33180    # As a simple fix, exclude /usr/bin since it's not a real path.
33181    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33182      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33183      # a path prefixed by /cygdrive for fixpath to work.
33184      new_path="$CYGWIN_ROOT_PATH$input_path"
33185    fi
33186  fi
33187
33188  # remove trailing .exe if any
33189  new_path="${new_path/%.exe/}"
33190
33191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33192
33193  # First separate the path from the arguments. This will split at the first
33194  # space.
33195  complete="$OBJC"
33196  path="${complete%% *}"
33197  tmp="$complete EOL"
33198  arguments="${tmp#* }"
33199
33200  # Input might be given as Windows format, start by converting to
33201  # unix format.
33202  new_path="$path"
33203
33204  windows_path="$new_path"
33205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33206    unix_path=`$CYGPATH -u "$windows_path"`
33207    new_path="$unix_path"
33208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33210    new_path="$unix_path"
33211  fi
33212
33213
33214  # Now try to locate executable using which
33215  new_path=`$WHICH "$new_path" 2> /dev/null`
33216
33217  if test "x$new_path" = x; then
33218    # Oops. Which didn't find the executable.
33219    # The splitting of arguments from the executable at a space might have been incorrect,
33220    # since paths with space are more likely in Windows. Give it another try with the whole
33221    # argument.
33222    path="$complete"
33223    arguments="EOL"
33224    new_path="$path"
33225
33226  windows_path="$new_path"
33227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33228    unix_path=`$CYGPATH -u "$windows_path"`
33229    new_path="$unix_path"
33230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33232    new_path="$unix_path"
33233  fi
33234
33235
33236    new_path=`$WHICH "$new_path" 2> /dev/null`
33237
33238    if test "x$new_path" = x; then
33239      # It's still not found. Now this is an unrecoverable error.
33240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33241$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33242      has_space=`$ECHO "$complete" | $GREP " "`
33243      if test "x$has_space" != x; then
33244        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33245$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33246      fi
33247      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33248    fi
33249  fi
33250
33251  # Now new_path has a complete unix path to the binary
33252  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33253    # Keep paths in /bin as-is, but remove trailing .exe if any
33254    new_path="${new_path/%.exe/}"
33255    # Do not save /bin paths to all_fixpath_prefixes!
33256  else
33257    # Not in mixed or Windows style, start by that.
33258    new_path=`cmd //c echo $new_path`
33259
33260  input_path="$new_path"
33261  # Check if we need to convert this using DOS-style short mode. If the path
33262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33263  # take no chances and rewrite it.
33264  # Note: m4 eats our [], so we need to use [ and ] instead.
33265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33266  if test "x$has_forbidden_chars" != x; then
33267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33268    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33269  fi
33270
33271    # Output is in $new_path
33272
33273  windows_path="$new_path"
33274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33275    unix_path=`$CYGPATH -u "$windows_path"`
33276    new_path="$unix_path"
33277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33279    new_path="$unix_path"
33280  fi
33281
33282    # remove trailing .exe if any
33283    new_path="${new_path/%.exe/}"
33284
33285    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33286    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33287  fi
33288
33289  else
33290    # We're on a posix platform. Hooray! :)
33291    # First separate the path from the arguments. This will split at the first
33292    # space.
33293    complete="$OBJC"
33294    path="${complete%% *}"
33295    tmp="$complete EOL"
33296    arguments="${tmp#* }"
33297
33298    # Cannot rely on the command "which" here since it doesn't always work.
33299    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33300    if test -z "$is_absolute_path"; then
33301      # Path to executable is not absolute. Find it.
33302      IFS_save="$IFS"
33303      IFS=:
33304      for p in $PATH; do
33305        if test -f "$p/$path" && test -x "$p/$path"; then
33306          new_path="$p/$path"
33307          break
33308        fi
33309      done
33310      IFS="$IFS_save"
33311    else
33312      # This is an absolute path, we can use it without further modifications.
33313      new_path="$path"
33314    fi
33315
33316    if test "x$new_path" = x; then
33317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33318$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33319      has_space=`$ECHO "$complete" | $GREP " "`
33320      if test "x$has_space" != x; then
33321        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33322$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33323      fi
33324      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33325    fi
33326  fi
33327
33328  # Now join together the path and the arguments once again
33329  if test "x$arguments" != xEOL; then
33330    new_complete="$new_path ${arguments% *}"
33331  else
33332    new_complete="$new_path"
33333  fi
33334
33335  if test "x$complete" != "x$new_complete"; then
33336    OBJC="$new_complete"
33337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33338$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33339  fi
33340
33341
33342
33343  # Publish this variable in the help.
33344
33345
33346  if test "x$LIPO" = x; then
33347    # The variable is not set by user, try to locate tool using the code snippet
33348    for ac_prog in lipo
33349do
33350  # Extract the first word of "$ac_prog", so it can be a program name with args.
33351set dummy $ac_prog; ac_word=$2
33352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33353$as_echo_n "checking for $ac_word... " >&6; }
33354if ${ac_cv_path_LIPO+:} false; then :
33355  $as_echo_n "(cached) " >&6
33356else
33357  case $LIPO in
33358  [\\/]* | ?:[\\/]*)
33359  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33360  ;;
33361  *)
33362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33363for as_dir in $PATH
33364do
33365  IFS=$as_save_IFS
33366  test -z "$as_dir" && as_dir=.
33367    for ac_exec_ext in '' $ac_executable_extensions; do
33368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33369    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33371    break 2
33372  fi
33373done
33374  done
33375IFS=$as_save_IFS
33376
33377  ;;
33378esac
33379fi
33380LIPO=$ac_cv_path_LIPO
33381if test -n "$LIPO"; then
33382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33383$as_echo "$LIPO" >&6; }
33384else
33385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33386$as_echo "no" >&6; }
33387fi
33388
33389
33390  test -n "$LIPO" && break
33391done
33392
33393  else
33394    # The variable is set, but is it from the command line or the environment?
33395
33396    # Try to remove the string !LIPO! from our list.
33397    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33398    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33399      # If it failed, the variable was not from the command line. Ignore it,
33400      # but warn the user (except for BASH, which is always set by the calling BASH).
33401      if test "xLIPO" != xBASH; then
33402        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33403$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33404      fi
33405      # Try to locate tool using the code snippet
33406      for ac_prog in lipo
33407do
33408  # Extract the first word of "$ac_prog", so it can be a program name with args.
33409set dummy $ac_prog; ac_word=$2
33410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33411$as_echo_n "checking for $ac_word... " >&6; }
33412if ${ac_cv_path_LIPO+:} false; then :
33413  $as_echo_n "(cached) " >&6
33414else
33415  case $LIPO in
33416  [\\/]* | ?:[\\/]*)
33417  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33418  ;;
33419  *)
33420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33421for as_dir in $PATH
33422do
33423  IFS=$as_save_IFS
33424  test -z "$as_dir" && as_dir=.
33425    for ac_exec_ext in '' $ac_executable_extensions; do
33426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33427    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33429    break 2
33430  fi
33431done
33432  done
33433IFS=$as_save_IFS
33434
33435  ;;
33436esac
33437fi
33438LIPO=$ac_cv_path_LIPO
33439if test -n "$LIPO"; then
33440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33441$as_echo "$LIPO" >&6; }
33442else
33443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33444$as_echo "no" >&6; }
33445fi
33446
33447
33448  test -n "$LIPO" && break
33449done
33450
33451    else
33452      # If it succeeded, then it was overridden by the user. We will use it
33453      # for the tool.
33454
33455      # First remove it from the list of overridden variables, so we can test
33456      # for unknown variables in the end.
33457      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33458
33459      # Check if the provided tool contains a complete path.
33460      tool_specified="$LIPO"
33461      tool_basename="${tool_specified##*/}"
33462      if test "x$tool_basename" = "x$tool_specified"; then
33463        # A command without a complete path is provided, search $PATH.
33464        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33465$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33466        # Extract the first word of "$tool_basename", so it can be a program name with args.
33467set dummy $tool_basename; ac_word=$2
33468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33469$as_echo_n "checking for $ac_word... " >&6; }
33470if ${ac_cv_path_LIPO+:} false; then :
33471  $as_echo_n "(cached) " >&6
33472else
33473  case $LIPO in
33474  [\\/]* | ?:[\\/]*)
33475  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33476  ;;
33477  *)
33478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33479for as_dir in $PATH
33480do
33481  IFS=$as_save_IFS
33482  test -z "$as_dir" && as_dir=.
33483    for ac_exec_ext in '' $ac_executable_extensions; do
33484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33485    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33487    break 2
33488  fi
33489done
33490  done
33491IFS=$as_save_IFS
33492
33493  ;;
33494esac
33495fi
33496LIPO=$ac_cv_path_LIPO
33497if test -n "$LIPO"; then
33498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33499$as_echo "$LIPO" >&6; }
33500else
33501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33502$as_echo "no" >&6; }
33503fi
33504
33505
33506        if test "x$LIPO" = x; then
33507          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33508        fi
33509      else
33510        # Otherwise we believe it is a complete path. Use it as it is.
33511        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33512$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33513        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33514$as_echo_n "checking for LIPO... " >&6; }
33515        if test ! -x "$tool_specified"; then
33516          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33517$as_echo "not found" >&6; }
33518          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33519        fi
33520        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33521$as_echo "$tool_specified" >&6; }
33522      fi
33523    fi
33524  fi
33525
33526
33527
33528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33529
33530  # First separate the path from the arguments. This will split at the first
33531  # space.
33532  complete="$LIPO"
33533  path="${complete%% *}"
33534  tmp="$complete EOL"
33535  arguments="${tmp#* }"
33536
33537  # Input might be given as Windows format, start by converting to
33538  # unix format.
33539  new_path=`$CYGPATH -u "$path"`
33540
33541  # Now try to locate executable using which
33542  new_path=`$WHICH "$new_path" 2> /dev/null`
33543  # bat and cmd files are not always considered executable in cygwin causing which
33544  # to not find them
33545  if test "x$new_path" = x \
33546      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33547      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33548    new_path=`$CYGPATH -u "$path"`
33549  fi
33550  if test "x$new_path" = x; then
33551    # Oops. Which didn't find the executable.
33552    # The splitting of arguments from the executable at a space might have been incorrect,
33553    # since paths with space are more likely in Windows. Give it another try with the whole
33554    # argument.
33555    path="$complete"
33556    arguments="EOL"
33557    new_path=`$CYGPATH -u "$path"`
33558    new_path=`$WHICH "$new_path" 2> /dev/null`
33559    # bat and cmd files are not always considered executable in cygwin causing which
33560    # to not find them
33561    if test "x$new_path" = x \
33562        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33563        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33564      new_path=`$CYGPATH -u "$path"`
33565    fi
33566    if test "x$new_path" = x; then
33567      # It's still not found. Now this is an unrecoverable error.
33568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33569$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33570      has_space=`$ECHO "$complete" | $GREP " "`
33571      if test "x$has_space" != x; then
33572        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33573$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33574      fi
33575      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33576    fi
33577  fi
33578
33579  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33580  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33581  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33582  # "foo.exe" is OK but "foo" is an error.
33583  #
33584  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33585  # It is also a way to make sure we got the proper file name for the real test later on.
33586  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33587  if test "x$test_shortpath" = x; then
33588    # Short path failed, file does not exist as specified.
33589    # Try adding .exe or .cmd
33590    if test -f "${new_path}.exe"; then
33591      input_to_shortpath="${new_path}.exe"
33592    elif test -f "${new_path}.cmd"; then
33593      input_to_shortpath="${new_path}.cmd"
33594    else
33595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33596$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33597      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33598$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33599      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33600    fi
33601  else
33602    input_to_shortpath="$new_path"
33603  fi
33604
33605  # Call helper function which possibly converts this using DOS-style short mode.
33606  # If so, the updated path is stored in $new_path.
33607  new_path="$input_to_shortpath"
33608
33609  input_path="$input_to_shortpath"
33610  # Check if we need to convert this using DOS-style short mode. If the path
33611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33612  # take no chances and rewrite it.
33613  # Note: m4 eats our [], so we need to use [ and ] instead.
33614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33615  if test "x$has_forbidden_chars" != x; then
33616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33617    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33618    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33619    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33620      # Going to short mode and back again did indeed matter. Since short mode is
33621      # case insensitive, let's make it lowercase to improve readability.
33622      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33623      # Now convert it back to Unix-stile (cygpath)
33624      input_path=`$CYGPATH -u "$shortmode_path"`
33625      new_path="$input_path"
33626    fi
33627  fi
33628
33629  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33630  if test "x$test_cygdrive_prefix" = x; then
33631    # As a simple fix, exclude /usr/bin since it's not a real path.
33632    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33633      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33634      # a path prefixed by /cygdrive for fixpath to work.
33635      new_path="$CYGWIN_ROOT_PATH$input_path"
33636    fi
33637  fi
33638
33639  # remove trailing .exe if any
33640  new_path="${new_path/%.exe/}"
33641
33642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33643
33644  # First separate the path from the arguments. This will split at the first
33645  # space.
33646  complete="$LIPO"
33647  path="${complete%% *}"
33648  tmp="$complete EOL"
33649  arguments="${tmp#* }"
33650
33651  # Input might be given as Windows format, start by converting to
33652  # unix format.
33653  new_path="$path"
33654
33655  windows_path="$new_path"
33656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33657    unix_path=`$CYGPATH -u "$windows_path"`
33658    new_path="$unix_path"
33659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33661    new_path="$unix_path"
33662  fi
33663
33664
33665  # Now try to locate executable using which
33666  new_path=`$WHICH "$new_path" 2> /dev/null`
33667
33668  if test "x$new_path" = x; then
33669    # Oops. Which didn't find the executable.
33670    # The splitting of arguments from the executable at a space might have been incorrect,
33671    # since paths with space are more likely in Windows. Give it another try with the whole
33672    # argument.
33673    path="$complete"
33674    arguments="EOL"
33675    new_path="$path"
33676
33677  windows_path="$new_path"
33678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33679    unix_path=`$CYGPATH -u "$windows_path"`
33680    new_path="$unix_path"
33681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33683    new_path="$unix_path"
33684  fi
33685
33686
33687    new_path=`$WHICH "$new_path" 2> /dev/null`
33688
33689    if test "x$new_path" = x; then
33690      # It's still not found. Now this is an unrecoverable error.
33691      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33692$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33693      has_space=`$ECHO "$complete" | $GREP " "`
33694      if test "x$has_space" != x; then
33695        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33696$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33697      fi
33698      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33699    fi
33700  fi
33701
33702  # Now new_path has a complete unix path to the binary
33703  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33704    # Keep paths in /bin as-is, but remove trailing .exe if any
33705    new_path="${new_path/%.exe/}"
33706    # Do not save /bin paths to all_fixpath_prefixes!
33707  else
33708    # Not in mixed or Windows style, start by that.
33709    new_path=`cmd //c echo $new_path`
33710
33711  input_path="$new_path"
33712  # Check if we need to convert this using DOS-style short mode. If the path
33713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33714  # take no chances and rewrite it.
33715  # Note: m4 eats our [], so we need to use [ and ] instead.
33716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33717  if test "x$has_forbidden_chars" != x; then
33718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33719    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33720  fi
33721
33722    # Output is in $new_path
33723
33724  windows_path="$new_path"
33725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33726    unix_path=`$CYGPATH -u "$windows_path"`
33727    new_path="$unix_path"
33728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33730    new_path="$unix_path"
33731  fi
33732
33733    # remove trailing .exe if any
33734    new_path="${new_path/%.exe/}"
33735
33736    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33737    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33738  fi
33739
33740  else
33741    # We're on a posix platform. Hooray! :)
33742    # First separate the path from the arguments. This will split at the first
33743    # space.
33744    complete="$LIPO"
33745    path="${complete%% *}"
33746    tmp="$complete EOL"
33747    arguments="${tmp#* }"
33748
33749    # Cannot rely on the command "which" here since it doesn't always work.
33750    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33751    if test -z "$is_absolute_path"; then
33752      # Path to executable is not absolute. Find it.
33753      IFS_save="$IFS"
33754      IFS=:
33755      for p in $PATH; do
33756        if test -f "$p/$path" && test -x "$p/$path"; then
33757          new_path="$p/$path"
33758          break
33759        fi
33760      done
33761      IFS="$IFS_save"
33762    else
33763      # This is an absolute path, we can use it without further modifications.
33764      new_path="$path"
33765    fi
33766
33767    if test "x$new_path" = x; then
33768      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33769$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33770      has_space=`$ECHO "$complete" | $GREP " "`
33771      if test "x$has_space" != x; then
33772        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33773$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33774      fi
33775      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33776    fi
33777  fi
33778
33779  # Now join together the path and the arguments once again
33780  if test "x$arguments" != xEOL; then
33781    new_complete="$new_path ${arguments% *}"
33782  else
33783    new_complete="$new_path"
33784  fi
33785
33786  if test "x$complete" != "x$new_complete"; then
33787    LIPO="$new_complete"
33788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33789$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33790  fi
33791
33792  else
33793    OBJC=
33794  fi
33795
33796  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33797    # Extract the first word of "mt", so it can be a program name with args.
33798set dummy mt; ac_word=$2
33799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33800$as_echo_n "checking for $ac_word... " >&6; }
33801if ${ac_cv_prog_MT+:} false; then :
33802  $as_echo_n "(cached) " >&6
33803else
33804  if test -n "$MT"; then
33805  ac_cv_prog_MT="$MT" # Let the user override the test.
33806else
33807  ac_prog_rejected=no
33808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33809for as_dir in $PATH
33810do
33811  IFS=$as_save_IFS
33812  test -z "$as_dir" && as_dir=.
33813    for ac_exec_ext in '' $ac_executable_extensions; do
33814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33815    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33816       ac_prog_rejected=yes
33817       continue
33818     fi
33819    ac_cv_prog_MT="mt"
33820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33821    break 2
33822  fi
33823done
33824  done
33825IFS=$as_save_IFS
33826
33827if test $ac_prog_rejected = yes; then
33828  # We found a bogon in the path, so make sure we never use it.
33829  set dummy $ac_cv_prog_MT
33830  shift
33831  if test $# != 0; then
33832    # We chose a different compiler from the bogus one.
33833    # However, it has the same basename, so the bogon will be chosen
33834    # first if we set MT to just the basename; use the full file name.
33835    shift
33836    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33837  fi
33838fi
33839fi
33840fi
33841MT=$ac_cv_prog_MT
33842if test -n "$MT"; then
33843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33844$as_echo "$MT" >&6; }
33845else
33846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33847$as_echo "no" >&6; }
33848fi
33849
33850
33851
33852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33853
33854  # First separate the path from the arguments. This will split at the first
33855  # space.
33856  complete="$MT"
33857  path="${complete%% *}"
33858  tmp="$complete EOL"
33859  arguments="${tmp#* }"
33860
33861  # Input might be given as Windows format, start by converting to
33862  # unix format.
33863  new_path=`$CYGPATH -u "$path"`
33864
33865  # Now try to locate executable using which
33866  new_path=`$WHICH "$new_path" 2> /dev/null`
33867  # bat and cmd files are not always considered executable in cygwin causing which
33868  # to not find them
33869  if test "x$new_path" = x \
33870      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33871      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33872    new_path=`$CYGPATH -u "$path"`
33873  fi
33874  if test "x$new_path" = x; then
33875    # Oops. Which didn't find the executable.
33876    # The splitting of arguments from the executable at a space might have been incorrect,
33877    # since paths with space are more likely in Windows. Give it another try with the whole
33878    # argument.
33879    path="$complete"
33880    arguments="EOL"
33881    new_path=`$CYGPATH -u "$path"`
33882    new_path=`$WHICH "$new_path" 2> /dev/null`
33883    # bat and cmd files are not always considered executable in cygwin causing which
33884    # to not find them
33885    if test "x$new_path" = x \
33886        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33887        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33888      new_path=`$CYGPATH -u "$path"`
33889    fi
33890    if test "x$new_path" = x; then
33891      # It's still not found. Now this is an unrecoverable error.
33892      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33893$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33894      has_space=`$ECHO "$complete" | $GREP " "`
33895      if test "x$has_space" != x; then
33896        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33897$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33898      fi
33899      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33900    fi
33901  fi
33902
33903  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33904  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33905  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33906  # "foo.exe" is OK but "foo" is an error.
33907  #
33908  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33909  # It is also a way to make sure we got the proper file name for the real test later on.
33910  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33911  if test "x$test_shortpath" = x; then
33912    # Short path failed, file does not exist as specified.
33913    # Try adding .exe or .cmd
33914    if test -f "${new_path}.exe"; then
33915      input_to_shortpath="${new_path}.exe"
33916    elif test -f "${new_path}.cmd"; then
33917      input_to_shortpath="${new_path}.cmd"
33918    else
33919      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33920$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33921      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33922$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33923      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33924    fi
33925  else
33926    input_to_shortpath="$new_path"
33927  fi
33928
33929  # Call helper function which possibly converts this using DOS-style short mode.
33930  # If so, the updated path is stored in $new_path.
33931  new_path="$input_to_shortpath"
33932
33933  input_path="$input_to_shortpath"
33934  # Check if we need to convert this using DOS-style short mode. If the path
33935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33936  # take no chances and rewrite it.
33937  # Note: m4 eats our [], so we need to use [ and ] instead.
33938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33939  if test "x$has_forbidden_chars" != x; then
33940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33941    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33942    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33943    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33944      # Going to short mode and back again did indeed matter. Since short mode is
33945      # case insensitive, let's make it lowercase to improve readability.
33946      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33947      # Now convert it back to Unix-stile (cygpath)
33948      input_path=`$CYGPATH -u "$shortmode_path"`
33949      new_path="$input_path"
33950    fi
33951  fi
33952
33953  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33954  if test "x$test_cygdrive_prefix" = x; then
33955    # As a simple fix, exclude /usr/bin since it's not a real path.
33956    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33957      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33958      # a path prefixed by /cygdrive for fixpath to work.
33959      new_path="$CYGWIN_ROOT_PATH$input_path"
33960    fi
33961  fi
33962
33963  # remove trailing .exe if any
33964  new_path="${new_path/%.exe/}"
33965
33966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33967
33968  # First separate the path from the arguments. This will split at the first
33969  # space.
33970  complete="$MT"
33971  path="${complete%% *}"
33972  tmp="$complete EOL"
33973  arguments="${tmp#* }"
33974
33975  # Input might be given as Windows format, start by converting to
33976  # unix format.
33977  new_path="$path"
33978
33979  windows_path="$new_path"
33980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33981    unix_path=`$CYGPATH -u "$windows_path"`
33982    new_path="$unix_path"
33983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33985    new_path="$unix_path"
33986  fi
33987
33988
33989  # Now try to locate executable using which
33990  new_path=`$WHICH "$new_path" 2> /dev/null`
33991
33992  if test "x$new_path" = x; then
33993    # Oops. Which didn't find the executable.
33994    # The splitting of arguments from the executable at a space might have been incorrect,
33995    # since paths with space are more likely in Windows. Give it another try with the whole
33996    # argument.
33997    path="$complete"
33998    arguments="EOL"
33999    new_path="$path"
34000
34001  windows_path="$new_path"
34002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34003    unix_path=`$CYGPATH -u "$windows_path"`
34004    new_path="$unix_path"
34005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34007    new_path="$unix_path"
34008  fi
34009
34010
34011    new_path=`$WHICH "$new_path" 2> /dev/null`
34012
34013    if test "x$new_path" = x; then
34014      # It's still not found. Now this is an unrecoverable error.
34015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34016$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34017      has_space=`$ECHO "$complete" | $GREP " "`
34018      if test "x$has_space" != x; then
34019        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34020$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34021      fi
34022      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34023    fi
34024  fi
34025
34026  # Now new_path has a complete unix path to the binary
34027  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34028    # Keep paths in /bin as-is, but remove trailing .exe if any
34029    new_path="${new_path/%.exe/}"
34030    # Do not save /bin paths to all_fixpath_prefixes!
34031  else
34032    # Not in mixed or Windows style, start by that.
34033    new_path=`cmd //c echo $new_path`
34034
34035  input_path="$new_path"
34036  # Check if we need to convert this using DOS-style short mode. If the path
34037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34038  # take no chances and rewrite it.
34039  # Note: m4 eats our [], so we need to use [ and ] instead.
34040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34041  if test "x$has_forbidden_chars" != x; then
34042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34043    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34044  fi
34045
34046    # Output is in $new_path
34047
34048  windows_path="$new_path"
34049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34050    unix_path=`$CYGPATH -u "$windows_path"`
34051    new_path="$unix_path"
34052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34054    new_path="$unix_path"
34055  fi
34056
34057    # remove trailing .exe if any
34058    new_path="${new_path/%.exe/}"
34059
34060    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34061    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34062  fi
34063
34064  else
34065    # We're on a posix platform. Hooray! :)
34066    # First separate the path from the arguments. This will split at the first
34067    # space.
34068    complete="$MT"
34069    path="${complete%% *}"
34070    tmp="$complete EOL"
34071    arguments="${tmp#* }"
34072
34073    # Cannot rely on the command "which" here since it doesn't always work.
34074    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34075    if test -z "$is_absolute_path"; then
34076      # Path to executable is not absolute. Find it.
34077      IFS_save="$IFS"
34078      IFS=:
34079      for p in $PATH; do
34080        if test -f "$p/$path" && test -x "$p/$path"; then
34081          new_path="$p/$path"
34082          break
34083        fi
34084      done
34085      IFS="$IFS_save"
34086    else
34087      # This is an absolute path, we can use it without further modifications.
34088      new_path="$path"
34089    fi
34090
34091    if test "x$new_path" = x; then
34092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34093$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34094      has_space=`$ECHO "$complete" | $GREP " "`
34095      if test "x$has_space" != x; then
34096        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34097$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34098      fi
34099      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34100    fi
34101  fi
34102
34103  # Now join together the path and the arguments once again
34104  if test "x$arguments" != xEOL; then
34105    new_complete="$new_path ${arguments% *}"
34106  else
34107    new_complete="$new_path"
34108  fi
34109
34110  if test "x$complete" != "x$new_complete"; then
34111    MT="$new_complete"
34112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34113$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34114  fi
34115
34116    # Setup the resource compiler (RC)
34117    # Extract the first word of "rc", so it can be a program name with args.
34118set dummy rc; ac_word=$2
34119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34120$as_echo_n "checking for $ac_word... " >&6; }
34121if ${ac_cv_prog_RC+:} false; then :
34122  $as_echo_n "(cached) " >&6
34123else
34124  if test -n "$RC"; then
34125  ac_cv_prog_RC="$RC" # Let the user override the test.
34126else
34127  ac_prog_rejected=no
34128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34129for as_dir in $PATH
34130do
34131  IFS=$as_save_IFS
34132  test -z "$as_dir" && as_dir=.
34133    for ac_exec_ext in '' $ac_executable_extensions; do
34134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34135    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34136       ac_prog_rejected=yes
34137       continue
34138     fi
34139    ac_cv_prog_RC="rc"
34140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34141    break 2
34142  fi
34143done
34144  done
34145IFS=$as_save_IFS
34146
34147if test $ac_prog_rejected = yes; then
34148  # We found a bogon in the path, so make sure we never use it.
34149  set dummy $ac_cv_prog_RC
34150  shift
34151  if test $# != 0; then
34152    # We chose a different compiler from the bogus one.
34153    # However, it has the same basename, so the bogon will be chosen
34154    # first if we set RC to just the basename; use the full file name.
34155    shift
34156    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34157  fi
34158fi
34159fi
34160fi
34161RC=$ac_cv_prog_RC
34162if test -n "$RC"; then
34163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34164$as_echo "$RC" >&6; }
34165else
34166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34167$as_echo "no" >&6; }
34168fi
34169
34170
34171
34172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34173
34174  # First separate the path from the arguments. This will split at the first
34175  # space.
34176  complete="$RC"
34177  path="${complete%% *}"
34178  tmp="$complete EOL"
34179  arguments="${tmp#* }"
34180
34181  # Input might be given as Windows format, start by converting to
34182  # unix format.
34183  new_path=`$CYGPATH -u "$path"`
34184
34185  # Now try to locate executable using which
34186  new_path=`$WHICH "$new_path" 2> /dev/null`
34187  # bat and cmd files are not always considered executable in cygwin causing which
34188  # to not find them
34189  if test "x$new_path" = x \
34190      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34191      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34192    new_path=`$CYGPATH -u "$path"`
34193  fi
34194  if test "x$new_path" = x; then
34195    # Oops. Which didn't find the executable.
34196    # The splitting of arguments from the executable at a space might have been incorrect,
34197    # since paths with space are more likely in Windows. Give it another try with the whole
34198    # argument.
34199    path="$complete"
34200    arguments="EOL"
34201    new_path=`$CYGPATH -u "$path"`
34202    new_path=`$WHICH "$new_path" 2> /dev/null`
34203    # bat and cmd files are not always considered executable in cygwin causing which
34204    # to not find them
34205    if test "x$new_path" = x \
34206        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34207        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34208      new_path=`$CYGPATH -u "$path"`
34209    fi
34210    if test "x$new_path" = x; then
34211      # It's still not found. Now this is an unrecoverable error.
34212      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34213$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34214      has_space=`$ECHO "$complete" | $GREP " "`
34215      if test "x$has_space" != x; then
34216        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34217$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34218      fi
34219      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34220    fi
34221  fi
34222
34223  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34224  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34225  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34226  # "foo.exe" is OK but "foo" is an error.
34227  #
34228  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34229  # It is also a way to make sure we got the proper file name for the real test later on.
34230  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34231  if test "x$test_shortpath" = x; then
34232    # Short path failed, file does not exist as specified.
34233    # Try adding .exe or .cmd
34234    if test -f "${new_path}.exe"; then
34235      input_to_shortpath="${new_path}.exe"
34236    elif test -f "${new_path}.cmd"; then
34237      input_to_shortpath="${new_path}.cmd"
34238    else
34239      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34240$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34241      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34242$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34243      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34244    fi
34245  else
34246    input_to_shortpath="$new_path"
34247  fi
34248
34249  # Call helper function which possibly converts this using DOS-style short mode.
34250  # If so, the updated path is stored in $new_path.
34251  new_path="$input_to_shortpath"
34252
34253  input_path="$input_to_shortpath"
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34264      # Going to short mode and back again did indeed matter. Since short mode is
34265      # case insensitive, let's make it lowercase to improve readability.
34266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34267      # Now convert it back to Unix-stile (cygpath)
34268      input_path=`$CYGPATH -u "$shortmode_path"`
34269      new_path="$input_path"
34270    fi
34271  fi
34272
34273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34274  if test "x$test_cygdrive_prefix" = x; then
34275    # As a simple fix, exclude /usr/bin since it's not a real path.
34276    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34278      # a path prefixed by /cygdrive for fixpath to work.
34279      new_path="$CYGWIN_ROOT_PATH$input_path"
34280    fi
34281  fi
34282
34283  # remove trailing .exe if any
34284  new_path="${new_path/%.exe/}"
34285
34286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34287
34288  # First separate the path from the arguments. This will split at the first
34289  # space.
34290  complete="$RC"
34291  path="${complete%% *}"
34292  tmp="$complete EOL"
34293  arguments="${tmp#* }"
34294
34295  # Input might be given as Windows format, start by converting to
34296  # unix format.
34297  new_path="$path"
34298
34299  windows_path="$new_path"
34300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34301    unix_path=`$CYGPATH -u "$windows_path"`
34302    new_path="$unix_path"
34303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34305    new_path="$unix_path"
34306  fi
34307
34308
34309  # Now try to locate executable using which
34310  new_path=`$WHICH "$new_path" 2> /dev/null`
34311
34312  if test "x$new_path" = x; then
34313    # Oops. Which didn't find the executable.
34314    # The splitting of arguments from the executable at a space might have been incorrect,
34315    # since paths with space are more likely in Windows. Give it another try with the whole
34316    # argument.
34317    path="$complete"
34318    arguments="EOL"
34319    new_path="$path"
34320
34321  windows_path="$new_path"
34322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34323    unix_path=`$CYGPATH -u "$windows_path"`
34324    new_path="$unix_path"
34325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34327    new_path="$unix_path"
34328  fi
34329
34330
34331    new_path=`$WHICH "$new_path" 2> /dev/null`
34332
34333    if test "x$new_path" = x; then
34334      # It's still not found. Now this is an unrecoverable error.
34335      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34336$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34337      has_space=`$ECHO "$complete" | $GREP " "`
34338      if test "x$has_space" != x; then
34339        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34340$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34341      fi
34342      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34343    fi
34344  fi
34345
34346  # Now new_path has a complete unix path to the binary
34347  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34348    # Keep paths in /bin as-is, but remove trailing .exe if any
34349    new_path="${new_path/%.exe/}"
34350    # Do not save /bin paths to all_fixpath_prefixes!
34351  else
34352    # Not in mixed or Windows style, start by that.
34353    new_path=`cmd //c echo $new_path`
34354
34355  input_path="$new_path"
34356  # Check if we need to convert this using DOS-style short mode. If the path
34357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34358  # take no chances and rewrite it.
34359  # Note: m4 eats our [], so we need to use [ and ] instead.
34360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34361  if test "x$has_forbidden_chars" != x; then
34362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34363    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34364  fi
34365
34366    # Output is in $new_path
34367
34368  windows_path="$new_path"
34369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34370    unix_path=`$CYGPATH -u "$windows_path"`
34371    new_path="$unix_path"
34372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34374    new_path="$unix_path"
34375  fi
34376
34377    # remove trailing .exe if any
34378    new_path="${new_path/%.exe/}"
34379
34380    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34381    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34382  fi
34383
34384  else
34385    # We're on a posix platform. Hooray! :)
34386    # First separate the path from the arguments. This will split at the first
34387    # space.
34388    complete="$RC"
34389    path="${complete%% *}"
34390    tmp="$complete EOL"
34391    arguments="${tmp#* }"
34392
34393    # Cannot rely on the command "which" here since it doesn't always work.
34394    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34395    if test -z "$is_absolute_path"; then
34396      # Path to executable is not absolute. Find it.
34397      IFS_save="$IFS"
34398      IFS=:
34399      for p in $PATH; do
34400        if test -f "$p/$path" && test -x "$p/$path"; then
34401          new_path="$p/$path"
34402          break
34403        fi
34404      done
34405      IFS="$IFS_save"
34406    else
34407      # This is an absolute path, we can use it without further modifications.
34408      new_path="$path"
34409    fi
34410
34411    if test "x$new_path" = x; then
34412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34413$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34414      has_space=`$ECHO "$complete" | $GREP " "`
34415      if test "x$has_space" != x; then
34416        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34417$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34418      fi
34419      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34420    fi
34421  fi
34422
34423  # Now join together the path and the arguments once again
34424  if test "x$arguments" != xEOL; then
34425    new_complete="$new_path ${arguments% *}"
34426  else
34427    new_complete="$new_path"
34428  fi
34429
34430  if test "x$complete" != "x$new_complete"; then
34431    RC="$new_complete"
34432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34433$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34434  fi
34435
34436    # Extract the first word of "dumpbin", so it can be a program name with args.
34437set dummy dumpbin; ac_word=$2
34438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34439$as_echo_n "checking for $ac_word... " >&6; }
34440if ${ac_cv_prog_DUMPBIN+:} false; then :
34441  $as_echo_n "(cached) " >&6
34442else
34443  if test -n "$DUMPBIN"; then
34444  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34445else
34446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34447for as_dir in $PATH
34448do
34449  IFS=$as_save_IFS
34450  test -z "$as_dir" && as_dir=.
34451    for ac_exec_ext in '' $ac_executable_extensions; do
34452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34453    ac_cv_prog_DUMPBIN="dumpbin"
34454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34455    break 2
34456  fi
34457done
34458  done
34459IFS=$as_save_IFS
34460
34461fi
34462fi
34463DUMPBIN=$ac_cv_prog_DUMPBIN
34464if test -n "$DUMPBIN"; then
34465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34466$as_echo "$DUMPBIN" >&6; }
34467else
34468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34469$as_echo "no" >&6; }
34470fi
34471
34472
34473
34474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34475
34476  # First separate the path from the arguments. This will split at the first
34477  # space.
34478  complete="$DUMPBIN"
34479  path="${complete%% *}"
34480  tmp="$complete EOL"
34481  arguments="${tmp#* }"
34482
34483  # Input might be given as Windows format, start by converting to
34484  # unix format.
34485  new_path=`$CYGPATH -u "$path"`
34486
34487  # Now try to locate executable using which
34488  new_path=`$WHICH "$new_path" 2> /dev/null`
34489  # bat and cmd files are not always considered executable in cygwin causing which
34490  # to not find them
34491  if test "x$new_path" = x \
34492      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34493      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34494    new_path=`$CYGPATH -u "$path"`
34495  fi
34496  if test "x$new_path" = x; then
34497    # Oops. Which didn't find the executable.
34498    # The splitting of arguments from the executable at a space might have been incorrect,
34499    # since paths with space are more likely in Windows. Give it another try with the whole
34500    # argument.
34501    path="$complete"
34502    arguments="EOL"
34503    new_path=`$CYGPATH -u "$path"`
34504    new_path=`$WHICH "$new_path" 2> /dev/null`
34505    # bat and cmd files are not always considered executable in cygwin causing which
34506    # to not find them
34507    if test "x$new_path" = x \
34508        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34509        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34510      new_path=`$CYGPATH -u "$path"`
34511    fi
34512    if test "x$new_path" = x; then
34513      # It's still not found. Now this is an unrecoverable error.
34514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34515$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34516      has_space=`$ECHO "$complete" | $GREP " "`
34517      if test "x$has_space" != x; then
34518        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34519$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34520      fi
34521      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34522    fi
34523  fi
34524
34525  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34526  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34527  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34528  # "foo.exe" is OK but "foo" is an error.
34529  #
34530  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34531  # It is also a way to make sure we got the proper file name for the real test later on.
34532  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34533  if test "x$test_shortpath" = x; then
34534    # Short path failed, file does not exist as specified.
34535    # Try adding .exe or .cmd
34536    if test -f "${new_path}.exe"; then
34537      input_to_shortpath="${new_path}.exe"
34538    elif test -f "${new_path}.cmd"; then
34539      input_to_shortpath="${new_path}.cmd"
34540    else
34541      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34542$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34543      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34544$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34545      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34546    fi
34547  else
34548    input_to_shortpath="$new_path"
34549  fi
34550
34551  # Call helper function which possibly converts this using DOS-style short mode.
34552  # If so, the updated path is stored in $new_path.
34553  new_path="$input_to_shortpath"
34554
34555  input_path="$input_to_shortpath"
34556  # Check if we need to convert this using DOS-style short mode. If the path
34557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34558  # take no chances and rewrite it.
34559  # Note: m4 eats our [], so we need to use [ and ] instead.
34560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34561  if test "x$has_forbidden_chars" != x; then
34562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34563    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34564    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34565    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34566      # Going to short mode and back again did indeed matter. Since short mode is
34567      # case insensitive, let's make it lowercase to improve readability.
34568      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34569      # Now convert it back to Unix-stile (cygpath)
34570      input_path=`$CYGPATH -u "$shortmode_path"`
34571      new_path="$input_path"
34572    fi
34573  fi
34574
34575  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34576  if test "x$test_cygdrive_prefix" = x; then
34577    # As a simple fix, exclude /usr/bin since it's not a real path.
34578    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34579      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34580      # a path prefixed by /cygdrive for fixpath to work.
34581      new_path="$CYGWIN_ROOT_PATH$input_path"
34582    fi
34583  fi
34584
34585  # remove trailing .exe if any
34586  new_path="${new_path/%.exe/}"
34587
34588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34589
34590  # First separate the path from the arguments. This will split at the first
34591  # space.
34592  complete="$DUMPBIN"
34593  path="${complete%% *}"
34594  tmp="$complete EOL"
34595  arguments="${tmp#* }"
34596
34597  # Input might be given as Windows format, start by converting to
34598  # unix format.
34599  new_path="$path"
34600
34601  windows_path="$new_path"
34602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34603    unix_path=`$CYGPATH -u "$windows_path"`
34604    new_path="$unix_path"
34605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34607    new_path="$unix_path"
34608  fi
34609
34610
34611  # Now try to locate executable using which
34612  new_path=`$WHICH "$new_path" 2> /dev/null`
34613
34614  if test "x$new_path" = x; then
34615    # Oops. Which didn't find the executable.
34616    # The splitting of arguments from the executable at a space might have been incorrect,
34617    # since paths with space are more likely in Windows. Give it another try with the whole
34618    # argument.
34619    path="$complete"
34620    arguments="EOL"
34621    new_path="$path"
34622
34623  windows_path="$new_path"
34624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34625    unix_path=`$CYGPATH -u "$windows_path"`
34626    new_path="$unix_path"
34627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34629    new_path="$unix_path"
34630  fi
34631
34632
34633    new_path=`$WHICH "$new_path" 2> /dev/null`
34634
34635    if test "x$new_path" = x; then
34636      # It's still not found. Now this is an unrecoverable error.
34637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34638$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34639      has_space=`$ECHO "$complete" | $GREP " "`
34640      if test "x$has_space" != x; then
34641        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34642$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34643      fi
34644      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34645    fi
34646  fi
34647
34648  # Now new_path has a complete unix path to the binary
34649  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34650    # Keep paths in /bin as-is, but remove trailing .exe if any
34651    new_path="${new_path/%.exe/}"
34652    # Do not save /bin paths to all_fixpath_prefixes!
34653  else
34654    # Not in mixed or Windows style, start by that.
34655    new_path=`cmd //c echo $new_path`
34656
34657  input_path="$new_path"
34658  # Check if we need to convert this using DOS-style short mode. If the path
34659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34660  # take no chances and rewrite it.
34661  # Note: m4 eats our [], so we need to use [ and ] instead.
34662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34663  if test "x$has_forbidden_chars" != x; then
34664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34665    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34666  fi
34667
34668    # Output is in $new_path
34669
34670  windows_path="$new_path"
34671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34672    unix_path=`$CYGPATH -u "$windows_path"`
34673    new_path="$unix_path"
34674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34676    new_path="$unix_path"
34677  fi
34678
34679    # remove trailing .exe if any
34680    new_path="${new_path/%.exe/}"
34681
34682    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34683    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34684  fi
34685
34686  else
34687    # We're on a posix platform. Hooray! :)
34688    # First separate the path from the arguments. This will split at the first
34689    # space.
34690    complete="$DUMPBIN"
34691    path="${complete%% *}"
34692    tmp="$complete EOL"
34693    arguments="${tmp#* }"
34694
34695    # Cannot rely on the command "which" here since it doesn't always work.
34696    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34697    if test -z "$is_absolute_path"; then
34698      # Path to executable is not absolute. Find it.
34699      IFS_save="$IFS"
34700      IFS=:
34701      for p in $PATH; do
34702        if test -f "$p/$path" && test -x "$p/$path"; then
34703          new_path="$p/$path"
34704          break
34705        fi
34706      done
34707      IFS="$IFS_save"
34708    else
34709      # This is an absolute path, we can use it without further modifications.
34710      new_path="$path"
34711    fi
34712
34713    if test "x$new_path" = x; then
34714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34715$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34716      has_space=`$ECHO "$complete" | $GREP " "`
34717      if test "x$has_space" != x; then
34718        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34719$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34720      fi
34721      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34722    fi
34723  fi
34724
34725  # Now join together the path and the arguments once again
34726  if test "x$arguments" != xEOL; then
34727    new_complete="$new_path ${arguments% *}"
34728  else
34729    new_complete="$new_path"
34730  fi
34731
34732  if test "x$complete" != "x$new_complete"; then
34733    DUMPBIN="$new_complete"
34734    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34735$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34736  fi
34737
34738  fi
34739
34740  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34741
34742
34743  # Publish this variable in the help.
34744
34745
34746  if test "x$STRIP" = x; then
34747    # The variable is not set by user, try to locate tool using the code snippet
34748    for ac_prog in strip
34749do
34750  # Extract the first word of "$ac_prog", so it can be a program name with args.
34751set dummy $ac_prog; ac_word=$2
34752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34753$as_echo_n "checking for $ac_word... " >&6; }
34754if ${ac_cv_path_STRIP+:} false; then :
34755  $as_echo_n "(cached) " >&6
34756else
34757  case $STRIP in
34758  [\\/]* | ?:[\\/]*)
34759  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34760  ;;
34761  *)
34762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34763for as_dir in $PATH
34764do
34765  IFS=$as_save_IFS
34766  test -z "$as_dir" && as_dir=.
34767    for ac_exec_ext in '' $ac_executable_extensions; do
34768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34769    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34771    break 2
34772  fi
34773done
34774  done
34775IFS=$as_save_IFS
34776
34777  ;;
34778esac
34779fi
34780STRIP=$ac_cv_path_STRIP
34781if test -n "$STRIP"; then
34782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34783$as_echo "$STRIP" >&6; }
34784else
34785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34786$as_echo "no" >&6; }
34787fi
34788
34789
34790  test -n "$STRIP" && break
34791done
34792
34793  else
34794    # The variable is set, but is it from the command line or the environment?
34795
34796    # Try to remove the string !STRIP! from our list.
34797    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
34798    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34799      # If it failed, the variable was not from the command line. Ignore it,
34800      # but warn the user (except for BASH, which is always set by the calling BASH).
34801      if test "xSTRIP" != xBASH; then
34802        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
34803$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
34804      fi
34805      # Try to locate tool using the code snippet
34806      for ac_prog in strip
34807do
34808  # Extract the first word of "$ac_prog", so it can be a program name with args.
34809set dummy $ac_prog; ac_word=$2
34810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34811$as_echo_n "checking for $ac_word... " >&6; }
34812if ${ac_cv_path_STRIP+:} false; then :
34813  $as_echo_n "(cached) " >&6
34814else
34815  case $STRIP in
34816  [\\/]* | ?:[\\/]*)
34817  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34818  ;;
34819  *)
34820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34821for as_dir in $PATH
34822do
34823  IFS=$as_save_IFS
34824  test -z "$as_dir" && as_dir=.
34825    for ac_exec_ext in '' $ac_executable_extensions; do
34826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34827    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34829    break 2
34830  fi
34831done
34832  done
34833IFS=$as_save_IFS
34834
34835  ;;
34836esac
34837fi
34838STRIP=$ac_cv_path_STRIP
34839if test -n "$STRIP"; then
34840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34841$as_echo "$STRIP" >&6; }
34842else
34843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34844$as_echo "no" >&6; }
34845fi
34846
34847
34848  test -n "$STRIP" && break
34849done
34850
34851    else
34852      # If it succeeded, then it was overridden by the user. We will use it
34853      # for the tool.
34854
34855      # First remove it from the list of overridden variables, so we can test
34856      # for unknown variables in the end.
34857      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34858
34859      # Check if the provided tool contains a complete path.
34860      tool_specified="$STRIP"
34861      tool_basename="${tool_specified##*/}"
34862      if test "x$tool_basename" = "x$tool_specified"; then
34863        # A command without a complete path is provided, search $PATH.
34864        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
34865$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
34866        # Extract the first word of "$tool_basename", so it can be a program name with args.
34867set dummy $tool_basename; ac_word=$2
34868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34869$as_echo_n "checking for $ac_word... " >&6; }
34870if ${ac_cv_path_STRIP+:} false; then :
34871  $as_echo_n "(cached) " >&6
34872else
34873  case $STRIP in
34874  [\\/]* | ?:[\\/]*)
34875  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34876  ;;
34877  *)
34878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34879for as_dir in $PATH
34880do
34881  IFS=$as_save_IFS
34882  test -z "$as_dir" && as_dir=.
34883    for ac_exec_ext in '' $ac_executable_extensions; do
34884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34885    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34887    break 2
34888  fi
34889done
34890  done
34891IFS=$as_save_IFS
34892
34893  ;;
34894esac
34895fi
34896STRIP=$ac_cv_path_STRIP
34897if test -n "$STRIP"; then
34898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34899$as_echo "$STRIP" >&6; }
34900else
34901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34902$as_echo "no" >&6; }
34903fi
34904
34905
34906        if test "x$STRIP" = x; then
34907          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34908        fi
34909      else
34910        # Otherwise we believe it is a complete path. Use it as it is.
34911        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
34912$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
34913        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
34914$as_echo_n "checking for STRIP... " >&6; }
34915        if test ! -x "$tool_specified"; then
34916          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34917$as_echo "not found" >&6; }
34918          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
34919        fi
34920        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34921$as_echo "$tool_specified" >&6; }
34922      fi
34923    fi
34924  fi
34925
34926
34927
34928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34929
34930  # First separate the path from the arguments. This will split at the first
34931  # space.
34932  complete="$STRIP"
34933  path="${complete%% *}"
34934  tmp="$complete EOL"
34935  arguments="${tmp#* }"
34936
34937  # Input might be given as Windows format, start by converting to
34938  # unix format.
34939  new_path=`$CYGPATH -u "$path"`
34940
34941  # Now try to locate executable using which
34942  new_path=`$WHICH "$new_path" 2> /dev/null`
34943  # bat and cmd files are not always considered executable in cygwin causing which
34944  # to not find them
34945  if test "x$new_path" = x \
34946      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34947      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34948    new_path=`$CYGPATH -u "$path"`
34949  fi
34950  if test "x$new_path" = x; then
34951    # Oops. Which didn't find the executable.
34952    # The splitting of arguments from the executable at a space might have been incorrect,
34953    # since paths with space are more likely in Windows. Give it another try with the whole
34954    # argument.
34955    path="$complete"
34956    arguments="EOL"
34957    new_path=`$CYGPATH -u "$path"`
34958    new_path=`$WHICH "$new_path" 2> /dev/null`
34959    # bat and cmd files are not always considered executable in cygwin causing which
34960    # to not find them
34961    if test "x$new_path" = x \
34962        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34963        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34964      new_path=`$CYGPATH -u "$path"`
34965    fi
34966    if test "x$new_path" = x; then
34967      # It's still not found. Now this is an unrecoverable error.
34968      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34969$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34970      has_space=`$ECHO "$complete" | $GREP " "`
34971      if test "x$has_space" != x; then
34972        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34973$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34974      fi
34975      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34976    fi
34977  fi
34978
34979  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34980  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34981  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34982  # "foo.exe" is OK but "foo" is an error.
34983  #
34984  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34985  # It is also a way to make sure we got the proper file name for the real test later on.
34986  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34987  if test "x$test_shortpath" = x; then
34988    # Short path failed, file does not exist as specified.
34989    # Try adding .exe or .cmd
34990    if test -f "${new_path}.exe"; then
34991      input_to_shortpath="${new_path}.exe"
34992    elif test -f "${new_path}.cmd"; then
34993      input_to_shortpath="${new_path}.cmd"
34994    else
34995      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
34996$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
34997      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34998$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34999      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35000    fi
35001  else
35002    input_to_shortpath="$new_path"
35003  fi
35004
35005  # Call helper function which possibly converts this using DOS-style short mode.
35006  # If so, the updated path is stored in $new_path.
35007  new_path="$input_to_shortpath"
35008
35009  input_path="$input_to_shortpath"
35010  # Check if we need to convert this using DOS-style short mode. If the path
35011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35012  # take no chances and rewrite it.
35013  # Note: m4 eats our [], so we need to use [ and ] instead.
35014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35015  if test "x$has_forbidden_chars" != x; then
35016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35017    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35018    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35019    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35020      # Going to short mode and back again did indeed matter. Since short mode is
35021      # case insensitive, let's make it lowercase to improve readability.
35022      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35023      # Now convert it back to Unix-stile (cygpath)
35024      input_path=`$CYGPATH -u "$shortmode_path"`
35025      new_path="$input_path"
35026    fi
35027  fi
35028
35029  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35030  if test "x$test_cygdrive_prefix" = x; then
35031    # As a simple fix, exclude /usr/bin since it's not a real path.
35032    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35033      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35034      # a path prefixed by /cygdrive for fixpath to work.
35035      new_path="$CYGWIN_ROOT_PATH$input_path"
35036    fi
35037  fi
35038
35039  # remove trailing .exe if any
35040  new_path="${new_path/%.exe/}"
35041
35042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35043
35044  # First separate the path from the arguments. This will split at the first
35045  # space.
35046  complete="$STRIP"
35047  path="${complete%% *}"
35048  tmp="$complete EOL"
35049  arguments="${tmp#* }"
35050
35051  # Input might be given as Windows format, start by converting to
35052  # unix format.
35053  new_path="$path"
35054
35055  windows_path="$new_path"
35056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35057    unix_path=`$CYGPATH -u "$windows_path"`
35058    new_path="$unix_path"
35059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35061    new_path="$unix_path"
35062  fi
35063
35064
35065  # Now try to locate executable using which
35066  new_path=`$WHICH "$new_path" 2> /dev/null`
35067
35068  if test "x$new_path" = x; then
35069    # Oops. Which didn't find the executable.
35070    # The splitting of arguments from the executable at a space might have been incorrect,
35071    # since paths with space are more likely in Windows. Give it another try with the whole
35072    # argument.
35073    path="$complete"
35074    arguments="EOL"
35075    new_path="$path"
35076
35077  windows_path="$new_path"
35078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35079    unix_path=`$CYGPATH -u "$windows_path"`
35080    new_path="$unix_path"
35081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35083    new_path="$unix_path"
35084  fi
35085
35086
35087    new_path=`$WHICH "$new_path" 2> /dev/null`
35088
35089    if test "x$new_path" = x; then
35090      # It's still not found. Now this is an unrecoverable error.
35091      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35092$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35093      has_space=`$ECHO "$complete" | $GREP " "`
35094      if test "x$has_space" != x; then
35095        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35096$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35097      fi
35098      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35099    fi
35100  fi
35101
35102  # Now new_path has a complete unix path to the binary
35103  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35104    # Keep paths in /bin as-is, but remove trailing .exe if any
35105    new_path="${new_path/%.exe/}"
35106    # Do not save /bin paths to all_fixpath_prefixes!
35107  else
35108    # Not in mixed or Windows style, start by that.
35109    new_path=`cmd //c echo $new_path`
35110
35111  input_path="$new_path"
35112  # Check if we need to convert this using DOS-style short mode. If the path
35113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35114  # take no chances and rewrite it.
35115  # Note: m4 eats our [], so we need to use [ and ] instead.
35116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35117  if test "x$has_forbidden_chars" != x; then
35118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35119    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35120  fi
35121
35122    # Output is in $new_path
35123
35124  windows_path="$new_path"
35125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35126    unix_path=`$CYGPATH -u "$windows_path"`
35127    new_path="$unix_path"
35128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35130    new_path="$unix_path"
35131  fi
35132
35133    # remove trailing .exe if any
35134    new_path="${new_path/%.exe/}"
35135
35136    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35137    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35138  fi
35139
35140  else
35141    # We're on a posix platform. Hooray! :)
35142    # First separate the path from the arguments. This will split at the first
35143    # space.
35144    complete="$STRIP"
35145    path="${complete%% *}"
35146    tmp="$complete EOL"
35147    arguments="${tmp#* }"
35148
35149    # Cannot rely on the command "which" here since it doesn't always work.
35150    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35151    if test -z "$is_absolute_path"; then
35152      # Path to executable is not absolute. Find it.
35153      IFS_save="$IFS"
35154      IFS=:
35155      for p in $PATH; do
35156        if test -f "$p/$path" && test -x "$p/$path"; then
35157          new_path="$p/$path"
35158          break
35159        fi
35160      done
35161      IFS="$IFS_save"
35162    else
35163      # This is an absolute path, we can use it without further modifications.
35164      new_path="$path"
35165    fi
35166
35167    if test "x$new_path" = x; then
35168      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35169$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35170      has_space=`$ECHO "$complete" | $GREP " "`
35171      if test "x$has_space" != x; then
35172        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35173$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35174      fi
35175      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35176    fi
35177  fi
35178
35179  # Now join together the path and the arguments once again
35180  if test "x$arguments" != xEOL; then
35181    new_complete="$new_path ${arguments% *}"
35182  else
35183    new_complete="$new_path"
35184  fi
35185
35186  if test "x$complete" != "x$new_complete"; then
35187    STRIP="$new_complete"
35188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35189$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35190  fi
35191
35192
35193
35194  # Publish this variable in the help.
35195
35196
35197  if test "x$NM" = x; then
35198    # The variable is not set by user, try to locate tool using the code snippet
35199    for ac_prog in nm
35200do
35201  # Extract the first word of "$ac_prog", so it can be a program name with args.
35202set dummy $ac_prog; ac_word=$2
35203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35204$as_echo_n "checking for $ac_word... " >&6; }
35205if ${ac_cv_path_NM+:} false; then :
35206  $as_echo_n "(cached) " >&6
35207else
35208  case $NM in
35209  [\\/]* | ?:[\\/]*)
35210  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35211  ;;
35212  *)
35213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35214for as_dir in $PATH
35215do
35216  IFS=$as_save_IFS
35217  test -z "$as_dir" && as_dir=.
35218    for ac_exec_ext in '' $ac_executable_extensions; do
35219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35220    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35222    break 2
35223  fi
35224done
35225  done
35226IFS=$as_save_IFS
35227
35228  ;;
35229esac
35230fi
35231NM=$ac_cv_path_NM
35232if test -n "$NM"; then
35233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35234$as_echo "$NM" >&6; }
35235else
35236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35237$as_echo "no" >&6; }
35238fi
35239
35240
35241  test -n "$NM" && break
35242done
35243
35244  else
35245    # The variable is set, but is it from the command line or the environment?
35246
35247    # Try to remove the string !NM! from our list.
35248    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35249    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35250      # If it failed, the variable was not from the command line. Ignore it,
35251      # but warn the user (except for BASH, which is always set by the calling BASH).
35252      if test "xNM" != xBASH; then
35253        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35254$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35255      fi
35256      # Try to locate tool using the code snippet
35257      for ac_prog in nm
35258do
35259  # Extract the first word of "$ac_prog", so it can be a program name with args.
35260set dummy $ac_prog; ac_word=$2
35261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35262$as_echo_n "checking for $ac_word... " >&6; }
35263if ${ac_cv_path_NM+:} false; then :
35264  $as_echo_n "(cached) " >&6
35265else
35266  case $NM in
35267  [\\/]* | ?:[\\/]*)
35268  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35269  ;;
35270  *)
35271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35272for as_dir in $PATH
35273do
35274  IFS=$as_save_IFS
35275  test -z "$as_dir" && as_dir=.
35276    for ac_exec_ext in '' $ac_executable_extensions; do
35277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35278    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35280    break 2
35281  fi
35282done
35283  done
35284IFS=$as_save_IFS
35285
35286  ;;
35287esac
35288fi
35289NM=$ac_cv_path_NM
35290if test -n "$NM"; then
35291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35292$as_echo "$NM" >&6; }
35293else
35294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35295$as_echo "no" >&6; }
35296fi
35297
35298
35299  test -n "$NM" && break
35300done
35301
35302    else
35303      # If it succeeded, then it was overridden by the user. We will use it
35304      # for the tool.
35305
35306      # First remove it from the list of overridden variables, so we can test
35307      # for unknown variables in the end.
35308      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35309
35310      # Check if the provided tool contains a complete path.
35311      tool_specified="$NM"
35312      tool_basename="${tool_specified##*/}"
35313      if test "x$tool_basename" = "x$tool_specified"; then
35314        # A command without a complete path is provided, search $PATH.
35315        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35316$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35317        # Extract the first word of "$tool_basename", so it can be a program name with args.
35318set dummy $tool_basename; ac_word=$2
35319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35320$as_echo_n "checking for $ac_word... " >&6; }
35321if ${ac_cv_path_NM+:} false; then :
35322  $as_echo_n "(cached) " >&6
35323else
35324  case $NM in
35325  [\\/]* | ?:[\\/]*)
35326  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35327  ;;
35328  *)
35329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35330for as_dir in $PATH
35331do
35332  IFS=$as_save_IFS
35333  test -z "$as_dir" && as_dir=.
35334    for ac_exec_ext in '' $ac_executable_extensions; do
35335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35336    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35338    break 2
35339  fi
35340done
35341  done
35342IFS=$as_save_IFS
35343
35344  ;;
35345esac
35346fi
35347NM=$ac_cv_path_NM
35348if test -n "$NM"; then
35349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35350$as_echo "$NM" >&6; }
35351else
35352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35353$as_echo "no" >&6; }
35354fi
35355
35356
35357        if test "x$NM" = x; then
35358          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35359        fi
35360      else
35361        # Otherwise we believe it is a complete path. Use it as it is.
35362        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35363$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35364        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35365$as_echo_n "checking for NM... " >&6; }
35366        if test ! -x "$tool_specified"; then
35367          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35368$as_echo "not found" >&6; }
35369          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35370        fi
35371        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35372$as_echo "$tool_specified" >&6; }
35373      fi
35374    fi
35375  fi
35376
35377
35378
35379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35380
35381  # First separate the path from the arguments. This will split at the first
35382  # space.
35383  complete="$NM"
35384  path="${complete%% *}"
35385  tmp="$complete EOL"
35386  arguments="${tmp#* }"
35387
35388  # Input might be given as Windows format, start by converting to
35389  # unix format.
35390  new_path=`$CYGPATH -u "$path"`
35391
35392  # Now try to locate executable using which
35393  new_path=`$WHICH "$new_path" 2> /dev/null`
35394  # bat and cmd files are not always considered executable in cygwin causing which
35395  # to not find them
35396  if test "x$new_path" = x \
35397      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35398      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35399    new_path=`$CYGPATH -u "$path"`
35400  fi
35401  if test "x$new_path" = x; then
35402    # Oops. Which didn't find the executable.
35403    # The splitting of arguments from the executable at a space might have been incorrect,
35404    # since paths with space are more likely in Windows. Give it another try with the whole
35405    # argument.
35406    path="$complete"
35407    arguments="EOL"
35408    new_path=`$CYGPATH -u "$path"`
35409    new_path=`$WHICH "$new_path" 2> /dev/null`
35410    # bat and cmd files are not always considered executable in cygwin causing which
35411    # to not find them
35412    if test "x$new_path" = x \
35413        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35414        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35415      new_path=`$CYGPATH -u "$path"`
35416    fi
35417    if test "x$new_path" = x; then
35418      # It's still not found. Now this is an unrecoverable error.
35419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35420$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35421      has_space=`$ECHO "$complete" | $GREP " "`
35422      if test "x$has_space" != x; then
35423        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35424$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35425      fi
35426      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35427    fi
35428  fi
35429
35430  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35431  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35432  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35433  # "foo.exe" is OK but "foo" is an error.
35434  #
35435  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35436  # It is also a way to make sure we got the proper file name for the real test later on.
35437  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35438  if test "x$test_shortpath" = x; then
35439    # Short path failed, file does not exist as specified.
35440    # Try adding .exe or .cmd
35441    if test -f "${new_path}.exe"; then
35442      input_to_shortpath="${new_path}.exe"
35443    elif test -f "${new_path}.cmd"; then
35444      input_to_shortpath="${new_path}.cmd"
35445    else
35446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35447$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35448      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35449$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35450      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35451    fi
35452  else
35453    input_to_shortpath="$new_path"
35454  fi
35455
35456  # Call helper function which possibly converts this using DOS-style short mode.
35457  # If so, the updated path is stored in $new_path.
35458  new_path="$input_to_shortpath"
35459
35460  input_path="$input_to_shortpath"
35461  # Check if we need to convert this using DOS-style short mode. If the path
35462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35463  # take no chances and rewrite it.
35464  # Note: m4 eats our [], so we need to use [ and ] instead.
35465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35466  if test "x$has_forbidden_chars" != x; then
35467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35468    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35469    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35470    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35471      # Going to short mode and back again did indeed matter. Since short mode is
35472      # case insensitive, let's make it lowercase to improve readability.
35473      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35474      # Now convert it back to Unix-stile (cygpath)
35475      input_path=`$CYGPATH -u "$shortmode_path"`
35476      new_path="$input_path"
35477    fi
35478  fi
35479
35480  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35481  if test "x$test_cygdrive_prefix" = x; then
35482    # As a simple fix, exclude /usr/bin since it's not a real path.
35483    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35484      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35485      # a path prefixed by /cygdrive for fixpath to work.
35486      new_path="$CYGWIN_ROOT_PATH$input_path"
35487    fi
35488  fi
35489
35490  # remove trailing .exe if any
35491  new_path="${new_path/%.exe/}"
35492
35493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35494
35495  # First separate the path from the arguments. This will split at the first
35496  # space.
35497  complete="$NM"
35498  path="${complete%% *}"
35499  tmp="$complete EOL"
35500  arguments="${tmp#* }"
35501
35502  # Input might be given as Windows format, start by converting to
35503  # unix format.
35504  new_path="$path"
35505
35506  windows_path="$new_path"
35507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35508    unix_path=`$CYGPATH -u "$windows_path"`
35509    new_path="$unix_path"
35510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35512    new_path="$unix_path"
35513  fi
35514
35515
35516  # Now try to locate executable using which
35517  new_path=`$WHICH "$new_path" 2> /dev/null`
35518
35519  if test "x$new_path" = x; then
35520    # Oops. Which didn't find the executable.
35521    # The splitting of arguments from the executable at a space might have been incorrect,
35522    # since paths with space are more likely in Windows. Give it another try with the whole
35523    # argument.
35524    path="$complete"
35525    arguments="EOL"
35526    new_path="$path"
35527
35528  windows_path="$new_path"
35529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35530    unix_path=`$CYGPATH -u "$windows_path"`
35531    new_path="$unix_path"
35532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35534    new_path="$unix_path"
35535  fi
35536
35537
35538    new_path=`$WHICH "$new_path" 2> /dev/null`
35539
35540    if test "x$new_path" = x; then
35541      # It's still not found. Now this is an unrecoverable error.
35542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35543$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35544      has_space=`$ECHO "$complete" | $GREP " "`
35545      if test "x$has_space" != x; then
35546        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35547$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35548      fi
35549      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35550    fi
35551  fi
35552
35553  # Now new_path has a complete unix path to the binary
35554  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35555    # Keep paths in /bin as-is, but remove trailing .exe if any
35556    new_path="${new_path/%.exe/}"
35557    # Do not save /bin paths to all_fixpath_prefixes!
35558  else
35559    # Not in mixed or Windows style, start by that.
35560    new_path=`cmd //c echo $new_path`
35561
35562  input_path="$new_path"
35563  # Check if we need to convert this using DOS-style short mode. If the path
35564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35565  # take no chances and rewrite it.
35566  # Note: m4 eats our [], so we need to use [ and ] instead.
35567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35568  if test "x$has_forbidden_chars" != x; then
35569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35570    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35571  fi
35572
35573    # Output is in $new_path
35574
35575  windows_path="$new_path"
35576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35577    unix_path=`$CYGPATH -u "$windows_path"`
35578    new_path="$unix_path"
35579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35581    new_path="$unix_path"
35582  fi
35583
35584    # remove trailing .exe if any
35585    new_path="${new_path/%.exe/}"
35586
35587    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35588    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35589  fi
35590
35591  else
35592    # We're on a posix platform. Hooray! :)
35593    # First separate the path from the arguments. This will split at the first
35594    # space.
35595    complete="$NM"
35596    path="${complete%% *}"
35597    tmp="$complete EOL"
35598    arguments="${tmp#* }"
35599
35600    # Cannot rely on the command "which" here since it doesn't always work.
35601    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35602    if test -z "$is_absolute_path"; then
35603      # Path to executable is not absolute. Find it.
35604      IFS_save="$IFS"
35605      IFS=:
35606      for p in $PATH; do
35607        if test -f "$p/$path" && test -x "$p/$path"; then
35608          new_path="$p/$path"
35609          break
35610        fi
35611      done
35612      IFS="$IFS_save"
35613    else
35614      # This is an absolute path, we can use it without further modifications.
35615      new_path="$path"
35616    fi
35617
35618    if test "x$new_path" = x; then
35619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35620$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35621      has_space=`$ECHO "$complete" | $GREP " "`
35622      if test "x$has_space" != x; then
35623        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35624$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35625      fi
35626      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35627    fi
35628  fi
35629
35630  # Now join together the path and the arguments once again
35631  if test "x$arguments" != xEOL; then
35632    new_complete="$new_path ${arguments% *}"
35633  else
35634    new_complete="$new_path"
35635  fi
35636
35637  if test "x$complete" != "x$new_complete"; then
35638    NM="$new_complete"
35639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35640$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35641  fi
35642
35643
35644
35645  # Publish this variable in the help.
35646
35647
35648  if test "x$GNM" = x; then
35649    # The variable is not set by user, try to locate tool using the code snippet
35650    for ac_prog in gnm
35651do
35652  # Extract the first word of "$ac_prog", so it can be a program name with args.
35653set dummy $ac_prog; ac_word=$2
35654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35655$as_echo_n "checking for $ac_word... " >&6; }
35656if ${ac_cv_path_GNM+:} false; then :
35657  $as_echo_n "(cached) " >&6
35658else
35659  case $GNM in
35660  [\\/]* | ?:[\\/]*)
35661  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35662  ;;
35663  *)
35664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35665for as_dir in $PATH
35666do
35667  IFS=$as_save_IFS
35668  test -z "$as_dir" && as_dir=.
35669    for ac_exec_ext in '' $ac_executable_extensions; do
35670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35671    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35673    break 2
35674  fi
35675done
35676  done
35677IFS=$as_save_IFS
35678
35679  ;;
35680esac
35681fi
35682GNM=$ac_cv_path_GNM
35683if test -n "$GNM"; then
35684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35685$as_echo "$GNM" >&6; }
35686else
35687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35688$as_echo "no" >&6; }
35689fi
35690
35691
35692  test -n "$GNM" && break
35693done
35694
35695  else
35696    # The variable is set, but is it from the command line or the environment?
35697
35698    # Try to remove the string !GNM! from our list.
35699    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35700    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35701      # If it failed, the variable was not from the command line. Ignore it,
35702      # but warn the user (except for BASH, which is always set by the calling BASH).
35703      if test "xGNM" != xBASH; then
35704        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35705$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35706      fi
35707      # Try to locate tool using the code snippet
35708      for ac_prog in gnm
35709do
35710  # Extract the first word of "$ac_prog", so it can be a program name with args.
35711set dummy $ac_prog; ac_word=$2
35712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35713$as_echo_n "checking for $ac_word... " >&6; }
35714if ${ac_cv_path_GNM+:} false; then :
35715  $as_echo_n "(cached) " >&6
35716else
35717  case $GNM in
35718  [\\/]* | ?:[\\/]*)
35719  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35720  ;;
35721  *)
35722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35723for as_dir in $PATH
35724do
35725  IFS=$as_save_IFS
35726  test -z "$as_dir" && as_dir=.
35727    for ac_exec_ext in '' $ac_executable_extensions; do
35728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35729    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35731    break 2
35732  fi
35733done
35734  done
35735IFS=$as_save_IFS
35736
35737  ;;
35738esac
35739fi
35740GNM=$ac_cv_path_GNM
35741if test -n "$GNM"; then
35742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35743$as_echo "$GNM" >&6; }
35744else
35745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35746$as_echo "no" >&6; }
35747fi
35748
35749
35750  test -n "$GNM" && break
35751done
35752
35753    else
35754      # If it succeeded, then it was overridden by the user. We will use it
35755      # for the tool.
35756
35757      # First remove it from the list of overridden variables, so we can test
35758      # for unknown variables in the end.
35759      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35760
35761      # Check if the provided tool contains a complete path.
35762      tool_specified="$GNM"
35763      tool_basename="${tool_specified##*/}"
35764      if test "x$tool_basename" = "x$tool_specified"; then
35765        # A command without a complete path is provided, search $PATH.
35766        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35767$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35768        # Extract the first word of "$tool_basename", so it can be a program name with args.
35769set dummy $tool_basename; ac_word=$2
35770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35771$as_echo_n "checking for $ac_word... " >&6; }
35772if ${ac_cv_path_GNM+:} false; then :
35773  $as_echo_n "(cached) " >&6
35774else
35775  case $GNM in
35776  [\\/]* | ?:[\\/]*)
35777  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35778  ;;
35779  *)
35780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35781for as_dir in $PATH
35782do
35783  IFS=$as_save_IFS
35784  test -z "$as_dir" && as_dir=.
35785    for ac_exec_ext in '' $ac_executable_extensions; do
35786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35787    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35789    break 2
35790  fi
35791done
35792  done
35793IFS=$as_save_IFS
35794
35795  ;;
35796esac
35797fi
35798GNM=$ac_cv_path_GNM
35799if test -n "$GNM"; then
35800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35801$as_echo "$GNM" >&6; }
35802else
35803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35804$as_echo "no" >&6; }
35805fi
35806
35807
35808        if test "x$GNM" = x; then
35809          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35810        fi
35811      else
35812        # Otherwise we believe it is a complete path. Use it as it is.
35813        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35814$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35815        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35816$as_echo_n "checking for GNM... " >&6; }
35817        if test ! -x "$tool_specified"; then
35818          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35819$as_echo "not found" >&6; }
35820          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
35821        fi
35822        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35823$as_echo "$tool_specified" >&6; }
35824      fi
35825    fi
35826  fi
35827
35828
35829
35830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35831
35832  # First separate the path from the arguments. This will split at the first
35833  # space.
35834  complete="$GNM"
35835  path="${complete%% *}"
35836  tmp="$complete EOL"
35837  arguments="${tmp#* }"
35838
35839  # Input might be given as Windows format, start by converting to
35840  # unix format.
35841  new_path=`$CYGPATH -u "$path"`
35842
35843  # Now try to locate executable using which
35844  new_path=`$WHICH "$new_path" 2> /dev/null`
35845  # bat and cmd files are not always considered executable in cygwin causing which
35846  # to not find them
35847  if test "x$new_path" = x \
35848      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35849      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35850    new_path=`$CYGPATH -u "$path"`
35851  fi
35852  if test "x$new_path" = x; then
35853    # Oops. Which didn't find the executable.
35854    # The splitting of arguments from the executable at a space might have been incorrect,
35855    # since paths with space are more likely in Windows. Give it another try with the whole
35856    # argument.
35857    path="$complete"
35858    arguments="EOL"
35859    new_path=`$CYGPATH -u "$path"`
35860    new_path=`$WHICH "$new_path" 2> /dev/null`
35861    # bat and cmd files are not always considered executable in cygwin causing which
35862    # to not find them
35863    if test "x$new_path" = x \
35864        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35865        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35866      new_path=`$CYGPATH -u "$path"`
35867    fi
35868    if test "x$new_path" = x; then
35869      # It's still not found. Now this is an unrecoverable error.
35870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35871$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35872      has_space=`$ECHO "$complete" | $GREP " "`
35873      if test "x$has_space" != x; then
35874        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35875$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35876      fi
35877      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35878    fi
35879  fi
35880
35881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35884  # "foo.exe" is OK but "foo" is an error.
35885  #
35886  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35887  # It is also a way to make sure we got the proper file name for the real test later on.
35888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35889  if test "x$test_shortpath" = x; then
35890    # Short path failed, file does not exist as specified.
35891    # Try adding .exe or .cmd
35892    if test -f "${new_path}.exe"; then
35893      input_to_shortpath="${new_path}.exe"
35894    elif test -f "${new_path}.cmd"; then
35895      input_to_shortpath="${new_path}.cmd"
35896    else
35897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
35898$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
35899      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35900$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35901      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35902    fi
35903  else
35904    input_to_shortpath="$new_path"
35905  fi
35906
35907  # Call helper function which possibly converts this using DOS-style short mode.
35908  # If so, the updated path is stored in $new_path.
35909  new_path="$input_to_shortpath"
35910
35911  input_path="$input_to_shortpath"
35912  # Check if we need to convert this using DOS-style short mode. If the path
35913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35914  # take no chances and rewrite it.
35915  # Note: m4 eats our [], so we need to use [ and ] instead.
35916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35917  if test "x$has_forbidden_chars" != x; then
35918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35919    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35920    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35921    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35922      # Going to short mode and back again did indeed matter. Since short mode is
35923      # case insensitive, let's make it lowercase to improve readability.
35924      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35925      # Now convert it back to Unix-stile (cygpath)
35926      input_path=`$CYGPATH -u "$shortmode_path"`
35927      new_path="$input_path"
35928    fi
35929  fi
35930
35931  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35932  if test "x$test_cygdrive_prefix" = x; then
35933    # As a simple fix, exclude /usr/bin since it's not a real path.
35934    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35935      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35936      # a path prefixed by /cygdrive for fixpath to work.
35937      new_path="$CYGWIN_ROOT_PATH$input_path"
35938    fi
35939  fi
35940
35941  # remove trailing .exe if any
35942  new_path="${new_path/%.exe/}"
35943
35944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35945
35946  # First separate the path from the arguments. This will split at the first
35947  # space.
35948  complete="$GNM"
35949  path="${complete%% *}"
35950  tmp="$complete EOL"
35951  arguments="${tmp#* }"
35952
35953  # Input might be given as Windows format, start by converting to
35954  # unix format.
35955  new_path="$path"
35956
35957  windows_path="$new_path"
35958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35959    unix_path=`$CYGPATH -u "$windows_path"`
35960    new_path="$unix_path"
35961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35963    new_path="$unix_path"
35964  fi
35965
35966
35967  # Now try to locate executable using which
35968  new_path=`$WHICH "$new_path" 2> /dev/null`
35969
35970  if test "x$new_path" = x; then
35971    # Oops. Which didn't find the executable.
35972    # The splitting of arguments from the executable at a space might have been incorrect,
35973    # since paths with space are more likely in Windows. Give it another try with the whole
35974    # argument.
35975    path="$complete"
35976    arguments="EOL"
35977    new_path="$path"
35978
35979  windows_path="$new_path"
35980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35981    unix_path=`$CYGPATH -u "$windows_path"`
35982    new_path="$unix_path"
35983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35985    new_path="$unix_path"
35986  fi
35987
35988
35989    new_path=`$WHICH "$new_path" 2> /dev/null`
35990
35991    if test "x$new_path" = x; then
35992      # It's still not found. Now this is an unrecoverable error.
35993      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35994$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35995      has_space=`$ECHO "$complete" | $GREP " "`
35996      if test "x$has_space" != x; then
35997        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35998$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35999      fi
36000      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36001    fi
36002  fi
36003
36004  # Now new_path has a complete unix path to the binary
36005  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36006    # Keep paths in /bin as-is, but remove trailing .exe if any
36007    new_path="${new_path/%.exe/}"
36008    # Do not save /bin paths to all_fixpath_prefixes!
36009  else
36010    # Not in mixed or Windows style, start by that.
36011    new_path=`cmd //c echo $new_path`
36012
36013  input_path="$new_path"
36014  # Check if we need to convert this using DOS-style short mode. If the path
36015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36016  # take no chances and rewrite it.
36017  # Note: m4 eats our [], so we need to use [ and ] instead.
36018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36019  if test "x$has_forbidden_chars" != x; then
36020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36021    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36022  fi
36023
36024    # Output is in $new_path
36025
36026  windows_path="$new_path"
36027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36028    unix_path=`$CYGPATH -u "$windows_path"`
36029    new_path="$unix_path"
36030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36032    new_path="$unix_path"
36033  fi
36034
36035    # remove trailing .exe if any
36036    new_path="${new_path/%.exe/}"
36037
36038    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36039    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36040  fi
36041
36042  else
36043    # We're on a posix platform. Hooray! :)
36044    # First separate the path from the arguments. This will split at the first
36045    # space.
36046    complete="$GNM"
36047    path="${complete%% *}"
36048    tmp="$complete EOL"
36049    arguments="${tmp#* }"
36050
36051    # Cannot rely on the command "which" here since it doesn't always work.
36052    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36053    if test -z "$is_absolute_path"; then
36054      # Path to executable is not absolute. Find it.
36055      IFS_save="$IFS"
36056      IFS=:
36057      for p in $PATH; do
36058        if test -f "$p/$path" && test -x "$p/$path"; then
36059          new_path="$p/$path"
36060          break
36061        fi
36062      done
36063      IFS="$IFS_save"
36064    else
36065      # This is an absolute path, we can use it without further modifications.
36066      new_path="$path"
36067    fi
36068
36069    if test "x$new_path" = x; then
36070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36071$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36072      has_space=`$ECHO "$complete" | $GREP " "`
36073      if test "x$has_space" != x; then
36074        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36075$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36076      fi
36077      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36078    fi
36079  fi
36080
36081  # Now join together the path and the arguments once again
36082  if test "x$arguments" != xEOL; then
36083    new_complete="$new_path ${arguments% *}"
36084  else
36085    new_complete="$new_path"
36086  fi
36087
36088  if test "x$complete" != "x$new_complete"; then
36089    GNM="$new_complete"
36090    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36091$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36092  fi
36093
36094
36095
36096
36097  # Publish this variable in the help.
36098
36099
36100  if test "x$MCS" = x; then
36101    # The variable is not set by user, try to locate tool using the code snippet
36102    for ac_prog in mcs
36103do
36104  # Extract the first word of "$ac_prog", so it can be a program name with args.
36105set dummy $ac_prog; ac_word=$2
36106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36107$as_echo_n "checking for $ac_word... " >&6; }
36108if ${ac_cv_path_MCS+:} false; then :
36109  $as_echo_n "(cached) " >&6
36110else
36111  case $MCS in
36112  [\\/]* | ?:[\\/]*)
36113  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36114  ;;
36115  *)
36116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36117for as_dir in $PATH
36118do
36119  IFS=$as_save_IFS
36120  test -z "$as_dir" && as_dir=.
36121    for ac_exec_ext in '' $ac_executable_extensions; do
36122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36123    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36125    break 2
36126  fi
36127done
36128  done
36129IFS=$as_save_IFS
36130
36131  ;;
36132esac
36133fi
36134MCS=$ac_cv_path_MCS
36135if test -n "$MCS"; then
36136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36137$as_echo "$MCS" >&6; }
36138else
36139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36140$as_echo "no" >&6; }
36141fi
36142
36143
36144  test -n "$MCS" && break
36145done
36146
36147  else
36148    # The variable is set, but is it from the command line or the environment?
36149
36150    # Try to remove the string !MCS! from our list.
36151    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36152    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36153      # If it failed, the variable was not from the command line. Ignore it,
36154      # but warn the user (except for BASH, which is always set by the calling BASH).
36155      if test "xMCS" != xBASH; then
36156        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36157$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36158      fi
36159      # Try to locate tool using the code snippet
36160      for ac_prog in mcs
36161do
36162  # Extract the first word of "$ac_prog", so it can be a program name with args.
36163set dummy $ac_prog; ac_word=$2
36164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36165$as_echo_n "checking for $ac_word... " >&6; }
36166if ${ac_cv_path_MCS+:} false; then :
36167  $as_echo_n "(cached) " >&6
36168else
36169  case $MCS in
36170  [\\/]* | ?:[\\/]*)
36171  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36172  ;;
36173  *)
36174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36175for as_dir in $PATH
36176do
36177  IFS=$as_save_IFS
36178  test -z "$as_dir" && as_dir=.
36179    for ac_exec_ext in '' $ac_executable_extensions; do
36180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36181    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36183    break 2
36184  fi
36185done
36186  done
36187IFS=$as_save_IFS
36188
36189  ;;
36190esac
36191fi
36192MCS=$ac_cv_path_MCS
36193if test -n "$MCS"; then
36194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36195$as_echo "$MCS" >&6; }
36196else
36197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36198$as_echo "no" >&6; }
36199fi
36200
36201
36202  test -n "$MCS" && break
36203done
36204
36205    else
36206      # If it succeeded, then it was overridden by the user. We will use it
36207      # for the tool.
36208
36209      # First remove it from the list of overridden variables, so we can test
36210      # for unknown variables in the end.
36211      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36212
36213      # Check if the provided tool contains a complete path.
36214      tool_specified="$MCS"
36215      tool_basename="${tool_specified##*/}"
36216      if test "x$tool_basename" = "x$tool_specified"; then
36217        # A command without a complete path is provided, search $PATH.
36218        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36219$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36220        # Extract the first word of "$tool_basename", so it can be a program name with args.
36221set dummy $tool_basename; ac_word=$2
36222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36223$as_echo_n "checking for $ac_word... " >&6; }
36224if ${ac_cv_path_MCS+:} false; then :
36225  $as_echo_n "(cached) " >&6
36226else
36227  case $MCS in
36228  [\\/]* | ?:[\\/]*)
36229  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36230  ;;
36231  *)
36232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36233for as_dir in $PATH
36234do
36235  IFS=$as_save_IFS
36236  test -z "$as_dir" && as_dir=.
36237    for ac_exec_ext in '' $ac_executable_extensions; do
36238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36239    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36241    break 2
36242  fi
36243done
36244  done
36245IFS=$as_save_IFS
36246
36247  ;;
36248esac
36249fi
36250MCS=$ac_cv_path_MCS
36251if test -n "$MCS"; then
36252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36253$as_echo "$MCS" >&6; }
36254else
36255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36256$as_echo "no" >&6; }
36257fi
36258
36259
36260        if test "x$MCS" = x; then
36261          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36262        fi
36263      else
36264        # Otherwise we believe it is a complete path. Use it as it is.
36265        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36266$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36267        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36268$as_echo_n "checking for MCS... " >&6; }
36269        if test ! -x "$tool_specified"; then
36270          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36271$as_echo "not found" >&6; }
36272          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36273        fi
36274        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36275$as_echo "$tool_specified" >&6; }
36276      fi
36277    fi
36278  fi
36279
36280
36281
36282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36283
36284  # First separate the path from the arguments. This will split at the first
36285  # space.
36286  complete="$MCS"
36287  path="${complete%% *}"
36288  tmp="$complete EOL"
36289  arguments="${tmp#* }"
36290
36291  # Input might be given as Windows format, start by converting to
36292  # unix format.
36293  new_path=`$CYGPATH -u "$path"`
36294
36295  # Now try to locate executable using which
36296  new_path=`$WHICH "$new_path" 2> /dev/null`
36297  # bat and cmd files are not always considered executable in cygwin causing which
36298  # to not find them
36299  if test "x$new_path" = x \
36300      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36301      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36302    new_path=`$CYGPATH -u "$path"`
36303  fi
36304  if test "x$new_path" = x; then
36305    # Oops. Which didn't find the executable.
36306    # The splitting of arguments from the executable at a space might have been incorrect,
36307    # since paths with space are more likely in Windows. Give it another try with the whole
36308    # argument.
36309    path="$complete"
36310    arguments="EOL"
36311    new_path=`$CYGPATH -u "$path"`
36312    new_path=`$WHICH "$new_path" 2> /dev/null`
36313    # bat and cmd files are not always considered executable in cygwin causing which
36314    # to not find them
36315    if test "x$new_path" = x \
36316        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36317        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36318      new_path=`$CYGPATH -u "$path"`
36319    fi
36320    if test "x$new_path" = x; then
36321      # It's still not found. Now this is an unrecoverable error.
36322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36323$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36324      has_space=`$ECHO "$complete" | $GREP " "`
36325      if test "x$has_space" != x; then
36326        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36327$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36328      fi
36329      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36330    fi
36331  fi
36332
36333  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36334  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36335  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36336  # "foo.exe" is OK but "foo" is an error.
36337  #
36338  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36339  # It is also a way to make sure we got the proper file name for the real test later on.
36340  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36341  if test "x$test_shortpath" = x; then
36342    # Short path failed, file does not exist as specified.
36343    # Try adding .exe or .cmd
36344    if test -f "${new_path}.exe"; then
36345      input_to_shortpath="${new_path}.exe"
36346    elif test -f "${new_path}.cmd"; then
36347      input_to_shortpath="${new_path}.cmd"
36348    else
36349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36350$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36351      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36352$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36353      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36354    fi
36355  else
36356    input_to_shortpath="$new_path"
36357  fi
36358
36359  # Call helper function which possibly converts this using DOS-style short mode.
36360  # If so, the updated path is stored in $new_path.
36361  new_path="$input_to_shortpath"
36362
36363  input_path="$input_to_shortpath"
36364  # Check if we need to convert this using DOS-style short mode. If the path
36365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36366  # take no chances and rewrite it.
36367  # Note: m4 eats our [], so we need to use [ and ] instead.
36368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36369  if test "x$has_forbidden_chars" != x; then
36370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36374      # Going to short mode and back again did indeed matter. Since short mode is
36375      # case insensitive, let's make it lowercase to improve readability.
36376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36377      # Now convert it back to Unix-stile (cygpath)
36378      input_path=`$CYGPATH -u "$shortmode_path"`
36379      new_path="$input_path"
36380    fi
36381  fi
36382
36383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36384  if test "x$test_cygdrive_prefix" = x; then
36385    # As a simple fix, exclude /usr/bin since it's not a real path.
36386    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36388      # a path prefixed by /cygdrive for fixpath to work.
36389      new_path="$CYGWIN_ROOT_PATH$input_path"
36390    fi
36391  fi
36392
36393  # remove trailing .exe if any
36394  new_path="${new_path/%.exe/}"
36395
36396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36397
36398  # First separate the path from the arguments. This will split at the first
36399  # space.
36400  complete="$MCS"
36401  path="${complete%% *}"
36402  tmp="$complete EOL"
36403  arguments="${tmp#* }"
36404
36405  # Input might be given as Windows format, start by converting to
36406  # unix format.
36407  new_path="$path"
36408
36409  windows_path="$new_path"
36410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36411    unix_path=`$CYGPATH -u "$windows_path"`
36412    new_path="$unix_path"
36413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36415    new_path="$unix_path"
36416  fi
36417
36418
36419  # Now try to locate executable using which
36420  new_path=`$WHICH "$new_path" 2> /dev/null`
36421
36422  if test "x$new_path" = x; then
36423    # Oops. Which didn't find the executable.
36424    # The splitting of arguments from the executable at a space might have been incorrect,
36425    # since paths with space are more likely in Windows. Give it another try with the whole
36426    # argument.
36427    path="$complete"
36428    arguments="EOL"
36429    new_path="$path"
36430
36431  windows_path="$new_path"
36432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36433    unix_path=`$CYGPATH -u "$windows_path"`
36434    new_path="$unix_path"
36435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36437    new_path="$unix_path"
36438  fi
36439
36440
36441    new_path=`$WHICH "$new_path" 2> /dev/null`
36442
36443    if test "x$new_path" = x; then
36444      # It's still not found. Now this is an unrecoverable error.
36445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36446$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36447      has_space=`$ECHO "$complete" | $GREP " "`
36448      if test "x$has_space" != x; then
36449        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36450$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36451      fi
36452      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36453    fi
36454  fi
36455
36456  # Now new_path has a complete unix path to the binary
36457  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36458    # Keep paths in /bin as-is, but remove trailing .exe if any
36459    new_path="${new_path/%.exe/}"
36460    # Do not save /bin paths to all_fixpath_prefixes!
36461  else
36462    # Not in mixed or Windows style, start by that.
36463    new_path=`cmd //c echo $new_path`
36464
36465  input_path="$new_path"
36466  # Check if we need to convert this using DOS-style short mode. If the path
36467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36468  # take no chances and rewrite it.
36469  # Note: m4 eats our [], so we need to use [ and ] instead.
36470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36471  if test "x$has_forbidden_chars" != x; then
36472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36473    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36474  fi
36475
36476    # Output is in $new_path
36477
36478  windows_path="$new_path"
36479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36480    unix_path=`$CYGPATH -u "$windows_path"`
36481    new_path="$unix_path"
36482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36484    new_path="$unix_path"
36485  fi
36486
36487    # remove trailing .exe if any
36488    new_path="${new_path/%.exe/}"
36489
36490    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36491    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36492  fi
36493
36494  else
36495    # We're on a posix platform. Hooray! :)
36496    # First separate the path from the arguments. This will split at the first
36497    # space.
36498    complete="$MCS"
36499    path="${complete%% *}"
36500    tmp="$complete EOL"
36501    arguments="${tmp#* }"
36502
36503    # Cannot rely on the command "which" here since it doesn't always work.
36504    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36505    if test -z "$is_absolute_path"; then
36506      # Path to executable is not absolute. Find it.
36507      IFS_save="$IFS"
36508      IFS=:
36509      for p in $PATH; do
36510        if test -f "$p/$path" && test -x "$p/$path"; then
36511          new_path="$p/$path"
36512          break
36513        fi
36514      done
36515      IFS="$IFS_save"
36516    else
36517      # This is an absolute path, we can use it without further modifications.
36518      new_path="$path"
36519    fi
36520
36521    if test "x$new_path" = x; then
36522      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36523$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36524      has_space=`$ECHO "$complete" | $GREP " "`
36525      if test "x$has_space" != x; then
36526        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36527$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36528      fi
36529      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36530    fi
36531  fi
36532
36533  # Now join together the path and the arguments once again
36534  if test "x$arguments" != xEOL; then
36535    new_complete="$new_path ${arguments% *}"
36536  else
36537    new_complete="$new_path"
36538  fi
36539
36540  if test "x$complete" != "x$new_complete"; then
36541    MCS="$new_complete"
36542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36543$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36544  fi
36545
36546  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36547    # FIXME: we should unify this with the solaris case above.
36548
36549
36550  # Publish this variable in the help.
36551
36552
36553  if test "x$STRIP" = x; then
36554    # The variable is not set by user, try to locate tool using the code snippet
36555    if test -n "$ac_tool_prefix"; then
36556  for ac_prog in strip
36557  do
36558    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36559set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36561$as_echo_n "checking for $ac_word... " >&6; }
36562if ${ac_cv_prog_STRIP+:} false; then :
36563  $as_echo_n "(cached) " >&6
36564else
36565  if test -n "$STRIP"; then
36566  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36567else
36568as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36569for as_dir in $PATH
36570do
36571  IFS=$as_save_IFS
36572  test -z "$as_dir" && as_dir=.
36573    for ac_exec_ext in '' $ac_executable_extensions; do
36574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36575    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36577    break 2
36578  fi
36579done
36580  done
36581IFS=$as_save_IFS
36582
36583fi
36584fi
36585STRIP=$ac_cv_prog_STRIP
36586if test -n "$STRIP"; then
36587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36588$as_echo "$STRIP" >&6; }
36589else
36590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36591$as_echo "no" >&6; }
36592fi
36593
36594
36595    test -n "$STRIP" && break
36596  done
36597fi
36598if test -z "$STRIP"; then
36599  ac_ct_STRIP=$STRIP
36600  for ac_prog in strip
36601do
36602  # Extract the first word of "$ac_prog", so it can be a program name with args.
36603set dummy $ac_prog; ac_word=$2
36604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36605$as_echo_n "checking for $ac_word... " >&6; }
36606if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36607  $as_echo_n "(cached) " >&6
36608else
36609  if test -n "$ac_ct_STRIP"; then
36610  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36611else
36612as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36613for as_dir in $PATH
36614do
36615  IFS=$as_save_IFS
36616  test -z "$as_dir" && as_dir=.
36617    for ac_exec_ext in '' $ac_executable_extensions; do
36618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36619    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36621    break 2
36622  fi
36623done
36624  done
36625IFS=$as_save_IFS
36626
36627fi
36628fi
36629ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36630if test -n "$ac_ct_STRIP"; then
36631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36632$as_echo "$ac_ct_STRIP" >&6; }
36633else
36634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36635$as_echo "no" >&6; }
36636fi
36637
36638
36639  test -n "$ac_ct_STRIP" && break
36640done
36641
36642  if test "x$ac_ct_STRIP" = x; then
36643    STRIP=""
36644  else
36645    case $cross_compiling:$ac_tool_warned in
36646yes:)
36647{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36648$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36649ac_tool_warned=yes ;;
36650esac
36651    STRIP=$ac_ct_STRIP
36652  fi
36653fi
36654
36655  else
36656    # The variable is set, but is it from the command line or the environment?
36657
36658    # Try to remove the string !STRIP! from our list.
36659    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36660    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36661      # If it failed, the variable was not from the command line. Ignore it,
36662      # but warn the user (except for BASH, which is always set by the calling BASH).
36663      if test "xSTRIP" != xBASH; then
36664        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36665$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36666      fi
36667      # Try to locate tool using the code snippet
36668      if test -n "$ac_tool_prefix"; then
36669  for ac_prog in strip
36670  do
36671    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36672set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36674$as_echo_n "checking for $ac_word... " >&6; }
36675if ${ac_cv_prog_STRIP+:} false; then :
36676  $as_echo_n "(cached) " >&6
36677else
36678  if test -n "$STRIP"; then
36679  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36680else
36681as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36682for as_dir in $PATH
36683do
36684  IFS=$as_save_IFS
36685  test -z "$as_dir" && as_dir=.
36686    for ac_exec_ext in '' $ac_executable_extensions; do
36687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36688    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36690    break 2
36691  fi
36692done
36693  done
36694IFS=$as_save_IFS
36695
36696fi
36697fi
36698STRIP=$ac_cv_prog_STRIP
36699if test -n "$STRIP"; then
36700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36701$as_echo "$STRIP" >&6; }
36702else
36703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36704$as_echo "no" >&6; }
36705fi
36706
36707
36708    test -n "$STRIP" && break
36709  done
36710fi
36711if test -z "$STRIP"; then
36712  ac_ct_STRIP=$STRIP
36713  for ac_prog in strip
36714do
36715  # Extract the first word of "$ac_prog", so it can be a program name with args.
36716set dummy $ac_prog; ac_word=$2
36717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36718$as_echo_n "checking for $ac_word... " >&6; }
36719if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36720  $as_echo_n "(cached) " >&6
36721else
36722  if test -n "$ac_ct_STRIP"; then
36723  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36724else
36725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36726for as_dir in $PATH
36727do
36728  IFS=$as_save_IFS
36729  test -z "$as_dir" && as_dir=.
36730    for ac_exec_ext in '' $ac_executable_extensions; do
36731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36732    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36734    break 2
36735  fi
36736done
36737  done
36738IFS=$as_save_IFS
36739
36740fi
36741fi
36742ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36743if test -n "$ac_ct_STRIP"; then
36744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36745$as_echo "$ac_ct_STRIP" >&6; }
36746else
36747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36748$as_echo "no" >&6; }
36749fi
36750
36751
36752  test -n "$ac_ct_STRIP" && break
36753done
36754
36755  if test "x$ac_ct_STRIP" = x; then
36756    STRIP=""
36757  else
36758    case $cross_compiling:$ac_tool_warned in
36759yes:)
36760{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36761$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36762ac_tool_warned=yes ;;
36763esac
36764    STRIP=$ac_ct_STRIP
36765  fi
36766fi
36767
36768    else
36769      # If it succeeded, then it was overridden by the user. We will use it
36770      # for the tool.
36771
36772      # First remove it from the list of overridden variables, so we can test
36773      # for unknown variables in the end.
36774      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36775
36776      # Check if the provided tool contains a complete path.
36777      tool_specified="$STRIP"
36778      tool_basename="${tool_specified##*/}"
36779      if test "x$tool_basename" = "x$tool_specified"; then
36780        # A command without a complete path is provided, search $PATH.
36781        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36782$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36783        # Extract the first word of "$tool_basename", so it can be a program name with args.
36784set dummy $tool_basename; ac_word=$2
36785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36786$as_echo_n "checking for $ac_word... " >&6; }
36787if ${ac_cv_path_STRIP+:} false; then :
36788  $as_echo_n "(cached) " >&6
36789else
36790  case $STRIP in
36791  [\\/]* | ?:[\\/]*)
36792  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36793  ;;
36794  *)
36795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36796for as_dir in $PATH
36797do
36798  IFS=$as_save_IFS
36799  test -z "$as_dir" && as_dir=.
36800    for ac_exec_ext in '' $ac_executable_extensions; do
36801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36802    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36804    break 2
36805  fi
36806done
36807  done
36808IFS=$as_save_IFS
36809
36810  ;;
36811esac
36812fi
36813STRIP=$ac_cv_path_STRIP
36814if test -n "$STRIP"; then
36815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36816$as_echo "$STRIP" >&6; }
36817else
36818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36819$as_echo "no" >&6; }
36820fi
36821
36822
36823        if test "x$STRIP" = x; then
36824          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36825        fi
36826      else
36827        # Otherwise we believe it is a complete path. Use it as it is.
36828        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36829$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36830        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36831$as_echo_n "checking for STRIP... " >&6; }
36832        if test ! -x "$tool_specified"; then
36833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36834$as_echo "not found" >&6; }
36835          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36836        fi
36837        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36838$as_echo "$tool_specified" >&6; }
36839      fi
36840    fi
36841  fi
36842
36843
36844
36845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36846
36847  # First separate the path from the arguments. This will split at the first
36848  # space.
36849  complete="$STRIP"
36850  path="${complete%% *}"
36851  tmp="$complete EOL"
36852  arguments="${tmp#* }"
36853
36854  # Input might be given as Windows format, start by converting to
36855  # unix format.
36856  new_path=`$CYGPATH -u "$path"`
36857
36858  # Now try to locate executable using which
36859  new_path=`$WHICH "$new_path" 2> /dev/null`
36860  # bat and cmd files are not always considered executable in cygwin causing which
36861  # to not find them
36862  if test "x$new_path" = x \
36863      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36864      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36865    new_path=`$CYGPATH -u "$path"`
36866  fi
36867  if test "x$new_path" = x; then
36868    # Oops. Which didn't find the executable.
36869    # The splitting of arguments from the executable at a space might have been incorrect,
36870    # since paths with space are more likely in Windows. Give it another try with the whole
36871    # argument.
36872    path="$complete"
36873    arguments="EOL"
36874    new_path=`$CYGPATH -u "$path"`
36875    new_path=`$WHICH "$new_path" 2> /dev/null`
36876    # bat and cmd files are not always considered executable in cygwin causing which
36877    # to not find them
36878    if test "x$new_path" = x \
36879        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36880        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36881      new_path=`$CYGPATH -u "$path"`
36882    fi
36883    if test "x$new_path" = x; then
36884      # It's still not found. Now this is an unrecoverable error.
36885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36886$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36887      has_space=`$ECHO "$complete" | $GREP " "`
36888      if test "x$has_space" != x; then
36889        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36890$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36891      fi
36892      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36893    fi
36894  fi
36895
36896  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36897  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36898  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36899  # "foo.exe" is OK but "foo" is an error.
36900  #
36901  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36902  # It is also a way to make sure we got the proper file name for the real test later on.
36903  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36904  if test "x$test_shortpath" = x; then
36905    # Short path failed, file does not exist as specified.
36906    # Try adding .exe or .cmd
36907    if test -f "${new_path}.exe"; then
36908      input_to_shortpath="${new_path}.exe"
36909    elif test -f "${new_path}.cmd"; then
36910      input_to_shortpath="${new_path}.cmd"
36911    else
36912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36913$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36914      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36915$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36916      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36917    fi
36918  else
36919    input_to_shortpath="$new_path"
36920  fi
36921
36922  # Call helper function which possibly converts this using DOS-style short mode.
36923  # If so, the updated path is stored in $new_path.
36924  new_path="$input_to_shortpath"
36925
36926  input_path="$input_to_shortpath"
36927  # Check if we need to convert this using DOS-style short mode. If the path
36928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36929  # take no chances and rewrite it.
36930  # Note: m4 eats our [], so we need to use [ and ] instead.
36931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36932  if test "x$has_forbidden_chars" != x; then
36933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36934    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36935    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36936    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36937      # Going to short mode and back again did indeed matter. Since short mode is
36938      # case insensitive, let's make it lowercase to improve readability.
36939      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36940      # Now convert it back to Unix-stile (cygpath)
36941      input_path=`$CYGPATH -u "$shortmode_path"`
36942      new_path="$input_path"
36943    fi
36944  fi
36945
36946  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36947  if test "x$test_cygdrive_prefix" = x; then
36948    # As a simple fix, exclude /usr/bin since it's not a real path.
36949    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36950      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36951      # a path prefixed by /cygdrive for fixpath to work.
36952      new_path="$CYGWIN_ROOT_PATH$input_path"
36953    fi
36954  fi
36955
36956  # remove trailing .exe if any
36957  new_path="${new_path/%.exe/}"
36958
36959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36960
36961  # First separate the path from the arguments. This will split at the first
36962  # space.
36963  complete="$STRIP"
36964  path="${complete%% *}"
36965  tmp="$complete EOL"
36966  arguments="${tmp#* }"
36967
36968  # Input might be given as Windows format, start by converting to
36969  # unix format.
36970  new_path="$path"
36971
36972  windows_path="$new_path"
36973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36974    unix_path=`$CYGPATH -u "$windows_path"`
36975    new_path="$unix_path"
36976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36978    new_path="$unix_path"
36979  fi
36980
36981
36982  # Now try to locate executable using which
36983  new_path=`$WHICH "$new_path" 2> /dev/null`
36984
36985  if test "x$new_path" = x; then
36986    # Oops. Which didn't find the executable.
36987    # The splitting of arguments from the executable at a space might have been incorrect,
36988    # since paths with space are more likely in Windows. Give it another try with the whole
36989    # argument.
36990    path="$complete"
36991    arguments="EOL"
36992    new_path="$path"
36993
36994  windows_path="$new_path"
36995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36996    unix_path=`$CYGPATH -u "$windows_path"`
36997    new_path="$unix_path"
36998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37000    new_path="$unix_path"
37001  fi
37002
37003
37004    new_path=`$WHICH "$new_path" 2> /dev/null`
37005
37006    if test "x$new_path" = x; then
37007      # It's still not found. Now this is an unrecoverable error.
37008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37009$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37010      has_space=`$ECHO "$complete" | $GREP " "`
37011      if test "x$has_space" != x; then
37012        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37013$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37014      fi
37015      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37016    fi
37017  fi
37018
37019  # Now new_path has a complete unix path to the binary
37020  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37021    # Keep paths in /bin as-is, but remove trailing .exe if any
37022    new_path="${new_path/%.exe/}"
37023    # Do not save /bin paths to all_fixpath_prefixes!
37024  else
37025    # Not in mixed or Windows style, start by that.
37026    new_path=`cmd //c echo $new_path`
37027
37028  input_path="$new_path"
37029  # Check if we need to convert this using DOS-style short mode. If the path
37030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37031  # take no chances and rewrite it.
37032  # Note: m4 eats our [], so we need to use [ and ] instead.
37033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37034  if test "x$has_forbidden_chars" != x; then
37035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37036    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37037  fi
37038
37039    # Output is in $new_path
37040
37041  windows_path="$new_path"
37042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37043    unix_path=`$CYGPATH -u "$windows_path"`
37044    new_path="$unix_path"
37045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37047    new_path="$unix_path"
37048  fi
37049
37050    # remove trailing .exe if any
37051    new_path="${new_path/%.exe/}"
37052
37053    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37054    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37055  fi
37056
37057  else
37058    # We're on a posix platform. Hooray! :)
37059    # First separate the path from the arguments. This will split at the first
37060    # space.
37061    complete="$STRIP"
37062    path="${complete%% *}"
37063    tmp="$complete EOL"
37064    arguments="${tmp#* }"
37065
37066    # Cannot rely on the command "which" here since it doesn't always work.
37067    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37068    if test -z "$is_absolute_path"; then
37069      # Path to executable is not absolute. Find it.
37070      IFS_save="$IFS"
37071      IFS=:
37072      for p in $PATH; do
37073        if test -f "$p/$path" && test -x "$p/$path"; then
37074          new_path="$p/$path"
37075          break
37076        fi
37077      done
37078      IFS="$IFS_save"
37079    else
37080      # This is an absolute path, we can use it without further modifications.
37081      new_path="$path"
37082    fi
37083
37084    if test "x$new_path" = x; then
37085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37086$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37087      has_space=`$ECHO "$complete" | $GREP " "`
37088      if test "x$has_space" != x; then
37089        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37090$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37091      fi
37092      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37093    fi
37094  fi
37095
37096  # Now join together the path and the arguments once again
37097  if test "x$arguments" != xEOL; then
37098    new_complete="$new_path ${arguments% *}"
37099  else
37100    new_complete="$new_path"
37101  fi
37102
37103  if test "x$complete" != "x$new_complete"; then
37104    STRIP="$new_complete"
37105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37106$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37107  fi
37108
37109
37110
37111  # Publish this variable in the help.
37112
37113
37114  if test "x$NM" = x; then
37115    # The variable is not set by user, try to locate tool using the code snippet
37116    if test -n "$ac_tool_prefix"; then
37117  for ac_prog in nm
37118  do
37119    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37120set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37122$as_echo_n "checking for $ac_word... " >&6; }
37123if ${ac_cv_prog_NM+:} false; then :
37124  $as_echo_n "(cached) " >&6
37125else
37126  if test -n "$NM"; then
37127  ac_cv_prog_NM="$NM" # Let the user override the test.
37128else
37129as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37130for as_dir in $PATH
37131do
37132  IFS=$as_save_IFS
37133  test -z "$as_dir" && as_dir=.
37134    for ac_exec_ext in '' $ac_executable_extensions; do
37135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37136    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37138    break 2
37139  fi
37140done
37141  done
37142IFS=$as_save_IFS
37143
37144fi
37145fi
37146NM=$ac_cv_prog_NM
37147if test -n "$NM"; then
37148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37149$as_echo "$NM" >&6; }
37150else
37151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37152$as_echo "no" >&6; }
37153fi
37154
37155
37156    test -n "$NM" && break
37157  done
37158fi
37159if test -z "$NM"; then
37160  ac_ct_NM=$NM
37161  for ac_prog in nm
37162do
37163  # Extract the first word of "$ac_prog", so it can be a program name with args.
37164set dummy $ac_prog; ac_word=$2
37165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37166$as_echo_n "checking for $ac_word... " >&6; }
37167if ${ac_cv_prog_ac_ct_NM+:} false; then :
37168  $as_echo_n "(cached) " >&6
37169else
37170  if test -n "$ac_ct_NM"; then
37171  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37172else
37173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37174for as_dir in $PATH
37175do
37176  IFS=$as_save_IFS
37177  test -z "$as_dir" && as_dir=.
37178    for ac_exec_ext in '' $ac_executable_extensions; do
37179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37180    ac_cv_prog_ac_ct_NM="$ac_prog"
37181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37182    break 2
37183  fi
37184done
37185  done
37186IFS=$as_save_IFS
37187
37188fi
37189fi
37190ac_ct_NM=$ac_cv_prog_ac_ct_NM
37191if test -n "$ac_ct_NM"; then
37192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37193$as_echo "$ac_ct_NM" >&6; }
37194else
37195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37196$as_echo "no" >&6; }
37197fi
37198
37199
37200  test -n "$ac_ct_NM" && break
37201done
37202
37203  if test "x$ac_ct_NM" = x; then
37204    NM=""
37205  else
37206    case $cross_compiling:$ac_tool_warned in
37207yes:)
37208{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37209$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37210ac_tool_warned=yes ;;
37211esac
37212    NM=$ac_ct_NM
37213  fi
37214fi
37215
37216  else
37217    # The variable is set, but is it from the command line or the environment?
37218
37219    # Try to remove the string !NM! from our list.
37220    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37221    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37222      # If it failed, the variable was not from the command line. Ignore it,
37223      # but warn the user (except for BASH, which is always set by the calling BASH).
37224      if test "xNM" != xBASH; then
37225        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37226$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37227      fi
37228      # Try to locate tool using the code snippet
37229      if test -n "$ac_tool_prefix"; then
37230  for ac_prog in nm
37231  do
37232    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37233set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37235$as_echo_n "checking for $ac_word... " >&6; }
37236if ${ac_cv_prog_NM+:} false; then :
37237  $as_echo_n "(cached) " >&6
37238else
37239  if test -n "$NM"; then
37240  ac_cv_prog_NM="$NM" # Let the user override the test.
37241else
37242as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37243for as_dir in $PATH
37244do
37245  IFS=$as_save_IFS
37246  test -z "$as_dir" && as_dir=.
37247    for ac_exec_ext in '' $ac_executable_extensions; do
37248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37249    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37251    break 2
37252  fi
37253done
37254  done
37255IFS=$as_save_IFS
37256
37257fi
37258fi
37259NM=$ac_cv_prog_NM
37260if test -n "$NM"; then
37261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37262$as_echo "$NM" >&6; }
37263else
37264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37265$as_echo "no" >&6; }
37266fi
37267
37268
37269    test -n "$NM" && break
37270  done
37271fi
37272if test -z "$NM"; then
37273  ac_ct_NM=$NM
37274  for ac_prog in nm
37275do
37276  # Extract the first word of "$ac_prog", so it can be a program name with args.
37277set dummy $ac_prog; ac_word=$2
37278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37279$as_echo_n "checking for $ac_word... " >&6; }
37280if ${ac_cv_prog_ac_ct_NM+:} false; then :
37281  $as_echo_n "(cached) " >&6
37282else
37283  if test -n "$ac_ct_NM"; then
37284  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37285else
37286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37287for as_dir in $PATH
37288do
37289  IFS=$as_save_IFS
37290  test -z "$as_dir" && as_dir=.
37291    for ac_exec_ext in '' $ac_executable_extensions; do
37292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37293    ac_cv_prog_ac_ct_NM="$ac_prog"
37294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37295    break 2
37296  fi
37297done
37298  done
37299IFS=$as_save_IFS
37300
37301fi
37302fi
37303ac_ct_NM=$ac_cv_prog_ac_ct_NM
37304if test -n "$ac_ct_NM"; then
37305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37306$as_echo "$ac_ct_NM" >&6; }
37307else
37308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37309$as_echo "no" >&6; }
37310fi
37311
37312
37313  test -n "$ac_ct_NM" && break
37314done
37315
37316  if test "x$ac_ct_NM" = x; then
37317    NM=""
37318  else
37319    case $cross_compiling:$ac_tool_warned in
37320yes:)
37321{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37322$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37323ac_tool_warned=yes ;;
37324esac
37325    NM=$ac_ct_NM
37326  fi
37327fi
37328
37329    else
37330      # If it succeeded, then it was overridden by the user. We will use it
37331      # for the tool.
37332
37333      # First remove it from the list of overridden variables, so we can test
37334      # for unknown variables in the end.
37335      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37336
37337      # Check if the provided tool contains a complete path.
37338      tool_specified="$NM"
37339      tool_basename="${tool_specified##*/}"
37340      if test "x$tool_basename" = "x$tool_specified"; then
37341        # A command without a complete path is provided, search $PATH.
37342        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37343$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37344        # Extract the first word of "$tool_basename", so it can be a program name with args.
37345set dummy $tool_basename; ac_word=$2
37346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37347$as_echo_n "checking for $ac_word... " >&6; }
37348if ${ac_cv_path_NM+:} false; then :
37349  $as_echo_n "(cached) " >&6
37350else
37351  case $NM in
37352  [\\/]* | ?:[\\/]*)
37353  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37354  ;;
37355  *)
37356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37357for as_dir in $PATH
37358do
37359  IFS=$as_save_IFS
37360  test -z "$as_dir" && as_dir=.
37361    for ac_exec_ext in '' $ac_executable_extensions; do
37362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37363    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37365    break 2
37366  fi
37367done
37368  done
37369IFS=$as_save_IFS
37370
37371  ;;
37372esac
37373fi
37374NM=$ac_cv_path_NM
37375if test -n "$NM"; then
37376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37377$as_echo "$NM" >&6; }
37378else
37379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37380$as_echo "no" >&6; }
37381fi
37382
37383
37384        if test "x$NM" = x; then
37385          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37386        fi
37387      else
37388        # Otherwise we believe it is a complete path. Use it as it is.
37389        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37390$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37391        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37392$as_echo_n "checking for NM... " >&6; }
37393        if test ! -x "$tool_specified"; then
37394          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37395$as_echo "not found" >&6; }
37396          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37397        fi
37398        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37399$as_echo "$tool_specified" >&6; }
37400      fi
37401    fi
37402  fi
37403
37404
37405
37406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37407
37408  # First separate the path from the arguments. This will split at the first
37409  # space.
37410  complete="$NM"
37411  path="${complete%% *}"
37412  tmp="$complete EOL"
37413  arguments="${tmp#* }"
37414
37415  # Input might be given as Windows format, start by converting to
37416  # unix format.
37417  new_path=`$CYGPATH -u "$path"`
37418
37419  # Now try to locate executable using which
37420  new_path=`$WHICH "$new_path" 2> /dev/null`
37421  # bat and cmd files are not always considered executable in cygwin causing which
37422  # to not find them
37423  if test "x$new_path" = x \
37424      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37425      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37426    new_path=`$CYGPATH -u "$path"`
37427  fi
37428  if test "x$new_path" = x; then
37429    # Oops. Which didn't find the executable.
37430    # The splitting of arguments from the executable at a space might have been incorrect,
37431    # since paths with space are more likely in Windows. Give it another try with the whole
37432    # argument.
37433    path="$complete"
37434    arguments="EOL"
37435    new_path=`$CYGPATH -u "$path"`
37436    new_path=`$WHICH "$new_path" 2> /dev/null`
37437    # bat and cmd files are not always considered executable in cygwin causing which
37438    # to not find them
37439    if test "x$new_path" = x \
37440        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37441        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37442      new_path=`$CYGPATH -u "$path"`
37443    fi
37444    if test "x$new_path" = x; then
37445      # It's still not found. Now this is an unrecoverable error.
37446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37447$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37448      has_space=`$ECHO "$complete" | $GREP " "`
37449      if test "x$has_space" != x; then
37450        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37451$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37452      fi
37453      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37454    fi
37455  fi
37456
37457  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37458  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37459  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37460  # "foo.exe" is OK but "foo" is an error.
37461  #
37462  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37463  # It is also a way to make sure we got the proper file name for the real test later on.
37464  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37465  if test "x$test_shortpath" = x; then
37466    # Short path failed, file does not exist as specified.
37467    # Try adding .exe or .cmd
37468    if test -f "${new_path}.exe"; then
37469      input_to_shortpath="${new_path}.exe"
37470    elif test -f "${new_path}.cmd"; then
37471      input_to_shortpath="${new_path}.cmd"
37472    else
37473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37474$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37475      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37476$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37477      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37478    fi
37479  else
37480    input_to_shortpath="$new_path"
37481  fi
37482
37483  # Call helper function which possibly converts this using DOS-style short mode.
37484  # If so, the updated path is stored in $new_path.
37485  new_path="$input_to_shortpath"
37486
37487  input_path="$input_to_shortpath"
37488  # Check if we need to convert this using DOS-style short mode. If the path
37489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37490  # take no chances and rewrite it.
37491  # Note: m4 eats our [], so we need to use [ and ] instead.
37492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37493  if test "x$has_forbidden_chars" != x; then
37494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37495    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37496    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37497    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37498      # Going to short mode and back again did indeed matter. Since short mode is
37499      # case insensitive, let's make it lowercase to improve readability.
37500      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37501      # Now convert it back to Unix-stile (cygpath)
37502      input_path=`$CYGPATH -u "$shortmode_path"`
37503      new_path="$input_path"
37504    fi
37505  fi
37506
37507  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37508  if test "x$test_cygdrive_prefix" = x; then
37509    # As a simple fix, exclude /usr/bin since it's not a real path.
37510    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37511      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37512      # a path prefixed by /cygdrive for fixpath to work.
37513      new_path="$CYGWIN_ROOT_PATH$input_path"
37514    fi
37515  fi
37516
37517  # remove trailing .exe if any
37518  new_path="${new_path/%.exe/}"
37519
37520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37521
37522  # First separate the path from the arguments. This will split at the first
37523  # space.
37524  complete="$NM"
37525  path="${complete%% *}"
37526  tmp="$complete EOL"
37527  arguments="${tmp#* }"
37528
37529  # Input might be given as Windows format, start by converting to
37530  # unix format.
37531  new_path="$path"
37532
37533  windows_path="$new_path"
37534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37535    unix_path=`$CYGPATH -u "$windows_path"`
37536    new_path="$unix_path"
37537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37539    new_path="$unix_path"
37540  fi
37541
37542
37543  # Now try to locate executable using which
37544  new_path=`$WHICH "$new_path" 2> /dev/null`
37545
37546  if test "x$new_path" = x; then
37547    # Oops. Which didn't find the executable.
37548    # The splitting of arguments from the executable at a space might have been incorrect,
37549    # since paths with space are more likely in Windows. Give it another try with the whole
37550    # argument.
37551    path="$complete"
37552    arguments="EOL"
37553    new_path="$path"
37554
37555  windows_path="$new_path"
37556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37557    unix_path=`$CYGPATH -u "$windows_path"`
37558    new_path="$unix_path"
37559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37561    new_path="$unix_path"
37562  fi
37563
37564
37565    new_path=`$WHICH "$new_path" 2> /dev/null`
37566
37567    if test "x$new_path" = x; then
37568      # It's still not found. Now this is an unrecoverable error.
37569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37570$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37571      has_space=`$ECHO "$complete" | $GREP " "`
37572      if test "x$has_space" != x; then
37573        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37574$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37575      fi
37576      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37577    fi
37578  fi
37579
37580  # Now new_path has a complete unix path to the binary
37581  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37582    # Keep paths in /bin as-is, but remove trailing .exe if any
37583    new_path="${new_path/%.exe/}"
37584    # Do not save /bin paths to all_fixpath_prefixes!
37585  else
37586    # Not in mixed or Windows style, start by that.
37587    new_path=`cmd //c echo $new_path`
37588
37589  input_path="$new_path"
37590  # Check if we need to convert this using DOS-style short mode. If the path
37591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37592  # take no chances and rewrite it.
37593  # Note: m4 eats our [], so we need to use [ and ] instead.
37594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37595  if test "x$has_forbidden_chars" != x; then
37596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37597    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37598  fi
37599
37600    # Output is in $new_path
37601
37602  windows_path="$new_path"
37603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37604    unix_path=`$CYGPATH -u "$windows_path"`
37605    new_path="$unix_path"
37606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37608    new_path="$unix_path"
37609  fi
37610
37611    # remove trailing .exe if any
37612    new_path="${new_path/%.exe/}"
37613
37614    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37615    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37616  fi
37617
37618  else
37619    # We're on a posix platform. Hooray! :)
37620    # First separate the path from the arguments. This will split at the first
37621    # space.
37622    complete="$NM"
37623    path="${complete%% *}"
37624    tmp="$complete EOL"
37625    arguments="${tmp#* }"
37626
37627    # Cannot rely on the command "which" here since it doesn't always work.
37628    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37629    if test -z "$is_absolute_path"; then
37630      # Path to executable is not absolute. Find it.
37631      IFS_save="$IFS"
37632      IFS=:
37633      for p in $PATH; do
37634        if test -f "$p/$path" && test -x "$p/$path"; then
37635          new_path="$p/$path"
37636          break
37637        fi
37638      done
37639      IFS="$IFS_save"
37640    else
37641      # This is an absolute path, we can use it without further modifications.
37642      new_path="$path"
37643    fi
37644
37645    if test "x$new_path" = x; then
37646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37647$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37648      has_space=`$ECHO "$complete" | $GREP " "`
37649      if test "x$has_space" != x; then
37650        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37651$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37652      fi
37653      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37654    fi
37655  fi
37656
37657  # Now join together the path and the arguments once again
37658  if test "x$arguments" != xEOL; then
37659    new_complete="$new_path ${arguments% *}"
37660  else
37661    new_complete="$new_path"
37662  fi
37663
37664  if test "x$complete" != "x$new_complete"; then
37665    NM="$new_complete"
37666    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37667$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37668  fi
37669
37670    GNM="$NM"
37671
37672  fi
37673
37674  # objcopy is used for moving debug symbols to separate files when
37675  # full debug symbols are enabled.
37676  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37677
37678
37679  # Publish this variable in the help.
37680
37681
37682  if test "x$OBJCOPY" = x; then
37683    # The variable is not set by user, try to locate tool using the code snippet
37684    if test -n "$ac_tool_prefix"; then
37685  for ac_prog in gobjcopy objcopy
37686  do
37687    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37688set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37690$as_echo_n "checking for $ac_word... " >&6; }
37691if ${ac_cv_prog_OBJCOPY+:} false; then :
37692  $as_echo_n "(cached) " >&6
37693else
37694  if test -n "$OBJCOPY"; then
37695  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37696else
37697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37698for as_dir in $PATH
37699do
37700  IFS=$as_save_IFS
37701  test -z "$as_dir" && as_dir=.
37702    for ac_exec_ext in '' $ac_executable_extensions; do
37703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37704    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37706    break 2
37707  fi
37708done
37709  done
37710IFS=$as_save_IFS
37711
37712fi
37713fi
37714OBJCOPY=$ac_cv_prog_OBJCOPY
37715if test -n "$OBJCOPY"; then
37716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37717$as_echo "$OBJCOPY" >&6; }
37718else
37719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37720$as_echo "no" >&6; }
37721fi
37722
37723
37724    test -n "$OBJCOPY" && break
37725  done
37726fi
37727if test -z "$OBJCOPY"; then
37728  ac_ct_OBJCOPY=$OBJCOPY
37729  for ac_prog in gobjcopy objcopy
37730do
37731  # Extract the first word of "$ac_prog", so it can be a program name with args.
37732set dummy $ac_prog; ac_word=$2
37733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37734$as_echo_n "checking for $ac_word... " >&6; }
37735if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37736  $as_echo_n "(cached) " >&6
37737else
37738  if test -n "$ac_ct_OBJCOPY"; then
37739  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37740else
37741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37742for as_dir in $PATH
37743do
37744  IFS=$as_save_IFS
37745  test -z "$as_dir" && as_dir=.
37746    for ac_exec_ext in '' $ac_executable_extensions; do
37747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37748    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37750    break 2
37751  fi
37752done
37753  done
37754IFS=$as_save_IFS
37755
37756fi
37757fi
37758ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37759if test -n "$ac_ct_OBJCOPY"; then
37760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37761$as_echo "$ac_ct_OBJCOPY" >&6; }
37762else
37763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37764$as_echo "no" >&6; }
37765fi
37766
37767
37768  test -n "$ac_ct_OBJCOPY" && break
37769done
37770
37771  if test "x$ac_ct_OBJCOPY" = x; then
37772    OBJCOPY=""
37773  else
37774    case $cross_compiling:$ac_tool_warned in
37775yes:)
37776{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37777$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37778ac_tool_warned=yes ;;
37779esac
37780    OBJCOPY=$ac_ct_OBJCOPY
37781  fi
37782fi
37783
37784  else
37785    # The variable is set, but is it from the command line or the environment?
37786
37787    # Try to remove the string !OBJCOPY! from our list.
37788    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37789    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37790      # If it failed, the variable was not from the command line. Ignore it,
37791      # but warn the user (except for BASH, which is always set by the calling BASH).
37792      if test "xOBJCOPY" != xBASH; then
37793        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37794$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37795      fi
37796      # Try to locate tool using the code snippet
37797      if test -n "$ac_tool_prefix"; then
37798  for ac_prog in gobjcopy objcopy
37799  do
37800    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37801set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37803$as_echo_n "checking for $ac_word... " >&6; }
37804if ${ac_cv_prog_OBJCOPY+:} false; then :
37805  $as_echo_n "(cached) " >&6
37806else
37807  if test -n "$OBJCOPY"; then
37808  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37809else
37810as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37811for as_dir in $PATH
37812do
37813  IFS=$as_save_IFS
37814  test -z "$as_dir" && as_dir=.
37815    for ac_exec_ext in '' $ac_executable_extensions; do
37816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37817    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37819    break 2
37820  fi
37821done
37822  done
37823IFS=$as_save_IFS
37824
37825fi
37826fi
37827OBJCOPY=$ac_cv_prog_OBJCOPY
37828if test -n "$OBJCOPY"; then
37829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37830$as_echo "$OBJCOPY" >&6; }
37831else
37832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37833$as_echo "no" >&6; }
37834fi
37835
37836
37837    test -n "$OBJCOPY" && break
37838  done
37839fi
37840if test -z "$OBJCOPY"; then
37841  ac_ct_OBJCOPY=$OBJCOPY
37842  for ac_prog in gobjcopy objcopy
37843do
37844  # Extract the first word of "$ac_prog", so it can be a program name with args.
37845set dummy $ac_prog; ac_word=$2
37846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37847$as_echo_n "checking for $ac_word... " >&6; }
37848if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37849  $as_echo_n "(cached) " >&6
37850else
37851  if test -n "$ac_ct_OBJCOPY"; then
37852  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37853else
37854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37855for as_dir in $PATH
37856do
37857  IFS=$as_save_IFS
37858  test -z "$as_dir" && as_dir=.
37859    for ac_exec_ext in '' $ac_executable_extensions; do
37860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37861    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37863    break 2
37864  fi
37865done
37866  done
37867IFS=$as_save_IFS
37868
37869fi
37870fi
37871ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37872if test -n "$ac_ct_OBJCOPY"; then
37873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37874$as_echo "$ac_ct_OBJCOPY" >&6; }
37875else
37876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37877$as_echo "no" >&6; }
37878fi
37879
37880
37881  test -n "$ac_ct_OBJCOPY" && break
37882done
37883
37884  if test "x$ac_ct_OBJCOPY" = x; then
37885    OBJCOPY=""
37886  else
37887    case $cross_compiling:$ac_tool_warned in
37888yes:)
37889{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37890$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37891ac_tool_warned=yes ;;
37892esac
37893    OBJCOPY=$ac_ct_OBJCOPY
37894  fi
37895fi
37896
37897    else
37898      # If it succeeded, then it was overridden by the user. We will use it
37899      # for the tool.
37900
37901      # First remove it from the list of overridden variables, so we can test
37902      # for unknown variables in the end.
37903      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37904
37905      # Check if the provided tool contains a complete path.
37906      tool_specified="$OBJCOPY"
37907      tool_basename="${tool_specified##*/}"
37908      if test "x$tool_basename" = "x$tool_specified"; then
37909        # A command without a complete path is provided, search $PATH.
37910        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37911$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37912        # Extract the first word of "$tool_basename", so it can be a program name with args.
37913set dummy $tool_basename; ac_word=$2
37914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37915$as_echo_n "checking for $ac_word... " >&6; }
37916if ${ac_cv_path_OBJCOPY+:} false; then :
37917  $as_echo_n "(cached) " >&6
37918else
37919  case $OBJCOPY in
37920  [\\/]* | ?:[\\/]*)
37921  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37922  ;;
37923  *)
37924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37925for as_dir in $PATH
37926do
37927  IFS=$as_save_IFS
37928  test -z "$as_dir" && as_dir=.
37929    for ac_exec_ext in '' $ac_executable_extensions; do
37930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37931    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37933    break 2
37934  fi
37935done
37936  done
37937IFS=$as_save_IFS
37938
37939  ;;
37940esac
37941fi
37942OBJCOPY=$ac_cv_path_OBJCOPY
37943if test -n "$OBJCOPY"; then
37944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37945$as_echo "$OBJCOPY" >&6; }
37946else
37947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37948$as_echo "no" >&6; }
37949fi
37950
37951
37952        if test "x$OBJCOPY" = x; then
37953          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37954        fi
37955      else
37956        # Otherwise we believe it is a complete path. Use it as it is.
37957        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
37958$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
37959        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
37960$as_echo_n "checking for OBJCOPY... " >&6; }
37961        if test ! -x "$tool_specified"; then
37962          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37963$as_echo "not found" >&6; }
37964          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
37965        fi
37966        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37967$as_echo "$tool_specified" >&6; }
37968      fi
37969    fi
37970  fi
37971
37972
37973    # Only call fixup if objcopy was found.
37974    if test -n "$OBJCOPY"; then
37975
37976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37977
37978  # First separate the path from the arguments. This will split at the first
37979  # space.
37980  complete="$OBJCOPY"
37981  path="${complete%% *}"
37982  tmp="$complete EOL"
37983  arguments="${tmp#* }"
37984
37985  # Input might be given as Windows format, start by converting to
37986  # unix format.
37987  new_path=`$CYGPATH -u "$path"`
37988
37989  # Now try to locate executable using which
37990  new_path=`$WHICH "$new_path" 2> /dev/null`
37991  # bat and cmd files are not always considered executable in cygwin causing which
37992  # to not find them
37993  if test "x$new_path" = x \
37994      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37995      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37996    new_path=`$CYGPATH -u "$path"`
37997  fi
37998  if test "x$new_path" = x; then
37999    # Oops. Which didn't find the executable.
38000    # The splitting of arguments from the executable at a space might have been incorrect,
38001    # since paths with space are more likely in Windows. Give it another try with the whole
38002    # argument.
38003    path="$complete"
38004    arguments="EOL"
38005    new_path=`$CYGPATH -u "$path"`
38006    new_path=`$WHICH "$new_path" 2> /dev/null`
38007    # bat and cmd files are not always considered executable in cygwin causing which
38008    # to not find them
38009    if test "x$new_path" = x \
38010        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38011        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38012      new_path=`$CYGPATH -u "$path"`
38013    fi
38014    if test "x$new_path" = x; then
38015      # It's still not found. Now this is an unrecoverable error.
38016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38017$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38018      has_space=`$ECHO "$complete" | $GREP " "`
38019      if test "x$has_space" != x; then
38020        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38021$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38022      fi
38023      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38024    fi
38025  fi
38026
38027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38030  # "foo.exe" is OK but "foo" is an error.
38031  #
38032  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38033  # It is also a way to make sure we got the proper file name for the real test later on.
38034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38035  if test "x$test_shortpath" = x; then
38036    # Short path failed, file does not exist as specified.
38037    # Try adding .exe or .cmd
38038    if test -f "${new_path}.exe"; then
38039      input_to_shortpath="${new_path}.exe"
38040    elif test -f "${new_path}.cmd"; then
38041      input_to_shortpath="${new_path}.cmd"
38042    else
38043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38044$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38045      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38046$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38047      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38048    fi
38049  else
38050    input_to_shortpath="$new_path"
38051  fi
38052
38053  # Call helper function which possibly converts this using DOS-style short mode.
38054  # If so, the updated path is stored in $new_path.
38055  new_path="$input_to_shortpath"
38056
38057  input_path="$input_to_shortpath"
38058  # Check if we need to convert this using DOS-style short mode. If the path
38059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38060  # take no chances and rewrite it.
38061  # Note: m4 eats our [], so we need to use [ and ] instead.
38062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38063  if test "x$has_forbidden_chars" != x; then
38064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38065    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38066    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38067    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38068      # Going to short mode and back again did indeed matter. Since short mode is
38069      # case insensitive, let's make it lowercase to improve readability.
38070      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38071      # Now convert it back to Unix-stile (cygpath)
38072      input_path=`$CYGPATH -u "$shortmode_path"`
38073      new_path="$input_path"
38074    fi
38075  fi
38076
38077  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38078  if test "x$test_cygdrive_prefix" = x; then
38079    # As a simple fix, exclude /usr/bin since it's not a real path.
38080    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38081      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38082      # a path prefixed by /cygdrive for fixpath to work.
38083      new_path="$CYGWIN_ROOT_PATH$input_path"
38084    fi
38085  fi
38086
38087  # remove trailing .exe if any
38088  new_path="${new_path/%.exe/}"
38089
38090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38091
38092  # First separate the path from the arguments. This will split at the first
38093  # space.
38094  complete="$OBJCOPY"
38095  path="${complete%% *}"
38096  tmp="$complete EOL"
38097  arguments="${tmp#* }"
38098
38099  # Input might be given as Windows format, start by converting to
38100  # unix format.
38101  new_path="$path"
38102
38103  windows_path="$new_path"
38104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38105    unix_path=`$CYGPATH -u "$windows_path"`
38106    new_path="$unix_path"
38107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38109    new_path="$unix_path"
38110  fi
38111
38112
38113  # Now try to locate executable using which
38114  new_path=`$WHICH "$new_path" 2> /dev/null`
38115
38116  if test "x$new_path" = x; then
38117    # Oops. Which didn't find the executable.
38118    # The splitting of arguments from the executable at a space might have been incorrect,
38119    # since paths with space are more likely in Windows. Give it another try with the whole
38120    # argument.
38121    path="$complete"
38122    arguments="EOL"
38123    new_path="$path"
38124
38125  windows_path="$new_path"
38126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38127    unix_path=`$CYGPATH -u "$windows_path"`
38128    new_path="$unix_path"
38129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38131    new_path="$unix_path"
38132  fi
38133
38134
38135    new_path=`$WHICH "$new_path" 2> /dev/null`
38136
38137    if test "x$new_path" = x; then
38138      # It's still not found. Now this is an unrecoverable error.
38139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38140$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38141      has_space=`$ECHO "$complete" | $GREP " "`
38142      if test "x$has_space" != x; then
38143        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38144$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38145      fi
38146      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38147    fi
38148  fi
38149
38150  # Now new_path has a complete unix path to the binary
38151  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38152    # Keep paths in /bin as-is, but remove trailing .exe if any
38153    new_path="${new_path/%.exe/}"
38154    # Do not save /bin paths to all_fixpath_prefixes!
38155  else
38156    # Not in mixed or Windows style, start by that.
38157    new_path=`cmd //c echo $new_path`
38158
38159  input_path="$new_path"
38160  # Check if we need to convert this using DOS-style short mode. If the path
38161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38162  # take no chances and rewrite it.
38163  # Note: m4 eats our [], so we need to use [ and ] instead.
38164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38165  if test "x$has_forbidden_chars" != x; then
38166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38167    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38168  fi
38169
38170    # Output is in $new_path
38171
38172  windows_path="$new_path"
38173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38174    unix_path=`$CYGPATH -u "$windows_path"`
38175    new_path="$unix_path"
38176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38178    new_path="$unix_path"
38179  fi
38180
38181    # remove trailing .exe if any
38182    new_path="${new_path/%.exe/}"
38183
38184    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38185    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38186  fi
38187
38188  else
38189    # We're on a posix platform. Hooray! :)
38190    # First separate the path from the arguments. This will split at the first
38191    # space.
38192    complete="$OBJCOPY"
38193    path="${complete%% *}"
38194    tmp="$complete EOL"
38195    arguments="${tmp#* }"
38196
38197    # Cannot rely on the command "which" here since it doesn't always work.
38198    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38199    if test -z "$is_absolute_path"; then
38200      # Path to executable is not absolute. Find it.
38201      IFS_save="$IFS"
38202      IFS=:
38203      for p in $PATH; do
38204        if test -f "$p/$path" && test -x "$p/$path"; then
38205          new_path="$p/$path"
38206          break
38207        fi
38208      done
38209      IFS="$IFS_save"
38210    else
38211      # This is an absolute path, we can use it without further modifications.
38212      new_path="$path"
38213    fi
38214
38215    if test "x$new_path" = x; then
38216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38217$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38218      has_space=`$ECHO "$complete" | $GREP " "`
38219      if test "x$has_space" != x; then
38220        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38221$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38222      fi
38223      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38224    fi
38225  fi
38226
38227  # Now join together the path and the arguments once again
38228  if test "x$arguments" != xEOL; then
38229    new_complete="$new_path ${arguments% *}"
38230  else
38231    new_complete="$new_path"
38232  fi
38233
38234  if test "x$complete" != "x$new_complete"; then
38235    OBJCOPY="$new_complete"
38236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38237$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38238  fi
38239
38240    fi
38241  fi
38242
38243
38244
38245  # Publish this variable in the help.
38246
38247
38248  if test "x$OBJDUMP" = x; then
38249    # The variable is not set by user, try to locate tool using the code snippet
38250    if test -n "$ac_tool_prefix"; then
38251  for ac_prog in gobjdump objdump
38252  do
38253    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38254set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38256$as_echo_n "checking for $ac_word... " >&6; }
38257if ${ac_cv_prog_OBJDUMP+:} false; then :
38258  $as_echo_n "(cached) " >&6
38259else
38260  if test -n "$OBJDUMP"; then
38261  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38262else
38263as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38264for as_dir in $PATH
38265do
38266  IFS=$as_save_IFS
38267  test -z "$as_dir" && as_dir=.
38268    for ac_exec_ext in '' $ac_executable_extensions; do
38269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38270    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38272    break 2
38273  fi
38274done
38275  done
38276IFS=$as_save_IFS
38277
38278fi
38279fi
38280OBJDUMP=$ac_cv_prog_OBJDUMP
38281if test -n "$OBJDUMP"; then
38282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38283$as_echo "$OBJDUMP" >&6; }
38284else
38285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38286$as_echo "no" >&6; }
38287fi
38288
38289
38290    test -n "$OBJDUMP" && break
38291  done
38292fi
38293if test -z "$OBJDUMP"; then
38294  ac_ct_OBJDUMP=$OBJDUMP
38295  for ac_prog in gobjdump objdump
38296do
38297  # Extract the first word of "$ac_prog", so it can be a program name with args.
38298set dummy $ac_prog; ac_word=$2
38299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38300$as_echo_n "checking for $ac_word... " >&6; }
38301if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38302  $as_echo_n "(cached) " >&6
38303else
38304  if test -n "$ac_ct_OBJDUMP"; then
38305  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38306else
38307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38308for as_dir in $PATH
38309do
38310  IFS=$as_save_IFS
38311  test -z "$as_dir" && as_dir=.
38312    for ac_exec_ext in '' $ac_executable_extensions; do
38313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38314    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38316    break 2
38317  fi
38318done
38319  done
38320IFS=$as_save_IFS
38321
38322fi
38323fi
38324ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38325if test -n "$ac_ct_OBJDUMP"; then
38326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38327$as_echo "$ac_ct_OBJDUMP" >&6; }
38328else
38329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38330$as_echo "no" >&6; }
38331fi
38332
38333
38334  test -n "$ac_ct_OBJDUMP" && break
38335done
38336
38337  if test "x$ac_ct_OBJDUMP" = x; then
38338    OBJDUMP=""
38339  else
38340    case $cross_compiling:$ac_tool_warned in
38341yes:)
38342{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38343$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38344ac_tool_warned=yes ;;
38345esac
38346    OBJDUMP=$ac_ct_OBJDUMP
38347  fi
38348fi
38349
38350  else
38351    # The variable is set, but is it from the command line or the environment?
38352
38353    # Try to remove the string !OBJDUMP! from our list.
38354    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38355    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38356      # If it failed, the variable was not from the command line. Ignore it,
38357      # but warn the user (except for BASH, which is always set by the calling BASH).
38358      if test "xOBJDUMP" != xBASH; then
38359        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38360$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38361      fi
38362      # Try to locate tool using the code snippet
38363      if test -n "$ac_tool_prefix"; then
38364  for ac_prog in gobjdump objdump
38365  do
38366    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38367set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38369$as_echo_n "checking for $ac_word... " >&6; }
38370if ${ac_cv_prog_OBJDUMP+:} false; then :
38371  $as_echo_n "(cached) " >&6
38372else
38373  if test -n "$OBJDUMP"; then
38374  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38375else
38376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38377for as_dir in $PATH
38378do
38379  IFS=$as_save_IFS
38380  test -z "$as_dir" && as_dir=.
38381    for ac_exec_ext in '' $ac_executable_extensions; do
38382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38383    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38385    break 2
38386  fi
38387done
38388  done
38389IFS=$as_save_IFS
38390
38391fi
38392fi
38393OBJDUMP=$ac_cv_prog_OBJDUMP
38394if test -n "$OBJDUMP"; then
38395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38396$as_echo "$OBJDUMP" >&6; }
38397else
38398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38399$as_echo "no" >&6; }
38400fi
38401
38402
38403    test -n "$OBJDUMP" && break
38404  done
38405fi
38406if test -z "$OBJDUMP"; then
38407  ac_ct_OBJDUMP=$OBJDUMP
38408  for ac_prog in gobjdump objdump
38409do
38410  # Extract the first word of "$ac_prog", so it can be a program name with args.
38411set dummy $ac_prog; ac_word=$2
38412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38413$as_echo_n "checking for $ac_word... " >&6; }
38414if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38415  $as_echo_n "(cached) " >&6
38416else
38417  if test -n "$ac_ct_OBJDUMP"; then
38418  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38419else
38420as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38421for as_dir in $PATH
38422do
38423  IFS=$as_save_IFS
38424  test -z "$as_dir" && as_dir=.
38425    for ac_exec_ext in '' $ac_executable_extensions; do
38426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38427    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38429    break 2
38430  fi
38431done
38432  done
38433IFS=$as_save_IFS
38434
38435fi
38436fi
38437ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38438if test -n "$ac_ct_OBJDUMP"; then
38439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38440$as_echo "$ac_ct_OBJDUMP" >&6; }
38441else
38442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38443$as_echo "no" >&6; }
38444fi
38445
38446
38447  test -n "$ac_ct_OBJDUMP" && break
38448done
38449
38450  if test "x$ac_ct_OBJDUMP" = x; then
38451    OBJDUMP=""
38452  else
38453    case $cross_compiling:$ac_tool_warned in
38454yes:)
38455{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38456$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38457ac_tool_warned=yes ;;
38458esac
38459    OBJDUMP=$ac_ct_OBJDUMP
38460  fi
38461fi
38462
38463    else
38464      # If it succeeded, then it was overridden by the user. We will use it
38465      # for the tool.
38466
38467      # First remove it from the list of overridden variables, so we can test
38468      # for unknown variables in the end.
38469      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38470
38471      # Check if the provided tool contains a complete path.
38472      tool_specified="$OBJDUMP"
38473      tool_basename="${tool_specified##*/}"
38474      if test "x$tool_basename" = "x$tool_specified"; then
38475        # A command without a complete path is provided, search $PATH.
38476        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38477$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38478        # Extract the first word of "$tool_basename", so it can be a program name with args.
38479set dummy $tool_basename; ac_word=$2
38480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38481$as_echo_n "checking for $ac_word... " >&6; }
38482if ${ac_cv_path_OBJDUMP+:} false; then :
38483  $as_echo_n "(cached) " >&6
38484else
38485  case $OBJDUMP in
38486  [\\/]* | ?:[\\/]*)
38487  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38488  ;;
38489  *)
38490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38491for as_dir in $PATH
38492do
38493  IFS=$as_save_IFS
38494  test -z "$as_dir" && as_dir=.
38495    for ac_exec_ext in '' $ac_executable_extensions; do
38496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38497    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38499    break 2
38500  fi
38501done
38502  done
38503IFS=$as_save_IFS
38504
38505  ;;
38506esac
38507fi
38508OBJDUMP=$ac_cv_path_OBJDUMP
38509if test -n "$OBJDUMP"; then
38510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38511$as_echo "$OBJDUMP" >&6; }
38512else
38513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38514$as_echo "no" >&6; }
38515fi
38516
38517
38518        if test "x$OBJDUMP" = x; then
38519          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38520        fi
38521      else
38522        # Otherwise we believe it is a complete path. Use it as it is.
38523        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38524$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38525        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38526$as_echo_n "checking for OBJDUMP... " >&6; }
38527        if test ! -x "$tool_specified"; then
38528          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38529$as_echo "not found" >&6; }
38530          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38531        fi
38532        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38533$as_echo "$tool_specified" >&6; }
38534      fi
38535    fi
38536  fi
38537
38538
38539  if test "x$OBJDUMP" != x; then
38540    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38541    # bails if argument is missing.
38542
38543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38544
38545  # First separate the path from the arguments. This will split at the first
38546  # space.
38547  complete="$OBJDUMP"
38548  path="${complete%% *}"
38549  tmp="$complete EOL"
38550  arguments="${tmp#* }"
38551
38552  # Input might be given as Windows format, start by converting to
38553  # unix format.
38554  new_path=`$CYGPATH -u "$path"`
38555
38556  # Now try to locate executable using which
38557  new_path=`$WHICH "$new_path" 2> /dev/null`
38558  # bat and cmd files are not always considered executable in cygwin causing which
38559  # to not find them
38560  if test "x$new_path" = x \
38561      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38562      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38563    new_path=`$CYGPATH -u "$path"`
38564  fi
38565  if test "x$new_path" = x; then
38566    # Oops. Which didn't find the executable.
38567    # The splitting of arguments from the executable at a space might have been incorrect,
38568    # since paths with space are more likely in Windows. Give it another try with the whole
38569    # argument.
38570    path="$complete"
38571    arguments="EOL"
38572    new_path=`$CYGPATH -u "$path"`
38573    new_path=`$WHICH "$new_path" 2> /dev/null`
38574    # bat and cmd files are not always considered executable in cygwin causing which
38575    # to not find them
38576    if test "x$new_path" = x \
38577        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38578        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38579      new_path=`$CYGPATH -u "$path"`
38580    fi
38581    if test "x$new_path" = x; then
38582      # It's still not found. Now this is an unrecoverable error.
38583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38584$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38585      has_space=`$ECHO "$complete" | $GREP " "`
38586      if test "x$has_space" != x; then
38587        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38588$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38589      fi
38590      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38591    fi
38592  fi
38593
38594  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38595  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38596  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38597  # "foo.exe" is OK but "foo" is an error.
38598  #
38599  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38600  # It is also a way to make sure we got the proper file name for the real test later on.
38601  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38602  if test "x$test_shortpath" = x; then
38603    # Short path failed, file does not exist as specified.
38604    # Try adding .exe or .cmd
38605    if test -f "${new_path}.exe"; then
38606      input_to_shortpath="${new_path}.exe"
38607    elif test -f "${new_path}.cmd"; then
38608      input_to_shortpath="${new_path}.cmd"
38609    else
38610      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38611$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38612      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38613$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38614      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38615    fi
38616  else
38617    input_to_shortpath="$new_path"
38618  fi
38619
38620  # Call helper function which possibly converts this using DOS-style short mode.
38621  # If so, the updated path is stored in $new_path.
38622  new_path="$input_to_shortpath"
38623
38624  input_path="$input_to_shortpath"
38625  # Check if we need to convert this using DOS-style short mode. If the path
38626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38627  # take no chances and rewrite it.
38628  # Note: m4 eats our [], so we need to use [ and ] instead.
38629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38630  if test "x$has_forbidden_chars" != x; then
38631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38632    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38633    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38634    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38635      # Going to short mode and back again did indeed matter. Since short mode is
38636      # case insensitive, let's make it lowercase to improve readability.
38637      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38638      # Now convert it back to Unix-stile (cygpath)
38639      input_path=`$CYGPATH -u "$shortmode_path"`
38640      new_path="$input_path"
38641    fi
38642  fi
38643
38644  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38645  if test "x$test_cygdrive_prefix" = x; then
38646    # As a simple fix, exclude /usr/bin since it's not a real path.
38647    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38648      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38649      # a path prefixed by /cygdrive for fixpath to work.
38650      new_path="$CYGWIN_ROOT_PATH$input_path"
38651    fi
38652  fi
38653
38654  # remove trailing .exe if any
38655  new_path="${new_path/%.exe/}"
38656
38657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38658
38659  # First separate the path from the arguments. This will split at the first
38660  # space.
38661  complete="$OBJDUMP"
38662  path="${complete%% *}"
38663  tmp="$complete EOL"
38664  arguments="${tmp#* }"
38665
38666  # Input might be given as Windows format, start by converting to
38667  # unix format.
38668  new_path="$path"
38669
38670  windows_path="$new_path"
38671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38672    unix_path=`$CYGPATH -u "$windows_path"`
38673    new_path="$unix_path"
38674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38676    new_path="$unix_path"
38677  fi
38678
38679
38680  # Now try to locate executable using which
38681  new_path=`$WHICH "$new_path" 2> /dev/null`
38682
38683  if test "x$new_path" = x; then
38684    # Oops. Which didn't find the executable.
38685    # The splitting of arguments from the executable at a space might have been incorrect,
38686    # since paths with space are more likely in Windows. Give it another try with the whole
38687    # argument.
38688    path="$complete"
38689    arguments="EOL"
38690    new_path="$path"
38691
38692  windows_path="$new_path"
38693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38694    unix_path=`$CYGPATH -u "$windows_path"`
38695    new_path="$unix_path"
38696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38698    new_path="$unix_path"
38699  fi
38700
38701
38702    new_path=`$WHICH "$new_path" 2> /dev/null`
38703
38704    if test "x$new_path" = x; then
38705      # It's still not found. Now this is an unrecoverable error.
38706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38707$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38708      has_space=`$ECHO "$complete" | $GREP " "`
38709      if test "x$has_space" != x; then
38710        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38711$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38712      fi
38713      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38714    fi
38715  fi
38716
38717  # Now new_path has a complete unix path to the binary
38718  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38719    # Keep paths in /bin as-is, but remove trailing .exe if any
38720    new_path="${new_path/%.exe/}"
38721    # Do not save /bin paths to all_fixpath_prefixes!
38722  else
38723    # Not in mixed or Windows style, start by that.
38724    new_path=`cmd //c echo $new_path`
38725
38726  input_path="$new_path"
38727  # Check if we need to convert this using DOS-style short mode. If the path
38728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38729  # take no chances and rewrite it.
38730  # Note: m4 eats our [], so we need to use [ and ] instead.
38731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38732  if test "x$has_forbidden_chars" != x; then
38733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38734    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38735  fi
38736
38737    # Output is in $new_path
38738
38739  windows_path="$new_path"
38740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38741    unix_path=`$CYGPATH -u "$windows_path"`
38742    new_path="$unix_path"
38743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38745    new_path="$unix_path"
38746  fi
38747
38748    # remove trailing .exe if any
38749    new_path="${new_path/%.exe/}"
38750
38751    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38752    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38753  fi
38754
38755  else
38756    # We're on a posix platform. Hooray! :)
38757    # First separate the path from the arguments. This will split at the first
38758    # space.
38759    complete="$OBJDUMP"
38760    path="${complete%% *}"
38761    tmp="$complete EOL"
38762    arguments="${tmp#* }"
38763
38764    # Cannot rely on the command "which" here since it doesn't always work.
38765    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38766    if test -z "$is_absolute_path"; then
38767      # Path to executable is not absolute. Find it.
38768      IFS_save="$IFS"
38769      IFS=:
38770      for p in $PATH; do
38771        if test -f "$p/$path" && test -x "$p/$path"; then
38772          new_path="$p/$path"
38773          break
38774        fi
38775      done
38776      IFS="$IFS_save"
38777    else
38778      # This is an absolute path, we can use it without further modifications.
38779      new_path="$path"
38780    fi
38781
38782    if test "x$new_path" = x; then
38783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38784$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38785      has_space=`$ECHO "$complete" | $GREP " "`
38786      if test "x$has_space" != x; then
38787        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38788$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38789      fi
38790      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38791    fi
38792  fi
38793
38794  # Now join together the path and the arguments once again
38795  if test "x$arguments" != xEOL; then
38796    new_complete="$new_path ${arguments% *}"
38797  else
38798    new_complete="$new_path"
38799  fi
38800
38801  if test "x$complete" != "x$new_complete"; then
38802    OBJDUMP="$new_complete"
38803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38804$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38805  fi
38806
38807  fi
38808
38809
38810  # Restore old path.
38811  PATH="$OLD_PATH"
38812
38813  # Restore the flags to the user specified values.
38814  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38815  CFLAGS="$ORG_CFLAGS"
38816  CXXFLAGS="$ORG_CXXFLAGS"
38817  OBJCFLAGS="$ORG_OBJCFLAGS"
38818
38819
38820# Finally do some processing after the detection phase
38821
38822  if test "x$COMPILE_TYPE" = "xcross"; then
38823    # Now we need to find a C/C++ compiler that can build executables for the
38824    # build platform. We can't use the AC_PROG_CC macro, since it can only be
38825    # used once. Also, we need to do this without adding a tools dir to the
38826    # path, otherwise we might pick up cross-compilers which don't use standard
38827    # naming.
38828
38829    # FIXME: we should list the discovered compilers as an exclude pattern!
38830    # If we do that, we can do this detection before POST_DETECTION, and still
38831    # find the build compilers in the tools dir, if needed.
38832
38833
38834  # Publish this variable in the help.
38835
38836
38837  if test "x$BUILD_CC" = x; then
38838    # The variable is not set by user, try to locate tool using the code snippet
38839    for ac_prog in cl cc gcc
38840do
38841  # Extract the first word of "$ac_prog", so it can be a program name with args.
38842set dummy $ac_prog; ac_word=$2
38843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38844$as_echo_n "checking for $ac_word... " >&6; }
38845if ${ac_cv_path_BUILD_CC+:} false; then :
38846  $as_echo_n "(cached) " >&6
38847else
38848  case $BUILD_CC in
38849  [\\/]* | ?:[\\/]*)
38850  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38851  ;;
38852  *)
38853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38854for as_dir in $PATH
38855do
38856  IFS=$as_save_IFS
38857  test -z "$as_dir" && as_dir=.
38858    for ac_exec_ext in '' $ac_executable_extensions; do
38859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38860    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38862    break 2
38863  fi
38864done
38865  done
38866IFS=$as_save_IFS
38867
38868  ;;
38869esac
38870fi
38871BUILD_CC=$ac_cv_path_BUILD_CC
38872if test -n "$BUILD_CC"; then
38873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38874$as_echo "$BUILD_CC" >&6; }
38875else
38876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38877$as_echo "no" >&6; }
38878fi
38879
38880
38881  test -n "$BUILD_CC" && break
38882done
38883
38884  else
38885    # The variable is set, but is it from the command line or the environment?
38886
38887    # Try to remove the string !BUILD_CC! from our list.
38888    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38889    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38890      # If it failed, the variable was not from the command line. Ignore it,
38891      # but warn the user (except for BASH, which is always set by the calling BASH).
38892      if test "xBUILD_CC" != xBASH; then
38893        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38894$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38895      fi
38896      # Try to locate tool using the code snippet
38897      for ac_prog in cl cc gcc
38898do
38899  # Extract the first word of "$ac_prog", so it can be a program name with args.
38900set dummy $ac_prog; ac_word=$2
38901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38902$as_echo_n "checking for $ac_word... " >&6; }
38903if ${ac_cv_path_BUILD_CC+:} false; then :
38904  $as_echo_n "(cached) " >&6
38905else
38906  case $BUILD_CC in
38907  [\\/]* | ?:[\\/]*)
38908  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38909  ;;
38910  *)
38911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38912for as_dir in $PATH
38913do
38914  IFS=$as_save_IFS
38915  test -z "$as_dir" && as_dir=.
38916    for ac_exec_ext in '' $ac_executable_extensions; do
38917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38918    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38920    break 2
38921  fi
38922done
38923  done
38924IFS=$as_save_IFS
38925
38926  ;;
38927esac
38928fi
38929BUILD_CC=$ac_cv_path_BUILD_CC
38930if test -n "$BUILD_CC"; then
38931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38932$as_echo "$BUILD_CC" >&6; }
38933else
38934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38935$as_echo "no" >&6; }
38936fi
38937
38938
38939  test -n "$BUILD_CC" && break
38940done
38941
38942    else
38943      # If it succeeded, then it was overridden by the user. We will use it
38944      # for the tool.
38945
38946      # First remove it from the list of overridden variables, so we can test
38947      # for unknown variables in the end.
38948      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38949
38950      # Check if the provided tool contains a complete path.
38951      tool_specified="$BUILD_CC"
38952      tool_basename="${tool_specified##*/}"
38953      if test "x$tool_basename" = "x$tool_specified"; then
38954        # A command without a complete path is provided, search $PATH.
38955        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
38956$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
38957        # Extract the first word of "$tool_basename", so it can be a program name with args.
38958set dummy $tool_basename; ac_word=$2
38959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38960$as_echo_n "checking for $ac_word... " >&6; }
38961if ${ac_cv_path_BUILD_CC+:} false; then :
38962  $as_echo_n "(cached) " >&6
38963else
38964  case $BUILD_CC in
38965  [\\/]* | ?:[\\/]*)
38966  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38967  ;;
38968  *)
38969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38970for as_dir in $PATH
38971do
38972  IFS=$as_save_IFS
38973  test -z "$as_dir" && as_dir=.
38974    for ac_exec_ext in '' $ac_executable_extensions; do
38975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38976    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38978    break 2
38979  fi
38980done
38981  done
38982IFS=$as_save_IFS
38983
38984  ;;
38985esac
38986fi
38987BUILD_CC=$ac_cv_path_BUILD_CC
38988if test -n "$BUILD_CC"; then
38989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38990$as_echo "$BUILD_CC" >&6; }
38991else
38992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38993$as_echo "no" >&6; }
38994fi
38995
38996
38997        if test "x$BUILD_CC" = x; then
38998          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38999        fi
39000      else
39001        # Otherwise we believe it is a complete path. Use it as it is.
39002        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39003$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39004        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39005$as_echo_n "checking for BUILD_CC... " >&6; }
39006        if test ! -x "$tool_specified"; then
39007          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39008$as_echo "not found" >&6; }
39009          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39010        fi
39011        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39012$as_echo "$tool_specified" >&6; }
39013      fi
39014    fi
39015  fi
39016
39017
39018
39019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39020
39021  # First separate the path from the arguments. This will split at the first
39022  # space.
39023  complete="$BUILD_CC"
39024  path="${complete%% *}"
39025  tmp="$complete EOL"
39026  arguments="${tmp#* }"
39027
39028  # Input might be given as Windows format, start by converting to
39029  # unix format.
39030  new_path=`$CYGPATH -u "$path"`
39031
39032  # Now try to locate executable using which
39033  new_path=`$WHICH "$new_path" 2> /dev/null`
39034  # bat and cmd files are not always considered executable in cygwin causing which
39035  # to not find them
39036  if test "x$new_path" = x \
39037      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39038      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39039    new_path=`$CYGPATH -u "$path"`
39040  fi
39041  if test "x$new_path" = x; then
39042    # Oops. Which didn't find the executable.
39043    # The splitting of arguments from the executable at a space might have been incorrect,
39044    # since paths with space are more likely in Windows. Give it another try with the whole
39045    # argument.
39046    path="$complete"
39047    arguments="EOL"
39048    new_path=`$CYGPATH -u "$path"`
39049    new_path=`$WHICH "$new_path" 2> /dev/null`
39050    # bat and cmd files are not always considered executable in cygwin causing which
39051    # to not find them
39052    if test "x$new_path" = x \
39053        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39054        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39055      new_path=`$CYGPATH -u "$path"`
39056    fi
39057    if test "x$new_path" = x; then
39058      # It's still not found. Now this is an unrecoverable error.
39059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39060$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39061      has_space=`$ECHO "$complete" | $GREP " "`
39062      if test "x$has_space" != x; then
39063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39065      fi
39066      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39067    fi
39068  fi
39069
39070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39073  # "foo.exe" is OK but "foo" is an error.
39074  #
39075  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39076  # It is also a way to make sure we got the proper file name for the real test later on.
39077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39078  if test "x$test_shortpath" = x; then
39079    # Short path failed, file does not exist as specified.
39080    # Try adding .exe or .cmd
39081    if test -f "${new_path}.exe"; then
39082      input_to_shortpath="${new_path}.exe"
39083    elif test -f "${new_path}.cmd"; then
39084      input_to_shortpath="${new_path}.cmd"
39085    else
39086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39087$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39088      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39089$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39090      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39091    fi
39092  else
39093    input_to_shortpath="$new_path"
39094  fi
39095
39096  # Call helper function which possibly converts this using DOS-style short mode.
39097  # If so, the updated path is stored in $new_path.
39098  new_path="$input_to_shortpath"
39099
39100  input_path="$input_to_shortpath"
39101  # Check if we need to convert this using DOS-style short mode. If the path
39102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39103  # take no chances and rewrite it.
39104  # Note: m4 eats our [], so we need to use [ and ] instead.
39105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39106  if test "x$has_forbidden_chars" != x; then
39107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39111      # Going to short mode and back again did indeed matter. Since short mode is
39112      # case insensitive, let's make it lowercase to improve readability.
39113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39114      # Now convert it back to Unix-stile (cygpath)
39115      input_path=`$CYGPATH -u "$shortmode_path"`
39116      new_path="$input_path"
39117    fi
39118  fi
39119
39120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39121  if test "x$test_cygdrive_prefix" = x; then
39122    # As a simple fix, exclude /usr/bin since it's not a real path.
39123    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39125      # a path prefixed by /cygdrive for fixpath to work.
39126      new_path="$CYGWIN_ROOT_PATH$input_path"
39127    fi
39128  fi
39129
39130  # remove trailing .exe if any
39131  new_path="${new_path/%.exe/}"
39132
39133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39134
39135  # First separate the path from the arguments. This will split at the first
39136  # space.
39137  complete="$BUILD_CC"
39138  path="${complete%% *}"
39139  tmp="$complete EOL"
39140  arguments="${tmp#* }"
39141
39142  # Input might be given as Windows format, start by converting to
39143  # unix format.
39144  new_path="$path"
39145
39146  windows_path="$new_path"
39147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39148    unix_path=`$CYGPATH -u "$windows_path"`
39149    new_path="$unix_path"
39150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39152    new_path="$unix_path"
39153  fi
39154
39155
39156  # Now try to locate executable using which
39157  new_path=`$WHICH "$new_path" 2> /dev/null`
39158
39159  if test "x$new_path" = x; then
39160    # Oops. Which didn't find the executable.
39161    # The splitting of arguments from the executable at a space might have been incorrect,
39162    # since paths with space are more likely in Windows. Give it another try with the whole
39163    # argument.
39164    path="$complete"
39165    arguments="EOL"
39166    new_path="$path"
39167
39168  windows_path="$new_path"
39169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39170    unix_path=`$CYGPATH -u "$windows_path"`
39171    new_path="$unix_path"
39172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39174    new_path="$unix_path"
39175  fi
39176
39177
39178    new_path=`$WHICH "$new_path" 2> /dev/null`
39179
39180    if test "x$new_path" = x; then
39181      # It's still not found. Now this is an unrecoverable error.
39182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39183$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39184      has_space=`$ECHO "$complete" | $GREP " "`
39185      if test "x$has_space" != x; then
39186        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39187$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39188      fi
39189      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39190    fi
39191  fi
39192
39193  # Now new_path has a complete unix path to the binary
39194  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39195    # Keep paths in /bin as-is, but remove trailing .exe if any
39196    new_path="${new_path/%.exe/}"
39197    # Do not save /bin paths to all_fixpath_prefixes!
39198  else
39199    # Not in mixed or Windows style, start by that.
39200    new_path=`cmd //c echo $new_path`
39201
39202  input_path="$new_path"
39203  # Check if we need to convert this using DOS-style short mode. If the path
39204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39205  # take no chances and rewrite it.
39206  # Note: m4 eats our [], so we need to use [ and ] instead.
39207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39208  if test "x$has_forbidden_chars" != x; then
39209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39210    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39211  fi
39212
39213    # Output is in $new_path
39214
39215  windows_path="$new_path"
39216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39217    unix_path=`$CYGPATH -u "$windows_path"`
39218    new_path="$unix_path"
39219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39221    new_path="$unix_path"
39222  fi
39223
39224    # remove trailing .exe if any
39225    new_path="${new_path/%.exe/}"
39226
39227    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39228    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39229  fi
39230
39231  else
39232    # We're on a posix platform. Hooray! :)
39233    # First separate the path from the arguments. This will split at the first
39234    # space.
39235    complete="$BUILD_CC"
39236    path="${complete%% *}"
39237    tmp="$complete EOL"
39238    arguments="${tmp#* }"
39239
39240    # Cannot rely on the command "which" here since it doesn't always work.
39241    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39242    if test -z "$is_absolute_path"; then
39243      # Path to executable is not absolute. Find it.
39244      IFS_save="$IFS"
39245      IFS=:
39246      for p in $PATH; do
39247        if test -f "$p/$path" && test -x "$p/$path"; then
39248          new_path="$p/$path"
39249          break
39250        fi
39251      done
39252      IFS="$IFS_save"
39253    else
39254      # This is an absolute path, we can use it without further modifications.
39255      new_path="$path"
39256    fi
39257
39258    if test "x$new_path" = x; then
39259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39260$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39261      has_space=`$ECHO "$complete" | $GREP " "`
39262      if test "x$has_space" != x; then
39263        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39264$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39265      fi
39266      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39267    fi
39268  fi
39269
39270  # Now join together the path and the arguments once again
39271  if test "x$arguments" != xEOL; then
39272    new_complete="$new_path ${arguments% *}"
39273  else
39274    new_complete="$new_path"
39275  fi
39276
39277  if test "x$complete" != "x$new_complete"; then
39278    BUILD_CC="$new_complete"
39279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39280$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39281  fi
39282
39283
39284
39285  # Publish this variable in the help.
39286
39287
39288  if test "x$BUILD_CXX" = x; then
39289    # The variable is not set by user, try to locate tool using the code snippet
39290    for ac_prog in cl CC g++
39291do
39292  # Extract the first word of "$ac_prog", so it can be a program name with args.
39293set dummy $ac_prog; ac_word=$2
39294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39295$as_echo_n "checking for $ac_word... " >&6; }
39296if ${ac_cv_path_BUILD_CXX+:} false; then :
39297  $as_echo_n "(cached) " >&6
39298else
39299  case $BUILD_CXX in
39300  [\\/]* | ?:[\\/]*)
39301  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39302  ;;
39303  *)
39304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39305for as_dir in $PATH
39306do
39307  IFS=$as_save_IFS
39308  test -z "$as_dir" && as_dir=.
39309    for ac_exec_ext in '' $ac_executable_extensions; do
39310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39311    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39313    break 2
39314  fi
39315done
39316  done
39317IFS=$as_save_IFS
39318
39319  ;;
39320esac
39321fi
39322BUILD_CXX=$ac_cv_path_BUILD_CXX
39323if test -n "$BUILD_CXX"; then
39324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39325$as_echo "$BUILD_CXX" >&6; }
39326else
39327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39328$as_echo "no" >&6; }
39329fi
39330
39331
39332  test -n "$BUILD_CXX" && break
39333done
39334
39335  else
39336    # The variable is set, but is it from the command line or the environment?
39337
39338    # Try to remove the string !BUILD_CXX! from our list.
39339    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39340    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39341      # If it failed, the variable was not from the command line. Ignore it,
39342      # but warn the user (except for BASH, which is always set by the calling BASH).
39343      if test "xBUILD_CXX" != xBASH; then
39344        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39345$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39346      fi
39347      # Try to locate tool using the code snippet
39348      for ac_prog in cl CC g++
39349do
39350  # Extract the first word of "$ac_prog", so it can be a program name with args.
39351set dummy $ac_prog; ac_word=$2
39352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39353$as_echo_n "checking for $ac_word... " >&6; }
39354if ${ac_cv_path_BUILD_CXX+:} false; then :
39355  $as_echo_n "(cached) " >&6
39356else
39357  case $BUILD_CXX in
39358  [\\/]* | ?:[\\/]*)
39359  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39360  ;;
39361  *)
39362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39363for as_dir in $PATH
39364do
39365  IFS=$as_save_IFS
39366  test -z "$as_dir" && as_dir=.
39367    for ac_exec_ext in '' $ac_executable_extensions; do
39368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39369    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39371    break 2
39372  fi
39373done
39374  done
39375IFS=$as_save_IFS
39376
39377  ;;
39378esac
39379fi
39380BUILD_CXX=$ac_cv_path_BUILD_CXX
39381if test -n "$BUILD_CXX"; then
39382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39383$as_echo "$BUILD_CXX" >&6; }
39384else
39385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39386$as_echo "no" >&6; }
39387fi
39388
39389
39390  test -n "$BUILD_CXX" && break
39391done
39392
39393    else
39394      # If it succeeded, then it was overridden by the user. We will use it
39395      # for the tool.
39396
39397      # First remove it from the list of overridden variables, so we can test
39398      # for unknown variables in the end.
39399      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39400
39401      # Check if the provided tool contains a complete path.
39402      tool_specified="$BUILD_CXX"
39403      tool_basename="${tool_specified##*/}"
39404      if test "x$tool_basename" = "x$tool_specified"; then
39405        # A command without a complete path is provided, search $PATH.
39406        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39407$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39408        # Extract the first word of "$tool_basename", so it can be a program name with args.
39409set dummy $tool_basename; ac_word=$2
39410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39411$as_echo_n "checking for $ac_word... " >&6; }
39412if ${ac_cv_path_BUILD_CXX+:} false; then :
39413  $as_echo_n "(cached) " >&6
39414else
39415  case $BUILD_CXX in
39416  [\\/]* | ?:[\\/]*)
39417  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39418  ;;
39419  *)
39420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39421for as_dir in $PATH
39422do
39423  IFS=$as_save_IFS
39424  test -z "$as_dir" && as_dir=.
39425    for ac_exec_ext in '' $ac_executable_extensions; do
39426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39427    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39429    break 2
39430  fi
39431done
39432  done
39433IFS=$as_save_IFS
39434
39435  ;;
39436esac
39437fi
39438BUILD_CXX=$ac_cv_path_BUILD_CXX
39439if test -n "$BUILD_CXX"; then
39440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39441$as_echo "$BUILD_CXX" >&6; }
39442else
39443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39444$as_echo "no" >&6; }
39445fi
39446
39447
39448        if test "x$BUILD_CXX" = x; then
39449          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39450        fi
39451      else
39452        # Otherwise we believe it is a complete path. Use it as it is.
39453        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39454$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39455        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39456$as_echo_n "checking for BUILD_CXX... " >&6; }
39457        if test ! -x "$tool_specified"; then
39458          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39459$as_echo "not found" >&6; }
39460          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39461        fi
39462        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39463$as_echo "$tool_specified" >&6; }
39464      fi
39465    fi
39466  fi
39467
39468
39469
39470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39471
39472  # First separate the path from the arguments. This will split at the first
39473  # space.
39474  complete="$BUILD_CXX"
39475  path="${complete%% *}"
39476  tmp="$complete EOL"
39477  arguments="${tmp#* }"
39478
39479  # Input might be given as Windows format, start by converting to
39480  # unix format.
39481  new_path=`$CYGPATH -u "$path"`
39482
39483  # Now try to locate executable using which
39484  new_path=`$WHICH "$new_path" 2> /dev/null`
39485  # bat and cmd files are not always considered executable in cygwin causing which
39486  # to not find them
39487  if test "x$new_path" = x \
39488      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39489      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39490    new_path=`$CYGPATH -u "$path"`
39491  fi
39492  if test "x$new_path" = x; then
39493    # Oops. Which didn't find the executable.
39494    # The splitting of arguments from the executable at a space might have been incorrect,
39495    # since paths with space are more likely in Windows. Give it another try with the whole
39496    # argument.
39497    path="$complete"
39498    arguments="EOL"
39499    new_path=`$CYGPATH -u "$path"`
39500    new_path=`$WHICH "$new_path" 2> /dev/null`
39501    # bat and cmd files are not always considered executable in cygwin causing which
39502    # to not find them
39503    if test "x$new_path" = x \
39504        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39505        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39506      new_path=`$CYGPATH -u "$path"`
39507    fi
39508    if test "x$new_path" = x; then
39509      # It's still not found. Now this is an unrecoverable error.
39510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39511$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39512      has_space=`$ECHO "$complete" | $GREP " "`
39513      if test "x$has_space" != x; then
39514        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39515$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39516      fi
39517      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39518    fi
39519  fi
39520
39521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39524  # "foo.exe" is OK but "foo" is an error.
39525  #
39526  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39527  # It is also a way to make sure we got the proper file name for the real test later on.
39528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39529  if test "x$test_shortpath" = x; then
39530    # Short path failed, file does not exist as specified.
39531    # Try adding .exe or .cmd
39532    if test -f "${new_path}.exe"; then
39533      input_to_shortpath="${new_path}.exe"
39534    elif test -f "${new_path}.cmd"; then
39535      input_to_shortpath="${new_path}.cmd"
39536    else
39537      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39538$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39539      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39540$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39541      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39542    fi
39543  else
39544    input_to_shortpath="$new_path"
39545  fi
39546
39547  # Call helper function which possibly converts this using DOS-style short mode.
39548  # If so, the updated path is stored in $new_path.
39549  new_path="$input_to_shortpath"
39550
39551  input_path="$input_to_shortpath"
39552  # Check if we need to convert this using DOS-style short mode. If the path
39553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39554  # take no chances and rewrite it.
39555  # Note: m4 eats our [], so we need to use [ and ] instead.
39556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39557  if test "x$has_forbidden_chars" != x; then
39558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39559    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39560    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39561    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39562      # Going to short mode and back again did indeed matter. Since short mode is
39563      # case insensitive, let's make it lowercase to improve readability.
39564      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39565      # Now convert it back to Unix-stile (cygpath)
39566      input_path=`$CYGPATH -u "$shortmode_path"`
39567      new_path="$input_path"
39568    fi
39569  fi
39570
39571  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39572  if test "x$test_cygdrive_prefix" = x; then
39573    # As a simple fix, exclude /usr/bin since it's not a real path.
39574    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39575      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39576      # a path prefixed by /cygdrive for fixpath to work.
39577      new_path="$CYGWIN_ROOT_PATH$input_path"
39578    fi
39579  fi
39580
39581  # remove trailing .exe if any
39582  new_path="${new_path/%.exe/}"
39583
39584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39585
39586  # First separate the path from the arguments. This will split at the first
39587  # space.
39588  complete="$BUILD_CXX"
39589  path="${complete%% *}"
39590  tmp="$complete EOL"
39591  arguments="${tmp#* }"
39592
39593  # Input might be given as Windows format, start by converting to
39594  # unix format.
39595  new_path="$path"
39596
39597  windows_path="$new_path"
39598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39599    unix_path=`$CYGPATH -u "$windows_path"`
39600    new_path="$unix_path"
39601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39603    new_path="$unix_path"
39604  fi
39605
39606
39607  # Now try to locate executable using which
39608  new_path=`$WHICH "$new_path" 2> /dev/null`
39609
39610  if test "x$new_path" = x; then
39611    # Oops. Which didn't find the executable.
39612    # The splitting of arguments from the executable at a space might have been incorrect,
39613    # since paths with space are more likely in Windows. Give it another try with the whole
39614    # argument.
39615    path="$complete"
39616    arguments="EOL"
39617    new_path="$path"
39618
39619  windows_path="$new_path"
39620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39621    unix_path=`$CYGPATH -u "$windows_path"`
39622    new_path="$unix_path"
39623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39625    new_path="$unix_path"
39626  fi
39627
39628
39629    new_path=`$WHICH "$new_path" 2> /dev/null`
39630
39631    if test "x$new_path" = x; then
39632      # It's still not found. Now this is an unrecoverable error.
39633      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39634$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39635      has_space=`$ECHO "$complete" | $GREP " "`
39636      if test "x$has_space" != x; then
39637        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39638$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39639      fi
39640      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39641    fi
39642  fi
39643
39644  # Now new_path has a complete unix path to the binary
39645  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39646    # Keep paths in /bin as-is, but remove trailing .exe if any
39647    new_path="${new_path/%.exe/}"
39648    # Do not save /bin paths to all_fixpath_prefixes!
39649  else
39650    # Not in mixed or Windows style, start by that.
39651    new_path=`cmd //c echo $new_path`
39652
39653  input_path="$new_path"
39654  # Check if we need to convert this using DOS-style short mode. If the path
39655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39656  # take no chances and rewrite it.
39657  # Note: m4 eats our [], so we need to use [ and ] instead.
39658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39659  if test "x$has_forbidden_chars" != x; then
39660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39661    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39662  fi
39663
39664    # Output is in $new_path
39665
39666  windows_path="$new_path"
39667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39668    unix_path=`$CYGPATH -u "$windows_path"`
39669    new_path="$unix_path"
39670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39672    new_path="$unix_path"
39673  fi
39674
39675    # remove trailing .exe if any
39676    new_path="${new_path/%.exe/}"
39677
39678    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39679    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39680  fi
39681
39682  else
39683    # We're on a posix platform. Hooray! :)
39684    # First separate the path from the arguments. This will split at the first
39685    # space.
39686    complete="$BUILD_CXX"
39687    path="${complete%% *}"
39688    tmp="$complete EOL"
39689    arguments="${tmp#* }"
39690
39691    # Cannot rely on the command "which" here since it doesn't always work.
39692    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39693    if test -z "$is_absolute_path"; then
39694      # Path to executable is not absolute. Find it.
39695      IFS_save="$IFS"
39696      IFS=:
39697      for p in $PATH; do
39698        if test -f "$p/$path" && test -x "$p/$path"; then
39699          new_path="$p/$path"
39700          break
39701        fi
39702      done
39703      IFS="$IFS_save"
39704    else
39705      # This is an absolute path, we can use it without further modifications.
39706      new_path="$path"
39707    fi
39708
39709    if test "x$new_path" = x; then
39710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39711$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39712      has_space=`$ECHO "$complete" | $GREP " "`
39713      if test "x$has_space" != x; then
39714        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39715$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39716      fi
39717      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39718    fi
39719  fi
39720
39721  # Now join together the path and the arguments once again
39722  if test "x$arguments" != xEOL; then
39723    new_complete="$new_path ${arguments% *}"
39724  else
39725    new_complete="$new_path"
39726  fi
39727
39728  if test "x$complete" != "x$new_complete"; then
39729    BUILD_CXX="$new_complete"
39730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39731$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39732  fi
39733
39734
39735
39736  # Publish this variable in the help.
39737
39738
39739  if test "x$BUILD_LD" = x; then
39740    # The variable is not set by user, try to locate tool using the code snippet
39741    for ac_prog in ld
39742do
39743  # Extract the first word of "$ac_prog", so it can be a program name with args.
39744set dummy $ac_prog; ac_word=$2
39745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39746$as_echo_n "checking for $ac_word... " >&6; }
39747if ${ac_cv_path_BUILD_LD+:} false; then :
39748  $as_echo_n "(cached) " >&6
39749else
39750  case $BUILD_LD in
39751  [\\/]* | ?:[\\/]*)
39752  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39753  ;;
39754  *)
39755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39756for as_dir in $PATH
39757do
39758  IFS=$as_save_IFS
39759  test -z "$as_dir" && as_dir=.
39760    for ac_exec_ext in '' $ac_executable_extensions; do
39761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39762    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39764    break 2
39765  fi
39766done
39767  done
39768IFS=$as_save_IFS
39769
39770  ;;
39771esac
39772fi
39773BUILD_LD=$ac_cv_path_BUILD_LD
39774if test -n "$BUILD_LD"; then
39775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39776$as_echo "$BUILD_LD" >&6; }
39777else
39778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39779$as_echo "no" >&6; }
39780fi
39781
39782
39783  test -n "$BUILD_LD" && break
39784done
39785
39786  else
39787    # The variable is set, but is it from the command line or the environment?
39788
39789    # Try to remove the string !BUILD_LD! from our list.
39790    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39791    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39792      # If it failed, the variable was not from the command line. Ignore it,
39793      # but warn the user (except for BASH, which is always set by the calling BASH).
39794      if test "xBUILD_LD" != xBASH; then
39795        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39796$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39797      fi
39798      # Try to locate tool using the code snippet
39799      for ac_prog in ld
39800do
39801  # Extract the first word of "$ac_prog", so it can be a program name with args.
39802set dummy $ac_prog; ac_word=$2
39803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39804$as_echo_n "checking for $ac_word... " >&6; }
39805if ${ac_cv_path_BUILD_LD+:} false; then :
39806  $as_echo_n "(cached) " >&6
39807else
39808  case $BUILD_LD in
39809  [\\/]* | ?:[\\/]*)
39810  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39811  ;;
39812  *)
39813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39814for as_dir in $PATH
39815do
39816  IFS=$as_save_IFS
39817  test -z "$as_dir" && as_dir=.
39818    for ac_exec_ext in '' $ac_executable_extensions; do
39819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39820    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39822    break 2
39823  fi
39824done
39825  done
39826IFS=$as_save_IFS
39827
39828  ;;
39829esac
39830fi
39831BUILD_LD=$ac_cv_path_BUILD_LD
39832if test -n "$BUILD_LD"; then
39833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39834$as_echo "$BUILD_LD" >&6; }
39835else
39836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39837$as_echo "no" >&6; }
39838fi
39839
39840
39841  test -n "$BUILD_LD" && break
39842done
39843
39844    else
39845      # If it succeeded, then it was overridden by the user. We will use it
39846      # for the tool.
39847
39848      # First remove it from the list of overridden variables, so we can test
39849      # for unknown variables in the end.
39850      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39851
39852      # Check if the provided tool contains a complete path.
39853      tool_specified="$BUILD_LD"
39854      tool_basename="${tool_specified##*/}"
39855      if test "x$tool_basename" = "x$tool_specified"; then
39856        # A command without a complete path is provided, search $PATH.
39857        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
39858$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
39859        # Extract the first word of "$tool_basename", so it can be a program name with args.
39860set dummy $tool_basename; ac_word=$2
39861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39862$as_echo_n "checking for $ac_word... " >&6; }
39863if ${ac_cv_path_BUILD_LD+:} false; then :
39864  $as_echo_n "(cached) " >&6
39865else
39866  case $BUILD_LD in
39867  [\\/]* | ?:[\\/]*)
39868  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39869  ;;
39870  *)
39871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39872for as_dir in $PATH
39873do
39874  IFS=$as_save_IFS
39875  test -z "$as_dir" && as_dir=.
39876    for ac_exec_ext in '' $ac_executable_extensions; do
39877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39878    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39880    break 2
39881  fi
39882done
39883  done
39884IFS=$as_save_IFS
39885
39886  ;;
39887esac
39888fi
39889BUILD_LD=$ac_cv_path_BUILD_LD
39890if test -n "$BUILD_LD"; then
39891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39892$as_echo "$BUILD_LD" >&6; }
39893else
39894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39895$as_echo "no" >&6; }
39896fi
39897
39898
39899        if test "x$BUILD_LD" = x; then
39900          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39901        fi
39902      else
39903        # Otherwise we believe it is a complete path. Use it as it is.
39904        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
39905$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
39906        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
39907$as_echo_n "checking for BUILD_LD... " >&6; }
39908        if test ! -x "$tool_specified"; then
39909          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39910$as_echo "not found" >&6; }
39911          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
39912        fi
39913        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39914$as_echo "$tool_specified" >&6; }
39915      fi
39916    fi
39917  fi
39918
39919
39920
39921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39922
39923  # First separate the path from the arguments. This will split at the first
39924  # space.
39925  complete="$BUILD_LD"
39926  path="${complete%% *}"
39927  tmp="$complete EOL"
39928  arguments="${tmp#* }"
39929
39930  # Input might be given as Windows format, start by converting to
39931  # unix format.
39932  new_path=`$CYGPATH -u "$path"`
39933
39934  # Now try to locate executable using which
39935  new_path=`$WHICH "$new_path" 2> /dev/null`
39936  # bat and cmd files are not always considered executable in cygwin causing which
39937  # to not find them
39938  if test "x$new_path" = x \
39939      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39940      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39941    new_path=`$CYGPATH -u "$path"`
39942  fi
39943  if test "x$new_path" = x; then
39944    # Oops. Which didn't find the executable.
39945    # The splitting of arguments from the executable at a space might have been incorrect,
39946    # since paths with space are more likely in Windows. Give it another try with the whole
39947    # argument.
39948    path="$complete"
39949    arguments="EOL"
39950    new_path=`$CYGPATH -u "$path"`
39951    new_path=`$WHICH "$new_path" 2> /dev/null`
39952    # bat and cmd files are not always considered executable in cygwin causing which
39953    # to not find them
39954    if test "x$new_path" = x \
39955        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39956        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39957      new_path=`$CYGPATH -u "$path"`
39958    fi
39959    if test "x$new_path" = x; then
39960      # It's still not found. Now this is an unrecoverable error.
39961      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39962$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39963      has_space=`$ECHO "$complete" | $GREP " "`
39964      if test "x$has_space" != x; then
39965        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39966$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39967      fi
39968      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39969    fi
39970  fi
39971
39972  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39973  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39974  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39975  # "foo.exe" is OK but "foo" is an error.
39976  #
39977  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39978  # It is also a way to make sure we got the proper file name for the real test later on.
39979  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39980  if test "x$test_shortpath" = x; then
39981    # Short path failed, file does not exist as specified.
39982    # Try adding .exe or .cmd
39983    if test -f "${new_path}.exe"; then
39984      input_to_shortpath="${new_path}.exe"
39985    elif test -f "${new_path}.cmd"; then
39986      input_to_shortpath="${new_path}.cmd"
39987    else
39988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
39989$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
39990      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39991$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39992      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39993    fi
39994  else
39995    input_to_shortpath="$new_path"
39996  fi
39997
39998  # Call helper function which possibly converts this using DOS-style short mode.
39999  # If so, the updated path is stored in $new_path.
40000  new_path="$input_to_shortpath"
40001
40002  input_path="$input_to_shortpath"
40003  # Check if we need to convert this using DOS-style short mode. If the path
40004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40005  # take no chances and rewrite it.
40006  # Note: m4 eats our [], so we need to use [ and ] instead.
40007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40008  if test "x$has_forbidden_chars" != x; then
40009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40010    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40011    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40012    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40013      # Going to short mode and back again did indeed matter. Since short mode is
40014      # case insensitive, let's make it lowercase to improve readability.
40015      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40016      # Now convert it back to Unix-stile (cygpath)
40017      input_path=`$CYGPATH -u "$shortmode_path"`
40018      new_path="$input_path"
40019    fi
40020  fi
40021
40022  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40023  if test "x$test_cygdrive_prefix" = x; then
40024    # As a simple fix, exclude /usr/bin since it's not a real path.
40025    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40026      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40027      # a path prefixed by /cygdrive for fixpath to work.
40028      new_path="$CYGWIN_ROOT_PATH$input_path"
40029    fi
40030  fi
40031
40032  # remove trailing .exe if any
40033  new_path="${new_path/%.exe/}"
40034
40035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40036
40037  # First separate the path from the arguments. This will split at the first
40038  # space.
40039  complete="$BUILD_LD"
40040  path="${complete%% *}"
40041  tmp="$complete EOL"
40042  arguments="${tmp#* }"
40043
40044  # Input might be given as Windows format, start by converting to
40045  # unix format.
40046  new_path="$path"
40047
40048  windows_path="$new_path"
40049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40050    unix_path=`$CYGPATH -u "$windows_path"`
40051    new_path="$unix_path"
40052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40054    new_path="$unix_path"
40055  fi
40056
40057
40058  # Now try to locate executable using which
40059  new_path=`$WHICH "$new_path" 2> /dev/null`
40060
40061  if test "x$new_path" = x; then
40062    # Oops. Which didn't find the executable.
40063    # The splitting of arguments from the executable at a space might have been incorrect,
40064    # since paths with space are more likely in Windows. Give it another try with the whole
40065    # argument.
40066    path="$complete"
40067    arguments="EOL"
40068    new_path="$path"
40069
40070  windows_path="$new_path"
40071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40072    unix_path=`$CYGPATH -u "$windows_path"`
40073    new_path="$unix_path"
40074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40076    new_path="$unix_path"
40077  fi
40078
40079
40080    new_path=`$WHICH "$new_path" 2> /dev/null`
40081
40082    if test "x$new_path" = x; then
40083      # It's still not found. Now this is an unrecoverable error.
40084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40085$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40086      has_space=`$ECHO "$complete" | $GREP " "`
40087      if test "x$has_space" != x; then
40088        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40089$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40090      fi
40091      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40092    fi
40093  fi
40094
40095  # Now new_path has a complete unix path to the binary
40096  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40097    # Keep paths in /bin as-is, but remove trailing .exe if any
40098    new_path="${new_path/%.exe/}"
40099    # Do not save /bin paths to all_fixpath_prefixes!
40100  else
40101    # Not in mixed or Windows style, start by that.
40102    new_path=`cmd //c echo $new_path`
40103
40104  input_path="$new_path"
40105  # Check if we need to convert this using DOS-style short mode. If the path
40106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40107  # take no chances and rewrite it.
40108  # Note: m4 eats our [], so we need to use [ and ] instead.
40109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40110  if test "x$has_forbidden_chars" != x; then
40111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40112    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40113  fi
40114
40115    # Output is in $new_path
40116
40117  windows_path="$new_path"
40118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40119    unix_path=`$CYGPATH -u "$windows_path"`
40120    new_path="$unix_path"
40121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40123    new_path="$unix_path"
40124  fi
40125
40126    # remove trailing .exe if any
40127    new_path="${new_path/%.exe/}"
40128
40129    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40130    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40131  fi
40132
40133  else
40134    # We're on a posix platform. Hooray! :)
40135    # First separate the path from the arguments. This will split at the first
40136    # space.
40137    complete="$BUILD_LD"
40138    path="${complete%% *}"
40139    tmp="$complete EOL"
40140    arguments="${tmp#* }"
40141
40142    # Cannot rely on the command "which" here since it doesn't always work.
40143    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40144    if test -z "$is_absolute_path"; then
40145      # Path to executable is not absolute. Find it.
40146      IFS_save="$IFS"
40147      IFS=:
40148      for p in $PATH; do
40149        if test -f "$p/$path" && test -x "$p/$path"; then
40150          new_path="$p/$path"
40151          break
40152        fi
40153      done
40154      IFS="$IFS_save"
40155    else
40156      # This is an absolute path, we can use it without further modifications.
40157      new_path="$path"
40158    fi
40159
40160    if test "x$new_path" = x; then
40161      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40162$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40163      has_space=`$ECHO "$complete" | $GREP " "`
40164      if test "x$has_space" != x; then
40165        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40166$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40167      fi
40168      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40169    fi
40170  fi
40171
40172  # Now join together the path and the arguments once again
40173  if test "x$arguments" != xEOL; then
40174    new_complete="$new_path ${arguments% *}"
40175  else
40176    new_complete="$new_path"
40177  fi
40178
40179  if test "x$complete" != "x$new_complete"; then
40180    BUILD_LD="$new_complete"
40181    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40182$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40183  fi
40184
40185  else
40186    # If we are not cross compiling, use the normal target compilers for
40187    # building the build platform executables.
40188    BUILD_CC="$CC"
40189    BUILD_CXX="$CXX"
40190    BUILD_LD="$LD"
40191  fi
40192
40193
40194
40195
40196
40197
40198  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40199    # For hotspot, we need these in Windows mixed path,
40200    # so rewrite them all. Need added .exe suffix.
40201    HOTSPOT_CXX="$CXX.exe"
40202    HOTSPOT_LD="$LD.exe"
40203    HOTSPOT_MT="$MT.exe"
40204    HOTSPOT_RC="$RC.exe"
40205
40206  unix_path="$HOTSPOT_CXX"
40207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40208    windows_path=`$CYGPATH -m "$unix_path"`
40209    HOTSPOT_CXX="$windows_path"
40210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40211    windows_path=`cmd //c echo $unix_path`
40212    HOTSPOT_CXX="$windows_path"
40213  fi
40214
40215
40216  unix_path="$HOTSPOT_LD"
40217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40218    windows_path=`$CYGPATH -m "$unix_path"`
40219    HOTSPOT_LD="$windows_path"
40220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40221    windows_path=`cmd //c echo $unix_path`
40222    HOTSPOT_LD="$windows_path"
40223  fi
40224
40225
40226  unix_path="$HOTSPOT_MT"
40227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40228    windows_path=`$CYGPATH -m "$unix_path"`
40229    HOTSPOT_MT="$windows_path"
40230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40231    windows_path=`cmd //c echo $unix_path`
40232    HOTSPOT_MT="$windows_path"
40233  fi
40234
40235
40236  unix_path="$HOTSPOT_RC"
40237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40238    windows_path=`$CYGPATH -m "$unix_path"`
40239    HOTSPOT_RC="$windows_path"
40240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40241    windows_path=`cmd //c echo $unix_path`
40242    HOTSPOT_RC="$windows_path"
40243  fi
40244
40245
40246
40247  else
40248    HOTSPOT_CXX="$CXX"
40249    HOTSPOT_LD="$LD"
40250  fi
40251
40252
40253
40254  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40255    USE_CLANG=true
40256  fi
40257
40258
40259  # LDEXE is the linker to use, when creating executables. Not really used.
40260  # FIXME: These should just be removed!
40261  LDEXE="$LD"
40262  LDEXECXX="$LDCXX"
40263
40264
40265
40266
40267  # The package path is used only on macosx?
40268  # FIXME: clean this up, and/or move it elsewhere.
40269  PACKAGE_PATH=/opt/local
40270
40271
40272  # Check for extra potential brokenness.
40273  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40274    # On Windows, double-check that we got the right compiler.
40275    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40276    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40277    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40278      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40279        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40280      fi
40281    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40282      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40283        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40284      fi
40285    fi
40286  fi
40287
40288  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40289    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40290    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40291    # This is later checked when setting flags.
40292  fi
40293
40294  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40295  # in executable.'
40296  USING_BROKEN_SUSE_LD=no
40297  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40298    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40299$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40300    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
40301    echo "int main() { }" > main.c
40302    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40303      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40304$as_echo "no" >&6; }
40305      USING_BROKEN_SUSE_LD=no
40306    else
40307      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40308$as_echo "yes" >&6; }
40309      USING_BROKEN_SUSE_LD=yes
40310    fi
40311    rm -rf version-script.map main.c a.out
40312  fi
40313
40314
40315
40316# Setup the JTReg Regression Test Harness.
40317
40318
40319# Check whether --with-jtreg was given.
40320if test "${with_jtreg+set}" = set; then :
40321  withval=$with_jtreg;
40322else
40323  with_jtreg=no
40324fi
40325
40326
40327  if test "x$with_jtreg" = xno; then
40328    # jtreg disabled
40329    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40330$as_echo_n "checking for jtreg... " >&6; }
40331    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40332$as_echo "no" >&6; }
40333  else
40334    if test "x$with_jtreg" != xyes; then
40335      # with path specified.
40336      JT_HOME="$with_jtreg"
40337    fi
40338
40339    if test "x$JT_HOME" != x; then
40340      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40341$as_echo_n "checking for jtreg... " >&6; }
40342
40343      # use JT_HOME enviroment var.
40344
40345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40346
40347  # Input might be given as Windows format, start by converting to
40348  # unix format.
40349  path="$JT_HOME"
40350  new_path=`$CYGPATH -u "$path"`
40351
40352  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40353  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40354  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40355  # "foo.exe" is OK but "foo" is an error.
40356  #
40357  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40358  # It is also a way to make sure we got the proper file name for the real test later on.
40359  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40360  if test "x$test_shortpath" = x; then
40361    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40362$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40363    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40364  fi
40365
40366  # Call helper function which possibly converts this using DOS-style short mode.
40367  # If so, the updated path is stored in $new_path.
40368
40369  input_path="$new_path"
40370  # Check if we need to convert this using DOS-style short mode. If the path
40371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40372  # take no chances and rewrite it.
40373  # Note: m4 eats our [], so we need to use [ and ] instead.
40374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40375  if test "x$has_forbidden_chars" != x; then
40376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40377    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40378    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40379    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40380      # Going to short mode and back again did indeed matter. Since short mode is
40381      # case insensitive, let's make it lowercase to improve readability.
40382      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40383      # Now convert it back to Unix-stile (cygpath)
40384      input_path=`$CYGPATH -u "$shortmode_path"`
40385      new_path="$input_path"
40386    fi
40387  fi
40388
40389  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40390  if test "x$test_cygdrive_prefix" = x; then
40391    # As a simple fix, exclude /usr/bin since it's not a real path.
40392    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40393      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40394      # a path prefixed by /cygdrive for fixpath to work.
40395      new_path="$CYGWIN_ROOT_PATH$input_path"
40396    fi
40397  fi
40398
40399
40400  if test "x$path" != "x$new_path"; then
40401    JT_HOME="$new_path"
40402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40403$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40404  fi
40405
40406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40407
40408  path="$JT_HOME"
40409  has_colon=`$ECHO $path | $GREP ^.:`
40410  new_path="$path"
40411  if test "x$has_colon" = x; then
40412    # Not in mixed or Windows style, start by that.
40413    new_path=`cmd //c echo $path`
40414  fi
40415
40416
40417  input_path="$new_path"
40418  # Check if we need to convert this using DOS-style short mode. If the path
40419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40420  # take no chances and rewrite it.
40421  # Note: m4 eats our [], so we need to use [ and ] instead.
40422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40423  if test "x$has_forbidden_chars" != x; then
40424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40425    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40426  fi
40427
40428
40429  windows_path="$new_path"
40430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40431    unix_path=`$CYGPATH -u "$windows_path"`
40432    new_path="$unix_path"
40433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40435    new_path="$unix_path"
40436  fi
40437
40438  if test "x$path" != "x$new_path"; then
40439    JT_HOME="$new_path"
40440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40441$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40442  fi
40443
40444  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40445  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40446
40447  else
40448    # We're on a posix platform. Hooray! :)
40449    path="$JT_HOME"
40450    has_space=`$ECHO "$path" | $GREP " "`
40451    if test "x$has_space" != x; then
40452      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40453$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40454      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40455    fi
40456
40457    # Use eval to expand a potential ~
40458    eval path="$path"
40459    if test ! -f "$path" && test ! -d "$path"; then
40460      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40461    fi
40462
40463    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40464  fi
40465
40466
40467      # jtreg win32 script works for everybody
40468      JTREGEXE="$JT_HOME/win32/bin/jtreg"
40469
40470      if test ! -f "$JTREGEXE"; then
40471        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40472      fi
40473
40474      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40475$as_echo "$JTREGEXE" >&6; }
40476    else
40477      # try to find jtreg on path
40478
40479
40480
40481  # Publish this variable in the help.
40482
40483
40484  if test "x$JTREGEXE" = x; then
40485    # The variable is not set by user, try to locate tool using the code snippet
40486    for ac_prog in jtreg
40487do
40488  # Extract the first word of "$ac_prog", so it can be a program name with args.
40489set dummy $ac_prog; ac_word=$2
40490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40491$as_echo_n "checking for $ac_word... " >&6; }
40492if ${ac_cv_path_JTREGEXE+:} false; then :
40493  $as_echo_n "(cached) " >&6
40494else
40495  case $JTREGEXE in
40496  [\\/]* | ?:[\\/]*)
40497  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40498  ;;
40499  *)
40500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40501for as_dir in $PATH
40502do
40503  IFS=$as_save_IFS
40504  test -z "$as_dir" && as_dir=.
40505    for ac_exec_ext in '' $ac_executable_extensions; do
40506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40507    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40509    break 2
40510  fi
40511done
40512  done
40513IFS=$as_save_IFS
40514
40515  ;;
40516esac
40517fi
40518JTREGEXE=$ac_cv_path_JTREGEXE
40519if test -n "$JTREGEXE"; then
40520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40521$as_echo "$JTREGEXE" >&6; }
40522else
40523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40524$as_echo "no" >&6; }
40525fi
40526
40527
40528  test -n "$JTREGEXE" && break
40529done
40530
40531  else
40532    # The variable is set, but is it from the command line or the environment?
40533
40534    # Try to remove the string !JTREGEXE! from our list.
40535    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40536    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40537      # If it failed, the variable was not from the command line. Ignore it,
40538      # but warn the user (except for BASH, which is always set by the calling BASH).
40539      if test "xJTREGEXE" != xBASH; then
40540        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40541$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40542      fi
40543      # Try to locate tool using the code snippet
40544      for ac_prog in jtreg
40545do
40546  # Extract the first word of "$ac_prog", so it can be a program name with args.
40547set dummy $ac_prog; ac_word=$2
40548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40549$as_echo_n "checking for $ac_word... " >&6; }
40550if ${ac_cv_path_JTREGEXE+:} false; then :
40551  $as_echo_n "(cached) " >&6
40552else
40553  case $JTREGEXE in
40554  [\\/]* | ?:[\\/]*)
40555  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40556  ;;
40557  *)
40558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40559for as_dir in $PATH
40560do
40561  IFS=$as_save_IFS
40562  test -z "$as_dir" && as_dir=.
40563    for ac_exec_ext in '' $ac_executable_extensions; do
40564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40565    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40567    break 2
40568  fi
40569done
40570  done
40571IFS=$as_save_IFS
40572
40573  ;;
40574esac
40575fi
40576JTREGEXE=$ac_cv_path_JTREGEXE
40577if test -n "$JTREGEXE"; then
40578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40579$as_echo "$JTREGEXE" >&6; }
40580else
40581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40582$as_echo "no" >&6; }
40583fi
40584
40585
40586  test -n "$JTREGEXE" && break
40587done
40588
40589    else
40590      # If it succeeded, then it was overridden by the user. We will use it
40591      # for the tool.
40592
40593      # First remove it from the list of overridden variables, so we can test
40594      # for unknown variables in the end.
40595      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40596
40597      # Check if the provided tool contains a complete path.
40598      tool_specified="$JTREGEXE"
40599      tool_basename="${tool_specified##*/}"
40600      if test "x$tool_basename" = "x$tool_specified"; then
40601        # A command without a complete path is provided, search $PATH.
40602        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40603$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40604        # Extract the first word of "$tool_basename", so it can be a program name with args.
40605set dummy $tool_basename; ac_word=$2
40606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40607$as_echo_n "checking for $ac_word... " >&6; }
40608if ${ac_cv_path_JTREGEXE+:} false; then :
40609  $as_echo_n "(cached) " >&6
40610else
40611  case $JTREGEXE in
40612  [\\/]* | ?:[\\/]*)
40613  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40614  ;;
40615  *)
40616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40617for as_dir in $PATH
40618do
40619  IFS=$as_save_IFS
40620  test -z "$as_dir" && as_dir=.
40621    for ac_exec_ext in '' $ac_executable_extensions; do
40622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40623    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40625    break 2
40626  fi
40627done
40628  done
40629IFS=$as_save_IFS
40630
40631  ;;
40632esac
40633fi
40634JTREGEXE=$ac_cv_path_JTREGEXE
40635if test -n "$JTREGEXE"; then
40636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40637$as_echo "$JTREGEXE" >&6; }
40638else
40639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40640$as_echo "no" >&6; }
40641fi
40642
40643
40644        if test "x$JTREGEXE" = x; then
40645          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40646        fi
40647      else
40648        # Otherwise we believe it is a complete path. Use it as it is.
40649        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40650$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40651        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40652$as_echo_n "checking for JTREGEXE... " >&6; }
40653        if test ! -x "$tool_specified"; then
40654          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40655$as_echo "not found" >&6; }
40656          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40657        fi
40658        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40659$as_echo "$tool_specified" >&6; }
40660      fi
40661    fi
40662  fi
40663
40664
40665
40666  if test "x$JTREGEXE" = x; then
40667    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40668  fi
40669
40670
40671      JT_HOME="`$DIRNAME $JTREGEXE`"
40672    fi
40673  fi
40674
40675
40676
40677
40678
40679
40680  # Option used to tell the compiler whether to create 32- or 64-bit executables
40681  if test "x$TOOLCHAIN_TYPE" = xxlc; then
40682    COMPILER_TARGET_BITS_FLAG="-q"
40683  else
40684    COMPILER_TARGET_BITS_FLAG="-m"
40685  fi
40686
40687
40688  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
40689  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40690    ARFLAGS="-r"
40691  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40692    ARFLAGS="-X64"
40693  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
40694    # lib.exe is used as AR to create static libraries.
40695    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
40696  else
40697    ARFLAGS=""
40698  fi
40699
40700
40701  ## Setup strip.
40702  # FIXME: should this really be per platform, or should it be per toolchain type?
40703  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
40704  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
40705  if test "x$OPENJDK_TARGET_OS" = xlinux; then
40706    STRIPFLAGS="-g"
40707  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
40708    STRIPFLAGS="-x"
40709  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
40710    STRIPFLAGS="-S"
40711  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40712    STRIPFLAGS="-X32_64"
40713  fi
40714
40715  if test "x$OPENJDK_TARGET_OS" != xwindows; then
40716    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
40717  fi
40718
40719
40720  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40721    # FIXME: break out into MCSFLAGS
40722    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
40723  fi
40724
40725
40726  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40727    CC_OUT_OPTION=-Fo
40728    EXE_OUT_OPTION=-out:
40729    LD_OUT_OPTION=-out:
40730    AR_OUT_OPTION=-out:
40731  else
40732    # The option used to specify the target .o,.a or .so file.
40733    # When compiling, how to specify the to be created object file.
40734    CC_OUT_OPTION='-o$(SPACE)'
40735    # When linking, how to specify the to be created executable.
40736    EXE_OUT_OPTION='-o$(SPACE)'
40737    # When linking, how to specify the to be created dynamically linkable library.
40738    LD_OUT_OPTION='-o$(SPACE)'
40739    # When archiving, how to specify the to be create static archive for object files.
40740    AR_OUT_OPTION='rcs$(SPACE)'
40741  fi
40742
40743
40744
40745
40746
40747  # On Windows, we need to set RC flags.
40748  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40749    RC_FLAGS="-nologo -l 0x409 -r"
40750    if test "x$VARIANT" = xOPT; then
40751      RC_FLAGS="$RC_FLAGS -d NDEBUG"
40752    fi
40753
40754    # The version variables used to create RC_FLAGS may be overridden
40755    # in a custom configure script, or possibly the command line.
40756    # Let those variables be expanded at make time in spec.gmk.
40757    # The \$ are escaped to the shell, and the $(...) variables
40758    # are evaluated by make.
40759    RC_FLAGS="$RC_FLAGS \
40760        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
40761        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
40762        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
40763        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
40764        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
40765        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
40766        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
40767  fi
40768
40769
40770  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40771    # FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
40772    CCXXFLAGS="$CCXXFLAGS -nologo"
40773  fi
40774
40775  if test "x$SYSROOT" != "x"; then
40776    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
40777      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40778        # Solaris Studio does not have a concept of sysroot. Instead we must
40779        # make sure the default include and lib dirs are appended to each
40780        # compile and link command line.
40781        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
40782        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
40783            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
40784            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
40785      fi
40786    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
40787      SYSROOT_CFLAGS="--sysroot=\"$SYSROOT\""
40788      SYSROOT_LDFLAGS="--sysroot=\"$SYSROOT\""
40789    elif test "x$TOOLCHAIN_TYPE" = xclang; then
40790      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
40791      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
40792    fi
40793    # Propagate the sysroot args to hotspot
40794    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
40795    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
40796    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
40797  fi
40798
40799
40800
40801
40802# FIXME: Currently we must test this after toolchain but before flags. Fix!
40803
40804# Now we can test some aspects on the target using configure macros.
40805
40806
40807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
40808$as_echo_n "checking for ANSI C header files... " >&6; }
40809if ${ac_cv_header_stdc+:} false; then :
40810  $as_echo_n "(cached) " >&6
40811else
40812  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40813/* end confdefs.h.  */
40814#include <stdlib.h>
40815#include <stdarg.h>
40816#include <string.h>
40817#include <float.h>
40818
40819int
40820main ()
40821{
40822
40823  ;
40824  return 0;
40825}
40826_ACEOF
40827if ac_fn_cxx_try_compile "$LINENO"; then :
40828  ac_cv_header_stdc=yes
40829else
40830  ac_cv_header_stdc=no
40831fi
40832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40833
40834if test $ac_cv_header_stdc = yes; then
40835  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
40836  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40837/* end confdefs.h.  */
40838#include <string.h>
40839
40840_ACEOF
40841if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40842  $EGREP "memchr" >/dev/null 2>&1; then :
40843
40844else
40845  ac_cv_header_stdc=no
40846fi
40847rm -f conftest*
40848
40849fi
40850
40851if test $ac_cv_header_stdc = yes; then
40852  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
40853  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40854/* end confdefs.h.  */
40855#include <stdlib.h>
40856
40857_ACEOF
40858if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40859  $EGREP "free" >/dev/null 2>&1; then :
40860
40861else
40862  ac_cv_header_stdc=no
40863fi
40864rm -f conftest*
40865
40866fi
40867
40868if test $ac_cv_header_stdc = yes; then
40869  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
40870  if test "$cross_compiling" = yes; then :
40871  :
40872else
40873  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40874/* end confdefs.h.  */
40875#include <ctype.h>
40876#include <stdlib.h>
40877#if ((' ' & 0x0FF) == 0x020)
40878# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
40879# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
40880#else
40881# define ISLOWER(c) \
40882		   (('a' <= (c) && (c) <= 'i') \
40883		     || ('j' <= (c) && (c) <= 'r') \
40884		     || ('s' <= (c) && (c) <= 'z'))
40885# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
40886#endif
40887
40888#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
40889int
40890main ()
40891{
40892  int i;
40893  for (i = 0; i < 256; i++)
40894    if (XOR (islower (i), ISLOWER (i))
40895	|| toupper (i) != TOUPPER (i))
40896      return 2;
40897  return 0;
40898}
40899_ACEOF
40900if ac_fn_cxx_try_run "$LINENO"; then :
40901
40902else
40903  ac_cv_header_stdc=no
40904fi
40905rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40906  conftest.$ac_objext conftest.beam conftest.$ac_ext
40907fi
40908
40909fi
40910fi
40911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
40912$as_echo "$ac_cv_header_stdc" >&6; }
40913if test $ac_cv_header_stdc = yes; then
40914
40915$as_echo "#define STDC_HEADERS 1" >>confdefs.h
40916
40917fi
40918
40919# On IRIX 5.3, sys/types and inttypes.h are conflicting.
40920for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
40921		  inttypes.h stdint.h unistd.h
40922do :
40923  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
40924ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
40925"
40926if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
40927  cat >>confdefs.h <<_ACEOF
40928#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
40929_ACEOF
40930
40931fi
40932
40933done
40934
40935
40936
40937  ###############################################################################
40938  #
40939  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
40940  # (The JVM can use 32 or 64 bit Java pointers but that decision
40941  # is made at runtime.)
40942  #
40943
40944  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
40945    # Always specify -m flag on Solaris
40946    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
40947
40948  # When we add flags to the "official" CFLAGS etc, we need to
40949  # keep track of these additions in ADDED_CFLAGS etc. These
40950  # will later be checked to make sure only controlled additions
40951  # have been made to CFLAGS etc.
40952  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40953  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40954  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40955
40956  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40957  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40958  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40959
40960  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40961  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40962  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40963
40964  elif test "x$COMPILE_TYPE" = xreduced; then
40965    if test "x$OPENJDK_TARGET_OS" != xwindows; then
40966      # Specify -m if running reduced on other Posix platforms
40967
40968  # When we add flags to the "official" CFLAGS etc, we need to
40969  # keep track of these additions in ADDED_CFLAGS etc. These
40970  # will later be checked to make sure only controlled additions
40971  # have been made to CFLAGS etc.
40972  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40973  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40974  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40975
40976  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40977  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40978  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40979
40980  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40981  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40982  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40983
40984    fi
40985  fi
40986
40987  # Make compilation sanity check
40988  for ac_header in stdio.h
40989do :
40990  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
40991if test "x$ac_cv_header_stdio_h" = xyes; then :
40992  cat >>confdefs.h <<_ACEOF
40993#define HAVE_STDIO_H 1
40994_ACEOF
40995
40996else
40997
40998    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
40999$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41000    if test "x$COMPILE_TYPE" = xreduced; then
41001      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41002$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41003    elif test "x$COMPILE_TYPE" = xcross; then
41004      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41005$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41006    fi
41007    as_fn_error $? "Cannot continue." "$LINENO" 5
41008
41009fi
41010
41011done
41012
41013
41014  # The cast to long int works around a bug in the HP C Compiler
41015# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41016# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41017# This bug is HP SR number 8606223364.
41018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41019$as_echo_n "checking size of int *... " >&6; }
41020if ${ac_cv_sizeof_int_p+:} false; then :
41021  $as_echo_n "(cached) " >&6
41022else
41023  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41024
41025else
41026  if test "$ac_cv_type_int_p" = yes; then
41027     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41028$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41029as_fn_error 77 "cannot compute sizeof (int *)
41030See \`config.log' for more details" "$LINENO" 5; }
41031   else
41032     ac_cv_sizeof_int_p=0
41033   fi
41034fi
41035
41036fi
41037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41038$as_echo "$ac_cv_sizeof_int_p" >&6; }
41039
41040
41041
41042cat >>confdefs.h <<_ACEOF
41043#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41044_ACEOF
41045
41046
41047
41048  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41049  if test "x$ac_cv_sizeof_int_p" = x; then
41050    # The test failed, lets stick to the assumed value.
41051    { $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
41052$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41053  else
41054    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41055
41056    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41057      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41058      # Let's try to implicitely set the compilers target architecture and retry the test
41059      { $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
41060$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;}
41061      { $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
41062$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;}
41063
41064  # When we add flags to the "official" CFLAGS etc, we need to
41065  # keep track of these additions in ADDED_CFLAGS etc. These
41066  # will later be checked to make sure only controlled additions
41067  # have been made to CFLAGS etc.
41068  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41069  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41070  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41071
41072  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41073  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41074  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41075
41076  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41077  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41078  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41079
41080
41081      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41082      unset ac_cv_sizeof_int_p
41083      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41084      cat >>confdefs.h <<_ACEOF
41085#undef SIZEOF_INT_P
41086_ACEOF
41087
41088      # The cast to long int works around a bug in the HP C Compiler
41089# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41090# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41091# This bug is HP SR number 8606223364.
41092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41093$as_echo_n "checking size of int *... " >&6; }
41094if ${ac_cv_sizeof_int_p+:} false; then :
41095  $as_echo_n "(cached) " >&6
41096else
41097  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41098
41099else
41100  if test "$ac_cv_type_int_p" = yes; then
41101     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41102$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41103as_fn_error 77 "cannot compute sizeof (int *)
41104See \`config.log' for more details" "$LINENO" 5; }
41105   else
41106     ac_cv_sizeof_int_p=0
41107   fi
41108fi
41109
41110fi
41111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41112$as_echo "$ac_cv_sizeof_int_p" >&6; }
41113
41114
41115
41116cat >>confdefs.h <<_ACEOF
41117#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41118_ACEOF
41119
41120
41121
41122      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41123
41124      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41125        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
41126      fi
41127    fi
41128  fi
41129
41130  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41131$as_echo_n "checking for target address size... " >&6; }
41132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41133$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41134
41135
41136  ###############################################################################
41137  #
41138  # Is the target little of big endian?
41139  #
41140   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41141$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41142if ${ac_cv_c_bigendian+:} false; then :
41143  $as_echo_n "(cached) " >&6
41144else
41145  ac_cv_c_bigendian=unknown
41146    # See if we're dealing with a universal compiler.
41147    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41148/* end confdefs.h.  */
41149#ifndef __APPLE_CC__
41150	       not a universal capable compiler
41151	     #endif
41152	     typedef int dummy;
41153
41154_ACEOF
41155if ac_fn_cxx_try_compile "$LINENO"; then :
41156
41157	# Check for potential -arch flags.  It is not universal unless
41158	# there are at least two -arch flags with different values.
41159	ac_arch=
41160	ac_prev=
41161	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41162	 if test -n "$ac_prev"; then
41163	   case $ac_word in
41164	     i?86 | x86_64 | ppc | ppc64)
41165	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41166		 ac_arch=$ac_word
41167	       else
41168		 ac_cv_c_bigendian=universal
41169		 break
41170	       fi
41171	       ;;
41172	   esac
41173	   ac_prev=
41174	 elif test "x$ac_word" = "x-arch"; then
41175	   ac_prev=arch
41176	 fi
41177       done
41178fi
41179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41180    if test $ac_cv_c_bigendian = unknown; then
41181      # See if sys/param.h defines the BYTE_ORDER macro.
41182      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41183/* end confdefs.h.  */
41184#include <sys/types.h>
41185	     #include <sys/param.h>
41186
41187int
41188main ()
41189{
41190#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41191		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41192		     && LITTLE_ENDIAN)
41193	      bogus endian macros
41194	     #endif
41195
41196  ;
41197  return 0;
41198}
41199_ACEOF
41200if ac_fn_cxx_try_compile "$LINENO"; then :
41201  # It does; now see whether it defined to BIG_ENDIAN or not.
41202	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41203/* end confdefs.h.  */
41204#include <sys/types.h>
41205		#include <sys/param.h>
41206
41207int
41208main ()
41209{
41210#if BYTE_ORDER != BIG_ENDIAN
41211		 not big endian
41212		#endif
41213
41214  ;
41215  return 0;
41216}
41217_ACEOF
41218if ac_fn_cxx_try_compile "$LINENO"; then :
41219  ac_cv_c_bigendian=yes
41220else
41221  ac_cv_c_bigendian=no
41222fi
41223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41224fi
41225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41226    fi
41227    if test $ac_cv_c_bigendian = unknown; then
41228      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41229      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41230/* end confdefs.h.  */
41231#include <limits.h>
41232
41233int
41234main ()
41235{
41236#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41237	      bogus endian macros
41238	     #endif
41239
41240  ;
41241  return 0;
41242}
41243_ACEOF
41244if ac_fn_cxx_try_compile "$LINENO"; then :
41245  # It does; now see whether it defined to _BIG_ENDIAN or not.
41246	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41247/* end confdefs.h.  */
41248#include <limits.h>
41249
41250int
41251main ()
41252{
41253#ifndef _BIG_ENDIAN
41254		 not big endian
41255		#endif
41256
41257  ;
41258  return 0;
41259}
41260_ACEOF
41261if ac_fn_cxx_try_compile "$LINENO"; then :
41262  ac_cv_c_bigendian=yes
41263else
41264  ac_cv_c_bigendian=no
41265fi
41266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41267fi
41268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41269    fi
41270    if test $ac_cv_c_bigendian = unknown; then
41271      # Compile a test program.
41272      if test "$cross_compiling" = yes; then :
41273  # Try to guess by grepping values from an object file.
41274	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41275/* end confdefs.h.  */
41276short int ascii_mm[] =
41277		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41278		short int ascii_ii[] =
41279		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41280		int use_ascii (int i) {
41281		  return ascii_mm[i] + ascii_ii[i];
41282		}
41283		short int ebcdic_ii[] =
41284		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41285		short int ebcdic_mm[] =
41286		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41287		int use_ebcdic (int i) {
41288		  return ebcdic_mm[i] + ebcdic_ii[i];
41289		}
41290		extern int foo;
41291
41292int
41293main ()
41294{
41295return use_ascii (foo) == use_ebcdic (foo);
41296  ;
41297  return 0;
41298}
41299_ACEOF
41300if ac_fn_cxx_try_compile "$LINENO"; then :
41301  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41302	      ac_cv_c_bigendian=yes
41303	    fi
41304	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41305	      if test "$ac_cv_c_bigendian" = unknown; then
41306		ac_cv_c_bigendian=no
41307	      else
41308		# finding both strings is unlikely to happen, but who knows?
41309		ac_cv_c_bigendian=unknown
41310	      fi
41311	    fi
41312fi
41313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41314else
41315  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41316/* end confdefs.h.  */
41317$ac_includes_default
41318int
41319main ()
41320{
41321
41322	     /* Are we little or big endian?  From Harbison&Steele.  */
41323	     union
41324	     {
41325	       long int l;
41326	       char c[sizeof (long int)];
41327	     } u;
41328	     u.l = 1;
41329	     return u.c[sizeof (long int) - 1] == 1;
41330
41331  ;
41332  return 0;
41333}
41334_ACEOF
41335if ac_fn_cxx_try_run "$LINENO"; then :
41336  ac_cv_c_bigendian=no
41337else
41338  ac_cv_c_bigendian=yes
41339fi
41340rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41341  conftest.$ac_objext conftest.beam conftest.$ac_ext
41342fi
41343
41344    fi
41345fi
41346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41347$as_echo "$ac_cv_c_bigendian" >&6; }
41348 case $ac_cv_c_bigendian in #(
41349   yes)
41350     ENDIAN="big";; #(
41351   no)
41352     ENDIAN="little" ;; #(
41353   universal)
41354     ENDIAN="universal_endianness"
41355     ;; #(
41356   *)
41357     ENDIAN="unknown" ;;
41358 esac
41359
41360
41361  if test "x$ENDIAN" = xuniversal_endianness; then
41362    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41363  fi
41364  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41365    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
41366  fi
41367
41368
41369# Configure flags for the tools
41370
41371  ###############################################################################
41372  #
41373  # How to compile shared libraries.
41374  #
41375
41376  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41377    PICFLAG="-fPIC"
41378    C_FLAG_REORDER=''
41379    CXX_FLAG_REORDER=''
41380
41381    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41382      # Linking is different on MacOSX
41383      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41384      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41385      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41386      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41387      SET_SHARED_LIBRARY_MAPFILE=''
41388    else
41389      # Default works for linux, might work on other platforms as well.
41390      SHARED_LIBRARY_FLAGS='-shared'
41391      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41392      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41393      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41394      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41395    fi
41396  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41397    PICFLAG=''
41398    C_FLAG_REORDER=''
41399    CXX_FLAG_REORDER=''
41400
41401    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41402      # Linking is different on MacOSX
41403      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41404      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41405      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41406      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41407      SET_SHARED_LIBRARY_MAPFILE=''
41408    else
41409      # Default works for linux, might work on other platforms as well.
41410      SHARED_LIBRARY_FLAGS='-shared'
41411      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41412      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41413      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41414      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41415    fi
41416  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41417    PICFLAG="-KPIC"
41418    C_FLAG_REORDER='-xF'
41419    CXX_FLAG_REORDER='-xF'
41420    SHARED_LIBRARY_FLAGS="-G"
41421    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41422    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41423    SET_SHARED_LIBRARY_NAME=''
41424    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41425  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41426    PICFLAG="-qpic=large"
41427    C_FLAG_REORDER=''
41428    CXX_FLAG_REORDER=''
41429    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41430    SET_EXECUTABLE_ORIGIN=""
41431    SET_SHARED_LIBRARY_ORIGIN=''
41432    SET_SHARED_LIBRARY_NAME=''
41433    SET_SHARED_LIBRARY_MAPFILE=''
41434  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41435    PICFLAG=""
41436    C_FLAG_REORDER=''
41437    CXX_FLAG_REORDER=''
41438    SHARED_LIBRARY_FLAGS="-LD"
41439    SET_EXECUTABLE_ORIGIN=''
41440    SET_SHARED_LIBRARY_ORIGIN=''
41441    SET_SHARED_LIBRARY_NAME=''
41442    SET_SHARED_LIBRARY_MAPFILE=''
41443  fi
41444
41445
41446
41447
41448
41449
41450
41451
41452
41453  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41454    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41455    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41456    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41457  fi
41458  # The (cross) compiler is now configured, we can now test capabilities
41459  # of the target platform.
41460
41461
41462
41463  ###############################################################################
41464  #
41465  # Setup the opt flags for different compilers
41466  # and different operating systems.
41467  #
41468
41469  # FIXME: this was indirectly the old default, but just inherited.
41470  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41471  #   C_FLAG_DEPS="-MMD -MF"
41472  # fi
41473
41474  # Generate make dependency files
41475  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41476    C_FLAG_DEPS="-MMD -MF"
41477  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41478    C_FLAG_DEPS="-MMD -MF"
41479  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41480    C_FLAG_DEPS="-xMMD -xMF"
41481  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41482    C_FLAG_DEPS="-qmakedep=gcc -MF"
41483  fi
41484  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41485
41486
41487
41488  # Debug symbols
41489  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41490    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41491      CFLAGS_DEBUG_SYMBOLS="-g1"
41492      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41493    else
41494      CFLAGS_DEBUG_SYMBOLS="-g"
41495      CXXFLAGS_DEBUG_SYMBOLS="-g"
41496    fi
41497  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41498    CFLAGS_DEBUG_SYMBOLS="-g"
41499    CXXFLAGS_DEBUG_SYMBOLS="-g"
41500  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41501    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41502    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41503  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41504    CFLAGS_DEBUG_SYMBOLS="-g"
41505    CXXFLAGS_DEBUG_SYMBOLS="-g"
41506  fi
41507
41508
41509
41510  # Optimization levels
41511  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41512    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41513
41514    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41515      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41516      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
41517      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41518      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41519      C_O_FLAG_NONE="-xregs=no%frameptr"
41520      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41521      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41522      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41523      CXX_O_FLAG_NONE="-xregs=no%frameptr"
41524      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41525        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41526        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41527      fi
41528    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41529      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
41530      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41531      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41532      C_O_FLAG_NONE=""
41533      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41534      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41535      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41536      CXX_O_FLAG_NONE=""
41537    fi
41538  else
41539    # The remaining toolchains share opt flags between CC and CXX;
41540    # setup for C and duplicate afterwards.
41541    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41542      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41543        # On MacOSX we optimize for size, something
41544        # we should do for all platforms?
41545        C_O_FLAG_HIGHEST="-Os"
41546        C_O_FLAG_HI="-Os"
41547        C_O_FLAG_NORM="-Os"
41548        C_O_FLAG_NONE=""
41549      else
41550        C_O_FLAG_HIGHEST="-O3"
41551        C_O_FLAG_HI="-O3"
41552        C_O_FLAG_NORM="-O2"
41553        C_O_FLAG_NONE="-O0"
41554      fi
41555    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41556      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41557        # On MacOSX we optimize for size, something
41558        # we should do for all platforms?
41559        C_O_FLAG_HIGHEST="-Os"
41560        C_O_FLAG_HI="-Os"
41561        C_O_FLAG_NORM="-Os"
41562        C_O_FLAG_NONE=""
41563      else
41564        C_O_FLAG_HIGHEST="-O3"
41565        C_O_FLAG_HI="-O3"
41566        C_O_FLAG_NORM="-O2"
41567        C_O_FLAG_NONE="-O0"
41568      fi
41569    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41570      C_O_FLAG_HIGHEST="-O3"
41571      C_O_FLAG_HI="-O3 -qstrict"
41572      C_O_FLAG_NORM="-O2"
41573      C_O_FLAG_NONE=""
41574    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41575      C_O_FLAG_HIGHEST="-O2"
41576      C_O_FLAG_HI="-O1"
41577      C_O_FLAG_NORM="-O1"
41578      C_O_FLAG_NONE="-Od"
41579    fi
41580    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41581    CXX_O_FLAG_HI="$C_O_FLAG_HI"
41582    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41583    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41584  fi
41585
41586
41587
41588
41589
41590
41591
41592
41593
41594
41595
41596  # Special extras...
41597  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41598    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41599      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41600      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41601    fi
41602  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41603    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
41604    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41605    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41606  fi
41607
41608  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41609    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41610$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41611  fi
41612
41613  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41614    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41615$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41616  fi
41617
41618  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41619    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41620$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41621  fi
41622
41623
41624# Check whether --with-extra-cflags was given.
41625if test "${with_extra_cflags+set}" = set; then :
41626  withval=$with_extra_cflags;
41627fi
41628
41629
41630
41631# Check whether --with-extra-cxxflags was given.
41632if test "${with_extra_cxxflags+set}" = set; then :
41633  withval=$with_extra_cxxflags;
41634fi
41635
41636
41637
41638# Check whether --with-extra-ldflags was given.
41639if test "${with_extra_ldflags+set}" = set; then :
41640  withval=$with_extra_ldflags;
41641fi
41642
41643
41644  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
41645  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
41646  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
41647
41648  # Hotspot needs these set in their legacy form
41649  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
41650  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
41651  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
41652
41653
41654
41655
41656
41657  ###############################################################################
41658  #
41659  # Now setup the CFLAGS and LDFLAGS for the JDK build.
41660  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
41661  #
41662
41663  # Setup compiler/platform specific flags to CFLAGS_JDK,
41664  # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
41665  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41666    # these options are used for both C and C++ compiles
41667    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
41668        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
41669    case $OPENJDK_TARGET_CPU_ARCH in
41670      arm )
41671        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41672        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41673        ;;
41674      ppc )
41675        # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
41676        ;;
41677      * )
41678        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
41679        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41680        ;;
41681    esac
41682  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41683    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
41684    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
41685      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
41686      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
41687    fi
41688
41689    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
41690    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
41691  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41692    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41693    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41694  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41695    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
41696    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
41697    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
41698    -DWIN32 -DIAL"
41699    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
41700      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
41701    else
41702      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
41703    fi
41704  fi
41705
41706  ###############################################################################
41707
41708  # Adjust flags according to debug level.
41709  case $DEBUG_LEVEL in
41710    fastdebug )
41711      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41712      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41713      C_O_FLAG_HI="$C_O_FLAG_NORM"
41714      C_O_FLAG_NORM="$C_O_FLAG_NORM"
41715      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41716      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
41717      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41718      ;;
41719    slowdebug )
41720      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41721      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41722      C_O_FLAG_HI="$C_O_FLAG_NONE"
41723      C_O_FLAG_NORM="$C_O_FLAG_NONE"
41724      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
41725      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
41726      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41727      ;;
41728  esac
41729
41730  # Setup LP64
41731  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
41732
41733  # Set some common defines. These works for all compilers, but assume
41734  # -D is universally accepted.
41735
41736  # Setup endianness
41737  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
41738    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
41739    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
41740    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
41741    #   Note: -Dmacro         is the same as    #define macro 1
41742    #         -Dmacro=        is the same as    #define macro
41743    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41744      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
41745    else
41746      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
41747    fi
41748  else
41749    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
41750    # are defined in the system?
41751    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41752      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN="
41753    else
41754      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
41755    fi
41756  fi
41757
41758  # Setup target OS define. Use OS target name but in upper case.
41759  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
41760  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
41761
41762  # Setup target CPU
41763  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
41764
41765  # Setup debug/release defines
41766  if test "x$DEBUG_LEVEL" = xrelease; then
41767    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
41768    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41769      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
41770    fi
41771  else
41772    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
41773  fi
41774
41775  # Setup release name
41776  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
41777
41778
41779  # Set some additional per-OS defines.
41780  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41781    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
41782  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41783    # FIXME: PPC64 should not be here.
41784    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DPPC64"
41785  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
41786    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
41787  fi
41788
41789  # Additional macosx handling
41790  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41791    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41792      # FIXME: This needs to be exported in spec.gmk due to closed legacy code.
41793      # FIXME: clean this up, and/or move it elsewhere.
41794
41795      # Setting these parameters makes it an error to link to macosx APIs that are
41796      # newer than the given OS version and makes the linked binaries compatible
41797      # even if built on a newer version of the OS.
41798      # The expected format is X.Y.Z
41799      MACOSX_VERSION_MIN=10.7.0
41800
41801
41802      # The macro takes the version with no dots, ex: 1070
41803      # Let the flags variables get resolved in make for easier override on make
41804      # command line.
41805      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41806      LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41807    fi
41808  fi
41809
41810  # Setup some hard coded includes
41811  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
41812      -I${JDK_OUTPUTDIR}/include \
41813      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
41814      -I${JDK_TOPDIR}/src/share/javavm/export \
41815      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
41816      -I${JDK_TOPDIR}/src/share/native/common \
41817      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
41818
41819  # The shared libraries are compiled using the picflag.
41820  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
41821  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
41822
41823  # Executable flags
41824  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
41825  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
41826
41827
41828
41829
41830
41831
41832  # Setup LDFLAGS et al.
41833  #
41834  # Now this is odd. The JDK native libraries have to link against libjvm.so
41835  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
41836  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
41837  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
41838  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
41839  # libraries will link to whatever is in memory. Yuck.
41840  #
41841  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
41842  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41843    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
41844    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41845      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
41846    fi
41847    # TODO: make -debug optional "--disable-full-debug-symbols"
41848    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
41849    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
41850    LDFLAGS_JDKLIB_SUFFIX=""
41851    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
41852      LDFLAGS_STACK_SIZE=1048576
41853    else
41854      LDFLAGS_STACK_SIZE=327680
41855    fi
41856    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
41857  else
41858    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41859      # If this is a --hash-style=gnu system, use --hash-style=both, why?
41860      # We have previously set HAS_GNU_HASH if this is the case
41861      if test -n "$HAS_GNU_HASH"; then
41862        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
41863      fi
41864      if test "x$OPENJDK_TARGET_OS" = xlinux; then
41865        # And since we now know that the linker is gnu, then add -z defs, to forbid
41866        # undefined symbols in object files.
41867        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
41868        if test "x$DEBUG_LEVEL" = "xrelease"; then
41869          # When building release libraries, tell the linker optimize them.
41870          # Should this be supplied to the OSS linker as well?
41871          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
41872        fi
41873      fi
41874    fi
41875
41876    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41877      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
41878      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
41879    fi
41880
41881    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
41882        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
41883
41884    # On some platforms (mac) the linker warns about non existing -L dirs.
41885    # Add server first if available. Linking aginst client does not always produce the same results.
41886    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
41887    # Default to server for other variants.
41888    if test "x$JVM_VARIANT_SERVER" = xtrue; then
41889      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41890    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
41891      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
41892    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
41893      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
41894    else
41895      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41896    fi
41897
41898    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
41899    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41900      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
41901    fi
41902
41903    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
41904    if test "x$OPENJDK_TARGET_OS" = xlinux; then
41905      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
41906    fi
41907  fi
41908
41909
41910
41911
41912
41913
41914
41915
41916  # Some Zero and Shark settings.
41917  # ZERO_ARCHFLAG tells the compiler which mode to build for
41918  case "${OPENJDK_TARGET_CPU}" in
41919    s390)
41920      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
41921      ;;
41922    *)
41923      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41924  esac
41925
41926  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
41927$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
41928  supports=yes
41929
41930  saved_cflags="$CFLAGS"
41931  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
41932  ac_ext=c
41933ac_cpp='$CPP $CPPFLAGS'
41934ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41935ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41936ac_compiler_gnu=$ac_cv_c_compiler_gnu
41937
41938  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41939/* end confdefs.h.  */
41940int i;
41941_ACEOF
41942if ac_fn_c_try_compile "$LINENO"; then :
41943
41944else
41945  supports=no
41946fi
41947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41948  ac_ext=cpp
41949ac_cpp='$CXXCPP $CPPFLAGS'
41950ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41951ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41952ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41953
41954  CFLAGS="$saved_cflags"
41955
41956  saved_cxxflags="$CXXFLAGS"
41957  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
41958  ac_ext=cpp
41959ac_cpp='$CXXCPP $CPPFLAGS'
41960ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41961ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41962ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41963
41964  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41965/* end confdefs.h.  */
41966int i;
41967_ACEOF
41968if ac_fn_cxx_try_compile "$LINENO"; then :
41969
41970else
41971  supports=no
41972fi
41973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41974  ac_ext=cpp
41975ac_cpp='$CXXCPP $CPPFLAGS'
41976ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41977ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41978ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41979
41980  CXXFLAGS="$saved_cxxflags"
41981
41982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41983$as_echo "$supports" >&6; }
41984  if test "x$supports" = "xyes" ; then
41985    :
41986  else
41987    ZERO_ARCHFLAG=""
41988  fi
41989
41990
41991
41992  # Check that the compiler supports -mX (or -qX on AIX) flags
41993  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
41994
41995  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
41996$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
41997  supports=yes
41998
41999  saved_cflags="$CFLAGS"
42000  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42001  ac_ext=c
42002ac_cpp='$CPP $CPPFLAGS'
42003ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42004ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42005ac_compiler_gnu=$ac_cv_c_compiler_gnu
42006
42007  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42008/* end confdefs.h.  */
42009int i;
42010_ACEOF
42011if ac_fn_c_try_compile "$LINENO"; then :
42012
42013else
42014  supports=no
42015fi
42016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42017  ac_ext=cpp
42018ac_cpp='$CXXCPP $CPPFLAGS'
42019ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42020ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42021ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42022
42023  CFLAGS="$saved_cflags"
42024
42025  saved_cxxflags="$CXXFLAGS"
42026  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42027  ac_ext=cpp
42028ac_cpp='$CXXCPP $CPPFLAGS'
42029ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42030ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42031ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42032
42033  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42034/* end confdefs.h.  */
42035int i;
42036_ACEOF
42037if ac_fn_cxx_try_compile "$LINENO"; then :
42038
42039else
42040  supports=no
42041fi
42042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42043  ac_ext=cpp
42044ac_cpp='$CXXCPP $CPPFLAGS'
42045ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42046ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42047ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42048
42049  CXXFLAGS="$saved_cxxflags"
42050
42051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42052$as_echo "$supports" >&6; }
42053  if test "x$supports" = "xyes" ; then
42054    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42055  else
42056    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42057  fi
42058
42059
42060
42061  case "${TOOLCHAIN_TYPE}" in
42062    microsoft)
42063      CFLAGS_WARNINGS_ARE_ERRORS="/WX"
42064      ;;
42065    solstudio)
42066      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42067      ;;
42068    gcc)
42069      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42070      ;;
42071    clang)
42072      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42073      ;;
42074  esac
42075
42076
42077
42078# Setup debug symbols (need objcopy from the toolchain for that)
42079
42080  #
42081  # ENABLE_DEBUG_SYMBOLS
42082  # This must be done after the toolchain is setup, since we're looking at objcopy.
42083  #
42084  # Check whether --enable-debug-symbols was given.
42085if test "${enable_debug_symbols+set}" = set; then :
42086  enableval=$enable_debug_symbols;
42087fi
42088
42089
42090  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42091$as_echo_n "checking if we should generate debug symbols... " >&6; }
42092
42093  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42094    # explicit enabling of enable-debug-symbols and can't find objcopy
42095    #   this is an error
42096    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42097  fi
42098
42099  if test "x$enable_debug_symbols" = "xyes"; then
42100    ENABLE_DEBUG_SYMBOLS=true
42101  elif test "x$enable_debug_symbols" = "xno"; then
42102    ENABLE_DEBUG_SYMBOLS=false
42103  else
42104    # Default is on if objcopy is found
42105    if test "x$OBJCOPY" != x; then
42106      ENABLE_DEBUG_SYMBOLS=true
42107    # MacOS X and Windows don't use objcopy but default is on for those OSes
42108    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42109      ENABLE_DEBUG_SYMBOLS=true
42110    else
42111      ENABLE_DEBUG_SYMBOLS=false
42112    fi
42113  fi
42114
42115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42116$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42117
42118  #
42119  # ZIP_DEBUGINFO_FILES
42120  #
42121  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42122$as_echo_n "checking if we should zip debug-info files... " >&6; }
42123  # Check whether --enable-zip-debug-info was given.
42124if test "${enable_zip_debug_info+set}" = set; then :
42125  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42126else
42127  enable_zip_debug_info="yes"
42128fi
42129
42130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42131$as_echo "${enable_zip_debug_info}" >&6; }
42132
42133  if test "x${enable_zip_debug_info}" = "xno"; then
42134    ZIP_DEBUGINFO_FILES=false
42135  else
42136    ZIP_DEBUGINFO_FILES=true
42137  fi
42138
42139
42140
42141
42142
42143###############################################################################
42144#
42145# Check dependencies for external and internal libraries.
42146#
42147###############################################################################
42148
42149# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42150
42151  # When using cygwin or msys, we need a wrapper binary that renames
42152  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42153  # @files and rewrites these too! This wrapper binary is
42154  # called fixpath.
42155  FIXPATH=
42156  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42157    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42158$as_echo_n "checking if fixpath can be created... " >&6; }
42159    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42160    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42161    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42162      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42163      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42164      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42165      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42166    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42167      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42168      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42169
42170      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42171      # @ was chosen as separator to minimize risk of other tools messing around with it
42172      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42173      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42174
42175      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42176    fi
42177    rm -f $OUTPUT_ROOT/fixpath*
42178    cd $OUTPUT_ROOT
42179    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42180    cd $CURDIR
42181
42182    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42183      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42184$as_echo "no" >&6; }
42185      cat $OUTPUT_ROOT/fixpath1.log
42186      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42187    fi
42188    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42189$as_echo "yes" >&6; }
42190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42191$as_echo_n "checking if fixpath.exe works... " >&6; }
42192    cd $OUTPUT_ROOT
42193    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42194    cd $CURDIR
42195    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42196      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42197$as_echo "no" >&6; }
42198      cat $OUTPUT_ROOT/fixpath2.log
42199      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42200    fi
42201    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42202$as_echo "yes" >&6; }
42203    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42204  fi
42205
42206
42207
42208
42209
42210
42211  ###############################################################################
42212  #
42213  # OS specific settings that we never will need to probe.
42214  #
42215  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42216    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42217$as_echo_n "checking what is not needed on Linux?... " >&6; }
42218    PULSE_NOT_NEEDED=yes
42219    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42220$as_echo "pulse" >&6; }
42221  fi
42222
42223  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42224    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42225$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42226    ALSA_NOT_NEEDED=yes
42227    PULSE_NOT_NEEDED=yes
42228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42229$as_echo "alsa pulse" >&6; }
42230  fi
42231
42232  if test "x$OPENJDK_TARGET_OS" = xaix; then
42233    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42234$as_echo_n "checking what is not needed on AIX?... " >&6; }
42235    ALSA_NOT_NEEDED=yes
42236    PULSE_NOT_NEEDED=yes
42237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42238$as_echo "alsa pulse" >&6; }
42239  fi
42240
42241
42242  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42244$as_echo_n "checking what is not needed on Windows?... " >&6; }
42245    CUPS_NOT_NEEDED=yes
42246    ALSA_NOT_NEEDED=yes
42247    PULSE_NOT_NEEDED=yes
42248    X11_NOT_NEEDED=yes
42249    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42250$as_echo "alsa cups pulse x11" >&6; }
42251  fi
42252
42253  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42254    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42255$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42256    ALSA_NOT_NEEDED=yes
42257    PULSE_NOT_NEEDED=yes
42258    X11_NOT_NEEDED=yes
42259    # If the java runtime framework is disabled, then we need X11.
42260    # This will be adjusted below.
42261    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42262$as_echo "alsa pulse x11" >&6; }
42263  fi
42264
42265  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42266    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42267$as_echo_n "checking what is not needed on bsd?... " >&6; }
42268    ALSA_NOT_NEEDED=yes
42269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42270$as_echo "alsa" >&6; }
42271  fi
42272
42273  if test "x$OPENJDK" = "xfalse"; then
42274    FREETYPE_NOT_NEEDED=yes
42275  fi
42276
42277  if test "x$SUPPORT_HEADFUL" = xno; then
42278    X11_NOT_NEEDED=yes
42279  fi
42280
42281  ###############################################################################
42282  #
42283  # Check for MacOSX support for OpenJDK.
42284  #
42285
42286
42287  # Check whether --enable-macosx-runtime-support was given.
42288if test "${enable_macosx_runtime_support+set}" = set; then :
42289  enableval=$enable_macosx_runtime_support;
42290fi
42291
42292  if test "x$enable_macosx_runtime_support" != x; then
42293    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
42294$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
42295  fi
42296
42297
42298  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
42299$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
42300  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
42301    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
42302$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
42303  else
42304    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42305$as_echo "no" >&6; }
42306  fi
42307
42308
42309
42310  ###############################################################################
42311  #
42312  # Check for X Windows
42313  #
42314
42315  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42316  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42317  # --x-libraries for the sysroot, if that seems to be correct.
42318  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
42319    if test "x$SYSROOT" != "x"; then
42320      if test "x$x_includes" = xNONE; then
42321        if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
42322          x_includes="$SYSROOT/usr/X11R6/include"
42323        elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
42324          x_includes="$SYSROOT/usr/include"
42325        fi
42326      fi
42327      if test "x$x_libraries" = xNONE; then
42328        if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
42329          x_libraries="$SYSROOT/usr/X11R6/lib"
42330        elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42331          x_libraries="$SYSROOT/usr/lib64"
42332        elif test -f "$SYSROOT/usr/lib/libX11.so"; then
42333          x_libraries="$SYSROOT/usr/lib"
42334        fi
42335      fi
42336    fi
42337  fi
42338
42339  # Now let autoconf do it's magic
42340  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42341$as_echo_n "checking for X... " >&6; }
42342
42343
42344# Check whether --with-x was given.
42345if test "${with_x+set}" = set; then :
42346  withval=$with_x;
42347fi
42348
42349# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42350if test "x$with_x" = xno; then
42351  # The user explicitly disabled X.
42352  have_x=disabled
42353else
42354  case $x_includes,$x_libraries in #(
42355    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42356    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42357  $as_echo_n "(cached) " >&6
42358else
42359  # One or both of the vars are not set, and there is no cached value.
42360ac_x_includes=no ac_x_libraries=no
42361rm -f -r conftest.dir
42362if mkdir conftest.dir; then
42363  cd conftest.dir
42364  cat >Imakefile <<'_ACEOF'
42365incroot:
42366	@echo incroot='${INCROOT}'
42367usrlibdir:
42368	@echo usrlibdir='${USRLIBDIR}'
42369libdir:
42370	@echo libdir='${LIBDIR}'
42371_ACEOF
42372  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42373    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42374    for ac_var in incroot usrlibdir libdir; do
42375      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42376    done
42377    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42378    for ac_extension in a so sl dylib la dll; do
42379      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42380	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42381	ac_im_usrlibdir=$ac_im_libdir; break
42382      fi
42383    done
42384    # Screen out bogus values from the imake configuration.  They are
42385    # bogus both because they are the default anyway, and because
42386    # using them would break gcc on systems where it needs fixed includes.
42387    case $ac_im_incroot in
42388	/usr/include) ac_x_includes= ;;
42389	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42390    esac
42391    case $ac_im_usrlibdir in
42392	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
42393	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42394    esac
42395  fi
42396  cd ..
42397  rm -f -r conftest.dir
42398fi
42399
42400# Standard set of common directories for X headers.
42401# Check X11 before X11Rn because it is often a symlink to the current release.
42402ac_x_header_dirs='
42403/usr/X11/include
42404/usr/X11R7/include
42405/usr/X11R6/include
42406/usr/X11R5/include
42407/usr/X11R4/include
42408
42409/usr/include/X11
42410/usr/include/X11R7
42411/usr/include/X11R6
42412/usr/include/X11R5
42413/usr/include/X11R4
42414
42415/usr/local/X11/include
42416/usr/local/X11R7/include
42417/usr/local/X11R6/include
42418/usr/local/X11R5/include
42419/usr/local/X11R4/include
42420
42421/usr/local/include/X11
42422/usr/local/include/X11R7
42423/usr/local/include/X11R6
42424/usr/local/include/X11R5
42425/usr/local/include/X11R4
42426
42427/usr/X386/include
42428/usr/x386/include
42429/usr/XFree86/include/X11
42430
42431/usr/include
42432/usr/local/include
42433/usr/unsupported/include
42434/usr/athena/include
42435/usr/local/x11r5/include
42436/usr/lpp/Xamples/include
42437
42438/usr/openwin/include
42439/usr/openwin/share/include'
42440
42441if test "$ac_x_includes" = no; then
42442  # Guess where to find include files, by looking for Xlib.h.
42443  # First, try using that file with no special directory specified.
42444  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42445/* end confdefs.h.  */
42446#include <X11/Xlib.h>
42447_ACEOF
42448if ac_fn_cxx_try_cpp "$LINENO"; then :
42449  # We can compile using X headers with no special include directory.
42450ac_x_includes=
42451else
42452  for ac_dir in $ac_x_header_dirs; do
42453  if test -r "$ac_dir/X11/Xlib.h"; then
42454    ac_x_includes=$ac_dir
42455    break
42456  fi
42457done
42458fi
42459rm -f conftest.err conftest.i conftest.$ac_ext
42460fi # $ac_x_includes = no
42461
42462if test "$ac_x_libraries" = no; then
42463  # Check for the libraries.
42464  # See if we find them without any special options.
42465  # Don't add to $LIBS permanently.
42466  ac_save_LIBS=$LIBS
42467  LIBS="-lX11 $LIBS"
42468  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42469/* end confdefs.h.  */
42470#include <X11/Xlib.h>
42471int
42472main ()
42473{
42474XrmInitialize ()
42475  ;
42476  return 0;
42477}
42478_ACEOF
42479if ac_fn_cxx_try_link "$LINENO"; then :
42480  LIBS=$ac_save_LIBS
42481# We can link X programs with no special library path.
42482ac_x_libraries=
42483else
42484  LIBS=$ac_save_LIBS
42485for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42486do
42487  # Don't even attempt the hair of trying to link an X program!
42488  for ac_extension in a so sl dylib la dll; do
42489    if test -r "$ac_dir/libX11.$ac_extension"; then
42490      ac_x_libraries=$ac_dir
42491      break 2
42492    fi
42493  done
42494done
42495fi
42496rm -f core conftest.err conftest.$ac_objext \
42497    conftest$ac_exeext conftest.$ac_ext
42498fi # $ac_x_libraries = no
42499
42500case $ac_x_includes,$ac_x_libraries in #(
42501  no,* | *,no | *\'*)
42502    # Didn't find X, or a directory has "'" in its name.
42503    ac_cv_have_x="have_x=no";; #(
42504  *)
42505    # Record where we found X for the cache.
42506    ac_cv_have_x="have_x=yes\
42507	ac_x_includes='$ac_x_includes'\
42508	ac_x_libraries='$ac_x_libraries'"
42509esac
42510fi
42511;; #(
42512    *) have_x=yes;;
42513  esac
42514  eval "$ac_cv_have_x"
42515fi # $with_x != no
42516
42517if test "$have_x" != yes; then
42518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
42519$as_echo "$have_x" >&6; }
42520  no_x=yes
42521else
42522  # If each of the values was on the command line, it overrides each guess.
42523  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
42524  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
42525  # Update the cache value to reflect the command line values.
42526  ac_cv_have_x="have_x=yes\
42527	ac_x_includes='$x_includes'\
42528	ac_x_libraries='$x_libraries'"
42529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
42530$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
42531fi
42532
42533  if test "$no_x" = yes; then
42534  # Not all programs may use this symbol, but it does not hurt to define it.
42535
42536$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
42537
42538  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
42539else
42540  if test -n "$x_includes"; then
42541    X_CFLAGS="$X_CFLAGS -I$x_includes"
42542  fi
42543
42544  # It would also be nice to do this for all -L options, not just this one.
42545  if test -n "$x_libraries"; then
42546    X_LIBS="$X_LIBS -L$x_libraries"
42547    # For Solaris; some versions of Sun CC require a space after -R and
42548    # others require no space.  Words are not sufficient . . . .
42549    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
42550$as_echo_n "checking whether -R must be followed by a space... " >&6; }
42551    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
42552    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
42553    ac_cxx_werror_flag=yes
42554    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42555/* end confdefs.h.  */
42556
42557int
42558main ()
42559{
42560
42561  ;
42562  return 0;
42563}
42564_ACEOF
42565if ac_fn_cxx_try_link "$LINENO"; then :
42566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42567$as_echo "no" >&6; }
42568       X_LIBS="$X_LIBS -R$x_libraries"
42569else
42570  LIBS="$ac_xsave_LIBS -R $x_libraries"
42571       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42572/* end confdefs.h.  */
42573
42574int
42575main ()
42576{
42577
42578  ;
42579  return 0;
42580}
42581_ACEOF
42582if ac_fn_cxx_try_link "$LINENO"; then :
42583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42584$as_echo "yes" >&6; }
42585	  X_LIBS="$X_LIBS -R $x_libraries"
42586else
42587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
42588$as_echo "neither works" >&6; }
42589fi
42590rm -f core conftest.err conftest.$ac_objext \
42591    conftest$ac_exeext conftest.$ac_ext
42592fi
42593rm -f core conftest.err conftest.$ac_objext \
42594    conftest$ac_exeext conftest.$ac_ext
42595    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
42596    LIBS=$ac_xsave_LIBS
42597  fi
42598
42599  # Check for system-dependent libraries X programs must link with.
42600  # Do this before checking for the system-independent R6 libraries
42601  # (-lICE), since we may need -lsocket or whatever for X linking.
42602
42603  if test "$ISC" = yes; then
42604    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
42605  else
42606    # Martyn Johnson says this is needed for Ultrix, if the X
42607    # libraries were built with DECnet support.  And Karl Berry says
42608    # the Alpha needs dnet_stub (dnet does not exist).
42609    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
42610    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42611/* end confdefs.h.  */
42612
42613/* Override any GCC internal prototype to avoid an error.
42614   Use char because int might match the return type of a GCC
42615   builtin and then its argument prototype would still apply.  */
42616#ifdef __cplusplus
42617extern "C"
42618#endif
42619char XOpenDisplay ();
42620int
42621main ()
42622{
42623return XOpenDisplay ();
42624  ;
42625  return 0;
42626}
42627_ACEOF
42628if ac_fn_cxx_try_link "$LINENO"; then :
42629
42630else
42631  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
42632$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
42633if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
42634  $as_echo_n "(cached) " >&6
42635else
42636  ac_check_lib_save_LIBS=$LIBS
42637LIBS="-ldnet  $LIBS"
42638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42639/* end confdefs.h.  */
42640
42641/* Override any GCC internal prototype to avoid an error.
42642   Use char because int might match the return type of a GCC
42643   builtin and then its argument prototype would still apply.  */
42644#ifdef __cplusplus
42645extern "C"
42646#endif
42647char dnet_ntoa ();
42648int
42649main ()
42650{
42651return dnet_ntoa ();
42652  ;
42653  return 0;
42654}
42655_ACEOF
42656if ac_fn_cxx_try_link "$LINENO"; then :
42657  ac_cv_lib_dnet_dnet_ntoa=yes
42658else
42659  ac_cv_lib_dnet_dnet_ntoa=no
42660fi
42661rm -f core conftest.err conftest.$ac_objext \
42662    conftest$ac_exeext conftest.$ac_ext
42663LIBS=$ac_check_lib_save_LIBS
42664fi
42665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
42666$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
42667if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
42668  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
42669fi
42670
42671    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
42672      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
42673$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
42674if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
42675  $as_echo_n "(cached) " >&6
42676else
42677  ac_check_lib_save_LIBS=$LIBS
42678LIBS="-ldnet_stub  $LIBS"
42679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42680/* end confdefs.h.  */
42681
42682/* Override any GCC internal prototype to avoid an error.
42683   Use char because int might match the return type of a GCC
42684   builtin and then its argument prototype would still apply.  */
42685#ifdef __cplusplus
42686extern "C"
42687#endif
42688char dnet_ntoa ();
42689int
42690main ()
42691{
42692return dnet_ntoa ();
42693  ;
42694  return 0;
42695}
42696_ACEOF
42697if ac_fn_cxx_try_link "$LINENO"; then :
42698  ac_cv_lib_dnet_stub_dnet_ntoa=yes
42699else
42700  ac_cv_lib_dnet_stub_dnet_ntoa=no
42701fi
42702rm -f core conftest.err conftest.$ac_objext \
42703    conftest$ac_exeext conftest.$ac_ext
42704LIBS=$ac_check_lib_save_LIBS
42705fi
42706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
42707$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
42708if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
42709  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
42710fi
42711
42712    fi
42713fi
42714rm -f core conftest.err conftest.$ac_objext \
42715    conftest$ac_exeext conftest.$ac_ext
42716    LIBS="$ac_xsave_LIBS"
42717
42718    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
42719    # to get the SysV transport functions.
42720    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
42721    # needs -lnsl.
42722    # The nsl library prevents programs from opening the X display
42723    # on Irix 5.2, according to T.E. Dickey.
42724    # The functions gethostbyname, getservbyname, and inet_addr are
42725    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
42726    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
42727if test "x$ac_cv_func_gethostbyname" = xyes; then :
42728
42729fi
42730
42731    if test $ac_cv_func_gethostbyname = no; then
42732      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
42733$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
42734if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
42735  $as_echo_n "(cached) " >&6
42736else
42737  ac_check_lib_save_LIBS=$LIBS
42738LIBS="-lnsl  $LIBS"
42739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42740/* end confdefs.h.  */
42741
42742/* Override any GCC internal prototype to avoid an error.
42743   Use char because int might match the return type of a GCC
42744   builtin and then its argument prototype would still apply.  */
42745#ifdef __cplusplus
42746extern "C"
42747#endif
42748char gethostbyname ();
42749int
42750main ()
42751{
42752return gethostbyname ();
42753  ;
42754  return 0;
42755}
42756_ACEOF
42757if ac_fn_cxx_try_link "$LINENO"; then :
42758  ac_cv_lib_nsl_gethostbyname=yes
42759else
42760  ac_cv_lib_nsl_gethostbyname=no
42761fi
42762rm -f core conftest.err conftest.$ac_objext \
42763    conftest$ac_exeext conftest.$ac_ext
42764LIBS=$ac_check_lib_save_LIBS
42765fi
42766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
42767$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
42768if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
42769  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
42770fi
42771
42772      if test $ac_cv_lib_nsl_gethostbyname = no; then
42773	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
42774$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
42775if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
42776  $as_echo_n "(cached) " >&6
42777else
42778  ac_check_lib_save_LIBS=$LIBS
42779LIBS="-lbsd  $LIBS"
42780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42781/* end confdefs.h.  */
42782
42783/* Override any GCC internal prototype to avoid an error.
42784   Use char because int might match the return type of a GCC
42785   builtin and then its argument prototype would still apply.  */
42786#ifdef __cplusplus
42787extern "C"
42788#endif
42789char gethostbyname ();
42790int
42791main ()
42792{
42793return gethostbyname ();
42794  ;
42795  return 0;
42796}
42797_ACEOF
42798if ac_fn_cxx_try_link "$LINENO"; then :
42799  ac_cv_lib_bsd_gethostbyname=yes
42800else
42801  ac_cv_lib_bsd_gethostbyname=no
42802fi
42803rm -f core conftest.err conftest.$ac_objext \
42804    conftest$ac_exeext conftest.$ac_ext
42805LIBS=$ac_check_lib_save_LIBS
42806fi
42807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
42808$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
42809if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
42810  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
42811fi
42812
42813      fi
42814    fi
42815
42816    # lieder@skyler.mavd.honeywell.com says without -lsocket,
42817    # socket/setsockopt and other routines are undefined under SCO ODT
42818    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
42819    # on later versions), says Simon Leinen: it contains gethostby*
42820    # variants that don't use the name server (or something).  -lsocket
42821    # must be given before -lnsl if both are needed.  We assume that
42822    # if connect needs -lnsl, so does gethostbyname.
42823    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
42824if test "x$ac_cv_func_connect" = xyes; then :
42825
42826fi
42827
42828    if test $ac_cv_func_connect = no; then
42829      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
42830$as_echo_n "checking for connect in -lsocket... " >&6; }
42831if ${ac_cv_lib_socket_connect+:} false; then :
42832  $as_echo_n "(cached) " >&6
42833else
42834  ac_check_lib_save_LIBS=$LIBS
42835LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
42836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42837/* end confdefs.h.  */
42838
42839/* Override any GCC internal prototype to avoid an error.
42840   Use char because int might match the return type of a GCC
42841   builtin and then its argument prototype would still apply.  */
42842#ifdef __cplusplus
42843extern "C"
42844#endif
42845char connect ();
42846int
42847main ()
42848{
42849return connect ();
42850  ;
42851  return 0;
42852}
42853_ACEOF
42854if ac_fn_cxx_try_link "$LINENO"; then :
42855  ac_cv_lib_socket_connect=yes
42856else
42857  ac_cv_lib_socket_connect=no
42858fi
42859rm -f core conftest.err conftest.$ac_objext \
42860    conftest$ac_exeext conftest.$ac_ext
42861LIBS=$ac_check_lib_save_LIBS
42862fi
42863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
42864$as_echo "$ac_cv_lib_socket_connect" >&6; }
42865if test "x$ac_cv_lib_socket_connect" = xyes; then :
42866  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
42867fi
42868
42869    fi
42870
42871    # Guillermo Gomez says -lposix is necessary on A/UX.
42872    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
42873if test "x$ac_cv_func_remove" = xyes; then :
42874
42875fi
42876
42877    if test $ac_cv_func_remove = no; then
42878      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
42879$as_echo_n "checking for remove in -lposix... " >&6; }
42880if ${ac_cv_lib_posix_remove+:} false; then :
42881  $as_echo_n "(cached) " >&6
42882else
42883  ac_check_lib_save_LIBS=$LIBS
42884LIBS="-lposix  $LIBS"
42885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42886/* end confdefs.h.  */
42887
42888/* Override any GCC internal prototype to avoid an error.
42889   Use char because int might match the return type of a GCC
42890   builtin and then its argument prototype would still apply.  */
42891#ifdef __cplusplus
42892extern "C"
42893#endif
42894char remove ();
42895int
42896main ()
42897{
42898return remove ();
42899  ;
42900  return 0;
42901}
42902_ACEOF
42903if ac_fn_cxx_try_link "$LINENO"; then :
42904  ac_cv_lib_posix_remove=yes
42905else
42906  ac_cv_lib_posix_remove=no
42907fi
42908rm -f core conftest.err conftest.$ac_objext \
42909    conftest$ac_exeext conftest.$ac_ext
42910LIBS=$ac_check_lib_save_LIBS
42911fi
42912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
42913$as_echo "$ac_cv_lib_posix_remove" >&6; }
42914if test "x$ac_cv_lib_posix_remove" = xyes; then :
42915  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
42916fi
42917
42918    fi
42919
42920    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
42921    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
42922if test "x$ac_cv_func_shmat" = xyes; then :
42923
42924fi
42925
42926    if test $ac_cv_func_shmat = no; then
42927      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
42928$as_echo_n "checking for shmat in -lipc... " >&6; }
42929if ${ac_cv_lib_ipc_shmat+:} false; then :
42930  $as_echo_n "(cached) " >&6
42931else
42932  ac_check_lib_save_LIBS=$LIBS
42933LIBS="-lipc  $LIBS"
42934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42935/* end confdefs.h.  */
42936
42937/* Override any GCC internal prototype to avoid an error.
42938   Use char because int might match the return type of a GCC
42939   builtin and then its argument prototype would still apply.  */
42940#ifdef __cplusplus
42941extern "C"
42942#endif
42943char shmat ();
42944int
42945main ()
42946{
42947return shmat ();
42948  ;
42949  return 0;
42950}
42951_ACEOF
42952if ac_fn_cxx_try_link "$LINENO"; then :
42953  ac_cv_lib_ipc_shmat=yes
42954else
42955  ac_cv_lib_ipc_shmat=no
42956fi
42957rm -f core conftest.err conftest.$ac_objext \
42958    conftest$ac_exeext conftest.$ac_ext
42959LIBS=$ac_check_lib_save_LIBS
42960fi
42961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
42962$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
42963if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
42964  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
42965fi
42966
42967    fi
42968  fi
42969
42970  # Check for libraries that X11R6 Xt/Xaw programs need.
42971  ac_save_LDFLAGS=$LDFLAGS
42972  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
42973  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
42974  # check for ICE first), but we must link in the order -lSM -lICE or
42975  # we get undefined symbols.  So assume we have SM if we have ICE.
42976  # These have to be linked with before -lX11, unlike the other
42977  # libraries we check for below, so use a different variable.
42978  # John Interrante, Karl Berry
42979  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
42980$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
42981if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
42982  $as_echo_n "(cached) " >&6
42983else
42984  ac_check_lib_save_LIBS=$LIBS
42985LIBS="-lICE $X_EXTRA_LIBS $LIBS"
42986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42987/* end confdefs.h.  */
42988
42989/* Override any GCC internal prototype to avoid an error.
42990   Use char because int might match the return type of a GCC
42991   builtin and then its argument prototype would still apply.  */
42992#ifdef __cplusplus
42993extern "C"
42994#endif
42995char IceConnectionNumber ();
42996int
42997main ()
42998{
42999return IceConnectionNumber ();
43000  ;
43001  return 0;
43002}
43003_ACEOF
43004if ac_fn_cxx_try_link "$LINENO"; then :
43005  ac_cv_lib_ICE_IceConnectionNumber=yes
43006else
43007  ac_cv_lib_ICE_IceConnectionNumber=no
43008fi
43009rm -f core conftest.err conftest.$ac_objext \
43010    conftest$ac_exeext conftest.$ac_ext
43011LIBS=$ac_check_lib_save_LIBS
43012fi
43013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43014$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43015if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43016  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43017fi
43018
43019  LDFLAGS=$ac_save_LDFLAGS
43020
43021fi
43022
43023
43024  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43025  # this doesn't make sense so we remove it.
43026  if test "x$COMPILE_TYPE" = xcross; then
43027    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43028  fi
43029
43030  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
43031
43032  # Print a helpful message on how to acquire the necessary build dependency.
43033  # x11 is the help tag: freetype, cups, pulse, alsa etc
43034  MISSING_DEPENDENCY=x11
43035
43036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43037    cygwin_help $MISSING_DEPENDENCY
43038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43039    msys_help $MISSING_DEPENDENCY
43040  else
43041    PKGHANDLER_COMMAND=
43042
43043    case $PKGHANDLER in
43044      apt-get)
43045        apt_help     $MISSING_DEPENDENCY ;;
43046      yum)
43047        yum_help     $MISSING_DEPENDENCY ;;
43048      port)
43049        port_help    $MISSING_DEPENDENCY ;;
43050      pkgutil)
43051        pkgutil_help $MISSING_DEPENDENCY ;;
43052      pkgadd)
43053        pkgadd_help  $MISSING_DEPENDENCY ;;
43054    esac
43055
43056    if test "x$PKGHANDLER_COMMAND" != x; then
43057      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43058    fi
43059  fi
43060
43061    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43062  fi
43063
43064  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43065    OPENWIN_HOME="/usr/openwin"
43066    X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43067    X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43068        -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43069        -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43070        -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43071  fi
43072
43073  #
43074  # Weird Sol10 something check...TODO change to try compile
43075  #
43076  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
43077    if test "`uname -r`" = "5.10"; then
43078      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
43079        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
43080      fi
43081    fi
43082  fi
43083
43084  ac_ext=c
43085ac_cpp='$CPP $CPPFLAGS'
43086ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43087ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43088ac_compiler_gnu=$ac_cv_c_compiler_gnu
43089
43090  OLD_CFLAGS="$CFLAGS"
43091  CFLAGS="$CFLAGS $X_CFLAGS"
43092
43093  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43094  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43095do :
43096  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43097ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43098        # include <X11/Xlib.h>
43099        # include <X11/Xutil.h>
43100
43101
43102"
43103if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43104  cat >>confdefs.h <<_ACEOF
43105#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43106_ACEOF
43107 X11_A_OK=yes
43108else
43109  X11_A_OK=no; break
43110fi
43111
43112done
43113
43114
43115  CFLAGS="$OLD_CFLAGS"
43116  ac_ext=cpp
43117ac_cpp='$CXXCPP $CPPFLAGS'
43118ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43119ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43120ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43121
43122
43123  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
43124
43125  # Print a helpful message on how to acquire the necessary build dependency.
43126  # x11 is the help tag: freetype, cups, pulse, alsa etc
43127  MISSING_DEPENDENCY=x11
43128
43129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43130    cygwin_help $MISSING_DEPENDENCY
43131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43132    msys_help $MISSING_DEPENDENCY
43133  else
43134    PKGHANDLER_COMMAND=
43135
43136    case $PKGHANDLER in
43137      apt-get)
43138        apt_help     $MISSING_DEPENDENCY ;;
43139      yum)
43140        yum_help     $MISSING_DEPENDENCY ;;
43141      port)
43142        port_help    $MISSING_DEPENDENCY ;;
43143      pkgutil)
43144        pkgutil_help $MISSING_DEPENDENCY ;;
43145      pkgadd)
43146        pkgadd_help  $MISSING_DEPENDENCY ;;
43147    esac
43148
43149    if test "x$PKGHANDLER_COMMAND" != x; then
43150      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43151    fi
43152  fi
43153
43154    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43155  fi
43156
43157
43158
43159
43160
43161
43162  ###############################################################################
43163  #
43164  # The common unix printing system cups is used to print from java.
43165  #
43166
43167# Check whether --with-cups was given.
43168if test "${with_cups+set}" = set; then :
43169  withval=$with_cups;
43170fi
43171
43172
43173# Check whether --with-cups-include was given.
43174if test "${with_cups_include+set}" = set; then :
43175  withval=$with_cups_include;
43176fi
43177
43178
43179  if test "x$CUPS_NOT_NEEDED" = xyes; then
43180    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43181      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43182$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43183    fi
43184    CUPS_CFLAGS=
43185  else
43186    CUPS_FOUND=no
43187
43188    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43189      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43190    fi
43191
43192    if test "x${with_cups}" != x; then
43193      CUPS_CFLAGS="-I${with_cups}/include"
43194      CUPS_FOUND=yes
43195    fi
43196    if test "x${with_cups_include}" != x; then
43197      CUPS_CFLAGS="-I${with_cups_include}"
43198      CUPS_FOUND=yes
43199    fi
43200    if test "x$CUPS_FOUND" = xno; then
43201
43202
43203  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43204    # Source the builddeps file again, to make sure it uses the latest variables!
43205    . $builddepsfile
43206    # Look for a target and build machine specific resource!
43207    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43208    if test "x$resource" = x; then
43209      # Ok, lets instead look for a target specific resource
43210      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43211    fi
43212    if test "x$resource" = x; then
43213      # Ok, lets instead look for a build specific resource
43214      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43215    fi
43216    if test "x$resource" = x; then
43217      # Ok, lets instead look for a generic resource
43218      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43219      resource=${builddep_cups}
43220    fi
43221    if test "x$resource" != x; then
43222      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43223$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43224      # If the resource in the builddeps.conf file is an existing directory,
43225      # for example /java/linux/cups
43226      if test -d ${resource}; then
43227        depdir=${resource}
43228      else
43229
43230  # cups is for example mymodule
43231  # $resource is for example libs/general/libmymod_1_2_3.zip
43232  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43233  # $with_builddeps_dir is for example /localhome/builddeps
43234  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43235  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43236  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43237  filename=`basename $resource`
43238  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43239  filebase=${filename%%.*}
43240  extension=${filename#*.}
43241  installdir=$with_builddeps_dir/$filebase
43242  if test ! -f $installdir/$filename.unpacked; then
43243    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43244$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43245    if test ! -d $installdir; then
43246      mkdir -p $installdir
43247    fi
43248    if test ! -d $installdir; then
43249      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43250    fi
43251    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43252    touch $tmpfile
43253    if test ! -f $tmpfile; then
43254      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43255    fi
43256
43257  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43258  # $tmpfile is the local file name for the downloaded file.
43259  VALID_TOOL=no
43260  if test "x$BDEPS_FTP" = xwget; then
43261    VALID_TOOL=yes
43262    wget -O $tmpfile $with_builddeps_server/$resource
43263  fi
43264  if test "x$BDEPS_FTP" = xlftp; then
43265    VALID_TOOL=yes
43266    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43267  fi
43268  if test "x$BDEPS_FTP" = xftp; then
43269    VALID_TOOL=yes
43270    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43271    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43272    FTPUSERPWD=${FTPSERVER%%@*}
43273    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43274      FTPUSER=${userpwd%%:*}
43275      FTPPWD=${userpwd#*@}
43276      FTPSERVER=${FTPSERVER#*@}
43277    else
43278      FTPUSER=ftp
43279      FTPPWD=ftp
43280    fi
43281    # the "pass" command does not work on some
43282    # ftp clients (read ftp.exe) but if it works,
43283    # passive mode is better!
43284    ( \
43285        echo "user $FTPUSER $FTPPWD"        ; \
43286        echo "pass"                         ; \
43287        echo "bin"                          ; \
43288        echo "get $FTPPATH $tmpfile"              ; \
43289    ) | ftp -in $FTPSERVER
43290  fi
43291  if test "x$VALID_TOOL" != xyes; then
43292    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43293  fi
43294
43295    mv $tmpfile $installdir/$filename
43296    if test ! -s $installdir/$filename; then
43297      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43298    fi
43299    case "$extension" in
43300      zip)  echo "Unzipping $installdir/$filename..."
43301        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43302        ;;
43303      tar.gz) echo "Untaring $installdir/$filename..."
43304        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43305        ;;
43306      tgz) echo "Untaring $installdir/$filename..."
43307        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43308        ;;
43309      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43310        ;;
43311    esac
43312  fi
43313  if test -f $installdir/$filename.unpacked; then
43314    depdir=$installdir
43315  fi
43316
43317      fi
43318      # Source the builddeps file again, because in the previous command, the depdir
43319      # was updated to point at the current build dependency install directory.
43320      . $builddepsfile
43321      # Now extract variables from the builddeps.conf files.
43322      theroot=${builddep_cups_ROOT}
43323      thecflags=${builddep_cups_CFLAGS}
43324      thelibs=${builddep_cups_LIBS}
43325      if test "x$depdir" = x; then
43326        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43327      fi
43328      CUPS=$depdir
43329      if test "x$theroot" != x; then
43330        CUPS="$theroot"
43331      fi
43332      if test "x$thecflags" != x; then
43333        CUPS_CFLAGS="$thecflags"
43334      fi
43335      if test "x$thelibs" != x; then
43336        CUPS_LIBS="$thelibs"
43337      fi
43338      CUPS_FOUND=yes
43339
43340    fi
43341
43342  fi
43343
43344    fi
43345    if test "x$CUPS_FOUND" = xno; then
43346      # Are the cups headers installed in the default /usr/include location?
43347      for ac_header in cups/cups.h cups/ppd.h
43348do :
43349  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43350ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43351if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43352  cat >>confdefs.h <<_ACEOF
43353#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43354_ACEOF
43355
43356            CUPS_FOUND=yes
43357            CUPS_CFLAGS=
43358            DEFAULT_CUPS=yes
43359
43360
43361fi
43362
43363done
43364
43365    fi
43366    if test "x$CUPS_FOUND" = xno; then
43367      # Getting nervous now? Lets poke around for standard Solaris third-party
43368      # package installation locations.
43369      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43370$as_echo_n "checking for cups headers... " >&6; }
43371      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
43372        # An SFW package seems to be installed!
43373        CUPS_FOUND=yes
43374        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
43375      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
43376        # A CSW package seems to be installed!
43377        CUPS_FOUND=yes
43378        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
43379      fi
43380      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43381$as_echo "$CUPS_FOUND" >&6; }
43382    fi
43383    if test "x$CUPS_FOUND" = xno; then
43384
43385  # Print a helpful message on how to acquire the necessary build dependency.
43386  # cups is the help tag: freetype, cups, pulse, alsa etc
43387  MISSING_DEPENDENCY=cups
43388
43389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43390    cygwin_help $MISSING_DEPENDENCY
43391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43392    msys_help $MISSING_DEPENDENCY
43393  else
43394    PKGHANDLER_COMMAND=
43395
43396    case $PKGHANDLER in
43397      apt-get)
43398        apt_help     $MISSING_DEPENDENCY ;;
43399      yum)
43400        yum_help     $MISSING_DEPENDENCY ;;
43401      port)
43402        port_help    $MISSING_DEPENDENCY ;;
43403      pkgutil)
43404        pkgutil_help $MISSING_DEPENDENCY ;;
43405      pkgadd)
43406        pkgadd_help  $MISSING_DEPENDENCY ;;
43407    esac
43408
43409    if test "x$PKGHANDLER_COMMAND" != x; then
43410      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43411    fi
43412  fi
43413
43414      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43415    fi
43416  fi
43417
43418
43419
43420
43421
43422
43423  ###############################################################################
43424  #
43425  # The ubiquitous freetype library is used to render fonts.
43426  #
43427
43428# Check whether --with-freetype was given.
43429if test "${with_freetype+set}" = set; then :
43430  withval=$with_freetype;
43431fi
43432
43433
43434# Check whether --with-freetype-include was given.
43435if test "${with_freetype_include+set}" = set; then :
43436  withval=$with_freetype_include;
43437fi
43438
43439
43440# Check whether --with-freetype-lib was given.
43441if test "${with_freetype_lib+set}" = set; then :
43442  withval=$with_freetype_lib;
43443fi
43444
43445  # Check whether --enable-freetype-bundling was given.
43446if test "${enable_freetype_bundling+set}" = set; then :
43447  enableval=$enable_freetype_bundling;
43448fi
43449
43450
43451  FREETYPE_CFLAGS=
43452  FREETYPE_LIBS=
43453  FREETYPE_BUNDLE_LIB_PATH=
43454
43455  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43456    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43457      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43458$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43459    fi
43460    if test "x$enable_freetype_bundling" != x; then
43461      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43462$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43463    fi
43464  else
43465    # freetype is needed to build; go get it!
43466
43467    BUNDLE_FREETYPE="$enable_freetype_bundling"
43468
43469    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43470      # User has specified settings
43471
43472      if test "x$BUNDLE_FREETYPE" = x; then
43473        # If not specified, default is to bundle freetype
43474        BUNDLE_FREETYPE=yes
43475      fi
43476
43477      if test "x$with_freetype" != x; then
43478        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
43479        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
43480      fi
43481
43482      # Allow --with-freetype-lib and --with-freetype-include to override
43483      if test "x$with_freetype_include" != x; then
43484        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
43485      fi
43486      if test "x$with_freetype_lib" != x; then
43487        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
43488      fi
43489
43490      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
43491        # Okay, we got it. Check that it works.
43492
43493  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43494  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43495  METHOD="--with-freetype"
43496
43497  # First check if the files exists.
43498  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43499    # We found an arbitrary include file. That's a good sign.
43500    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43501$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43502    FOUND_FREETYPE=yes
43503
43504    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43505    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43506      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43507$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43508      FOUND_FREETYPE=no
43509    else
43510      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43511        # On Windows, we will need both .lib and .dll file.
43512        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43513          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43514$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43515          FOUND_FREETYPE=no
43516        fi
43517      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
43518        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43519        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43520      fi
43521    fi
43522  fi
43523
43524  if test "x$FOUND_FREETYPE" = xyes; then
43525
43526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43527
43528  # Input might be given as Windows format, start by converting to
43529  # unix format.
43530  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43531  new_path=`$CYGPATH -u "$path"`
43532
43533  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43534  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43535  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43536  # "foo.exe" is OK but "foo" is an error.
43537  #
43538  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43539  # It is also a way to make sure we got the proper file name for the real test later on.
43540  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43541  if test "x$test_shortpath" = x; then
43542    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43543$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43544    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43545  fi
43546
43547  # Call helper function which possibly converts this using DOS-style short mode.
43548  # If so, the updated path is stored in $new_path.
43549
43550  input_path="$new_path"
43551  # Check if we need to convert this using DOS-style short mode. If the path
43552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43553  # take no chances and rewrite it.
43554  # Note: m4 eats our [], so we need to use [ and ] instead.
43555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43556  if test "x$has_forbidden_chars" != x; then
43557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43558    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43559    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43560    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43561      # Going to short mode and back again did indeed matter. Since short mode is
43562      # case insensitive, let's make it lowercase to improve readability.
43563      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43564      # Now convert it back to Unix-stile (cygpath)
43565      input_path=`$CYGPATH -u "$shortmode_path"`
43566      new_path="$input_path"
43567    fi
43568  fi
43569
43570  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43571  if test "x$test_cygdrive_prefix" = x; then
43572    # As a simple fix, exclude /usr/bin since it's not a real path.
43573    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43574      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43575      # a path prefixed by /cygdrive for fixpath to work.
43576      new_path="$CYGWIN_ROOT_PATH$input_path"
43577    fi
43578  fi
43579
43580
43581  if test "x$path" != "x$new_path"; then
43582    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43584$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43585  fi
43586
43587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43588
43589  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43590  has_colon=`$ECHO $path | $GREP ^.:`
43591  new_path="$path"
43592  if test "x$has_colon" = x; then
43593    # Not in mixed or Windows style, start by that.
43594    new_path=`cmd //c echo $path`
43595  fi
43596
43597
43598  input_path="$new_path"
43599  # Check if we need to convert this using DOS-style short mode. If the path
43600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43601  # take no chances and rewrite it.
43602  # Note: m4 eats our [], so we need to use [ and ] instead.
43603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43604  if test "x$has_forbidden_chars" != x; then
43605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43606    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43607  fi
43608
43609
43610  windows_path="$new_path"
43611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43612    unix_path=`$CYGPATH -u "$windows_path"`
43613    new_path="$unix_path"
43614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43616    new_path="$unix_path"
43617  fi
43618
43619  if test "x$path" != "x$new_path"; then
43620    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43621    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43622$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43623  fi
43624
43625  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43626  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43627
43628  else
43629    # We're on a posix platform. Hooray! :)
43630    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43631    has_space=`$ECHO "$path" | $GREP " "`
43632    if test "x$has_space" != x; then
43633      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43634$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43635      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43636    fi
43637
43638    # Use eval to expand a potential ~
43639    eval path="$path"
43640    if test ! -f "$path" && test ! -d "$path"; then
43641      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43642    fi
43643
43644    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43645  fi
43646
43647
43648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43649
43650  # Input might be given as Windows format, start by converting to
43651  # unix format.
43652  path="$POTENTIAL_FREETYPE_LIB_PATH"
43653  new_path=`$CYGPATH -u "$path"`
43654
43655  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43656  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43657  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43658  # "foo.exe" is OK but "foo" is an error.
43659  #
43660  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43661  # It is also a way to make sure we got the proper file name for the real test later on.
43662  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43663  if test "x$test_shortpath" = x; then
43664    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43665$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43666    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43667  fi
43668
43669  # Call helper function which possibly converts this using DOS-style short mode.
43670  # If so, the updated path is stored in $new_path.
43671
43672  input_path="$new_path"
43673  # Check if we need to convert this using DOS-style short mode. If the path
43674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43675  # take no chances and rewrite it.
43676  # Note: m4 eats our [], so we need to use [ and ] instead.
43677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43678  if test "x$has_forbidden_chars" != x; then
43679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43680    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43681    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43682    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43683      # Going to short mode and back again did indeed matter. Since short mode is
43684      # case insensitive, let's make it lowercase to improve readability.
43685      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43686      # Now convert it back to Unix-stile (cygpath)
43687      input_path=`$CYGPATH -u "$shortmode_path"`
43688      new_path="$input_path"
43689    fi
43690  fi
43691
43692  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43693  if test "x$test_cygdrive_prefix" = x; then
43694    # As a simple fix, exclude /usr/bin since it's not a real path.
43695    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43696      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43697      # a path prefixed by /cygdrive for fixpath to work.
43698      new_path="$CYGWIN_ROOT_PATH$input_path"
43699    fi
43700  fi
43701
43702
43703  if test "x$path" != "x$new_path"; then
43704    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43705    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43706$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43707  fi
43708
43709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43710
43711  path="$POTENTIAL_FREETYPE_LIB_PATH"
43712  has_colon=`$ECHO $path | $GREP ^.:`
43713  new_path="$path"
43714  if test "x$has_colon" = x; then
43715    # Not in mixed or Windows style, start by that.
43716    new_path=`cmd //c echo $path`
43717  fi
43718
43719
43720  input_path="$new_path"
43721  # Check if we need to convert this using DOS-style short mode. If the path
43722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43723  # take no chances and rewrite it.
43724  # Note: m4 eats our [], so we need to use [ and ] instead.
43725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43726  if test "x$has_forbidden_chars" != x; then
43727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43728    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43729  fi
43730
43731
43732  windows_path="$new_path"
43733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43734    unix_path=`$CYGPATH -u "$windows_path"`
43735    new_path="$unix_path"
43736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43738    new_path="$unix_path"
43739  fi
43740
43741  if test "x$path" != "x$new_path"; then
43742    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43744$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43745  fi
43746
43747  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43748  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43749
43750  else
43751    # We're on a posix platform. Hooray! :)
43752    path="$POTENTIAL_FREETYPE_LIB_PATH"
43753    has_space=`$ECHO "$path" | $GREP " "`
43754    if test "x$has_space" != x; then
43755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43756$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43757      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43758    fi
43759
43760    # Use eval to expand a potential ~
43761    eval path="$path"
43762    if test ! -f "$path" && test ! -d "$path"; then
43763      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43764    fi
43765
43766    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43767  fi
43768
43769
43770    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43771    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43772$as_echo_n "checking for freetype includes... " >&6; }
43773    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43774$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43775    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43776    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43777$as_echo_n "checking for freetype libraries... " >&6; }
43778    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43779$as_echo "$FREETYPE_LIB_PATH" >&6; }
43780  fi
43781
43782        if test "x$FOUND_FREETYPE" != xyes; then
43783          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
43784        fi
43785      else
43786        # User specified only one of lib or include. This is an error.
43787        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
43788          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
43789$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
43790          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43791        else
43792          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
43793$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
43794          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43795        fi
43796      fi
43797    else
43798      # User did not specify settings, but we need freetype. Try to locate it.
43799
43800      if test "x$BUNDLE_FREETYPE" = x; then
43801        # If not specified, default is to bundle freetype only on windows
43802        if test "x$OPENJDK_TARGET_OS" = xwindows; then
43803          BUNDLE_FREETYPE=yes
43804        else
43805          BUNDLE_FREETYPE=no
43806        fi
43807      fi
43808
43809      if test "x$FOUND_FREETYPE" != xyes; then
43810        # Check builddeps
43811
43812
43813  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43814    # Source the builddeps file again, to make sure it uses the latest variables!
43815    . $builddepsfile
43816    # Look for a target and build machine specific resource!
43817    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43818    if test "x$resource" = x; then
43819      # Ok, lets instead look for a target specific resource
43820      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
43821    fi
43822    if test "x$resource" = x; then
43823      # Ok, lets instead look for a build specific resource
43824      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
43825    fi
43826    if test "x$resource" = x; then
43827      # Ok, lets instead look for a generic resource
43828      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
43829      resource=${builddep_freetype2}
43830    fi
43831    if test "x$resource" != x; then
43832      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
43833$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
43834      # If the resource in the builddeps.conf file is an existing directory,
43835      # for example /java/linux/cups
43836      if test -d ${resource}; then
43837        depdir=${resource}
43838      else
43839
43840  # freetype2 is for example mymodule
43841  # $resource is for example libs/general/libmymod_1_2_3.zip
43842  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43843  # $with_builddeps_dir is for example /localhome/builddeps
43844  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43845  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43846  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43847  filename=`basename $resource`
43848  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43849  filebase=${filename%%.*}
43850  extension=${filename#*.}
43851  installdir=$with_builddeps_dir/$filebase
43852  if test ! -f $installdir/$filename.unpacked; then
43853    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
43854$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43855    if test ! -d $installdir; then
43856      mkdir -p $installdir
43857    fi
43858    if test ! -d $installdir; then
43859      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43860    fi
43861    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
43862    touch $tmpfile
43863    if test ! -f $tmpfile; then
43864      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43865    fi
43866
43867  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43868  # $tmpfile is the local file name for the downloaded file.
43869  VALID_TOOL=no
43870  if test "x$BDEPS_FTP" = xwget; then
43871    VALID_TOOL=yes
43872    wget -O $tmpfile $with_builddeps_server/$resource
43873  fi
43874  if test "x$BDEPS_FTP" = xlftp; then
43875    VALID_TOOL=yes
43876    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43877  fi
43878  if test "x$BDEPS_FTP" = xftp; then
43879    VALID_TOOL=yes
43880    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43881    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43882    FTPUSERPWD=${FTPSERVER%%@*}
43883    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43884      FTPUSER=${userpwd%%:*}
43885      FTPPWD=${userpwd#*@}
43886      FTPSERVER=${FTPSERVER#*@}
43887    else
43888      FTPUSER=ftp
43889      FTPPWD=ftp
43890    fi
43891    # the "pass" command does not work on some
43892    # ftp clients (read ftp.exe) but if it works,
43893    # passive mode is better!
43894    ( \
43895        echo "user $FTPUSER $FTPPWD"        ; \
43896        echo "pass"                         ; \
43897        echo "bin"                          ; \
43898        echo "get $FTPPATH $tmpfile"              ; \
43899    ) | ftp -in $FTPSERVER
43900  fi
43901  if test "x$VALID_TOOL" != xyes; then
43902    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43903  fi
43904
43905    mv $tmpfile $installdir/$filename
43906    if test ! -s $installdir/$filename; then
43907      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43908    fi
43909    case "$extension" in
43910      zip)  echo "Unzipping $installdir/$filename..."
43911        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43912        ;;
43913      tar.gz) echo "Untaring $installdir/$filename..."
43914        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43915        ;;
43916      tgz) echo "Untaring $installdir/$filename..."
43917        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43918        ;;
43919      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43920        ;;
43921    esac
43922  fi
43923  if test -f $installdir/$filename.unpacked; then
43924    depdir=$installdir
43925  fi
43926
43927      fi
43928      # Source the builddeps file again, because in the previous command, the depdir
43929      # was updated to point at the current build dependency install directory.
43930      . $builddepsfile
43931      # Now extract variables from the builddeps.conf files.
43932      theroot=${builddep_freetype2_ROOT}
43933      thecflags=${builddep_freetype2_CFLAGS}
43934      thelibs=${builddep_freetype2_LIBS}
43935      if test "x$depdir" = x; then
43936        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
43937      fi
43938      FREETYPE=$depdir
43939      if test "x$theroot" != x; then
43940        FREETYPE="$theroot"
43941      fi
43942      if test "x$thecflags" != x; then
43943        FREETYPE_CFLAGS="$thecflags"
43944      fi
43945      if test "x$thelibs" != x; then
43946        FREETYPE_LIBS="$thelibs"
43947      fi
43948      FOUND_FREETYPE=yes
43949      else FOUND_FREETYPE=no
43950
43951    fi
43952    else FOUND_FREETYPE=no
43953
43954  fi
43955
43956        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
43957        if test "x$FOUND_FREETYPE" = xyes; then
43958          if test "x$BUNDLE_FREETYPE" = xyes; then
43959            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
43960$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
43961            FOUND_FREETYPE=no
43962          else
43963            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
43964$as_echo_n "checking for freetype... " >&6; }
43965            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
43966$as_echo "yes (using builddeps)" >&6; }
43967          fi
43968        fi
43969      fi
43970
43971      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
43972      if test "x$SYSROOT" = x; then
43973        if test "x$FOUND_FREETYPE" != xyes; then
43974          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
43975          if test "x$PKG_CONFIG" != x; then
43976
43977pkg_failed=no
43978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
43979$as_echo_n "checking for FREETYPE... " >&6; }
43980
43981if test -n "$FREETYPE_CFLAGS"; then
43982    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
43983 elif test -n "$PKG_CONFIG"; then
43984    if test -n "$PKG_CONFIG" && \
43985    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43986  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43987  ac_status=$?
43988  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43989  test $ac_status = 0; }; then
43990  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
43991else
43992  pkg_failed=yes
43993fi
43994 else
43995    pkg_failed=untried
43996fi
43997if test -n "$FREETYPE_LIBS"; then
43998    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
43999 elif test -n "$PKG_CONFIG"; then
44000    if test -n "$PKG_CONFIG" && \
44001    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44002  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44003  ac_status=$?
44004  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44005  test $ac_status = 0; }; then
44006  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
44007else
44008  pkg_failed=yes
44009fi
44010 else
44011    pkg_failed=untried
44012fi
44013
44014
44015
44016if test $pkg_failed = yes; then
44017
44018if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
44019        _pkg_short_errors_supported=yes
44020else
44021        _pkg_short_errors_supported=no
44022fi
44023        if test $_pkg_short_errors_supported = yes; then
44024	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
44025        else
44026	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
44027        fi
44028	# Put the nasty error message in config.log where it belongs
44029	echo "$FREETYPE_PKG_ERRORS" >&5
44030
44031	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44032$as_echo "no" >&6; }
44033                FOUND_FREETYPE=no
44034elif test $pkg_failed = untried; then
44035	FOUND_FREETYPE=no
44036else
44037	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
44038	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
44039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44040$as_echo "yes" >&6; }
44041	FOUND_FREETYPE=yes
44042fi
44043            if test "x$FOUND_FREETYPE" = xyes; then
44044              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
44045              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
44046              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
44047              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
44048                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
44049              fi
44050              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44051              if test "x$BUNDLE_FREETYPE" = xyes; then
44052                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
44053$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
44054                FOUND_FREETYPE=no
44055              else
44056                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44057$as_echo_n "checking for freetype... " >&6; }
44058                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
44059$as_echo "yes (using pkg-config)" >&6; }
44060              fi
44061            fi
44062          fi
44063        fi
44064      fi
44065
44066      if test "x$FOUND_FREETYPE" != xyes; then
44067        # Check in well-known locations
44068        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44069          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
44070
44071  windows_path="$FREETYPE_BASE_DIR"
44072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44073    unix_path=`$CYGPATH -u "$windows_path"`
44074    FREETYPE_BASE_DIR="$unix_path"
44075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44077    FREETYPE_BASE_DIR="$unix_path"
44078  fi
44079
44080
44081  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44082  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44083  METHOD="well-known location"
44084
44085  # First check if the files exists.
44086  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44087    # We found an arbitrary include file. That's a good sign.
44088    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44089$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44090    FOUND_FREETYPE=yes
44091
44092    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44093    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44094      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44095$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44096      FOUND_FREETYPE=no
44097    else
44098      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44099        # On Windows, we will need both .lib and .dll file.
44100        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44101          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44102$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44103          FOUND_FREETYPE=no
44104        fi
44105      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
44106        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44107        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44108      fi
44109    fi
44110  fi
44111
44112  if test "x$FOUND_FREETYPE" = xyes; then
44113
44114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44115
44116  # Input might be given as Windows format, start by converting to
44117  # unix format.
44118  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44119  new_path=`$CYGPATH -u "$path"`
44120
44121  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44122  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44123  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44124  # "foo.exe" is OK but "foo" is an error.
44125  #
44126  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44127  # It is also a way to make sure we got the proper file name for the real test later on.
44128  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44129  if test "x$test_shortpath" = x; then
44130    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44131$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44132    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44133  fi
44134
44135  # Call helper function which possibly converts this using DOS-style short mode.
44136  # If so, the updated path is stored in $new_path.
44137
44138  input_path="$new_path"
44139  # Check if we need to convert this using DOS-style short mode. If the path
44140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44141  # take no chances and rewrite it.
44142  # Note: m4 eats our [], so we need to use [ and ] instead.
44143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44144  if test "x$has_forbidden_chars" != x; then
44145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44146    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44147    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44148    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44149      # Going to short mode and back again did indeed matter. Since short mode is
44150      # case insensitive, let's make it lowercase to improve readability.
44151      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44152      # Now convert it back to Unix-stile (cygpath)
44153      input_path=`$CYGPATH -u "$shortmode_path"`
44154      new_path="$input_path"
44155    fi
44156  fi
44157
44158  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44159  if test "x$test_cygdrive_prefix" = x; then
44160    # As a simple fix, exclude /usr/bin since it's not a real path.
44161    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44162      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44163      # a path prefixed by /cygdrive for fixpath to work.
44164      new_path="$CYGWIN_ROOT_PATH$input_path"
44165    fi
44166  fi
44167
44168
44169  if test "x$path" != "x$new_path"; then
44170    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44172$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44173  fi
44174
44175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44176
44177  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44178  has_colon=`$ECHO $path | $GREP ^.:`
44179  new_path="$path"
44180  if test "x$has_colon" = x; then
44181    # Not in mixed or Windows style, start by that.
44182    new_path=`cmd //c echo $path`
44183  fi
44184
44185
44186  input_path="$new_path"
44187  # Check if we need to convert this using DOS-style short mode. If the path
44188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44189  # take no chances and rewrite it.
44190  # Note: m4 eats our [], so we need to use [ and ] instead.
44191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44192  if test "x$has_forbidden_chars" != x; then
44193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44195  fi
44196
44197
44198  windows_path="$new_path"
44199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44200    unix_path=`$CYGPATH -u "$windows_path"`
44201    new_path="$unix_path"
44202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44204    new_path="$unix_path"
44205  fi
44206
44207  if test "x$path" != "x$new_path"; then
44208    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44210$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44211  fi
44212
44213  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44214  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44215
44216  else
44217    # We're on a posix platform. Hooray! :)
44218    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44219    has_space=`$ECHO "$path" | $GREP " "`
44220    if test "x$has_space" != x; then
44221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44222$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44223      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44224    fi
44225
44226    # Use eval to expand a potential ~
44227    eval path="$path"
44228    if test ! -f "$path" && test ! -d "$path"; then
44229      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44230    fi
44231
44232    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44233  fi
44234
44235
44236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44237
44238  # Input might be given as Windows format, start by converting to
44239  # unix format.
44240  path="$POTENTIAL_FREETYPE_LIB_PATH"
44241  new_path=`$CYGPATH -u "$path"`
44242
44243  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44244  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44245  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44246  # "foo.exe" is OK but "foo" is an error.
44247  #
44248  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44249  # It is also a way to make sure we got the proper file name for the real test later on.
44250  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44251  if test "x$test_shortpath" = x; then
44252    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44253$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44254    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44255  fi
44256
44257  # Call helper function which possibly converts this using DOS-style short mode.
44258  # If so, the updated path is stored in $new_path.
44259
44260  input_path="$new_path"
44261  # Check if we need to convert this using DOS-style short mode. If the path
44262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44263  # take no chances and rewrite it.
44264  # Note: m4 eats our [], so we need to use [ and ] instead.
44265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44266  if test "x$has_forbidden_chars" != x; then
44267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44268    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44269    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44270    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44271      # Going to short mode and back again did indeed matter. Since short mode is
44272      # case insensitive, let's make it lowercase to improve readability.
44273      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44274      # Now convert it back to Unix-stile (cygpath)
44275      input_path=`$CYGPATH -u "$shortmode_path"`
44276      new_path="$input_path"
44277    fi
44278  fi
44279
44280  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44281  if test "x$test_cygdrive_prefix" = x; then
44282    # As a simple fix, exclude /usr/bin since it's not a real path.
44283    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44284      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44285      # a path prefixed by /cygdrive for fixpath to work.
44286      new_path="$CYGWIN_ROOT_PATH$input_path"
44287    fi
44288  fi
44289
44290
44291  if test "x$path" != "x$new_path"; then
44292    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44294$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44295  fi
44296
44297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44298
44299  path="$POTENTIAL_FREETYPE_LIB_PATH"
44300  has_colon=`$ECHO $path | $GREP ^.:`
44301  new_path="$path"
44302  if test "x$has_colon" = x; then
44303    # Not in mixed or Windows style, start by that.
44304    new_path=`cmd //c echo $path`
44305  fi
44306
44307
44308  input_path="$new_path"
44309  # Check if we need to convert this using DOS-style short mode. If the path
44310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44311  # take no chances and rewrite it.
44312  # Note: m4 eats our [], so we need to use [ and ] instead.
44313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44314  if test "x$has_forbidden_chars" != x; then
44315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44317  fi
44318
44319
44320  windows_path="$new_path"
44321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44322    unix_path=`$CYGPATH -u "$windows_path"`
44323    new_path="$unix_path"
44324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44326    new_path="$unix_path"
44327  fi
44328
44329  if test "x$path" != "x$new_path"; then
44330    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44332$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44333  fi
44334
44335  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44336  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44337
44338  else
44339    # We're on a posix platform. Hooray! :)
44340    path="$POTENTIAL_FREETYPE_LIB_PATH"
44341    has_space=`$ECHO "$path" | $GREP " "`
44342    if test "x$has_space" != x; then
44343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44344$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44345      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44346    fi
44347
44348    # Use eval to expand a potential ~
44349    eval path="$path"
44350    if test ! -f "$path" && test ! -d "$path"; then
44351      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44352    fi
44353
44354    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44355  fi
44356
44357
44358    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44359    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44360$as_echo_n "checking for freetype includes... " >&6; }
44361    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44362$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44363    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44364    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44365$as_echo_n "checking for freetype libraries... " >&6; }
44366    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44367$as_echo "$FREETYPE_LIB_PATH" >&6; }
44368  fi
44369
44370          if test "x$FOUND_FREETYPE" != xyes; then
44371            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44372
44373  windows_path="$FREETYPE_BASE_DIR"
44374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44375    unix_path=`$CYGPATH -u "$windows_path"`
44376    FREETYPE_BASE_DIR="$unix_path"
44377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44379    FREETYPE_BASE_DIR="$unix_path"
44380  fi
44381
44382
44383  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44384  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44385  METHOD="well-known location"
44386
44387  # First check if the files exists.
44388  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44389    # We found an arbitrary include file. That's a good sign.
44390    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44391$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44392    FOUND_FREETYPE=yes
44393
44394    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44395    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44396      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44397$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44398      FOUND_FREETYPE=no
44399    else
44400      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44401        # On Windows, we will need both .lib and .dll file.
44402        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44403          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44404$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44405          FOUND_FREETYPE=no
44406        fi
44407      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
44408        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44409        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44410      fi
44411    fi
44412  fi
44413
44414  if test "x$FOUND_FREETYPE" = xyes; then
44415
44416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44417
44418  # Input might be given as Windows format, start by converting to
44419  # unix format.
44420  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44421  new_path=`$CYGPATH -u "$path"`
44422
44423  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44424  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44425  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44426  # "foo.exe" is OK but "foo" is an error.
44427  #
44428  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44429  # It is also a way to make sure we got the proper file name for the real test later on.
44430  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44431  if test "x$test_shortpath" = x; then
44432    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44433$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44434    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44435  fi
44436
44437  # Call helper function which possibly converts this using DOS-style short mode.
44438  # If so, the updated path is stored in $new_path.
44439
44440  input_path="$new_path"
44441  # Check if we need to convert this using DOS-style short mode. If the path
44442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44443  # take no chances and rewrite it.
44444  # Note: m4 eats our [], so we need to use [ and ] instead.
44445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44446  if test "x$has_forbidden_chars" != x; then
44447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44448    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44449    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44450    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44451      # Going to short mode and back again did indeed matter. Since short mode is
44452      # case insensitive, let's make it lowercase to improve readability.
44453      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44454      # Now convert it back to Unix-stile (cygpath)
44455      input_path=`$CYGPATH -u "$shortmode_path"`
44456      new_path="$input_path"
44457    fi
44458  fi
44459
44460  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44461  if test "x$test_cygdrive_prefix" = x; then
44462    # As a simple fix, exclude /usr/bin since it's not a real path.
44463    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44464      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44465      # a path prefixed by /cygdrive for fixpath to work.
44466      new_path="$CYGWIN_ROOT_PATH$input_path"
44467    fi
44468  fi
44469
44470
44471  if test "x$path" != "x$new_path"; then
44472    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44473    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44474$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44475  fi
44476
44477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44478
44479  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44480  has_colon=`$ECHO $path | $GREP ^.:`
44481  new_path="$path"
44482  if test "x$has_colon" = x; then
44483    # Not in mixed or Windows style, start by that.
44484    new_path=`cmd //c echo $path`
44485  fi
44486
44487
44488  input_path="$new_path"
44489  # Check if we need to convert this using DOS-style short mode. If the path
44490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44491  # take no chances and rewrite it.
44492  # Note: m4 eats our [], so we need to use [ and ] instead.
44493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44494  if test "x$has_forbidden_chars" != x; then
44495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44496    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44497  fi
44498
44499
44500  windows_path="$new_path"
44501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44502    unix_path=`$CYGPATH -u "$windows_path"`
44503    new_path="$unix_path"
44504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44506    new_path="$unix_path"
44507  fi
44508
44509  if test "x$path" != "x$new_path"; then
44510    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44512$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44513  fi
44514
44515  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44516  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44517
44518  else
44519    # We're on a posix platform. Hooray! :)
44520    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44521    has_space=`$ECHO "$path" | $GREP " "`
44522    if test "x$has_space" != x; then
44523      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44524$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44525      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44526    fi
44527
44528    # Use eval to expand a potential ~
44529    eval path="$path"
44530    if test ! -f "$path" && test ! -d "$path"; then
44531      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44532    fi
44533
44534    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44535  fi
44536
44537
44538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44539
44540  # Input might be given as Windows format, start by converting to
44541  # unix format.
44542  path="$POTENTIAL_FREETYPE_LIB_PATH"
44543  new_path=`$CYGPATH -u "$path"`
44544
44545  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44546  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44547  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44548  # "foo.exe" is OK but "foo" is an error.
44549  #
44550  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44551  # It is also a way to make sure we got the proper file name for the real test later on.
44552  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44553  if test "x$test_shortpath" = x; then
44554    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44555$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44556    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44557  fi
44558
44559  # Call helper function which possibly converts this using DOS-style short mode.
44560  # If so, the updated path is stored in $new_path.
44561
44562  input_path="$new_path"
44563  # Check if we need to convert this using DOS-style short mode. If the path
44564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44565  # take no chances and rewrite it.
44566  # Note: m4 eats our [], so we need to use [ and ] instead.
44567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44568  if test "x$has_forbidden_chars" != x; then
44569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44570    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44571    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44572    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44573      # Going to short mode and back again did indeed matter. Since short mode is
44574      # case insensitive, let's make it lowercase to improve readability.
44575      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44576      # Now convert it back to Unix-stile (cygpath)
44577      input_path=`$CYGPATH -u "$shortmode_path"`
44578      new_path="$input_path"
44579    fi
44580  fi
44581
44582  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44583  if test "x$test_cygdrive_prefix" = x; then
44584    # As a simple fix, exclude /usr/bin since it's not a real path.
44585    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44586      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44587      # a path prefixed by /cygdrive for fixpath to work.
44588      new_path="$CYGWIN_ROOT_PATH$input_path"
44589    fi
44590  fi
44591
44592
44593  if test "x$path" != "x$new_path"; then
44594    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44596$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44597  fi
44598
44599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44600
44601  path="$POTENTIAL_FREETYPE_LIB_PATH"
44602  has_colon=`$ECHO $path | $GREP ^.:`
44603  new_path="$path"
44604  if test "x$has_colon" = x; then
44605    # Not in mixed or Windows style, start by that.
44606    new_path=`cmd //c echo $path`
44607  fi
44608
44609
44610  input_path="$new_path"
44611  # Check if we need to convert this using DOS-style short mode. If the path
44612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44613  # take no chances and rewrite it.
44614  # Note: m4 eats our [], so we need to use [ and ] instead.
44615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44616  if test "x$has_forbidden_chars" != x; then
44617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44619  fi
44620
44621
44622  windows_path="$new_path"
44623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44624    unix_path=`$CYGPATH -u "$windows_path"`
44625    new_path="$unix_path"
44626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44628    new_path="$unix_path"
44629  fi
44630
44631  if test "x$path" != "x$new_path"; then
44632    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44634$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44635  fi
44636
44637  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44638  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44639
44640  else
44641    # We're on a posix platform. Hooray! :)
44642    path="$POTENTIAL_FREETYPE_LIB_PATH"
44643    has_space=`$ECHO "$path" | $GREP " "`
44644    if test "x$has_space" != x; then
44645      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44646$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44647      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44648    fi
44649
44650    # Use eval to expand a potential ~
44651    eval path="$path"
44652    if test ! -f "$path" && test ! -d "$path"; then
44653      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44654    fi
44655
44656    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44657  fi
44658
44659
44660    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44661    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44662$as_echo_n "checking for freetype includes... " >&6; }
44663    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44664$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44665    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44666    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44667$as_echo_n "checking for freetype libraries... " >&6; }
44668    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44669$as_echo "$FREETYPE_LIB_PATH" >&6; }
44670  fi
44671
44672          fi
44673        else
44674          FREETYPE_BASE_DIR="$SYSROOT/usr"
44675
44676  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44677  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44678  METHOD="well-known location"
44679
44680  # First check if the files exists.
44681  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44682    # We found an arbitrary include file. That's a good sign.
44683    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44684$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44685    FOUND_FREETYPE=yes
44686
44687    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44688    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44689      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44690$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44691      FOUND_FREETYPE=no
44692    else
44693      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44694        # On Windows, we will need both .lib and .dll file.
44695        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44696          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44697$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44698          FOUND_FREETYPE=no
44699        fi
44700      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
44701        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44702        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44703      fi
44704    fi
44705  fi
44706
44707  if test "x$FOUND_FREETYPE" = xyes; then
44708
44709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44710
44711  # Input might be given as Windows format, start by converting to
44712  # unix format.
44713  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44714  new_path=`$CYGPATH -u "$path"`
44715
44716  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44717  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44718  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44719  # "foo.exe" is OK but "foo" is an error.
44720  #
44721  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44722  # It is also a way to make sure we got the proper file name for the real test later on.
44723  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44724  if test "x$test_shortpath" = x; then
44725    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44726$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44727    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44728  fi
44729
44730  # Call helper function which possibly converts this using DOS-style short mode.
44731  # If so, the updated path is stored in $new_path.
44732
44733  input_path="$new_path"
44734  # Check if we need to convert this using DOS-style short mode. If the path
44735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44736  # take no chances and rewrite it.
44737  # Note: m4 eats our [], so we need to use [ and ] instead.
44738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44739  if test "x$has_forbidden_chars" != x; then
44740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44741    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44742    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44743    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44744      # Going to short mode and back again did indeed matter. Since short mode is
44745      # case insensitive, let's make it lowercase to improve readability.
44746      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44747      # Now convert it back to Unix-stile (cygpath)
44748      input_path=`$CYGPATH -u "$shortmode_path"`
44749      new_path="$input_path"
44750    fi
44751  fi
44752
44753  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44754  if test "x$test_cygdrive_prefix" = x; then
44755    # As a simple fix, exclude /usr/bin since it's not a real path.
44756    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44757      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44758      # a path prefixed by /cygdrive for fixpath to work.
44759      new_path="$CYGWIN_ROOT_PATH$input_path"
44760    fi
44761  fi
44762
44763
44764  if test "x$path" != "x$new_path"; then
44765    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44767$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44768  fi
44769
44770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44771
44772  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44773  has_colon=`$ECHO $path | $GREP ^.:`
44774  new_path="$path"
44775  if test "x$has_colon" = x; then
44776    # Not in mixed or Windows style, start by that.
44777    new_path=`cmd //c echo $path`
44778  fi
44779
44780
44781  input_path="$new_path"
44782  # Check if we need to convert this using DOS-style short mode. If the path
44783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44784  # take no chances and rewrite it.
44785  # Note: m4 eats our [], so we need to use [ and ] instead.
44786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44787  if test "x$has_forbidden_chars" != x; then
44788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44789    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44790  fi
44791
44792
44793  windows_path="$new_path"
44794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44795    unix_path=`$CYGPATH -u "$windows_path"`
44796    new_path="$unix_path"
44797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44799    new_path="$unix_path"
44800  fi
44801
44802  if test "x$path" != "x$new_path"; then
44803    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44805$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44806  fi
44807
44808  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44809  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44810
44811  else
44812    # We're on a posix platform. Hooray! :)
44813    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44814    has_space=`$ECHO "$path" | $GREP " "`
44815    if test "x$has_space" != x; then
44816      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44817$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44818      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44819    fi
44820
44821    # Use eval to expand a potential ~
44822    eval path="$path"
44823    if test ! -f "$path" && test ! -d "$path"; then
44824      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44825    fi
44826
44827    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44828  fi
44829
44830
44831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44832
44833  # Input might be given as Windows format, start by converting to
44834  # unix format.
44835  path="$POTENTIAL_FREETYPE_LIB_PATH"
44836  new_path=`$CYGPATH -u "$path"`
44837
44838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44841  # "foo.exe" is OK but "foo" is an error.
44842  #
44843  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44844  # It is also a way to make sure we got the proper file name for the real test later on.
44845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44846  if test "x$test_shortpath" = x; then
44847    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44848$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44849    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44850  fi
44851
44852  # Call helper function which possibly converts this using DOS-style short mode.
44853  # If so, the updated path is stored in $new_path.
44854
44855  input_path="$new_path"
44856  # Check if we need to convert this using DOS-style short mode. If the path
44857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44858  # take no chances and rewrite it.
44859  # Note: m4 eats our [], so we need to use [ and ] instead.
44860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44861  if test "x$has_forbidden_chars" != x; then
44862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44866      # Going to short mode and back again did indeed matter. Since short mode is
44867      # case insensitive, let's make it lowercase to improve readability.
44868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44869      # Now convert it back to Unix-stile (cygpath)
44870      input_path=`$CYGPATH -u "$shortmode_path"`
44871      new_path="$input_path"
44872    fi
44873  fi
44874
44875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44876  if test "x$test_cygdrive_prefix" = x; then
44877    # As a simple fix, exclude /usr/bin since it's not a real path.
44878    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44880      # a path prefixed by /cygdrive for fixpath to work.
44881      new_path="$CYGWIN_ROOT_PATH$input_path"
44882    fi
44883  fi
44884
44885
44886  if test "x$path" != "x$new_path"; then
44887    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44889$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44890  fi
44891
44892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44893
44894  path="$POTENTIAL_FREETYPE_LIB_PATH"
44895  has_colon=`$ECHO $path | $GREP ^.:`
44896  new_path="$path"
44897  if test "x$has_colon" = x; then
44898    # Not in mixed or Windows style, start by that.
44899    new_path=`cmd //c echo $path`
44900  fi
44901
44902
44903  input_path="$new_path"
44904  # Check if we need to convert this using DOS-style short mode. If the path
44905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44906  # take no chances and rewrite it.
44907  # Note: m4 eats our [], so we need to use [ and ] instead.
44908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44909  if test "x$has_forbidden_chars" != x; then
44910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44912  fi
44913
44914
44915  windows_path="$new_path"
44916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44917    unix_path=`$CYGPATH -u "$windows_path"`
44918    new_path="$unix_path"
44919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44921    new_path="$unix_path"
44922  fi
44923
44924  if test "x$path" != "x$new_path"; then
44925    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44927$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44928  fi
44929
44930  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44931  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44932
44933  else
44934    # We're on a posix platform. Hooray! :)
44935    path="$POTENTIAL_FREETYPE_LIB_PATH"
44936    has_space=`$ECHO "$path" | $GREP " "`
44937    if test "x$has_space" != x; then
44938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44939$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44940      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44941    fi
44942
44943    # Use eval to expand a potential ~
44944    eval path="$path"
44945    if test ! -f "$path" && test ! -d "$path"; then
44946      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44947    fi
44948
44949    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44950  fi
44951
44952
44953    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44954    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44955$as_echo_n "checking for freetype includes... " >&6; }
44956    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44957$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44958    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44959    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44960$as_echo_n "checking for freetype libraries... " >&6; }
44961    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44962$as_echo "$FREETYPE_LIB_PATH" >&6; }
44963  fi
44964
44965
44966          if test "x$FOUND_FREETYPE" != xyes; then
44967            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
44968
44969  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44970  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44971  METHOD="well-known location"
44972
44973  # First check if the files exists.
44974  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44975    # We found an arbitrary include file. That's a good sign.
44976    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44977$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44978    FOUND_FREETYPE=yes
44979
44980    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44981    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44982      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44983$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44984      FOUND_FREETYPE=no
44985    else
44986      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44987        # On Windows, we will need both .lib and .dll file.
44988        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44989          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44990$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44991          FOUND_FREETYPE=no
44992        fi
44993      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
44994        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44995        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44996      fi
44997    fi
44998  fi
44999
45000  if test "x$FOUND_FREETYPE" = xyes; then
45001
45002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45003
45004  # Input might be given as Windows format, start by converting to
45005  # unix format.
45006  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45007  new_path=`$CYGPATH -u "$path"`
45008
45009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45012  # "foo.exe" is OK but "foo" is an error.
45013  #
45014  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45015  # It is also a way to make sure we got the proper file name for the real test later on.
45016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45017  if test "x$test_shortpath" = x; then
45018    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45019$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45020    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45021  fi
45022
45023  # Call helper function which possibly converts this using DOS-style short mode.
45024  # If so, the updated path is stored in $new_path.
45025
45026  input_path="$new_path"
45027  # Check if we need to convert this using DOS-style short mode. If the path
45028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45029  # take no chances and rewrite it.
45030  # Note: m4 eats our [], so we need to use [ and ] instead.
45031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45032  if test "x$has_forbidden_chars" != x; then
45033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45037      # Going to short mode and back again did indeed matter. Since short mode is
45038      # case insensitive, let's make it lowercase to improve readability.
45039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45040      # Now convert it back to Unix-stile (cygpath)
45041      input_path=`$CYGPATH -u "$shortmode_path"`
45042      new_path="$input_path"
45043    fi
45044  fi
45045
45046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45047  if test "x$test_cygdrive_prefix" = x; then
45048    # As a simple fix, exclude /usr/bin since it's not a real path.
45049    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45051      # a path prefixed by /cygdrive for fixpath to work.
45052      new_path="$CYGWIN_ROOT_PATH$input_path"
45053    fi
45054  fi
45055
45056
45057  if test "x$path" != "x$new_path"; then
45058    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45060$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45061  fi
45062
45063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45064
45065  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45066  has_colon=`$ECHO $path | $GREP ^.:`
45067  new_path="$path"
45068  if test "x$has_colon" = x; then
45069    # Not in mixed or Windows style, start by that.
45070    new_path=`cmd //c echo $path`
45071  fi
45072
45073
45074  input_path="$new_path"
45075  # Check if we need to convert this using DOS-style short mode. If the path
45076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45077  # take no chances and rewrite it.
45078  # Note: m4 eats our [], so we need to use [ and ] instead.
45079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45080  if test "x$has_forbidden_chars" != x; then
45081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45082    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45083  fi
45084
45085
45086  windows_path="$new_path"
45087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45088    unix_path=`$CYGPATH -u "$windows_path"`
45089    new_path="$unix_path"
45090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45092    new_path="$unix_path"
45093  fi
45094
45095  if test "x$path" != "x$new_path"; then
45096    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45098$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45099  fi
45100
45101  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45102  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45103
45104  else
45105    # We're on a posix platform. Hooray! :)
45106    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45107    has_space=`$ECHO "$path" | $GREP " "`
45108    if test "x$has_space" != x; then
45109      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45110$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45111      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45112    fi
45113
45114    # Use eval to expand a potential ~
45115    eval path="$path"
45116    if test ! -f "$path" && test ! -d "$path"; then
45117      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45118    fi
45119
45120    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45121  fi
45122
45123
45124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45125
45126  # Input might be given as Windows format, start by converting to
45127  # unix format.
45128  path="$POTENTIAL_FREETYPE_LIB_PATH"
45129  new_path=`$CYGPATH -u "$path"`
45130
45131  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45132  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45133  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45134  # "foo.exe" is OK but "foo" is an error.
45135  #
45136  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45137  # It is also a way to make sure we got the proper file name for the real test later on.
45138  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45139  if test "x$test_shortpath" = x; then
45140    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45141$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45142    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45143  fi
45144
45145  # Call helper function which possibly converts this using DOS-style short mode.
45146  # If so, the updated path is stored in $new_path.
45147
45148  input_path="$new_path"
45149  # Check if we need to convert this using DOS-style short mode. If the path
45150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45151  # take no chances and rewrite it.
45152  # Note: m4 eats our [], so we need to use [ and ] instead.
45153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45154  if test "x$has_forbidden_chars" != x; then
45155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45156    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45157    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45158    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45159      # Going to short mode and back again did indeed matter. Since short mode is
45160      # case insensitive, let's make it lowercase to improve readability.
45161      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45162      # Now convert it back to Unix-stile (cygpath)
45163      input_path=`$CYGPATH -u "$shortmode_path"`
45164      new_path="$input_path"
45165    fi
45166  fi
45167
45168  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45169  if test "x$test_cygdrive_prefix" = x; then
45170    # As a simple fix, exclude /usr/bin since it's not a real path.
45171    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45172      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45173      # a path prefixed by /cygdrive for fixpath to work.
45174      new_path="$CYGWIN_ROOT_PATH$input_path"
45175    fi
45176  fi
45177
45178
45179  if test "x$path" != "x$new_path"; then
45180    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45181    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45182$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45183  fi
45184
45185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45186
45187  path="$POTENTIAL_FREETYPE_LIB_PATH"
45188  has_colon=`$ECHO $path | $GREP ^.:`
45189  new_path="$path"
45190  if test "x$has_colon" = x; then
45191    # Not in mixed or Windows style, start by that.
45192    new_path=`cmd //c echo $path`
45193  fi
45194
45195
45196  input_path="$new_path"
45197  # Check if we need to convert this using DOS-style short mode. If the path
45198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45199  # take no chances and rewrite it.
45200  # Note: m4 eats our [], so we need to use [ and ] instead.
45201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45202  if test "x$has_forbidden_chars" != x; then
45203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45204    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45205  fi
45206
45207
45208  windows_path="$new_path"
45209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45210    unix_path=`$CYGPATH -u "$windows_path"`
45211    new_path="$unix_path"
45212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45214    new_path="$unix_path"
45215  fi
45216
45217  if test "x$path" != "x$new_path"; then
45218    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45220$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45221  fi
45222
45223  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45224  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45225
45226  else
45227    # We're on a posix platform. Hooray! :)
45228    path="$POTENTIAL_FREETYPE_LIB_PATH"
45229    has_space=`$ECHO "$path" | $GREP " "`
45230    if test "x$has_space" != x; then
45231      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45232$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45233      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45234    fi
45235
45236    # Use eval to expand a potential ~
45237    eval path="$path"
45238    if test ! -f "$path" && test ! -d "$path"; then
45239      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45240    fi
45241
45242    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45243  fi
45244
45245
45246    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45247    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45248$as_echo_n "checking for freetype includes... " >&6; }
45249    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45250$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45251    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45252    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45253$as_echo_n "checking for freetype libraries... " >&6; }
45254    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45255$as_echo "$FREETYPE_LIB_PATH" >&6; }
45256  fi
45257
45258          fi
45259
45260          if test "x$FOUND_FREETYPE" != xyes; then
45261            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
45262
45263  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45264  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45265  METHOD="well-known location"
45266
45267  # First check if the files exists.
45268  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45269    # We found an arbitrary include file. That's a good sign.
45270    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45271$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45272    FOUND_FREETYPE=yes
45273
45274    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45275    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45276      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45277$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45278      FOUND_FREETYPE=no
45279    else
45280      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45281        # On Windows, we will need both .lib and .dll file.
45282        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45283          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45284$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45285          FOUND_FREETYPE=no
45286        fi
45287      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
45288        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45289        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45290      fi
45291    fi
45292  fi
45293
45294  if test "x$FOUND_FREETYPE" = xyes; then
45295
45296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45297
45298  # Input might be given as Windows format, start by converting to
45299  # unix format.
45300  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45301  new_path=`$CYGPATH -u "$path"`
45302
45303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45306  # "foo.exe" is OK but "foo" is an error.
45307  #
45308  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45309  # It is also a way to make sure we got the proper file name for the real test later on.
45310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45311  if test "x$test_shortpath" = x; then
45312    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45313$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45314    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45315  fi
45316
45317  # Call helper function which possibly converts this using DOS-style short mode.
45318  # If so, the updated path is stored in $new_path.
45319
45320  input_path="$new_path"
45321  # Check if we need to convert this using DOS-style short mode. If the path
45322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45323  # take no chances and rewrite it.
45324  # Note: m4 eats our [], so we need to use [ and ] instead.
45325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45326  if test "x$has_forbidden_chars" != x; then
45327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45331      # Going to short mode and back again did indeed matter. Since short mode is
45332      # case insensitive, let's make it lowercase to improve readability.
45333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45334      # Now convert it back to Unix-stile (cygpath)
45335      input_path=`$CYGPATH -u "$shortmode_path"`
45336      new_path="$input_path"
45337    fi
45338  fi
45339
45340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45341  if test "x$test_cygdrive_prefix" = x; then
45342    # As a simple fix, exclude /usr/bin since it's not a real path.
45343    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45345      # a path prefixed by /cygdrive for fixpath to work.
45346      new_path="$CYGWIN_ROOT_PATH$input_path"
45347    fi
45348  fi
45349
45350
45351  if test "x$path" != "x$new_path"; then
45352    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45354$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45355  fi
45356
45357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45358
45359  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45360  has_colon=`$ECHO $path | $GREP ^.:`
45361  new_path="$path"
45362  if test "x$has_colon" = x; then
45363    # Not in mixed or Windows style, start by that.
45364    new_path=`cmd //c echo $path`
45365  fi
45366
45367
45368  input_path="$new_path"
45369  # Check if we need to convert this using DOS-style short mode. If the path
45370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45371  # take no chances and rewrite it.
45372  # Note: m4 eats our [], so we need to use [ and ] instead.
45373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45374  if test "x$has_forbidden_chars" != x; then
45375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45376    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45377  fi
45378
45379
45380  windows_path="$new_path"
45381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45382    unix_path=`$CYGPATH -u "$windows_path"`
45383    new_path="$unix_path"
45384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45386    new_path="$unix_path"
45387  fi
45388
45389  if test "x$path" != "x$new_path"; then
45390    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45392$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45393  fi
45394
45395  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45396  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45397
45398  else
45399    # We're on a posix platform. Hooray! :)
45400    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45401    has_space=`$ECHO "$path" | $GREP " "`
45402    if test "x$has_space" != x; then
45403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45404$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45405      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45406    fi
45407
45408    # Use eval to expand a potential ~
45409    eval path="$path"
45410    if test ! -f "$path" && test ! -d "$path"; then
45411      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45412    fi
45413
45414    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45415  fi
45416
45417
45418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45419
45420  # Input might be given as Windows format, start by converting to
45421  # unix format.
45422  path="$POTENTIAL_FREETYPE_LIB_PATH"
45423  new_path=`$CYGPATH -u "$path"`
45424
45425  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45426  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45427  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45428  # "foo.exe" is OK but "foo" is an error.
45429  #
45430  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45431  # It is also a way to make sure we got the proper file name for the real test later on.
45432  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45433  if test "x$test_shortpath" = x; then
45434    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45435$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45436    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45437  fi
45438
45439  # Call helper function which possibly converts this using DOS-style short mode.
45440  # If so, the updated path is stored in $new_path.
45441
45442  input_path="$new_path"
45443  # Check if we need to convert this using DOS-style short mode. If the path
45444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45445  # take no chances and rewrite it.
45446  # Note: m4 eats our [], so we need to use [ and ] instead.
45447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45448  if test "x$has_forbidden_chars" != x; then
45449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45450    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45451    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45452    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45453      # Going to short mode and back again did indeed matter. Since short mode is
45454      # case insensitive, let's make it lowercase to improve readability.
45455      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45456      # Now convert it back to Unix-stile (cygpath)
45457      input_path=`$CYGPATH -u "$shortmode_path"`
45458      new_path="$input_path"
45459    fi
45460  fi
45461
45462  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45463  if test "x$test_cygdrive_prefix" = x; then
45464    # As a simple fix, exclude /usr/bin since it's not a real path.
45465    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45466      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45467      # a path prefixed by /cygdrive for fixpath to work.
45468      new_path="$CYGWIN_ROOT_PATH$input_path"
45469    fi
45470  fi
45471
45472
45473  if test "x$path" != "x$new_path"; then
45474    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45475    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45476$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45477  fi
45478
45479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45480
45481  path="$POTENTIAL_FREETYPE_LIB_PATH"
45482  has_colon=`$ECHO $path | $GREP ^.:`
45483  new_path="$path"
45484  if test "x$has_colon" = x; then
45485    # Not in mixed or Windows style, start by that.
45486    new_path=`cmd //c echo $path`
45487  fi
45488
45489
45490  input_path="$new_path"
45491  # Check if we need to convert this using DOS-style short mode. If the path
45492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45493  # take no chances and rewrite it.
45494  # Note: m4 eats our [], so we need to use [ and ] instead.
45495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45496  if test "x$has_forbidden_chars" != x; then
45497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45498    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45499  fi
45500
45501
45502  windows_path="$new_path"
45503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45504    unix_path=`$CYGPATH -u "$windows_path"`
45505    new_path="$unix_path"
45506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45508    new_path="$unix_path"
45509  fi
45510
45511  if test "x$path" != "x$new_path"; then
45512    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45513    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45514$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45515  fi
45516
45517  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45518  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45519
45520  else
45521    # We're on a posix platform. Hooray! :)
45522    path="$POTENTIAL_FREETYPE_LIB_PATH"
45523    has_space=`$ECHO "$path" | $GREP " "`
45524    if test "x$has_space" != x; then
45525      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45526$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45527      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45528    fi
45529
45530    # Use eval to expand a potential ~
45531    eval path="$path"
45532    if test ! -f "$path" && test ! -d "$path"; then
45533      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45534    fi
45535
45536    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45537  fi
45538
45539
45540    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45541    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45542$as_echo_n "checking for freetype includes... " >&6; }
45543    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45544$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45545    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45546    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45547$as_echo_n "checking for freetype libraries... " >&6; }
45548    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45549$as_echo "$FREETYPE_LIB_PATH" >&6; }
45550  fi
45551
45552          fi
45553
45554          if test "x$FOUND_FREETYPE" != xyes; then
45555            FREETYPE_BASE_DIR="$SYSROOT/usr"
45556            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45557
45558  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45559  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
45560  METHOD="well-known location"
45561
45562  # First check if the files exists.
45563  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45564    # We found an arbitrary include file. That's a good sign.
45565    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45566$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45567    FOUND_FREETYPE=yes
45568
45569    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45570    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45571      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45572$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45573      FOUND_FREETYPE=no
45574    else
45575      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45576        # On Windows, we will need both .lib and .dll file.
45577        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45578          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45579$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45580          FOUND_FREETYPE=no
45581        fi
45582      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
45583        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45584        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45585      fi
45586    fi
45587  fi
45588
45589  if test "x$FOUND_FREETYPE" = xyes; then
45590
45591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45592
45593  # Input might be given as Windows format, start by converting to
45594  # unix format.
45595  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45596  new_path=`$CYGPATH -u "$path"`
45597
45598  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45599  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45600  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45601  # "foo.exe" is OK but "foo" is an error.
45602  #
45603  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45604  # It is also a way to make sure we got the proper file name for the real test later on.
45605  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45606  if test "x$test_shortpath" = x; then
45607    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45608$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45609    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45610  fi
45611
45612  # Call helper function which possibly converts this using DOS-style short mode.
45613  # If so, the updated path is stored in $new_path.
45614
45615  input_path="$new_path"
45616  # Check if we need to convert this using DOS-style short mode. If the path
45617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45618  # take no chances and rewrite it.
45619  # Note: m4 eats our [], so we need to use [ and ] instead.
45620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45621  if test "x$has_forbidden_chars" != x; then
45622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45626      # Going to short mode and back again did indeed matter. Since short mode is
45627      # case insensitive, let's make it lowercase to improve readability.
45628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45629      # Now convert it back to Unix-stile (cygpath)
45630      input_path=`$CYGPATH -u "$shortmode_path"`
45631      new_path="$input_path"
45632    fi
45633  fi
45634
45635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45636  if test "x$test_cygdrive_prefix" = x; then
45637    # As a simple fix, exclude /usr/bin since it's not a real path.
45638    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45640      # a path prefixed by /cygdrive for fixpath to work.
45641      new_path="$CYGWIN_ROOT_PATH$input_path"
45642    fi
45643  fi
45644
45645
45646  if test "x$path" != "x$new_path"; then
45647    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45649$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45650  fi
45651
45652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45653
45654  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45655  has_colon=`$ECHO $path | $GREP ^.:`
45656  new_path="$path"
45657  if test "x$has_colon" = x; then
45658    # Not in mixed or Windows style, start by that.
45659    new_path=`cmd //c echo $path`
45660  fi
45661
45662
45663  input_path="$new_path"
45664  # Check if we need to convert this using DOS-style short mode. If the path
45665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45666  # take no chances and rewrite it.
45667  # Note: m4 eats our [], so we need to use [ and ] instead.
45668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45669  if test "x$has_forbidden_chars" != x; then
45670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45671    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45672  fi
45673
45674
45675  windows_path="$new_path"
45676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45677    unix_path=`$CYGPATH -u "$windows_path"`
45678    new_path="$unix_path"
45679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45681    new_path="$unix_path"
45682  fi
45683
45684  if test "x$path" != "x$new_path"; then
45685    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45687$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45688  fi
45689
45690  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45691  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45692
45693  else
45694    # We're on a posix platform. Hooray! :)
45695    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45696    has_space=`$ECHO "$path" | $GREP " "`
45697    if test "x$has_space" != x; then
45698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45699$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45700      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45701    fi
45702
45703    # Use eval to expand a potential ~
45704    eval path="$path"
45705    if test ! -f "$path" && test ! -d "$path"; then
45706      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45707    fi
45708
45709    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45710  fi
45711
45712
45713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45714
45715  # Input might be given as Windows format, start by converting to
45716  # unix format.
45717  path="$POTENTIAL_FREETYPE_LIB_PATH"
45718  new_path=`$CYGPATH -u "$path"`
45719
45720  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45721  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45722  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45723  # "foo.exe" is OK but "foo" is an error.
45724  #
45725  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45726  # It is also a way to make sure we got the proper file name for the real test later on.
45727  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45728  if test "x$test_shortpath" = x; then
45729    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45730$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45731    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45732  fi
45733
45734  # Call helper function which possibly converts this using DOS-style short mode.
45735  # If so, the updated path is stored in $new_path.
45736
45737  input_path="$new_path"
45738  # Check if we need to convert this using DOS-style short mode. If the path
45739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45740  # take no chances and rewrite it.
45741  # Note: m4 eats our [], so we need to use [ and ] instead.
45742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45743  if test "x$has_forbidden_chars" != x; then
45744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45748      # Going to short mode and back again did indeed matter. Since short mode is
45749      # case insensitive, let's make it lowercase to improve readability.
45750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45751      # Now convert it back to Unix-stile (cygpath)
45752      input_path=`$CYGPATH -u "$shortmode_path"`
45753      new_path="$input_path"
45754    fi
45755  fi
45756
45757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45758  if test "x$test_cygdrive_prefix" = x; then
45759    # As a simple fix, exclude /usr/bin since it's not a real path.
45760    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45762      # a path prefixed by /cygdrive for fixpath to work.
45763      new_path="$CYGWIN_ROOT_PATH$input_path"
45764    fi
45765  fi
45766
45767
45768  if test "x$path" != "x$new_path"; then
45769    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45771$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45772  fi
45773
45774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45775
45776  path="$POTENTIAL_FREETYPE_LIB_PATH"
45777  has_colon=`$ECHO $path | $GREP ^.:`
45778  new_path="$path"
45779  if test "x$has_colon" = x; then
45780    # Not in mixed or Windows style, start by that.
45781    new_path=`cmd //c echo $path`
45782  fi
45783
45784
45785  input_path="$new_path"
45786  # Check if we need to convert this using DOS-style short mode. If the path
45787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45788  # take no chances and rewrite it.
45789  # Note: m4 eats our [], so we need to use [ and ] instead.
45790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45791  if test "x$has_forbidden_chars" != x; then
45792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45793    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45794  fi
45795
45796
45797  windows_path="$new_path"
45798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45799    unix_path=`$CYGPATH -u "$windows_path"`
45800    new_path="$unix_path"
45801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45803    new_path="$unix_path"
45804  fi
45805
45806  if test "x$path" != "x$new_path"; then
45807    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45809$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45810  fi
45811
45812  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45813  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45814
45815  else
45816    # We're on a posix platform. Hooray! :)
45817    path="$POTENTIAL_FREETYPE_LIB_PATH"
45818    has_space=`$ECHO "$path" | $GREP " "`
45819    if test "x$has_space" != x; then
45820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45821$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45822      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45823    fi
45824
45825    # Use eval to expand a potential ~
45826    eval path="$path"
45827    if test ! -f "$path" && test ! -d "$path"; then
45828      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45829    fi
45830
45831    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45832  fi
45833
45834
45835    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45836    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45837$as_echo_n "checking for freetype includes... " >&6; }
45838    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45839$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45840    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45841    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45842$as_echo_n "checking for freetype libraries... " >&6; }
45843    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45844$as_echo "$FREETYPE_LIB_PATH" >&6; }
45845  fi
45846
45847            else
45848
45849  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45850  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
45851  METHOD="well-known location"
45852
45853  # First check if the files exists.
45854  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45855    # We found an arbitrary include file. That's a good sign.
45856    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45857$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45858    FOUND_FREETYPE=yes
45859
45860    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45861    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45862      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45863$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45864      FOUND_FREETYPE=no
45865    else
45866      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45867        # On Windows, we will need both .lib and .dll file.
45868        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45869          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45870$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45871          FOUND_FREETYPE=no
45872        fi
45873      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
45874        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45875        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45876      fi
45877    fi
45878  fi
45879
45880  if test "x$FOUND_FREETYPE" = xyes; then
45881
45882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45883
45884  # Input might be given as Windows format, start by converting to
45885  # unix format.
45886  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45887  new_path=`$CYGPATH -u "$path"`
45888
45889  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45890  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45891  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45892  # "foo.exe" is OK but "foo" is an error.
45893  #
45894  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45895  # It is also a way to make sure we got the proper file name for the real test later on.
45896  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45897  if test "x$test_shortpath" = x; then
45898    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45899$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45900    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45901  fi
45902
45903  # Call helper function which possibly converts this using DOS-style short mode.
45904  # If so, the updated path is stored in $new_path.
45905
45906  input_path="$new_path"
45907  # Check if we need to convert this using DOS-style short mode. If the path
45908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45909  # take no chances and rewrite it.
45910  # Note: m4 eats our [], so we need to use [ and ] instead.
45911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45912  if test "x$has_forbidden_chars" != x; then
45913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45914    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45915    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45916    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45917      # Going to short mode and back again did indeed matter. Since short mode is
45918      # case insensitive, let's make it lowercase to improve readability.
45919      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45920      # Now convert it back to Unix-stile (cygpath)
45921      input_path=`$CYGPATH -u "$shortmode_path"`
45922      new_path="$input_path"
45923    fi
45924  fi
45925
45926  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45927  if test "x$test_cygdrive_prefix" = x; then
45928    # As a simple fix, exclude /usr/bin since it's not a real path.
45929    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45930      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45931      # a path prefixed by /cygdrive for fixpath to work.
45932      new_path="$CYGWIN_ROOT_PATH$input_path"
45933    fi
45934  fi
45935
45936
45937  if test "x$path" != "x$new_path"; then
45938    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45939    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45940$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45941  fi
45942
45943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45944
45945  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45946  has_colon=`$ECHO $path | $GREP ^.:`
45947  new_path="$path"
45948  if test "x$has_colon" = x; then
45949    # Not in mixed or Windows style, start by that.
45950    new_path=`cmd //c echo $path`
45951  fi
45952
45953
45954  input_path="$new_path"
45955  # Check if we need to convert this using DOS-style short mode. If the path
45956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45957  # take no chances and rewrite it.
45958  # Note: m4 eats our [], so we need to use [ and ] instead.
45959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45960  if test "x$has_forbidden_chars" != x; then
45961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45962    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45963  fi
45964
45965
45966  windows_path="$new_path"
45967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45968    unix_path=`$CYGPATH -u "$windows_path"`
45969    new_path="$unix_path"
45970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45972    new_path="$unix_path"
45973  fi
45974
45975  if test "x$path" != "x$new_path"; then
45976    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45977    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45978$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45979  fi
45980
45981  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45982  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45983
45984  else
45985    # We're on a posix platform. Hooray! :)
45986    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45987    has_space=`$ECHO "$path" | $GREP " "`
45988    if test "x$has_space" != x; then
45989      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45990$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45991      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45992    fi
45993
45994    # Use eval to expand a potential ~
45995    eval path="$path"
45996    if test ! -f "$path" && test ! -d "$path"; then
45997      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45998    fi
45999
46000    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46001  fi
46002
46003
46004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46005
46006  # Input might be given as Windows format, start by converting to
46007  # unix format.
46008  path="$POTENTIAL_FREETYPE_LIB_PATH"
46009  new_path=`$CYGPATH -u "$path"`
46010
46011  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46012  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46013  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46014  # "foo.exe" is OK but "foo" is an error.
46015  #
46016  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46017  # It is also a way to make sure we got the proper file name for the real test later on.
46018  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46019  if test "x$test_shortpath" = x; then
46020    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46021$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46022    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46023  fi
46024
46025  # Call helper function which possibly converts this using DOS-style short mode.
46026  # If so, the updated path is stored in $new_path.
46027
46028  input_path="$new_path"
46029  # Check if we need to convert this using DOS-style short mode. If the path
46030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46031  # take no chances and rewrite it.
46032  # Note: m4 eats our [], so we need to use [ and ] instead.
46033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46034  if test "x$has_forbidden_chars" != x; then
46035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46036    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46037    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46038    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46039      # Going to short mode and back again did indeed matter. Since short mode is
46040      # case insensitive, let's make it lowercase to improve readability.
46041      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46042      # Now convert it back to Unix-stile (cygpath)
46043      input_path=`$CYGPATH -u "$shortmode_path"`
46044      new_path="$input_path"
46045    fi
46046  fi
46047
46048  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46049  if test "x$test_cygdrive_prefix" = x; then
46050    # As a simple fix, exclude /usr/bin since it's not a real path.
46051    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46052      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46053      # a path prefixed by /cygdrive for fixpath to work.
46054      new_path="$CYGWIN_ROOT_PATH$input_path"
46055    fi
46056  fi
46057
46058
46059  if test "x$path" != "x$new_path"; then
46060    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46062$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46063  fi
46064
46065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46066
46067  path="$POTENTIAL_FREETYPE_LIB_PATH"
46068  has_colon=`$ECHO $path | $GREP ^.:`
46069  new_path="$path"
46070  if test "x$has_colon" = x; then
46071    # Not in mixed or Windows style, start by that.
46072    new_path=`cmd //c echo $path`
46073  fi
46074
46075
46076  input_path="$new_path"
46077  # Check if we need to convert this using DOS-style short mode. If the path
46078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46079  # take no chances and rewrite it.
46080  # Note: m4 eats our [], so we need to use [ and ] instead.
46081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46082  if test "x$has_forbidden_chars" != x; then
46083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46084    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46085  fi
46086
46087
46088  windows_path="$new_path"
46089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46090    unix_path=`$CYGPATH -u "$windows_path"`
46091    new_path="$unix_path"
46092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46094    new_path="$unix_path"
46095  fi
46096
46097  if test "x$path" != "x$new_path"; then
46098    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46099    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46100$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46101  fi
46102
46103  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46104  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46105
46106  else
46107    # We're on a posix platform. Hooray! :)
46108    path="$POTENTIAL_FREETYPE_LIB_PATH"
46109    has_space=`$ECHO "$path" | $GREP " "`
46110    if test "x$has_space" != x; then
46111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46112$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46113      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46114    fi
46115
46116    # Use eval to expand a potential ~
46117    eval path="$path"
46118    if test ! -f "$path" && test ! -d "$path"; then
46119      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46120    fi
46121
46122    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46123  fi
46124
46125
46126    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46127    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46128$as_echo_n "checking for freetype includes... " >&6; }
46129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46130$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46131    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46132    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46133$as_echo_n "checking for freetype libraries... " >&6; }
46134    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46135$as_echo "$FREETYPE_LIB_PATH" >&6; }
46136  fi
46137
46138              if test "x$FOUND_FREETYPE" != xyes; then
46139
46140  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46141  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
46142  METHOD="well-known location"
46143
46144  # First check if the files exists.
46145  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46146    # We found an arbitrary include file. That's a good sign.
46147    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46148$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46149    FOUND_FREETYPE=yes
46150
46151    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46152    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46153      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46154$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46155      FOUND_FREETYPE=no
46156    else
46157      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46158        # On Windows, we will need both .lib and .dll file.
46159        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46160          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46161$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46162          FOUND_FREETYPE=no
46163        fi
46164      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
46165        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
46166        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
46167      fi
46168    fi
46169  fi
46170
46171  if test "x$FOUND_FREETYPE" = xyes; then
46172
46173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46174
46175  # Input might be given as Windows format, start by converting to
46176  # unix format.
46177  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46178  new_path=`$CYGPATH -u "$path"`
46179
46180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46183  # "foo.exe" is OK but "foo" is an error.
46184  #
46185  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46186  # It is also a way to make sure we got the proper file name for the real test later on.
46187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46188  if test "x$test_shortpath" = x; then
46189    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46190$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46191    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46192  fi
46193
46194  # Call helper function which possibly converts this using DOS-style short mode.
46195  # If so, the updated path is stored in $new_path.
46196
46197  input_path="$new_path"
46198  # Check if we need to convert this using DOS-style short mode. If the path
46199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46200  # take no chances and rewrite it.
46201  # Note: m4 eats our [], so we need to use [ and ] instead.
46202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46203  if test "x$has_forbidden_chars" != x; then
46204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46208      # Going to short mode and back again did indeed matter. Since short mode is
46209      # case insensitive, let's make it lowercase to improve readability.
46210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46211      # Now convert it back to Unix-stile (cygpath)
46212      input_path=`$CYGPATH -u "$shortmode_path"`
46213      new_path="$input_path"
46214    fi
46215  fi
46216
46217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46218  if test "x$test_cygdrive_prefix" = x; then
46219    # As a simple fix, exclude /usr/bin since it's not a real path.
46220    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46222      # a path prefixed by /cygdrive for fixpath to work.
46223      new_path="$CYGWIN_ROOT_PATH$input_path"
46224    fi
46225  fi
46226
46227
46228  if test "x$path" != "x$new_path"; then
46229    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46231$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46232  fi
46233
46234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46235
46236  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46237  has_colon=`$ECHO $path | $GREP ^.:`
46238  new_path="$path"
46239  if test "x$has_colon" = x; then
46240    # Not in mixed or Windows style, start by that.
46241    new_path=`cmd //c echo $path`
46242  fi
46243
46244
46245  input_path="$new_path"
46246  # Check if we need to convert this using DOS-style short mode. If the path
46247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46248  # take no chances and rewrite it.
46249  # Note: m4 eats our [], so we need to use [ and ] instead.
46250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46251  if test "x$has_forbidden_chars" != x; then
46252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46254  fi
46255
46256
46257  windows_path="$new_path"
46258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46259    unix_path=`$CYGPATH -u "$windows_path"`
46260    new_path="$unix_path"
46261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46263    new_path="$unix_path"
46264  fi
46265
46266  if test "x$path" != "x$new_path"; then
46267    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46269$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46270  fi
46271
46272  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46273  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46274
46275  else
46276    # We're on a posix platform. Hooray! :)
46277    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46278    has_space=`$ECHO "$path" | $GREP " "`
46279    if test "x$has_space" != x; then
46280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46281$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46282      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46283    fi
46284
46285    # Use eval to expand a potential ~
46286    eval path="$path"
46287    if test ! -f "$path" && test ! -d "$path"; then
46288      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46289    fi
46290
46291    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46292  fi
46293
46294
46295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46296
46297  # Input might be given as Windows format, start by converting to
46298  # unix format.
46299  path="$POTENTIAL_FREETYPE_LIB_PATH"
46300  new_path=`$CYGPATH -u "$path"`
46301
46302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46305  # "foo.exe" is OK but "foo" is an error.
46306  #
46307  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46308  # It is also a way to make sure we got the proper file name for the real test later on.
46309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46310  if test "x$test_shortpath" = x; then
46311    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46312$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46313    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46314  fi
46315
46316  # Call helper function which possibly converts this using DOS-style short mode.
46317  # If so, the updated path is stored in $new_path.
46318
46319  input_path="$new_path"
46320  # Check if we need to convert this using DOS-style short mode. If the path
46321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46322  # take no chances and rewrite it.
46323  # Note: m4 eats our [], so we need to use [ and ] instead.
46324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46325  if test "x$has_forbidden_chars" != x; then
46326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46330      # Going to short mode and back again did indeed matter. Since short mode is
46331      # case insensitive, let's make it lowercase to improve readability.
46332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46333      # Now convert it back to Unix-stile (cygpath)
46334      input_path=`$CYGPATH -u "$shortmode_path"`
46335      new_path="$input_path"
46336    fi
46337  fi
46338
46339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46340  if test "x$test_cygdrive_prefix" = x; then
46341    # As a simple fix, exclude /usr/bin since it's not a real path.
46342    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46344      # a path prefixed by /cygdrive for fixpath to work.
46345      new_path="$CYGWIN_ROOT_PATH$input_path"
46346    fi
46347  fi
46348
46349
46350  if test "x$path" != "x$new_path"; then
46351    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46353$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46354  fi
46355
46356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46357
46358  path="$POTENTIAL_FREETYPE_LIB_PATH"
46359  has_colon=`$ECHO $path | $GREP ^.:`
46360  new_path="$path"
46361  if test "x$has_colon" = x; then
46362    # Not in mixed or Windows style, start by that.
46363    new_path=`cmd //c echo $path`
46364  fi
46365
46366
46367  input_path="$new_path"
46368  # Check if we need to convert this using DOS-style short mode. If the path
46369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46370  # take no chances and rewrite it.
46371  # Note: m4 eats our [], so we need to use [ and ] instead.
46372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46373  if test "x$has_forbidden_chars" != x; then
46374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46375    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46376  fi
46377
46378
46379  windows_path="$new_path"
46380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46381    unix_path=`$CYGPATH -u "$windows_path"`
46382    new_path="$unix_path"
46383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46385    new_path="$unix_path"
46386  fi
46387
46388  if test "x$path" != "x$new_path"; then
46389    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46390    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46391$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46392  fi
46393
46394  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46395  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46396
46397  else
46398    # We're on a posix platform. Hooray! :)
46399    path="$POTENTIAL_FREETYPE_LIB_PATH"
46400    has_space=`$ECHO "$path" | $GREP " "`
46401    if test "x$has_space" != x; then
46402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46403$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46404      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46405    fi
46406
46407    # Use eval to expand a potential ~
46408    eval path="$path"
46409    if test ! -f "$path" && test ! -d "$path"; then
46410      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46411    fi
46412
46413    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46414  fi
46415
46416
46417    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46418    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46419$as_echo_n "checking for freetype includes... " >&6; }
46420    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46421$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46422    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46423    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46424$as_echo_n "checking for freetype libraries... " >&6; }
46425    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46426$as_echo "$FREETYPE_LIB_PATH" >&6; }
46427  fi
46428
46429              fi
46430            fi
46431          fi
46432        fi
46433      fi # end check in well-known locations
46434
46435      if test "x$FOUND_FREETYPE" != xyes; then
46436
46437  # Print a helpful message on how to acquire the necessary build dependency.
46438  # freetype is the help tag: freetype, cups, pulse, alsa etc
46439  MISSING_DEPENDENCY=freetype
46440
46441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46442    cygwin_help $MISSING_DEPENDENCY
46443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46444    msys_help $MISSING_DEPENDENCY
46445  else
46446    PKGHANDLER_COMMAND=
46447
46448    case $PKGHANDLER in
46449      apt-get)
46450        apt_help     $MISSING_DEPENDENCY ;;
46451      yum)
46452        yum_help     $MISSING_DEPENDENCY ;;
46453      port)
46454        port_help    $MISSING_DEPENDENCY ;;
46455      pkgutil)
46456        pkgutil_help $MISSING_DEPENDENCY ;;
46457      pkgadd)
46458        pkgadd_help  $MISSING_DEPENDENCY ;;
46459    esac
46460
46461    if test "x$PKGHANDLER_COMMAND" != x; then
46462      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46463    fi
46464  fi
46465
46466        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
46467      fi
46468    fi # end user specified settings
46469
46470    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
46471    if test "x$FREETYPE_CFLAGS" = x; then
46472
46473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46474
46475  # Input might be given as Windows format, start by converting to
46476  # unix format.
46477  path="$FREETYPE_INCLUDE_PATH"
46478  new_path=`$CYGPATH -u "$path"`
46479
46480  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46481  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46482  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46483  # "foo.exe" is OK but "foo" is an error.
46484  #
46485  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46486  # It is also a way to make sure we got the proper file name for the real test later on.
46487  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46488  if test "x$test_shortpath" = x; then
46489    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46490$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46491    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
46492  fi
46493
46494  # Call helper function which possibly converts this using DOS-style short mode.
46495  # If so, the updated path is stored in $new_path.
46496
46497  input_path="$new_path"
46498  # Check if we need to convert this using DOS-style short mode. If the path
46499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46500  # take no chances and rewrite it.
46501  # Note: m4 eats our [], so we need to use [ and ] instead.
46502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46503  if test "x$has_forbidden_chars" != x; then
46504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46505    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46506    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46507    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46508      # Going to short mode and back again did indeed matter. Since short mode is
46509      # case insensitive, let's make it lowercase to improve readability.
46510      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46511      # Now convert it back to Unix-stile (cygpath)
46512      input_path=`$CYGPATH -u "$shortmode_path"`
46513      new_path="$input_path"
46514    fi
46515  fi
46516
46517  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46518  if test "x$test_cygdrive_prefix" = x; then
46519    # As a simple fix, exclude /usr/bin since it's not a real path.
46520    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46521      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46522      # a path prefixed by /cygdrive for fixpath to work.
46523      new_path="$CYGWIN_ROOT_PATH$input_path"
46524    fi
46525  fi
46526
46527
46528  if test "x$path" != "x$new_path"; then
46529    FREETYPE_INCLUDE_PATH="$new_path"
46530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46531$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46532  fi
46533
46534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46535
46536  path="$FREETYPE_INCLUDE_PATH"
46537  has_colon=`$ECHO $path | $GREP ^.:`
46538  new_path="$path"
46539  if test "x$has_colon" = x; then
46540    # Not in mixed or Windows style, start by that.
46541    new_path=`cmd //c echo $path`
46542  fi
46543
46544
46545  input_path="$new_path"
46546  # Check if we need to convert this using DOS-style short mode. If the path
46547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46548  # take no chances and rewrite it.
46549  # Note: m4 eats our [], so we need to use [ and ] instead.
46550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46551  if test "x$has_forbidden_chars" != x; then
46552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46553    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46554  fi
46555
46556
46557  windows_path="$new_path"
46558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46559    unix_path=`$CYGPATH -u "$windows_path"`
46560    new_path="$unix_path"
46561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46563    new_path="$unix_path"
46564  fi
46565
46566  if test "x$path" != "x$new_path"; then
46567    FREETYPE_INCLUDE_PATH="$new_path"
46568    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46569$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46570  fi
46571
46572  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46573  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46574
46575  else
46576    # We're on a posix platform. Hooray! :)
46577    path="$FREETYPE_INCLUDE_PATH"
46578    has_space=`$ECHO "$path" | $GREP " "`
46579    if test "x$has_space" != x; then
46580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46581$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46582      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46583    fi
46584
46585    # Use eval to expand a potential ~
46586    eval path="$path"
46587    if test ! -f "$path" && test ! -d "$path"; then
46588      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46589    fi
46590
46591    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46592  fi
46593
46594      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
46595        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
46596      else
46597        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
46598      fi
46599    fi
46600
46601    if test "x$FREETYPE_LIBS" = x; then
46602
46603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46604
46605  # Input might be given as Windows format, start by converting to
46606  # unix format.
46607  path="$FREETYPE_LIB_PATH"
46608  new_path=`$CYGPATH -u "$path"`
46609
46610  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46611  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46612  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46613  # "foo.exe" is OK but "foo" is an error.
46614  #
46615  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46616  # It is also a way to make sure we got the proper file name for the real test later on.
46617  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46618  if test "x$test_shortpath" = x; then
46619    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46620$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46621    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
46622  fi
46623
46624  # Call helper function which possibly converts this using DOS-style short mode.
46625  # If so, the updated path is stored in $new_path.
46626
46627  input_path="$new_path"
46628  # Check if we need to convert this using DOS-style short mode. If the path
46629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46630  # take no chances and rewrite it.
46631  # Note: m4 eats our [], so we need to use [ and ] instead.
46632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46633  if test "x$has_forbidden_chars" != x; then
46634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46635    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46636    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46637    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46638      # Going to short mode and back again did indeed matter. Since short mode is
46639      # case insensitive, let's make it lowercase to improve readability.
46640      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46641      # Now convert it back to Unix-stile (cygpath)
46642      input_path=`$CYGPATH -u "$shortmode_path"`
46643      new_path="$input_path"
46644    fi
46645  fi
46646
46647  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46648  if test "x$test_cygdrive_prefix" = x; then
46649    # As a simple fix, exclude /usr/bin since it's not a real path.
46650    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46651      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46652      # a path prefixed by /cygdrive for fixpath to work.
46653      new_path="$CYGWIN_ROOT_PATH$input_path"
46654    fi
46655  fi
46656
46657
46658  if test "x$path" != "x$new_path"; then
46659    FREETYPE_LIB_PATH="$new_path"
46660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46661$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46662  fi
46663
46664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46665
46666  path="$FREETYPE_LIB_PATH"
46667  has_colon=`$ECHO $path | $GREP ^.:`
46668  new_path="$path"
46669  if test "x$has_colon" = x; then
46670    # Not in mixed or Windows style, start by that.
46671    new_path=`cmd //c echo $path`
46672  fi
46673
46674
46675  input_path="$new_path"
46676  # Check if we need to convert this using DOS-style short mode. If the path
46677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46678  # take no chances and rewrite it.
46679  # Note: m4 eats our [], so we need to use [ and ] instead.
46680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46681  if test "x$has_forbidden_chars" != x; then
46682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46684  fi
46685
46686
46687  windows_path="$new_path"
46688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46689    unix_path=`$CYGPATH -u "$windows_path"`
46690    new_path="$unix_path"
46691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46693    new_path="$unix_path"
46694  fi
46695
46696  if test "x$path" != "x$new_path"; then
46697    FREETYPE_LIB_PATH="$new_path"
46698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46699$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46700  fi
46701
46702  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46703  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46704
46705  else
46706    # We're on a posix platform. Hooray! :)
46707    path="$FREETYPE_LIB_PATH"
46708    has_space=`$ECHO "$path" | $GREP " "`
46709    if test "x$has_space" != x; then
46710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46711$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46712      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46713    fi
46714
46715    # Use eval to expand a potential ~
46716    eval path="$path"
46717    if test ! -f "$path" && test ! -d "$path"; then
46718      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46719    fi
46720
46721    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46722  fi
46723
46724      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46725        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
46726      else
46727        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
46728      fi
46729    fi
46730
46731    # Try to compile it
46732    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
46733$as_echo_n "checking if we can compile and link with freetype... " >&6; }
46734    ac_ext=cpp
46735ac_cpp='$CXXCPP $CPPFLAGS'
46736ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46737ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46738ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46739
46740    PREV_CXXCFLAGS="$CXXFLAGS"
46741    PREV_LIBS="$LIBS"
46742    PREV_CXX="$CXX"
46743    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
46744    LIBS="$LIBS $FREETYPE_LIBS"
46745    CXX="$FIXPATH $CXX"
46746    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46747/* end confdefs.h.  */
46748
46749          #include<ft2build.h>
46750          #include FT_FREETYPE_H
46751          int main () {
46752            FT_Init_FreeType(NULL);
46753            return 0;
46754          }
46755
46756_ACEOF
46757if ac_fn_cxx_try_link "$LINENO"; then :
46758
46759          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46760$as_echo "yes" >&6; }
46761
46762else
46763
46764          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46765$as_echo "no" >&6; }
46766          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
46767$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
46768          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
46769$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
46770
46771
46772  # Print a helpful message on how to acquire the necessary build dependency.
46773  # freetype is the help tag: freetype, cups, pulse, alsa etc
46774  MISSING_DEPENDENCY=freetype
46775
46776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46777    cygwin_help $MISSING_DEPENDENCY
46778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46779    msys_help $MISSING_DEPENDENCY
46780  else
46781    PKGHANDLER_COMMAND=
46782
46783    case $PKGHANDLER in
46784      apt-get)
46785        apt_help     $MISSING_DEPENDENCY ;;
46786      yum)
46787        yum_help     $MISSING_DEPENDENCY ;;
46788      port)
46789        port_help    $MISSING_DEPENDENCY ;;
46790      pkgutil)
46791        pkgutil_help $MISSING_DEPENDENCY ;;
46792      pkgadd)
46793        pkgadd_help  $MISSING_DEPENDENCY ;;
46794    esac
46795
46796    if test "x$PKGHANDLER_COMMAND" != x; then
46797      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46798    fi
46799  fi
46800
46801
46802          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
46803
46804
46805fi
46806rm -f core conftest.err conftest.$ac_objext \
46807    conftest$ac_exeext conftest.$ac_ext
46808    CXXCFLAGS="$PREV_CXXFLAGS"
46809    LIBS="$PREV_LIBS"
46810    CXX="$PREV_CXX"
46811    ac_ext=cpp
46812ac_cpp='$CXXCPP $CPPFLAGS'
46813ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46814ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46815ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46816
46817
46818    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
46819$as_echo_n "checking if we should bundle freetype... " >&6; }
46820    if test "x$BUNDLE_FREETYPE" = xyes; then
46821      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
46822    fi
46823    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
46824$as_echo "$BUNDLE_FREETYPE" >&6; }
46825
46826  fi # end freetype needed
46827
46828
46829
46830
46831
46832
46833
46834  ###############################################################################
46835  #
46836  # Check for alsa headers and libraries. Used on Linux/GNU systems.
46837  #
46838
46839# Check whether --with-alsa was given.
46840if test "${with_alsa+set}" = set; then :
46841  withval=$with_alsa;
46842fi
46843
46844
46845# Check whether --with-alsa-include was given.
46846if test "${with_alsa_include+set}" = set; then :
46847  withval=$with_alsa_include;
46848fi
46849
46850
46851# Check whether --with-alsa-lib was given.
46852if test "${with_alsa_lib+set}" = set; then :
46853  withval=$with_alsa_lib;
46854fi
46855
46856
46857  if test "x$ALSA_NOT_NEEDED" = xyes; then
46858    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
46859      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
46860$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
46861    fi
46862    ALSA_CFLAGS=
46863    ALSA_LIBS=
46864  else
46865    ALSA_FOUND=no
46866
46867    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
46868      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
46869    fi
46870
46871    if test "x${with_alsa}" != x; then
46872      ALSA_LIBS="-L${with_alsa}/lib -lasound"
46873      ALSA_CFLAGS="-I${with_alsa}/include"
46874      ALSA_FOUND=yes
46875    fi
46876    if test "x${with_alsa_include}" != x; then
46877      ALSA_CFLAGS="-I${with_alsa_include}"
46878      ALSA_FOUND=yes
46879    fi
46880    if test "x${with_alsa_lib}" != x; then
46881      ALSA_LIBS="-L${with_alsa_lib} -lasound"
46882      ALSA_FOUND=yes
46883    fi
46884    if test "x$ALSA_FOUND" = xno; then
46885
46886
46887  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
46888    # Source the builddeps file again, to make sure it uses the latest variables!
46889    . $builddepsfile
46890    # Look for a target and build machine specific resource!
46891    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
46892    if test "x$resource" = x; then
46893      # Ok, lets instead look for a target specific resource
46894      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
46895    fi
46896    if test "x$resource" = x; then
46897      # Ok, lets instead look for a build specific resource
46898      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
46899    fi
46900    if test "x$resource" = x; then
46901      # Ok, lets instead look for a generic resource
46902      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
46903      resource=${builddep_alsa}
46904    fi
46905    if test "x$resource" != x; then
46906      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
46907$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
46908      # If the resource in the builddeps.conf file is an existing directory,
46909      # for example /java/linux/cups
46910      if test -d ${resource}; then
46911        depdir=${resource}
46912      else
46913
46914  # alsa is for example mymodule
46915  # $resource is for example libs/general/libmymod_1_2_3.zip
46916  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
46917  # $with_builddeps_dir is for example /localhome/builddeps
46918  # depdir is the name of the variable into which we store the depdir, eg MYMOD
46919  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
46920  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
46921  filename=`basename $resource`
46922  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
46923  filebase=${filename%%.*}
46924  extension=${filename#*.}
46925  installdir=$with_builddeps_dir/$filebase
46926  if test ! -f $installdir/$filename.unpacked; then
46927    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
46928$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
46929    if test ! -d $installdir; then
46930      mkdir -p $installdir
46931    fi
46932    if test ! -d $installdir; then
46933      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
46934    fi
46935    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
46936    touch $tmpfile
46937    if test ! -f $tmpfile; then
46938      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
46939    fi
46940
46941  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
46942  # $tmpfile is the local file name for the downloaded file.
46943  VALID_TOOL=no
46944  if test "x$BDEPS_FTP" = xwget; then
46945    VALID_TOOL=yes
46946    wget -O $tmpfile $with_builddeps_server/$resource
46947  fi
46948  if test "x$BDEPS_FTP" = xlftp; then
46949    VALID_TOOL=yes
46950    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
46951  fi
46952  if test "x$BDEPS_FTP" = xftp; then
46953    VALID_TOOL=yes
46954    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
46955    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
46956    FTPUSERPWD=${FTPSERVER%%@*}
46957    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
46958      FTPUSER=${userpwd%%:*}
46959      FTPPWD=${userpwd#*@}
46960      FTPSERVER=${FTPSERVER#*@}
46961    else
46962      FTPUSER=ftp
46963      FTPPWD=ftp
46964    fi
46965    # the "pass" command does not work on some
46966    # ftp clients (read ftp.exe) but if it works,
46967    # passive mode is better!
46968    ( \
46969        echo "user $FTPUSER $FTPPWD"        ; \
46970        echo "pass"                         ; \
46971        echo "bin"                          ; \
46972        echo "get $FTPPATH $tmpfile"              ; \
46973    ) | ftp -in $FTPSERVER
46974  fi
46975  if test "x$VALID_TOOL" != xyes; then
46976    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
46977  fi
46978
46979    mv $tmpfile $installdir/$filename
46980    if test ! -s $installdir/$filename; then
46981      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
46982    fi
46983    case "$extension" in
46984      zip)  echo "Unzipping $installdir/$filename..."
46985        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
46986        ;;
46987      tar.gz) echo "Untaring $installdir/$filename..."
46988        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46989        ;;
46990      tgz) echo "Untaring $installdir/$filename..."
46991        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46992        ;;
46993      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
46994        ;;
46995    esac
46996  fi
46997  if test -f $installdir/$filename.unpacked; then
46998    depdir=$installdir
46999  fi
47000
47001      fi
47002      # Source the builddeps file again, because in the previous command, the depdir
47003      # was updated to point at the current build dependency install directory.
47004      . $builddepsfile
47005      # Now extract variables from the builddeps.conf files.
47006      theroot=${builddep_alsa_ROOT}
47007      thecflags=${builddep_alsa_CFLAGS}
47008      thelibs=${builddep_alsa_LIBS}
47009      if test "x$depdir" = x; then
47010        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
47011      fi
47012      ALSA=$depdir
47013      if test "x$theroot" != x; then
47014        ALSA="$theroot"
47015      fi
47016      if test "x$thecflags" != x; then
47017        ALSA_CFLAGS="$thecflags"
47018      fi
47019      if test "x$thelibs" != x; then
47020        ALSA_LIBS="$thelibs"
47021      fi
47022      ALSA_FOUND=yes
47023      else ALSA_FOUND=no
47024
47025    fi
47026    else ALSA_FOUND=no
47027
47028  fi
47029
47030    fi
47031    # Do not try pkg-config if we have a sysroot set.
47032    if test "x$SYSROOT" = x; then
47033      if test "x$ALSA_FOUND" = xno; then
47034
47035pkg_failed=no
47036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
47037$as_echo_n "checking for ALSA... " >&6; }
47038
47039if test -n "$ALSA_CFLAGS"; then
47040    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
47041 elif test -n "$PKG_CONFIG"; then
47042    if test -n "$PKG_CONFIG" && \
47043    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47044  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47045  ac_status=$?
47046  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47047  test $ac_status = 0; }; then
47048  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
47049else
47050  pkg_failed=yes
47051fi
47052 else
47053    pkg_failed=untried
47054fi
47055if test -n "$ALSA_LIBS"; then
47056    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
47057 elif test -n "$PKG_CONFIG"; then
47058    if test -n "$PKG_CONFIG" && \
47059    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47060  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47061  ac_status=$?
47062  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47063  test $ac_status = 0; }; then
47064  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
47065else
47066  pkg_failed=yes
47067fi
47068 else
47069    pkg_failed=untried
47070fi
47071
47072
47073
47074if test $pkg_failed = yes; then
47075
47076if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47077        _pkg_short_errors_supported=yes
47078else
47079        _pkg_short_errors_supported=no
47080fi
47081        if test $_pkg_short_errors_supported = yes; then
47082	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
47083        else
47084	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
47085        fi
47086	# Put the nasty error message in config.log where it belongs
47087	echo "$ALSA_PKG_ERRORS" >&5
47088
47089	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47090$as_echo "no" >&6; }
47091                ALSA_FOUND=no
47092elif test $pkg_failed = untried; then
47093	ALSA_FOUND=no
47094else
47095	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
47096	ALSA_LIBS=$pkg_cv_ALSA_LIBS
47097        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47098$as_echo "yes" >&6; }
47099	ALSA_FOUND=yes
47100fi
47101      fi
47102    fi
47103    if test "x$ALSA_FOUND" = xno; then
47104      for ac_header in alsa/asoundlib.h
47105do :
47106  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
47107if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
47108  cat >>confdefs.h <<_ACEOF
47109#define HAVE_ALSA_ASOUNDLIB_H 1
47110_ACEOF
47111
47112            ALSA_FOUND=yes
47113            ALSA_CFLAGS=-Iignoreme
47114            ALSA_LIBS=-lasound
47115            DEFAULT_ALSA=yes
47116
47117else
47118  ALSA_FOUND=no
47119fi
47120
47121done
47122
47123    fi
47124    if test "x$ALSA_FOUND" = xno; then
47125
47126  # Print a helpful message on how to acquire the necessary build dependency.
47127  # alsa is the help tag: freetype, cups, pulse, alsa etc
47128  MISSING_DEPENDENCY=alsa
47129
47130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47131    cygwin_help $MISSING_DEPENDENCY
47132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47133    msys_help $MISSING_DEPENDENCY
47134  else
47135    PKGHANDLER_COMMAND=
47136
47137    case $PKGHANDLER in
47138      apt-get)
47139        apt_help     $MISSING_DEPENDENCY ;;
47140      yum)
47141        yum_help     $MISSING_DEPENDENCY ;;
47142      port)
47143        port_help    $MISSING_DEPENDENCY ;;
47144      pkgutil)
47145        pkgutil_help $MISSING_DEPENDENCY ;;
47146      pkgadd)
47147        pkgadd_help  $MISSING_DEPENDENCY ;;
47148    esac
47149
47150    if test "x$PKGHANDLER_COMMAND" != x; then
47151      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47152    fi
47153  fi
47154
47155      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
47156    fi
47157  fi
47158
47159
47160
47161
47162
47163
47164  ###############################################################################
47165  #
47166  # Check for the jpeg library
47167  #
47168
47169  USE_EXTERNAL_LIBJPEG=true
47170  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
47171$as_echo_n "checking for main in -ljpeg... " >&6; }
47172if ${ac_cv_lib_jpeg_main+:} false; then :
47173  $as_echo_n "(cached) " >&6
47174else
47175  ac_check_lib_save_LIBS=$LIBS
47176LIBS="-ljpeg  $LIBS"
47177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47178/* end confdefs.h.  */
47179
47180
47181int
47182main ()
47183{
47184return main ();
47185  ;
47186  return 0;
47187}
47188_ACEOF
47189if ac_fn_cxx_try_link "$LINENO"; then :
47190  ac_cv_lib_jpeg_main=yes
47191else
47192  ac_cv_lib_jpeg_main=no
47193fi
47194rm -f core conftest.err conftest.$ac_objext \
47195    conftest$ac_exeext conftest.$ac_ext
47196LIBS=$ac_check_lib_save_LIBS
47197fi
47198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
47199$as_echo "$ac_cv_lib_jpeg_main" >&6; }
47200if test "x$ac_cv_lib_jpeg_main" = xyes; then :
47201  cat >>confdefs.h <<_ACEOF
47202#define HAVE_LIBJPEG 1
47203_ACEOF
47204
47205  LIBS="-ljpeg $LIBS"
47206
47207else
47208   USE_EXTERNAL_LIBJPEG=false
47209      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
47210$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
47211
47212fi
47213
47214
47215
47216  ###############################################################################
47217  #
47218  # Check for the gif library
47219  #
47220
47221
47222# Check whether --with-giflib was given.
47223if test "${with_giflib+set}" = set; then :
47224  withval=$with_giflib;
47225fi
47226
47227
47228
47229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
47230$as_echo_n "checking for which giflib to use... " >&6; }
47231
47232  # default is bundled
47233  DEFAULT_GIFLIB=bundled
47234
47235  #
47236  # if user didn't specify, use DEFAULT_GIFLIB
47237  #
47238  if test "x${with_giflib}" = "x"; then
47239    with_giflib=${DEFAULT_GIFLIB}
47240  fi
47241
47242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
47243$as_echo "${with_giflib}" >&6; }
47244
47245  if test "x${with_giflib}" = "xbundled"; then
47246    USE_EXTERNAL_LIBGIF=false
47247  elif test "x${with_giflib}" = "xsystem"; then
47248    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
47249if test "x$ac_cv_header_gif_lib_h" = xyes; then :
47250
47251else
47252   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
47253fi
47254
47255
47256    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
47257$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
47258if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
47259  $as_echo_n "(cached) " >&6
47260else
47261  ac_check_lib_save_LIBS=$LIBS
47262LIBS="-lgif  $LIBS"
47263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47264/* end confdefs.h.  */
47265
47266/* Override any GCC internal prototype to avoid an error.
47267   Use char because int might match the return type of a GCC
47268   builtin and then its argument prototype would still apply.  */
47269#ifdef __cplusplus
47270extern "C"
47271#endif
47272char DGifGetCode ();
47273int
47274main ()
47275{
47276return DGifGetCode ();
47277  ;
47278  return 0;
47279}
47280_ACEOF
47281if ac_fn_cxx_try_link "$LINENO"; then :
47282  ac_cv_lib_gif_DGifGetCode=yes
47283else
47284  ac_cv_lib_gif_DGifGetCode=no
47285fi
47286rm -f core conftest.err conftest.$ac_objext \
47287    conftest$ac_exeext conftest.$ac_ext
47288LIBS=$ac_check_lib_save_LIBS
47289fi
47290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
47291$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
47292if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
47293  cat >>confdefs.h <<_ACEOF
47294#define HAVE_LIBGIF 1
47295_ACEOF
47296
47297  LIBS="-lgif $LIBS"
47298
47299else
47300   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
47301fi
47302
47303
47304    USE_EXTERNAL_LIBGIF=true
47305  else
47306    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
47307  fi
47308
47309
47310  ###############################################################################
47311  #
47312  # Check for the lcms2 library
47313  #
47314
47315
47316# Check whether --with-lcms was given.
47317if test "${with_lcms+set}" = set; then :
47318  withval=$with_lcms;
47319fi
47320
47321
47322  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
47323$as_echo_n "checking for which lcms to use... " >&6; }
47324
47325  DEFAULT_LCMS=bundled
47326
47327  #
47328  # If user didn't specify, use DEFAULT_LCMS
47329  #
47330  if test "x${with_lcms}" = "x"; then
47331      with_lcms=${DEFAULT_LCMS}
47332  fi
47333
47334  if test "x${with_lcms}" = "xbundled"; then
47335    USE_EXTERNAL_LCMS=false
47336    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47337$as_echo "bundled" >&6; }
47338  elif test "x${with_lcms}" = "xsystem"; then
47339    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47340$as_echo "system" >&6; }
47341
47342pkg_failed=no
47343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
47344$as_echo_n "checking for LCMS... " >&6; }
47345
47346if test -n "$LCMS_CFLAGS"; then
47347    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
47348 elif test -n "$PKG_CONFIG"; then
47349    if test -n "$PKG_CONFIG" && \
47350    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
47351  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
47352  ac_status=$?
47353  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47354  test $ac_status = 0; }; then
47355  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
47356else
47357  pkg_failed=yes
47358fi
47359 else
47360    pkg_failed=untried
47361fi
47362if test -n "$LCMS_LIBS"; then
47363    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
47364 elif test -n "$PKG_CONFIG"; then
47365    if test -n "$PKG_CONFIG" && \
47366    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
47367  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
47368  ac_status=$?
47369  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47370  test $ac_status = 0; }; then
47371  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
47372else
47373  pkg_failed=yes
47374fi
47375 else
47376    pkg_failed=untried
47377fi
47378
47379
47380
47381if test $pkg_failed = yes; then
47382
47383if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47384        _pkg_short_errors_supported=yes
47385else
47386        _pkg_short_errors_supported=no
47387fi
47388        if test $_pkg_short_errors_supported = yes; then
47389	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
47390        else
47391	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
47392        fi
47393	# Put the nasty error message in config.log where it belongs
47394	echo "$LCMS_PKG_ERRORS" >&5
47395
47396	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47397$as_echo "no" >&6; }
47398                LCMS_FOUND=no
47399elif test $pkg_failed = untried; then
47400	LCMS_FOUND=no
47401else
47402	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
47403	LCMS_LIBS=$pkg_cv_LCMS_LIBS
47404        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47405$as_echo "yes" >&6; }
47406	LCMS_FOUND=yes
47407fi
47408    if test "x${LCMS_FOUND}" = "xyes"; then
47409      USE_EXTERNAL_LCMS=true
47410    else
47411      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
47412    fi
47413  else
47414    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
47415  fi
47416
47417
47418
47419  ###############################################################################
47420  #
47421  # Check for the png library
47422  #
47423
47424
47425# Check whether --with-libpng was given.
47426if test "${with_libpng+set}" = set; then :
47427  withval=$with_libpng;
47428fi
47429
47430
47431
47432  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
47433$as_echo_n "checking for which libpng to use... " >&6; }
47434
47435  # default is bundled
47436  DEFAULT_LIBPNG=bundled
47437
47438  #
47439  # if user didn't specify, use DEFAULT_LIBPNG
47440  #
47441  if test "x${with_libpng}" = "x"; then
47442      with_libpng=${DEFAULT_LIBPNG}
47443  fi
47444
47445  if test "x${with_libpng}" = "xbundled"; then
47446      USE_EXTERNAL_LIBPNG=false
47447      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47448$as_echo "bundled" >&6; }
47449  elif test "x${with_libpng}" = "xsystem"; then
47450
47451pkg_failed=no
47452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
47453$as_echo_n "checking for PNG... " >&6; }
47454
47455if test -n "$PNG_CFLAGS"; then
47456    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
47457 elif test -n "$PKG_CONFIG"; then
47458    if test -n "$PKG_CONFIG" && \
47459    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
47460  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
47461  ac_status=$?
47462  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47463  test $ac_status = 0; }; then
47464  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
47465else
47466  pkg_failed=yes
47467fi
47468 else
47469    pkg_failed=untried
47470fi
47471if test -n "$PNG_LIBS"; then
47472    pkg_cv_PNG_LIBS="$PNG_LIBS"
47473 elif test -n "$PKG_CONFIG"; then
47474    if test -n "$PKG_CONFIG" && \
47475    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
47476  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
47477  ac_status=$?
47478  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47479  test $ac_status = 0; }; then
47480  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
47481else
47482  pkg_failed=yes
47483fi
47484 else
47485    pkg_failed=untried
47486fi
47487
47488
47489
47490if test $pkg_failed = yes; then
47491
47492if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47493        _pkg_short_errors_supported=yes
47494else
47495        _pkg_short_errors_supported=no
47496fi
47497        if test $_pkg_short_errors_supported = yes; then
47498	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
47499        else
47500	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
47501        fi
47502	# Put the nasty error message in config.log where it belongs
47503	echo "$PNG_PKG_ERRORS" >&5
47504
47505	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47506$as_echo "no" >&6; }
47507                 LIBPNG_FOUND=no
47508elif test $pkg_failed = untried; then
47509	 LIBPNG_FOUND=no
47510else
47511	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
47512	PNG_LIBS=$pkg_cv_PNG_LIBS
47513        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47514$as_echo "yes" >&6; }
47515	 LIBPNG_FOUND=yes
47516fi
47517      if test "x${LIBPNG_FOUND}" = "xyes"; then
47518          USE_EXTERNAL_LIBPNG=true
47519          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47520$as_echo "system" >&6; }
47521      else
47522          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47523$as_echo "system not found" >&6; }
47524          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
47525      fi
47526  else
47527      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
47528  fi
47529
47530
47531  ###############################################################################
47532  #
47533  # Check for the zlib library
47534  #
47535
47536
47537# Check whether --with-zlib was given.
47538if test "${with_zlib+set}" = set; then :
47539  withval=$with_zlib;
47540fi
47541
47542
47543  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
47544$as_echo_n "checking for compress in -lz... " >&6; }
47545if ${ac_cv_lib_z_compress+:} false; then :
47546  $as_echo_n "(cached) " >&6
47547else
47548  ac_check_lib_save_LIBS=$LIBS
47549LIBS="-lz  $LIBS"
47550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47551/* end confdefs.h.  */
47552
47553/* Override any GCC internal prototype to avoid an error.
47554   Use char because int might match the return type of a GCC
47555   builtin and then its argument prototype would still apply.  */
47556#ifdef __cplusplus
47557extern "C"
47558#endif
47559char compress ();
47560int
47561main ()
47562{
47563return compress ();
47564  ;
47565  return 0;
47566}
47567_ACEOF
47568if ac_fn_cxx_try_link "$LINENO"; then :
47569  ac_cv_lib_z_compress=yes
47570else
47571  ac_cv_lib_z_compress=no
47572fi
47573rm -f core conftest.err conftest.$ac_objext \
47574    conftest$ac_exeext conftest.$ac_ext
47575LIBS=$ac_check_lib_save_LIBS
47576fi
47577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
47578$as_echo "$ac_cv_lib_z_compress" >&6; }
47579if test "x$ac_cv_lib_z_compress" = xyes; then :
47580   ZLIB_FOUND=yes
47581else
47582   ZLIB_FOUND=no
47583fi
47584
47585
47586  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
47587$as_echo_n "checking for which zlib to use... " >&6; }
47588
47589  DEFAULT_ZLIB=bundled
47590  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47591    #
47592    # On macosx default is system...on others default is
47593    #
47594    DEFAULT_ZLIB=system
47595  fi
47596
47597  if test "x${ZLIB_FOUND}" != "xyes"; then
47598    #
47599    # If we don't find any system...set default to bundled
47600    #
47601    DEFAULT_ZLIB=bundled
47602  fi
47603
47604  #
47605  # If user didn't specify, use DEFAULT_ZLIB
47606  #
47607  if test "x${with_zlib}" = "x"; then
47608    with_zlib=${DEFAULT_ZLIB}
47609  fi
47610
47611  if test "x${with_zlib}" = "xbundled"; then
47612    USE_EXTERNAL_LIBZ=false
47613    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47614$as_echo "bundled" >&6; }
47615  elif test "x${with_zlib}" = "xsystem"; then
47616    if test "x${ZLIB_FOUND}" = "xyes"; then
47617      USE_EXTERNAL_LIBZ=true
47618      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47619$as_echo "system" >&6; }
47620    else
47621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47622$as_echo "system not found" >&6; }
47623      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
47624    fi
47625  else
47626    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
47627  fi
47628
47629
47630
47631  ###############################################################################
47632  LIBZIP_CAN_USE_MMAP=true
47633
47634
47635
47636  ###############################################################################
47637  #
47638  # Check if altzone exists in time.h
47639  #
47640
47641  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47642/* end confdefs.h.  */
47643#include <time.h>
47644int
47645main ()
47646{
47647return (int)altzone;
47648  ;
47649  return 0;
47650}
47651_ACEOF
47652if ac_fn_cxx_try_link "$LINENO"; then :
47653  has_altzone=yes
47654else
47655  has_altzone=no
47656fi
47657rm -f core conftest.err conftest.$ac_objext \
47658    conftest$ac_exeext conftest.$ac_ext
47659  if test "x$has_altzone" = xyes; then
47660
47661$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
47662
47663  fi
47664
47665  ###############################################################################
47666  #
47667  # Check the maths library
47668  #
47669
47670  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
47671$as_echo_n "checking for cos in -lm... " >&6; }
47672if ${ac_cv_lib_m_cos+:} false; then :
47673  $as_echo_n "(cached) " >&6
47674else
47675  ac_check_lib_save_LIBS=$LIBS
47676LIBS="-lm  $LIBS"
47677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47678/* end confdefs.h.  */
47679
47680/* Override any GCC internal prototype to avoid an error.
47681   Use char because int might match the return type of a GCC
47682   builtin and then its argument prototype would still apply.  */
47683#ifdef __cplusplus
47684extern "C"
47685#endif
47686char cos ();
47687int
47688main ()
47689{
47690return cos ();
47691  ;
47692  return 0;
47693}
47694_ACEOF
47695if ac_fn_cxx_try_link "$LINENO"; then :
47696  ac_cv_lib_m_cos=yes
47697else
47698  ac_cv_lib_m_cos=no
47699fi
47700rm -f core conftest.err conftest.$ac_objext \
47701    conftest$ac_exeext conftest.$ac_ext
47702LIBS=$ac_check_lib_save_LIBS
47703fi
47704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
47705$as_echo "$ac_cv_lib_m_cos" >&6; }
47706if test "x$ac_cv_lib_m_cos" = xyes; then :
47707  cat >>confdefs.h <<_ACEOF
47708#define HAVE_LIBM 1
47709_ACEOF
47710
47711  LIBS="-lm $LIBS"
47712
47713else
47714
47715        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
47716$as_echo "$as_me: Maths library was not found" >&6;}
47717
47718
47719fi
47720
47721
47722
47723  ###############################################################################
47724  #
47725  # Check for libdl.so
47726
47727  save_LIBS="$LIBS"
47728  LIBS=""
47729  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
47730$as_echo_n "checking for dlopen in -ldl... " >&6; }
47731if ${ac_cv_lib_dl_dlopen+:} false; then :
47732  $as_echo_n "(cached) " >&6
47733else
47734  ac_check_lib_save_LIBS=$LIBS
47735LIBS="-ldl  $LIBS"
47736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47737/* end confdefs.h.  */
47738
47739/* Override any GCC internal prototype to avoid an error.
47740   Use char because int might match the return type of a GCC
47741   builtin and then its argument prototype would still apply.  */
47742#ifdef __cplusplus
47743extern "C"
47744#endif
47745char dlopen ();
47746int
47747main ()
47748{
47749return dlopen ();
47750  ;
47751  return 0;
47752}
47753_ACEOF
47754if ac_fn_cxx_try_link "$LINENO"; then :
47755  ac_cv_lib_dl_dlopen=yes
47756else
47757  ac_cv_lib_dl_dlopen=no
47758fi
47759rm -f core conftest.err conftest.$ac_objext \
47760    conftest$ac_exeext conftest.$ac_ext
47761LIBS=$ac_check_lib_save_LIBS
47762fi
47763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
47764$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
47765if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
47766  cat >>confdefs.h <<_ACEOF
47767#define HAVE_LIBDL 1
47768_ACEOF
47769
47770  LIBS="-ldl $LIBS"
47771
47772fi
47773
47774  LIBDL="$LIBS"
47775
47776  LIBS="$save_LIBS"
47777
47778
47779  ###############################################################################
47780  #
47781  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47782  # dynamic build is configured on command line.
47783  #
47784
47785# Check whether --with-stdc++lib was given.
47786if test "${with_stdc__lib+set}" = set; then :
47787  withval=$with_stdc__lib;
47788        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47789                && test "x$with_stdc__lib" != xdefault; then
47790          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47791        fi
47792
47793else
47794  with_stdc__lib=default
47795
47796fi
47797
47798
47799  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47800    # Test if -lstdc++ works.
47801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47802$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47803    ac_ext=cpp
47804ac_cpp='$CXXCPP $CPPFLAGS'
47805ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47806ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47807ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47808
47809    OLD_CXXFLAGS="$CXXFLAGS"
47810    CXXFLAGS="$CXXFLAGS -lstdc++"
47811    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47812/* end confdefs.h.  */
47813
47814int
47815main ()
47816{
47817return 0;
47818  ;
47819  return 0;
47820}
47821_ACEOF
47822if ac_fn_cxx_try_link "$LINENO"; then :
47823  has_dynamic_libstdcxx=yes
47824else
47825  has_dynamic_libstdcxx=no
47826fi
47827rm -f core conftest.err conftest.$ac_objext \
47828    conftest$ac_exeext conftest.$ac_ext
47829    CXXFLAGS="$OLD_CXXFLAGS"
47830    ac_ext=cpp
47831ac_cpp='$CXXCPP $CPPFLAGS'
47832ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47833ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47834ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47835
47836    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47837$as_echo "$has_dynamic_libstdcxx" >&6; }
47838
47839    # Test if stdc++ can be linked statically.
47840    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47841$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47842    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47843    ac_ext=cpp
47844ac_cpp='$CXXCPP $CPPFLAGS'
47845ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47846ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47847ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47848
47849    OLD_LIBS="$LIBS"
47850    OLD_CXX="$CXX"
47851    LIBS="$STATIC_STDCXX_FLAGS"
47852    CXX="$CC"
47853    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47854/* end confdefs.h.  */
47855
47856int
47857main ()
47858{
47859return 0;
47860  ;
47861  return 0;
47862}
47863_ACEOF
47864if ac_fn_cxx_try_link "$LINENO"; then :
47865  has_static_libstdcxx=yes
47866else
47867  has_static_libstdcxx=no
47868fi
47869rm -f core conftest.err conftest.$ac_objext \
47870    conftest$ac_exeext conftest.$ac_ext
47871    LIBS="$OLD_LIBS"
47872    CXX="$OLD_CXX"
47873    ac_ext=cpp
47874ac_cpp='$CXXCPP $CPPFLAGS'
47875ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47876ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47877ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47878
47879    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47880$as_echo "$has_static_libstdcxx" >&6; }
47881
47882    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47883      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47884    fi
47885
47886    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47887      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47888    fi
47889
47890    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47891      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47892    fi
47893
47894    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47895$as_echo_n "checking how to link with libstdc++... " >&6; }
47896    # If dynamic was requested, it's available since it would fail above otherwise.
47897    # If dynamic wasn't requested, go with static unless it isn't available.
47898    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47899      LIBCXX="$LIBCXX -lstdc++"
47900      LDCXX="$CXX"
47901      STATIC_CXX_SETTING="STATIC_CXX=false"
47902      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47903$as_echo "dynamic" >&6; }
47904    else
47905      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47906      LDCXX="$CC"
47907      STATIC_CXX_SETTING="STATIC_CXX=true"
47908      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47909$as_echo "static" >&6; }
47910    fi
47911  fi
47912
47913
47914  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47915    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
47916
47917pkg_failed=no
47918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
47919$as_echo_n "checking for LIBFFI... " >&6; }
47920
47921if test -n "$LIBFFI_CFLAGS"; then
47922    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
47923 elif test -n "$PKG_CONFIG"; then
47924    if test -n "$PKG_CONFIG" && \
47925    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47926  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47927  ac_status=$?
47928  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47929  test $ac_status = 0; }; then
47930  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
47931else
47932  pkg_failed=yes
47933fi
47934 else
47935    pkg_failed=untried
47936fi
47937if test -n "$LIBFFI_LIBS"; then
47938    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
47939 elif test -n "$PKG_CONFIG"; then
47940    if test -n "$PKG_CONFIG" && \
47941    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47942  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47943  ac_status=$?
47944  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47945  test $ac_status = 0; }; then
47946  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
47947else
47948  pkg_failed=yes
47949fi
47950 else
47951    pkg_failed=untried
47952fi
47953
47954
47955
47956if test $pkg_failed = yes; then
47957
47958if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47959        _pkg_short_errors_supported=yes
47960else
47961        _pkg_short_errors_supported=no
47962fi
47963        if test $_pkg_short_errors_supported = yes; then
47964	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
47965        else
47966	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
47967        fi
47968	# Put the nasty error message in config.log where it belongs
47969	echo "$LIBFFI_PKG_ERRORS" >&5
47970
47971	as_fn_error $? "Package requirements (libffi) were not met:
47972
47973$LIBFFI_PKG_ERRORS
47974
47975Consider adjusting the PKG_CONFIG_PATH environment variable if you
47976installed software in a non-standard prefix.
47977
47978Alternatively, you may set the environment variables LIBFFI_CFLAGS
47979and LIBFFI_LIBS to avoid the need to call pkg-config.
47980See the pkg-config man page for more details.
47981" "$LINENO" 5
47982elif test $pkg_failed = untried; then
47983	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47984$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47985as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
47986is in your PATH or set the PKG_CONFIG environment variable to the full
47987path to pkg-config.
47988
47989Alternatively, you may set the environment variables LIBFFI_CFLAGS
47990and LIBFFI_LIBS to avoid the need to call pkg-config.
47991See the pkg-config man page for more details.
47992
47993To get pkg-config, see <http://pkg-config.freedesktop.org/>.
47994See \`config.log' for more details" "$LINENO" 5; }
47995else
47996	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
47997	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
47998        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47999$as_echo "yes" >&6; }
48000	:
48001fi
48002
48003  fi
48004
48005  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48006    # Extract the first word of "llvm-config", so it can be a program name with args.
48007set dummy llvm-config; ac_word=$2
48008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48009$as_echo_n "checking for $ac_word... " >&6; }
48010if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
48011  $as_echo_n "(cached) " >&6
48012else
48013  if test -n "$LLVM_CONFIG"; then
48014  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
48015else
48016as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48017for as_dir in $PATH
48018do
48019  IFS=$as_save_IFS
48020  test -z "$as_dir" && as_dir=.
48021    for ac_exec_ext in '' $ac_executable_extensions; do
48022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48023    ac_cv_prog_LLVM_CONFIG="llvm-config"
48024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48025    break 2
48026  fi
48027done
48028  done
48029IFS=$as_save_IFS
48030
48031fi
48032fi
48033LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
48034if test -n "$LLVM_CONFIG"; then
48035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
48036$as_echo "$LLVM_CONFIG" >&6; }
48037else
48038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48039$as_echo "no" >&6; }
48040fi
48041
48042
48043
48044    if test "x$LLVM_CONFIG" != xllvm-config; then
48045      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
48046    fi
48047
48048    llvm_components="jit mcjit engine nativecodegen native"
48049    unset LLVM_CFLAGS
48050    for flag in $("$LLVM_CONFIG" --cxxflags); do
48051      if echo "${flag}" | grep -q '^-[ID]'; then
48052        if test "${flag}" != "-D_DEBUG" ; then
48053          if test "${LLVM_CFLAGS}" != "" ; then
48054            LLVM_CFLAGS="${LLVM_CFLAGS} "
48055          fi
48056          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
48057        fi
48058      fi
48059    done
48060    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
48061    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
48062
48063    unset LLVM_LDFLAGS
48064    for flag in $("${LLVM_CONFIG}" --ldflags); do
48065      if echo "${flag}" | grep -q '^-L'; then
48066        if test "${LLVM_LDFLAGS}" != ""; then
48067          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
48068        fi
48069        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
48070      fi
48071    done
48072
48073    unset LLVM_LIBS
48074    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
48075      if echo "${flag}" | grep -q '^-l'; then
48076        if test "${LLVM_LIBS}" != ""; then
48077          LLVM_LIBS="${LLVM_LIBS} "
48078        fi
48079        LLVM_LIBS="${LLVM_LIBS}${flag}"
48080      fi
48081    done
48082
48083
48084
48085
48086  fi
48087
48088  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
48089  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
48090    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
48091  fi
48092
48093  # TODO better (platform agnostic) test
48094  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
48095    LIBCXX="-lstdc++"
48096  fi
48097
48098
48099
48100
48101  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48102
48103
48104# Check whether --with-msvcr-dll was given.
48105if test "${with_msvcr_dll+set}" = set; then :
48106  withval=$with_msvcr_dll;
48107fi
48108
48109
48110  if test "x$with_msvcr_dll" != x; then
48111    # If given explicitely by user, do not probe. If not present, fail directly.
48112
48113  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
48114  METHOD="--with-msvcr-dll"
48115  if test -e "$POSSIBLE_MSVCR_DLL"; then
48116    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48117$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48118
48119    # Need to check if the found msvcr is correct architecture
48120    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48121$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48122    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48123    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48124      CORRECT_MSVCR_ARCH=386
48125    else
48126      CORRECT_MSVCR_ARCH=x86-64
48127    fi
48128    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48129      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48130$as_echo "ok" >&6; }
48131      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48132      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48133$as_echo_n "checking for msvcr100.dll... " >&6; }
48134      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48135$as_echo "$MSVCR_DLL" >&6; }
48136    else
48137      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48138$as_echo "incorrect, ignoring" >&6; }
48139      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48140$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48141    fi
48142  fi
48143
48144    if test "x$MSVCR_DLL" = x; then
48145      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
48146    fi
48147  fi
48148
48149  if test "x$MSVCR_DLL" = x; then
48150    # Probe: Using well-known location from Visual Studio 10.0
48151    if test "x$VCINSTALLDIR" != x; then
48152      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
48153
48154  windows_path="$CYGWIN_VC_INSTALL_DIR"
48155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48156    unix_path=`$CYGPATH -u "$windows_path"`
48157    CYGWIN_VC_INSTALL_DIR="$unix_path"
48158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48160    CYGWIN_VC_INSTALL_DIR="$unix_path"
48161  fi
48162
48163      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48164        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
48165      else
48166        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
48167      fi
48168
48169  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48170  METHOD="well-known location in VCINSTALLDIR"
48171  if test -e "$POSSIBLE_MSVCR_DLL"; then
48172    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48173$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48174
48175    # Need to check if the found msvcr is correct architecture
48176    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48177$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48178    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48179    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48180      CORRECT_MSVCR_ARCH=386
48181    else
48182      CORRECT_MSVCR_ARCH=x86-64
48183    fi
48184    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48185      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48186$as_echo "ok" >&6; }
48187      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48188      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48189$as_echo_n "checking for msvcr100.dll... " >&6; }
48190      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48191$as_echo "$MSVCR_DLL" >&6; }
48192    else
48193      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48194$as_echo "incorrect, ignoring" >&6; }
48195      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48196$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48197    fi
48198  fi
48199
48200    fi
48201  fi
48202
48203  if test "x$MSVCR_DLL" = x; then
48204    # Probe: Check in the Boot JDK directory.
48205    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
48206
48207  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48208  METHOD="well-known location in Boot JDK"
48209  if test -e "$POSSIBLE_MSVCR_DLL"; then
48210    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48211$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48212
48213    # Need to check if the found msvcr is correct architecture
48214    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48215$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48216    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48217    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48218      CORRECT_MSVCR_ARCH=386
48219    else
48220      CORRECT_MSVCR_ARCH=x86-64
48221    fi
48222    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48223      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48224$as_echo "ok" >&6; }
48225      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48226      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48227$as_echo_n "checking for msvcr100.dll... " >&6; }
48228      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48229$as_echo "$MSVCR_DLL" >&6; }
48230    else
48231      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48232$as_echo "incorrect, ignoring" >&6; }
48233      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48234$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48235    fi
48236  fi
48237
48238  fi
48239
48240  if test "x$MSVCR_DLL" = x; then
48241    # Probe: Look in the Windows system32 directory
48242    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48243
48244  windows_path="$CYGWIN_SYSTEMROOT"
48245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48246    unix_path=`$CYGPATH -u "$windows_path"`
48247    CYGWIN_SYSTEMROOT="$unix_path"
48248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48250    CYGWIN_SYSTEMROOT="$unix_path"
48251  fi
48252
48253    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
48254
48255  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48256  METHOD="well-known location in SYSTEMROOT"
48257  if test -e "$POSSIBLE_MSVCR_DLL"; then
48258    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48259$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48260
48261    # Need to check if the found msvcr is correct architecture
48262    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48263$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48264    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48265    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48266      CORRECT_MSVCR_ARCH=386
48267    else
48268      CORRECT_MSVCR_ARCH=x86-64
48269    fi
48270    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48271      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48272$as_echo "ok" >&6; }
48273      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48274      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48275$as_echo_n "checking for msvcr100.dll... " >&6; }
48276      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48277$as_echo "$MSVCR_DLL" >&6; }
48278    else
48279      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48280$as_echo "incorrect, ignoring" >&6; }
48281      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48282$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48283    fi
48284  fi
48285
48286  fi
48287
48288  if test "x$MSVCR_DLL" = x; then
48289    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48290    if test "x$VS100COMNTOOLS" != x; then
48291      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48292
48293  windows_path="$CYGWIN_VS_TOOLS_DIR"
48294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48295    unix_path=`$CYGPATH -u "$windows_path"`
48296    CYGWIN_VS_TOOLS_DIR="$unix_path"
48297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48299    CYGWIN_VS_TOOLS_DIR="$unix_path"
48300  fi
48301
48302      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48303        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
48304      else
48305        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
48306      fi
48307
48308  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48309  METHOD="search of VS100COMNTOOLS"
48310  if test -e "$POSSIBLE_MSVCR_DLL"; then
48311    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48312$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48313
48314    # Need to check if the found msvcr is correct architecture
48315    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48316$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48317    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48318    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48319      CORRECT_MSVCR_ARCH=386
48320    else
48321      CORRECT_MSVCR_ARCH=x86-64
48322    fi
48323    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48324      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48325$as_echo "ok" >&6; }
48326      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48327      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48328$as_echo_n "checking for msvcr100.dll... " >&6; }
48329      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48330$as_echo "$MSVCR_DLL" >&6; }
48331    else
48332      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48333$as_echo "incorrect, ignoring" >&6; }
48334      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48335$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48336    fi
48337  fi
48338
48339    fi
48340  fi
48341
48342  if test "x$MSVCR_DLL" = x; then
48343    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48344    # (This was the original behaviour; kept since it might turn up something)
48345    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48346      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48347        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
48348      else
48349        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48350        if test "x$POSSIBLE_MSVCR_DLL" = x; then
48351          # We're grasping at straws now...
48352          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
48353        fi
48354      fi
48355
48356
48357  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48358  METHOD="search of VCINSTALLDIR"
48359  if test -e "$POSSIBLE_MSVCR_DLL"; then
48360    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48361$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48362
48363    # Need to check if the found msvcr is correct architecture
48364    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48365$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48366    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48367    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48368      CORRECT_MSVCR_ARCH=386
48369    else
48370      CORRECT_MSVCR_ARCH=x86-64
48371    fi
48372    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48373      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48374$as_echo "ok" >&6; }
48375      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48376      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48377$as_echo_n "checking for msvcr100.dll... " >&6; }
48378      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48379$as_echo "$MSVCR_DLL" >&6; }
48380    else
48381      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48382$as_echo "incorrect, ignoring" >&6; }
48383      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48384$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48385    fi
48386  fi
48387
48388    fi
48389  fi
48390
48391  if test "x$MSVCR_DLL" = x; then
48392    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48393$as_echo_n "checking for msvcr100.dll... " >&6; }
48394    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48395$as_echo "no" >&6; }
48396    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
48397  fi
48398
48399
48400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48401
48402  # Input might be given as Windows format, start by converting to
48403  # unix format.
48404  path="$MSVCR_DLL"
48405  new_path=`$CYGPATH -u "$path"`
48406
48407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48410  # "foo.exe" is OK but "foo" is an error.
48411  #
48412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48413  # It is also a way to make sure we got the proper file name for the real test later on.
48414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48415  if test "x$test_shortpath" = x; then
48416    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
48417$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
48418    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
48419  fi
48420
48421  # Call helper function which possibly converts this using DOS-style short mode.
48422  # If so, the updated path is stored in $new_path.
48423
48424  input_path="$new_path"
48425  # Check if we need to convert this using DOS-style short mode. If the path
48426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48427  # take no chances and rewrite it.
48428  # Note: m4 eats our [], so we need to use [ and ] instead.
48429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48430  if test "x$has_forbidden_chars" != x; then
48431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48435      # Going to short mode and back again did indeed matter. Since short mode is
48436      # case insensitive, let's make it lowercase to improve readability.
48437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48438      # Now convert it back to Unix-stile (cygpath)
48439      input_path=`$CYGPATH -u "$shortmode_path"`
48440      new_path="$input_path"
48441    fi
48442  fi
48443
48444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48445  if test "x$test_cygdrive_prefix" = x; then
48446    # As a simple fix, exclude /usr/bin since it's not a real path.
48447    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48449      # a path prefixed by /cygdrive for fixpath to work.
48450      new_path="$CYGWIN_ROOT_PATH$input_path"
48451    fi
48452  fi
48453
48454
48455  if test "x$path" != "x$new_path"; then
48456    MSVCR_DLL="$new_path"
48457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
48458$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
48459  fi
48460
48461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48462
48463  path="$MSVCR_DLL"
48464  has_colon=`$ECHO $path | $GREP ^.:`
48465  new_path="$path"
48466  if test "x$has_colon" = x; then
48467    # Not in mixed or Windows style, start by that.
48468    new_path=`cmd //c echo $path`
48469  fi
48470
48471
48472  input_path="$new_path"
48473  # Check if we need to convert this using DOS-style short mode. If the path
48474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48475  # take no chances and rewrite it.
48476  # Note: m4 eats our [], so we need to use [ and ] instead.
48477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48478  if test "x$has_forbidden_chars" != x; then
48479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48481  fi
48482
48483
48484  windows_path="$new_path"
48485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48486    unix_path=`$CYGPATH -u "$windows_path"`
48487    new_path="$unix_path"
48488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48490    new_path="$unix_path"
48491  fi
48492
48493  if test "x$path" != "x$new_path"; then
48494    MSVCR_DLL="$new_path"
48495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
48496$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
48497  fi
48498
48499  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48500  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48501
48502  else
48503    # We're on a posix platform. Hooray! :)
48504    path="$MSVCR_DLL"
48505    has_space=`$ECHO "$path" | $GREP " "`
48506    if test "x$has_space" != x; then
48507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
48508$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
48509      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48510    fi
48511
48512    # Use eval to expand a potential ~
48513    eval path="$path"
48514    if test ! -f "$path" && test ! -d "$path"; then
48515      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48516    fi
48517
48518    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
48519  fi
48520
48521
48522
48523
48524# Check whether --with-dxsdk was given.
48525if test "${with_dxsdk+set}" = set; then :
48526  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
48527$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
48528fi
48529
48530
48531
48532
48533# Check whether --with-dxsdk-lib was given.
48534if test "${with_dxsdk_lib+set}" = set; then :
48535  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
48536$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
48537fi
48538
48539
48540
48541
48542# Check whether --with-dxsdk-include was given.
48543if test "${with_dxsdk_include+set}" = set; then :
48544  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
48545$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
48546fi
48547
48548
48549  fi
48550
48551
48552
48553###############################################################################
48554#
48555# We need to do some final tweaking, when everything else is done.
48556#
48557###############################################################################
48558
48559
48560  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
48561
48562
48563  # The name of the Service Agent jar.
48564  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
48565  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48566    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
48567  fi
48568
48569
48570
48571    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
48572$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
48573
48574    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
48575      ENABLE_INTREE_EC=yes
48576      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48577$as_echo "yes" >&6; }
48578    else
48579      ENABLE_INTREE_EC=no
48580      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48581$as_echo "no" >&6; }
48582    fi
48583
48584
48585
48586
48587###############################################################################
48588#
48589# Configure parts of the build that only affect the build performance,
48590# not the result.
48591#
48592###############################################################################
48593
48594
48595  # How many cores do we have on this build system?
48596
48597# Check whether --with-num-cores was given.
48598if test "${with_num_cores+set}" = set; then :
48599  withval=$with_num_cores;
48600fi
48601
48602  if test "x$with_num_cores" = x; then
48603    # The number of cores were not specified, try to probe them.
48604
48605  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
48606$as_echo_n "checking for number of cores... " >&6; }
48607  NUM_CORES=1
48608  FOUND_CORES=no
48609
48610  if test -f /proc/cpuinfo; then
48611    # Looks like a Linux (or cygwin) system
48612    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
48613    FOUND_CORES=yes
48614  elif test -x /usr/sbin/psrinfo; then
48615    # Looks like a Solaris system
48616    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
48617    FOUND_CORES=yes
48618  elif test -x /usr/sbin/system_profiler; then
48619    # Looks like a MacOSX system
48620    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
48621    FOUND_CORES=yes
48622  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
48623    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
48624    FOUND_CORES=yes
48625  elif test -n "$NUMBER_OF_PROCESSORS"; then
48626    # On windows, look in the env
48627    NUM_CORES=$NUMBER_OF_PROCESSORS
48628    FOUND_CORES=yes
48629  fi
48630
48631  if test "x$FOUND_CORES" = xyes; then
48632    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
48633$as_echo "$NUM_CORES" >&6; }
48634  else
48635    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
48636$as_echo "could not detect number of cores, defaulting to 1" >&6; }
48637    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
48638$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
48639  fi
48640
48641  else
48642    NUM_CORES=$with_num_cores
48643  fi
48644
48645
48646
48647  # How much memory do we have on this build system?
48648
48649# Check whether --with-memory-size was given.
48650if test "${with_memory_size+set}" = set; then :
48651  withval=$with_memory_size;
48652fi
48653
48654  if test "x$with_memory_size" = x; then
48655    # The memory size was not specified, try to probe it.
48656
48657  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
48658$as_echo_n "checking for memory size... " >&6; }
48659  # Default to 1024 MB
48660  MEMORY_SIZE=1024
48661  FOUND_MEM=no
48662
48663  if test -f /proc/meminfo; then
48664    # Looks like a Linux (or cygwin) system
48665    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
48666    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
48667    FOUND_MEM=yes
48668  elif test -x /usr/sbin/prtconf; then
48669    # Looks like a Solaris or AIX system
48670    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
48671    FOUND_MEM=yes
48672  elif test -x /usr/sbin/system_profiler; then
48673    # Looks like a MacOSX system
48674    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
48675    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
48676    FOUND_MEM=yes
48677  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
48678    # Windows, but without cygwin
48679    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
48680    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
48681    FOUND_MEM=yes
48682  fi
48683
48684  if test "x$FOUND_MEM" = xyes; then
48685    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
48686$as_echo "$MEMORY_SIZE MB" >&6; }
48687  else
48688    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
48689$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
48690    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
48691$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
48692  fi
48693
48694  else
48695    MEMORY_SIZE=$with_memory_size
48696  fi
48697
48698
48699
48700  # Provide a decent default number of parallel jobs for make depending on
48701  # number of cores, amount of memory and machine architecture.
48702
48703# Check whether --with-jobs was given.
48704if test "${with_jobs+set}" = set; then :
48705  withval=$with_jobs;
48706fi
48707
48708  if test "x$with_jobs" = x; then
48709    # Number of jobs was not specified, calculate.
48710    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
48711$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
48712    # Approximate memory in GB, rounding up a bit.
48713    memory_gb=`expr $MEMORY_SIZE / 1100`
48714    # Pick the lowest of memory in gb and number of cores.
48715    if test "$memory_gb" -lt "$NUM_CORES"; then
48716      JOBS="$memory_gb"
48717    else
48718      JOBS="$NUM_CORES"
48719      # On bigger machines, leave some room for other processes to run
48720      if test "$JOBS" -gt "4"; then
48721        JOBS=`expr $JOBS '*' 90 / 100`
48722      fi
48723    fi
48724    # Cap number of jobs to 16
48725    if test "$JOBS" -gt "16"; then
48726      JOBS=16
48727    fi
48728    if test "$JOBS" -eq "0"; then
48729      JOBS=1
48730    fi
48731    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
48732$as_echo "$JOBS" >&6; }
48733  else
48734    JOBS=$with_jobs
48735  fi
48736
48737
48738
48739# Setup smart javac (after cores and memory have been setup)
48740
48741
48742# Check whether --with-sjavac-server-java was given.
48743if test "${with_sjavac_server_java+set}" = set; then :
48744  withval=$with_sjavac_server_java;
48745fi
48746
48747
48748  if test "x$with_sjavac_server_java" != x; then
48749    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
48750    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
48751    if test "x$FOUND_VERSION" = x; then
48752      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
48753    fi
48754  else
48755    SJAVAC_SERVER_JAVA=""
48756    # Hotspot specific options.
48757
48758  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
48759  $ECHO "Command: $JAVA -verbosegc -version" >&5
48760  OUTPUT=`$JAVA -verbosegc -version 2>&1`
48761  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48762  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48763  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48764    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
48765    JVM_ARG_OK=true
48766  else
48767    $ECHO "Arg failed:" >&5
48768    $ECHO "$OUTPUT" >&5
48769    JVM_ARG_OK=false
48770  fi
48771
48772    # JRockit specific options.
48773
48774  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
48775  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
48776  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
48777  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48778  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48779  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48780    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
48781    JVM_ARG_OK=true
48782  else
48783    $ECHO "Arg failed:" >&5
48784    $ECHO "$OUTPUT" >&5
48785    JVM_ARG_OK=false
48786  fi
48787
48788    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
48789  fi
48790
48791
48792  if test "$MEMORY_SIZE" -gt "2500"; then
48793
48794  $ECHO "Check if jvm arg is ok: -d64" >&5
48795  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
48796  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
48797  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48798  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48799  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48800    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
48801    JVM_ARG_OK=true
48802  else
48803    $ECHO "Arg failed:" >&5
48804    $ECHO "$OUTPUT" >&5
48805    JVM_ARG_OK=false
48806  fi
48807
48808    if test "$JVM_ARG_OK" = true; then
48809      JVM_64BIT=true
48810      JVM_ARG_OK=false
48811    fi
48812  fi
48813
48814  if test "$JVM_64BIT" = true; then
48815    if test "$MEMORY_SIZE" -gt "17000"; then
48816
48817  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
48818  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
48819  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
48820  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48821  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48822  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48823    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
48824    JVM_ARG_OK=true
48825  else
48826    $ECHO "Arg failed:" >&5
48827    $ECHO "$OUTPUT" >&5
48828    JVM_ARG_OK=false
48829  fi
48830
48831    fi
48832    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
48833
48834  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
48835  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
48836  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
48837  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48838  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48839  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48840    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
48841    JVM_ARG_OK=true
48842  else
48843    $ECHO "Arg failed:" >&5
48844    $ECHO "$OUTPUT" >&5
48845    JVM_ARG_OK=false
48846  fi
48847
48848    fi
48849    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
48850
48851  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
48852  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
48853  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
48854  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48855  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48856  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48857    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
48858    JVM_ARG_OK=true
48859  else
48860    $ECHO "Arg failed:" >&5
48861    $ECHO "$OUTPUT" >&5
48862    JVM_ARG_OK=false
48863  fi
48864
48865    fi
48866    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
48867
48868  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
48869  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
48870  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
48871  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48872  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48873  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48874    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
48875    JVM_ARG_OK=true
48876  else
48877    $ECHO "Arg failed:" >&5
48878    $ECHO "$OUTPUT" >&5
48879    JVM_ARG_OK=false
48880  fi
48881
48882    fi
48883  fi
48884  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
48885
48886  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
48887  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
48888  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
48889  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48890  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48891  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48892    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
48893    JVM_ARG_OK=true
48894  else
48895    $ECHO "Arg failed:" >&5
48896    $ECHO "$OUTPUT" >&5
48897    JVM_ARG_OK=false
48898  fi
48899
48900  fi
48901  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
48902
48903  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
48904  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
48905  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
48906  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48907  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48908  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48909    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
48910    JVM_ARG_OK=true
48911  else
48912    $ECHO "Arg failed:" >&5
48913    $ECHO "$OUTPUT" >&5
48914    JVM_ARG_OK=false
48915  fi
48916
48917  fi
48918  if test "$JVM_ARG_OK" = false; then
48919
48920  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
48921  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
48922  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
48923  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48924  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48925  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48926    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
48927    JVM_ARG_OK=true
48928  else
48929    $ECHO "Arg failed:" >&5
48930    $ECHO "$OUTPUT" >&5
48931    JVM_ARG_OK=false
48932  fi
48933
48934  fi
48935
48936  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
48937$as_echo_n "checking whether to use sjavac... " >&6; }
48938  # Check whether --enable-sjavac was given.
48939if test "${enable_sjavac+set}" = set; then :
48940  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
48941else
48942  ENABLE_SJAVAC='no'
48943fi
48944
48945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
48946$as_echo "$ENABLE_SJAVAC" >&6; }
48947
48948
48949  if test "x$ENABLE_SJAVAC" = xyes; then
48950    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
48951  else
48952    SJAVAC_SERVER_DIR=
48953  fi
48954
48955
48956
48957# Can the C/C++ compiler use precompiled headers?
48958
48959
48960  ###############################################################################
48961  #
48962  # Can the C/C++ compiler use precompiled headers?
48963  #
48964  # Check whether --enable-precompiled-headers was given.
48965if test "${enable_precompiled_headers+set}" = set; then :
48966  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
48967else
48968  ENABLE_PRECOMPH=yes
48969fi
48970
48971
48972  USE_PRECOMPILED_HEADER=1
48973  if test "x$ENABLE_PRECOMPH" = xno; then
48974    USE_PRECOMPILED_HEADER=0
48975  fi
48976
48977  if test "x$ENABLE_PRECOMPH" = xyes; then
48978    # Check that the compiler actually supports precomp headers.
48979    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48980      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
48981$as_echo_n "checking that precompiled headers work... " >&6; }
48982      echo "int alfa();" > conftest.h
48983      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
48984      if test ! -f conftest.hpp.gch; then
48985        USE_PRECOMPILED_HEADER=0
48986        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48987$as_echo "no" >&6; }
48988      else
48989        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48990$as_echo "yes" >&6; }
48991      fi
48992      rm -f conftest.h conftest.hpp.gch
48993    fi
48994  fi
48995
48996
48997
48998
48999# Setup use of ccache, if available
49000
49001  # Check whether --enable-ccache was given.
49002if test "${enable_ccache+set}" = set; then :
49003  enableval=$enable_ccache;
49004fi
49005
49006
49007  CCACHE=
49008  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
49009$as_echo_n "checking is ccache enabled... " >&6; }
49010  ENABLE_CCACHE=$enable_ccache
49011  if test "x$enable_ccache" = xyes; then
49012    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49013$as_echo "yes" >&6; }
49014    OLD_PATH="$PATH"
49015    if test "x$TOOLCHAIN_PATH" != x; then
49016      PATH=$TOOLCHAIN_PATH:$PATH
49017    fi
49018
49019
49020
49021  # Publish this variable in the help.
49022
49023
49024  if test "x$CCACHE" = x; then
49025    # The variable is not set by user, try to locate tool using the code snippet
49026    for ac_prog in ccache
49027do
49028  # Extract the first word of "$ac_prog", so it can be a program name with args.
49029set dummy $ac_prog; ac_word=$2
49030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49031$as_echo_n "checking for $ac_word... " >&6; }
49032if ${ac_cv_path_CCACHE+:} false; then :
49033  $as_echo_n "(cached) " >&6
49034else
49035  case $CCACHE in
49036  [\\/]* | ?:[\\/]*)
49037  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
49038  ;;
49039  *)
49040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49041for as_dir in $PATH
49042do
49043  IFS=$as_save_IFS
49044  test -z "$as_dir" && as_dir=.
49045    for ac_exec_ext in '' $ac_executable_extensions; do
49046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49047    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
49048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49049    break 2
49050  fi
49051done
49052  done
49053IFS=$as_save_IFS
49054
49055  ;;
49056esac
49057fi
49058CCACHE=$ac_cv_path_CCACHE
49059if test -n "$CCACHE"; then
49060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
49061$as_echo "$CCACHE" >&6; }
49062else
49063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49064$as_echo "no" >&6; }
49065fi
49066
49067
49068  test -n "$CCACHE" && break
49069done
49070
49071  else
49072    # The variable is set, but is it from the command line or the environment?
49073
49074    # Try to remove the string !CCACHE! from our list.
49075    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
49076    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
49077      # If it failed, the variable was not from the command line. Ignore it,
49078      # but warn the user (except for BASH, which is always set by the calling BASH).
49079      if test "xCCACHE" != xBASH; then
49080        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
49081$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
49082      fi
49083      # Try to locate tool using the code snippet
49084      for ac_prog in ccache
49085do
49086  # Extract the first word of "$ac_prog", so it can be a program name with args.
49087set dummy $ac_prog; ac_word=$2
49088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49089$as_echo_n "checking for $ac_word... " >&6; }
49090if ${ac_cv_path_CCACHE+:} false; then :
49091  $as_echo_n "(cached) " >&6
49092else
49093  case $CCACHE in
49094  [\\/]* | ?:[\\/]*)
49095  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
49096  ;;
49097  *)
49098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49099for as_dir in $PATH
49100do
49101  IFS=$as_save_IFS
49102  test -z "$as_dir" && as_dir=.
49103    for ac_exec_ext in '' $ac_executable_extensions; do
49104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49105    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
49106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49107    break 2
49108  fi
49109done
49110  done
49111IFS=$as_save_IFS
49112
49113  ;;
49114esac
49115fi
49116CCACHE=$ac_cv_path_CCACHE
49117if test -n "$CCACHE"; then
49118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
49119$as_echo "$CCACHE" >&6; }
49120else
49121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49122$as_echo "no" >&6; }
49123fi
49124
49125
49126  test -n "$CCACHE" && break
49127done
49128
49129    else
49130      # If it succeeded, then it was overridden by the user. We will use it
49131      # for the tool.
49132
49133      # First remove it from the list of overridden variables, so we can test
49134      # for unknown variables in the end.
49135      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
49136
49137      # Check if the provided tool contains a complete path.
49138      tool_specified="$CCACHE"
49139      tool_basename="${tool_specified##*/}"
49140      if test "x$tool_basename" = "x$tool_specified"; then
49141        # A command without a complete path is provided, search $PATH.
49142        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
49143$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
49144        # Extract the first word of "$tool_basename", so it can be a program name with args.
49145set dummy $tool_basename; ac_word=$2
49146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49147$as_echo_n "checking for $ac_word... " >&6; }
49148if ${ac_cv_path_CCACHE+:} false; then :
49149  $as_echo_n "(cached) " >&6
49150else
49151  case $CCACHE in
49152  [\\/]* | ?:[\\/]*)
49153  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
49154  ;;
49155  *)
49156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49157for as_dir in $PATH
49158do
49159  IFS=$as_save_IFS
49160  test -z "$as_dir" && as_dir=.
49161    for ac_exec_ext in '' $ac_executable_extensions; do
49162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49163    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
49164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49165    break 2
49166  fi
49167done
49168  done
49169IFS=$as_save_IFS
49170
49171  ;;
49172esac
49173fi
49174CCACHE=$ac_cv_path_CCACHE
49175if test -n "$CCACHE"; then
49176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
49177$as_echo "$CCACHE" >&6; }
49178else
49179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49180$as_echo "no" >&6; }
49181fi
49182
49183
49184        if test "x$CCACHE" = x; then
49185          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
49186        fi
49187      else
49188        # Otherwise we believe it is a complete path. Use it as it is.
49189        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
49190$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
49191        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
49192$as_echo_n "checking for CCACHE... " >&6; }
49193        if test ! -x "$tool_specified"; then
49194          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49195$as_echo "not found" >&6; }
49196          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
49197        fi
49198        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
49199$as_echo "$tool_specified" >&6; }
49200      fi
49201    fi
49202  fi
49203
49204
49205
49206  if test "x$CCACHE" = x; then
49207    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
49208  fi
49209
49210
49211    CCACHE_STATUS="enabled"
49212    PATH="$OLD_PATH"
49213  elif test "x$enable_ccache" = xno; then
49214    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
49215$as_echo "no, explicitly disabled" >&6; }
49216  elif test "x$enable_ccache" = x; then
49217    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49218$as_echo "no" >&6; }
49219  else
49220    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
49221$as_echo "unknown" >&6; }
49222    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
49223  fi
49224
49225
49226
49227# Check whether --with-ccache-dir was given.
49228if test "${with_ccache_dir+set}" = set; then :
49229  withval=$with_ccache_dir;
49230fi
49231
49232
49233  if test "x$with_ccache_dir" != x; then
49234    # When using a non home ccache directory, assume the use is to share ccache files
49235    # with other users. Thus change the umask.
49236    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
49237    if test "x$CCACHE" = x; then
49238      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
49239$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
49240    fi
49241  fi
49242
49243  if test "x$CCACHE" != x; then
49244
49245  if test "x$CCACHE" != x; then
49246    # Only use ccache if it is 3.1.4 or later, which supports
49247    # precompiled headers.
49248    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
49249$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
49250    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
49251    if test "x$HAS_GOOD_CCACHE" = x; then
49252      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
49253$as_echo "no, disabling ccache" >&6; }
49254      CCACHE=
49255      CCACHE_STATUS="disabled"
49256    else
49257      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49258$as_echo "yes" >&6; }
49259      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
49260$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
49261      PUSHED_FLAGS="$CXXFLAGS"
49262      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
49263      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49264/* end confdefs.h.  */
49265
49266int
49267main ()
49268{
49269
49270  ;
49271  return 0;
49272}
49273_ACEOF
49274if ac_fn_cxx_try_compile "$LINENO"; then :
49275  CC_KNOWS_CCACHE_TRICK=yes
49276else
49277  CC_KNOWS_CCACHE_TRICK=no
49278fi
49279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49280      CXXFLAGS="$PUSHED_FLAGS"
49281      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
49282        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49283$as_echo "yes" >&6; }
49284      else
49285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
49286$as_echo "no, disabling ccaching of precompiled headers" >&6; }
49287        CCACHE=
49288        CCACHE_STATUS="disabled"
49289      fi
49290    fi
49291  fi
49292
49293  if test "x$CCACHE" != x; then
49294    CCACHE_SLOPPINESS=time_macros
49295    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
49296    CCACHE_FLAGS=-fpch-preprocess
49297
49298    if test "x$SET_CCACHE_DIR" != x; then
49299      mkdir -p $CCACHE_DIR > /dev/null 2>&1
49300      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
49301    fi
49302  fi
49303
49304  fi
49305
49306
49307###############################################################################
49308#
49309# And now the finish...
49310#
49311###############################################################################
49312
49313# Check for some common pitfalls
49314
49315  if test x"$OPENJDK_BUILD_OS" = xwindows; then
49316    file_to_test="$SRC_ROOT/LICENSE"
49317    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
49318      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
49319    fi
49320  fi
49321
49322
49323  # Did user specify any unknown variables?
49324
49325  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
49326    # Replace the separating ! with spaces before presenting for end user.
49327    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
49328    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
49329$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
49330  fi
49331
49332
49333  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
49334$as_echo_n "checking if build directory is on local disk... " >&6; }
49335
49336  # df -l lists only local disks; if the given directory is not found then
49337  # a non-zero exit code is given
49338  if test "x$DF" = x; then
49339    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49340      # msys does not have df; use Windows "net use" instead.
49341      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
49342      if test "x$IS_NETWORK_DISK" = x; then
49343        OUTPUT_DIR_IS_LOCAL="yes"
49344      else
49345        OUTPUT_DIR_IS_LOCAL="no"
49346      fi
49347    else
49348      # No df here, say it's local
49349      OUTPUT_DIR_IS_LOCAL="yes"
49350    fi
49351  else
49352    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
49353      OUTPUT_DIR_IS_LOCAL="yes"
49354    else
49355      OUTPUT_DIR_IS_LOCAL="no"
49356    fi
49357  fi
49358
49359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
49360$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
49361
49362
49363
49364  # Check if the user has any old-style ALT_ variables set.
49365  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
49366
49367  # Before generating output files, test if they exist. If they do, this is a reconfigure.
49368  # Since we can't properly handle the dependencies for this, warn the user about the situation
49369  if test -e $OUTPUT_ROOT/spec.gmk; then
49370    IS_RECONFIGURE=yes
49371  else
49372    IS_RECONFIGURE=no
49373  fi
49374
49375
49376# At the end, call the custom hook. (Dummy macro if no custom sources available)
49377
49378
49379# We're messing a bit with internal autoconf variables to put the config.status
49380# in the output directory instead of the current directory.
49381CONFIG_STATUS="$OUTPUT_ROOT/config.status"
49382
49383# Create the actual output files. Now the main work of configure is done.
49384cat >confcache <<\_ACEOF
49385# This file is a shell script that caches the results of configure
49386# tests run on this system so they can be shared between configure
49387# scripts and configure runs, see configure's option --config-cache.
49388# It is not useful on other systems.  If it contains results you don't
49389# want to keep, you may remove or edit it.
49390#
49391# config.status only pays attention to the cache file if you give it
49392# the --recheck option to rerun configure.
49393#
49394# `ac_cv_env_foo' variables (set or unset) will be overridden when
49395# loading this file, other *unset* `ac_cv_foo' will be assigned the
49396# following values.
49397
49398_ACEOF
49399
49400# The following way of writing the cache mishandles newlines in values,
49401# but we know of no workaround that is simple, portable, and efficient.
49402# So, we kill variables containing newlines.
49403# Ultrix sh set writes to stderr and can't be redirected directly,
49404# and sets the high bit in the cache file unless we assign to the vars.
49405(
49406  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
49407    eval ac_val=\$$ac_var
49408    case $ac_val in #(
49409    *${as_nl}*)
49410      case $ac_var in #(
49411      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
49412$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
49413      esac
49414      case $ac_var in #(
49415      _ | IFS | as_nl) ;; #(
49416      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
49417      *) { eval $ac_var=; unset $ac_var;} ;;
49418      esac ;;
49419    esac
49420  done
49421
49422  (set) 2>&1 |
49423    case $as_nl`(ac_space=' '; set) 2>&1` in #(
49424    *${as_nl}ac_space=\ *)
49425      # `set' does not quote correctly, so add quotes: double-quote
49426      # substitution turns \\\\ into \\, and sed turns \\ into \.
49427      sed -n \
49428	"s/'/'\\\\''/g;
49429	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
49430      ;; #(
49431    *)
49432      # `set' quotes correctly as required by POSIX, so do not add quotes.
49433      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
49434      ;;
49435    esac |
49436    sort
49437) |
49438  sed '
49439     /^ac_cv_env_/b end
49440     t clear
49441     :clear
49442     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
49443     t end
49444     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
49445     :end' >>confcache
49446if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
49447  if test -w "$cache_file"; then
49448    if test "x$cache_file" != "x/dev/null"; then
49449      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
49450$as_echo "$as_me: updating cache $cache_file" >&6;}
49451      if test ! -f "$cache_file" || test -h "$cache_file"; then
49452	cat confcache >"$cache_file"
49453      else
49454        case $cache_file in #(
49455        */* | ?:*)
49456	  mv -f confcache "$cache_file"$$ &&
49457	  mv -f "$cache_file"$$ "$cache_file" ;; #(
49458        *)
49459	  mv -f confcache "$cache_file" ;;
49460	esac
49461      fi
49462    fi
49463  else
49464    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
49465$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
49466  fi
49467fi
49468rm -f confcache
49469
49470test "x$prefix" = xNONE && prefix=$ac_default_prefix
49471# Let make expand exec_prefix.
49472test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
49473
49474DEFS=-DHAVE_CONFIG_H
49475
49476ac_libobjs=
49477ac_ltlibobjs=
49478U=
49479for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
49480  # 1. Remove the extension, and $U if already installed.
49481  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
49482  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
49483  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
49484  #    will be set to the directory where LIBOBJS objects are built.
49485  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
49486  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
49487done
49488LIBOBJS=$ac_libobjs
49489
49490LTLIBOBJS=$ac_ltlibobjs
49491
49492
49493
49494: "${CONFIG_STATUS=./config.status}"
49495ac_write_fail=0
49496ac_clean_files_save=$ac_clean_files
49497ac_clean_files="$ac_clean_files $CONFIG_STATUS"
49498{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
49499$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
49500as_write_fail=0
49501cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
49502#! $SHELL
49503# Generated by $as_me.
49504# Run this file to recreate the current configuration.
49505# Compiler output produced by configure, useful for debugging
49506# configure, is in config.log if it exists.
49507
49508debug=false
49509ac_cs_recheck=false
49510ac_cs_silent=false
49511
49512SHELL=\${CONFIG_SHELL-$SHELL}
49513export SHELL
49514_ASEOF
49515cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
49516## -------------------- ##
49517## M4sh Initialization. ##
49518## -------------------- ##
49519
49520# Be more Bourne compatible
49521DUALCASE=1; export DUALCASE # for MKS sh
49522if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
49523  emulate sh
49524  NULLCMD=:
49525  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
49526  # is contrary to our usage.  Disable this feature.
49527  alias -g '${1+"$@"}'='"$@"'
49528  setopt NO_GLOB_SUBST
49529else
49530  case `(set -o) 2>/dev/null` in #(
49531  *posix*) :
49532    set -o posix ;; #(
49533  *) :
49534     ;;
49535esac
49536fi
49537
49538
49539as_nl='
49540'
49541export as_nl
49542# Printing a long string crashes Solaris 7 /usr/bin/printf.
49543as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
49544as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
49545as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49546# Prefer a ksh shell builtin over an external printf program on Solaris,
49547# but without wasting forks for bash or zsh.
49548if test -z "$BASH_VERSION$ZSH_VERSION" \
49549    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49550  as_echo='print -r --'
49551  as_echo_n='print -rn --'
49552elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
49553  as_echo='printf %s\n'
49554  as_echo_n='printf %s'
49555else
49556  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
49557    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
49558    as_echo_n='/usr/ucb/echo -n'
49559  else
49560    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
49561    as_echo_n_body='eval
49562      arg=$1;
49563      case $arg in #(
49564      *"$as_nl"*)
49565	expr "X$arg" : "X\\(.*\\)$as_nl";
49566	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
49567      esac;
49568      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
49569    '
49570    export as_echo_n_body
49571    as_echo_n='sh -c $as_echo_n_body as_echo'
49572  fi
49573  export as_echo_body
49574  as_echo='sh -c $as_echo_body as_echo'
49575fi
49576
49577# The user is always right.
49578if test "${PATH_SEPARATOR+set}" != set; then
49579  PATH_SEPARATOR=:
49580  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
49581    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
49582      PATH_SEPARATOR=';'
49583  }
49584fi
49585
49586
49587# IFS
49588# We need space, tab and new line, in precisely that order.  Quoting is
49589# there to prevent editors from complaining about space-tab.
49590# (If _AS_PATH_WALK were called with IFS unset, it would disable word
49591# splitting by setting IFS to empty value.)
49592IFS=" ""	$as_nl"
49593
49594# Find who we are.  Look in the path if we contain no directory separator.
49595as_myself=
49596case $0 in #((
49597  *[\\/]* ) as_myself=$0 ;;
49598  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49599for as_dir in $PATH
49600do
49601  IFS=$as_save_IFS
49602  test -z "$as_dir" && as_dir=.
49603    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
49604  done
49605IFS=$as_save_IFS
49606
49607     ;;
49608esac
49609# We did not find ourselves, most probably we were run as `sh COMMAND'
49610# in which case we are not to be found in the path.
49611if test "x$as_myself" = x; then
49612  as_myself=$0
49613fi
49614if test ! -f "$as_myself"; then
49615  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
49616  exit 1
49617fi
49618
49619# Unset variables that we do not need and which cause bugs (e.g. in
49620# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
49621# suppresses any "Segmentation fault" message there.  '((' could
49622# trigger a bug in pdksh 5.2.14.
49623for as_var in BASH_ENV ENV MAIL MAILPATH
49624do eval test x\${$as_var+set} = xset \
49625  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
49626done
49627PS1='$ '
49628PS2='> '
49629PS4='+ '
49630
49631# NLS nuisances.
49632LC_ALL=C
49633export LC_ALL
49634LANGUAGE=C
49635export LANGUAGE
49636
49637# CDPATH.
49638(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
49639
49640
49641# as_fn_error STATUS ERROR [LINENO LOG_FD]
49642# ----------------------------------------
49643# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
49644# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
49645# script with STATUS, using 1 if that was 0.
49646as_fn_error ()
49647{
49648  as_status=$1; test $as_status -eq 0 && as_status=1
49649  if test "$4"; then
49650    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
49651    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
49652  fi
49653  $as_echo "$as_me: error: $2" >&2
49654  as_fn_exit $as_status
49655} # as_fn_error
49656
49657
49658# as_fn_set_status STATUS
49659# -----------------------
49660# Set $? to STATUS, without forking.
49661as_fn_set_status ()
49662{
49663  return $1
49664} # as_fn_set_status
49665
49666# as_fn_exit STATUS
49667# -----------------
49668# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
49669as_fn_exit ()
49670{
49671  set +e
49672  as_fn_set_status $1
49673  exit $1
49674} # as_fn_exit
49675
49676# as_fn_unset VAR
49677# ---------------
49678# Portably unset VAR.
49679as_fn_unset ()
49680{
49681  { eval $1=; unset $1;}
49682}
49683as_unset=as_fn_unset
49684# as_fn_append VAR VALUE
49685# ----------------------
49686# Append the text in VALUE to the end of the definition contained in VAR. Take
49687# advantage of any shell optimizations that allow amortized linear growth over
49688# repeated appends, instead of the typical quadratic growth present in naive
49689# implementations.
49690if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
49691  eval 'as_fn_append ()
49692  {
49693    eval $1+=\$2
49694  }'
49695else
49696  as_fn_append ()
49697  {
49698    eval $1=\$$1\$2
49699  }
49700fi # as_fn_append
49701
49702# as_fn_arith ARG...
49703# ------------------
49704# Perform arithmetic evaluation on the ARGs, and store the result in the
49705# global $as_val. Take advantage of shells that can avoid forks. The arguments
49706# must be portable across $(()) and expr.
49707if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
49708  eval 'as_fn_arith ()
49709  {
49710    as_val=$(( $* ))
49711  }'
49712else
49713  as_fn_arith ()
49714  {
49715    as_val=`expr "$@" || test $? -eq 1`
49716  }
49717fi # as_fn_arith
49718
49719
49720if expr a : '\(a\)' >/dev/null 2>&1 &&
49721   test "X`expr 00001 : '.*\(...\)'`" = X001; then
49722  as_expr=expr
49723else
49724  as_expr=false
49725fi
49726
49727if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
49728  as_basename=basename
49729else
49730  as_basename=false
49731fi
49732
49733if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
49734  as_dirname=dirname
49735else
49736  as_dirname=false
49737fi
49738
49739as_me=`$as_basename -- "$0" ||
49740$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
49741	 X"$0" : 'X\(//\)$' \| \
49742	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
49743$as_echo X/"$0" |
49744    sed '/^.*\/\([^/][^/]*\)\/*$/{
49745	    s//\1/
49746	    q
49747	  }
49748	  /^X\/\(\/\/\)$/{
49749	    s//\1/
49750	    q
49751	  }
49752	  /^X\/\(\/\).*/{
49753	    s//\1/
49754	    q
49755	  }
49756	  s/.*/./; q'`
49757
49758# Avoid depending upon Character Ranges.
49759as_cr_letters='abcdefghijklmnopqrstuvwxyz'
49760as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
49761as_cr_Letters=$as_cr_letters$as_cr_LETTERS
49762as_cr_digits='0123456789'
49763as_cr_alnum=$as_cr_Letters$as_cr_digits
49764
49765ECHO_C= ECHO_N= ECHO_T=
49766case `echo -n x` in #(((((
49767-n*)
49768  case `echo 'xy\c'` in
49769  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
49770  xy)  ECHO_C='\c';;
49771  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
49772       ECHO_T='	';;
49773  esac;;
49774*)
49775  ECHO_N='-n';;
49776esac
49777
49778rm -f conf$$ conf$$.exe conf$$.file
49779if test -d conf$$.dir; then
49780  rm -f conf$$.dir/conf$$.file
49781else
49782  rm -f conf$$.dir
49783  mkdir conf$$.dir 2>/dev/null
49784fi
49785if (echo >conf$$.file) 2>/dev/null; then
49786  if ln -s conf$$.file conf$$ 2>/dev/null; then
49787    as_ln_s='ln -s'
49788    # ... but there are two gotchas:
49789    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
49790    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
49791    # In both cases, we have to default to `cp -pR'.
49792    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
49793      as_ln_s='cp -pR'
49794  elif ln conf$$.file conf$$ 2>/dev/null; then
49795    as_ln_s=ln
49796  else
49797    as_ln_s='cp -pR'
49798  fi
49799else
49800  as_ln_s='cp -pR'
49801fi
49802rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
49803rmdir conf$$.dir 2>/dev/null
49804
49805
49806# as_fn_mkdir_p
49807# -------------
49808# Create "$as_dir" as a directory, including parents if necessary.
49809as_fn_mkdir_p ()
49810{
49811
49812  case $as_dir in #(
49813  -*) as_dir=./$as_dir;;
49814  esac
49815  test -d "$as_dir" || eval $as_mkdir_p || {
49816    as_dirs=
49817    while :; do
49818      case $as_dir in #(
49819      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
49820      *) as_qdir=$as_dir;;
49821      esac
49822      as_dirs="'$as_qdir' $as_dirs"
49823      as_dir=`$as_dirname -- "$as_dir" ||
49824$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49825	 X"$as_dir" : 'X\(//\)[^/]' \| \
49826	 X"$as_dir" : 'X\(//\)$' \| \
49827	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
49828$as_echo X"$as_dir" |
49829    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49830	    s//\1/
49831	    q
49832	  }
49833	  /^X\(\/\/\)[^/].*/{
49834	    s//\1/
49835	    q
49836	  }
49837	  /^X\(\/\/\)$/{
49838	    s//\1/
49839	    q
49840	  }
49841	  /^X\(\/\).*/{
49842	    s//\1/
49843	    q
49844	  }
49845	  s/.*/./; q'`
49846      test -d "$as_dir" && break
49847    done
49848    test -z "$as_dirs" || eval "mkdir $as_dirs"
49849  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
49850
49851
49852} # as_fn_mkdir_p
49853if mkdir -p . 2>/dev/null; then
49854  as_mkdir_p='mkdir -p "$as_dir"'
49855else
49856  test -d ./-p && rmdir ./-p
49857  as_mkdir_p=false
49858fi
49859
49860
49861# as_fn_executable_p FILE
49862# -----------------------
49863# Test if FILE is an executable regular file.
49864as_fn_executable_p ()
49865{
49866  test -f "$1" && test -x "$1"
49867} # as_fn_executable_p
49868as_test_x='test -x'
49869as_executable_p=as_fn_executable_p
49870
49871# Sed expression to map a string onto a valid CPP name.
49872as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
49873
49874# Sed expression to map a string onto a valid variable name.
49875as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
49876
49877
49878exec 6>&1
49879## ----------------------------------- ##
49880## Main body of $CONFIG_STATUS script. ##
49881## ----------------------------------- ##
49882_ASEOF
49883test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
49884
49885cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49886# Save the log message, to keep $0 and so on meaningful, and to
49887# report actual input values of CONFIG_FILES etc. instead of their
49888# values after options handling.
49889ac_log="
49890This file was extended by OpenJDK $as_me jdk9, which was
49891generated by GNU Autoconf 2.69.  Invocation command line was
49892
49893  CONFIG_FILES    = $CONFIG_FILES
49894  CONFIG_HEADERS  = $CONFIG_HEADERS
49895  CONFIG_LINKS    = $CONFIG_LINKS
49896  CONFIG_COMMANDS = $CONFIG_COMMANDS
49897  $ $0 $@
49898
49899on `(hostname || uname -n) 2>/dev/null | sed 1q`
49900"
49901
49902_ACEOF
49903
49904case $ac_config_files in *"
49905"*) set x $ac_config_files; shift; ac_config_files=$*;;
49906esac
49907
49908case $ac_config_headers in *"
49909"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
49910esac
49911
49912
49913cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49914# Files that config.status was made for.
49915config_files="$ac_config_files"
49916config_headers="$ac_config_headers"
49917
49918_ACEOF
49919
49920cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49921ac_cs_usage="\
49922\`$as_me' instantiates files and other configuration actions
49923from templates according to the current configuration.  Unless the files
49924and actions are specified as TAGs, all are instantiated by default.
49925
49926Usage: $0 [OPTION]... [TAG]...
49927
49928  -h, --help       print this help, then exit
49929  -V, --version    print version number and configuration settings, then exit
49930      --config     print configuration, then exit
49931  -q, --quiet, --silent
49932                   do not print progress messages
49933  -d, --debug      don't remove temporary files
49934      --recheck    update $as_me by reconfiguring in the same conditions
49935      --file=FILE[:TEMPLATE]
49936                   instantiate the configuration file FILE
49937      --header=FILE[:TEMPLATE]
49938                   instantiate the configuration header FILE
49939
49940Configuration files:
49941$config_files
49942
49943Configuration headers:
49944$config_headers
49945
49946Report bugs to <build-dev@openjdk.java.net>.
49947OpenJDK home page: <http://openjdk.java.net>."
49948
49949_ACEOF
49950cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49951ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
49952ac_cs_version="\\
49953OpenJDK config.status jdk9
49954configured by $0, generated by GNU Autoconf 2.69,
49955  with options \\"\$ac_cs_config\\"
49956
49957Copyright (C) 2012 Free Software Foundation, Inc.
49958This config.status script is free software; the Free Software Foundation
49959gives unlimited permission to copy, distribute and modify it."
49960
49961ac_pwd='$ac_pwd'
49962srcdir='$srcdir'
49963AWK='$AWK'
49964test -n "\$AWK" || AWK=awk
49965_ACEOF
49966
49967cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49968# The default lists apply if the user does not specify any file.
49969ac_need_defaults=:
49970while test $# != 0
49971do
49972  case $1 in
49973  --*=?*)
49974    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49975    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
49976    ac_shift=:
49977    ;;
49978  --*=)
49979    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49980    ac_optarg=
49981    ac_shift=:
49982    ;;
49983  *)
49984    ac_option=$1
49985    ac_optarg=$2
49986    ac_shift=shift
49987    ;;
49988  esac
49989
49990  case $ac_option in
49991  # Handling of the options.
49992  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
49993    ac_cs_recheck=: ;;
49994  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
49995    $as_echo "$ac_cs_version"; exit ;;
49996  --config | --confi | --conf | --con | --co | --c )
49997    $as_echo "$ac_cs_config"; exit ;;
49998  --debug | --debu | --deb | --de | --d | -d )
49999    debug=: ;;
50000  --file | --fil | --fi | --f )
50001    $ac_shift
50002    case $ac_optarg in
50003    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
50004    '') as_fn_error $? "missing file argument" ;;
50005    esac
50006    as_fn_append CONFIG_FILES " '$ac_optarg'"
50007    ac_need_defaults=false;;
50008  --header | --heade | --head | --hea )
50009    $ac_shift
50010    case $ac_optarg in
50011    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
50012    esac
50013    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
50014    ac_need_defaults=false;;
50015  --he | --h)
50016    # Conflict between --help and --header
50017    as_fn_error $? "ambiguous option: \`$1'
50018Try \`$0 --help' for more information.";;
50019  --help | --hel | -h )
50020    $as_echo "$ac_cs_usage"; exit ;;
50021  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
50022  | -silent | --silent | --silen | --sile | --sil | --si | --s)
50023    ac_cs_silent=: ;;
50024
50025  # This is an error.
50026  -*) as_fn_error $? "unrecognized option: \`$1'
50027Try \`$0 --help' for more information." ;;
50028
50029  *) as_fn_append ac_config_targets " $1"
50030     ac_need_defaults=false ;;
50031
50032  esac
50033  shift
50034done
50035
50036ac_configure_extra_args=
50037
50038if $ac_cs_silent; then
50039  exec 6>/dev/null
50040  ac_configure_extra_args="$ac_configure_extra_args --silent"
50041fi
50042
50043_ACEOF
50044cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50045if \$ac_cs_recheck; then
50046  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
50047  shift
50048  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
50049  CONFIG_SHELL='$SHELL'
50050  export CONFIG_SHELL
50051  exec "\$@"
50052fi
50053
50054_ACEOF
50055cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50056exec 5>>config.log
50057{
50058  echo
50059  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
50060## Running $as_me. ##
50061_ASBOX
50062  $as_echo "$ac_log"
50063} >&5
50064
50065_ACEOF
50066cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50067_ACEOF
50068
50069cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50070
50071# Handling of arguments.
50072for ac_config_target in $ac_config_targets
50073do
50074  case $ac_config_target in
50075    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
50076    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
50077    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
50078    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
50079    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
50080    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
50081    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
50082
50083  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
50084  esac
50085done
50086
50087
50088# If the user did not use the arguments to specify the items to instantiate,
50089# then the envvar interface is used.  Set only those that are not.
50090# We use the long form for the default assignment because of an extremely
50091# bizarre bug on SunOS 4.1.3.
50092if $ac_need_defaults; then
50093  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
50094  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
50095fi
50096
50097# Have a temporary directory for convenience.  Make it in the build tree
50098# simply because there is no reason against having it here, and in addition,
50099# creating and moving files from /tmp can sometimes cause problems.
50100# Hook for its removal unless debugging.
50101# Note that there is a small window in which the directory will not be cleaned:
50102# after its creation but before its name has been assigned to `$tmp'.
50103$debug ||
50104{
50105  tmp= ac_tmp=
50106  trap 'exit_status=$?
50107  : "${ac_tmp:=$tmp}"
50108  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
50109' 0
50110  trap 'as_fn_exit 1' 1 2 13 15
50111}
50112# Create a (secure) tmp directory for tmp files.
50113
50114{
50115  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
50116  test -d "$tmp"
50117}  ||
50118{
50119  tmp=./conf$$-$RANDOM
50120  (umask 077 && mkdir "$tmp")
50121} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
50122ac_tmp=$tmp
50123
50124# Set up the scripts for CONFIG_FILES section.
50125# No need to generate them if there are no CONFIG_FILES.
50126# This happens for instance with `./config.status config.h'.
50127if test -n "$CONFIG_FILES"; then
50128
50129
50130ac_cr=`echo X | tr X '\015'`
50131# On cygwin, bash can eat \r inside `` if the user requested igncr.
50132# But we know of no other shell where ac_cr would be empty at this
50133# point, so we can use a bashism as a fallback.
50134if test "x$ac_cr" = x; then
50135  eval ac_cr=\$\'\\r\'
50136fi
50137ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
50138if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
50139  ac_cs_awk_cr='\\r'
50140else
50141  ac_cs_awk_cr=$ac_cr
50142fi
50143
50144echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
50145_ACEOF
50146
50147
50148{
50149  echo "cat >conf$$subs.awk <<_ACEOF" &&
50150  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
50151  echo "_ACEOF"
50152} >conf$$subs.sh ||
50153  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50154ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
50155ac_delim='%!_!# '
50156for ac_last_try in false false false false false :; do
50157  . ./conf$$subs.sh ||
50158    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50159
50160  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
50161  if test $ac_delim_n = $ac_delim_num; then
50162    break
50163  elif $ac_last_try; then
50164    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50165  else
50166    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
50167  fi
50168done
50169rm -f conf$$subs.sh
50170
50171cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50172cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
50173_ACEOF
50174sed -n '
50175h
50176s/^/S["/; s/!.*/"]=/
50177p
50178g
50179s/^[^!]*!//
50180:repl
50181t repl
50182s/'"$ac_delim"'$//
50183t delim
50184:nl
50185h
50186s/\(.\{148\}\)..*/\1/
50187t more1
50188s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
50189p
50190n
50191b repl
50192:more1
50193s/["\\]/\\&/g; s/^/"/; s/$/"\\/
50194p
50195g
50196s/.\{148\}//
50197t nl
50198:delim
50199h
50200s/\(.\{148\}\)..*/\1/
50201t more2
50202s/["\\]/\\&/g; s/^/"/; s/$/"/
50203p
50204b
50205:more2
50206s/["\\]/\\&/g; s/^/"/; s/$/"\\/
50207p
50208g
50209s/.\{148\}//
50210t delim
50211' <conf$$subs.awk | sed '
50212/^[^""]/{
50213  N
50214  s/\n//
50215}
50216' >>$CONFIG_STATUS || ac_write_fail=1
50217rm -f conf$$subs.awk
50218cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50219_ACAWK
50220cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
50221  for (key in S) S_is_set[key] = 1
50222  FS = ""
50223
50224}
50225{
50226  line = $ 0
50227  nfields = split(line, field, "@")
50228  substed = 0
50229  len = length(field[1])
50230  for (i = 2; i < nfields; i++) {
50231    key = field[i]
50232    keylen = length(key)
50233    if (S_is_set[key]) {
50234      value = S[key]
50235      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
50236      len += length(value) + length(field[++i])
50237      substed = 1
50238    } else
50239      len += 1 + keylen
50240  }
50241
50242  print line
50243}
50244
50245_ACAWK
50246_ACEOF
50247cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50248if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
50249  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
50250else
50251  cat
50252fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
50253  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
50254_ACEOF
50255
50256# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
50257# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
50258# trailing colons and then remove the whole line if VPATH becomes empty
50259# (actually we leave an empty line to preserve line numbers).
50260if test "x$srcdir" = x.; then
50261  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
50262h
50263s///
50264s/^/:/
50265s/[	 ]*$/:/
50266s/:\$(srcdir):/:/g
50267s/:\${srcdir}:/:/g
50268s/:@srcdir@:/:/g
50269s/^:*//
50270s/:*$//
50271x
50272s/\(=[	 ]*\).*/\1/
50273G
50274s/\n//
50275s/^[^=]*=[	 ]*$//
50276}'
50277fi
50278
50279cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50280fi # test -n "$CONFIG_FILES"
50281
50282# Set up the scripts for CONFIG_HEADERS section.
50283# No need to generate them if there are no CONFIG_HEADERS.
50284# This happens for instance with `./config.status Makefile'.
50285if test -n "$CONFIG_HEADERS"; then
50286cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
50287BEGIN {
50288_ACEOF
50289
50290# Transform confdefs.h into an awk script `defines.awk', embedded as
50291# here-document in config.status, that substitutes the proper values into
50292# config.h.in to produce config.h.
50293
50294# Create a delimiter string that does not exist in confdefs.h, to ease
50295# handling of long lines.
50296ac_delim='%!_!# '
50297for ac_last_try in false false :; do
50298  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
50299  if test -z "$ac_tt"; then
50300    break
50301  elif $ac_last_try; then
50302    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
50303  else
50304    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
50305  fi
50306done
50307
50308# For the awk script, D is an array of macro values keyed by name,
50309# likewise P contains macro parameters if any.  Preserve backslash
50310# newline sequences.
50311
50312ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
50313sed -n '
50314s/.\{148\}/&'"$ac_delim"'/g
50315t rset
50316:rset
50317s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
50318t def
50319d
50320:def
50321s/\\$//
50322t bsnl
50323s/["\\]/\\&/g
50324s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
50325D["\1"]=" \3"/p
50326s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
50327d
50328:bsnl
50329s/["\\]/\\&/g
50330s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
50331D["\1"]=" \3\\\\\\n"\\/p
50332t cont
50333s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
50334t cont
50335d
50336:cont
50337n
50338s/.\{148\}/&'"$ac_delim"'/g
50339t clear
50340:clear
50341s/\\$//
50342t bsnlc
50343s/["\\]/\\&/g; s/^/"/; s/$/"/p
50344d
50345:bsnlc
50346s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
50347b cont
50348' <confdefs.h | sed '
50349s/'"$ac_delim"'/"\\\
50350"/g' >>$CONFIG_STATUS || ac_write_fail=1
50351
50352cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50353  for (key in D) D_is_set[key] = 1
50354  FS = ""
50355}
50356/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
50357  line = \$ 0
50358  split(line, arg, " ")
50359  if (arg[1] == "#") {
50360    defundef = arg[2]
50361    mac1 = arg[3]
50362  } else {
50363    defundef = substr(arg[1], 2)
50364    mac1 = arg[2]
50365  }
50366  split(mac1, mac2, "(") #)
50367  macro = mac2[1]
50368  prefix = substr(line, 1, index(line, defundef) - 1)
50369  if (D_is_set[macro]) {
50370    # Preserve the white space surrounding the "#".
50371    print prefix "define", macro P[macro] D[macro]
50372    next
50373  } else {
50374    # Replace #undef with comments.  This is necessary, for example,
50375    # in the case of _POSIX_SOURCE, which is predefined and required
50376    # on some systems where configure will not decide to define it.
50377    if (defundef == "undef") {
50378      print "/*", prefix defundef, macro, "*/"
50379      next
50380    }
50381  }
50382}
50383{ print }
50384_ACAWK
50385_ACEOF
50386cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50387  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
50388fi # test -n "$CONFIG_HEADERS"
50389
50390
50391eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
50392shift
50393for ac_tag
50394do
50395  case $ac_tag in
50396  :[FHLC]) ac_mode=$ac_tag; continue;;
50397  esac
50398  case $ac_mode$ac_tag in
50399  :[FHL]*:*);;
50400  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
50401  :[FH]-) ac_tag=-:-;;
50402  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
50403  esac
50404  ac_save_IFS=$IFS
50405  IFS=:
50406  set x $ac_tag
50407  IFS=$ac_save_IFS
50408  shift
50409  ac_file=$1
50410  shift
50411
50412  case $ac_mode in
50413  :L) ac_source=$1;;
50414  :[FH])
50415    ac_file_inputs=
50416    for ac_f
50417    do
50418      case $ac_f in
50419      -) ac_f="$ac_tmp/stdin";;
50420      *) # Look for the file first in the build tree, then in the source tree
50421	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
50422	 # because $ac_f cannot contain `:'.
50423	 test -f "$ac_f" ||
50424	   case $ac_f in
50425	   [\\/$]*) false;;
50426	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
50427	   esac ||
50428	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
50429      esac
50430      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
50431      as_fn_append ac_file_inputs " '$ac_f'"
50432    done
50433
50434    # Let's still pretend it is `configure' which instantiates (i.e., don't
50435    # use $as_me), people would be surprised to read:
50436    #    /* config.h.  Generated by config.status.  */
50437    configure_input='Generated from '`
50438	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
50439	`' by configure.'
50440    if test x"$ac_file" != x-; then
50441      configure_input="$ac_file.  $configure_input"
50442      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
50443$as_echo "$as_me: creating $ac_file" >&6;}
50444    fi
50445    # Neutralize special characters interpreted by sed in replacement strings.
50446    case $configure_input in #(
50447    *\&* | *\|* | *\\* )
50448       ac_sed_conf_input=`$as_echo "$configure_input" |
50449       sed 's/[\\\\&|]/\\\\&/g'`;; #(
50450    *) ac_sed_conf_input=$configure_input;;
50451    esac
50452
50453    case $ac_tag in
50454    *:-:* | *:-) cat >"$ac_tmp/stdin" \
50455      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
50456    esac
50457    ;;
50458  esac
50459
50460  ac_dir=`$as_dirname -- "$ac_file" ||
50461$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
50462	 X"$ac_file" : 'X\(//\)[^/]' \| \
50463	 X"$ac_file" : 'X\(//\)$' \| \
50464	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
50465$as_echo X"$ac_file" |
50466    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
50467	    s//\1/
50468	    q
50469	  }
50470	  /^X\(\/\/\)[^/].*/{
50471	    s//\1/
50472	    q
50473	  }
50474	  /^X\(\/\/\)$/{
50475	    s//\1/
50476	    q
50477	  }
50478	  /^X\(\/\).*/{
50479	    s//\1/
50480	    q
50481	  }
50482	  s/.*/./; q'`
50483  as_dir="$ac_dir"; as_fn_mkdir_p
50484  ac_builddir=.
50485
50486case "$ac_dir" in
50487.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
50488*)
50489  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
50490  # A ".." for each directory in $ac_dir_suffix.
50491  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
50492  case $ac_top_builddir_sub in
50493  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
50494  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
50495  esac ;;
50496esac
50497ac_abs_top_builddir=$ac_pwd
50498ac_abs_builddir=$ac_pwd$ac_dir_suffix
50499# for backward compatibility:
50500ac_top_builddir=$ac_top_build_prefix
50501
50502case $srcdir in
50503  .)  # We are building in place.
50504    ac_srcdir=.
50505    ac_top_srcdir=$ac_top_builddir_sub
50506    ac_abs_top_srcdir=$ac_pwd ;;
50507  [\\/]* | ?:[\\/]* )  # Absolute name.
50508    ac_srcdir=$srcdir$ac_dir_suffix;
50509    ac_top_srcdir=$srcdir
50510    ac_abs_top_srcdir=$srcdir ;;
50511  *) # Relative name.
50512    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
50513    ac_top_srcdir=$ac_top_build_prefix$srcdir
50514    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
50515esac
50516ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
50517
50518
50519  case $ac_mode in
50520  :F)
50521  #
50522  # CONFIG_FILE
50523  #
50524
50525_ACEOF
50526
50527cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50528# If the template does not know about datarootdir, expand it.
50529# FIXME: This hack should be removed a few years after 2.60.
50530ac_datarootdir_hack=; ac_datarootdir_seen=
50531ac_sed_dataroot='
50532/datarootdir/ {
50533  p
50534  q
50535}
50536/@datadir@/p
50537/@docdir@/p
50538/@infodir@/p
50539/@localedir@/p
50540/@mandir@/p'
50541case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
50542*datarootdir*) ac_datarootdir_seen=yes;;
50543*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
50544  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
50545$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
50546_ACEOF
50547cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50548  ac_datarootdir_hack='
50549  s&@datadir@&$datadir&g
50550  s&@docdir@&$docdir&g
50551  s&@infodir@&$infodir&g
50552  s&@localedir@&$localedir&g
50553  s&@mandir@&$mandir&g
50554  s&\\\${datarootdir}&$datarootdir&g' ;;
50555esac
50556_ACEOF
50557
50558# Neutralize VPATH when `$srcdir' = `.'.
50559# Shell code in configure.ac might set extrasub.
50560# FIXME: do we really want to maintain this feature?
50561cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50562ac_sed_extra="$ac_vpsub
50563$extrasub
50564_ACEOF
50565cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50566:t
50567/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
50568s|@configure_input@|$ac_sed_conf_input|;t t
50569s&@top_builddir@&$ac_top_builddir_sub&;t t
50570s&@top_build_prefix@&$ac_top_build_prefix&;t t
50571s&@srcdir@&$ac_srcdir&;t t
50572s&@abs_srcdir@&$ac_abs_srcdir&;t t
50573s&@top_srcdir@&$ac_top_srcdir&;t t
50574s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
50575s&@builddir@&$ac_builddir&;t t
50576s&@abs_builddir@&$ac_abs_builddir&;t t
50577s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
50578$ac_datarootdir_hack
50579"
50580eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
50581  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50582
50583test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
50584  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
50585  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
50586      "$ac_tmp/out"`; test -z "$ac_out"; } &&
50587  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
50588which seems to be undefined.  Please make sure it is defined" >&5
50589$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
50590which seems to be undefined.  Please make sure it is defined" >&2;}
50591
50592  rm -f "$ac_tmp/stdin"
50593  case $ac_file in
50594  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
50595  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
50596  esac \
50597  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50598 ;;
50599  :H)
50600  #
50601  # CONFIG_HEADER
50602  #
50603  if test x"$ac_file" != x-; then
50604    {
50605      $as_echo "/* $configure_input  */" \
50606      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
50607    } >"$ac_tmp/config.h" \
50608      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50609    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
50610      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
50611$as_echo "$as_me: $ac_file is unchanged" >&6;}
50612    else
50613      rm -f "$ac_file"
50614      mv "$ac_tmp/config.h" "$ac_file" \
50615	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
50616    fi
50617  else
50618    $as_echo "/* $configure_input  */" \
50619      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
50620      || as_fn_error $? "could not create -" "$LINENO" 5
50621  fi
50622 ;;
50623
50624
50625  esac
50626
50627done # for ac_tag
50628
50629
50630as_fn_exit 0
50631_ACEOF
50632ac_clean_files=$ac_clean_files_save
50633
50634test $ac_write_fail = 0 ||
50635  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
50636
50637
50638# configure is writing to config.log, and then calls config.status.
50639# config.status does its own redirection, appending to config.log.
50640# Unfortunately, on DOS this fails, as config.log is still kept open
50641# by configure, so config.status won't be able to write to it; its
50642# output is simply discarded.  So we exec the FD to /dev/null,
50643# effectively closing config.log, so it can be properly (re)opened and
50644# appended to by config.status.  When coming back to configure, we
50645# need to make the FD available again.
50646if test "$no_create" != yes; then
50647  ac_cs_success=:
50648  ac_config_status_args=
50649  test "$silent" = yes &&
50650    ac_config_status_args="$ac_config_status_args --quiet"
50651  exec 5>/dev/null
50652  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
50653  exec 5>>config.log
50654  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
50655  # would make configure fail if this is the last instruction.
50656  $ac_cs_success || as_fn_exit 1
50657fi
50658if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
50659  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
50660$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
50661fi
50662
50663
50664# Try to move the config.log file to the output directory.
50665if test -e ./config.log; then
50666  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
50667fi
50668
50669# Make the compare script executable
50670$CHMOD +x $OUTPUT_ROOT/compare.sh
50671
50672# Finally output some useful information to the user
50673
50674  # Finally output some useful information to the user
50675
50676  printf "\n"
50677  printf "====================================================\n"
50678  if test "x$no_create" != "xyes"; then
50679    if test "x$IS_RECONFIGURE" != "xyes"; then
50680      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
50681    else
50682      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
50683    fi
50684  else
50685    if test "x$IS_RECONFIGURE" != "xyes"; then
50686      printf "A configuration has been successfully checked but not created\n"
50687    else
50688      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
50689    fi
50690  fi
50691  if test "x$CONFIGURE_COMMAND_LINE" != x; then
50692    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
50693  else
50694    printf "using default settings.\n"
50695  fi
50696
50697  printf "\n"
50698  printf "Configuration summary:\n"
50699  printf "* Debug level:    $DEBUG_LEVEL\n"
50700  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
50701  printf "* JDK variant:    $JDK_VARIANT\n"
50702  printf "* JVM variants:   $with_jvm_variants\n"
50703  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
50704
50705  printf "\n"
50706  printf "Tools summary:\n"
50707  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
50708    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
50709  fi
50710  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
50711  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
50712  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
50713  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
50714
50715  printf "\n"
50716  printf "Build performance summary:\n"
50717  printf "* Cores to use:   $JOBS\n"
50718  printf "* Memory limit:   $MEMORY_SIZE MB\n"
50719  if test "x$CCACHE_STATUS" != "x"; then
50720    printf "* ccache status:  $CCACHE_STATUS\n"
50721  fi
50722  printf "\n"
50723
50724  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
50725    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
50726    printf "will result in longer build times.\n"
50727    printf "\n"
50728  fi
50729
50730  if test "x$FOUND_ALT_VARIABLES" != "x"; then
50731    printf "WARNING: You have old-style ALT_ environment variables set.\n"
50732    printf "These are not respected, and will be ignored. It is recommended\n"
50733    printf "that you clean your environment. The following variables are set:\n"
50734    printf "$FOUND_ALT_VARIABLES\n"
50735    printf "\n"
50736  fi
50737
50738  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
50739    printf "WARNING: Your build output directory is not on a local disk.\n"
50740    printf "This will severely degrade build performance!\n"
50741    printf "It is recommended that you create an output directory on a local disk,\n"
50742    printf "and run the configure script again from that directory.\n"
50743    printf "\n"
50744  fi
50745
50746  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
50747    printf "WARNING: The result of this configuration has overridden an older\n"
50748    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
50749    printf "proper build. Failure to do so might result in strange build problems.\n"
50750    printf "\n"
50751  fi
50752
50753  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
50754    printf "WARNING: The result of this configuration was not saved.\n"
50755    printf "You should run without '--no-create | -n' to create the configuration.\n"
50756    printf "\n"
50757  fi
50758
50759