generated-configure.sh revision 988:77c150b417d8
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_LIBGIF
657USE_EXTERNAL_LIBJPEG
658ALSA_LIBS
659ALSA_CFLAGS
660FREETYPE_BUNDLE_LIB_PATH
661FREETYPE_LIBS
662FREETYPE_CFLAGS
663CUPS_CFLAGS
664OPENWIN_HOME
665X_EXTRA_LIBS
666X_LIBS
667X_PRE_LIBS
668X_CFLAGS
669XMKMF
670FIXPATH
671ZIP_DEBUGINFO_FILES
672ENABLE_DEBUG_SYMBOLS
673COMPILER_SUPPORTS_TARGET_BITS_FLAG
674ZERO_ARCHFLAG
675LDFLAGS_CXX_JDK
676LDFLAGS_JDKEXE_SUFFIX
677LDFLAGS_JDKLIB_SUFFIX
678LDFLAGS_JDKEXE
679LDFLAGS_JDKLIB
680CXXFLAGS_JDKEXE
681CXXFLAGS_JDKLIB
682CFLAGS_JDKEXE
683CFLAGS_JDKLIB
684MACOSX_VERSION_MIN
685LEGACY_EXTRA_LDFLAGS
686LEGACY_EXTRA_CXXFLAGS
687LEGACY_EXTRA_CFLAGS
688CXX_O_FLAG_NONE
689CXX_O_FLAG_NORM
690CXX_O_FLAG_HI
691CXX_O_FLAG_HIGHEST
692C_O_FLAG_NONE
693C_O_FLAG_NORM
694C_O_FLAG_HI
695C_O_FLAG_HIGHEST
696CXXFLAGS_DEBUG_SYMBOLS
697CFLAGS_DEBUG_SYMBOLS
698CXX_FLAG_DEPS
699C_FLAG_DEPS
700SET_SHARED_LIBRARY_MAPFILE
701SET_SHARED_LIBRARY_NAME
702SET_SHARED_LIBRARY_ORIGIN
703SET_EXECUTABLE_ORIGIN
704SHARED_LIBRARY_FLAGS
705CXX_FLAG_REORDER
706C_FLAG_REORDER
707RC_FLAGS
708AR_OUT_OPTION
709LD_OUT_OPTION
710EXE_OUT_OPTION
711CC_OUT_OPTION
712POST_MCS_CMD
713POST_STRIP_CMD
714ARFLAGS
715COMPILER_TARGET_BITS_FLAG
716JT_HOME
717JTREGEXE
718USING_BROKEN_SUSE_LD
719PACKAGE_PATH
720LDEXECXX
721LDEXE
722USE_CLANG
723HOTSPOT_LD
724HOTSPOT_CXX
725HOTSPOT_RC
726HOTSPOT_MT
727BUILD_LD
728BUILD_CXX
729BUILD_CC
730ac_ct_OBJDUMP
731OBJDUMP
732ac_ct_OBJCOPY
733OBJCOPY
734ac_ct_NM
735ac_ct_STRIP
736MCS
737GNM
738NM
739STRIP
740DUMPBIN
741RC
742MT
743LIPO
744ac_ct_OBJC
745OBJCFLAGS
746OBJC
747ac_ct_AR
748AR
749AS
750LDCXX
751LD
752CXXCPP
753CPP
754ac_ct_CXX
755CXXFLAGS
756CXX
757ac_ct_PROPER_COMPILER_CXX
758PROPER_COMPILER_CXX
759TOOLS_DIR_CXX
760POTENTIAL_CXX
761OBJEXT
762EXEEXT
763ac_ct_CC
764CPPFLAGS
765LDFLAGS
766CFLAGS
767CC
768ac_ct_PROPER_COMPILER_CC
769PROPER_COMPILER_CC
770TOOLS_DIR_CC
771POTENTIAL_CC
772VS_PATH
773VS_LIB
774VS_INCLUDE
775CYGWIN_LINK
776EXE_SUFFIX
777OBJ_SUFFIX
778STATIC_LIBRARY
779SHARED_LIBRARY
780STATIC_LIBRARY_SUFFIX
781SHARED_LIBRARY_SUFFIX
782LIBRARY_PREFIX
783TOOLCHAIN_TYPE
784BUILD_HOTSPOT
785HOTSPOT_DIST
786BUILD_OUTPUT
787OVERRIDE_SRC_ROOT
788ADD_SRC_ROOT
789JDK_TOPDIR
790NASHORN_TOPDIR
791HOTSPOT_TOPDIR
792JAXWS_TOPDIR
793JAXP_TOPDIR
794CORBA_TOPDIR
795LANGTOOLS_TOPDIR
796JAVA_FLAGS
797BOOT_JDK_JVMARGS
798JAVAC_FLAGS
799BOOT_JDK_SOURCETARGET
800JARSIGNER
801NATIVE2ASCII
802JAR
803JAVAH
804JAVAC
805JAVA
806BOOT_JDK
807BOOT_TOOLSJAR
808BOOT_RTJAR
809JAVA_CHECK
810JAVAC_CHECK
811COOKED_BUILD_NUMBER
812JDK_VERSION
813COPYRIGHT_YEAR
814MACOSX_BUNDLE_ID_BASE
815MACOSX_BUNDLE_NAME_BASE
816COMPANY_NAME
817JDK_RC_PLATFORM_NAME
818PRODUCT_SUFFIX
819PRODUCT_NAME
820LAUNCHER_NAME
821MILESTONE
822JDK_BUILD_NUMBER
823JDK_UPDATE_VERSION
824JDK_MICRO_VERSION
825JDK_MINOR_VERSION
826JDK_MAJOR_VERSION
827USER_RELEASE_SUFFIX
828COMPRESS_JARS
829RMICONNECTOR_IIOP
830UNLIMITED_CRYPTO
831CACERTS_FILE
832TEST_IN_BUILD
833BUILD_HEADLESS
834SUPPORT_HEADFUL
835SUPPORT_HEADLESS
836BDEPS_FTP
837BDEPS_UNZIP
838OS_VERSION_MICRO
839OS_VERSION_MINOR
840OS_VERSION_MAJOR
841PKG_CONFIG
842CODESIGN
843XATTR
844DSYMUTIL
845IS_GNU_TIME
846TIME
847STAT
848HG
849READELF
850OTOOL
851LDD
852ZIP
853UNZIP
854FIND_DELETE
855MAKE
856CHECK_TOOLSDIR_MAKE
857CHECK_TOOLSDIR_GMAKE
858CHECK_MAKE
859CHECK_GMAKE
860PKGHANDLER
861OUTPUT_ROOT
862CONF_NAME
863SPEC
864BUILD_VARIANT_RELEASE
865DEBUG_CLASSFILES
866FASTDEBUG
867VARIANT
868DEBUG_LEVEL
869MACOSX_UNIVERSAL
870INCLUDE_SA
871JVM_VARIANT_CORE
872JVM_VARIANT_ZEROSHARK
873JVM_VARIANT_ZERO
874JVM_VARIANT_KERNEL
875JVM_VARIANT_MINIMAL1
876JVM_VARIANT_CLIENT
877JVM_VARIANT_SERVER
878JVM_VARIANTS
879JVM_INTERPRETER
880JDK_VARIANT
881SET_OPENJDK
882BUILD_LOG_WRAPPER
883BUILD_LOG_PREVIOUS
884BUILD_LOG
885SYS_ROOT
886TOPDIR
887PATH_SEP
888ZERO_ARCHDEF
889DEFINE_CROSS_COMPILE_ARCH
890LP64
891OPENJDK_TARGET_OS_EXPORT_DIR
892OPENJDK_TARGET_OS_API_DIR
893OPENJDK_TARGET_CPU_JLI_CFLAGS
894OPENJDK_TARGET_CPU_OSARCH
895OPENJDK_TARGET_CPU_ISADIR
896OPENJDK_TARGET_CPU_LIBDIR
897OPENJDK_TARGET_CPU_LEGACY_LIB
898OPENJDK_TARGET_CPU_LEGACY
899REQUIRED_OS_VERSION
900REQUIRED_OS_NAME
901COMPILE_TYPE
902OPENJDK_TARGET_CPU_ENDIAN
903OPENJDK_TARGET_CPU_BITS
904OPENJDK_TARGET_CPU_ARCH
905OPENJDK_TARGET_CPU
906OPENJDK_TARGET_OS_API
907OPENJDK_TARGET_OS
908OPENJDK_BUILD_CPU_ENDIAN
909OPENJDK_BUILD_CPU_BITS
910OPENJDK_BUILD_CPU_ARCH
911OPENJDK_BUILD_CPU
912OPENJDK_BUILD_OS_API
913OPENJDK_BUILD_OS
914OPENJDK_BUILD_AUTOCONF_NAME
915OPENJDK_TARGET_AUTOCONF_NAME
916target_os
917target_vendor
918target_cpu
919target
920host_os
921host_vendor
922host_cpu
923host
924build_os
925build_vendor
926build_cpu
927build
928SETFILE
929DF
930READLINK
931CYGPATH
932SED
933FGREP
934EGREP
935GREP
936AWK
937XARGS
938WHICH
939WC
940UNIQ
941UNAME
942TR
943TOUCH
944TEE
945TAR
946TAIL
947SORT
948SH
949RM
950PRINTF
951NAWK
952MV
953MKTEMP
954MKDIR
955LS
956LN
957HEAD
958FIND
959FILE
960EXPR
961ECHO
962DIRNAME
963DIFF
964DATE
965CUT
966CPIO
967CP
968COMM
969CMP
970CHMOD
971CAT
972BASH
973BASENAME
974DATE_WHEN_CONFIGURED
975CONFIGURE_COMMAND_LINE
976target_alias
977host_alias
978build_alias
979LIBS
980ECHO_T
981ECHO_N
982ECHO_C
983DEFS
984mandir
985localedir
986libdir
987psdir
988pdfdir
989dvidir
990htmldir
991infodir
992docdir
993oldincludedir
994includedir
995localstatedir
996sharedstatedir
997sysconfdir
998datadir
999datarootdir
1000libexecdir
1001sbindir
1002bindir
1003program_transform_name
1004prefix
1005exec_prefix
1006PACKAGE_URL
1007PACKAGE_BUGREPORT
1008PACKAGE_STRING
1009PACKAGE_VERSION
1010PACKAGE_TARNAME
1011PACKAGE_NAME
1012PATH_SEPARATOR
1013SHELL'
1014ac_subst_files=''
1015ac_user_opts='
1016enable_option_checking
1017with_target_bits
1018with_sys_root
1019with_tools_dir
1020with_devkit
1021enable_openjdk_only
1022with_custom_make_dir
1023with_jdk_variant
1024with_jvm_interpreter
1025with_jvm_variants
1026enable_debug
1027with_debug_level
1028with_conf_name
1029with_builddeps_conf
1030with_builddeps_server
1031with_builddeps_dir
1032with_builddeps_group
1033enable_headful
1034enable_hotspot_test_in_build
1035with_cacerts_file
1036enable_unlimited_crypto
1037enable_rmiconnector_iiop
1038with_milestone
1039with_update_version
1040with_user_release_suffix
1041with_build_number
1042with_boot_jdk
1043with_boot_jdk_jvmargs
1044with_add_source_root
1045with_override_source_root
1046with_adds_and_overrides
1047with_override_langtools
1048with_override_corba
1049with_override_jaxp
1050with_override_jaxws
1051with_override_hotspot
1052with_override_nashorn
1053with_override_jdk
1054with_import_hotspot
1055with_toolchain_type
1056with_jtreg
1057with_extra_cflags
1058with_extra_cxxflags
1059with_extra_ldflags
1060enable_debug_symbols
1061enable_zip_debug_info
1062enable_macosx_runtime_support
1063with_x
1064with_cups
1065with_cups_include
1066with_freetype
1067with_freetype_include
1068with_freetype_lib
1069enable_freetype_bundling
1070with_alsa
1071with_alsa_include
1072with_alsa_lib
1073with_giflib
1074with_zlib
1075with_stdc__lib
1076with_msvcr_dll
1077with_dxsdk
1078with_dxsdk_lib
1079with_dxsdk_include
1080with_num_cores
1081with_memory_size
1082with_jobs
1083with_sjavac_server_java
1084enable_sjavac
1085enable_precompiled_headers
1086enable_ccache
1087with_ccache_dir
1088'
1089      ac_precious_vars='build_alias
1090host_alias
1091target_alias
1092BASENAME
1093BASH
1094CAT
1095CHMOD
1096CMP
1097COMM
1098CP
1099CPIO
1100CUT
1101DATE
1102DIFF
1103DIRNAME
1104ECHO
1105EXPR
1106FILE
1107FIND
1108HEAD
1109LN
1110LS
1111MKDIR
1112MKTEMP
1113MV
1114NAWK
1115PRINTF
1116RM
1117SH
1118SORT
1119TAIL
1120TAR
1121TEE
1122TOUCH
1123TR
1124UNAME
1125UNIQ
1126WC
1127WHICH
1128XARGS
1129AWK
1130GREP
1131EGREP
1132FGREP
1133SED
1134CYGPATH
1135READLINK
1136DF
1137SETFILE
1138UNZIP
1139ZIP
1140LDD
1141OTOOL
1142READELF
1143HG
1144STAT
1145TIME
1146DSYMUTIL
1147XATTR
1148CODESIGN
1149PKG_CONFIG
1150JAVA
1151JAVAC
1152JAVAH
1153JAR
1154NATIVE2ASCII
1155JARSIGNER
1156CC
1157CFLAGS
1158LDFLAGS
1159LIBS
1160CPPFLAGS
1161CXX
1162CXXFLAGS
1163CCC
1164CPP
1165CXXCPP
1166AS
1167AR
1168OBJC
1169OBJCFLAGS
1170LIPO
1171STRIP
1172NM
1173GNM
1174MCS
1175OBJCOPY
1176OBJDUMP
1177BUILD_CC
1178BUILD_CXX
1179BUILD_LD
1180JTREGEXE
1181XMKMF
1182FREETYPE_CFLAGS
1183FREETYPE_LIBS
1184ALSA_CFLAGS
1185ALSA_LIBS
1186LIBFFI_CFLAGS
1187LIBFFI_LIBS
1188CCACHE'
1189
1190
1191# Initialize some variables set by options.
1192ac_init_help=
1193ac_init_version=false
1194ac_unrecognized_opts=
1195ac_unrecognized_sep=
1196# The variables have the same names as the options, with
1197# dashes changed to underlines.
1198cache_file=/dev/null
1199exec_prefix=NONE
1200no_create=
1201no_recursion=
1202prefix=NONE
1203program_prefix=NONE
1204program_suffix=NONE
1205program_transform_name=s,x,x,
1206silent=
1207site=
1208srcdir=
1209verbose=
1210x_includes=NONE
1211x_libraries=NONE
1212
1213# Installation directory options.
1214# These are left unexpanded so users can "make install exec_prefix=/foo"
1215# and all the variables that are supposed to be based on exec_prefix
1216# by default will actually change.
1217# Use braces instead of parens because sh, perl, etc. also accept them.
1218# (The list follows the same order as the GNU Coding Standards.)
1219bindir='${exec_prefix}/bin'
1220sbindir='${exec_prefix}/sbin'
1221libexecdir='${exec_prefix}/libexec'
1222datarootdir='${prefix}/share'
1223datadir='${datarootdir}'
1224sysconfdir='${prefix}/etc'
1225sharedstatedir='${prefix}/com'
1226localstatedir='${prefix}/var'
1227includedir='${prefix}/include'
1228oldincludedir='/usr/include'
1229docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1230infodir='${datarootdir}/info'
1231htmldir='${docdir}'
1232dvidir='${docdir}'
1233pdfdir='${docdir}'
1234psdir='${docdir}'
1235libdir='${exec_prefix}/lib'
1236localedir='${datarootdir}/locale'
1237mandir='${datarootdir}/man'
1238
1239ac_prev=
1240ac_dashdash=
1241for ac_option
1242do
1243  # If the previous option needs an argument, assign it.
1244  if test -n "$ac_prev"; then
1245    eval $ac_prev=\$ac_option
1246    ac_prev=
1247    continue
1248  fi
1249
1250  case $ac_option in
1251  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1252  *=)   ac_optarg= ;;
1253  *)    ac_optarg=yes ;;
1254  esac
1255
1256  # Accept the important Cygnus configure options, so we can diagnose typos.
1257
1258  case $ac_dashdash$ac_option in
1259  --)
1260    ac_dashdash=yes ;;
1261
1262  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1263    ac_prev=bindir ;;
1264  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1265    bindir=$ac_optarg ;;
1266
1267  -build | --build | --buil | --bui | --bu)
1268    ac_prev=build_alias ;;
1269  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1270    build_alias=$ac_optarg ;;
1271
1272  -cache-file | --cache-file | --cache-fil | --cache-fi \
1273  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1274    ac_prev=cache_file ;;
1275  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1276  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1277    cache_file=$ac_optarg ;;
1278
1279  --config-cache | -C)
1280    cache_file=config.cache ;;
1281
1282  -datadir | --datadir | --datadi | --datad)
1283    ac_prev=datadir ;;
1284  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1285    datadir=$ac_optarg ;;
1286
1287  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1288  | --dataroo | --dataro | --datar)
1289    ac_prev=datarootdir ;;
1290  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1291  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1292    datarootdir=$ac_optarg ;;
1293
1294  -disable-* | --disable-*)
1295    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1296    # Reject names that are not valid shell variable names.
1297    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1298      as_fn_error $? "invalid feature name: $ac_useropt"
1299    ac_useropt_orig=$ac_useropt
1300    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1301    case $ac_user_opts in
1302      *"
1303"enable_$ac_useropt"
1304"*) ;;
1305      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1306	 ac_unrecognized_sep=', ';;
1307    esac
1308    eval enable_$ac_useropt=no ;;
1309
1310  -docdir | --docdir | --docdi | --doc | --do)
1311    ac_prev=docdir ;;
1312  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1313    docdir=$ac_optarg ;;
1314
1315  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1316    ac_prev=dvidir ;;
1317  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1318    dvidir=$ac_optarg ;;
1319
1320  -enable-* | --enable-*)
1321    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1322    # Reject names that are not valid shell variable names.
1323    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1324      as_fn_error $? "invalid feature name: $ac_useropt"
1325    ac_useropt_orig=$ac_useropt
1326    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1327    case $ac_user_opts in
1328      *"
1329"enable_$ac_useropt"
1330"*) ;;
1331      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1332	 ac_unrecognized_sep=', ';;
1333    esac
1334    eval enable_$ac_useropt=\$ac_optarg ;;
1335
1336  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1337  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1338  | --exec | --exe | --ex)
1339    ac_prev=exec_prefix ;;
1340  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1341  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1342  | --exec=* | --exe=* | --ex=*)
1343    exec_prefix=$ac_optarg ;;
1344
1345  -gas | --gas | --ga | --g)
1346    # Obsolete; use --with-gas.
1347    with_gas=yes ;;
1348
1349  -help | --help | --hel | --he | -h)
1350    ac_init_help=long ;;
1351  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1352    ac_init_help=recursive ;;
1353  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1354    ac_init_help=short ;;
1355
1356  -host | --host | --hos | --ho)
1357    ac_prev=host_alias ;;
1358  -host=* | --host=* | --hos=* | --ho=*)
1359    host_alias=$ac_optarg ;;
1360
1361  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1362    ac_prev=htmldir ;;
1363  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1364  | --ht=*)
1365    htmldir=$ac_optarg ;;
1366
1367  -includedir | --includedir | --includedi | --included | --include \
1368  | --includ | --inclu | --incl | --inc)
1369    ac_prev=includedir ;;
1370  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1371  | --includ=* | --inclu=* | --incl=* | --inc=*)
1372    includedir=$ac_optarg ;;
1373
1374  -infodir | --infodir | --infodi | --infod | --info | --inf)
1375    ac_prev=infodir ;;
1376  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1377    infodir=$ac_optarg ;;
1378
1379  -libdir | --libdir | --libdi | --libd)
1380    ac_prev=libdir ;;
1381  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1382    libdir=$ac_optarg ;;
1383
1384  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1385  | --libexe | --libex | --libe)
1386    ac_prev=libexecdir ;;
1387  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1388  | --libexe=* | --libex=* | --libe=*)
1389    libexecdir=$ac_optarg ;;
1390
1391  -localedir | --localedir | --localedi | --localed | --locale)
1392    ac_prev=localedir ;;
1393  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1394    localedir=$ac_optarg ;;
1395
1396  -localstatedir | --localstatedir | --localstatedi | --localstated \
1397  | --localstate | --localstat | --localsta | --localst | --locals)
1398    ac_prev=localstatedir ;;
1399  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1400  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1401    localstatedir=$ac_optarg ;;
1402
1403  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1404    ac_prev=mandir ;;
1405  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1406    mandir=$ac_optarg ;;
1407
1408  -nfp | --nfp | --nf)
1409    # Obsolete; use --without-fp.
1410    with_fp=no ;;
1411
1412  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1413  | --no-cr | --no-c | -n)
1414    no_create=yes ;;
1415
1416  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1417  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1418    no_recursion=yes ;;
1419
1420  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1421  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1422  | --oldin | --oldi | --old | --ol | --o)
1423    ac_prev=oldincludedir ;;
1424  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1425  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1426  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1427    oldincludedir=$ac_optarg ;;
1428
1429  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1430    ac_prev=prefix ;;
1431  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1432    prefix=$ac_optarg ;;
1433
1434  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1435  | --program-pre | --program-pr | --program-p)
1436    ac_prev=program_prefix ;;
1437  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1438  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1439    program_prefix=$ac_optarg ;;
1440
1441  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1442  | --program-suf | --program-su | --program-s)
1443    ac_prev=program_suffix ;;
1444  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1445  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1446    program_suffix=$ac_optarg ;;
1447
1448  -program-transform-name | --program-transform-name \
1449  | --program-transform-nam | --program-transform-na \
1450  | --program-transform-n | --program-transform- \
1451  | --program-transform | --program-transfor \
1452  | --program-transfo | --program-transf \
1453  | --program-trans | --program-tran \
1454  | --progr-tra | --program-tr | --program-t)
1455    ac_prev=program_transform_name ;;
1456  -program-transform-name=* | --program-transform-name=* \
1457  | --program-transform-nam=* | --program-transform-na=* \
1458  | --program-transform-n=* | --program-transform-=* \
1459  | --program-transform=* | --program-transfor=* \
1460  | --program-transfo=* | --program-transf=* \
1461  | --program-trans=* | --program-tran=* \
1462  | --progr-tra=* | --program-tr=* | --program-t=*)
1463    program_transform_name=$ac_optarg ;;
1464
1465  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1466    ac_prev=pdfdir ;;
1467  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1468    pdfdir=$ac_optarg ;;
1469
1470  -psdir | --psdir | --psdi | --psd | --ps)
1471    ac_prev=psdir ;;
1472  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1473    psdir=$ac_optarg ;;
1474
1475  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1476  | -silent | --silent | --silen | --sile | --sil)
1477    silent=yes ;;
1478
1479  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1480    ac_prev=sbindir ;;
1481  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1482  | --sbi=* | --sb=*)
1483    sbindir=$ac_optarg ;;
1484
1485  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1486  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1487  | --sharedst | --shareds | --shared | --share | --shar \
1488  | --sha | --sh)
1489    ac_prev=sharedstatedir ;;
1490  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1491  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1492  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1493  | --sha=* | --sh=*)
1494    sharedstatedir=$ac_optarg ;;
1495
1496  -site | --site | --sit)
1497    ac_prev=site ;;
1498  -site=* | --site=* | --sit=*)
1499    site=$ac_optarg ;;
1500
1501  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1502    ac_prev=srcdir ;;
1503  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1504    srcdir=$ac_optarg ;;
1505
1506  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1507  | --syscon | --sysco | --sysc | --sys | --sy)
1508    ac_prev=sysconfdir ;;
1509  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1510  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1511    sysconfdir=$ac_optarg ;;
1512
1513  -target | --target | --targe | --targ | --tar | --ta | --t)
1514    ac_prev=target_alias ;;
1515  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1516    target_alias=$ac_optarg ;;
1517
1518  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1519    verbose=yes ;;
1520
1521  -version | --version | --versio | --versi | --vers | -V)
1522    ac_init_version=: ;;
1523
1524  -with-* | --with-*)
1525    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1526    # Reject names that are not valid shell variable names.
1527    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1528      as_fn_error $? "invalid package name: $ac_useropt"
1529    ac_useropt_orig=$ac_useropt
1530    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1531    case $ac_user_opts in
1532      *"
1533"with_$ac_useropt"
1534"*) ;;
1535      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1536	 ac_unrecognized_sep=', ';;
1537    esac
1538    eval with_$ac_useropt=\$ac_optarg ;;
1539
1540  -without-* | --without-*)
1541    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1542    # Reject names that are not valid shell variable names.
1543    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1544      as_fn_error $? "invalid package name: $ac_useropt"
1545    ac_useropt_orig=$ac_useropt
1546    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1547    case $ac_user_opts in
1548      *"
1549"with_$ac_useropt"
1550"*) ;;
1551      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1552	 ac_unrecognized_sep=', ';;
1553    esac
1554    eval with_$ac_useropt=no ;;
1555
1556  --x)
1557    # Obsolete; use --with-x.
1558    with_x=yes ;;
1559
1560  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1561  | --x-incl | --x-inc | --x-in | --x-i)
1562    ac_prev=x_includes ;;
1563  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1564  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1565    x_includes=$ac_optarg ;;
1566
1567  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1568  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1569    ac_prev=x_libraries ;;
1570  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1571  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1572    x_libraries=$ac_optarg ;;
1573
1574  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1575Try \`$0 --help' for more information"
1576    ;;
1577
1578  *=*)
1579    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1580    # Reject names that are not valid shell variable names.
1581    case $ac_envvar in #(
1582      '' | [0-9]* | *[!_$as_cr_alnum]* )
1583      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1584    esac
1585    eval $ac_envvar=\$ac_optarg
1586    export $ac_envvar ;;
1587
1588  *)
1589    # FIXME: should be removed in autoconf 3.0.
1590    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1591    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1592      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1593    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1594    ;;
1595
1596  esac
1597done
1598
1599if test -n "$ac_prev"; then
1600  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1601  as_fn_error $? "missing argument to $ac_option"
1602fi
1603
1604if test -n "$ac_unrecognized_opts"; then
1605  case $enable_option_checking in
1606    no) ;;
1607    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1608    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1609  esac
1610fi
1611
1612# Check all directory arguments for consistency.
1613for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1614		datadir sysconfdir sharedstatedir localstatedir includedir \
1615		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1616		libdir localedir mandir
1617do
1618  eval ac_val=\$$ac_var
1619  # Remove trailing slashes.
1620  case $ac_val in
1621    */ )
1622      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1623      eval $ac_var=\$ac_val;;
1624  esac
1625  # Be sure to have absolute directory names.
1626  case $ac_val in
1627    [\\/$]* | ?:[\\/]* )  continue;;
1628    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1629  esac
1630  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1631done
1632
1633# There might be people who depend on the old broken behavior: `$host'
1634# used to hold the argument of --host etc.
1635# FIXME: To remove some day.
1636build=$build_alias
1637host=$host_alias
1638target=$target_alias
1639
1640# FIXME: To remove some day.
1641if test "x$host_alias" != x; then
1642  if test "x$build_alias" = x; then
1643    cross_compiling=maybe
1644  elif test "x$build_alias" != "x$host_alias"; then
1645    cross_compiling=yes
1646  fi
1647fi
1648
1649ac_tool_prefix=
1650test -n "$host_alias" && ac_tool_prefix=$host_alias-
1651
1652test "$silent" = yes && exec 6>/dev/null
1653
1654
1655ac_pwd=`pwd` && test -n "$ac_pwd" &&
1656ac_ls_di=`ls -di .` &&
1657ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1658  as_fn_error $? "working directory cannot be determined"
1659test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1660  as_fn_error $? "pwd does not report name of working directory"
1661
1662
1663# Find the source files, if location was not specified.
1664if test -z "$srcdir"; then
1665  ac_srcdir_defaulted=yes
1666  # Try the directory containing this script, then the parent directory.
1667  ac_confdir=`$as_dirname -- "$as_myself" ||
1668$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1669	 X"$as_myself" : 'X\(//\)[^/]' \| \
1670	 X"$as_myself" : 'X\(//\)$' \| \
1671	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1672$as_echo X"$as_myself" |
1673    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1674	    s//\1/
1675	    q
1676	  }
1677	  /^X\(\/\/\)[^/].*/{
1678	    s//\1/
1679	    q
1680	  }
1681	  /^X\(\/\/\)$/{
1682	    s//\1/
1683	    q
1684	  }
1685	  /^X\(\/\).*/{
1686	    s//\1/
1687	    q
1688	  }
1689	  s/.*/./; q'`
1690  srcdir=$ac_confdir
1691  if test ! -r "$srcdir/$ac_unique_file"; then
1692    srcdir=..
1693  fi
1694else
1695  ac_srcdir_defaulted=no
1696fi
1697if test ! -r "$srcdir/$ac_unique_file"; then
1698  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1699  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1700fi
1701ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1702ac_abs_confdir=`(
1703	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1704	pwd)`
1705# When building in place, set srcdir=.
1706if test "$ac_abs_confdir" = "$ac_pwd"; then
1707  srcdir=.
1708fi
1709# Remove unnecessary trailing slashes from srcdir.
1710# Double slashes in file names in object file debugging info
1711# mess up M-x gdb in Emacs.
1712case $srcdir in
1713*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1714esac
1715for ac_var in $ac_precious_vars; do
1716  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1717  eval ac_env_${ac_var}_value=\$${ac_var}
1718  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1719  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1720done
1721
1722#
1723# Report the --help message.
1724#
1725if test "$ac_init_help" = "long"; then
1726  # Omit some internal or obsolete options to make the list less imposing.
1727  # This message is too long to be a string in the A/UX 3.1 sh.
1728  cat <<_ACEOF
1729\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1730
1731Usage: $0 [OPTION]... [VAR=VALUE]...
1732
1733To assign environment variables (e.g., CC, CFLAGS...), specify them as
1734VAR=VALUE.  See below for descriptions of some of the useful variables.
1735
1736Defaults for the options are specified in brackets.
1737
1738Configuration:
1739  -h, --help              display this help and exit
1740      --help=short        display options specific to this package
1741      --help=recursive    display the short help of all the included packages
1742  -V, --version           display version information and exit
1743  -q, --quiet, --silent   do not print \`checking ...' messages
1744      --cache-file=FILE   cache test results in FILE [disabled]
1745  -C, --config-cache      alias for \`--cache-file=config.cache'
1746  -n, --no-create         do not create output files
1747      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1748
1749Installation directories:
1750  --prefix=PREFIX         install architecture-independent files in PREFIX
1751                          [$ac_default_prefix]
1752  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1753                          [PREFIX]
1754
1755By default, \`make install' will install all the files in
1756\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1757an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1758for instance \`--prefix=\$HOME'.
1759
1760For better control, use the options below.
1761
1762Fine tuning of the installation directories:
1763  --bindir=DIR            user executables [EPREFIX/bin]
1764  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1765  --libexecdir=DIR        program executables [EPREFIX/libexec]
1766  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1767  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1768  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1769  --libdir=DIR            object code libraries [EPREFIX/lib]
1770  --includedir=DIR        C header files [PREFIX/include]
1771  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1772  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1773  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1774  --infodir=DIR           info documentation [DATAROOTDIR/info]
1775  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1776  --mandir=DIR            man documentation [DATAROOTDIR/man]
1777  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1778  --htmldir=DIR           html documentation [DOCDIR]
1779  --dvidir=DIR            dvi documentation [DOCDIR]
1780  --pdfdir=DIR            pdf documentation [DOCDIR]
1781  --psdir=DIR             ps documentation [DOCDIR]
1782_ACEOF
1783
1784  cat <<\_ACEOF
1785
1786X features:
1787  --x-includes=DIR    X include files are in DIR
1788  --x-libraries=DIR   X library files are in DIR
1789
1790System types:
1791  --build=BUILD     configure for building on BUILD [guessed]
1792  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1793  --target=TARGET   configure for building compilers for TARGET [HOST]
1794_ACEOF
1795fi
1796
1797if test -n "$ac_init_help"; then
1798  case $ac_init_help in
1799     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1800   esac
1801  cat <<\_ACEOF
1802
1803Optional Features:
1804  --disable-option-checking  ignore unrecognized --enable/--with options
1805  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1806  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1807  --enable-openjdk-only   suppress building custom source even if present
1808                          [disabled]
1809  --enable-debug          set the debug level to fastdebug (shorthand for
1810                          --with-debug-level=fastdebug) [disabled]
1811  --disable-headful       disable building headful support (graphical UI
1812                          support) [enabled]
1813  --enable-hotspot-test-in-build
1814                          run the Queens test after Hotspot build [disabled]
1815  --enable-unlimited-crypto
1816                          Enable unlimited crypto policy [disabled]
1817  --enable-rmiconnector-iiop
1818                          enable the JMX RMIConnector iiop transport
1819                          [disabled]
1820  --disable-debug-symbols disable generation of debug symbols [enabled]
1821  --disable-zip-debug-info
1822                          disable zipping of debug-info files [enabled]
1823  --enable-macosx-runtime-support
1824                          Deprecated. Option is kept for backwards
1825                          compatibility and is ignored
1826  --disable-freetype-bundling
1827                          disable bundling of the freetype library with the
1828                          build result [enabled on Windows or when using
1829                          --with-freetype, disabled otherwise]
1830  --enable-sjavac         use sjavac to do fast incremental compiles
1831                          [disabled]
1832  --disable-precompiled-headers
1833                          disable using precompiled headers when compiling C++
1834                          [enabled]
1835  --enable-ccache         enable using ccache to speed up recompilations
1836                          [disabled]
1837
1838Optional Packages:
1839  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1840  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1841  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1842                          support it), e.g. --with-target-bits=32 [guessed]
1843  --with-sys-root         pass this sys-root to the compilers and tools (for
1844                          cross-compiling)
1845  --with-tools-dir        search this directory for compilers and tools (for
1846                          cross-compiling)
1847  --with-devkit           use this directory as base for tools-dir and
1848                          sys-root (for cross-compiling)
1849  --with-custom-make-dir  Deprecated. Option is kept for backwards
1850                          compatibility and is ignored
1851  --with-jdk-variant      JDK variant to build (normal) [normal]
1852  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1853  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1854                          client, minimal1, kernel, zero, zeroshark, core)
1855                          [server]
1856  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1857                          [release]
1858  --with-conf-name        use this as the name of the configuration [generated
1859                          from important configuration options]
1860  --with-builddeps-conf   use this configuration file for the builddeps
1861  --with-builddeps-server download and use build dependencies from this server
1862                          url
1863  --with-builddeps-dir    store downloaded build dependencies here
1864                          [/localhome/builddeps]
1865  --with-builddeps-group  chgrp the downloaded build dependencies to this
1866                          group
1867  --with-cacerts-file     specify alternative cacerts file
1868  --with-milestone        Set milestone value for build [internal]
1869  --with-update-version   Set update version value for build [b00]
1870  --with-user-release-suffix
1871                          Add a custom string to the version string if build
1872                          number is not set.[username_builddateb00]
1873  --with-build-number     Set build number value for build [b00]
1874  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1875  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1876                          invocations of boot JDK, overriding the default
1877                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1878                          -enableassertions"
1879  --with-add-source-root  for each and every source directory, look in this
1880                          additional source root for the same directory; if it
1881                          exists and have files in it, include it in the build
1882  --with-override-source-root
1883                          for each and every source directory, look in this
1884                          override source root for the same directory; if it
1885                          exists, use that directory instead and ignore the
1886                          directory in the original source root
1887  --with-adds-and-overrides
1888                          use the subdirs 'adds' and 'overrides' in the
1889                          specified directory as add-source-root and
1890                          override-source-root
1891  --with-override-langtools
1892                          use this langtools dir for the build
1893  --with-override-corba   use this corba dir for the build
1894  --with-override-jaxp    use this jaxp dir for the build
1895  --with-override-jaxws   use this jaxws dir for the build
1896  --with-override-hotspot use this hotspot dir for the build
1897  --with-override-nashorn use this nashorn dir for the build
1898  --with-override-jdk     use this jdk dir for the build
1899  --with-import-hotspot   import hotspot binaries from this jdk image or
1900                          hotspot build dist dir instead of building from
1901                          source
1902  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1903                          to show possible values [platform dependent]
1904  --with-jtreg            Regression Test Harness [probed]
1905  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1906  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1907  --with-extra-ldflags    extra flags to be used when linking jdk
1908  --with-x                use the X Window System
1909  --with-cups             specify prefix directory for the cups package
1910                          (expecting the headers under PATH/include)
1911  --with-cups-include     specify directory for the cups include files
1912  --with-freetype         specify prefix directory for the freetype package
1913                          (expecting the libraries under PATH/lib and the
1914                          headers under PATH/include)
1915  --with-freetype-include specify directory for the freetype include files
1916  --with-freetype-lib     specify directory for the freetype library
1917  --with-alsa             specify prefix directory for the alsa package
1918                          (expecting the libraries under PATH/lib and the
1919                          headers under PATH/include)
1920  --with-alsa-include     specify directory for the alsa include files
1921  --with-alsa-lib         specify directory for the alsa library
1922  --with-giflib           use giflib from build system or OpenJDK source
1923                          (system, bundled) [bundled]
1924  --with-zlib             use zlib from build system or OpenJDK source
1925                          (system, bundled) [bundled]
1926  --with-stdc++lib=<static>,<dynamic>,<default>
1927                          force linking of the C++ runtime on Linux to either
1928                          static or dynamic, default is static with dynamic as
1929                          fallback
1930  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1931                          only) [probed]
1932  --with-dxsdk            Deprecated. Option is kept for backwards
1933                          compatibility and is ignored
1934  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1935                          compatibility and is ignored
1936  --with-dxsdk-include    Deprecated. Option is kept for backwards
1937                          compatibility and is ignored
1938  --with-num-cores        number of cores in the build system, e.g.
1939                          --with-num-cores=8 [probed]
1940  --with-memory-size      memory (in MB) available in the build system, e.g.
1941                          --with-memory-size=1024 [probed]
1942  --with-jobs             number of parallel jobs to let make run [calculated
1943                          based on cores and memory]
1944  --with-sjavac-server-java
1945                          use this java binary for running the sjavac
1946                          background server [Boot JDK java]
1947  --with-ccache-dir       where to store ccache files [~/.ccache]
1948
1949Some influential environment variables:
1950  BASENAME    Override default value for BASENAME
1951  BASH        Override default value for BASH
1952  CAT         Override default value for CAT
1953  CHMOD       Override default value for CHMOD
1954  CMP         Override default value for CMP
1955  COMM        Override default value for COMM
1956  CP          Override default value for CP
1957  CPIO        Override default value for CPIO
1958  CUT         Override default value for CUT
1959  DATE        Override default value for DATE
1960  DIFF        Override default value for DIFF
1961  DIRNAME     Override default value for DIRNAME
1962  ECHO        Override default value for ECHO
1963  EXPR        Override default value for EXPR
1964  FILE        Override default value for FILE
1965  FIND        Override default value for FIND
1966  HEAD        Override default value for HEAD
1967  LN          Override default value for LN
1968  LS          Override default value for LS
1969  MKDIR       Override default value for MKDIR
1970  MKTEMP      Override default value for MKTEMP
1971  MV          Override default value for MV
1972  NAWK        Override default value for NAWK
1973  PRINTF      Override default value for PRINTF
1974  RM          Override default value for RM
1975  SH          Override default value for SH
1976  SORT        Override default value for SORT
1977  TAIL        Override default value for TAIL
1978  TAR         Override default value for TAR
1979  TEE         Override default value for TEE
1980  TOUCH       Override default value for TOUCH
1981  TR          Override default value for TR
1982  UNAME       Override default value for UNAME
1983  UNIQ        Override default value for UNIQ
1984  WC          Override default value for WC
1985  WHICH       Override default value for WHICH
1986  XARGS       Override default value for XARGS
1987  AWK         Override default value for AWK
1988  GREP        Override default value for GREP
1989  EGREP       Override default value for EGREP
1990  FGREP       Override default value for FGREP
1991  SED         Override default value for SED
1992  CYGPATH     Override default value for CYGPATH
1993  READLINK    Override default value for READLINK
1994  DF          Override default value for DF
1995  SETFILE     Override default value for SETFILE
1996  UNZIP       Override default value for UNZIP
1997  ZIP         Override default value for ZIP
1998  LDD         Override default value for LDD
1999  OTOOL       Override default value for OTOOL
2000  READELF     Override default value for READELF
2001  HG          Override default value for HG
2002  STAT        Override default value for STAT
2003  TIME        Override default value for TIME
2004  DSYMUTIL    Override default value for DSYMUTIL
2005  XATTR       Override default value for XATTR
2006  CODESIGN    Override default value for CODESIGN
2007  PKG_CONFIG  path to pkg-config utility
2008  JAVA        Override default value for JAVA
2009  JAVAC       Override default value for JAVAC
2010  JAVAH       Override default value for JAVAH
2011  JAR         Override default value for JAR
2012  NATIVE2ASCII
2013              Override default value for NATIVE2ASCII
2014  JARSIGNER   Override default value for JARSIGNER
2015  CC          C compiler command
2016  CFLAGS      C compiler flags
2017  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2018              nonstandard directory <lib dir>
2019  LIBS        libraries to pass to the linker, e.g. -l<library>
2020  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2021              you have headers in a nonstandard directory <include dir>
2022  CXX         C++ compiler command
2023  CXXFLAGS    C++ compiler flags
2024  CPP         C preprocessor
2025  CXXCPP      C++ preprocessor
2026  AS          Override default value for AS
2027  AR          Override default value for AR
2028  OBJC        Objective C compiler command
2029  OBJCFLAGS   Objective C compiler flags
2030  LIPO        Override default value for LIPO
2031  STRIP       Override default value for STRIP
2032  NM          Override default value for NM
2033  GNM         Override default value for GNM
2034  MCS         Override default value for MCS
2035  OBJCOPY     Override default value for OBJCOPY
2036  OBJDUMP     Override default value for OBJDUMP
2037  BUILD_CC    Override default value for BUILD_CC
2038  BUILD_CXX   Override default value for BUILD_CXX
2039  BUILD_LD    Override default value for BUILD_LD
2040  JTREGEXE    Override default value for JTREGEXE
2041  XMKMF       Path to xmkmf, Makefile generator for X Window System
2042  FREETYPE_CFLAGS
2043              C compiler flags for FREETYPE, overriding pkg-config
2044  FREETYPE_LIBS
2045              linker flags for FREETYPE, overriding pkg-config
2046  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2047  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2048  LIBFFI_CFLAGS
2049              C compiler flags for LIBFFI, overriding pkg-config
2050  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2051  CCACHE      Override default value for CCACHE
2052
2053Use these variables to override the choices made by `configure' or to help
2054it to find libraries and programs with nonstandard names/locations.
2055
2056Report bugs to <build-dev@openjdk.java.net>.
2057OpenJDK home page: <http://openjdk.java.net>.
2058_ACEOF
2059ac_status=$?
2060fi
2061
2062if test "$ac_init_help" = "recursive"; then
2063  # If there are subdirs, report their specific --help.
2064  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2065    test -d "$ac_dir" ||
2066      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2067      continue
2068    ac_builddir=.
2069
2070case "$ac_dir" in
2071.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2072*)
2073  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2074  # A ".." for each directory in $ac_dir_suffix.
2075  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2076  case $ac_top_builddir_sub in
2077  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2078  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2079  esac ;;
2080esac
2081ac_abs_top_builddir=$ac_pwd
2082ac_abs_builddir=$ac_pwd$ac_dir_suffix
2083# for backward compatibility:
2084ac_top_builddir=$ac_top_build_prefix
2085
2086case $srcdir in
2087  .)  # We are building in place.
2088    ac_srcdir=.
2089    ac_top_srcdir=$ac_top_builddir_sub
2090    ac_abs_top_srcdir=$ac_pwd ;;
2091  [\\/]* | ?:[\\/]* )  # Absolute name.
2092    ac_srcdir=$srcdir$ac_dir_suffix;
2093    ac_top_srcdir=$srcdir
2094    ac_abs_top_srcdir=$srcdir ;;
2095  *) # Relative name.
2096    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2097    ac_top_srcdir=$ac_top_build_prefix$srcdir
2098    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2099esac
2100ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2101
2102    cd "$ac_dir" || { ac_status=$?; continue; }
2103    # Check for guested configure.
2104    if test -f "$ac_srcdir/configure.gnu"; then
2105      echo &&
2106      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2107    elif test -f "$ac_srcdir/configure"; then
2108      echo &&
2109      $SHELL "$ac_srcdir/configure" --help=recursive
2110    else
2111      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2112    fi || ac_status=$?
2113    cd "$ac_pwd" || { ac_status=$?; break; }
2114  done
2115fi
2116
2117test -n "$ac_init_help" && exit $ac_status
2118if $ac_init_version; then
2119  cat <<\_ACEOF
2120OpenJDK configure jdk9
2121generated by GNU Autoconf 2.69
2122
2123Copyright (C) 2012 Free Software Foundation, Inc.
2124This configure script is free software; the Free Software Foundation
2125gives unlimited permission to copy, distribute and modify it.
2126_ACEOF
2127  exit
2128fi
2129
2130## ------------------------ ##
2131## Autoconf initialization. ##
2132## ------------------------ ##
2133
2134# ac_fn_c_try_compile LINENO
2135# --------------------------
2136# Try to compile conftest.$ac_ext, and return whether this succeeded.
2137ac_fn_c_try_compile ()
2138{
2139  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2140  rm -f conftest.$ac_objext
2141  if { { ac_try="$ac_compile"
2142case "(($ac_try" in
2143  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2144  *) ac_try_echo=$ac_try;;
2145esac
2146eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2147$as_echo "$ac_try_echo"; } >&5
2148  (eval "$ac_compile") 2>conftest.err
2149  ac_status=$?
2150  if test -s conftest.err; then
2151    grep -v '^ *+' conftest.err >conftest.er1
2152    cat conftest.er1 >&5
2153    mv -f conftest.er1 conftest.err
2154  fi
2155  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2156  test $ac_status = 0; } && {
2157	 test -z "$ac_c_werror_flag" ||
2158	 test ! -s conftest.err
2159       } && test -s conftest.$ac_objext; then :
2160  ac_retval=0
2161else
2162  $as_echo "$as_me: failed program was:" >&5
2163sed 's/^/| /' conftest.$ac_ext >&5
2164
2165	ac_retval=1
2166fi
2167  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2168  as_fn_set_status $ac_retval
2169
2170} # ac_fn_c_try_compile
2171
2172# ac_fn_cxx_try_compile LINENO
2173# ----------------------------
2174# Try to compile conftest.$ac_ext, and return whether this succeeded.
2175ac_fn_cxx_try_compile ()
2176{
2177  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2178  rm -f conftest.$ac_objext
2179  if { { ac_try="$ac_compile"
2180case "(($ac_try" in
2181  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2182  *) ac_try_echo=$ac_try;;
2183esac
2184eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2185$as_echo "$ac_try_echo"; } >&5
2186  (eval "$ac_compile") 2>conftest.err
2187  ac_status=$?
2188  if test -s conftest.err; then
2189    grep -v '^ *+' conftest.err >conftest.er1
2190    cat conftest.er1 >&5
2191    mv -f conftest.er1 conftest.err
2192  fi
2193  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2194  test $ac_status = 0; } && {
2195	 test -z "$ac_cxx_werror_flag" ||
2196	 test ! -s conftest.err
2197       } && test -s conftest.$ac_objext; then :
2198  ac_retval=0
2199else
2200  $as_echo "$as_me: failed program was:" >&5
2201sed 's/^/| /' conftest.$ac_ext >&5
2202
2203	ac_retval=1
2204fi
2205  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2206  as_fn_set_status $ac_retval
2207
2208} # ac_fn_cxx_try_compile
2209
2210# ac_fn_c_try_cpp LINENO
2211# ----------------------
2212# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2213ac_fn_c_try_cpp ()
2214{
2215  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2216  if { { ac_try="$ac_cpp conftest.$ac_ext"
2217case "(($ac_try" in
2218  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2219  *) ac_try_echo=$ac_try;;
2220esac
2221eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2222$as_echo "$ac_try_echo"; } >&5
2223  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2224  ac_status=$?
2225  if test -s conftest.err; then
2226    grep -v '^ *+' conftest.err >conftest.er1
2227    cat conftest.er1 >&5
2228    mv -f conftest.er1 conftest.err
2229  fi
2230  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2231  test $ac_status = 0; } > conftest.i && {
2232	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2233	 test ! -s conftest.err
2234       }; then :
2235  ac_retval=0
2236else
2237  $as_echo "$as_me: failed program was:" >&5
2238sed 's/^/| /' conftest.$ac_ext >&5
2239
2240    ac_retval=1
2241fi
2242  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2243  as_fn_set_status $ac_retval
2244
2245} # ac_fn_c_try_cpp
2246
2247# ac_fn_cxx_try_cpp LINENO
2248# ------------------------
2249# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2250ac_fn_cxx_try_cpp ()
2251{
2252  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2253  if { { ac_try="$ac_cpp conftest.$ac_ext"
2254case "(($ac_try" in
2255  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2256  *) ac_try_echo=$ac_try;;
2257esac
2258eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2259$as_echo "$ac_try_echo"; } >&5
2260  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2261  ac_status=$?
2262  if test -s conftest.err; then
2263    grep -v '^ *+' conftest.err >conftest.er1
2264    cat conftest.er1 >&5
2265    mv -f conftest.er1 conftest.err
2266  fi
2267  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2268  test $ac_status = 0; } > conftest.i && {
2269	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2270	 test ! -s conftest.err
2271       }; then :
2272  ac_retval=0
2273else
2274  $as_echo "$as_me: failed program was:" >&5
2275sed 's/^/| /' conftest.$ac_ext >&5
2276
2277    ac_retval=1
2278fi
2279  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2280  as_fn_set_status $ac_retval
2281
2282} # ac_fn_cxx_try_cpp
2283
2284# ac_fn_objc_try_compile LINENO
2285# -----------------------------
2286# Try to compile conftest.$ac_ext, and return whether this succeeded.
2287ac_fn_objc_try_compile ()
2288{
2289  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2290  rm -f conftest.$ac_objext
2291  if { { ac_try="$ac_compile"
2292case "(($ac_try" in
2293  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2294  *) ac_try_echo=$ac_try;;
2295esac
2296eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2297$as_echo "$ac_try_echo"; } >&5
2298  (eval "$ac_compile") 2>conftest.err
2299  ac_status=$?
2300  if test -s conftest.err; then
2301    grep -v '^ *+' conftest.err >conftest.er1
2302    cat conftest.er1 >&5
2303    mv -f conftest.er1 conftest.err
2304  fi
2305  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2306  test $ac_status = 0; } && {
2307	 test -z "$ac_objc_werror_flag" ||
2308	 test ! -s conftest.err
2309       } && test -s conftest.$ac_objext; then :
2310  ac_retval=0
2311else
2312  $as_echo "$as_me: failed program was:" >&5
2313sed 's/^/| /' conftest.$ac_ext >&5
2314
2315	ac_retval=1
2316fi
2317  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2318  as_fn_set_status $ac_retval
2319
2320} # ac_fn_objc_try_compile
2321
2322# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2323# ---------------------------------------------------------
2324# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2325# the include files in INCLUDES and setting the cache variable VAR
2326# accordingly.
2327ac_fn_cxx_check_header_mongrel ()
2328{
2329  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2330  if eval \${$3+:} false; then :
2331  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2332$as_echo_n "checking for $2... " >&6; }
2333if eval \${$3+:} false; then :
2334  $as_echo_n "(cached) " >&6
2335fi
2336eval ac_res=\$$3
2337	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2338$as_echo "$ac_res" >&6; }
2339else
2340  # Is the header compilable?
2341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2342$as_echo_n "checking $2 usability... " >&6; }
2343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2344/* end confdefs.h.  */
2345$4
2346#include <$2>
2347_ACEOF
2348if ac_fn_cxx_try_compile "$LINENO"; then :
2349  ac_header_compiler=yes
2350else
2351  ac_header_compiler=no
2352fi
2353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2355$as_echo "$ac_header_compiler" >&6; }
2356
2357# Is the header present?
2358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2359$as_echo_n "checking $2 presence... " >&6; }
2360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2361/* end confdefs.h.  */
2362#include <$2>
2363_ACEOF
2364if ac_fn_cxx_try_cpp "$LINENO"; then :
2365  ac_header_preproc=yes
2366else
2367  ac_header_preproc=no
2368fi
2369rm -f conftest.err conftest.i conftest.$ac_ext
2370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2371$as_echo "$ac_header_preproc" >&6; }
2372
2373# So?  What about this header?
2374case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2375  yes:no: )
2376    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2377$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2378    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2379$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2380    ;;
2381  no:yes:* )
2382    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2383$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2384    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2385$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2386    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2387$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2388    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2389$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2390    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2391$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2392( $as_echo "## ----------------------------------------- ##
2393## Report this to build-dev@openjdk.java.net ##
2394## ----------------------------------------- ##"
2395     ) | sed "s/^/$as_me: WARNING:     /" >&2
2396    ;;
2397esac
2398  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2399$as_echo_n "checking for $2... " >&6; }
2400if eval \${$3+:} false; then :
2401  $as_echo_n "(cached) " >&6
2402else
2403  eval "$3=\$ac_header_compiler"
2404fi
2405eval ac_res=\$$3
2406	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2407$as_echo "$ac_res" >&6; }
2408fi
2409  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2410
2411} # ac_fn_cxx_check_header_mongrel
2412
2413# ac_fn_cxx_try_run LINENO
2414# ------------------------
2415# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2416# that executables *can* be run.
2417ac_fn_cxx_try_run ()
2418{
2419  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2420  if { { ac_try="$ac_link"
2421case "(($ac_try" in
2422  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2423  *) ac_try_echo=$ac_try;;
2424esac
2425eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2426$as_echo "$ac_try_echo"; } >&5
2427  (eval "$ac_link") 2>&5
2428  ac_status=$?
2429  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2430  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2431  { { case "(($ac_try" in
2432  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2433  *) ac_try_echo=$ac_try;;
2434esac
2435eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2436$as_echo "$ac_try_echo"; } >&5
2437  (eval "$ac_try") 2>&5
2438  ac_status=$?
2439  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2440  test $ac_status = 0; }; }; then :
2441  ac_retval=0
2442else
2443  $as_echo "$as_me: program exited with status $ac_status" >&5
2444       $as_echo "$as_me: failed program was:" >&5
2445sed 's/^/| /' conftest.$ac_ext >&5
2446
2447       ac_retval=$ac_status
2448fi
2449  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2450  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2451  as_fn_set_status $ac_retval
2452
2453} # ac_fn_cxx_try_run
2454
2455# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2456# ---------------------------------------------------------
2457# Tests whether HEADER exists and can be compiled using the include files in
2458# INCLUDES, setting the cache variable VAR accordingly.
2459ac_fn_cxx_check_header_compile ()
2460{
2461  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2462  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2463$as_echo_n "checking for $2... " >&6; }
2464if eval \${$3+:} false; then :
2465  $as_echo_n "(cached) " >&6
2466else
2467  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2468/* end confdefs.h.  */
2469$4
2470#include <$2>
2471_ACEOF
2472if ac_fn_cxx_try_compile "$LINENO"; then :
2473  eval "$3=yes"
2474else
2475  eval "$3=no"
2476fi
2477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2478fi
2479eval ac_res=\$$3
2480	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2481$as_echo "$ac_res" >&6; }
2482  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2483
2484} # ac_fn_cxx_check_header_compile
2485
2486# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2487# ----------------------------------------------
2488# Tries to find the compile-time value of EXPR in a program that includes
2489# INCLUDES, setting VAR accordingly. Returns whether the value could be
2490# computed
2491ac_fn_cxx_compute_int ()
2492{
2493  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2494  if test "$cross_compiling" = yes; then
2495    # Depending upon the size, compute the lo and hi bounds.
2496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2497/* end confdefs.h.  */
2498$4
2499int
2500main ()
2501{
2502static int test_array [1 - 2 * !(($2) >= 0)];
2503test_array [0] = 0;
2504return test_array [0];
2505
2506  ;
2507  return 0;
2508}
2509_ACEOF
2510if ac_fn_cxx_try_compile "$LINENO"; then :
2511  ac_lo=0 ac_mid=0
2512  while :; do
2513    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2514/* end confdefs.h.  */
2515$4
2516int
2517main ()
2518{
2519static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2520test_array [0] = 0;
2521return test_array [0];
2522
2523  ;
2524  return 0;
2525}
2526_ACEOF
2527if ac_fn_cxx_try_compile "$LINENO"; then :
2528  ac_hi=$ac_mid; break
2529else
2530  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2531			if test $ac_lo -le $ac_mid; then
2532			  ac_lo= ac_hi=
2533			  break
2534			fi
2535			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2536fi
2537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2538  done
2539else
2540  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2541/* end confdefs.h.  */
2542$4
2543int
2544main ()
2545{
2546static int test_array [1 - 2 * !(($2) < 0)];
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=-1 ac_mid=-1
2556  while :; do
2557    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2558/* end confdefs.h.  */
2559$4
2560int
2561main ()
2562{
2563static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2564test_array [0] = 0;
2565return test_array [0];
2566
2567  ;
2568  return 0;
2569}
2570_ACEOF
2571if ac_fn_cxx_try_compile "$LINENO"; then :
2572  ac_lo=$ac_mid; break
2573else
2574  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2575			if test $ac_mid -le $ac_hi; then
2576			  ac_lo= ac_hi=
2577			  break
2578			fi
2579			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2580fi
2581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2582  done
2583else
2584  ac_lo= ac_hi=
2585fi
2586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2587fi
2588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2589# Binary search between lo and hi bounds.
2590while test "x$ac_lo" != "x$ac_hi"; do
2591  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2592  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2593/* end confdefs.h.  */
2594$4
2595int
2596main ()
2597{
2598static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2599test_array [0] = 0;
2600return test_array [0];
2601
2602  ;
2603  return 0;
2604}
2605_ACEOF
2606if ac_fn_cxx_try_compile "$LINENO"; then :
2607  ac_hi=$ac_mid
2608else
2609  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2610fi
2611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2612done
2613case $ac_lo in #((
2614?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2615'') ac_retval=1 ;;
2616esac
2617  else
2618    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2619/* end confdefs.h.  */
2620$4
2621static long int longval () { return $2; }
2622static unsigned long int ulongval () { return $2; }
2623#include <stdio.h>
2624#include <stdlib.h>
2625int
2626main ()
2627{
2628
2629  FILE *f = fopen ("conftest.val", "w");
2630  if (! f)
2631    return 1;
2632  if (($2) < 0)
2633    {
2634      long int i = longval ();
2635      if (i != ($2))
2636	return 1;
2637      fprintf (f, "%ld", i);
2638    }
2639  else
2640    {
2641      unsigned long int i = ulongval ();
2642      if (i != ($2))
2643	return 1;
2644      fprintf (f, "%lu", i);
2645    }
2646  /* Do not output a trailing newline, as this causes \r\n confusion
2647     on some platforms.  */
2648  return ferror (f) || fclose (f) != 0;
2649
2650  ;
2651  return 0;
2652}
2653_ACEOF
2654if ac_fn_cxx_try_run "$LINENO"; then :
2655  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2656else
2657  ac_retval=1
2658fi
2659rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2660  conftest.$ac_objext conftest.beam conftest.$ac_ext
2661rm -f conftest.val
2662
2663  fi
2664  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2665  as_fn_set_status $ac_retval
2666
2667} # ac_fn_cxx_compute_int
2668
2669# ac_fn_cxx_try_link LINENO
2670# -------------------------
2671# Try to link conftest.$ac_ext, and return whether this succeeded.
2672ac_fn_cxx_try_link ()
2673{
2674  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2675  rm -f conftest.$ac_objext conftest$ac_exeext
2676  if { { ac_try="$ac_link"
2677case "(($ac_try" in
2678  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2679  *) ac_try_echo=$ac_try;;
2680esac
2681eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2682$as_echo "$ac_try_echo"; } >&5
2683  (eval "$ac_link") 2>conftest.err
2684  ac_status=$?
2685  if test -s conftest.err; then
2686    grep -v '^ *+' conftest.err >conftest.er1
2687    cat conftest.er1 >&5
2688    mv -f conftest.er1 conftest.err
2689  fi
2690  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2691  test $ac_status = 0; } && {
2692	 test -z "$ac_cxx_werror_flag" ||
2693	 test ! -s conftest.err
2694       } && test -s conftest$ac_exeext && {
2695	 test "$cross_compiling" = yes ||
2696	 test -x conftest$ac_exeext
2697       }; then :
2698  ac_retval=0
2699else
2700  $as_echo "$as_me: failed program was:" >&5
2701sed 's/^/| /' conftest.$ac_ext >&5
2702
2703	ac_retval=1
2704fi
2705  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2706  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2707  # interfere with the next link command; also delete a directory that is
2708  # left behind by Apple's compiler.  We do this before executing the actions.
2709  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2710  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2711  as_fn_set_status $ac_retval
2712
2713} # ac_fn_cxx_try_link
2714
2715# ac_fn_cxx_check_func LINENO FUNC VAR
2716# ------------------------------------
2717# Tests whether FUNC exists, setting the cache variable VAR accordingly
2718ac_fn_cxx_check_func ()
2719{
2720  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2721  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2722$as_echo_n "checking for $2... " >&6; }
2723if eval \${$3+:} false; then :
2724  $as_echo_n "(cached) " >&6
2725else
2726  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2727/* end confdefs.h.  */
2728/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2729   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2730#define $2 innocuous_$2
2731
2732/* System header to define __stub macros and hopefully few prototypes,
2733    which can conflict with char $2 (); below.
2734    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2735    <limits.h> exists even on freestanding compilers.  */
2736
2737#ifdef __STDC__
2738# include <limits.h>
2739#else
2740# include <assert.h>
2741#endif
2742
2743#undef $2
2744
2745/* Override any GCC internal prototype to avoid an error.
2746   Use char because int might match the return type of a GCC
2747   builtin and then its argument prototype would still apply.  */
2748#ifdef __cplusplus
2749extern "C"
2750#endif
2751char $2 ();
2752/* The GNU C library defines this for functions which it implements
2753    to always fail with ENOSYS.  Some functions are actually named
2754    something starting with __ and the normal name is an alias.  */
2755#if defined __stub_$2 || defined __stub___$2
2756choke me
2757#endif
2758
2759int
2760main ()
2761{
2762return $2 ();
2763  ;
2764  return 0;
2765}
2766_ACEOF
2767if ac_fn_cxx_try_link "$LINENO"; then :
2768  eval "$3=yes"
2769else
2770  eval "$3=no"
2771fi
2772rm -f core conftest.err conftest.$ac_objext \
2773    conftest$ac_exeext conftest.$ac_ext
2774fi
2775eval ac_res=\$$3
2776	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2777$as_echo "$ac_res" >&6; }
2778  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2779
2780} # ac_fn_cxx_check_func
2781
2782# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2783# -------------------------------------------------------
2784# Tests whether HEADER exists and can be compiled using the include files in
2785# INCLUDES, setting the cache variable VAR accordingly.
2786ac_fn_c_check_header_compile ()
2787{
2788  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2789  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2790$as_echo_n "checking for $2... " >&6; }
2791if eval \${$3+:} false; then :
2792  $as_echo_n "(cached) " >&6
2793else
2794  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2795/* end confdefs.h.  */
2796$4
2797#include <$2>
2798_ACEOF
2799if ac_fn_c_try_compile "$LINENO"; then :
2800  eval "$3=yes"
2801else
2802  eval "$3=no"
2803fi
2804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2805fi
2806eval ac_res=\$$3
2807	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2808$as_echo "$ac_res" >&6; }
2809  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2810
2811} # ac_fn_c_check_header_compile
2812cat >config.log <<_ACEOF
2813This file contains any messages produced by compilers while
2814running configure, to aid debugging if configure makes a mistake.
2815
2816It was created by OpenJDK $as_me jdk9, which was
2817generated by GNU Autoconf 2.69.  Invocation command line was
2818
2819  $ $0 $@
2820
2821_ACEOF
2822exec 5>>config.log
2823{
2824cat <<_ASUNAME
2825## --------- ##
2826## Platform. ##
2827## --------- ##
2828
2829hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2830uname -m = `(uname -m) 2>/dev/null || echo unknown`
2831uname -r = `(uname -r) 2>/dev/null || echo unknown`
2832uname -s = `(uname -s) 2>/dev/null || echo unknown`
2833uname -v = `(uname -v) 2>/dev/null || echo unknown`
2834
2835/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2836/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2837
2838/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2839/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2840/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2841/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2842/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2843/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2844/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2845
2846_ASUNAME
2847
2848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2849for as_dir in $PATH
2850do
2851  IFS=$as_save_IFS
2852  test -z "$as_dir" && as_dir=.
2853    $as_echo "PATH: $as_dir"
2854  done
2855IFS=$as_save_IFS
2856
2857} >&5
2858
2859cat >&5 <<_ACEOF
2860
2861
2862## ----------- ##
2863## Core tests. ##
2864## ----------- ##
2865
2866_ACEOF
2867
2868
2869# Keep a trace of the command line.
2870# Strip out --no-create and --no-recursion so they do not pile up.
2871# Strip out --silent because we don't want to record it for future runs.
2872# Also quote any args containing shell meta-characters.
2873# Make two passes to allow for proper duplicate-argument suppression.
2874ac_configure_args=
2875ac_configure_args0=
2876ac_configure_args1=
2877ac_must_keep_next=false
2878for ac_pass in 1 2
2879do
2880  for ac_arg
2881  do
2882    case $ac_arg in
2883    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2884    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2885    | -silent | --silent | --silen | --sile | --sil)
2886      continue ;;
2887    *\'*)
2888      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2889    esac
2890    case $ac_pass in
2891    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2892    2)
2893      as_fn_append ac_configure_args1 " '$ac_arg'"
2894      if test $ac_must_keep_next = true; then
2895	ac_must_keep_next=false # Got value, back to normal.
2896      else
2897	case $ac_arg in
2898	  *=* | --config-cache | -C | -disable-* | --disable-* \
2899	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2900	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2901	  | -with-* | --with-* | -without-* | --without-* | --x)
2902	    case "$ac_configure_args0 " in
2903	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2904	    esac
2905	    ;;
2906	  -* ) ac_must_keep_next=true ;;
2907	esac
2908      fi
2909      as_fn_append ac_configure_args " '$ac_arg'"
2910      ;;
2911    esac
2912  done
2913done
2914{ ac_configure_args0=; unset ac_configure_args0;}
2915{ ac_configure_args1=; unset ac_configure_args1;}
2916
2917# When interrupted or exit'd, cleanup temporary files, and complete
2918# config.log.  We remove comments because anyway the quotes in there
2919# would cause problems or look ugly.
2920# WARNING: Use '\'' to represent an apostrophe within the trap.
2921# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2922trap 'exit_status=$?
2923  # Save into config.log some information that might help in debugging.
2924  {
2925    echo
2926
2927    $as_echo "## ---------------- ##
2928## Cache variables. ##
2929## ---------------- ##"
2930    echo
2931    # The following way of writing the cache mishandles newlines in values,
2932(
2933  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2934    eval ac_val=\$$ac_var
2935    case $ac_val in #(
2936    *${as_nl}*)
2937      case $ac_var in #(
2938      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2939$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2940      esac
2941      case $ac_var in #(
2942      _ | IFS | as_nl) ;; #(
2943      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2944      *) { eval $ac_var=; unset $ac_var;} ;;
2945      esac ;;
2946    esac
2947  done
2948  (set) 2>&1 |
2949    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2950    *${as_nl}ac_space=\ *)
2951      sed -n \
2952	"s/'\''/'\''\\\\'\'''\''/g;
2953	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2954      ;; #(
2955    *)
2956      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2957      ;;
2958    esac |
2959    sort
2960)
2961    echo
2962
2963    $as_echo "## ----------------- ##
2964## Output variables. ##
2965## ----------------- ##"
2966    echo
2967    for ac_var in $ac_subst_vars
2968    do
2969      eval ac_val=\$$ac_var
2970      case $ac_val in
2971      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2972      esac
2973      $as_echo "$ac_var='\''$ac_val'\''"
2974    done | sort
2975    echo
2976
2977    if test -n "$ac_subst_files"; then
2978      $as_echo "## ------------------- ##
2979## File substitutions. ##
2980## ------------------- ##"
2981      echo
2982      for ac_var in $ac_subst_files
2983      do
2984	eval ac_val=\$$ac_var
2985	case $ac_val in
2986	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2987	esac
2988	$as_echo "$ac_var='\''$ac_val'\''"
2989      done | sort
2990      echo
2991    fi
2992
2993    if test -s confdefs.h; then
2994      $as_echo "## ----------- ##
2995## confdefs.h. ##
2996## ----------- ##"
2997      echo
2998      cat confdefs.h
2999      echo
3000    fi
3001    test "$ac_signal" != 0 &&
3002      $as_echo "$as_me: caught signal $ac_signal"
3003    $as_echo "$as_me: exit $exit_status"
3004  } >&5
3005  rm -f core *.core core.conftest.* &&
3006    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3007    exit $exit_status
3008' 0
3009for ac_signal in 1 2 13 15; do
3010  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3011done
3012ac_signal=0
3013
3014# confdefs.h avoids OS command line length limits that DEFS can exceed.
3015rm -f -r conftest* confdefs.h
3016
3017$as_echo "/* confdefs.h */" > confdefs.h
3018
3019# Predefined preprocessor variables.
3020
3021cat >>confdefs.h <<_ACEOF
3022#define PACKAGE_NAME "$PACKAGE_NAME"
3023_ACEOF
3024
3025cat >>confdefs.h <<_ACEOF
3026#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3027_ACEOF
3028
3029cat >>confdefs.h <<_ACEOF
3030#define PACKAGE_VERSION "$PACKAGE_VERSION"
3031_ACEOF
3032
3033cat >>confdefs.h <<_ACEOF
3034#define PACKAGE_STRING "$PACKAGE_STRING"
3035_ACEOF
3036
3037cat >>confdefs.h <<_ACEOF
3038#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3039_ACEOF
3040
3041cat >>confdefs.h <<_ACEOF
3042#define PACKAGE_URL "$PACKAGE_URL"
3043_ACEOF
3044
3045
3046# Let the site file select an alternate cache file if it wants to.
3047# Prefer an explicitly selected file to automatically selected ones.
3048ac_site_file1=NONE
3049ac_site_file2=NONE
3050if test -n "$CONFIG_SITE"; then
3051  # We do not want a PATH search for config.site.
3052  case $CONFIG_SITE in #((
3053    -*)  ac_site_file1=./$CONFIG_SITE;;
3054    */*) ac_site_file1=$CONFIG_SITE;;
3055    *)   ac_site_file1=./$CONFIG_SITE;;
3056  esac
3057elif test "x$prefix" != xNONE; then
3058  ac_site_file1=$prefix/share/config.site
3059  ac_site_file2=$prefix/etc/config.site
3060else
3061  ac_site_file1=$ac_default_prefix/share/config.site
3062  ac_site_file2=$ac_default_prefix/etc/config.site
3063fi
3064for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3065do
3066  test "x$ac_site_file" = xNONE && continue
3067  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3068    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3069$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3070    sed 's/^/| /' "$ac_site_file" >&5
3071    . "$ac_site_file" \
3072      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3073$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3074as_fn_error $? "failed to load site script $ac_site_file
3075See \`config.log' for more details" "$LINENO" 5; }
3076  fi
3077done
3078
3079if test -r "$cache_file"; then
3080  # Some versions of bash will fail to source /dev/null (special files
3081  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3082  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3083    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3084$as_echo "$as_me: loading cache $cache_file" >&6;}
3085    case $cache_file in
3086      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3087      *)                      . "./$cache_file";;
3088    esac
3089  fi
3090else
3091  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3092$as_echo "$as_me: creating cache $cache_file" >&6;}
3093  >$cache_file
3094fi
3095
3096# Check that the precious variables saved in the cache have kept the same
3097# value.
3098ac_cache_corrupted=false
3099for ac_var in $ac_precious_vars; do
3100  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3101  eval ac_new_set=\$ac_env_${ac_var}_set
3102  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3103  eval ac_new_val=\$ac_env_${ac_var}_value
3104  case $ac_old_set,$ac_new_set in
3105    set,)
3106      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3107$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3108      ac_cache_corrupted=: ;;
3109    ,set)
3110      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3111$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3112      ac_cache_corrupted=: ;;
3113    ,);;
3114    *)
3115      if test "x$ac_old_val" != "x$ac_new_val"; then
3116	# differences in whitespace do not lead to failure.
3117	ac_old_val_w=`echo x $ac_old_val`
3118	ac_new_val_w=`echo x $ac_new_val`
3119	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3120	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3121$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3122	  ac_cache_corrupted=:
3123	else
3124	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3125$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3126	  eval $ac_var=\$ac_old_val
3127	fi
3128	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3129$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3130	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3131$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3132      fi;;
3133  esac
3134  # Pass precious variables to config.status.
3135  if test "$ac_new_set" = set; then
3136    case $ac_new_val in
3137    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3138    *) ac_arg=$ac_var=$ac_new_val ;;
3139    esac
3140    case " $ac_configure_args " in
3141      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3142      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3143    esac
3144  fi
3145done
3146if $ac_cache_corrupted; then
3147  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3148$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3149  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3150$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3151  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3152fi
3153## -------------------- ##
3154## Main body of script. ##
3155## -------------------- ##
3156
3157ac_ext=c
3158ac_cpp='$CPP $CPPFLAGS'
3159ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3160ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3161ac_compiler_gnu=$ac_cv_c_compiler_gnu
3162
3163
3164
3165ac_aux_dir=
3166for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3167  if test -f "$ac_dir/install-sh"; then
3168    ac_aux_dir=$ac_dir
3169    ac_install_sh="$ac_aux_dir/install-sh -c"
3170    break
3171  elif test -f "$ac_dir/install.sh"; then
3172    ac_aux_dir=$ac_dir
3173    ac_install_sh="$ac_aux_dir/install.sh -c"
3174    break
3175  elif test -f "$ac_dir/shtool"; then
3176    ac_aux_dir=$ac_dir
3177    ac_install_sh="$ac_aux_dir/shtool install -c"
3178    break
3179  fi
3180done
3181if test -z "$ac_aux_dir"; then
3182  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
3183fi
3184
3185# These three variables are undocumented and unsupported,
3186# and are intended to be withdrawn in a future Autoconf release.
3187# They can cause serious problems if a builder's source tree is in a directory
3188# whose full name contains unusual characters.
3189ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3190ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3191ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3192
3193
3194# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3195
3196#
3197# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3198# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3199#
3200# This code is free software; you can redistribute it and/or modify it
3201# under the terms of the GNU General Public License version 2 only, as
3202# published by the Free Software Foundation.  Oracle designates this
3203# particular file as subject to the "Classpath" exception as provided
3204# by Oracle in the LICENSE file that accompanied this code.
3205#
3206# This code is distributed in the hope that it will be useful, but WITHOUT
3207# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3208# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3209# version 2 for more details (a copy is included in the LICENSE file that
3210# accompanied this code).
3211#
3212# You should have received a copy of the GNU General Public License version
3213# 2 along with this work; if not, write to the Free Software Foundation,
3214# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3215#
3216# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3217# or visit www.oracle.com if you need additional information or have any
3218# questions.
3219#
3220
3221#
3222# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3223#
3224# This program is free software; you can redistribute it and/or modify
3225# it under the terms of the GNU General Public License as published by
3226# the Free Software Foundation; either version 2 of the License, or
3227# (at your option) any later version.
3228#
3229# This program is distributed in the hope that it will be useful, but
3230# WITHOUT ANY WARRANTY; without even the implied warranty of
3231# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3232# General Public License for more details.
3233#
3234# You should have received a copy of the GNU General Public License
3235# along with this program; if not, write to the Free Software
3236# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3237#
3238# As a special exception to the GNU General Public License, if you
3239# distribute this file as part of a program that contains a
3240# configuration script generated by Autoconf, you may include it under
3241# the same distribution terms that you use for the rest of that program.
3242
3243# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3244# ----------------------------------
3245# PKG_PROG_PKG_CONFIG
3246
3247# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3248#
3249# Check to see whether a particular set of modules exists.  Similar
3250# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3251#
3252#
3253# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3254# this or PKG_CHECK_MODULES is called, or make sure to call
3255# PKG_CHECK_EXISTS manually
3256# --------------------------------------------------------------
3257
3258
3259
3260# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3261# ---------------------------------------------
3262# _PKG_CONFIG
3263
3264# _PKG_SHORT_ERRORS_SUPPORTED
3265# -----------------------------
3266# _PKG_SHORT_ERRORS_SUPPORTED
3267
3268
3269# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3270# [ACTION-IF-NOT-FOUND])
3271#
3272#
3273# Note that if there is a possibility the first call to
3274# PKG_CHECK_MODULES might not happen, you should be sure to include an
3275# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3276#
3277#
3278# --------------------------------------------------------------
3279# PKG_CHECK_MODULES
3280
3281
3282# Include these first...
3283#
3284# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3285# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3286#
3287# This code is free software; you can redistribute it and/or modify it
3288# under the terms of the GNU General Public License version 2 only, as
3289# published by the Free Software Foundation.  Oracle designates this
3290# particular file as subject to the "Classpath" exception as provided
3291# by Oracle in the LICENSE file that accompanied this code.
3292#
3293# This code is distributed in the hope that it will be useful, but WITHOUT
3294# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3295# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3296# version 2 for more details (a copy is included in the LICENSE file that
3297# accompanied this code).
3298#
3299# You should have received a copy of the GNU General Public License version
3300# 2 along with this work; if not, write to the Free Software Foundation,
3301# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3302#
3303# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3304# or visit www.oracle.com if you need additional information or have any
3305# questions.
3306#
3307
3308# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3309# If so, then append $1 to $2 \
3310# Also set JVM_ARG_OK to true/false depending on outcome.
3311
3312
3313# Appends a string to a path variable, only adding the : when needed.
3314
3315
3316# This will make sure the given variable points to a full and proper
3317# path. This means:
3318# 1) There will be no spaces in the path. On posix platforms,
3319#    spaces in the path will result in an error. On Windows,
3320#    the path will be rewritten using short-style to be space-free.
3321# 2) The path will be absolute, and it will be in unix-style (on
3322#     cygwin).
3323# $1: The name of the variable to fix
3324
3325
3326# This will make sure the given variable points to a executable
3327# with a full and proper path. This means:
3328# 1) There will be no spaces in the path. On posix platforms,
3329#    spaces in the path will result in an error. On Windows,
3330#    the path will be rewritten using short-style to be space-free.
3331# 2) The path will be absolute, and it will be in unix-style (on
3332#     cygwin).
3333# Any arguments given to the executable is preserved.
3334# If the input variable does not have a directory specification, then
3335# it need to be in the PATH.
3336# $1: The name of the variable to fix
3337
3338
3339
3340
3341# Register a --with argument but mark it as deprecated
3342# $1: The name of the with argument to deprecate, not including --with-
3343
3344
3345# Register a --enable argument but mark it as deprecated
3346# $1: The name of the with argument to deprecate, not including --enable-
3347# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3348
3349
3350
3351
3352# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3353# $1: variable to check
3354
3355
3356# Check that there are no unprocessed overridden variables left.
3357# If so, they are an incorrect argument and we will exit with an error.
3358
3359
3360# Setup a tool for the given variable. If correctly specified by the user,
3361# use that value, otherwise search for the tool using the supplied code snippet.
3362# $1: variable to set
3363# $2: code snippet to call to look for the tool
3364
3365
3366# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3367# $1: variable to set
3368# $2: executable name (or list of names) to look for
3369
3370
3371# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3372# $1: variable to set
3373# $2: executable name (or list of names) to look for
3374
3375
3376# Like BASIC_PATH_PROGS but fails if no tool was found.
3377# $1: variable to set
3378# $2: executable name (or list of names) to look for
3379
3380
3381# Like BASIC_SETUP_TOOL but fails if no tool was found.
3382# $1: variable to set
3383# $2: autoconf macro to call to look for the special tool
3384
3385
3386# Setup the most fundamental tools that relies on not much else to set up,
3387# but is used by much of the early bootstrap code.
3388
3389
3390# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3391
3392
3393
3394
3395
3396
3397
3398#%%% Simple tools %%%
3399
3400# Check if we have found a usable version of make
3401# $1: the path to a potential make binary (or empty)
3402# $2: the description on how we found this
3403
3404
3405# Goes looking for a usable version of GNU make.
3406
3407
3408
3409
3410
3411
3412# Check if build directory is on local disk. If not possible to determine,
3413# we prefer to claim it's local.
3414# Argument 1: directory to test
3415# Argument 2: what to do if it is on local disk
3416# Argument 3: what to do otherwise (remote disk or failure)
3417
3418
3419# Check that source files have basic read permissions set. This might
3420# not be the case in cygwin in certain conditions.
3421
3422
3423
3424
3425#
3426# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3427# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3428#
3429# This code is free software; you can redistribute it and/or modify it
3430# under the terms of the GNU General Public License version 2 only, as
3431# published by the Free Software Foundation.  Oracle designates this
3432# particular file as subject to the "Classpath" exception as provided
3433# by Oracle in the LICENSE file that accompanied this code.
3434#
3435# This code is distributed in the hope that it will be useful, but WITHOUT
3436# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3437# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3438# version 2 for more details (a copy is included in the LICENSE file that
3439# accompanied this code).
3440#
3441# You should have received a copy of the GNU General Public License version
3442# 2 along with this work; if not, write to the Free Software Foundation,
3443# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3444#
3445# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3446# or visit www.oracle.com if you need additional information or have any
3447# questions.
3448#
3449
3450
3451
3452
3453
3454# Helper function which possibly converts a path using DOS-style short mode.
3455# If so, the updated path is stored in $new_path.
3456# $1: The path to check
3457
3458
3459# Helper function which possibly converts a path using DOS-style short mode.
3460# If so, the updated path is stored in $new_path.
3461# $1: The path to check
3462
3463
3464# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3465# and could probably be heavily simplified. However, all changes in this
3466# area tend to need lot of testing in different scenarios, and in lack of
3467# proper unit testing, cleaning this up has not been deemed worth the effort
3468# at the moment.
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3479
3480
3481
3482
3483#
3484# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3485# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3486#
3487# This code is free software; you can redistribute it and/or modify it
3488# under the terms of the GNU General Public License version 2 only, as
3489# published by the Free Software Foundation.  Oracle designates this
3490# particular file as subject to the "Classpath" exception as provided
3491# by Oracle in the LICENSE file that accompanied this code.
3492#
3493# This code is distributed in the hope that it will be useful, but WITHOUT
3494# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3495# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3496# version 2 for more details (a copy is included in the LICENSE file that
3497# accompanied this code).
3498#
3499# You should have received a copy of the GNU General Public License version
3500# 2 along with this work; if not, write to the Free Software Foundation,
3501# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3502#
3503# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3504# or visit www.oracle.com if you need additional information or have any
3505# questions.
3506#
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518# ... then the rest
3519#
3520# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3521# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3522#
3523# This code is free software; you can redistribute it and/or modify it
3524# under the terms of the GNU General Public License version 2 only, as
3525# published by the Free Software Foundation.  Oracle designates this
3526# particular file as subject to the "Classpath" exception as provided
3527# by Oracle in the LICENSE file that accompanied this code.
3528#
3529# This code is distributed in the hope that it will be useful, but WITHOUT
3530# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3531# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3532# version 2 for more details (a copy is included in the LICENSE file that
3533# accompanied this code).
3534#
3535# You should have received a copy of the GNU General Public License version
3536# 2 along with this work; if not, write to the Free Software Foundation,
3537# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3538#
3539# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3540# or visit www.oracle.com if you need additional information or have any
3541# questions.
3542#
3543
3544########################################################################
3545# This file handles detection of the Boot JDK. The Boot JDK detection
3546# process has been developed as a response to solve a complex real-world
3547# problem. Initially, it was simple, but it has grown as platform after
3548# platform, idiosyncracy after idiosyncracy has been supported.
3549#
3550# The basic idea is this:
3551# 1) You need an acceptable *) JDK to use as a Boot JDK
3552# 2) There are several ways to locate a JDK, that are mostly platform
3553#    dependent **)
3554# 3) You can have multiple JDKs installed
3555# 4) If possible, configure should try to dig out an acceptable JDK
3556#    automatically, without having to resort to command-line options
3557#
3558# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3559#     javac) and not a JRE, etc.
3560#
3561# **) On Windows we typically use a well-known path.
3562#     On MacOSX we typically use the tool java_home.
3563#     On Linux we typically find javac in the $PATH, and then follow a
3564#     chain of symlinks that often ends up in a real JDK.
3565#
3566# This leads to the code where we check in different ways to locate a
3567# JDK, and if one is found, check if it is acceptable. If not, we print
3568# our reasons for rejecting it (useful when debugging non-working
3569# configure situations) and continue checking the next one.
3570########################################################################
3571
3572# Execute the check given as argument, and verify the result
3573# If the Boot JDK was previously found, do nothing
3574# $1 A command line (typically autoconf macro) to execute
3575
3576
3577# Test: Is bootjdk explicitely set by command line arguments?
3578
3579
3580# Test: Is bootjdk available from builddeps?
3581
3582
3583# Test: Is $JAVA_HOME set?
3584
3585
3586# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3587
3588
3589# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3590# $1: Argument to the java_home binary (optional)
3591
3592
3593# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3594
3595
3596# Look for a jdk in the given path. If there are multiple, try to select the newest.
3597# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3598# $1 = Path to directory containing jdk installations.
3599# $2 = String to append to the found JDK directory to get the proper JDK home
3600
3601
3602# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3603# environmental variable as base for where to look.
3604# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3605
3606
3607# Test: Is there a JDK installed in default, well-known locations?
3608
3609
3610# Check that a command-line tool in the Boot JDK is correct
3611# $1 = name of variable to assign
3612# $2 = name of binary
3613
3614
3615###############################################################################
3616#
3617# We need a Boot JDK to bootstrap the build.
3618#
3619
3620
3621
3622
3623
3624#
3625# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3626# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3627#
3628# This code is free software; you can redistribute it and/or modify it
3629# under the terms of the GNU General Public License version 2 only, as
3630# published by the Free Software Foundation.  Oracle designates this
3631# particular file as subject to the "Classpath" exception as provided
3632# by Oracle in the LICENSE file that accompanied this code.
3633#
3634# This code is distributed in the hope that it will be useful, but WITHOUT
3635# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3636# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3637# version 2 for more details (a copy is included in the LICENSE file that
3638# accompanied this code).
3639#
3640# You should have received a copy of the GNU General Public License version
3641# 2 along with this work; if not, write to the Free Software Foundation,
3642# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3643#
3644# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3645# or visit www.oracle.com if you need additional information or have any
3646# questions.
3647#
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668#
3669# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3670# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3671#
3672# This code is free software; you can redistribute it and/or modify it
3673# under the terms of the GNU General Public License version 2 only, as
3674# published by the Free Software Foundation.  Oracle designates this
3675# particular file as subject to the "Classpath" exception as provided
3676# by Oracle in the LICENSE file that accompanied this code.
3677#
3678# This code is distributed in the hope that it will be useful, but WITHOUT
3679# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3680# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3681# version 2 for more details (a copy is included in the LICENSE file that
3682# accompanied this code).
3683#
3684# You should have received a copy of the GNU General Public License version
3685# 2 along with this work; if not, write to the Free Software Foundation,
3686# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3687#
3688# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3689# or visit www.oracle.com if you need additional information or have any
3690# questions.
3691#
3692
3693
3694
3695
3696
3697# Documentation on common flags used for solstudio in HIGHEST.
3698#
3699# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3700#          done with care, there are some assumptions below that need to
3701#          be understood about the use of pointers, and IEEE behavior.
3702#
3703# -fns: Use non-standard floating point mode (not IEEE 754)
3704# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3705# -fsingle: Use single precision floating point with 'float'
3706# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3707#   (Source with excessing pointer casting and data access with mixed
3708#    pointer types are not recommended)
3709# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3710#   (If you expect perfect errno behavior, do not use this)
3711# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3712# -xrestrict: Pointer parameters to functions do not overlap
3713#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3714#    If you pass in multiple pointers to the same data, do not use this)
3715# -xlibmil: Inline some library routines
3716#   (If you expect perfect errno behavior, do not use this)
3717# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3718#   (If you expect perfect errno behavior, do not use this)
3719#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3720
3721    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3722    # Bug?
3723    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3724    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3725    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3726    #fi
3727
3728
3729
3730
3731
3732
3733# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3734#                                   [RUN-IF-FALSE])
3735# ------------------------------------------------------------
3736# Check that the c and c++ compilers support an argument
3737
3738
3739
3740
3741#
3742# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3743# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3744#
3745# This code is free software; you can redistribute it and/or modify it
3746# under the terms of the GNU General Public License version 2 only, as
3747# published by the Free Software Foundation.  Oracle designates this
3748# particular file as subject to the "Classpath" exception as provided
3749# by Oracle in the LICENSE file that accompanied this code.
3750#
3751# This code is distributed in the hope that it will be useful, but WITHOUT
3752# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3753# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3754# version 2 for more details (a copy is included in the LICENSE file that
3755# accompanied this code).
3756#
3757# You should have received a copy of the GNU General Public License version
3758# 2 along with this work; if not, write to the Free Software Foundation,
3759# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3760#
3761# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3762# or visit www.oracle.com if you need additional information or have any
3763# questions.
3764#
3765
3766
3767
3768
3769
3770cygwin_help() {
3771  case $1 in
3772    unzip)
3773      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3774      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3775      ;;
3776    zip)
3777      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3778      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3779      ;;
3780    make)
3781      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3782      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3783      ;;
3784    freetype)
3785      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3786        HELP_MSG="To install freetype, run:
3787wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3788chmod +x /tmp/freetype-setup.exe
3789/tmp/freetype-setup.exe
3790Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3791After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3792      else
3793        HELP_MSG="You need to build a 64-bit version of freetype.
3794This is not readily available.
3795You can find source code and build instructions on
3796http://www.freetype.org/
3797If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3798      fi
3799      ;;
3800  esac
3801}
3802
3803msys_help() {
3804  PKGHANDLER_COMMAND=""
3805}
3806
3807apt_help() {
3808  case $1 in
3809    devkit)
3810      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3811    openjdk)
3812      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3813    alsa)
3814      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3815    cups)
3816      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3817    freetype)
3818      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3819    pulse)
3820      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3821    x11)
3822      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3823    ccache)
3824      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3825  esac
3826}
3827
3828yum_help() {
3829  case $1 in
3830    devkit)
3831      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3832    openjdk)
3833      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3834    alsa)
3835      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3836    cups)
3837      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3838    freetype)
3839      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3840    pulse)
3841      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3842    x11)
3843      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3844    ccache)
3845      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3846  esac
3847}
3848
3849port_help() {
3850  PKGHANDLER_COMMAND=""
3851}
3852
3853pkgutil_help() {
3854  PKGHANDLER_COMMAND=""
3855}
3856
3857pkgadd_help() {
3858  PKGHANDLER_COMMAND=""
3859}
3860
3861# This function will check if we're called from the "configure" wrapper while
3862# printing --help. If so, we will print out additional information that can
3863# only be extracted within the autoconf script, and then exit. This must be
3864# called at the very beginning in configure.ac.
3865
3866
3867
3868
3869#
3870# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3871# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3872#
3873# This code is free software; you can redistribute it and/or modify it
3874# under the terms of the GNU General Public License version 2 only, as
3875# published by the Free Software Foundation.  Oracle designates this
3876# particular file as subject to the "Classpath" exception as provided
3877# by Oracle in the LICENSE file that accompanied this code.
3878#
3879# This code is distributed in the hope that it will be useful, but WITHOUT
3880# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3881# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3882# version 2 for more details (a copy is included in the LICENSE file that
3883# accompanied this code).
3884#
3885# You should have received a copy of the GNU General Public License version
3886# 2 along with this work; if not, write to the Free Software Foundation,
3887# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3888#
3889# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3890# or visit www.oracle.com if you need additional information or have any
3891# questions.
3892#
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903###############################################################################
3904#
3905# Should we build only OpenJDK even if closed sources are present?
3906#
3907
3908
3909
3910
3911###############################################################################
3912#
3913# Setup version numbers
3914#
3915
3916
3917
3918
3919
3920
3921#
3922# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3923# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3924#
3925# This code is free software; you can redistribute it and/or modify it
3926# under the terms of the GNU General Public License version 2 only, as
3927# published by the Free Software Foundation.  Oracle designates this
3928# particular file as subject to the "Classpath" exception as provided
3929# by Oracle in the LICENSE file that accompanied this code.
3930#
3931# This code is distributed in the hope that it will be useful, but WITHOUT
3932# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3933# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3934# version 2 for more details (a copy is included in the LICENSE file that
3935# accompanied this code).
3936#
3937# You should have received a copy of the GNU General Public License version
3938# 2 along with this work; if not, write to the Free Software Foundation,
3939# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3940#
3941# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3942# or visit www.oracle.com if you need additional information or have any
3943# questions.
3944#
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964#
3965# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3966# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3967#
3968# This code is free software; you can redistribute it and/or modify it
3969# under the terms of the GNU General Public License version 2 only, as
3970# published by the Free Software Foundation.  Oracle designates this
3971# particular file as subject to the "Classpath" exception as provided
3972# by Oracle in the LICENSE file that accompanied this code.
3973#
3974# This code is distributed in the hope that it will be useful, but WITHOUT
3975# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3976# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3977# version 2 for more details (a copy is included in the LICENSE file that
3978# accompanied this code).
3979#
3980# You should have received a copy of the GNU General Public License version
3981# 2 along with this work; if not, write to the Free Software Foundation,
3982# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3983#
3984# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3985# or visit www.oracle.com if you need additional information or have any
3986# questions.
3987#
3988
3989# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3990# Converts autoconf style CPU name to OpenJDK style, into
3991# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3992
3993
3994# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3995# Converts autoconf style OS name to OpenJDK style, into
3996# VAR_OS and VAR_OS_API.
3997
3998
3999# Expects $host_os $host_cpu $build_os and $build_cpu
4000# and $with_target_bits to have been setup!
4001#
4002# Translate the standard triplet(quadruplet) definition
4003# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4004# OPENJDK_BUILD_OS, etc.
4005
4006
4007# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4008# accordingly. Must be done after setting up build and target system, but before
4009# doing anything else with these values.
4010
4011
4012# Setup the legacy variables, for controlling the old makefiles.
4013#
4014
4015
4016
4017
4018#%%% Build and target systems %%%
4019
4020
4021
4022
4023# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4024# Add -mX to various FLAGS variables.
4025
4026
4027
4028
4029
4030
4031#
4032# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4033# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4034#
4035# This code is free software; you can redistribute it and/or modify it
4036# under the terms of the GNU General Public License version 2 only, as
4037# published by the Free Software Foundation.  Oracle designates this
4038# particular file as subject to the "Classpath" exception as provided
4039# by Oracle in the LICENSE file that accompanied this code.
4040#
4041# This code is distributed in the hope that it will be useful, but WITHOUT
4042# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4043# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4044# version 2 for more details (a copy is included in the LICENSE file that
4045# accompanied this code).
4046#
4047# You should have received a copy of the GNU General Public License version
4048# 2 along with this work; if not, write to the Free Software Foundation,
4049# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4050#
4051# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4052# or visit www.oracle.com if you need additional information or have any
4053# questions.
4054#
4055
4056
4057
4058
4059
4060
4061
4062
4063#
4064# Copyright (c) 2011, 2014, 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# This file is responsible for detecting, verifying and setting up the
4090# toolchain, i.e. the compiler, linker and related utilities. It will setup
4091# proper paths to the binaries, but it will not setup any flags.
4092#
4093# The binaries used is determined by the toolchain type, which is the family of
4094# compilers and related tools that are used.
4095########################################################################
4096
4097
4098# All valid toolchains, regardless of platform (used by help.m4)
4099VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4100
4101# These toolchains are valid on different platforms
4102VALID_TOOLCHAINS_linux="gcc clang"
4103VALID_TOOLCHAINS_solaris="solstudio"
4104VALID_TOOLCHAINS_macosx="gcc clang"
4105VALID_TOOLCHAINS_aix="xlc"
4106VALID_TOOLCHAINS_windows="microsoft"
4107
4108# Toolchain descriptions
4109TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4110TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4111TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4112TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4113TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4114
4115# Setup a number of variables describing how native output files are
4116# named on this platform/toolchain.
4117
4118
4119# Determine which toolchain type to use, and make sure it is valid for this
4120# platform. Setup various information about the selected toolchain.
4121
4122
4123# Before we start detecting the toolchain executables, we might need some
4124# special setup, e.g. additional paths etc.
4125
4126
4127# Restore path, etc
4128
4129
4130# Check if a compiler is of the toolchain type we expect, and save the version
4131# information from it. If the compiler does not match the expected type,
4132# this function will abort using AC_MSG_ERROR. If it matches, the version will
4133# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4134# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4135#
4136# $1 = compiler to test (CC or CXX)
4137# $2 = human readable name of compiler (C or C++)
4138
4139
4140# Try to locate the given C or C++ compiler in the path, or otherwise.
4141#
4142# $1 = compiler to test (CC or CXX)
4143# $2 = human readable name of compiler (C or C++)
4144# $3 = list of compiler names to search for
4145
4146
4147# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4148# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4149# archiver (AR). Verify that the compilers are correct according to the
4150# toolchain type.
4151
4152
4153# Setup additional tools that is considered a part of the toolchain, but not the
4154# core part. Many of these are highly platform-specific and do not exist,
4155# and/or are not needed on all platforms.
4156
4157
4158# Setup the build tools (i.e, the compiler and linker used to build programs
4159# that should be run on the build platform, not the target platform, as a build
4160# helper). Since the non-cross-compile case uses the normal, target compilers
4161# for this, we can only do this after these have been setup.
4162
4163
4164# Setup legacy variables that are still needed as alternative ways to refer to
4165# parts of the toolchain.
4166
4167
4168# Do some additional checks on the detected tools.
4169
4170
4171# Setup the JTReg Regression Test Harness.
4172
4173
4174#
4175# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4176# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4177#
4178# This code is free software; you can redistribute it and/or modify it
4179# under the terms of the GNU General Public License version 2 only, as
4180# published by the Free Software Foundation.  Oracle designates this
4181# particular file as subject to the "Classpath" exception as provided
4182# by Oracle in the LICENSE file that accompanied this code.
4183#
4184# This code is distributed in the hope that it will be useful, but WITHOUT
4185# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4186# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4187# version 2 for more details (a copy is included in the LICENSE file that
4188# accompanied this code).
4189#
4190# You should have received a copy of the GNU General Public License version
4191# 2 along with this work; if not, write to the Free Software Foundation,
4192# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4193#
4194# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4195# or visit www.oracle.com if you need additional information or have any
4196# questions.
4197#
4198
4199
4200
4201
4202
4203
4204
4205# Check if the VS env variables were setup prior to running configure.
4206# If not, then find vcvarsall.bat and run it automatically, and integrate
4207# the set env variables into the spec file.
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218# This line needs to be here, verbatim, after all includes and the dummy hook
4219# definitions. It is replaced with custom functionality when building
4220# custom sources.
4221#CUSTOM_AUTOCONF_INCLUDE
4222
4223# Do not change or remove the following line, it is needed for consistency checks:
4224DATE_WHEN_GENERATED=1394150589
4225
4226###############################################################################
4227#
4228# Initialization / Boot-strapping
4229#
4230# The bootstrapping process needs to solve the "chicken or the egg" problem,
4231# thus it jumps back and forth, each time gaining something needed later on.
4232#
4233###############################################################################
4234
4235# If we are requested to print additional help, do that and then exit.
4236# This must be the very first call.
4237
4238  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4239    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4240    $PRINTF "Which are valid to use depends on the build platform.\n"
4241    for toolchain in $VALID_TOOLCHAINS_all; do
4242      # Use indirect variable referencing
4243      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4244      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4245      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4246    done
4247
4248    # And now exit directly
4249    exit 0
4250  fi
4251
4252
4253# Basic initialization that must happen first of all in the normal process.
4254
4255  # Save the original command line. This is passed to us by the wrapper configure script.
4256
4257  DATE_WHEN_CONFIGURED=`LANG=C date`
4258
4259  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4260$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4261  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4262$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4263
4264
4265  # Start with tools that do not need have cross compilation support
4266  # and can be expected to be found in the default PATH. These tools are
4267  # used by configure. Nor are these tools expected to be found in the
4268  # devkit from the builddeps server either, since they are
4269  # needed to download the devkit.
4270
4271  # First are all the simple required tools.
4272
4273
4274
4275  # Publish this variable in the help.
4276
4277
4278  if test "x$BASENAME" = x; then
4279    # The variable is not set by user, try to locate tool using the code snippet
4280    for ac_prog in basename
4281do
4282  # Extract the first word of "$ac_prog", so it can be a program name with args.
4283set dummy $ac_prog; ac_word=$2
4284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4285$as_echo_n "checking for $ac_word... " >&6; }
4286if ${ac_cv_path_BASENAME+:} false; then :
4287  $as_echo_n "(cached) " >&6
4288else
4289  case $BASENAME in
4290  [\\/]* | ?:[\\/]*)
4291  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4292  ;;
4293  *)
4294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4295for as_dir in $PATH
4296do
4297  IFS=$as_save_IFS
4298  test -z "$as_dir" && as_dir=.
4299    for ac_exec_ext in '' $ac_executable_extensions; do
4300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4301    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4303    break 2
4304  fi
4305done
4306  done
4307IFS=$as_save_IFS
4308
4309  ;;
4310esac
4311fi
4312BASENAME=$ac_cv_path_BASENAME
4313if test -n "$BASENAME"; then
4314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4315$as_echo "$BASENAME" >&6; }
4316else
4317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4318$as_echo "no" >&6; }
4319fi
4320
4321
4322  test -n "$BASENAME" && break
4323done
4324
4325  else
4326    # The variable is set, but is it from the command line or the environment?
4327
4328    # Try to remove the string !BASENAME! from our list.
4329    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4330    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4331      # If it failed, the variable was not from the command line. Ignore it,
4332      # but warn the user (except for BASH, which is always set by the calling BASH).
4333      if test "xBASENAME" != xBASH; then
4334        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4335$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4336      fi
4337      # Try to locate tool using the code snippet
4338      for ac_prog in basename
4339do
4340  # Extract the first word of "$ac_prog", so it can be a program name with args.
4341set dummy $ac_prog; ac_word=$2
4342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4343$as_echo_n "checking for $ac_word... " >&6; }
4344if ${ac_cv_path_BASENAME+:} false; then :
4345  $as_echo_n "(cached) " >&6
4346else
4347  case $BASENAME in
4348  [\\/]* | ?:[\\/]*)
4349  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4350  ;;
4351  *)
4352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4353for as_dir in $PATH
4354do
4355  IFS=$as_save_IFS
4356  test -z "$as_dir" && as_dir=.
4357    for ac_exec_ext in '' $ac_executable_extensions; do
4358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4359    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4361    break 2
4362  fi
4363done
4364  done
4365IFS=$as_save_IFS
4366
4367  ;;
4368esac
4369fi
4370BASENAME=$ac_cv_path_BASENAME
4371if test -n "$BASENAME"; then
4372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4373$as_echo "$BASENAME" >&6; }
4374else
4375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4376$as_echo "no" >&6; }
4377fi
4378
4379
4380  test -n "$BASENAME" && break
4381done
4382
4383    else
4384      # If it succeeded, then it was overridden by the user. We will use it
4385      # for the tool.
4386
4387      # First remove it from the list of overridden variables, so we can test
4388      # for unknown variables in the end.
4389      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4390
4391      # Check if the provided tool contains a complete path.
4392      tool_specified="$BASENAME"
4393      tool_basename="${tool_specified##*/}"
4394      if test "x$tool_basename" = "x$tool_specified"; then
4395        # A command without a complete path is provided, search $PATH.
4396        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4397$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4398        # Extract the first word of "$tool_basename", so it can be a program name with args.
4399set dummy $tool_basename; ac_word=$2
4400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4401$as_echo_n "checking for $ac_word... " >&6; }
4402if ${ac_cv_path_BASENAME+:} false; then :
4403  $as_echo_n "(cached) " >&6
4404else
4405  case $BASENAME in
4406  [\\/]* | ?:[\\/]*)
4407  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4408  ;;
4409  *)
4410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4411for as_dir in $PATH
4412do
4413  IFS=$as_save_IFS
4414  test -z "$as_dir" && as_dir=.
4415    for ac_exec_ext in '' $ac_executable_extensions; do
4416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4417    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4419    break 2
4420  fi
4421done
4422  done
4423IFS=$as_save_IFS
4424
4425  ;;
4426esac
4427fi
4428BASENAME=$ac_cv_path_BASENAME
4429if test -n "$BASENAME"; then
4430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4431$as_echo "$BASENAME" >&6; }
4432else
4433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4434$as_echo "no" >&6; }
4435fi
4436
4437
4438        if test "x$BASENAME" = x; then
4439          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4440        fi
4441      else
4442        # Otherwise we believe it is a complete path. Use it as it is.
4443        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4444$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4445        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4446$as_echo_n "checking for BASENAME... " >&6; }
4447        if test ! -x "$tool_specified"; then
4448          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4449$as_echo "not found" >&6; }
4450          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4451        fi
4452        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4453$as_echo "$tool_specified" >&6; }
4454      fi
4455    fi
4456  fi
4457
4458
4459
4460  if test "x$BASENAME" = x; then
4461    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4462  fi
4463
4464
4465
4466
4467
4468  # Publish this variable in the help.
4469
4470
4471  if test "x$BASH" = x; then
4472    # The variable is not set by user, try to locate tool using the code snippet
4473    for ac_prog in bash
4474do
4475  # Extract the first word of "$ac_prog", so it can be a program name with args.
4476set dummy $ac_prog; ac_word=$2
4477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4478$as_echo_n "checking for $ac_word... " >&6; }
4479if ${ac_cv_path_BASH+:} false; then :
4480  $as_echo_n "(cached) " >&6
4481else
4482  case $BASH in
4483  [\\/]* | ?:[\\/]*)
4484  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4485  ;;
4486  *)
4487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4488for as_dir in $PATH
4489do
4490  IFS=$as_save_IFS
4491  test -z "$as_dir" && as_dir=.
4492    for ac_exec_ext in '' $ac_executable_extensions; do
4493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4494    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4496    break 2
4497  fi
4498done
4499  done
4500IFS=$as_save_IFS
4501
4502  ;;
4503esac
4504fi
4505BASH=$ac_cv_path_BASH
4506if test -n "$BASH"; then
4507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4508$as_echo "$BASH" >&6; }
4509else
4510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4511$as_echo "no" >&6; }
4512fi
4513
4514
4515  test -n "$BASH" && break
4516done
4517
4518  else
4519    # The variable is set, but is it from the command line or the environment?
4520
4521    # Try to remove the string !BASH! from our list.
4522    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4523    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4524      # If it failed, the variable was not from the command line. Ignore it,
4525      # but warn the user (except for BASH, which is always set by the calling BASH).
4526      if test "xBASH" != xBASH; then
4527        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4528$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4529      fi
4530      # Try to locate tool using the code snippet
4531      for ac_prog in bash
4532do
4533  # Extract the first word of "$ac_prog", so it can be a program name with args.
4534set dummy $ac_prog; ac_word=$2
4535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4536$as_echo_n "checking for $ac_word... " >&6; }
4537if ${ac_cv_path_BASH+:} false; then :
4538  $as_echo_n "(cached) " >&6
4539else
4540  case $BASH in
4541  [\\/]* | ?:[\\/]*)
4542  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4543  ;;
4544  *)
4545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4546for as_dir in $PATH
4547do
4548  IFS=$as_save_IFS
4549  test -z "$as_dir" && as_dir=.
4550    for ac_exec_ext in '' $ac_executable_extensions; do
4551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4552    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4554    break 2
4555  fi
4556done
4557  done
4558IFS=$as_save_IFS
4559
4560  ;;
4561esac
4562fi
4563BASH=$ac_cv_path_BASH
4564if test -n "$BASH"; then
4565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4566$as_echo "$BASH" >&6; }
4567else
4568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4569$as_echo "no" >&6; }
4570fi
4571
4572
4573  test -n "$BASH" && break
4574done
4575
4576    else
4577      # If it succeeded, then it was overridden by the user. We will use it
4578      # for the tool.
4579
4580      # First remove it from the list of overridden variables, so we can test
4581      # for unknown variables in the end.
4582      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4583
4584      # Check if the provided tool contains a complete path.
4585      tool_specified="$BASH"
4586      tool_basename="${tool_specified##*/}"
4587      if test "x$tool_basename" = "x$tool_specified"; then
4588        # A command without a complete path is provided, search $PATH.
4589        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4590$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4591        # Extract the first word of "$tool_basename", so it can be a program name with args.
4592set dummy $tool_basename; ac_word=$2
4593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4594$as_echo_n "checking for $ac_word... " >&6; }
4595if ${ac_cv_path_BASH+:} false; then :
4596  $as_echo_n "(cached) " >&6
4597else
4598  case $BASH in
4599  [\\/]* | ?:[\\/]*)
4600  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4601  ;;
4602  *)
4603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4604for as_dir in $PATH
4605do
4606  IFS=$as_save_IFS
4607  test -z "$as_dir" && as_dir=.
4608    for ac_exec_ext in '' $ac_executable_extensions; do
4609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4610    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4612    break 2
4613  fi
4614done
4615  done
4616IFS=$as_save_IFS
4617
4618  ;;
4619esac
4620fi
4621BASH=$ac_cv_path_BASH
4622if test -n "$BASH"; then
4623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4624$as_echo "$BASH" >&6; }
4625else
4626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4627$as_echo "no" >&6; }
4628fi
4629
4630
4631        if test "x$BASH" = x; then
4632          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4633        fi
4634      else
4635        # Otherwise we believe it is a complete path. Use it as it is.
4636        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4637$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4638        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4639$as_echo_n "checking for BASH... " >&6; }
4640        if test ! -x "$tool_specified"; then
4641          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4642$as_echo "not found" >&6; }
4643          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4644        fi
4645        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4646$as_echo "$tool_specified" >&6; }
4647      fi
4648    fi
4649  fi
4650
4651
4652
4653  if test "x$BASH" = x; then
4654    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4655  fi
4656
4657
4658
4659
4660
4661  # Publish this variable in the help.
4662
4663
4664  if test "x$CAT" = x; then
4665    # The variable is not set by user, try to locate tool using the code snippet
4666    for ac_prog in cat
4667do
4668  # Extract the first word of "$ac_prog", so it can be a program name with args.
4669set dummy $ac_prog; ac_word=$2
4670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4671$as_echo_n "checking for $ac_word... " >&6; }
4672if ${ac_cv_path_CAT+:} false; then :
4673  $as_echo_n "(cached) " >&6
4674else
4675  case $CAT in
4676  [\\/]* | ?:[\\/]*)
4677  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4678  ;;
4679  *)
4680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4681for as_dir in $PATH
4682do
4683  IFS=$as_save_IFS
4684  test -z "$as_dir" && as_dir=.
4685    for ac_exec_ext in '' $ac_executable_extensions; do
4686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4687    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4689    break 2
4690  fi
4691done
4692  done
4693IFS=$as_save_IFS
4694
4695  ;;
4696esac
4697fi
4698CAT=$ac_cv_path_CAT
4699if test -n "$CAT"; then
4700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4701$as_echo "$CAT" >&6; }
4702else
4703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4704$as_echo "no" >&6; }
4705fi
4706
4707
4708  test -n "$CAT" && break
4709done
4710
4711  else
4712    # The variable is set, but is it from the command line or the environment?
4713
4714    # Try to remove the string !CAT! from our list.
4715    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4716    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4717      # If it failed, the variable was not from the command line. Ignore it,
4718      # but warn the user (except for BASH, which is always set by the calling BASH).
4719      if test "xCAT" != xBASH; then
4720        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4721$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4722      fi
4723      # Try to locate tool using the code snippet
4724      for ac_prog in cat
4725do
4726  # Extract the first word of "$ac_prog", so it can be a program name with args.
4727set dummy $ac_prog; ac_word=$2
4728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4729$as_echo_n "checking for $ac_word... " >&6; }
4730if ${ac_cv_path_CAT+:} false; then :
4731  $as_echo_n "(cached) " >&6
4732else
4733  case $CAT in
4734  [\\/]* | ?:[\\/]*)
4735  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4736  ;;
4737  *)
4738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4739for as_dir in $PATH
4740do
4741  IFS=$as_save_IFS
4742  test -z "$as_dir" && as_dir=.
4743    for ac_exec_ext in '' $ac_executable_extensions; do
4744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4745    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4747    break 2
4748  fi
4749done
4750  done
4751IFS=$as_save_IFS
4752
4753  ;;
4754esac
4755fi
4756CAT=$ac_cv_path_CAT
4757if test -n "$CAT"; then
4758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4759$as_echo "$CAT" >&6; }
4760else
4761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4762$as_echo "no" >&6; }
4763fi
4764
4765
4766  test -n "$CAT" && break
4767done
4768
4769    else
4770      # If it succeeded, then it was overridden by the user. We will use it
4771      # for the tool.
4772
4773      # First remove it from the list of overridden variables, so we can test
4774      # for unknown variables in the end.
4775      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4776
4777      # Check if the provided tool contains a complete path.
4778      tool_specified="$CAT"
4779      tool_basename="${tool_specified##*/}"
4780      if test "x$tool_basename" = "x$tool_specified"; then
4781        # A command without a complete path is provided, search $PATH.
4782        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4783$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4784        # Extract the first word of "$tool_basename", so it can be a program name with args.
4785set dummy $tool_basename; ac_word=$2
4786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4787$as_echo_n "checking for $ac_word... " >&6; }
4788if ${ac_cv_path_CAT+:} false; then :
4789  $as_echo_n "(cached) " >&6
4790else
4791  case $CAT in
4792  [\\/]* | ?:[\\/]*)
4793  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4794  ;;
4795  *)
4796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4797for as_dir in $PATH
4798do
4799  IFS=$as_save_IFS
4800  test -z "$as_dir" && as_dir=.
4801    for ac_exec_ext in '' $ac_executable_extensions; do
4802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4803    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4805    break 2
4806  fi
4807done
4808  done
4809IFS=$as_save_IFS
4810
4811  ;;
4812esac
4813fi
4814CAT=$ac_cv_path_CAT
4815if test -n "$CAT"; then
4816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4817$as_echo "$CAT" >&6; }
4818else
4819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4820$as_echo "no" >&6; }
4821fi
4822
4823
4824        if test "x$CAT" = x; then
4825          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4826        fi
4827      else
4828        # Otherwise we believe it is a complete path. Use it as it is.
4829        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4830$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4831        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4832$as_echo_n "checking for CAT... " >&6; }
4833        if test ! -x "$tool_specified"; then
4834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4835$as_echo "not found" >&6; }
4836          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4837        fi
4838        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4839$as_echo "$tool_specified" >&6; }
4840      fi
4841    fi
4842  fi
4843
4844
4845
4846  if test "x$CAT" = x; then
4847    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4848  fi
4849
4850
4851
4852
4853
4854  # Publish this variable in the help.
4855
4856
4857  if test "x$CHMOD" = x; then
4858    # The variable is not set by user, try to locate tool using the code snippet
4859    for ac_prog in chmod
4860do
4861  # Extract the first word of "$ac_prog", so it can be a program name with args.
4862set dummy $ac_prog; ac_word=$2
4863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4864$as_echo_n "checking for $ac_word... " >&6; }
4865if ${ac_cv_path_CHMOD+:} false; then :
4866  $as_echo_n "(cached) " >&6
4867else
4868  case $CHMOD in
4869  [\\/]* | ?:[\\/]*)
4870  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4871  ;;
4872  *)
4873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4874for as_dir in $PATH
4875do
4876  IFS=$as_save_IFS
4877  test -z "$as_dir" && as_dir=.
4878    for ac_exec_ext in '' $ac_executable_extensions; do
4879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4880    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4882    break 2
4883  fi
4884done
4885  done
4886IFS=$as_save_IFS
4887
4888  ;;
4889esac
4890fi
4891CHMOD=$ac_cv_path_CHMOD
4892if test -n "$CHMOD"; then
4893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4894$as_echo "$CHMOD" >&6; }
4895else
4896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4897$as_echo "no" >&6; }
4898fi
4899
4900
4901  test -n "$CHMOD" && break
4902done
4903
4904  else
4905    # The variable is set, but is it from the command line or the environment?
4906
4907    # Try to remove the string !CHMOD! from our list.
4908    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
4909    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4910      # If it failed, the variable was not from the command line. Ignore it,
4911      # but warn the user (except for BASH, which is always set by the calling BASH).
4912      if test "xCHMOD" != xBASH; then
4913        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
4914$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
4915      fi
4916      # Try to locate tool using the code snippet
4917      for ac_prog in chmod
4918do
4919  # Extract the first word of "$ac_prog", so it can be a program name with args.
4920set dummy $ac_prog; ac_word=$2
4921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4922$as_echo_n "checking for $ac_word... " >&6; }
4923if ${ac_cv_path_CHMOD+:} false; then :
4924  $as_echo_n "(cached) " >&6
4925else
4926  case $CHMOD in
4927  [\\/]* | ?:[\\/]*)
4928  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4929  ;;
4930  *)
4931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4932for as_dir in $PATH
4933do
4934  IFS=$as_save_IFS
4935  test -z "$as_dir" && as_dir=.
4936    for ac_exec_ext in '' $ac_executable_extensions; do
4937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4938    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4940    break 2
4941  fi
4942done
4943  done
4944IFS=$as_save_IFS
4945
4946  ;;
4947esac
4948fi
4949CHMOD=$ac_cv_path_CHMOD
4950if test -n "$CHMOD"; then
4951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4952$as_echo "$CHMOD" >&6; }
4953else
4954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4955$as_echo "no" >&6; }
4956fi
4957
4958
4959  test -n "$CHMOD" && break
4960done
4961
4962    else
4963      # If it succeeded, then it was overridden by the user. We will use it
4964      # for the tool.
4965
4966      # First remove it from the list of overridden variables, so we can test
4967      # for unknown variables in the end.
4968      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4969
4970      # Check if the provided tool contains a complete path.
4971      tool_specified="$CHMOD"
4972      tool_basename="${tool_specified##*/}"
4973      if test "x$tool_basename" = "x$tool_specified"; then
4974        # A command without a complete path is provided, search $PATH.
4975        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
4976$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
4977        # Extract the first word of "$tool_basename", so it can be a program name with args.
4978set dummy $tool_basename; ac_word=$2
4979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4980$as_echo_n "checking for $ac_word... " >&6; }
4981if ${ac_cv_path_CHMOD+:} false; then :
4982  $as_echo_n "(cached) " >&6
4983else
4984  case $CHMOD in
4985  [\\/]* | ?:[\\/]*)
4986  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4987  ;;
4988  *)
4989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4990for as_dir in $PATH
4991do
4992  IFS=$as_save_IFS
4993  test -z "$as_dir" && as_dir=.
4994    for ac_exec_ext in '' $ac_executable_extensions; do
4995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4996    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4998    break 2
4999  fi
5000done
5001  done
5002IFS=$as_save_IFS
5003
5004  ;;
5005esac
5006fi
5007CHMOD=$ac_cv_path_CHMOD
5008if test -n "$CHMOD"; then
5009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5010$as_echo "$CHMOD" >&6; }
5011else
5012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5013$as_echo "no" >&6; }
5014fi
5015
5016
5017        if test "x$CHMOD" = x; then
5018          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5019        fi
5020      else
5021        # Otherwise we believe it is a complete path. Use it as it is.
5022        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5023$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5024        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5025$as_echo_n "checking for CHMOD... " >&6; }
5026        if test ! -x "$tool_specified"; then
5027          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5028$as_echo "not found" >&6; }
5029          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5030        fi
5031        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5032$as_echo "$tool_specified" >&6; }
5033      fi
5034    fi
5035  fi
5036
5037
5038
5039  if test "x$CHMOD" = x; then
5040    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5041  fi
5042
5043
5044
5045
5046
5047  # Publish this variable in the help.
5048
5049
5050  if test "x$CMP" = x; then
5051    # The variable is not set by user, try to locate tool using the code snippet
5052    for ac_prog in cmp
5053do
5054  # Extract the first word of "$ac_prog", so it can be a program name with args.
5055set dummy $ac_prog; ac_word=$2
5056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5057$as_echo_n "checking for $ac_word... " >&6; }
5058if ${ac_cv_path_CMP+:} false; then :
5059  $as_echo_n "(cached) " >&6
5060else
5061  case $CMP in
5062  [\\/]* | ?:[\\/]*)
5063  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5064  ;;
5065  *)
5066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5067for as_dir in $PATH
5068do
5069  IFS=$as_save_IFS
5070  test -z "$as_dir" && as_dir=.
5071    for ac_exec_ext in '' $ac_executable_extensions; do
5072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5073    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5075    break 2
5076  fi
5077done
5078  done
5079IFS=$as_save_IFS
5080
5081  ;;
5082esac
5083fi
5084CMP=$ac_cv_path_CMP
5085if test -n "$CMP"; then
5086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5087$as_echo "$CMP" >&6; }
5088else
5089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5090$as_echo "no" >&6; }
5091fi
5092
5093
5094  test -n "$CMP" && break
5095done
5096
5097  else
5098    # The variable is set, but is it from the command line or the environment?
5099
5100    # Try to remove the string !CMP! from our list.
5101    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5102    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5103      # If it failed, the variable was not from the command line. Ignore it,
5104      # but warn the user (except for BASH, which is always set by the calling BASH).
5105      if test "xCMP" != xBASH; then
5106        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5107$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5108      fi
5109      # Try to locate tool using the code snippet
5110      for ac_prog in cmp
5111do
5112  # Extract the first word of "$ac_prog", so it can be a program name with args.
5113set dummy $ac_prog; ac_word=$2
5114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5115$as_echo_n "checking for $ac_word... " >&6; }
5116if ${ac_cv_path_CMP+:} false; then :
5117  $as_echo_n "(cached) " >&6
5118else
5119  case $CMP in
5120  [\\/]* | ?:[\\/]*)
5121  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5122  ;;
5123  *)
5124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5125for as_dir in $PATH
5126do
5127  IFS=$as_save_IFS
5128  test -z "$as_dir" && as_dir=.
5129    for ac_exec_ext in '' $ac_executable_extensions; do
5130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5131    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5133    break 2
5134  fi
5135done
5136  done
5137IFS=$as_save_IFS
5138
5139  ;;
5140esac
5141fi
5142CMP=$ac_cv_path_CMP
5143if test -n "$CMP"; then
5144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5145$as_echo "$CMP" >&6; }
5146else
5147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5148$as_echo "no" >&6; }
5149fi
5150
5151
5152  test -n "$CMP" && break
5153done
5154
5155    else
5156      # If it succeeded, then it was overridden by the user. We will use it
5157      # for the tool.
5158
5159      # First remove it from the list of overridden variables, so we can test
5160      # for unknown variables in the end.
5161      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5162
5163      # Check if the provided tool contains a complete path.
5164      tool_specified="$CMP"
5165      tool_basename="${tool_specified##*/}"
5166      if test "x$tool_basename" = "x$tool_specified"; then
5167        # A command without a complete path is provided, search $PATH.
5168        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5169$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5170        # Extract the first word of "$tool_basename", so it can be a program name with args.
5171set dummy $tool_basename; ac_word=$2
5172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5173$as_echo_n "checking for $ac_word... " >&6; }
5174if ${ac_cv_path_CMP+:} false; then :
5175  $as_echo_n "(cached) " >&6
5176else
5177  case $CMP in
5178  [\\/]* | ?:[\\/]*)
5179  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5180  ;;
5181  *)
5182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5183for as_dir in $PATH
5184do
5185  IFS=$as_save_IFS
5186  test -z "$as_dir" && as_dir=.
5187    for ac_exec_ext in '' $ac_executable_extensions; do
5188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5189    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5191    break 2
5192  fi
5193done
5194  done
5195IFS=$as_save_IFS
5196
5197  ;;
5198esac
5199fi
5200CMP=$ac_cv_path_CMP
5201if test -n "$CMP"; then
5202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5203$as_echo "$CMP" >&6; }
5204else
5205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5206$as_echo "no" >&6; }
5207fi
5208
5209
5210        if test "x$CMP" = x; then
5211          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5212        fi
5213      else
5214        # Otherwise we believe it is a complete path. Use it as it is.
5215        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5216$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5217        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5218$as_echo_n "checking for CMP... " >&6; }
5219        if test ! -x "$tool_specified"; then
5220          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5221$as_echo "not found" >&6; }
5222          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5223        fi
5224        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5225$as_echo "$tool_specified" >&6; }
5226      fi
5227    fi
5228  fi
5229
5230
5231
5232  if test "x$CMP" = x; then
5233    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5234  fi
5235
5236
5237
5238
5239
5240  # Publish this variable in the help.
5241
5242
5243  if test "x$COMM" = x; then
5244    # The variable is not set by user, try to locate tool using the code snippet
5245    for ac_prog in comm
5246do
5247  # Extract the first word of "$ac_prog", so it can be a program name with args.
5248set dummy $ac_prog; ac_word=$2
5249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5250$as_echo_n "checking for $ac_word... " >&6; }
5251if ${ac_cv_path_COMM+:} false; then :
5252  $as_echo_n "(cached) " >&6
5253else
5254  case $COMM in
5255  [\\/]* | ?:[\\/]*)
5256  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5257  ;;
5258  *)
5259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5260for as_dir in $PATH
5261do
5262  IFS=$as_save_IFS
5263  test -z "$as_dir" && as_dir=.
5264    for ac_exec_ext in '' $ac_executable_extensions; do
5265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5266    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5268    break 2
5269  fi
5270done
5271  done
5272IFS=$as_save_IFS
5273
5274  ;;
5275esac
5276fi
5277COMM=$ac_cv_path_COMM
5278if test -n "$COMM"; then
5279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5280$as_echo "$COMM" >&6; }
5281else
5282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5283$as_echo "no" >&6; }
5284fi
5285
5286
5287  test -n "$COMM" && break
5288done
5289
5290  else
5291    # The variable is set, but is it from the command line or the environment?
5292
5293    # Try to remove the string !COMM! from our list.
5294    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5295    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5296      # If it failed, the variable was not from the command line. Ignore it,
5297      # but warn the user (except for BASH, which is always set by the calling BASH).
5298      if test "xCOMM" != xBASH; then
5299        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5300$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5301      fi
5302      # Try to locate tool using the code snippet
5303      for ac_prog in comm
5304do
5305  # Extract the first word of "$ac_prog", so it can be a program name with args.
5306set dummy $ac_prog; ac_word=$2
5307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5308$as_echo_n "checking for $ac_word... " >&6; }
5309if ${ac_cv_path_COMM+:} false; then :
5310  $as_echo_n "(cached) " >&6
5311else
5312  case $COMM in
5313  [\\/]* | ?:[\\/]*)
5314  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5315  ;;
5316  *)
5317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5318for as_dir in $PATH
5319do
5320  IFS=$as_save_IFS
5321  test -z "$as_dir" && as_dir=.
5322    for ac_exec_ext in '' $ac_executable_extensions; do
5323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5324    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5326    break 2
5327  fi
5328done
5329  done
5330IFS=$as_save_IFS
5331
5332  ;;
5333esac
5334fi
5335COMM=$ac_cv_path_COMM
5336if test -n "$COMM"; then
5337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5338$as_echo "$COMM" >&6; }
5339else
5340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5341$as_echo "no" >&6; }
5342fi
5343
5344
5345  test -n "$COMM" && break
5346done
5347
5348    else
5349      # If it succeeded, then it was overridden by the user. We will use it
5350      # for the tool.
5351
5352      # First remove it from the list of overridden variables, so we can test
5353      # for unknown variables in the end.
5354      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5355
5356      # Check if the provided tool contains a complete path.
5357      tool_specified="$COMM"
5358      tool_basename="${tool_specified##*/}"
5359      if test "x$tool_basename" = "x$tool_specified"; then
5360        # A command without a complete path is provided, search $PATH.
5361        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5362$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5363        # Extract the first word of "$tool_basename", so it can be a program name with args.
5364set dummy $tool_basename; ac_word=$2
5365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5366$as_echo_n "checking for $ac_word... " >&6; }
5367if ${ac_cv_path_COMM+:} false; then :
5368  $as_echo_n "(cached) " >&6
5369else
5370  case $COMM in
5371  [\\/]* | ?:[\\/]*)
5372  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5373  ;;
5374  *)
5375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5376for as_dir in $PATH
5377do
5378  IFS=$as_save_IFS
5379  test -z "$as_dir" && as_dir=.
5380    for ac_exec_ext in '' $ac_executable_extensions; do
5381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5382    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5384    break 2
5385  fi
5386done
5387  done
5388IFS=$as_save_IFS
5389
5390  ;;
5391esac
5392fi
5393COMM=$ac_cv_path_COMM
5394if test -n "$COMM"; then
5395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5396$as_echo "$COMM" >&6; }
5397else
5398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5399$as_echo "no" >&6; }
5400fi
5401
5402
5403        if test "x$COMM" = x; then
5404          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5405        fi
5406      else
5407        # Otherwise we believe it is a complete path. Use it as it is.
5408        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5409$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5410        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5411$as_echo_n "checking for COMM... " >&6; }
5412        if test ! -x "$tool_specified"; then
5413          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5414$as_echo "not found" >&6; }
5415          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5416        fi
5417        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5418$as_echo "$tool_specified" >&6; }
5419      fi
5420    fi
5421  fi
5422
5423
5424
5425  if test "x$COMM" = x; then
5426    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5427  fi
5428
5429
5430
5431
5432
5433  # Publish this variable in the help.
5434
5435
5436  if test "x$CP" = x; then
5437    # The variable is not set by user, try to locate tool using the code snippet
5438    for ac_prog in cp
5439do
5440  # Extract the first word of "$ac_prog", so it can be a program name with args.
5441set dummy $ac_prog; ac_word=$2
5442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5443$as_echo_n "checking for $ac_word... " >&6; }
5444if ${ac_cv_path_CP+:} false; then :
5445  $as_echo_n "(cached) " >&6
5446else
5447  case $CP in
5448  [\\/]* | ?:[\\/]*)
5449  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5450  ;;
5451  *)
5452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5453for as_dir in $PATH
5454do
5455  IFS=$as_save_IFS
5456  test -z "$as_dir" && as_dir=.
5457    for ac_exec_ext in '' $ac_executable_extensions; do
5458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5459    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5461    break 2
5462  fi
5463done
5464  done
5465IFS=$as_save_IFS
5466
5467  ;;
5468esac
5469fi
5470CP=$ac_cv_path_CP
5471if test -n "$CP"; then
5472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5473$as_echo "$CP" >&6; }
5474else
5475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5476$as_echo "no" >&6; }
5477fi
5478
5479
5480  test -n "$CP" && break
5481done
5482
5483  else
5484    # The variable is set, but is it from the command line or the environment?
5485
5486    # Try to remove the string !CP! from our list.
5487    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5488    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5489      # If it failed, the variable was not from the command line. Ignore it,
5490      # but warn the user (except for BASH, which is always set by the calling BASH).
5491      if test "xCP" != xBASH; then
5492        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5493$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5494      fi
5495      # Try to locate tool using the code snippet
5496      for ac_prog in cp
5497do
5498  # Extract the first word of "$ac_prog", so it can be a program name with args.
5499set dummy $ac_prog; ac_word=$2
5500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5501$as_echo_n "checking for $ac_word... " >&6; }
5502if ${ac_cv_path_CP+:} false; then :
5503  $as_echo_n "(cached) " >&6
5504else
5505  case $CP in
5506  [\\/]* | ?:[\\/]*)
5507  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5508  ;;
5509  *)
5510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5511for as_dir in $PATH
5512do
5513  IFS=$as_save_IFS
5514  test -z "$as_dir" && as_dir=.
5515    for ac_exec_ext in '' $ac_executable_extensions; do
5516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5517    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5519    break 2
5520  fi
5521done
5522  done
5523IFS=$as_save_IFS
5524
5525  ;;
5526esac
5527fi
5528CP=$ac_cv_path_CP
5529if test -n "$CP"; then
5530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5531$as_echo "$CP" >&6; }
5532else
5533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5534$as_echo "no" >&6; }
5535fi
5536
5537
5538  test -n "$CP" && break
5539done
5540
5541    else
5542      # If it succeeded, then it was overridden by the user. We will use it
5543      # for the tool.
5544
5545      # First remove it from the list of overridden variables, so we can test
5546      # for unknown variables in the end.
5547      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5548
5549      # Check if the provided tool contains a complete path.
5550      tool_specified="$CP"
5551      tool_basename="${tool_specified##*/}"
5552      if test "x$tool_basename" = "x$tool_specified"; then
5553        # A command without a complete path is provided, search $PATH.
5554        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5555$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5556        # Extract the first word of "$tool_basename", so it can be a program name with args.
5557set dummy $tool_basename; ac_word=$2
5558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5559$as_echo_n "checking for $ac_word... " >&6; }
5560if ${ac_cv_path_CP+:} false; then :
5561  $as_echo_n "(cached) " >&6
5562else
5563  case $CP in
5564  [\\/]* | ?:[\\/]*)
5565  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5566  ;;
5567  *)
5568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5569for as_dir in $PATH
5570do
5571  IFS=$as_save_IFS
5572  test -z "$as_dir" && as_dir=.
5573    for ac_exec_ext in '' $ac_executable_extensions; do
5574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5575    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5577    break 2
5578  fi
5579done
5580  done
5581IFS=$as_save_IFS
5582
5583  ;;
5584esac
5585fi
5586CP=$ac_cv_path_CP
5587if test -n "$CP"; then
5588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5589$as_echo "$CP" >&6; }
5590else
5591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5592$as_echo "no" >&6; }
5593fi
5594
5595
5596        if test "x$CP" = x; then
5597          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5598        fi
5599      else
5600        # Otherwise we believe it is a complete path. Use it as it is.
5601        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5602$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5603        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5604$as_echo_n "checking for CP... " >&6; }
5605        if test ! -x "$tool_specified"; then
5606          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5607$as_echo "not found" >&6; }
5608          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5609        fi
5610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5611$as_echo "$tool_specified" >&6; }
5612      fi
5613    fi
5614  fi
5615
5616
5617
5618  if test "x$CP" = x; then
5619    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5620  fi
5621
5622
5623
5624
5625
5626  # Publish this variable in the help.
5627
5628
5629  if test "x$CPIO" = x; then
5630    # The variable is not set by user, try to locate tool using the code snippet
5631    for ac_prog in cpio
5632do
5633  # Extract the first word of "$ac_prog", so it can be a program name with args.
5634set dummy $ac_prog; ac_word=$2
5635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5636$as_echo_n "checking for $ac_word... " >&6; }
5637if ${ac_cv_path_CPIO+:} false; then :
5638  $as_echo_n "(cached) " >&6
5639else
5640  case $CPIO in
5641  [\\/]* | ?:[\\/]*)
5642  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5643  ;;
5644  *)
5645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5646for as_dir in $PATH
5647do
5648  IFS=$as_save_IFS
5649  test -z "$as_dir" && as_dir=.
5650    for ac_exec_ext in '' $ac_executable_extensions; do
5651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5652    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5654    break 2
5655  fi
5656done
5657  done
5658IFS=$as_save_IFS
5659
5660  ;;
5661esac
5662fi
5663CPIO=$ac_cv_path_CPIO
5664if test -n "$CPIO"; then
5665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5666$as_echo "$CPIO" >&6; }
5667else
5668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5669$as_echo "no" >&6; }
5670fi
5671
5672
5673  test -n "$CPIO" && break
5674done
5675
5676  else
5677    # The variable is set, but is it from the command line or the environment?
5678
5679    # Try to remove the string !CPIO! from our list.
5680    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
5681    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5682      # If it failed, the variable was not from the command line. Ignore it,
5683      # but warn the user (except for BASH, which is always set by the calling BASH).
5684      if test "xCPIO" != xBASH; then
5685        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
5686$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
5687      fi
5688      # Try to locate tool using the code snippet
5689      for ac_prog in cpio
5690do
5691  # Extract the first word of "$ac_prog", so it can be a program name with args.
5692set dummy $ac_prog; ac_word=$2
5693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5694$as_echo_n "checking for $ac_word... " >&6; }
5695if ${ac_cv_path_CPIO+:} false; then :
5696  $as_echo_n "(cached) " >&6
5697else
5698  case $CPIO in
5699  [\\/]* | ?:[\\/]*)
5700  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5701  ;;
5702  *)
5703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5704for as_dir in $PATH
5705do
5706  IFS=$as_save_IFS
5707  test -z "$as_dir" && as_dir=.
5708    for ac_exec_ext in '' $ac_executable_extensions; do
5709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5710    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5712    break 2
5713  fi
5714done
5715  done
5716IFS=$as_save_IFS
5717
5718  ;;
5719esac
5720fi
5721CPIO=$ac_cv_path_CPIO
5722if test -n "$CPIO"; then
5723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5724$as_echo "$CPIO" >&6; }
5725else
5726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5727$as_echo "no" >&6; }
5728fi
5729
5730
5731  test -n "$CPIO" && break
5732done
5733
5734    else
5735      # If it succeeded, then it was overridden by the user. We will use it
5736      # for the tool.
5737
5738      # First remove it from the list of overridden variables, so we can test
5739      # for unknown variables in the end.
5740      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5741
5742      # Check if the provided tool contains a complete path.
5743      tool_specified="$CPIO"
5744      tool_basename="${tool_specified##*/}"
5745      if test "x$tool_basename" = "x$tool_specified"; then
5746        # A command without a complete path is provided, search $PATH.
5747        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
5748$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
5749        # Extract the first word of "$tool_basename", so it can be a program name with args.
5750set dummy $tool_basename; ac_word=$2
5751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5752$as_echo_n "checking for $ac_word... " >&6; }
5753if ${ac_cv_path_CPIO+:} false; then :
5754  $as_echo_n "(cached) " >&6
5755else
5756  case $CPIO in
5757  [\\/]* | ?:[\\/]*)
5758  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5759  ;;
5760  *)
5761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5762for as_dir in $PATH
5763do
5764  IFS=$as_save_IFS
5765  test -z "$as_dir" && as_dir=.
5766    for ac_exec_ext in '' $ac_executable_extensions; do
5767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5768    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5770    break 2
5771  fi
5772done
5773  done
5774IFS=$as_save_IFS
5775
5776  ;;
5777esac
5778fi
5779CPIO=$ac_cv_path_CPIO
5780if test -n "$CPIO"; then
5781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5782$as_echo "$CPIO" >&6; }
5783else
5784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5785$as_echo "no" >&6; }
5786fi
5787
5788
5789        if test "x$CPIO" = x; then
5790          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5791        fi
5792      else
5793        # Otherwise we believe it is a complete path. Use it as it is.
5794        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
5795$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
5796        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
5797$as_echo_n "checking for CPIO... " >&6; }
5798        if test ! -x "$tool_specified"; then
5799          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5800$as_echo "not found" >&6; }
5801          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
5802        fi
5803        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5804$as_echo "$tool_specified" >&6; }
5805      fi
5806    fi
5807  fi
5808
5809
5810
5811  if test "x$CPIO" = x; then
5812    as_fn_error $? "Could not find required tool for CPIO" "$LINENO" 5
5813  fi
5814
5815
5816
5817
5818
5819  # Publish this variable in the help.
5820
5821
5822  if test "x$CUT" = x; then
5823    # The variable is not set by user, try to locate tool using the code snippet
5824    for ac_prog in cut
5825do
5826  # Extract the first word of "$ac_prog", so it can be a program name with args.
5827set dummy $ac_prog; ac_word=$2
5828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5829$as_echo_n "checking for $ac_word... " >&6; }
5830if ${ac_cv_path_CUT+:} false; then :
5831  $as_echo_n "(cached) " >&6
5832else
5833  case $CUT in
5834  [\\/]* | ?:[\\/]*)
5835  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5836  ;;
5837  *)
5838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5839for as_dir in $PATH
5840do
5841  IFS=$as_save_IFS
5842  test -z "$as_dir" && as_dir=.
5843    for ac_exec_ext in '' $ac_executable_extensions; do
5844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5845    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5847    break 2
5848  fi
5849done
5850  done
5851IFS=$as_save_IFS
5852
5853  ;;
5854esac
5855fi
5856CUT=$ac_cv_path_CUT
5857if test -n "$CUT"; then
5858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5859$as_echo "$CUT" >&6; }
5860else
5861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5862$as_echo "no" >&6; }
5863fi
5864
5865
5866  test -n "$CUT" && break
5867done
5868
5869  else
5870    # The variable is set, but is it from the command line or the environment?
5871
5872    # Try to remove the string !CUT! from our list.
5873    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5874    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5875      # If it failed, the variable was not from the command line. Ignore it,
5876      # but warn the user (except for BASH, which is always set by the calling BASH).
5877      if test "xCUT" != xBASH; then
5878        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5879$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5880      fi
5881      # Try to locate tool using the code snippet
5882      for ac_prog in cut
5883do
5884  # Extract the first word of "$ac_prog", so it can be a program name with args.
5885set dummy $ac_prog; ac_word=$2
5886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5887$as_echo_n "checking for $ac_word... " >&6; }
5888if ${ac_cv_path_CUT+:} false; then :
5889  $as_echo_n "(cached) " >&6
5890else
5891  case $CUT in
5892  [\\/]* | ?:[\\/]*)
5893  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5894  ;;
5895  *)
5896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5897for as_dir in $PATH
5898do
5899  IFS=$as_save_IFS
5900  test -z "$as_dir" && as_dir=.
5901    for ac_exec_ext in '' $ac_executable_extensions; do
5902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5903    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5905    break 2
5906  fi
5907done
5908  done
5909IFS=$as_save_IFS
5910
5911  ;;
5912esac
5913fi
5914CUT=$ac_cv_path_CUT
5915if test -n "$CUT"; then
5916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5917$as_echo "$CUT" >&6; }
5918else
5919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5920$as_echo "no" >&6; }
5921fi
5922
5923
5924  test -n "$CUT" && break
5925done
5926
5927    else
5928      # If it succeeded, then it was overridden by the user. We will use it
5929      # for the tool.
5930
5931      # First remove it from the list of overridden variables, so we can test
5932      # for unknown variables in the end.
5933      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5934
5935      # Check if the provided tool contains a complete path.
5936      tool_specified="$CUT"
5937      tool_basename="${tool_specified##*/}"
5938      if test "x$tool_basename" = "x$tool_specified"; then
5939        # A command without a complete path is provided, search $PATH.
5940        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5941$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5942        # Extract the first word of "$tool_basename", so it can be a program name with args.
5943set dummy $tool_basename; ac_word=$2
5944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5945$as_echo_n "checking for $ac_word... " >&6; }
5946if ${ac_cv_path_CUT+:} false; then :
5947  $as_echo_n "(cached) " >&6
5948else
5949  case $CUT in
5950  [\\/]* | ?:[\\/]*)
5951  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5952  ;;
5953  *)
5954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5955for as_dir in $PATH
5956do
5957  IFS=$as_save_IFS
5958  test -z "$as_dir" && as_dir=.
5959    for ac_exec_ext in '' $ac_executable_extensions; do
5960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5961    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5963    break 2
5964  fi
5965done
5966  done
5967IFS=$as_save_IFS
5968
5969  ;;
5970esac
5971fi
5972CUT=$ac_cv_path_CUT
5973if test -n "$CUT"; then
5974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5975$as_echo "$CUT" >&6; }
5976else
5977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5978$as_echo "no" >&6; }
5979fi
5980
5981
5982        if test "x$CUT" = x; then
5983          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5984        fi
5985      else
5986        # Otherwise we believe it is a complete path. Use it as it is.
5987        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5988$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5989        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5990$as_echo_n "checking for CUT... " >&6; }
5991        if test ! -x "$tool_specified"; then
5992          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5993$as_echo "not found" >&6; }
5994          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5995        fi
5996        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5997$as_echo "$tool_specified" >&6; }
5998      fi
5999    fi
6000  fi
6001
6002
6003
6004  if test "x$CUT" = x; then
6005    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6006  fi
6007
6008
6009
6010
6011
6012  # Publish this variable in the help.
6013
6014
6015  if test "x$DATE" = x; then
6016    # The variable is not set by user, try to locate tool using the code snippet
6017    for ac_prog in date
6018do
6019  # Extract the first word of "$ac_prog", so it can be a program name with args.
6020set dummy $ac_prog; ac_word=$2
6021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6022$as_echo_n "checking for $ac_word... " >&6; }
6023if ${ac_cv_path_DATE+:} false; then :
6024  $as_echo_n "(cached) " >&6
6025else
6026  case $DATE in
6027  [\\/]* | ?:[\\/]*)
6028  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6029  ;;
6030  *)
6031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6032for as_dir in $PATH
6033do
6034  IFS=$as_save_IFS
6035  test -z "$as_dir" && as_dir=.
6036    for ac_exec_ext in '' $ac_executable_extensions; do
6037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6038    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6040    break 2
6041  fi
6042done
6043  done
6044IFS=$as_save_IFS
6045
6046  ;;
6047esac
6048fi
6049DATE=$ac_cv_path_DATE
6050if test -n "$DATE"; then
6051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6052$as_echo "$DATE" >&6; }
6053else
6054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6055$as_echo "no" >&6; }
6056fi
6057
6058
6059  test -n "$DATE" && break
6060done
6061
6062  else
6063    # The variable is set, but is it from the command line or the environment?
6064
6065    # Try to remove the string !DATE! from our list.
6066    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6067    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6068      # If it failed, the variable was not from the command line. Ignore it,
6069      # but warn the user (except for BASH, which is always set by the calling BASH).
6070      if test "xDATE" != xBASH; then
6071        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6072$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6073      fi
6074      # Try to locate tool using the code snippet
6075      for ac_prog in date
6076do
6077  # Extract the first word of "$ac_prog", so it can be a program name with args.
6078set dummy $ac_prog; ac_word=$2
6079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6080$as_echo_n "checking for $ac_word... " >&6; }
6081if ${ac_cv_path_DATE+:} false; then :
6082  $as_echo_n "(cached) " >&6
6083else
6084  case $DATE in
6085  [\\/]* | ?:[\\/]*)
6086  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6087  ;;
6088  *)
6089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6090for as_dir in $PATH
6091do
6092  IFS=$as_save_IFS
6093  test -z "$as_dir" && as_dir=.
6094    for ac_exec_ext in '' $ac_executable_extensions; do
6095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6096    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6098    break 2
6099  fi
6100done
6101  done
6102IFS=$as_save_IFS
6103
6104  ;;
6105esac
6106fi
6107DATE=$ac_cv_path_DATE
6108if test -n "$DATE"; then
6109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6110$as_echo "$DATE" >&6; }
6111else
6112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6113$as_echo "no" >&6; }
6114fi
6115
6116
6117  test -n "$DATE" && break
6118done
6119
6120    else
6121      # If it succeeded, then it was overridden by the user. We will use it
6122      # for the tool.
6123
6124      # First remove it from the list of overridden variables, so we can test
6125      # for unknown variables in the end.
6126      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6127
6128      # Check if the provided tool contains a complete path.
6129      tool_specified="$DATE"
6130      tool_basename="${tool_specified##*/}"
6131      if test "x$tool_basename" = "x$tool_specified"; then
6132        # A command without a complete path is provided, search $PATH.
6133        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6134$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6135        # Extract the first word of "$tool_basename", so it can be a program name with args.
6136set dummy $tool_basename; ac_word=$2
6137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6138$as_echo_n "checking for $ac_word... " >&6; }
6139if ${ac_cv_path_DATE+:} false; then :
6140  $as_echo_n "(cached) " >&6
6141else
6142  case $DATE in
6143  [\\/]* | ?:[\\/]*)
6144  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6145  ;;
6146  *)
6147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6148for as_dir in $PATH
6149do
6150  IFS=$as_save_IFS
6151  test -z "$as_dir" && as_dir=.
6152    for ac_exec_ext in '' $ac_executable_extensions; do
6153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6154    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6156    break 2
6157  fi
6158done
6159  done
6160IFS=$as_save_IFS
6161
6162  ;;
6163esac
6164fi
6165DATE=$ac_cv_path_DATE
6166if test -n "$DATE"; then
6167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6168$as_echo "$DATE" >&6; }
6169else
6170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6171$as_echo "no" >&6; }
6172fi
6173
6174
6175        if test "x$DATE" = x; then
6176          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6177        fi
6178      else
6179        # Otherwise we believe it is a complete path. Use it as it is.
6180        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6181$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6182        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6183$as_echo_n "checking for DATE... " >&6; }
6184        if test ! -x "$tool_specified"; then
6185          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6186$as_echo "not found" >&6; }
6187          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6188        fi
6189        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6190$as_echo "$tool_specified" >&6; }
6191      fi
6192    fi
6193  fi
6194
6195
6196
6197  if test "x$DATE" = x; then
6198    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6199  fi
6200
6201
6202
6203
6204
6205  # Publish this variable in the help.
6206
6207
6208  if test "x$DIFF" = x; then
6209    # The variable is not set by user, try to locate tool using the code snippet
6210    for ac_prog in gdiff diff
6211do
6212  # Extract the first word of "$ac_prog", so it can be a program name with args.
6213set dummy $ac_prog; ac_word=$2
6214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6215$as_echo_n "checking for $ac_word... " >&6; }
6216if ${ac_cv_path_DIFF+:} false; then :
6217  $as_echo_n "(cached) " >&6
6218else
6219  case $DIFF in
6220  [\\/]* | ?:[\\/]*)
6221  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6222  ;;
6223  *)
6224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6225for as_dir in $PATH
6226do
6227  IFS=$as_save_IFS
6228  test -z "$as_dir" && as_dir=.
6229    for ac_exec_ext in '' $ac_executable_extensions; do
6230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6231    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6233    break 2
6234  fi
6235done
6236  done
6237IFS=$as_save_IFS
6238
6239  ;;
6240esac
6241fi
6242DIFF=$ac_cv_path_DIFF
6243if test -n "$DIFF"; then
6244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6245$as_echo "$DIFF" >&6; }
6246else
6247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6248$as_echo "no" >&6; }
6249fi
6250
6251
6252  test -n "$DIFF" && break
6253done
6254
6255  else
6256    # The variable is set, but is it from the command line or the environment?
6257
6258    # Try to remove the string !DIFF! from our list.
6259    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6260    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6261      # If it failed, the variable was not from the command line. Ignore it,
6262      # but warn the user (except for BASH, which is always set by the calling BASH).
6263      if test "xDIFF" != xBASH; then
6264        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6265$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6266      fi
6267      # Try to locate tool using the code snippet
6268      for ac_prog in gdiff diff
6269do
6270  # Extract the first word of "$ac_prog", so it can be a program name with args.
6271set dummy $ac_prog; ac_word=$2
6272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6273$as_echo_n "checking for $ac_word... " >&6; }
6274if ${ac_cv_path_DIFF+:} false; then :
6275  $as_echo_n "(cached) " >&6
6276else
6277  case $DIFF in
6278  [\\/]* | ?:[\\/]*)
6279  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6280  ;;
6281  *)
6282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6283for as_dir in $PATH
6284do
6285  IFS=$as_save_IFS
6286  test -z "$as_dir" && as_dir=.
6287    for ac_exec_ext in '' $ac_executable_extensions; do
6288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6289    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6291    break 2
6292  fi
6293done
6294  done
6295IFS=$as_save_IFS
6296
6297  ;;
6298esac
6299fi
6300DIFF=$ac_cv_path_DIFF
6301if test -n "$DIFF"; then
6302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6303$as_echo "$DIFF" >&6; }
6304else
6305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6306$as_echo "no" >&6; }
6307fi
6308
6309
6310  test -n "$DIFF" && break
6311done
6312
6313    else
6314      # If it succeeded, then it was overridden by the user. We will use it
6315      # for the tool.
6316
6317      # First remove it from the list of overridden variables, so we can test
6318      # for unknown variables in the end.
6319      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6320
6321      # Check if the provided tool contains a complete path.
6322      tool_specified="$DIFF"
6323      tool_basename="${tool_specified##*/}"
6324      if test "x$tool_basename" = "x$tool_specified"; then
6325        # A command without a complete path is provided, search $PATH.
6326        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6327$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6328        # Extract the first word of "$tool_basename", so it can be a program name with args.
6329set dummy $tool_basename; ac_word=$2
6330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6331$as_echo_n "checking for $ac_word... " >&6; }
6332if ${ac_cv_path_DIFF+:} false; then :
6333  $as_echo_n "(cached) " >&6
6334else
6335  case $DIFF in
6336  [\\/]* | ?:[\\/]*)
6337  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6338  ;;
6339  *)
6340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6341for as_dir in $PATH
6342do
6343  IFS=$as_save_IFS
6344  test -z "$as_dir" && as_dir=.
6345    for ac_exec_ext in '' $ac_executable_extensions; do
6346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6347    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6349    break 2
6350  fi
6351done
6352  done
6353IFS=$as_save_IFS
6354
6355  ;;
6356esac
6357fi
6358DIFF=$ac_cv_path_DIFF
6359if test -n "$DIFF"; then
6360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6361$as_echo "$DIFF" >&6; }
6362else
6363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6364$as_echo "no" >&6; }
6365fi
6366
6367
6368        if test "x$DIFF" = x; then
6369          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6370        fi
6371      else
6372        # Otherwise we believe it is a complete path. Use it as it is.
6373        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6374$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6375        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6376$as_echo_n "checking for DIFF... " >&6; }
6377        if test ! -x "$tool_specified"; then
6378          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6379$as_echo "not found" >&6; }
6380          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6381        fi
6382        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6383$as_echo "$tool_specified" >&6; }
6384      fi
6385    fi
6386  fi
6387
6388
6389
6390  if test "x$DIFF" = x; then
6391    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6392  fi
6393
6394
6395
6396
6397
6398  # Publish this variable in the help.
6399
6400
6401  if test "x$DIRNAME" = x; then
6402    # The variable is not set by user, try to locate tool using the code snippet
6403    for ac_prog in dirname
6404do
6405  # Extract the first word of "$ac_prog", so it can be a program name with args.
6406set dummy $ac_prog; ac_word=$2
6407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6408$as_echo_n "checking for $ac_word... " >&6; }
6409if ${ac_cv_path_DIRNAME+:} false; then :
6410  $as_echo_n "(cached) " >&6
6411else
6412  case $DIRNAME in
6413  [\\/]* | ?:[\\/]*)
6414  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6415  ;;
6416  *)
6417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6418for as_dir in $PATH
6419do
6420  IFS=$as_save_IFS
6421  test -z "$as_dir" && as_dir=.
6422    for ac_exec_ext in '' $ac_executable_extensions; do
6423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6424    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6426    break 2
6427  fi
6428done
6429  done
6430IFS=$as_save_IFS
6431
6432  ;;
6433esac
6434fi
6435DIRNAME=$ac_cv_path_DIRNAME
6436if test -n "$DIRNAME"; then
6437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6438$as_echo "$DIRNAME" >&6; }
6439else
6440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6441$as_echo "no" >&6; }
6442fi
6443
6444
6445  test -n "$DIRNAME" && break
6446done
6447
6448  else
6449    # The variable is set, but is it from the command line or the environment?
6450
6451    # Try to remove the string !DIRNAME! from our list.
6452    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6453    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6454      # If it failed, the variable was not from the command line. Ignore it,
6455      # but warn the user (except for BASH, which is always set by the calling BASH).
6456      if test "xDIRNAME" != xBASH; then
6457        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6458$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6459      fi
6460      # Try to locate tool using the code snippet
6461      for ac_prog in dirname
6462do
6463  # Extract the first word of "$ac_prog", so it can be a program name with args.
6464set dummy $ac_prog; ac_word=$2
6465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6466$as_echo_n "checking for $ac_word... " >&6; }
6467if ${ac_cv_path_DIRNAME+:} false; then :
6468  $as_echo_n "(cached) " >&6
6469else
6470  case $DIRNAME in
6471  [\\/]* | ?:[\\/]*)
6472  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6473  ;;
6474  *)
6475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6476for as_dir in $PATH
6477do
6478  IFS=$as_save_IFS
6479  test -z "$as_dir" && as_dir=.
6480    for ac_exec_ext in '' $ac_executable_extensions; do
6481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6482    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6484    break 2
6485  fi
6486done
6487  done
6488IFS=$as_save_IFS
6489
6490  ;;
6491esac
6492fi
6493DIRNAME=$ac_cv_path_DIRNAME
6494if test -n "$DIRNAME"; then
6495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6496$as_echo "$DIRNAME" >&6; }
6497else
6498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6499$as_echo "no" >&6; }
6500fi
6501
6502
6503  test -n "$DIRNAME" && break
6504done
6505
6506    else
6507      # If it succeeded, then it was overridden by the user. We will use it
6508      # for the tool.
6509
6510      # First remove it from the list of overridden variables, so we can test
6511      # for unknown variables in the end.
6512      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6513
6514      # Check if the provided tool contains a complete path.
6515      tool_specified="$DIRNAME"
6516      tool_basename="${tool_specified##*/}"
6517      if test "x$tool_basename" = "x$tool_specified"; then
6518        # A command without a complete path is provided, search $PATH.
6519        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6520$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6521        # Extract the first word of "$tool_basename", so it can be a program name with args.
6522set dummy $tool_basename; ac_word=$2
6523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6524$as_echo_n "checking for $ac_word... " >&6; }
6525if ${ac_cv_path_DIRNAME+:} false; then :
6526  $as_echo_n "(cached) " >&6
6527else
6528  case $DIRNAME in
6529  [\\/]* | ?:[\\/]*)
6530  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6531  ;;
6532  *)
6533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6534for as_dir in $PATH
6535do
6536  IFS=$as_save_IFS
6537  test -z "$as_dir" && as_dir=.
6538    for ac_exec_ext in '' $ac_executable_extensions; do
6539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6540    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6542    break 2
6543  fi
6544done
6545  done
6546IFS=$as_save_IFS
6547
6548  ;;
6549esac
6550fi
6551DIRNAME=$ac_cv_path_DIRNAME
6552if test -n "$DIRNAME"; then
6553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6554$as_echo "$DIRNAME" >&6; }
6555else
6556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6557$as_echo "no" >&6; }
6558fi
6559
6560
6561        if test "x$DIRNAME" = x; then
6562          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6563        fi
6564      else
6565        # Otherwise we believe it is a complete path. Use it as it is.
6566        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6567$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6568        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6569$as_echo_n "checking for DIRNAME... " >&6; }
6570        if test ! -x "$tool_specified"; then
6571          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6572$as_echo "not found" >&6; }
6573          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6574        fi
6575        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6576$as_echo "$tool_specified" >&6; }
6577      fi
6578    fi
6579  fi
6580
6581
6582
6583  if test "x$DIRNAME" = x; then
6584    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6585  fi
6586
6587
6588
6589
6590
6591  # Publish this variable in the help.
6592
6593
6594  if test "x$ECHO" = x; then
6595    # The variable is not set by user, try to locate tool using the code snippet
6596    for ac_prog in echo
6597do
6598  # Extract the first word of "$ac_prog", so it can be a program name with args.
6599set dummy $ac_prog; ac_word=$2
6600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6601$as_echo_n "checking for $ac_word... " >&6; }
6602if ${ac_cv_path_ECHO+:} false; then :
6603  $as_echo_n "(cached) " >&6
6604else
6605  case $ECHO in
6606  [\\/]* | ?:[\\/]*)
6607  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6608  ;;
6609  *)
6610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6611for as_dir in $PATH
6612do
6613  IFS=$as_save_IFS
6614  test -z "$as_dir" && as_dir=.
6615    for ac_exec_ext in '' $ac_executable_extensions; do
6616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6617    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6619    break 2
6620  fi
6621done
6622  done
6623IFS=$as_save_IFS
6624
6625  ;;
6626esac
6627fi
6628ECHO=$ac_cv_path_ECHO
6629if test -n "$ECHO"; then
6630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6631$as_echo "$ECHO" >&6; }
6632else
6633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6634$as_echo "no" >&6; }
6635fi
6636
6637
6638  test -n "$ECHO" && break
6639done
6640
6641  else
6642    # The variable is set, but is it from the command line or the environment?
6643
6644    # Try to remove the string !ECHO! from our list.
6645    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6646    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6647      # If it failed, the variable was not from the command line. Ignore it,
6648      # but warn the user (except for BASH, which is always set by the calling BASH).
6649      if test "xECHO" != xBASH; then
6650        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6651$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6652      fi
6653      # Try to locate tool using the code snippet
6654      for ac_prog in echo
6655do
6656  # Extract the first word of "$ac_prog", so it can be a program name with args.
6657set dummy $ac_prog; ac_word=$2
6658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6659$as_echo_n "checking for $ac_word... " >&6; }
6660if ${ac_cv_path_ECHO+:} false; then :
6661  $as_echo_n "(cached) " >&6
6662else
6663  case $ECHO in
6664  [\\/]* | ?:[\\/]*)
6665  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6666  ;;
6667  *)
6668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6669for as_dir in $PATH
6670do
6671  IFS=$as_save_IFS
6672  test -z "$as_dir" && as_dir=.
6673    for ac_exec_ext in '' $ac_executable_extensions; do
6674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6675    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6677    break 2
6678  fi
6679done
6680  done
6681IFS=$as_save_IFS
6682
6683  ;;
6684esac
6685fi
6686ECHO=$ac_cv_path_ECHO
6687if test -n "$ECHO"; then
6688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6689$as_echo "$ECHO" >&6; }
6690else
6691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6692$as_echo "no" >&6; }
6693fi
6694
6695
6696  test -n "$ECHO" && break
6697done
6698
6699    else
6700      # If it succeeded, then it was overridden by the user. We will use it
6701      # for the tool.
6702
6703      # First remove it from the list of overridden variables, so we can test
6704      # for unknown variables in the end.
6705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6706
6707      # Check if the provided tool contains a complete path.
6708      tool_specified="$ECHO"
6709      tool_basename="${tool_specified##*/}"
6710      if test "x$tool_basename" = "x$tool_specified"; then
6711        # A command without a complete path is provided, search $PATH.
6712        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6713$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6714        # Extract the first word of "$tool_basename", so it can be a program name with args.
6715set dummy $tool_basename; ac_word=$2
6716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6717$as_echo_n "checking for $ac_word... " >&6; }
6718if ${ac_cv_path_ECHO+:} false; then :
6719  $as_echo_n "(cached) " >&6
6720else
6721  case $ECHO in
6722  [\\/]* | ?:[\\/]*)
6723  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6724  ;;
6725  *)
6726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6727for as_dir in $PATH
6728do
6729  IFS=$as_save_IFS
6730  test -z "$as_dir" && as_dir=.
6731    for ac_exec_ext in '' $ac_executable_extensions; do
6732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6733    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6735    break 2
6736  fi
6737done
6738  done
6739IFS=$as_save_IFS
6740
6741  ;;
6742esac
6743fi
6744ECHO=$ac_cv_path_ECHO
6745if test -n "$ECHO"; then
6746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6747$as_echo "$ECHO" >&6; }
6748else
6749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6750$as_echo "no" >&6; }
6751fi
6752
6753
6754        if test "x$ECHO" = x; then
6755          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6756        fi
6757      else
6758        # Otherwise we believe it is a complete path. Use it as it is.
6759        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6760$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6761        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6762$as_echo_n "checking for ECHO... " >&6; }
6763        if test ! -x "$tool_specified"; then
6764          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6765$as_echo "not found" >&6; }
6766          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6767        fi
6768        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6769$as_echo "$tool_specified" >&6; }
6770      fi
6771    fi
6772  fi
6773
6774
6775
6776  if test "x$ECHO" = x; then
6777    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6778  fi
6779
6780
6781
6782
6783
6784  # Publish this variable in the help.
6785
6786
6787  if test "x$EXPR" = x; then
6788    # The variable is not set by user, try to locate tool using the code snippet
6789    for ac_prog in expr
6790do
6791  # Extract the first word of "$ac_prog", so it can be a program name with args.
6792set dummy $ac_prog; ac_word=$2
6793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6794$as_echo_n "checking for $ac_word... " >&6; }
6795if ${ac_cv_path_EXPR+:} false; then :
6796  $as_echo_n "(cached) " >&6
6797else
6798  case $EXPR in
6799  [\\/]* | ?:[\\/]*)
6800  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6801  ;;
6802  *)
6803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6804for as_dir in $PATH
6805do
6806  IFS=$as_save_IFS
6807  test -z "$as_dir" && as_dir=.
6808    for ac_exec_ext in '' $ac_executable_extensions; do
6809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6810    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6812    break 2
6813  fi
6814done
6815  done
6816IFS=$as_save_IFS
6817
6818  ;;
6819esac
6820fi
6821EXPR=$ac_cv_path_EXPR
6822if test -n "$EXPR"; then
6823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6824$as_echo "$EXPR" >&6; }
6825else
6826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6827$as_echo "no" >&6; }
6828fi
6829
6830
6831  test -n "$EXPR" && break
6832done
6833
6834  else
6835    # The variable is set, but is it from the command line or the environment?
6836
6837    # Try to remove the string !EXPR! from our list.
6838    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6839    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6840      # If it failed, the variable was not from the command line. Ignore it,
6841      # but warn the user (except for BASH, which is always set by the calling BASH).
6842      if test "xEXPR" != xBASH; then
6843        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6844$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6845      fi
6846      # Try to locate tool using the code snippet
6847      for ac_prog in expr
6848do
6849  # Extract the first word of "$ac_prog", so it can be a program name with args.
6850set dummy $ac_prog; ac_word=$2
6851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6852$as_echo_n "checking for $ac_word... " >&6; }
6853if ${ac_cv_path_EXPR+:} false; then :
6854  $as_echo_n "(cached) " >&6
6855else
6856  case $EXPR in
6857  [\\/]* | ?:[\\/]*)
6858  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6859  ;;
6860  *)
6861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6862for as_dir in $PATH
6863do
6864  IFS=$as_save_IFS
6865  test -z "$as_dir" && as_dir=.
6866    for ac_exec_ext in '' $ac_executable_extensions; do
6867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6868    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6870    break 2
6871  fi
6872done
6873  done
6874IFS=$as_save_IFS
6875
6876  ;;
6877esac
6878fi
6879EXPR=$ac_cv_path_EXPR
6880if test -n "$EXPR"; then
6881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6882$as_echo "$EXPR" >&6; }
6883else
6884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6885$as_echo "no" >&6; }
6886fi
6887
6888
6889  test -n "$EXPR" && break
6890done
6891
6892    else
6893      # If it succeeded, then it was overridden by the user. We will use it
6894      # for the tool.
6895
6896      # First remove it from the list of overridden variables, so we can test
6897      # for unknown variables in the end.
6898      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6899
6900      # Check if the provided tool contains a complete path.
6901      tool_specified="$EXPR"
6902      tool_basename="${tool_specified##*/}"
6903      if test "x$tool_basename" = "x$tool_specified"; then
6904        # A command without a complete path is provided, search $PATH.
6905        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6906$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6907        # Extract the first word of "$tool_basename", so it can be a program name with args.
6908set dummy $tool_basename; ac_word=$2
6909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6910$as_echo_n "checking for $ac_word... " >&6; }
6911if ${ac_cv_path_EXPR+:} false; then :
6912  $as_echo_n "(cached) " >&6
6913else
6914  case $EXPR in
6915  [\\/]* | ?:[\\/]*)
6916  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6917  ;;
6918  *)
6919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6920for as_dir in $PATH
6921do
6922  IFS=$as_save_IFS
6923  test -z "$as_dir" && as_dir=.
6924    for ac_exec_ext in '' $ac_executable_extensions; do
6925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6926    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6928    break 2
6929  fi
6930done
6931  done
6932IFS=$as_save_IFS
6933
6934  ;;
6935esac
6936fi
6937EXPR=$ac_cv_path_EXPR
6938if test -n "$EXPR"; then
6939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6940$as_echo "$EXPR" >&6; }
6941else
6942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6943$as_echo "no" >&6; }
6944fi
6945
6946
6947        if test "x$EXPR" = x; then
6948          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6949        fi
6950      else
6951        # Otherwise we believe it is a complete path. Use it as it is.
6952        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6953$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6954        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6955$as_echo_n "checking for EXPR... " >&6; }
6956        if test ! -x "$tool_specified"; then
6957          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6958$as_echo "not found" >&6; }
6959          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6960        fi
6961        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6962$as_echo "$tool_specified" >&6; }
6963      fi
6964    fi
6965  fi
6966
6967
6968
6969  if test "x$EXPR" = x; then
6970    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6971  fi
6972
6973
6974
6975
6976
6977  # Publish this variable in the help.
6978
6979
6980  if test "x$FILE" = x; then
6981    # The variable is not set by user, try to locate tool using the code snippet
6982    for ac_prog in file
6983do
6984  # Extract the first word of "$ac_prog", so it can be a program name with args.
6985set dummy $ac_prog; ac_word=$2
6986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6987$as_echo_n "checking for $ac_word... " >&6; }
6988if ${ac_cv_path_FILE+:} false; then :
6989  $as_echo_n "(cached) " >&6
6990else
6991  case $FILE in
6992  [\\/]* | ?:[\\/]*)
6993  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6994  ;;
6995  *)
6996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6997for as_dir in $PATH
6998do
6999  IFS=$as_save_IFS
7000  test -z "$as_dir" && as_dir=.
7001    for ac_exec_ext in '' $ac_executable_extensions; do
7002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7003    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7005    break 2
7006  fi
7007done
7008  done
7009IFS=$as_save_IFS
7010
7011  ;;
7012esac
7013fi
7014FILE=$ac_cv_path_FILE
7015if test -n "$FILE"; then
7016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7017$as_echo "$FILE" >&6; }
7018else
7019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7020$as_echo "no" >&6; }
7021fi
7022
7023
7024  test -n "$FILE" && break
7025done
7026
7027  else
7028    # The variable is set, but is it from the command line or the environment?
7029
7030    # Try to remove the string !FILE! from our list.
7031    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7032    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7033      # If it failed, the variable was not from the command line. Ignore it,
7034      # but warn the user (except for BASH, which is always set by the calling BASH).
7035      if test "xFILE" != xBASH; then
7036        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7037$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7038      fi
7039      # Try to locate tool using the code snippet
7040      for ac_prog in file
7041do
7042  # Extract the first word of "$ac_prog", so it can be a program name with args.
7043set dummy $ac_prog; ac_word=$2
7044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7045$as_echo_n "checking for $ac_word... " >&6; }
7046if ${ac_cv_path_FILE+:} false; then :
7047  $as_echo_n "(cached) " >&6
7048else
7049  case $FILE in
7050  [\\/]* | ?:[\\/]*)
7051  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7052  ;;
7053  *)
7054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7055for as_dir in $PATH
7056do
7057  IFS=$as_save_IFS
7058  test -z "$as_dir" && as_dir=.
7059    for ac_exec_ext in '' $ac_executable_extensions; do
7060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7061    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7063    break 2
7064  fi
7065done
7066  done
7067IFS=$as_save_IFS
7068
7069  ;;
7070esac
7071fi
7072FILE=$ac_cv_path_FILE
7073if test -n "$FILE"; then
7074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7075$as_echo "$FILE" >&6; }
7076else
7077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7078$as_echo "no" >&6; }
7079fi
7080
7081
7082  test -n "$FILE" && break
7083done
7084
7085    else
7086      # If it succeeded, then it was overridden by the user. We will use it
7087      # for the tool.
7088
7089      # First remove it from the list of overridden variables, so we can test
7090      # for unknown variables in the end.
7091      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7092
7093      # Check if the provided tool contains a complete path.
7094      tool_specified="$FILE"
7095      tool_basename="${tool_specified##*/}"
7096      if test "x$tool_basename" = "x$tool_specified"; then
7097        # A command without a complete path is provided, search $PATH.
7098        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7099$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7100        # Extract the first word of "$tool_basename", so it can be a program name with args.
7101set dummy $tool_basename; ac_word=$2
7102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7103$as_echo_n "checking for $ac_word... " >&6; }
7104if ${ac_cv_path_FILE+:} false; then :
7105  $as_echo_n "(cached) " >&6
7106else
7107  case $FILE in
7108  [\\/]* | ?:[\\/]*)
7109  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7110  ;;
7111  *)
7112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7113for as_dir in $PATH
7114do
7115  IFS=$as_save_IFS
7116  test -z "$as_dir" && as_dir=.
7117    for ac_exec_ext in '' $ac_executable_extensions; do
7118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7119    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7121    break 2
7122  fi
7123done
7124  done
7125IFS=$as_save_IFS
7126
7127  ;;
7128esac
7129fi
7130FILE=$ac_cv_path_FILE
7131if test -n "$FILE"; then
7132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7133$as_echo "$FILE" >&6; }
7134else
7135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7136$as_echo "no" >&6; }
7137fi
7138
7139
7140        if test "x$FILE" = x; then
7141          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7142        fi
7143      else
7144        # Otherwise we believe it is a complete path. Use it as it is.
7145        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7146$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7147        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7148$as_echo_n "checking for FILE... " >&6; }
7149        if test ! -x "$tool_specified"; then
7150          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7151$as_echo "not found" >&6; }
7152          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7153        fi
7154        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7155$as_echo "$tool_specified" >&6; }
7156      fi
7157    fi
7158  fi
7159
7160
7161
7162  if test "x$FILE" = x; then
7163    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7164  fi
7165
7166
7167
7168
7169
7170  # Publish this variable in the help.
7171
7172
7173  if test "x$FIND" = x; then
7174    # The variable is not set by user, try to locate tool using the code snippet
7175    for ac_prog in find
7176do
7177  # Extract the first word of "$ac_prog", so it can be a program name with args.
7178set dummy $ac_prog; ac_word=$2
7179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7180$as_echo_n "checking for $ac_word... " >&6; }
7181if ${ac_cv_path_FIND+:} false; then :
7182  $as_echo_n "(cached) " >&6
7183else
7184  case $FIND in
7185  [\\/]* | ?:[\\/]*)
7186  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7187  ;;
7188  *)
7189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7190for as_dir in $PATH
7191do
7192  IFS=$as_save_IFS
7193  test -z "$as_dir" && as_dir=.
7194    for ac_exec_ext in '' $ac_executable_extensions; do
7195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7196    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7198    break 2
7199  fi
7200done
7201  done
7202IFS=$as_save_IFS
7203
7204  ;;
7205esac
7206fi
7207FIND=$ac_cv_path_FIND
7208if test -n "$FIND"; then
7209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7210$as_echo "$FIND" >&6; }
7211else
7212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7213$as_echo "no" >&6; }
7214fi
7215
7216
7217  test -n "$FIND" && break
7218done
7219
7220  else
7221    # The variable is set, but is it from the command line or the environment?
7222
7223    # Try to remove the string !FIND! from our list.
7224    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7225    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7226      # If it failed, the variable was not from the command line. Ignore it,
7227      # but warn the user (except for BASH, which is always set by the calling BASH).
7228      if test "xFIND" != xBASH; then
7229        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7230$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7231      fi
7232      # Try to locate tool using the code snippet
7233      for ac_prog in find
7234do
7235  # Extract the first word of "$ac_prog", so it can be a program name with args.
7236set dummy $ac_prog; ac_word=$2
7237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7238$as_echo_n "checking for $ac_word... " >&6; }
7239if ${ac_cv_path_FIND+:} false; then :
7240  $as_echo_n "(cached) " >&6
7241else
7242  case $FIND in
7243  [\\/]* | ?:[\\/]*)
7244  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7245  ;;
7246  *)
7247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7248for as_dir in $PATH
7249do
7250  IFS=$as_save_IFS
7251  test -z "$as_dir" && as_dir=.
7252    for ac_exec_ext in '' $ac_executable_extensions; do
7253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7254    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7256    break 2
7257  fi
7258done
7259  done
7260IFS=$as_save_IFS
7261
7262  ;;
7263esac
7264fi
7265FIND=$ac_cv_path_FIND
7266if test -n "$FIND"; then
7267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7268$as_echo "$FIND" >&6; }
7269else
7270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7271$as_echo "no" >&6; }
7272fi
7273
7274
7275  test -n "$FIND" && break
7276done
7277
7278    else
7279      # If it succeeded, then it was overridden by the user. We will use it
7280      # for the tool.
7281
7282      # First remove it from the list of overridden variables, so we can test
7283      # for unknown variables in the end.
7284      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7285
7286      # Check if the provided tool contains a complete path.
7287      tool_specified="$FIND"
7288      tool_basename="${tool_specified##*/}"
7289      if test "x$tool_basename" = "x$tool_specified"; then
7290        # A command without a complete path is provided, search $PATH.
7291        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7292$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7293        # Extract the first word of "$tool_basename", so it can be a program name with args.
7294set dummy $tool_basename; ac_word=$2
7295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7296$as_echo_n "checking for $ac_word... " >&6; }
7297if ${ac_cv_path_FIND+:} false; then :
7298  $as_echo_n "(cached) " >&6
7299else
7300  case $FIND in
7301  [\\/]* | ?:[\\/]*)
7302  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7303  ;;
7304  *)
7305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7306for as_dir in $PATH
7307do
7308  IFS=$as_save_IFS
7309  test -z "$as_dir" && as_dir=.
7310    for ac_exec_ext in '' $ac_executable_extensions; do
7311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7312    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7314    break 2
7315  fi
7316done
7317  done
7318IFS=$as_save_IFS
7319
7320  ;;
7321esac
7322fi
7323FIND=$ac_cv_path_FIND
7324if test -n "$FIND"; then
7325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7326$as_echo "$FIND" >&6; }
7327else
7328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7329$as_echo "no" >&6; }
7330fi
7331
7332
7333        if test "x$FIND" = x; then
7334          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7335        fi
7336      else
7337        # Otherwise we believe it is a complete path. Use it as it is.
7338        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7339$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7340        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7341$as_echo_n "checking for FIND... " >&6; }
7342        if test ! -x "$tool_specified"; then
7343          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7344$as_echo "not found" >&6; }
7345          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7346        fi
7347        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7348$as_echo "$tool_specified" >&6; }
7349      fi
7350    fi
7351  fi
7352
7353
7354
7355  if test "x$FIND" = x; then
7356    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7357  fi
7358
7359
7360
7361
7362
7363  # Publish this variable in the help.
7364
7365
7366  if test "x$HEAD" = x; then
7367    # The variable is not set by user, try to locate tool using the code snippet
7368    for ac_prog in head
7369do
7370  # Extract the first word of "$ac_prog", so it can be a program name with args.
7371set dummy $ac_prog; ac_word=$2
7372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7373$as_echo_n "checking for $ac_word... " >&6; }
7374if ${ac_cv_path_HEAD+:} false; then :
7375  $as_echo_n "(cached) " >&6
7376else
7377  case $HEAD in
7378  [\\/]* | ?:[\\/]*)
7379  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7380  ;;
7381  *)
7382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7383for as_dir in $PATH
7384do
7385  IFS=$as_save_IFS
7386  test -z "$as_dir" && as_dir=.
7387    for ac_exec_ext in '' $ac_executable_extensions; do
7388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7389    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7391    break 2
7392  fi
7393done
7394  done
7395IFS=$as_save_IFS
7396
7397  ;;
7398esac
7399fi
7400HEAD=$ac_cv_path_HEAD
7401if test -n "$HEAD"; then
7402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7403$as_echo "$HEAD" >&6; }
7404else
7405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7406$as_echo "no" >&6; }
7407fi
7408
7409
7410  test -n "$HEAD" && break
7411done
7412
7413  else
7414    # The variable is set, but is it from the command line or the environment?
7415
7416    # Try to remove the string !HEAD! from our list.
7417    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7418    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7419      # If it failed, the variable was not from the command line. Ignore it,
7420      # but warn the user (except for BASH, which is always set by the calling BASH).
7421      if test "xHEAD" != xBASH; then
7422        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7423$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7424      fi
7425      # Try to locate tool using the code snippet
7426      for ac_prog in head
7427do
7428  # Extract the first word of "$ac_prog", so it can be a program name with args.
7429set dummy $ac_prog; ac_word=$2
7430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7431$as_echo_n "checking for $ac_word... " >&6; }
7432if ${ac_cv_path_HEAD+:} false; then :
7433  $as_echo_n "(cached) " >&6
7434else
7435  case $HEAD in
7436  [\\/]* | ?:[\\/]*)
7437  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7438  ;;
7439  *)
7440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7441for as_dir in $PATH
7442do
7443  IFS=$as_save_IFS
7444  test -z "$as_dir" && as_dir=.
7445    for ac_exec_ext in '' $ac_executable_extensions; do
7446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7447    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7449    break 2
7450  fi
7451done
7452  done
7453IFS=$as_save_IFS
7454
7455  ;;
7456esac
7457fi
7458HEAD=$ac_cv_path_HEAD
7459if test -n "$HEAD"; then
7460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7461$as_echo "$HEAD" >&6; }
7462else
7463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7464$as_echo "no" >&6; }
7465fi
7466
7467
7468  test -n "$HEAD" && break
7469done
7470
7471    else
7472      # If it succeeded, then it was overridden by the user. We will use it
7473      # for the tool.
7474
7475      # First remove it from the list of overridden variables, so we can test
7476      # for unknown variables in the end.
7477      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7478
7479      # Check if the provided tool contains a complete path.
7480      tool_specified="$HEAD"
7481      tool_basename="${tool_specified##*/}"
7482      if test "x$tool_basename" = "x$tool_specified"; then
7483        # A command without a complete path is provided, search $PATH.
7484        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7485$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7486        # Extract the first word of "$tool_basename", so it can be a program name with args.
7487set dummy $tool_basename; ac_word=$2
7488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7489$as_echo_n "checking for $ac_word... " >&6; }
7490if ${ac_cv_path_HEAD+:} false; then :
7491  $as_echo_n "(cached) " >&6
7492else
7493  case $HEAD in
7494  [\\/]* | ?:[\\/]*)
7495  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7496  ;;
7497  *)
7498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7499for as_dir in $PATH
7500do
7501  IFS=$as_save_IFS
7502  test -z "$as_dir" && as_dir=.
7503    for ac_exec_ext in '' $ac_executable_extensions; do
7504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7505    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7507    break 2
7508  fi
7509done
7510  done
7511IFS=$as_save_IFS
7512
7513  ;;
7514esac
7515fi
7516HEAD=$ac_cv_path_HEAD
7517if test -n "$HEAD"; then
7518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7519$as_echo "$HEAD" >&6; }
7520else
7521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7522$as_echo "no" >&6; }
7523fi
7524
7525
7526        if test "x$HEAD" = x; then
7527          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7528        fi
7529      else
7530        # Otherwise we believe it is a complete path. Use it as it is.
7531        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7532$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7533        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7534$as_echo_n "checking for HEAD... " >&6; }
7535        if test ! -x "$tool_specified"; then
7536          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7537$as_echo "not found" >&6; }
7538          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7539        fi
7540        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7541$as_echo "$tool_specified" >&6; }
7542      fi
7543    fi
7544  fi
7545
7546
7547
7548  if test "x$HEAD" = x; then
7549    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7550  fi
7551
7552
7553
7554
7555
7556  # Publish this variable in the help.
7557
7558
7559  if test "x$LN" = x; then
7560    # The variable is not set by user, try to locate tool using the code snippet
7561    for ac_prog in ln
7562do
7563  # Extract the first word of "$ac_prog", so it can be a program name with args.
7564set dummy $ac_prog; ac_word=$2
7565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7566$as_echo_n "checking for $ac_word... " >&6; }
7567if ${ac_cv_path_LN+:} false; then :
7568  $as_echo_n "(cached) " >&6
7569else
7570  case $LN in
7571  [\\/]* | ?:[\\/]*)
7572  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7573  ;;
7574  *)
7575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7576for as_dir in $PATH
7577do
7578  IFS=$as_save_IFS
7579  test -z "$as_dir" && as_dir=.
7580    for ac_exec_ext in '' $ac_executable_extensions; do
7581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7582    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7584    break 2
7585  fi
7586done
7587  done
7588IFS=$as_save_IFS
7589
7590  ;;
7591esac
7592fi
7593LN=$ac_cv_path_LN
7594if test -n "$LN"; then
7595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7596$as_echo "$LN" >&6; }
7597else
7598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7599$as_echo "no" >&6; }
7600fi
7601
7602
7603  test -n "$LN" && break
7604done
7605
7606  else
7607    # The variable is set, but is it from the command line or the environment?
7608
7609    # Try to remove the string !LN! from our list.
7610    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7611    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7612      # If it failed, the variable was not from the command line. Ignore it,
7613      # but warn the user (except for BASH, which is always set by the calling BASH).
7614      if test "xLN" != xBASH; then
7615        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7616$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7617      fi
7618      # Try to locate tool using the code snippet
7619      for ac_prog in ln
7620do
7621  # Extract the first word of "$ac_prog", so it can be a program name with args.
7622set dummy $ac_prog; ac_word=$2
7623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7624$as_echo_n "checking for $ac_word... " >&6; }
7625if ${ac_cv_path_LN+:} false; then :
7626  $as_echo_n "(cached) " >&6
7627else
7628  case $LN in
7629  [\\/]* | ?:[\\/]*)
7630  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7631  ;;
7632  *)
7633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7634for as_dir in $PATH
7635do
7636  IFS=$as_save_IFS
7637  test -z "$as_dir" && as_dir=.
7638    for ac_exec_ext in '' $ac_executable_extensions; do
7639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7640    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7642    break 2
7643  fi
7644done
7645  done
7646IFS=$as_save_IFS
7647
7648  ;;
7649esac
7650fi
7651LN=$ac_cv_path_LN
7652if test -n "$LN"; then
7653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7654$as_echo "$LN" >&6; }
7655else
7656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7657$as_echo "no" >&6; }
7658fi
7659
7660
7661  test -n "$LN" && break
7662done
7663
7664    else
7665      # If it succeeded, then it was overridden by the user. We will use it
7666      # for the tool.
7667
7668      # First remove it from the list of overridden variables, so we can test
7669      # for unknown variables in the end.
7670      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7671
7672      # Check if the provided tool contains a complete path.
7673      tool_specified="$LN"
7674      tool_basename="${tool_specified##*/}"
7675      if test "x$tool_basename" = "x$tool_specified"; then
7676        # A command without a complete path is provided, search $PATH.
7677        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7678$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7679        # Extract the first word of "$tool_basename", so it can be a program name with args.
7680set dummy $tool_basename; ac_word=$2
7681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7682$as_echo_n "checking for $ac_word... " >&6; }
7683if ${ac_cv_path_LN+:} false; then :
7684  $as_echo_n "(cached) " >&6
7685else
7686  case $LN in
7687  [\\/]* | ?:[\\/]*)
7688  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7689  ;;
7690  *)
7691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7692for as_dir in $PATH
7693do
7694  IFS=$as_save_IFS
7695  test -z "$as_dir" && as_dir=.
7696    for ac_exec_ext in '' $ac_executable_extensions; do
7697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7698    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7700    break 2
7701  fi
7702done
7703  done
7704IFS=$as_save_IFS
7705
7706  ;;
7707esac
7708fi
7709LN=$ac_cv_path_LN
7710if test -n "$LN"; then
7711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7712$as_echo "$LN" >&6; }
7713else
7714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7715$as_echo "no" >&6; }
7716fi
7717
7718
7719        if test "x$LN" = x; then
7720          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7721        fi
7722      else
7723        # Otherwise we believe it is a complete path. Use it as it is.
7724        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7725$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7726        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7727$as_echo_n "checking for LN... " >&6; }
7728        if test ! -x "$tool_specified"; then
7729          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7730$as_echo "not found" >&6; }
7731          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7732        fi
7733        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7734$as_echo "$tool_specified" >&6; }
7735      fi
7736    fi
7737  fi
7738
7739
7740
7741  if test "x$LN" = x; then
7742    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7743  fi
7744
7745
7746
7747
7748
7749  # Publish this variable in the help.
7750
7751
7752  if test "x$LS" = x; then
7753    # The variable is not set by user, try to locate tool using the code snippet
7754    for ac_prog in ls
7755do
7756  # Extract the first word of "$ac_prog", so it can be a program name with args.
7757set dummy $ac_prog; ac_word=$2
7758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7759$as_echo_n "checking for $ac_word... " >&6; }
7760if ${ac_cv_path_LS+:} false; then :
7761  $as_echo_n "(cached) " >&6
7762else
7763  case $LS in
7764  [\\/]* | ?:[\\/]*)
7765  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7766  ;;
7767  *)
7768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7769for as_dir in $PATH
7770do
7771  IFS=$as_save_IFS
7772  test -z "$as_dir" && as_dir=.
7773    for ac_exec_ext in '' $ac_executable_extensions; do
7774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7775    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7777    break 2
7778  fi
7779done
7780  done
7781IFS=$as_save_IFS
7782
7783  ;;
7784esac
7785fi
7786LS=$ac_cv_path_LS
7787if test -n "$LS"; then
7788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7789$as_echo "$LS" >&6; }
7790else
7791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7792$as_echo "no" >&6; }
7793fi
7794
7795
7796  test -n "$LS" && break
7797done
7798
7799  else
7800    # The variable is set, but is it from the command line or the environment?
7801
7802    # Try to remove the string !LS! from our list.
7803    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7804    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7805      # If it failed, the variable was not from the command line. Ignore it,
7806      # but warn the user (except for BASH, which is always set by the calling BASH).
7807      if test "xLS" != xBASH; then
7808        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7809$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7810      fi
7811      # Try to locate tool using the code snippet
7812      for ac_prog in ls
7813do
7814  # Extract the first word of "$ac_prog", so it can be a program name with args.
7815set dummy $ac_prog; ac_word=$2
7816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7817$as_echo_n "checking for $ac_word... " >&6; }
7818if ${ac_cv_path_LS+:} false; then :
7819  $as_echo_n "(cached) " >&6
7820else
7821  case $LS in
7822  [\\/]* | ?:[\\/]*)
7823  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7824  ;;
7825  *)
7826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7827for as_dir in $PATH
7828do
7829  IFS=$as_save_IFS
7830  test -z "$as_dir" && as_dir=.
7831    for ac_exec_ext in '' $ac_executable_extensions; do
7832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7833    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7835    break 2
7836  fi
7837done
7838  done
7839IFS=$as_save_IFS
7840
7841  ;;
7842esac
7843fi
7844LS=$ac_cv_path_LS
7845if test -n "$LS"; then
7846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7847$as_echo "$LS" >&6; }
7848else
7849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7850$as_echo "no" >&6; }
7851fi
7852
7853
7854  test -n "$LS" && break
7855done
7856
7857    else
7858      # If it succeeded, then it was overridden by the user. We will use it
7859      # for the tool.
7860
7861      # First remove it from the list of overridden variables, so we can test
7862      # for unknown variables in the end.
7863      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7864
7865      # Check if the provided tool contains a complete path.
7866      tool_specified="$LS"
7867      tool_basename="${tool_specified##*/}"
7868      if test "x$tool_basename" = "x$tool_specified"; then
7869        # A command without a complete path is provided, search $PATH.
7870        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7871$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7872        # Extract the first word of "$tool_basename", so it can be a program name with args.
7873set dummy $tool_basename; ac_word=$2
7874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7875$as_echo_n "checking for $ac_word... " >&6; }
7876if ${ac_cv_path_LS+:} false; then :
7877  $as_echo_n "(cached) " >&6
7878else
7879  case $LS in
7880  [\\/]* | ?:[\\/]*)
7881  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7882  ;;
7883  *)
7884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7885for as_dir in $PATH
7886do
7887  IFS=$as_save_IFS
7888  test -z "$as_dir" && as_dir=.
7889    for ac_exec_ext in '' $ac_executable_extensions; do
7890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7891    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7893    break 2
7894  fi
7895done
7896  done
7897IFS=$as_save_IFS
7898
7899  ;;
7900esac
7901fi
7902LS=$ac_cv_path_LS
7903if test -n "$LS"; then
7904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7905$as_echo "$LS" >&6; }
7906else
7907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7908$as_echo "no" >&6; }
7909fi
7910
7911
7912        if test "x$LS" = x; then
7913          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7914        fi
7915      else
7916        # Otherwise we believe it is a complete path. Use it as it is.
7917        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7918$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7919        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7920$as_echo_n "checking for LS... " >&6; }
7921        if test ! -x "$tool_specified"; then
7922          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7923$as_echo "not found" >&6; }
7924          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7925        fi
7926        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7927$as_echo "$tool_specified" >&6; }
7928      fi
7929    fi
7930  fi
7931
7932
7933
7934  if test "x$LS" = x; then
7935    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7936  fi
7937
7938
7939
7940
7941
7942  # Publish this variable in the help.
7943
7944
7945  if test "x$MKDIR" = x; then
7946    # The variable is not set by user, try to locate tool using the code snippet
7947    for ac_prog in mkdir
7948do
7949  # Extract the first word of "$ac_prog", so it can be a program name with args.
7950set dummy $ac_prog; ac_word=$2
7951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7952$as_echo_n "checking for $ac_word... " >&6; }
7953if ${ac_cv_path_MKDIR+:} false; then :
7954  $as_echo_n "(cached) " >&6
7955else
7956  case $MKDIR in
7957  [\\/]* | ?:[\\/]*)
7958  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7959  ;;
7960  *)
7961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7962for as_dir in $PATH
7963do
7964  IFS=$as_save_IFS
7965  test -z "$as_dir" && as_dir=.
7966    for ac_exec_ext in '' $ac_executable_extensions; do
7967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7968    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7970    break 2
7971  fi
7972done
7973  done
7974IFS=$as_save_IFS
7975
7976  ;;
7977esac
7978fi
7979MKDIR=$ac_cv_path_MKDIR
7980if test -n "$MKDIR"; then
7981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7982$as_echo "$MKDIR" >&6; }
7983else
7984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7985$as_echo "no" >&6; }
7986fi
7987
7988
7989  test -n "$MKDIR" && break
7990done
7991
7992  else
7993    # The variable is set, but is it from the command line or the environment?
7994
7995    # Try to remove the string !MKDIR! from our list.
7996    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7997    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7998      # If it failed, the variable was not from the command line. Ignore it,
7999      # but warn the user (except for BASH, which is always set by the calling BASH).
8000      if test "xMKDIR" != xBASH; then
8001        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8002$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8003      fi
8004      # Try to locate tool using the code snippet
8005      for ac_prog in mkdir
8006do
8007  # Extract the first word of "$ac_prog", so it can be a program name with args.
8008set dummy $ac_prog; ac_word=$2
8009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8010$as_echo_n "checking for $ac_word... " >&6; }
8011if ${ac_cv_path_MKDIR+:} false; then :
8012  $as_echo_n "(cached) " >&6
8013else
8014  case $MKDIR in
8015  [\\/]* | ?:[\\/]*)
8016  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8017  ;;
8018  *)
8019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8020for as_dir in $PATH
8021do
8022  IFS=$as_save_IFS
8023  test -z "$as_dir" && as_dir=.
8024    for ac_exec_ext in '' $ac_executable_extensions; do
8025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8026    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8028    break 2
8029  fi
8030done
8031  done
8032IFS=$as_save_IFS
8033
8034  ;;
8035esac
8036fi
8037MKDIR=$ac_cv_path_MKDIR
8038if test -n "$MKDIR"; then
8039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8040$as_echo "$MKDIR" >&6; }
8041else
8042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8043$as_echo "no" >&6; }
8044fi
8045
8046
8047  test -n "$MKDIR" && break
8048done
8049
8050    else
8051      # If it succeeded, then it was overridden by the user. We will use it
8052      # for the tool.
8053
8054      # First remove it from the list of overridden variables, so we can test
8055      # for unknown variables in the end.
8056      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8057
8058      # Check if the provided tool contains a complete path.
8059      tool_specified="$MKDIR"
8060      tool_basename="${tool_specified##*/}"
8061      if test "x$tool_basename" = "x$tool_specified"; then
8062        # A command without a complete path is provided, search $PATH.
8063        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8064$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8065        # Extract the first word of "$tool_basename", so it can be a program name with args.
8066set dummy $tool_basename; ac_word=$2
8067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8068$as_echo_n "checking for $ac_word... " >&6; }
8069if ${ac_cv_path_MKDIR+:} false; then :
8070  $as_echo_n "(cached) " >&6
8071else
8072  case $MKDIR in
8073  [\\/]* | ?:[\\/]*)
8074  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8075  ;;
8076  *)
8077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8078for as_dir in $PATH
8079do
8080  IFS=$as_save_IFS
8081  test -z "$as_dir" && as_dir=.
8082    for ac_exec_ext in '' $ac_executable_extensions; do
8083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8084    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8086    break 2
8087  fi
8088done
8089  done
8090IFS=$as_save_IFS
8091
8092  ;;
8093esac
8094fi
8095MKDIR=$ac_cv_path_MKDIR
8096if test -n "$MKDIR"; then
8097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8098$as_echo "$MKDIR" >&6; }
8099else
8100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8101$as_echo "no" >&6; }
8102fi
8103
8104
8105        if test "x$MKDIR" = x; then
8106          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8107        fi
8108      else
8109        # Otherwise we believe it is a complete path. Use it as it is.
8110        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8111$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8112        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8113$as_echo_n "checking for MKDIR... " >&6; }
8114        if test ! -x "$tool_specified"; then
8115          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8116$as_echo "not found" >&6; }
8117          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8118        fi
8119        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8120$as_echo "$tool_specified" >&6; }
8121      fi
8122    fi
8123  fi
8124
8125
8126
8127  if test "x$MKDIR" = x; then
8128    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8129  fi
8130
8131
8132
8133
8134
8135  # Publish this variable in the help.
8136
8137
8138  if test "x$MKTEMP" = x; then
8139    # The variable is not set by user, try to locate tool using the code snippet
8140    for ac_prog in mktemp
8141do
8142  # Extract the first word of "$ac_prog", so it can be a program name with args.
8143set dummy $ac_prog; ac_word=$2
8144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8145$as_echo_n "checking for $ac_word... " >&6; }
8146if ${ac_cv_path_MKTEMP+:} false; then :
8147  $as_echo_n "(cached) " >&6
8148else
8149  case $MKTEMP in
8150  [\\/]* | ?:[\\/]*)
8151  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8152  ;;
8153  *)
8154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8155for as_dir in $PATH
8156do
8157  IFS=$as_save_IFS
8158  test -z "$as_dir" && as_dir=.
8159    for ac_exec_ext in '' $ac_executable_extensions; do
8160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8161    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8163    break 2
8164  fi
8165done
8166  done
8167IFS=$as_save_IFS
8168
8169  ;;
8170esac
8171fi
8172MKTEMP=$ac_cv_path_MKTEMP
8173if test -n "$MKTEMP"; then
8174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8175$as_echo "$MKTEMP" >&6; }
8176else
8177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8178$as_echo "no" >&6; }
8179fi
8180
8181
8182  test -n "$MKTEMP" && break
8183done
8184
8185  else
8186    # The variable is set, but is it from the command line or the environment?
8187
8188    # Try to remove the string !MKTEMP! from our list.
8189    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8190    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8191      # If it failed, the variable was not from the command line. Ignore it,
8192      # but warn the user (except for BASH, which is always set by the calling BASH).
8193      if test "xMKTEMP" != xBASH; then
8194        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8195$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8196      fi
8197      # Try to locate tool using the code snippet
8198      for ac_prog in mktemp
8199do
8200  # Extract the first word of "$ac_prog", so it can be a program name with args.
8201set dummy $ac_prog; ac_word=$2
8202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8203$as_echo_n "checking for $ac_word... " >&6; }
8204if ${ac_cv_path_MKTEMP+:} false; then :
8205  $as_echo_n "(cached) " >&6
8206else
8207  case $MKTEMP in
8208  [\\/]* | ?:[\\/]*)
8209  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8210  ;;
8211  *)
8212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8213for as_dir in $PATH
8214do
8215  IFS=$as_save_IFS
8216  test -z "$as_dir" && as_dir=.
8217    for ac_exec_ext in '' $ac_executable_extensions; do
8218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8219    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8221    break 2
8222  fi
8223done
8224  done
8225IFS=$as_save_IFS
8226
8227  ;;
8228esac
8229fi
8230MKTEMP=$ac_cv_path_MKTEMP
8231if test -n "$MKTEMP"; then
8232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8233$as_echo "$MKTEMP" >&6; }
8234else
8235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8236$as_echo "no" >&6; }
8237fi
8238
8239
8240  test -n "$MKTEMP" && break
8241done
8242
8243    else
8244      # If it succeeded, then it was overridden by the user. We will use it
8245      # for the tool.
8246
8247      # First remove it from the list of overridden variables, so we can test
8248      # for unknown variables in the end.
8249      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8250
8251      # Check if the provided tool contains a complete path.
8252      tool_specified="$MKTEMP"
8253      tool_basename="${tool_specified##*/}"
8254      if test "x$tool_basename" = "x$tool_specified"; then
8255        # A command without a complete path is provided, search $PATH.
8256        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8257$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8258        # Extract the first word of "$tool_basename", so it can be a program name with args.
8259set dummy $tool_basename; ac_word=$2
8260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8261$as_echo_n "checking for $ac_word... " >&6; }
8262if ${ac_cv_path_MKTEMP+:} false; then :
8263  $as_echo_n "(cached) " >&6
8264else
8265  case $MKTEMP in
8266  [\\/]* | ?:[\\/]*)
8267  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8268  ;;
8269  *)
8270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8271for as_dir in $PATH
8272do
8273  IFS=$as_save_IFS
8274  test -z "$as_dir" && as_dir=.
8275    for ac_exec_ext in '' $ac_executable_extensions; do
8276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8277    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8279    break 2
8280  fi
8281done
8282  done
8283IFS=$as_save_IFS
8284
8285  ;;
8286esac
8287fi
8288MKTEMP=$ac_cv_path_MKTEMP
8289if test -n "$MKTEMP"; then
8290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8291$as_echo "$MKTEMP" >&6; }
8292else
8293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8294$as_echo "no" >&6; }
8295fi
8296
8297
8298        if test "x$MKTEMP" = x; then
8299          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8300        fi
8301      else
8302        # Otherwise we believe it is a complete path. Use it as it is.
8303        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8304$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8305        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8306$as_echo_n "checking for MKTEMP... " >&6; }
8307        if test ! -x "$tool_specified"; then
8308          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8309$as_echo "not found" >&6; }
8310          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8311        fi
8312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8313$as_echo "$tool_specified" >&6; }
8314      fi
8315    fi
8316  fi
8317
8318
8319
8320  if test "x$MKTEMP" = x; then
8321    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8322  fi
8323
8324
8325
8326
8327
8328  # Publish this variable in the help.
8329
8330
8331  if test "x$MV" = x; then
8332    # The variable is not set by user, try to locate tool using the code snippet
8333    for ac_prog in mv
8334do
8335  # Extract the first word of "$ac_prog", so it can be a program name with args.
8336set dummy $ac_prog; ac_word=$2
8337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8338$as_echo_n "checking for $ac_word... " >&6; }
8339if ${ac_cv_path_MV+:} false; then :
8340  $as_echo_n "(cached) " >&6
8341else
8342  case $MV in
8343  [\\/]* | ?:[\\/]*)
8344  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8345  ;;
8346  *)
8347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8348for as_dir in $PATH
8349do
8350  IFS=$as_save_IFS
8351  test -z "$as_dir" && as_dir=.
8352    for ac_exec_ext in '' $ac_executable_extensions; do
8353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8354    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8356    break 2
8357  fi
8358done
8359  done
8360IFS=$as_save_IFS
8361
8362  ;;
8363esac
8364fi
8365MV=$ac_cv_path_MV
8366if test -n "$MV"; then
8367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8368$as_echo "$MV" >&6; }
8369else
8370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8371$as_echo "no" >&6; }
8372fi
8373
8374
8375  test -n "$MV" && break
8376done
8377
8378  else
8379    # The variable is set, but is it from the command line or the environment?
8380
8381    # Try to remove the string !MV! from our list.
8382    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8383    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8384      # If it failed, the variable was not from the command line. Ignore it,
8385      # but warn the user (except for BASH, which is always set by the calling BASH).
8386      if test "xMV" != xBASH; then
8387        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8388$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8389      fi
8390      # Try to locate tool using the code snippet
8391      for ac_prog in mv
8392do
8393  # Extract the first word of "$ac_prog", so it can be a program name with args.
8394set dummy $ac_prog; ac_word=$2
8395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8396$as_echo_n "checking for $ac_word... " >&6; }
8397if ${ac_cv_path_MV+:} false; then :
8398  $as_echo_n "(cached) " >&6
8399else
8400  case $MV in
8401  [\\/]* | ?:[\\/]*)
8402  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8403  ;;
8404  *)
8405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8406for as_dir in $PATH
8407do
8408  IFS=$as_save_IFS
8409  test -z "$as_dir" && as_dir=.
8410    for ac_exec_ext in '' $ac_executable_extensions; do
8411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8412    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8414    break 2
8415  fi
8416done
8417  done
8418IFS=$as_save_IFS
8419
8420  ;;
8421esac
8422fi
8423MV=$ac_cv_path_MV
8424if test -n "$MV"; then
8425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8426$as_echo "$MV" >&6; }
8427else
8428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8429$as_echo "no" >&6; }
8430fi
8431
8432
8433  test -n "$MV" && break
8434done
8435
8436    else
8437      # If it succeeded, then it was overridden by the user. We will use it
8438      # for the tool.
8439
8440      # First remove it from the list of overridden variables, so we can test
8441      # for unknown variables in the end.
8442      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8443
8444      # Check if the provided tool contains a complete path.
8445      tool_specified="$MV"
8446      tool_basename="${tool_specified##*/}"
8447      if test "x$tool_basename" = "x$tool_specified"; then
8448        # A command without a complete path is provided, search $PATH.
8449        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8450$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8451        # Extract the first word of "$tool_basename", so it can be a program name with args.
8452set dummy $tool_basename; ac_word=$2
8453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8454$as_echo_n "checking for $ac_word... " >&6; }
8455if ${ac_cv_path_MV+:} false; then :
8456  $as_echo_n "(cached) " >&6
8457else
8458  case $MV in
8459  [\\/]* | ?:[\\/]*)
8460  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8461  ;;
8462  *)
8463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8464for as_dir in $PATH
8465do
8466  IFS=$as_save_IFS
8467  test -z "$as_dir" && as_dir=.
8468    for ac_exec_ext in '' $ac_executable_extensions; do
8469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8470    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8472    break 2
8473  fi
8474done
8475  done
8476IFS=$as_save_IFS
8477
8478  ;;
8479esac
8480fi
8481MV=$ac_cv_path_MV
8482if test -n "$MV"; then
8483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8484$as_echo "$MV" >&6; }
8485else
8486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8487$as_echo "no" >&6; }
8488fi
8489
8490
8491        if test "x$MV" = x; then
8492          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8493        fi
8494      else
8495        # Otherwise we believe it is a complete path. Use it as it is.
8496        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8497$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8498        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8499$as_echo_n "checking for MV... " >&6; }
8500        if test ! -x "$tool_specified"; then
8501          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8502$as_echo "not found" >&6; }
8503          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8504        fi
8505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8506$as_echo "$tool_specified" >&6; }
8507      fi
8508    fi
8509  fi
8510
8511
8512
8513  if test "x$MV" = x; then
8514    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8515  fi
8516
8517
8518
8519
8520
8521  # Publish this variable in the help.
8522
8523
8524  if test "x$NAWK" = x; then
8525    # The variable is not set by user, try to locate tool using the code snippet
8526    for ac_prog in nawk gawk awk
8527do
8528  # Extract the first word of "$ac_prog", so it can be a program name with args.
8529set dummy $ac_prog; ac_word=$2
8530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8531$as_echo_n "checking for $ac_word... " >&6; }
8532if ${ac_cv_path_NAWK+:} false; then :
8533  $as_echo_n "(cached) " >&6
8534else
8535  case $NAWK in
8536  [\\/]* | ?:[\\/]*)
8537  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8538  ;;
8539  *)
8540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8541for as_dir in $PATH
8542do
8543  IFS=$as_save_IFS
8544  test -z "$as_dir" && as_dir=.
8545    for ac_exec_ext in '' $ac_executable_extensions; do
8546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8547    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8549    break 2
8550  fi
8551done
8552  done
8553IFS=$as_save_IFS
8554
8555  ;;
8556esac
8557fi
8558NAWK=$ac_cv_path_NAWK
8559if test -n "$NAWK"; then
8560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8561$as_echo "$NAWK" >&6; }
8562else
8563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8564$as_echo "no" >&6; }
8565fi
8566
8567
8568  test -n "$NAWK" && break
8569done
8570
8571  else
8572    # The variable is set, but is it from the command line or the environment?
8573
8574    # Try to remove the string !NAWK! from our list.
8575    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8576    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8577      # If it failed, the variable was not from the command line. Ignore it,
8578      # but warn the user (except for BASH, which is always set by the calling BASH).
8579      if test "xNAWK" != xBASH; then
8580        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8581$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8582      fi
8583      # Try to locate tool using the code snippet
8584      for ac_prog in nawk gawk awk
8585do
8586  # Extract the first word of "$ac_prog", so it can be a program name with args.
8587set dummy $ac_prog; ac_word=$2
8588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8589$as_echo_n "checking for $ac_word... " >&6; }
8590if ${ac_cv_path_NAWK+:} false; then :
8591  $as_echo_n "(cached) " >&6
8592else
8593  case $NAWK in
8594  [\\/]* | ?:[\\/]*)
8595  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8596  ;;
8597  *)
8598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8599for as_dir in $PATH
8600do
8601  IFS=$as_save_IFS
8602  test -z "$as_dir" && as_dir=.
8603    for ac_exec_ext in '' $ac_executable_extensions; do
8604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8605    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8607    break 2
8608  fi
8609done
8610  done
8611IFS=$as_save_IFS
8612
8613  ;;
8614esac
8615fi
8616NAWK=$ac_cv_path_NAWK
8617if test -n "$NAWK"; then
8618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8619$as_echo "$NAWK" >&6; }
8620else
8621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8622$as_echo "no" >&6; }
8623fi
8624
8625
8626  test -n "$NAWK" && break
8627done
8628
8629    else
8630      # If it succeeded, then it was overridden by the user. We will use it
8631      # for the tool.
8632
8633      # First remove it from the list of overridden variables, so we can test
8634      # for unknown variables in the end.
8635      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8636
8637      # Check if the provided tool contains a complete path.
8638      tool_specified="$NAWK"
8639      tool_basename="${tool_specified##*/}"
8640      if test "x$tool_basename" = "x$tool_specified"; then
8641        # A command without a complete path is provided, search $PATH.
8642        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8643$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8644        # Extract the first word of "$tool_basename", so it can be a program name with args.
8645set dummy $tool_basename; ac_word=$2
8646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8647$as_echo_n "checking for $ac_word... " >&6; }
8648if ${ac_cv_path_NAWK+:} false; then :
8649  $as_echo_n "(cached) " >&6
8650else
8651  case $NAWK in
8652  [\\/]* | ?:[\\/]*)
8653  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8654  ;;
8655  *)
8656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8657for as_dir in $PATH
8658do
8659  IFS=$as_save_IFS
8660  test -z "$as_dir" && as_dir=.
8661    for ac_exec_ext in '' $ac_executable_extensions; do
8662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8663    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8665    break 2
8666  fi
8667done
8668  done
8669IFS=$as_save_IFS
8670
8671  ;;
8672esac
8673fi
8674NAWK=$ac_cv_path_NAWK
8675if test -n "$NAWK"; then
8676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8677$as_echo "$NAWK" >&6; }
8678else
8679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8680$as_echo "no" >&6; }
8681fi
8682
8683
8684        if test "x$NAWK" = x; then
8685          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8686        fi
8687      else
8688        # Otherwise we believe it is a complete path. Use it as it is.
8689        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8690$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8691        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8692$as_echo_n "checking for NAWK... " >&6; }
8693        if test ! -x "$tool_specified"; then
8694          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8695$as_echo "not found" >&6; }
8696          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8697        fi
8698        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8699$as_echo "$tool_specified" >&6; }
8700      fi
8701    fi
8702  fi
8703
8704
8705
8706  if test "x$NAWK" = x; then
8707    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8708  fi
8709
8710
8711
8712
8713
8714  # Publish this variable in the help.
8715
8716
8717  if test "x$PRINTF" = x; then
8718    # The variable is not set by user, try to locate tool using the code snippet
8719    for ac_prog in printf
8720do
8721  # Extract the first word of "$ac_prog", so it can be a program name with args.
8722set dummy $ac_prog; ac_word=$2
8723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8724$as_echo_n "checking for $ac_word... " >&6; }
8725if ${ac_cv_path_PRINTF+:} false; then :
8726  $as_echo_n "(cached) " >&6
8727else
8728  case $PRINTF in
8729  [\\/]* | ?:[\\/]*)
8730  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8731  ;;
8732  *)
8733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8734for as_dir in $PATH
8735do
8736  IFS=$as_save_IFS
8737  test -z "$as_dir" && as_dir=.
8738    for ac_exec_ext in '' $ac_executable_extensions; do
8739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8740    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8742    break 2
8743  fi
8744done
8745  done
8746IFS=$as_save_IFS
8747
8748  ;;
8749esac
8750fi
8751PRINTF=$ac_cv_path_PRINTF
8752if test -n "$PRINTF"; then
8753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8754$as_echo "$PRINTF" >&6; }
8755else
8756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8757$as_echo "no" >&6; }
8758fi
8759
8760
8761  test -n "$PRINTF" && break
8762done
8763
8764  else
8765    # The variable is set, but is it from the command line or the environment?
8766
8767    # Try to remove the string !PRINTF! from our list.
8768    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8769    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8770      # If it failed, the variable was not from the command line. Ignore it,
8771      # but warn the user (except for BASH, which is always set by the calling BASH).
8772      if test "xPRINTF" != xBASH; then
8773        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8774$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8775      fi
8776      # Try to locate tool using the code snippet
8777      for ac_prog in printf
8778do
8779  # Extract the first word of "$ac_prog", so it can be a program name with args.
8780set dummy $ac_prog; ac_word=$2
8781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8782$as_echo_n "checking for $ac_word... " >&6; }
8783if ${ac_cv_path_PRINTF+:} false; then :
8784  $as_echo_n "(cached) " >&6
8785else
8786  case $PRINTF in
8787  [\\/]* | ?:[\\/]*)
8788  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8789  ;;
8790  *)
8791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8792for as_dir in $PATH
8793do
8794  IFS=$as_save_IFS
8795  test -z "$as_dir" && as_dir=.
8796    for ac_exec_ext in '' $ac_executable_extensions; do
8797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8798    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8800    break 2
8801  fi
8802done
8803  done
8804IFS=$as_save_IFS
8805
8806  ;;
8807esac
8808fi
8809PRINTF=$ac_cv_path_PRINTF
8810if test -n "$PRINTF"; then
8811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8812$as_echo "$PRINTF" >&6; }
8813else
8814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8815$as_echo "no" >&6; }
8816fi
8817
8818
8819  test -n "$PRINTF" && break
8820done
8821
8822    else
8823      # If it succeeded, then it was overridden by the user. We will use it
8824      # for the tool.
8825
8826      # First remove it from the list of overridden variables, so we can test
8827      # for unknown variables in the end.
8828      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8829
8830      # Check if the provided tool contains a complete path.
8831      tool_specified="$PRINTF"
8832      tool_basename="${tool_specified##*/}"
8833      if test "x$tool_basename" = "x$tool_specified"; then
8834        # A command without a complete path is provided, search $PATH.
8835        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8836$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8837        # Extract the first word of "$tool_basename", so it can be a program name with args.
8838set dummy $tool_basename; ac_word=$2
8839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8840$as_echo_n "checking for $ac_word... " >&6; }
8841if ${ac_cv_path_PRINTF+:} false; then :
8842  $as_echo_n "(cached) " >&6
8843else
8844  case $PRINTF in
8845  [\\/]* | ?:[\\/]*)
8846  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8847  ;;
8848  *)
8849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8850for as_dir in $PATH
8851do
8852  IFS=$as_save_IFS
8853  test -z "$as_dir" && as_dir=.
8854    for ac_exec_ext in '' $ac_executable_extensions; do
8855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8856    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8858    break 2
8859  fi
8860done
8861  done
8862IFS=$as_save_IFS
8863
8864  ;;
8865esac
8866fi
8867PRINTF=$ac_cv_path_PRINTF
8868if test -n "$PRINTF"; then
8869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8870$as_echo "$PRINTF" >&6; }
8871else
8872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8873$as_echo "no" >&6; }
8874fi
8875
8876
8877        if test "x$PRINTF" = x; then
8878          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8879        fi
8880      else
8881        # Otherwise we believe it is a complete path. Use it as it is.
8882        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8883$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8884        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8885$as_echo_n "checking for PRINTF... " >&6; }
8886        if test ! -x "$tool_specified"; then
8887          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8888$as_echo "not found" >&6; }
8889          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8890        fi
8891        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8892$as_echo "$tool_specified" >&6; }
8893      fi
8894    fi
8895  fi
8896
8897
8898
8899  if test "x$PRINTF" = x; then
8900    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8901  fi
8902
8903
8904
8905
8906
8907  # Publish this variable in the help.
8908
8909
8910  if test "x$RM" = x; then
8911    # The variable is not set by user, try to locate tool using the code snippet
8912    for ac_prog in rm
8913do
8914  # Extract the first word of "$ac_prog", so it can be a program name with args.
8915set dummy $ac_prog; ac_word=$2
8916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8917$as_echo_n "checking for $ac_word... " >&6; }
8918if ${ac_cv_path_RM+:} false; then :
8919  $as_echo_n "(cached) " >&6
8920else
8921  case $RM in
8922  [\\/]* | ?:[\\/]*)
8923  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8924  ;;
8925  *)
8926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8927for as_dir in $PATH
8928do
8929  IFS=$as_save_IFS
8930  test -z "$as_dir" && as_dir=.
8931    for ac_exec_ext in '' $ac_executable_extensions; do
8932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8933    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8935    break 2
8936  fi
8937done
8938  done
8939IFS=$as_save_IFS
8940
8941  ;;
8942esac
8943fi
8944RM=$ac_cv_path_RM
8945if test -n "$RM"; then
8946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8947$as_echo "$RM" >&6; }
8948else
8949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8950$as_echo "no" >&6; }
8951fi
8952
8953
8954  test -n "$RM" && break
8955done
8956
8957  else
8958    # The variable is set, but is it from the command line or the environment?
8959
8960    # Try to remove the string !RM! from our list.
8961    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8962    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8963      # If it failed, the variable was not from the command line. Ignore it,
8964      # but warn the user (except for BASH, which is always set by the calling BASH).
8965      if test "xRM" != xBASH; then
8966        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8967$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8968      fi
8969      # Try to locate tool using the code snippet
8970      for ac_prog in rm
8971do
8972  # Extract the first word of "$ac_prog", so it can be a program name with args.
8973set dummy $ac_prog; ac_word=$2
8974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8975$as_echo_n "checking for $ac_word... " >&6; }
8976if ${ac_cv_path_RM+:} false; then :
8977  $as_echo_n "(cached) " >&6
8978else
8979  case $RM in
8980  [\\/]* | ?:[\\/]*)
8981  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8982  ;;
8983  *)
8984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8985for as_dir in $PATH
8986do
8987  IFS=$as_save_IFS
8988  test -z "$as_dir" && as_dir=.
8989    for ac_exec_ext in '' $ac_executable_extensions; do
8990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8991    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8993    break 2
8994  fi
8995done
8996  done
8997IFS=$as_save_IFS
8998
8999  ;;
9000esac
9001fi
9002RM=$ac_cv_path_RM
9003if test -n "$RM"; then
9004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9005$as_echo "$RM" >&6; }
9006else
9007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9008$as_echo "no" >&6; }
9009fi
9010
9011
9012  test -n "$RM" && break
9013done
9014
9015    else
9016      # If it succeeded, then it was overridden by the user. We will use it
9017      # for the tool.
9018
9019      # First remove it from the list of overridden variables, so we can test
9020      # for unknown variables in the end.
9021      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9022
9023      # Check if the provided tool contains a complete path.
9024      tool_specified="$RM"
9025      tool_basename="${tool_specified##*/}"
9026      if test "x$tool_basename" = "x$tool_specified"; then
9027        # A command without a complete path is provided, search $PATH.
9028        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9029$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9030        # Extract the first word of "$tool_basename", so it can be a program name with args.
9031set dummy $tool_basename; ac_word=$2
9032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9033$as_echo_n "checking for $ac_word... " >&6; }
9034if ${ac_cv_path_RM+:} false; then :
9035  $as_echo_n "(cached) " >&6
9036else
9037  case $RM in
9038  [\\/]* | ?:[\\/]*)
9039  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9040  ;;
9041  *)
9042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9043for as_dir in $PATH
9044do
9045  IFS=$as_save_IFS
9046  test -z "$as_dir" && as_dir=.
9047    for ac_exec_ext in '' $ac_executable_extensions; do
9048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9049    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9051    break 2
9052  fi
9053done
9054  done
9055IFS=$as_save_IFS
9056
9057  ;;
9058esac
9059fi
9060RM=$ac_cv_path_RM
9061if test -n "$RM"; then
9062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9063$as_echo "$RM" >&6; }
9064else
9065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9066$as_echo "no" >&6; }
9067fi
9068
9069
9070        if test "x$RM" = x; then
9071          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9072        fi
9073      else
9074        # Otherwise we believe it is a complete path. Use it as it is.
9075        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9076$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9077        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9078$as_echo_n "checking for RM... " >&6; }
9079        if test ! -x "$tool_specified"; then
9080          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9081$as_echo "not found" >&6; }
9082          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9083        fi
9084        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9085$as_echo "$tool_specified" >&6; }
9086      fi
9087    fi
9088  fi
9089
9090
9091
9092  if test "x$RM" = x; then
9093    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9094  fi
9095
9096
9097
9098
9099
9100  # Publish this variable in the help.
9101
9102
9103  if test "x$SH" = x; then
9104    # The variable is not set by user, try to locate tool using the code snippet
9105    for ac_prog in sh
9106do
9107  # Extract the first word of "$ac_prog", so it can be a program name with args.
9108set dummy $ac_prog; ac_word=$2
9109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9110$as_echo_n "checking for $ac_word... " >&6; }
9111if ${ac_cv_path_SH+:} false; then :
9112  $as_echo_n "(cached) " >&6
9113else
9114  case $SH in
9115  [\\/]* | ?:[\\/]*)
9116  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9117  ;;
9118  *)
9119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9120for as_dir in $PATH
9121do
9122  IFS=$as_save_IFS
9123  test -z "$as_dir" && as_dir=.
9124    for ac_exec_ext in '' $ac_executable_extensions; do
9125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9126    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9128    break 2
9129  fi
9130done
9131  done
9132IFS=$as_save_IFS
9133
9134  ;;
9135esac
9136fi
9137SH=$ac_cv_path_SH
9138if test -n "$SH"; then
9139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9140$as_echo "$SH" >&6; }
9141else
9142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9143$as_echo "no" >&6; }
9144fi
9145
9146
9147  test -n "$SH" && break
9148done
9149
9150  else
9151    # The variable is set, but is it from the command line or the environment?
9152
9153    # Try to remove the string !SH! from our list.
9154    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9155    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9156      # If it failed, the variable was not from the command line. Ignore it,
9157      # but warn the user (except for BASH, which is always set by the calling BASH).
9158      if test "xSH" != xBASH; then
9159        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9160$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9161      fi
9162      # Try to locate tool using the code snippet
9163      for ac_prog in sh
9164do
9165  # Extract the first word of "$ac_prog", so it can be a program name with args.
9166set dummy $ac_prog; ac_word=$2
9167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9168$as_echo_n "checking for $ac_word... " >&6; }
9169if ${ac_cv_path_SH+:} false; then :
9170  $as_echo_n "(cached) " >&6
9171else
9172  case $SH in
9173  [\\/]* | ?:[\\/]*)
9174  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9175  ;;
9176  *)
9177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9178for as_dir in $PATH
9179do
9180  IFS=$as_save_IFS
9181  test -z "$as_dir" && as_dir=.
9182    for ac_exec_ext in '' $ac_executable_extensions; do
9183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9184    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9186    break 2
9187  fi
9188done
9189  done
9190IFS=$as_save_IFS
9191
9192  ;;
9193esac
9194fi
9195SH=$ac_cv_path_SH
9196if test -n "$SH"; then
9197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9198$as_echo "$SH" >&6; }
9199else
9200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9201$as_echo "no" >&6; }
9202fi
9203
9204
9205  test -n "$SH" && break
9206done
9207
9208    else
9209      # If it succeeded, then it was overridden by the user. We will use it
9210      # for the tool.
9211
9212      # First remove it from the list of overridden variables, so we can test
9213      # for unknown variables in the end.
9214      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9215
9216      # Check if the provided tool contains a complete path.
9217      tool_specified="$SH"
9218      tool_basename="${tool_specified##*/}"
9219      if test "x$tool_basename" = "x$tool_specified"; then
9220        # A command without a complete path is provided, search $PATH.
9221        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9222$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9223        # Extract the first word of "$tool_basename", so it can be a program name with args.
9224set dummy $tool_basename; ac_word=$2
9225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9226$as_echo_n "checking for $ac_word... " >&6; }
9227if ${ac_cv_path_SH+:} false; then :
9228  $as_echo_n "(cached) " >&6
9229else
9230  case $SH in
9231  [\\/]* | ?:[\\/]*)
9232  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9233  ;;
9234  *)
9235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9236for as_dir in $PATH
9237do
9238  IFS=$as_save_IFS
9239  test -z "$as_dir" && as_dir=.
9240    for ac_exec_ext in '' $ac_executable_extensions; do
9241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9242    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9244    break 2
9245  fi
9246done
9247  done
9248IFS=$as_save_IFS
9249
9250  ;;
9251esac
9252fi
9253SH=$ac_cv_path_SH
9254if test -n "$SH"; then
9255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9256$as_echo "$SH" >&6; }
9257else
9258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9259$as_echo "no" >&6; }
9260fi
9261
9262
9263        if test "x$SH" = x; then
9264          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9265        fi
9266      else
9267        # Otherwise we believe it is a complete path. Use it as it is.
9268        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9269$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9270        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9271$as_echo_n "checking for SH... " >&6; }
9272        if test ! -x "$tool_specified"; then
9273          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9274$as_echo "not found" >&6; }
9275          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9276        fi
9277        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9278$as_echo "$tool_specified" >&6; }
9279      fi
9280    fi
9281  fi
9282
9283
9284
9285  if test "x$SH" = x; then
9286    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9287  fi
9288
9289
9290
9291
9292
9293  # Publish this variable in the help.
9294
9295
9296  if test "x$SORT" = x; then
9297    # The variable is not set by user, try to locate tool using the code snippet
9298    for ac_prog in sort
9299do
9300  # Extract the first word of "$ac_prog", so it can be a program name with args.
9301set dummy $ac_prog; ac_word=$2
9302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9303$as_echo_n "checking for $ac_word... " >&6; }
9304if ${ac_cv_path_SORT+:} false; then :
9305  $as_echo_n "(cached) " >&6
9306else
9307  case $SORT in
9308  [\\/]* | ?:[\\/]*)
9309  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9310  ;;
9311  *)
9312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9313for as_dir in $PATH
9314do
9315  IFS=$as_save_IFS
9316  test -z "$as_dir" && as_dir=.
9317    for ac_exec_ext in '' $ac_executable_extensions; do
9318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9319    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9321    break 2
9322  fi
9323done
9324  done
9325IFS=$as_save_IFS
9326
9327  ;;
9328esac
9329fi
9330SORT=$ac_cv_path_SORT
9331if test -n "$SORT"; then
9332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9333$as_echo "$SORT" >&6; }
9334else
9335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9336$as_echo "no" >&6; }
9337fi
9338
9339
9340  test -n "$SORT" && break
9341done
9342
9343  else
9344    # The variable is set, but is it from the command line or the environment?
9345
9346    # Try to remove the string !SORT! from our list.
9347    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9348    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9349      # If it failed, the variable was not from the command line. Ignore it,
9350      # but warn the user (except for BASH, which is always set by the calling BASH).
9351      if test "xSORT" != xBASH; then
9352        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9353$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9354      fi
9355      # Try to locate tool using the code snippet
9356      for ac_prog in sort
9357do
9358  # Extract the first word of "$ac_prog", so it can be a program name with args.
9359set dummy $ac_prog; ac_word=$2
9360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9361$as_echo_n "checking for $ac_word... " >&6; }
9362if ${ac_cv_path_SORT+:} false; then :
9363  $as_echo_n "(cached) " >&6
9364else
9365  case $SORT in
9366  [\\/]* | ?:[\\/]*)
9367  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9368  ;;
9369  *)
9370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9371for as_dir in $PATH
9372do
9373  IFS=$as_save_IFS
9374  test -z "$as_dir" && as_dir=.
9375    for ac_exec_ext in '' $ac_executable_extensions; do
9376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9377    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9379    break 2
9380  fi
9381done
9382  done
9383IFS=$as_save_IFS
9384
9385  ;;
9386esac
9387fi
9388SORT=$ac_cv_path_SORT
9389if test -n "$SORT"; then
9390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9391$as_echo "$SORT" >&6; }
9392else
9393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9394$as_echo "no" >&6; }
9395fi
9396
9397
9398  test -n "$SORT" && break
9399done
9400
9401    else
9402      # If it succeeded, then it was overridden by the user. We will use it
9403      # for the tool.
9404
9405      # First remove it from the list of overridden variables, so we can test
9406      # for unknown variables in the end.
9407      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9408
9409      # Check if the provided tool contains a complete path.
9410      tool_specified="$SORT"
9411      tool_basename="${tool_specified##*/}"
9412      if test "x$tool_basename" = "x$tool_specified"; then
9413        # A command without a complete path is provided, search $PATH.
9414        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9415$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9416        # Extract the first word of "$tool_basename", so it can be a program name with args.
9417set dummy $tool_basename; ac_word=$2
9418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9419$as_echo_n "checking for $ac_word... " >&6; }
9420if ${ac_cv_path_SORT+:} false; then :
9421  $as_echo_n "(cached) " >&6
9422else
9423  case $SORT in
9424  [\\/]* | ?:[\\/]*)
9425  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9426  ;;
9427  *)
9428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9429for as_dir in $PATH
9430do
9431  IFS=$as_save_IFS
9432  test -z "$as_dir" && as_dir=.
9433    for ac_exec_ext in '' $ac_executable_extensions; do
9434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9435    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9437    break 2
9438  fi
9439done
9440  done
9441IFS=$as_save_IFS
9442
9443  ;;
9444esac
9445fi
9446SORT=$ac_cv_path_SORT
9447if test -n "$SORT"; then
9448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9449$as_echo "$SORT" >&6; }
9450else
9451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9452$as_echo "no" >&6; }
9453fi
9454
9455
9456        if test "x$SORT" = x; then
9457          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9458        fi
9459      else
9460        # Otherwise we believe it is a complete path. Use it as it is.
9461        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9462$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9463        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9464$as_echo_n "checking for SORT... " >&6; }
9465        if test ! -x "$tool_specified"; then
9466          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9467$as_echo "not found" >&6; }
9468          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9469        fi
9470        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9471$as_echo "$tool_specified" >&6; }
9472      fi
9473    fi
9474  fi
9475
9476
9477
9478  if test "x$SORT" = x; then
9479    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9480  fi
9481
9482
9483
9484
9485
9486  # Publish this variable in the help.
9487
9488
9489  if test "x$TAIL" = x; then
9490    # The variable is not set by user, try to locate tool using the code snippet
9491    for ac_prog in tail
9492do
9493  # Extract the first word of "$ac_prog", so it can be a program name with args.
9494set dummy $ac_prog; ac_word=$2
9495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9496$as_echo_n "checking for $ac_word... " >&6; }
9497if ${ac_cv_path_TAIL+:} false; then :
9498  $as_echo_n "(cached) " >&6
9499else
9500  case $TAIL in
9501  [\\/]* | ?:[\\/]*)
9502  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9503  ;;
9504  *)
9505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9506for as_dir in $PATH
9507do
9508  IFS=$as_save_IFS
9509  test -z "$as_dir" && as_dir=.
9510    for ac_exec_ext in '' $ac_executable_extensions; do
9511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9512    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9514    break 2
9515  fi
9516done
9517  done
9518IFS=$as_save_IFS
9519
9520  ;;
9521esac
9522fi
9523TAIL=$ac_cv_path_TAIL
9524if test -n "$TAIL"; then
9525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9526$as_echo "$TAIL" >&6; }
9527else
9528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9529$as_echo "no" >&6; }
9530fi
9531
9532
9533  test -n "$TAIL" && break
9534done
9535
9536  else
9537    # The variable is set, but is it from the command line or the environment?
9538
9539    # Try to remove the string !TAIL! from our list.
9540    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9541    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9542      # If it failed, the variable was not from the command line. Ignore it,
9543      # but warn the user (except for BASH, which is always set by the calling BASH).
9544      if test "xTAIL" != xBASH; then
9545        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9546$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9547      fi
9548      # Try to locate tool using the code snippet
9549      for ac_prog in tail
9550do
9551  # Extract the first word of "$ac_prog", so it can be a program name with args.
9552set dummy $ac_prog; ac_word=$2
9553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9554$as_echo_n "checking for $ac_word... " >&6; }
9555if ${ac_cv_path_TAIL+:} false; then :
9556  $as_echo_n "(cached) " >&6
9557else
9558  case $TAIL in
9559  [\\/]* | ?:[\\/]*)
9560  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9561  ;;
9562  *)
9563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9564for as_dir in $PATH
9565do
9566  IFS=$as_save_IFS
9567  test -z "$as_dir" && as_dir=.
9568    for ac_exec_ext in '' $ac_executable_extensions; do
9569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9570    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9572    break 2
9573  fi
9574done
9575  done
9576IFS=$as_save_IFS
9577
9578  ;;
9579esac
9580fi
9581TAIL=$ac_cv_path_TAIL
9582if test -n "$TAIL"; then
9583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9584$as_echo "$TAIL" >&6; }
9585else
9586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9587$as_echo "no" >&6; }
9588fi
9589
9590
9591  test -n "$TAIL" && break
9592done
9593
9594    else
9595      # If it succeeded, then it was overridden by the user. We will use it
9596      # for the tool.
9597
9598      # First remove it from the list of overridden variables, so we can test
9599      # for unknown variables in the end.
9600      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9601
9602      # Check if the provided tool contains a complete path.
9603      tool_specified="$TAIL"
9604      tool_basename="${tool_specified##*/}"
9605      if test "x$tool_basename" = "x$tool_specified"; then
9606        # A command without a complete path is provided, search $PATH.
9607        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9608$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9609        # Extract the first word of "$tool_basename", so it can be a program name with args.
9610set dummy $tool_basename; ac_word=$2
9611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9612$as_echo_n "checking for $ac_word... " >&6; }
9613if ${ac_cv_path_TAIL+:} false; then :
9614  $as_echo_n "(cached) " >&6
9615else
9616  case $TAIL in
9617  [\\/]* | ?:[\\/]*)
9618  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9619  ;;
9620  *)
9621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9622for as_dir in $PATH
9623do
9624  IFS=$as_save_IFS
9625  test -z "$as_dir" && as_dir=.
9626    for ac_exec_ext in '' $ac_executable_extensions; do
9627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9628    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9630    break 2
9631  fi
9632done
9633  done
9634IFS=$as_save_IFS
9635
9636  ;;
9637esac
9638fi
9639TAIL=$ac_cv_path_TAIL
9640if test -n "$TAIL"; then
9641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9642$as_echo "$TAIL" >&6; }
9643else
9644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9645$as_echo "no" >&6; }
9646fi
9647
9648
9649        if test "x$TAIL" = x; then
9650          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9651        fi
9652      else
9653        # Otherwise we believe it is a complete path. Use it as it is.
9654        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9655$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9656        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9657$as_echo_n "checking for TAIL... " >&6; }
9658        if test ! -x "$tool_specified"; then
9659          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9660$as_echo "not found" >&6; }
9661          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9662        fi
9663        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9664$as_echo "$tool_specified" >&6; }
9665      fi
9666    fi
9667  fi
9668
9669
9670
9671  if test "x$TAIL" = x; then
9672    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9673  fi
9674
9675
9676
9677
9678
9679  # Publish this variable in the help.
9680
9681
9682  if test "x$TAR" = x; then
9683    # The variable is not set by user, try to locate tool using the code snippet
9684    for ac_prog in tar
9685do
9686  # Extract the first word of "$ac_prog", so it can be a program name with args.
9687set dummy $ac_prog; ac_word=$2
9688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9689$as_echo_n "checking for $ac_word... " >&6; }
9690if ${ac_cv_path_TAR+:} false; then :
9691  $as_echo_n "(cached) " >&6
9692else
9693  case $TAR in
9694  [\\/]* | ?:[\\/]*)
9695  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9696  ;;
9697  *)
9698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9699for as_dir in $PATH
9700do
9701  IFS=$as_save_IFS
9702  test -z "$as_dir" && as_dir=.
9703    for ac_exec_ext in '' $ac_executable_extensions; do
9704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9705    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9707    break 2
9708  fi
9709done
9710  done
9711IFS=$as_save_IFS
9712
9713  ;;
9714esac
9715fi
9716TAR=$ac_cv_path_TAR
9717if test -n "$TAR"; then
9718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9719$as_echo "$TAR" >&6; }
9720else
9721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9722$as_echo "no" >&6; }
9723fi
9724
9725
9726  test -n "$TAR" && break
9727done
9728
9729  else
9730    # The variable is set, but is it from the command line or the environment?
9731
9732    # Try to remove the string !TAR! from our list.
9733    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9734    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9735      # If it failed, the variable was not from the command line. Ignore it,
9736      # but warn the user (except for BASH, which is always set by the calling BASH).
9737      if test "xTAR" != xBASH; then
9738        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9739$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9740      fi
9741      # Try to locate tool using the code snippet
9742      for ac_prog in tar
9743do
9744  # Extract the first word of "$ac_prog", so it can be a program name with args.
9745set dummy $ac_prog; ac_word=$2
9746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9747$as_echo_n "checking for $ac_word... " >&6; }
9748if ${ac_cv_path_TAR+:} false; then :
9749  $as_echo_n "(cached) " >&6
9750else
9751  case $TAR in
9752  [\\/]* | ?:[\\/]*)
9753  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9754  ;;
9755  *)
9756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9757for as_dir in $PATH
9758do
9759  IFS=$as_save_IFS
9760  test -z "$as_dir" && as_dir=.
9761    for ac_exec_ext in '' $ac_executable_extensions; do
9762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9763    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9765    break 2
9766  fi
9767done
9768  done
9769IFS=$as_save_IFS
9770
9771  ;;
9772esac
9773fi
9774TAR=$ac_cv_path_TAR
9775if test -n "$TAR"; then
9776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9777$as_echo "$TAR" >&6; }
9778else
9779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9780$as_echo "no" >&6; }
9781fi
9782
9783
9784  test -n "$TAR" && break
9785done
9786
9787    else
9788      # If it succeeded, then it was overridden by the user. We will use it
9789      # for the tool.
9790
9791      # First remove it from the list of overridden variables, so we can test
9792      # for unknown variables in the end.
9793      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9794
9795      # Check if the provided tool contains a complete path.
9796      tool_specified="$TAR"
9797      tool_basename="${tool_specified##*/}"
9798      if test "x$tool_basename" = "x$tool_specified"; then
9799        # A command without a complete path is provided, search $PATH.
9800        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9801$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9802        # Extract the first word of "$tool_basename", so it can be a program name with args.
9803set dummy $tool_basename; ac_word=$2
9804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9805$as_echo_n "checking for $ac_word... " >&6; }
9806if ${ac_cv_path_TAR+:} false; then :
9807  $as_echo_n "(cached) " >&6
9808else
9809  case $TAR in
9810  [\\/]* | ?:[\\/]*)
9811  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9812  ;;
9813  *)
9814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9815for as_dir in $PATH
9816do
9817  IFS=$as_save_IFS
9818  test -z "$as_dir" && as_dir=.
9819    for ac_exec_ext in '' $ac_executable_extensions; do
9820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9821    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9823    break 2
9824  fi
9825done
9826  done
9827IFS=$as_save_IFS
9828
9829  ;;
9830esac
9831fi
9832TAR=$ac_cv_path_TAR
9833if test -n "$TAR"; then
9834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9835$as_echo "$TAR" >&6; }
9836else
9837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9838$as_echo "no" >&6; }
9839fi
9840
9841
9842        if test "x$TAR" = x; then
9843          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9844        fi
9845      else
9846        # Otherwise we believe it is a complete path. Use it as it is.
9847        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9848$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9849        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9850$as_echo_n "checking for TAR... " >&6; }
9851        if test ! -x "$tool_specified"; then
9852          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9853$as_echo "not found" >&6; }
9854          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9855        fi
9856        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9857$as_echo "$tool_specified" >&6; }
9858      fi
9859    fi
9860  fi
9861
9862
9863
9864  if test "x$TAR" = x; then
9865    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9866  fi
9867
9868
9869
9870
9871
9872  # Publish this variable in the help.
9873
9874
9875  if test "x$TEE" = x; then
9876    # The variable is not set by user, try to locate tool using the code snippet
9877    for ac_prog in tee
9878do
9879  # Extract the first word of "$ac_prog", so it can be a program name with args.
9880set dummy $ac_prog; ac_word=$2
9881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9882$as_echo_n "checking for $ac_word... " >&6; }
9883if ${ac_cv_path_TEE+:} false; then :
9884  $as_echo_n "(cached) " >&6
9885else
9886  case $TEE in
9887  [\\/]* | ?:[\\/]*)
9888  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9889  ;;
9890  *)
9891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9892for as_dir in $PATH
9893do
9894  IFS=$as_save_IFS
9895  test -z "$as_dir" && as_dir=.
9896    for ac_exec_ext in '' $ac_executable_extensions; do
9897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9898    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9900    break 2
9901  fi
9902done
9903  done
9904IFS=$as_save_IFS
9905
9906  ;;
9907esac
9908fi
9909TEE=$ac_cv_path_TEE
9910if test -n "$TEE"; then
9911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9912$as_echo "$TEE" >&6; }
9913else
9914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9915$as_echo "no" >&6; }
9916fi
9917
9918
9919  test -n "$TEE" && break
9920done
9921
9922  else
9923    # The variable is set, but is it from the command line or the environment?
9924
9925    # Try to remove the string !TEE! from our list.
9926    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9927    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9928      # If it failed, the variable was not from the command line. Ignore it,
9929      # but warn the user (except for BASH, which is always set by the calling BASH).
9930      if test "xTEE" != xBASH; then
9931        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9932$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9933      fi
9934      # Try to locate tool using the code snippet
9935      for ac_prog in tee
9936do
9937  # Extract the first word of "$ac_prog", so it can be a program name with args.
9938set dummy $ac_prog; ac_word=$2
9939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9940$as_echo_n "checking for $ac_word... " >&6; }
9941if ${ac_cv_path_TEE+:} false; then :
9942  $as_echo_n "(cached) " >&6
9943else
9944  case $TEE in
9945  [\\/]* | ?:[\\/]*)
9946  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9947  ;;
9948  *)
9949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9950for as_dir in $PATH
9951do
9952  IFS=$as_save_IFS
9953  test -z "$as_dir" && as_dir=.
9954    for ac_exec_ext in '' $ac_executable_extensions; do
9955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9956    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9958    break 2
9959  fi
9960done
9961  done
9962IFS=$as_save_IFS
9963
9964  ;;
9965esac
9966fi
9967TEE=$ac_cv_path_TEE
9968if test -n "$TEE"; then
9969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9970$as_echo "$TEE" >&6; }
9971else
9972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9973$as_echo "no" >&6; }
9974fi
9975
9976
9977  test -n "$TEE" && break
9978done
9979
9980    else
9981      # If it succeeded, then it was overridden by the user. We will use it
9982      # for the tool.
9983
9984      # First remove it from the list of overridden variables, so we can test
9985      # for unknown variables in the end.
9986      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9987
9988      # Check if the provided tool contains a complete path.
9989      tool_specified="$TEE"
9990      tool_basename="${tool_specified##*/}"
9991      if test "x$tool_basename" = "x$tool_specified"; then
9992        # A command without a complete path is provided, search $PATH.
9993        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9994$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9995        # Extract the first word of "$tool_basename", so it can be a program name with args.
9996set dummy $tool_basename; ac_word=$2
9997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9998$as_echo_n "checking for $ac_word... " >&6; }
9999if ${ac_cv_path_TEE+:} false; then :
10000  $as_echo_n "(cached) " >&6
10001else
10002  case $TEE in
10003  [\\/]* | ?:[\\/]*)
10004  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10005  ;;
10006  *)
10007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10008for as_dir in $PATH
10009do
10010  IFS=$as_save_IFS
10011  test -z "$as_dir" && as_dir=.
10012    for ac_exec_ext in '' $ac_executable_extensions; do
10013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10014    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10016    break 2
10017  fi
10018done
10019  done
10020IFS=$as_save_IFS
10021
10022  ;;
10023esac
10024fi
10025TEE=$ac_cv_path_TEE
10026if test -n "$TEE"; then
10027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10028$as_echo "$TEE" >&6; }
10029else
10030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10031$as_echo "no" >&6; }
10032fi
10033
10034
10035        if test "x$TEE" = x; then
10036          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10037        fi
10038      else
10039        # Otherwise we believe it is a complete path. Use it as it is.
10040        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10041$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10042        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10043$as_echo_n "checking for TEE... " >&6; }
10044        if test ! -x "$tool_specified"; then
10045          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10046$as_echo "not found" >&6; }
10047          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10048        fi
10049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10050$as_echo "$tool_specified" >&6; }
10051      fi
10052    fi
10053  fi
10054
10055
10056
10057  if test "x$TEE" = x; then
10058    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10059  fi
10060
10061
10062
10063
10064
10065  # Publish this variable in the help.
10066
10067
10068  if test "x$TOUCH" = x; then
10069    # The variable is not set by user, try to locate tool using the code snippet
10070    for ac_prog in touch
10071do
10072  # Extract the first word of "$ac_prog", so it can be a program name with args.
10073set dummy $ac_prog; ac_word=$2
10074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10075$as_echo_n "checking for $ac_word... " >&6; }
10076if ${ac_cv_path_TOUCH+:} false; then :
10077  $as_echo_n "(cached) " >&6
10078else
10079  case $TOUCH in
10080  [\\/]* | ?:[\\/]*)
10081  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10082  ;;
10083  *)
10084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10085for as_dir in $PATH
10086do
10087  IFS=$as_save_IFS
10088  test -z "$as_dir" && as_dir=.
10089    for ac_exec_ext in '' $ac_executable_extensions; do
10090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10091    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10093    break 2
10094  fi
10095done
10096  done
10097IFS=$as_save_IFS
10098
10099  ;;
10100esac
10101fi
10102TOUCH=$ac_cv_path_TOUCH
10103if test -n "$TOUCH"; then
10104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10105$as_echo "$TOUCH" >&6; }
10106else
10107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10108$as_echo "no" >&6; }
10109fi
10110
10111
10112  test -n "$TOUCH" && break
10113done
10114
10115  else
10116    # The variable is set, but is it from the command line or the environment?
10117
10118    # Try to remove the string !TOUCH! from our list.
10119    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10120    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10121      # If it failed, the variable was not from the command line. Ignore it,
10122      # but warn the user (except for BASH, which is always set by the calling BASH).
10123      if test "xTOUCH" != xBASH; then
10124        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10125$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10126      fi
10127      # Try to locate tool using the code snippet
10128      for ac_prog in touch
10129do
10130  # Extract the first word of "$ac_prog", so it can be a program name with args.
10131set dummy $ac_prog; ac_word=$2
10132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10133$as_echo_n "checking for $ac_word... " >&6; }
10134if ${ac_cv_path_TOUCH+:} false; then :
10135  $as_echo_n "(cached) " >&6
10136else
10137  case $TOUCH in
10138  [\\/]* | ?:[\\/]*)
10139  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10140  ;;
10141  *)
10142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10143for as_dir in $PATH
10144do
10145  IFS=$as_save_IFS
10146  test -z "$as_dir" && as_dir=.
10147    for ac_exec_ext in '' $ac_executable_extensions; do
10148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10149    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10151    break 2
10152  fi
10153done
10154  done
10155IFS=$as_save_IFS
10156
10157  ;;
10158esac
10159fi
10160TOUCH=$ac_cv_path_TOUCH
10161if test -n "$TOUCH"; then
10162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10163$as_echo "$TOUCH" >&6; }
10164else
10165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10166$as_echo "no" >&6; }
10167fi
10168
10169
10170  test -n "$TOUCH" && break
10171done
10172
10173    else
10174      # If it succeeded, then it was overridden by the user. We will use it
10175      # for the tool.
10176
10177      # First remove it from the list of overridden variables, so we can test
10178      # for unknown variables in the end.
10179      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10180
10181      # Check if the provided tool contains a complete path.
10182      tool_specified="$TOUCH"
10183      tool_basename="${tool_specified##*/}"
10184      if test "x$tool_basename" = "x$tool_specified"; then
10185        # A command without a complete path is provided, search $PATH.
10186        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10187$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10188        # Extract the first word of "$tool_basename", so it can be a program name with args.
10189set dummy $tool_basename; ac_word=$2
10190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10191$as_echo_n "checking for $ac_word... " >&6; }
10192if ${ac_cv_path_TOUCH+:} false; then :
10193  $as_echo_n "(cached) " >&6
10194else
10195  case $TOUCH in
10196  [\\/]* | ?:[\\/]*)
10197  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10198  ;;
10199  *)
10200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10201for as_dir in $PATH
10202do
10203  IFS=$as_save_IFS
10204  test -z "$as_dir" && as_dir=.
10205    for ac_exec_ext in '' $ac_executable_extensions; do
10206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10207    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10209    break 2
10210  fi
10211done
10212  done
10213IFS=$as_save_IFS
10214
10215  ;;
10216esac
10217fi
10218TOUCH=$ac_cv_path_TOUCH
10219if test -n "$TOUCH"; then
10220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10221$as_echo "$TOUCH" >&6; }
10222else
10223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10224$as_echo "no" >&6; }
10225fi
10226
10227
10228        if test "x$TOUCH" = x; then
10229          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10230        fi
10231      else
10232        # Otherwise we believe it is a complete path. Use it as it is.
10233        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10234$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10235        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10236$as_echo_n "checking for TOUCH... " >&6; }
10237        if test ! -x "$tool_specified"; then
10238          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10239$as_echo "not found" >&6; }
10240          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10241        fi
10242        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10243$as_echo "$tool_specified" >&6; }
10244      fi
10245    fi
10246  fi
10247
10248
10249
10250  if test "x$TOUCH" = x; then
10251    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10252  fi
10253
10254
10255
10256
10257
10258  # Publish this variable in the help.
10259
10260
10261  if test "x$TR" = x; then
10262    # The variable is not set by user, try to locate tool using the code snippet
10263    for ac_prog in tr
10264do
10265  # Extract the first word of "$ac_prog", so it can be a program name with args.
10266set dummy $ac_prog; ac_word=$2
10267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10268$as_echo_n "checking for $ac_word... " >&6; }
10269if ${ac_cv_path_TR+:} false; then :
10270  $as_echo_n "(cached) " >&6
10271else
10272  case $TR in
10273  [\\/]* | ?:[\\/]*)
10274  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10275  ;;
10276  *)
10277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10278for as_dir in $PATH
10279do
10280  IFS=$as_save_IFS
10281  test -z "$as_dir" && as_dir=.
10282    for ac_exec_ext in '' $ac_executable_extensions; do
10283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10284    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10286    break 2
10287  fi
10288done
10289  done
10290IFS=$as_save_IFS
10291
10292  ;;
10293esac
10294fi
10295TR=$ac_cv_path_TR
10296if test -n "$TR"; then
10297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10298$as_echo "$TR" >&6; }
10299else
10300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10301$as_echo "no" >&6; }
10302fi
10303
10304
10305  test -n "$TR" && break
10306done
10307
10308  else
10309    # The variable is set, but is it from the command line or the environment?
10310
10311    # Try to remove the string !TR! from our list.
10312    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10313    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10314      # If it failed, the variable was not from the command line. Ignore it,
10315      # but warn the user (except for BASH, which is always set by the calling BASH).
10316      if test "xTR" != xBASH; then
10317        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10318$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10319      fi
10320      # Try to locate tool using the code snippet
10321      for ac_prog in tr
10322do
10323  # Extract the first word of "$ac_prog", so it can be a program name with args.
10324set dummy $ac_prog; ac_word=$2
10325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10326$as_echo_n "checking for $ac_word... " >&6; }
10327if ${ac_cv_path_TR+:} false; then :
10328  $as_echo_n "(cached) " >&6
10329else
10330  case $TR in
10331  [\\/]* | ?:[\\/]*)
10332  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10333  ;;
10334  *)
10335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10336for as_dir in $PATH
10337do
10338  IFS=$as_save_IFS
10339  test -z "$as_dir" && as_dir=.
10340    for ac_exec_ext in '' $ac_executable_extensions; do
10341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10342    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10344    break 2
10345  fi
10346done
10347  done
10348IFS=$as_save_IFS
10349
10350  ;;
10351esac
10352fi
10353TR=$ac_cv_path_TR
10354if test -n "$TR"; then
10355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10356$as_echo "$TR" >&6; }
10357else
10358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10359$as_echo "no" >&6; }
10360fi
10361
10362
10363  test -n "$TR" && break
10364done
10365
10366    else
10367      # If it succeeded, then it was overridden by the user. We will use it
10368      # for the tool.
10369
10370      # First remove it from the list of overridden variables, so we can test
10371      # for unknown variables in the end.
10372      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10373
10374      # Check if the provided tool contains a complete path.
10375      tool_specified="$TR"
10376      tool_basename="${tool_specified##*/}"
10377      if test "x$tool_basename" = "x$tool_specified"; then
10378        # A command without a complete path is provided, search $PATH.
10379        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10380$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10381        # Extract the first word of "$tool_basename", so it can be a program name with args.
10382set dummy $tool_basename; ac_word=$2
10383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10384$as_echo_n "checking for $ac_word... " >&6; }
10385if ${ac_cv_path_TR+:} false; then :
10386  $as_echo_n "(cached) " >&6
10387else
10388  case $TR in
10389  [\\/]* | ?:[\\/]*)
10390  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10391  ;;
10392  *)
10393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10394for as_dir in $PATH
10395do
10396  IFS=$as_save_IFS
10397  test -z "$as_dir" && as_dir=.
10398    for ac_exec_ext in '' $ac_executable_extensions; do
10399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10400    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10402    break 2
10403  fi
10404done
10405  done
10406IFS=$as_save_IFS
10407
10408  ;;
10409esac
10410fi
10411TR=$ac_cv_path_TR
10412if test -n "$TR"; then
10413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10414$as_echo "$TR" >&6; }
10415else
10416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10417$as_echo "no" >&6; }
10418fi
10419
10420
10421        if test "x$TR" = x; then
10422          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10423        fi
10424      else
10425        # Otherwise we believe it is a complete path. Use it as it is.
10426        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10427$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10428        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10429$as_echo_n "checking for TR... " >&6; }
10430        if test ! -x "$tool_specified"; then
10431          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10432$as_echo "not found" >&6; }
10433          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10434        fi
10435        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10436$as_echo "$tool_specified" >&6; }
10437      fi
10438    fi
10439  fi
10440
10441
10442
10443  if test "x$TR" = x; then
10444    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10445  fi
10446
10447
10448
10449
10450
10451  # Publish this variable in the help.
10452
10453
10454  if test "x$UNAME" = x; then
10455    # The variable is not set by user, try to locate tool using the code snippet
10456    for ac_prog in uname
10457do
10458  # Extract the first word of "$ac_prog", so it can be a program name with args.
10459set dummy $ac_prog; ac_word=$2
10460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10461$as_echo_n "checking for $ac_word... " >&6; }
10462if ${ac_cv_path_UNAME+:} false; then :
10463  $as_echo_n "(cached) " >&6
10464else
10465  case $UNAME in
10466  [\\/]* | ?:[\\/]*)
10467  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10468  ;;
10469  *)
10470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10471for as_dir in $PATH
10472do
10473  IFS=$as_save_IFS
10474  test -z "$as_dir" && as_dir=.
10475    for ac_exec_ext in '' $ac_executable_extensions; do
10476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10477    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10479    break 2
10480  fi
10481done
10482  done
10483IFS=$as_save_IFS
10484
10485  ;;
10486esac
10487fi
10488UNAME=$ac_cv_path_UNAME
10489if test -n "$UNAME"; then
10490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10491$as_echo "$UNAME" >&6; }
10492else
10493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10494$as_echo "no" >&6; }
10495fi
10496
10497
10498  test -n "$UNAME" && break
10499done
10500
10501  else
10502    # The variable is set, but is it from the command line or the environment?
10503
10504    # Try to remove the string !UNAME! from our list.
10505    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10506    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10507      # If it failed, the variable was not from the command line. Ignore it,
10508      # but warn the user (except for BASH, which is always set by the calling BASH).
10509      if test "xUNAME" != xBASH; then
10510        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10511$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10512      fi
10513      # Try to locate tool using the code snippet
10514      for ac_prog in uname
10515do
10516  # Extract the first word of "$ac_prog", so it can be a program name with args.
10517set dummy $ac_prog; ac_word=$2
10518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10519$as_echo_n "checking for $ac_word... " >&6; }
10520if ${ac_cv_path_UNAME+:} false; then :
10521  $as_echo_n "(cached) " >&6
10522else
10523  case $UNAME in
10524  [\\/]* | ?:[\\/]*)
10525  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10526  ;;
10527  *)
10528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10529for as_dir in $PATH
10530do
10531  IFS=$as_save_IFS
10532  test -z "$as_dir" && as_dir=.
10533    for ac_exec_ext in '' $ac_executable_extensions; do
10534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10535    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10537    break 2
10538  fi
10539done
10540  done
10541IFS=$as_save_IFS
10542
10543  ;;
10544esac
10545fi
10546UNAME=$ac_cv_path_UNAME
10547if test -n "$UNAME"; then
10548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10549$as_echo "$UNAME" >&6; }
10550else
10551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10552$as_echo "no" >&6; }
10553fi
10554
10555
10556  test -n "$UNAME" && break
10557done
10558
10559    else
10560      # If it succeeded, then it was overridden by the user. We will use it
10561      # for the tool.
10562
10563      # First remove it from the list of overridden variables, so we can test
10564      # for unknown variables in the end.
10565      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10566
10567      # Check if the provided tool contains a complete path.
10568      tool_specified="$UNAME"
10569      tool_basename="${tool_specified##*/}"
10570      if test "x$tool_basename" = "x$tool_specified"; then
10571        # A command without a complete path is provided, search $PATH.
10572        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10573$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10574        # Extract the first word of "$tool_basename", so it can be a program name with args.
10575set dummy $tool_basename; ac_word=$2
10576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10577$as_echo_n "checking for $ac_word... " >&6; }
10578if ${ac_cv_path_UNAME+:} false; then :
10579  $as_echo_n "(cached) " >&6
10580else
10581  case $UNAME in
10582  [\\/]* | ?:[\\/]*)
10583  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10584  ;;
10585  *)
10586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10587for as_dir in $PATH
10588do
10589  IFS=$as_save_IFS
10590  test -z "$as_dir" && as_dir=.
10591    for ac_exec_ext in '' $ac_executable_extensions; do
10592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10593    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10595    break 2
10596  fi
10597done
10598  done
10599IFS=$as_save_IFS
10600
10601  ;;
10602esac
10603fi
10604UNAME=$ac_cv_path_UNAME
10605if test -n "$UNAME"; then
10606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10607$as_echo "$UNAME" >&6; }
10608else
10609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10610$as_echo "no" >&6; }
10611fi
10612
10613
10614        if test "x$UNAME" = x; then
10615          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10616        fi
10617      else
10618        # Otherwise we believe it is a complete path. Use it as it is.
10619        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10620$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10621        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10622$as_echo_n "checking for UNAME... " >&6; }
10623        if test ! -x "$tool_specified"; then
10624          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10625$as_echo "not found" >&6; }
10626          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10627        fi
10628        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10629$as_echo "$tool_specified" >&6; }
10630      fi
10631    fi
10632  fi
10633
10634
10635
10636  if test "x$UNAME" = x; then
10637    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10638  fi
10639
10640
10641
10642
10643
10644  # Publish this variable in the help.
10645
10646
10647  if test "x$UNIQ" = x; then
10648    # The variable is not set by user, try to locate tool using the code snippet
10649    for ac_prog in uniq
10650do
10651  # Extract the first word of "$ac_prog", so it can be a program name with args.
10652set dummy $ac_prog; ac_word=$2
10653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10654$as_echo_n "checking for $ac_word... " >&6; }
10655if ${ac_cv_path_UNIQ+:} false; then :
10656  $as_echo_n "(cached) " >&6
10657else
10658  case $UNIQ in
10659  [\\/]* | ?:[\\/]*)
10660  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10661  ;;
10662  *)
10663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10664for as_dir in $PATH
10665do
10666  IFS=$as_save_IFS
10667  test -z "$as_dir" && as_dir=.
10668    for ac_exec_ext in '' $ac_executable_extensions; do
10669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10670    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10672    break 2
10673  fi
10674done
10675  done
10676IFS=$as_save_IFS
10677
10678  ;;
10679esac
10680fi
10681UNIQ=$ac_cv_path_UNIQ
10682if test -n "$UNIQ"; then
10683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10684$as_echo "$UNIQ" >&6; }
10685else
10686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10687$as_echo "no" >&6; }
10688fi
10689
10690
10691  test -n "$UNIQ" && break
10692done
10693
10694  else
10695    # The variable is set, but is it from the command line or the environment?
10696
10697    # Try to remove the string !UNIQ! from our list.
10698    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10699    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10700      # If it failed, the variable was not from the command line. Ignore it,
10701      # but warn the user (except for BASH, which is always set by the calling BASH).
10702      if test "xUNIQ" != xBASH; then
10703        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10704$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10705      fi
10706      # Try to locate tool using the code snippet
10707      for ac_prog in uniq
10708do
10709  # Extract the first word of "$ac_prog", so it can be a program name with args.
10710set dummy $ac_prog; ac_word=$2
10711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10712$as_echo_n "checking for $ac_word... " >&6; }
10713if ${ac_cv_path_UNIQ+:} false; then :
10714  $as_echo_n "(cached) " >&6
10715else
10716  case $UNIQ in
10717  [\\/]* | ?:[\\/]*)
10718  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10719  ;;
10720  *)
10721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10722for as_dir in $PATH
10723do
10724  IFS=$as_save_IFS
10725  test -z "$as_dir" && as_dir=.
10726    for ac_exec_ext in '' $ac_executable_extensions; do
10727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10728    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10730    break 2
10731  fi
10732done
10733  done
10734IFS=$as_save_IFS
10735
10736  ;;
10737esac
10738fi
10739UNIQ=$ac_cv_path_UNIQ
10740if test -n "$UNIQ"; then
10741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10742$as_echo "$UNIQ" >&6; }
10743else
10744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10745$as_echo "no" >&6; }
10746fi
10747
10748
10749  test -n "$UNIQ" && break
10750done
10751
10752    else
10753      # If it succeeded, then it was overridden by the user. We will use it
10754      # for the tool.
10755
10756      # First remove it from the list of overridden variables, so we can test
10757      # for unknown variables in the end.
10758      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10759
10760      # Check if the provided tool contains a complete path.
10761      tool_specified="$UNIQ"
10762      tool_basename="${tool_specified##*/}"
10763      if test "x$tool_basename" = "x$tool_specified"; then
10764        # A command without a complete path is provided, search $PATH.
10765        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10766$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10767        # Extract the first word of "$tool_basename", so it can be a program name with args.
10768set dummy $tool_basename; ac_word=$2
10769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10770$as_echo_n "checking for $ac_word... " >&6; }
10771if ${ac_cv_path_UNIQ+:} false; then :
10772  $as_echo_n "(cached) " >&6
10773else
10774  case $UNIQ in
10775  [\\/]* | ?:[\\/]*)
10776  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10777  ;;
10778  *)
10779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10780for as_dir in $PATH
10781do
10782  IFS=$as_save_IFS
10783  test -z "$as_dir" && as_dir=.
10784    for ac_exec_ext in '' $ac_executable_extensions; do
10785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10786    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10788    break 2
10789  fi
10790done
10791  done
10792IFS=$as_save_IFS
10793
10794  ;;
10795esac
10796fi
10797UNIQ=$ac_cv_path_UNIQ
10798if test -n "$UNIQ"; then
10799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10800$as_echo "$UNIQ" >&6; }
10801else
10802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10803$as_echo "no" >&6; }
10804fi
10805
10806
10807        if test "x$UNIQ" = x; then
10808          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10809        fi
10810      else
10811        # Otherwise we believe it is a complete path. Use it as it is.
10812        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10813$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10814        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10815$as_echo_n "checking for UNIQ... " >&6; }
10816        if test ! -x "$tool_specified"; then
10817          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10818$as_echo "not found" >&6; }
10819          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10820        fi
10821        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10822$as_echo "$tool_specified" >&6; }
10823      fi
10824    fi
10825  fi
10826
10827
10828
10829  if test "x$UNIQ" = x; then
10830    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10831  fi
10832
10833
10834
10835
10836
10837  # Publish this variable in the help.
10838
10839
10840  if test "x$WC" = x; then
10841    # The variable is not set by user, try to locate tool using the code snippet
10842    for ac_prog in wc
10843do
10844  # Extract the first word of "$ac_prog", so it can be a program name with args.
10845set dummy $ac_prog; ac_word=$2
10846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10847$as_echo_n "checking for $ac_word... " >&6; }
10848if ${ac_cv_path_WC+:} false; then :
10849  $as_echo_n "(cached) " >&6
10850else
10851  case $WC in
10852  [\\/]* | ?:[\\/]*)
10853  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10854  ;;
10855  *)
10856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10857for as_dir in $PATH
10858do
10859  IFS=$as_save_IFS
10860  test -z "$as_dir" && as_dir=.
10861    for ac_exec_ext in '' $ac_executable_extensions; do
10862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10863    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10865    break 2
10866  fi
10867done
10868  done
10869IFS=$as_save_IFS
10870
10871  ;;
10872esac
10873fi
10874WC=$ac_cv_path_WC
10875if test -n "$WC"; then
10876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10877$as_echo "$WC" >&6; }
10878else
10879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10880$as_echo "no" >&6; }
10881fi
10882
10883
10884  test -n "$WC" && break
10885done
10886
10887  else
10888    # The variable is set, but is it from the command line or the environment?
10889
10890    # Try to remove the string !WC! from our list.
10891    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10892    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10893      # If it failed, the variable was not from the command line. Ignore it,
10894      # but warn the user (except for BASH, which is always set by the calling BASH).
10895      if test "xWC" != xBASH; then
10896        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10897$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10898      fi
10899      # Try to locate tool using the code snippet
10900      for ac_prog in wc
10901do
10902  # Extract the first word of "$ac_prog", so it can be a program name with args.
10903set dummy $ac_prog; ac_word=$2
10904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10905$as_echo_n "checking for $ac_word... " >&6; }
10906if ${ac_cv_path_WC+:} false; then :
10907  $as_echo_n "(cached) " >&6
10908else
10909  case $WC in
10910  [\\/]* | ?:[\\/]*)
10911  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10912  ;;
10913  *)
10914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10915for as_dir in $PATH
10916do
10917  IFS=$as_save_IFS
10918  test -z "$as_dir" && as_dir=.
10919    for ac_exec_ext in '' $ac_executable_extensions; do
10920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10921    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10923    break 2
10924  fi
10925done
10926  done
10927IFS=$as_save_IFS
10928
10929  ;;
10930esac
10931fi
10932WC=$ac_cv_path_WC
10933if test -n "$WC"; then
10934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10935$as_echo "$WC" >&6; }
10936else
10937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10938$as_echo "no" >&6; }
10939fi
10940
10941
10942  test -n "$WC" && break
10943done
10944
10945    else
10946      # If it succeeded, then it was overridden by the user. We will use it
10947      # for the tool.
10948
10949      # First remove it from the list of overridden variables, so we can test
10950      # for unknown variables in the end.
10951      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10952
10953      # Check if the provided tool contains a complete path.
10954      tool_specified="$WC"
10955      tool_basename="${tool_specified##*/}"
10956      if test "x$tool_basename" = "x$tool_specified"; then
10957        # A command without a complete path is provided, search $PATH.
10958        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10959$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10960        # Extract the first word of "$tool_basename", so it can be a program name with args.
10961set dummy $tool_basename; ac_word=$2
10962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10963$as_echo_n "checking for $ac_word... " >&6; }
10964if ${ac_cv_path_WC+:} false; then :
10965  $as_echo_n "(cached) " >&6
10966else
10967  case $WC in
10968  [\\/]* | ?:[\\/]*)
10969  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10970  ;;
10971  *)
10972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10973for as_dir in $PATH
10974do
10975  IFS=$as_save_IFS
10976  test -z "$as_dir" && as_dir=.
10977    for ac_exec_ext in '' $ac_executable_extensions; do
10978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10979    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10981    break 2
10982  fi
10983done
10984  done
10985IFS=$as_save_IFS
10986
10987  ;;
10988esac
10989fi
10990WC=$ac_cv_path_WC
10991if test -n "$WC"; then
10992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10993$as_echo "$WC" >&6; }
10994else
10995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10996$as_echo "no" >&6; }
10997fi
10998
10999
11000        if test "x$WC" = x; then
11001          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11002        fi
11003      else
11004        # Otherwise we believe it is a complete path. Use it as it is.
11005        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11006$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11007        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11008$as_echo_n "checking for WC... " >&6; }
11009        if test ! -x "$tool_specified"; then
11010          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11011$as_echo "not found" >&6; }
11012          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11013        fi
11014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11015$as_echo "$tool_specified" >&6; }
11016      fi
11017    fi
11018  fi
11019
11020
11021
11022  if test "x$WC" = x; then
11023    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11024  fi
11025
11026
11027
11028
11029
11030  # Publish this variable in the help.
11031
11032
11033  if test "x$WHICH" = x; then
11034    # The variable is not set by user, try to locate tool using the code snippet
11035    for ac_prog in which
11036do
11037  # Extract the first word of "$ac_prog", so it can be a program name with args.
11038set dummy $ac_prog; ac_word=$2
11039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11040$as_echo_n "checking for $ac_word... " >&6; }
11041if ${ac_cv_path_WHICH+:} false; then :
11042  $as_echo_n "(cached) " >&6
11043else
11044  case $WHICH in
11045  [\\/]* | ?:[\\/]*)
11046  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11047  ;;
11048  *)
11049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11050for as_dir in $PATH
11051do
11052  IFS=$as_save_IFS
11053  test -z "$as_dir" && as_dir=.
11054    for ac_exec_ext in '' $ac_executable_extensions; do
11055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11056    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11058    break 2
11059  fi
11060done
11061  done
11062IFS=$as_save_IFS
11063
11064  ;;
11065esac
11066fi
11067WHICH=$ac_cv_path_WHICH
11068if test -n "$WHICH"; then
11069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11070$as_echo "$WHICH" >&6; }
11071else
11072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11073$as_echo "no" >&6; }
11074fi
11075
11076
11077  test -n "$WHICH" && break
11078done
11079
11080  else
11081    # The variable is set, but is it from the command line or the environment?
11082
11083    # Try to remove the string !WHICH! from our list.
11084    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11085    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11086      # If it failed, the variable was not from the command line. Ignore it,
11087      # but warn the user (except for BASH, which is always set by the calling BASH).
11088      if test "xWHICH" != xBASH; then
11089        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11090$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11091      fi
11092      # Try to locate tool using the code snippet
11093      for ac_prog in which
11094do
11095  # Extract the first word of "$ac_prog", so it can be a program name with args.
11096set dummy $ac_prog; ac_word=$2
11097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11098$as_echo_n "checking for $ac_word... " >&6; }
11099if ${ac_cv_path_WHICH+:} false; then :
11100  $as_echo_n "(cached) " >&6
11101else
11102  case $WHICH in
11103  [\\/]* | ?:[\\/]*)
11104  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11105  ;;
11106  *)
11107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11108for as_dir in $PATH
11109do
11110  IFS=$as_save_IFS
11111  test -z "$as_dir" && as_dir=.
11112    for ac_exec_ext in '' $ac_executable_extensions; do
11113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11114    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11116    break 2
11117  fi
11118done
11119  done
11120IFS=$as_save_IFS
11121
11122  ;;
11123esac
11124fi
11125WHICH=$ac_cv_path_WHICH
11126if test -n "$WHICH"; then
11127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11128$as_echo "$WHICH" >&6; }
11129else
11130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11131$as_echo "no" >&6; }
11132fi
11133
11134
11135  test -n "$WHICH" && break
11136done
11137
11138    else
11139      # If it succeeded, then it was overridden by the user. We will use it
11140      # for the tool.
11141
11142      # First remove it from the list of overridden variables, so we can test
11143      # for unknown variables in the end.
11144      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11145
11146      # Check if the provided tool contains a complete path.
11147      tool_specified="$WHICH"
11148      tool_basename="${tool_specified##*/}"
11149      if test "x$tool_basename" = "x$tool_specified"; then
11150        # A command without a complete path is provided, search $PATH.
11151        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11152$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11153        # Extract the first word of "$tool_basename", so it can be a program name with args.
11154set dummy $tool_basename; ac_word=$2
11155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11156$as_echo_n "checking for $ac_word... " >&6; }
11157if ${ac_cv_path_WHICH+:} false; then :
11158  $as_echo_n "(cached) " >&6
11159else
11160  case $WHICH in
11161  [\\/]* | ?:[\\/]*)
11162  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11163  ;;
11164  *)
11165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11166for as_dir in $PATH
11167do
11168  IFS=$as_save_IFS
11169  test -z "$as_dir" && as_dir=.
11170    for ac_exec_ext in '' $ac_executable_extensions; do
11171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11172    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11174    break 2
11175  fi
11176done
11177  done
11178IFS=$as_save_IFS
11179
11180  ;;
11181esac
11182fi
11183WHICH=$ac_cv_path_WHICH
11184if test -n "$WHICH"; then
11185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11186$as_echo "$WHICH" >&6; }
11187else
11188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11189$as_echo "no" >&6; }
11190fi
11191
11192
11193        if test "x$WHICH" = x; then
11194          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11195        fi
11196      else
11197        # Otherwise we believe it is a complete path. Use it as it is.
11198        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11199$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11200        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11201$as_echo_n "checking for WHICH... " >&6; }
11202        if test ! -x "$tool_specified"; then
11203          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11204$as_echo "not found" >&6; }
11205          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11206        fi
11207        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11208$as_echo "$tool_specified" >&6; }
11209      fi
11210    fi
11211  fi
11212
11213
11214
11215  if test "x$WHICH" = x; then
11216    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11217  fi
11218
11219
11220
11221
11222
11223  # Publish this variable in the help.
11224
11225
11226  if test "x$XARGS" = x; then
11227    # The variable is not set by user, try to locate tool using the code snippet
11228    for ac_prog in xargs
11229do
11230  # Extract the first word of "$ac_prog", so it can be a program name with args.
11231set dummy $ac_prog; ac_word=$2
11232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11233$as_echo_n "checking for $ac_word... " >&6; }
11234if ${ac_cv_path_XARGS+:} false; then :
11235  $as_echo_n "(cached) " >&6
11236else
11237  case $XARGS in
11238  [\\/]* | ?:[\\/]*)
11239  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11240  ;;
11241  *)
11242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11243for as_dir in $PATH
11244do
11245  IFS=$as_save_IFS
11246  test -z "$as_dir" && as_dir=.
11247    for ac_exec_ext in '' $ac_executable_extensions; do
11248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11249    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11251    break 2
11252  fi
11253done
11254  done
11255IFS=$as_save_IFS
11256
11257  ;;
11258esac
11259fi
11260XARGS=$ac_cv_path_XARGS
11261if test -n "$XARGS"; then
11262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11263$as_echo "$XARGS" >&6; }
11264else
11265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11266$as_echo "no" >&6; }
11267fi
11268
11269
11270  test -n "$XARGS" && break
11271done
11272
11273  else
11274    # The variable is set, but is it from the command line or the environment?
11275
11276    # Try to remove the string !XARGS! from our list.
11277    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11278    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11279      # If it failed, the variable was not from the command line. Ignore it,
11280      # but warn the user (except for BASH, which is always set by the calling BASH).
11281      if test "xXARGS" != xBASH; then
11282        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11283$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11284      fi
11285      # Try to locate tool using the code snippet
11286      for ac_prog in xargs
11287do
11288  # Extract the first word of "$ac_prog", so it can be a program name with args.
11289set dummy $ac_prog; ac_word=$2
11290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11291$as_echo_n "checking for $ac_word... " >&6; }
11292if ${ac_cv_path_XARGS+:} false; then :
11293  $as_echo_n "(cached) " >&6
11294else
11295  case $XARGS in
11296  [\\/]* | ?:[\\/]*)
11297  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11298  ;;
11299  *)
11300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11301for as_dir in $PATH
11302do
11303  IFS=$as_save_IFS
11304  test -z "$as_dir" && as_dir=.
11305    for ac_exec_ext in '' $ac_executable_extensions; do
11306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11307    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11309    break 2
11310  fi
11311done
11312  done
11313IFS=$as_save_IFS
11314
11315  ;;
11316esac
11317fi
11318XARGS=$ac_cv_path_XARGS
11319if test -n "$XARGS"; then
11320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11321$as_echo "$XARGS" >&6; }
11322else
11323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11324$as_echo "no" >&6; }
11325fi
11326
11327
11328  test -n "$XARGS" && break
11329done
11330
11331    else
11332      # If it succeeded, then it was overridden by the user. We will use it
11333      # for the tool.
11334
11335      # First remove it from the list of overridden variables, so we can test
11336      # for unknown variables in the end.
11337      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11338
11339      # Check if the provided tool contains a complete path.
11340      tool_specified="$XARGS"
11341      tool_basename="${tool_specified##*/}"
11342      if test "x$tool_basename" = "x$tool_specified"; then
11343        # A command without a complete path is provided, search $PATH.
11344        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11345$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11346        # Extract the first word of "$tool_basename", so it can be a program name with args.
11347set dummy $tool_basename; ac_word=$2
11348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11349$as_echo_n "checking for $ac_word... " >&6; }
11350if ${ac_cv_path_XARGS+:} false; then :
11351  $as_echo_n "(cached) " >&6
11352else
11353  case $XARGS in
11354  [\\/]* | ?:[\\/]*)
11355  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11356  ;;
11357  *)
11358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11359for as_dir in $PATH
11360do
11361  IFS=$as_save_IFS
11362  test -z "$as_dir" && as_dir=.
11363    for ac_exec_ext in '' $ac_executable_extensions; do
11364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11365    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11367    break 2
11368  fi
11369done
11370  done
11371IFS=$as_save_IFS
11372
11373  ;;
11374esac
11375fi
11376XARGS=$ac_cv_path_XARGS
11377if test -n "$XARGS"; then
11378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11379$as_echo "$XARGS" >&6; }
11380else
11381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11382$as_echo "no" >&6; }
11383fi
11384
11385
11386        if test "x$XARGS" = x; then
11387          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11388        fi
11389      else
11390        # Otherwise we believe it is a complete path. Use it as it is.
11391        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11392$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11393        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11394$as_echo_n "checking for XARGS... " >&6; }
11395        if test ! -x "$tool_specified"; then
11396          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11397$as_echo "not found" >&6; }
11398          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11399        fi
11400        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11401$as_echo "$tool_specified" >&6; }
11402      fi
11403    fi
11404  fi
11405
11406
11407
11408  if test "x$XARGS" = x; then
11409    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11410  fi
11411
11412
11413
11414  # Then required tools that require some special treatment.
11415
11416
11417  # Publish this variable in the help.
11418
11419
11420  if test "x$AWK" = x; then
11421    # The variable is not set by user, try to locate tool using the code snippet
11422    for ac_prog in gawk mawk nawk awk
11423do
11424  # Extract the first word of "$ac_prog", so it can be a program name with args.
11425set dummy $ac_prog; ac_word=$2
11426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11427$as_echo_n "checking for $ac_word... " >&6; }
11428if ${ac_cv_prog_AWK+:} false; then :
11429  $as_echo_n "(cached) " >&6
11430else
11431  if test -n "$AWK"; then
11432  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11433else
11434as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11435for as_dir in $PATH
11436do
11437  IFS=$as_save_IFS
11438  test -z "$as_dir" && as_dir=.
11439    for ac_exec_ext in '' $ac_executable_extensions; do
11440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11441    ac_cv_prog_AWK="$ac_prog"
11442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11443    break 2
11444  fi
11445done
11446  done
11447IFS=$as_save_IFS
11448
11449fi
11450fi
11451AWK=$ac_cv_prog_AWK
11452if test -n "$AWK"; then
11453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11454$as_echo "$AWK" >&6; }
11455else
11456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11457$as_echo "no" >&6; }
11458fi
11459
11460
11461  test -n "$AWK" && break
11462done
11463
11464  else
11465    # The variable is set, but is it from the command line or the environment?
11466
11467    # Try to remove the string !AWK! from our list.
11468    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11469    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11470      # If it failed, the variable was not from the command line. Ignore it,
11471      # but warn the user (except for BASH, which is always set by the calling BASH).
11472      if test "xAWK" != xBASH; then
11473        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11474$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11475      fi
11476      # Try to locate tool using the code snippet
11477      for ac_prog in gawk mawk nawk awk
11478do
11479  # Extract the first word of "$ac_prog", so it can be a program name with args.
11480set dummy $ac_prog; ac_word=$2
11481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11482$as_echo_n "checking for $ac_word... " >&6; }
11483if ${ac_cv_prog_AWK+:} false; then :
11484  $as_echo_n "(cached) " >&6
11485else
11486  if test -n "$AWK"; then
11487  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11488else
11489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11490for as_dir in $PATH
11491do
11492  IFS=$as_save_IFS
11493  test -z "$as_dir" && as_dir=.
11494    for ac_exec_ext in '' $ac_executable_extensions; do
11495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11496    ac_cv_prog_AWK="$ac_prog"
11497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11498    break 2
11499  fi
11500done
11501  done
11502IFS=$as_save_IFS
11503
11504fi
11505fi
11506AWK=$ac_cv_prog_AWK
11507if test -n "$AWK"; then
11508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11509$as_echo "$AWK" >&6; }
11510else
11511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11512$as_echo "no" >&6; }
11513fi
11514
11515
11516  test -n "$AWK" && break
11517done
11518
11519    else
11520      # If it succeeded, then it was overridden by the user. We will use it
11521      # for the tool.
11522
11523      # First remove it from the list of overridden variables, so we can test
11524      # for unknown variables in the end.
11525      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11526
11527      # Check if the provided tool contains a complete path.
11528      tool_specified="$AWK"
11529      tool_basename="${tool_specified##*/}"
11530      if test "x$tool_basename" = "x$tool_specified"; then
11531        # A command without a complete path is provided, search $PATH.
11532        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11533$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11534        # Extract the first word of "$tool_basename", so it can be a program name with args.
11535set dummy $tool_basename; ac_word=$2
11536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11537$as_echo_n "checking for $ac_word... " >&6; }
11538if ${ac_cv_path_AWK+:} false; then :
11539  $as_echo_n "(cached) " >&6
11540else
11541  case $AWK in
11542  [\\/]* | ?:[\\/]*)
11543  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11544  ;;
11545  *)
11546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11547for as_dir in $PATH
11548do
11549  IFS=$as_save_IFS
11550  test -z "$as_dir" && as_dir=.
11551    for ac_exec_ext in '' $ac_executable_extensions; do
11552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11553    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11555    break 2
11556  fi
11557done
11558  done
11559IFS=$as_save_IFS
11560
11561  ;;
11562esac
11563fi
11564AWK=$ac_cv_path_AWK
11565if test -n "$AWK"; then
11566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11567$as_echo "$AWK" >&6; }
11568else
11569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11570$as_echo "no" >&6; }
11571fi
11572
11573
11574        if test "x$AWK" = x; then
11575          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11576        fi
11577      else
11578        # Otherwise we believe it is a complete path. Use it as it is.
11579        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11580$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11581        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11582$as_echo_n "checking for AWK... " >&6; }
11583        if test ! -x "$tool_specified"; then
11584          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11585$as_echo "not found" >&6; }
11586          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11587        fi
11588        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11589$as_echo "$tool_specified" >&6; }
11590      fi
11591    fi
11592  fi
11593
11594
11595  if test "x$AWK" = x; then
11596    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11597  fi
11598
11599
11600
11601
11602  # Publish this variable in the help.
11603
11604
11605  if test "x$GREP" = x; then
11606    # The variable is not set by user, try to locate tool using the code snippet
11607    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11608$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11609if ${ac_cv_path_GREP+:} false; then :
11610  $as_echo_n "(cached) " >&6
11611else
11612  if test -z "$GREP"; then
11613  ac_path_GREP_found=false
11614  # Loop through the user's path and test for each of PROGNAME-LIST
11615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11616for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11617do
11618  IFS=$as_save_IFS
11619  test -z "$as_dir" && as_dir=.
11620    for ac_prog in grep ggrep; do
11621    for ac_exec_ext in '' $ac_executable_extensions; do
11622      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11623      as_fn_executable_p "$ac_path_GREP" || continue
11624# Check for GNU ac_path_GREP and select it if it is found.
11625  # Check for GNU $ac_path_GREP
11626case `"$ac_path_GREP" --version 2>&1` in
11627*GNU*)
11628  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11629*)
11630  ac_count=0
11631  $as_echo_n 0123456789 >"conftest.in"
11632  while :
11633  do
11634    cat "conftest.in" "conftest.in" >"conftest.tmp"
11635    mv "conftest.tmp" "conftest.in"
11636    cp "conftest.in" "conftest.nl"
11637    $as_echo 'GREP' >> "conftest.nl"
11638    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11639    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11640    as_fn_arith $ac_count + 1 && ac_count=$as_val
11641    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11642      # Best one so far, save it but keep looking for a better one
11643      ac_cv_path_GREP="$ac_path_GREP"
11644      ac_path_GREP_max=$ac_count
11645    fi
11646    # 10*(2^10) chars as input seems more than enough
11647    test $ac_count -gt 10 && break
11648  done
11649  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11650esac
11651
11652      $ac_path_GREP_found && break 3
11653    done
11654  done
11655  done
11656IFS=$as_save_IFS
11657  if test -z "$ac_cv_path_GREP"; then
11658    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11659  fi
11660else
11661  ac_cv_path_GREP=$GREP
11662fi
11663
11664fi
11665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11666$as_echo "$ac_cv_path_GREP" >&6; }
11667 GREP="$ac_cv_path_GREP"
11668
11669
11670  else
11671    # The variable is set, but is it from the command line or the environment?
11672
11673    # Try to remove the string !GREP! from our list.
11674    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11675    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11676      # If it failed, the variable was not from the command line. Ignore it,
11677      # but warn the user (except for BASH, which is always set by the calling BASH).
11678      if test "xGREP" != xBASH; then
11679        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11680$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11681      fi
11682      # Try to locate tool using the code snippet
11683      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11684$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11685if ${ac_cv_path_GREP+:} false; then :
11686  $as_echo_n "(cached) " >&6
11687else
11688  if test -z "$GREP"; then
11689  ac_path_GREP_found=false
11690  # Loop through the user's path and test for each of PROGNAME-LIST
11691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11692for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11693do
11694  IFS=$as_save_IFS
11695  test -z "$as_dir" && as_dir=.
11696    for ac_prog in grep ggrep; do
11697    for ac_exec_ext in '' $ac_executable_extensions; do
11698      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11699      as_fn_executable_p "$ac_path_GREP" || continue
11700# Check for GNU ac_path_GREP and select it if it is found.
11701  # Check for GNU $ac_path_GREP
11702case `"$ac_path_GREP" --version 2>&1` in
11703*GNU*)
11704  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11705*)
11706  ac_count=0
11707  $as_echo_n 0123456789 >"conftest.in"
11708  while :
11709  do
11710    cat "conftest.in" "conftest.in" >"conftest.tmp"
11711    mv "conftest.tmp" "conftest.in"
11712    cp "conftest.in" "conftest.nl"
11713    $as_echo 'GREP' >> "conftest.nl"
11714    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11715    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11716    as_fn_arith $ac_count + 1 && ac_count=$as_val
11717    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11718      # Best one so far, save it but keep looking for a better one
11719      ac_cv_path_GREP="$ac_path_GREP"
11720      ac_path_GREP_max=$ac_count
11721    fi
11722    # 10*(2^10) chars as input seems more than enough
11723    test $ac_count -gt 10 && break
11724  done
11725  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11726esac
11727
11728      $ac_path_GREP_found && break 3
11729    done
11730  done
11731  done
11732IFS=$as_save_IFS
11733  if test -z "$ac_cv_path_GREP"; then
11734    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11735  fi
11736else
11737  ac_cv_path_GREP=$GREP
11738fi
11739
11740fi
11741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11742$as_echo "$ac_cv_path_GREP" >&6; }
11743 GREP="$ac_cv_path_GREP"
11744
11745
11746    else
11747      # If it succeeded, then it was overridden by the user. We will use it
11748      # for the tool.
11749
11750      # First remove it from the list of overridden variables, so we can test
11751      # for unknown variables in the end.
11752      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11753
11754      # Check if the provided tool contains a complete path.
11755      tool_specified="$GREP"
11756      tool_basename="${tool_specified##*/}"
11757      if test "x$tool_basename" = "x$tool_specified"; then
11758        # A command without a complete path is provided, search $PATH.
11759        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11760$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11761        # Extract the first word of "$tool_basename", so it can be a program name with args.
11762set dummy $tool_basename; ac_word=$2
11763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11764$as_echo_n "checking for $ac_word... " >&6; }
11765if ${ac_cv_path_GREP+:} false; then :
11766  $as_echo_n "(cached) " >&6
11767else
11768  case $GREP in
11769  [\\/]* | ?:[\\/]*)
11770  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11771  ;;
11772  *)
11773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11774for as_dir in $PATH
11775do
11776  IFS=$as_save_IFS
11777  test -z "$as_dir" && as_dir=.
11778    for ac_exec_ext in '' $ac_executable_extensions; do
11779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11780    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11782    break 2
11783  fi
11784done
11785  done
11786IFS=$as_save_IFS
11787
11788  ;;
11789esac
11790fi
11791GREP=$ac_cv_path_GREP
11792if test -n "$GREP"; then
11793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11794$as_echo "$GREP" >&6; }
11795else
11796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11797$as_echo "no" >&6; }
11798fi
11799
11800
11801        if test "x$GREP" = x; then
11802          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11803        fi
11804      else
11805        # Otherwise we believe it is a complete path. Use it as it is.
11806        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11807$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11808        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11809$as_echo_n "checking for GREP... " >&6; }
11810        if test ! -x "$tool_specified"; then
11811          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11812$as_echo "not found" >&6; }
11813          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11814        fi
11815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11816$as_echo "$tool_specified" >&6; }
11817      fi
11818    fi
11819  fi
11820
11821
11822  if test "x$GREP" = x; then
11823    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11824  fi
11825
11826
11827
11828
11829  # Publish this variable in the help.
11830
11831
11832  if test "x$EGREP" = x; then
11833    # The variable is not set by user, try to locate tool using the code snippet
11834    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11835$as_echo_n "checking for egrep... " >&6; }
11836if ${ac_cv_path_EGREP+:} false; then :
11837  $as_echo_n "(cached) " >&6
11838else
11839  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11840   then ac_cv_path_EGREP="$GREP -E"
11841   else
11842     if test -z "$EGREP"; then
11843  ac_path_EGREP_found=false
11844  # Loop through the user's path and test for each of PROGNAME-LIST
11845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11846for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11847do
11848  IFS=$as_save_IFS
11849  test -z "$as_dir" && as_dir=.
11850    for ac_prog in egrep; do
11851    for ac_exec_ext in '' $ac_executable_extensions; do
11852      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11853      as_fn_executable_p "$ac_path_EGREP" || continue
11854# Check for GNU ac_path_EGREP and select it if it is found.
11855  # Check for GNU $ac_path_EGREP
11856case `"$ac_path_EGREP" --version 2>&1` in
11857*GNU*)
11858  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11859*)
11860  ac_count=0
11861  $as_echo_n 0123456789 >"conftest.in"
11862  while :
11863  do
11864    cat "conftest.in" "conftest.in" >"conftest.tmp"
11865    mv "conftest.tmp" "conftest.in"
11866    cp "conftest.in" "conftest.nl"
11867    $as_echo 'EGREP' >> "conftest.nl"
11868    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11869    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11870    as_fn_arith $ac_count + 1 && ac_count=$as_val
11871    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11872      # Best one so far, save it but keep looking for a better one
11873      ac_cv_path_EGREP="$ac_path_EGREP"
11874      ac_path_EGREP_max=$ac_count
11875    fi
11876    # 10*(2^10) chars as input seems more than enough
11877    test $ac_count -gt 10 && break
11878  done
11879  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11880esac
11881
11882      $ac_path_EGREP_found && break 3
11883    done
11884  done
11885  done
11886IFS=$as_save_IFS
11887  if test -z "$ac_cv_path_EGREP"; then
11888    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11889  fi
11890else
11891  ac_cv_path_EGREP=$EGREP
11892fi
11893
11894   fi
11895fi
11896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11897$as_echo "$ac_cv_path_EGREP" >&6; }
11898 EGREP="$ac_cv_path_EGREP"
11899
11900
11901  else
11902    # The variable is set, but is it from the command line or the environment?
11903
11904    # Try to remove the string !EGREP! from our list.
11905    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11906    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11907      # If it failed, the variable was not from the command line. Ignore it,
11908      # but warn the user (except for BASH, which is always set by the calling BASH).
11909      if test "xEGREP" != xBASH; then
11910        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11911$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11912      fi
11913      # Try to locate tool using the code snippet
11914      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11915$as_echo_n "checking for egrep... " >&6; }
11916if ${ac_cv_path_EGREP+:} false; then :
11917  $as_echo_n "(cached) " >&6
11918else
11919  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11920   then ac_cv_path_EGREP="$GREP -E"
11921   else
11922     if test -z "$EGREP"; then
11923  ac_path_EGREP_found=false
11924  # Loop through the user's path and test for each of PROGNAME-LIST
11925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11926for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11927do
11928  IFS=$as_save_IFS
11929  test -z "$as_dir" && as_dir=.
11930    for ac_prog in egrep; do
11931    for ac_exec_ext in '' $ac_executable_extensions; do
11932      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11933      as_fn_executable_p "$ac_path_EGREP" || continue
11934# Check for GNU ac_path_EGREP and select it if it is found.
11935  # Check for GNU $ac_path_EGREP
11936case `"$ac_path_EGREP" --version 2>&1` in
11937*GNU*)
11938  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11939*)
11940  ac_count=0
11941  $as_echo_n 0123456789 >"conftest.in"
11942  while :
11943  do
11944    cat "conftest.in" "conftest.in" >"conftest.tmp"
11945    mv "conftest.tmp" "conftest.in"
11946    cp "conftest.in" "conftest.nl"
11947    $as_echo 'EGREP' >> "conftest.nl"
11948    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11949    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11950    as_fn_arith $ac_count + 1 && ac_count=$as_val
11951    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11952      # Best one so far, save it but keep looking for a better one
11953      ac_cv_path_EGREP="$ac_path_EGREP"
11954      ac_path_EGREP_max=$ac_count
11955    fi
11956    # 10*(2^10) chars as input seems more than enough
11957    test $ac_count -gt 10 && break
11958  done
11959  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11960esac
11961
11962      $ac_path_EGREP_found && break 3
11963    done
11964  done
11965  done
11966IFS=$as_save_IFS
11967  if test -z "$ac_cv_path_EGREP"; then
11968    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11969  fi
11970else
11971  ac_cv_path_EGREP=$EGREP
11972fi
11973
11974   fi
11975fi
11976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11977$as_echo "$ac_cv_path_EGREP" >&6; }
11978 EGREP="$ac_cv_path_EGREP"
11979
11980
11981    else
11982      # If it succeeded, then it was overridden by the user. We will use it
11983      # for the tool.
11984
11985      # First remove it from the list of overridden variables, so we can test
11986      # for unknown variables in the end.
11987      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11988
11989      # Check if the provided tool contains a complete path.
11990      tool_specified="$EGREP"
11991      tool_basename="${tool_specified##*/}"
11992      if test "x$tool_basename" = "x$tool_specified"; then
11993        # A command without a complete path is provided, search $PATH.
11994        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11995$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11996        # Extract the first word of "$tool_basename", so it can be a program name with args.
11997set dummy $tool_basename; ac_word=$2
11998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11999$as_echo_n "checking for $ac_word... " >&6; }
12000if ${ac_cv_path_EGREP+:} false; then :
12001  $as_echo_n "(cached) " >&6
12002else
12003  case $EGREP in
12004  [\\/]* | ?:[\\/]*)
12005  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12006  ;;
12007  *)
12008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12009for as_dir in $PATH
12010do
12011  IFS=$as_save_IFS
12012  test -z "$as_dir" && as_dir=.
12013    for ac_exec_ext in '' $ac_executable_extensions; do
12014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12015    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12017    break 2
12018  fi
12019done
12020  done
12021IFS=$as_save_IFS
12022
12023  ;;
12024esac
12025fi
12026EGREP=$ac_cv_path_EGREP
12027if test -n "$EGREP"; then
12028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12029$as_echo "$EGREP" >&6; }
12030else
12031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12032$as_echo "no" >&6; }
12033fi
12034
12035
12036        if test "x$EGREP" = x; then
12037          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12038        fi
12039      else
12040        # Otherwise we believe it is a complete path. Use it as it is.
12041        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12042$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12043        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12044$as_echo_n "checking for EGREP... " >&6; }
12045        if test ! -x "$tool_specified"; then
12046          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12047$as_echo "not found" >&6; }
12048          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12049        fi
12050        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12051$as_echo "$tool_specified" >&6; }
12052      fi
12053    fi
12054  fi
12055
12056
12057  if test "x$EGREP" = x; then
12058    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12059  fi
12060
12061
12062
12063
12064  # Publish this variable in the help.
12065
12066
12067  if test "x$FGREP" = x; then
12068    # The variable is not set by user, try to locate tool using the code snippet
12069    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12070$as_echo_n "checking for fgrep... " >&6; }
12071if ${ac_cv_path_FGREP+:} false; then :
12072  $as_echo_n "(cached) " >&6
12073else
12074  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12075   then ac_cv_path_FGREP="$GREP -F"
12076   else
12077     if test -z "$FGREP"; then
12078  ac_path_FGREP_found=false
12079  # Loop through the user's path and test for each of PROGNAME-LIST
12080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12081for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12082do
12083  IFS=$as_save_IFS
12084  test -z "$as_dir" && as_dir=.
12085    for ac_prog in fgrep; do
12086    for ac_exec_ext in '' $ac_executable_extensions; do
12087      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12088      as_fn_executable_p "$ac_path_FGREP" || continue
12089# Check for GNU ac_path_FGREP and select it if it is found.
12090  # Check for GNU $ac_path_FGREP
12091case `"$ac_path_FGREP" --version 2>&1` in
12092*GNU*)
12093  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12094*)
12095  ac_count=0
12096  $as_echo_n 0123456789 >"conftest.in"
12097  while :
12098  do
12099    cat "conftest.in" "conftest.in" >"conftest.tmp"
12100    mv "conftest.tmp" "conftest.in"
12101    cp "conftest.in" "conftest.nl"
12102    $as_echo 'FGREP' >> "conftest.nl"
12103    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12104    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12105    as_fn_arith $ac_count + 1 && ac_count=$as_val
12106    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12107      # Best one so far, save it but keep looking for a better one
12108      ac_cv_path_FGREP="$ac_path_FGREP"
12109      ac_path_FGREP_max=$ac_count
12110    fi
12111    # 10*(2^10) chars as input seems more than enough
12112    test $ac_count -gt 10 && break
12113  done
12114  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12115esac
12116
12117      $ac_path_FGREP_found && break 3
12118    done
12119  done
12120  done
12121IFS=$as_save_IFS
12122  if test -z "$ac_cv_path_FGREP"; then
12123    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12124  fi
12125else
12126  ac_cv_path_FGREP=$FGREP
12127fi
12128
12129   fi
12130fi
12131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12132$as_echo "$ac_cv_path_FGREP" >&6; }
12133 FGREP="$ac_cv_path_FGREP"
12134
12135
12136  else
12137    # The variable is set, but is it from the command line or the environment?
12138
12139    # Try to remove the string !FGREP! from our list.
12140    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12141    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12142      # If it failed, the variable was not from the command line. Ignore it,
12143      # but warn the user (except for BASH, which is always set by the calling BASH).
12144      if test "xFGREP" != xBASH; then
12145        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12146$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12147      fi
12148      # Try to locate tool using the code snippet
12149      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12150$as_echo_n "checking for fgrep... " >&6; }
12151if ${ac_cv_path_FGREP+:} false; then :
12152  $as_echo_n "(cached) " >&6
12153else
12154  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12155   then ac_cv_path_FGREP="$GREP -F"
12156   else
12157     if test -z "$FGREP"; then
12158  ac_path_FGREP_found=false
12159  # Loop through the user's path and test for each of PROGNAME-LIST
12160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12161for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12162do
12163  IFS=$as_save_IFS
12164  test -z "$as_dir" && as_dir=.
12165    for ac_prog in fgrep; do
12166    for ac_exec_ext in '' $ac_executable_extensions; do
12167      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12168      as_fn_executable_p "$ac_path_FGREP" || continue
12169# Check for GNU ac_path_FGREP and select it if it is found.
12170  # Check for GNU $ac_path_FGREP
12171case `"$ac_path_FGREP" --version 2>&1` in
12172*GNU*)
12173  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12174*)
12175  ac_count=0
12176  $as_echo_n 0123456789 >"conftest.in"
12177  while :
12178  do
12179    cat "conftest.in" "conftest.in" >"conftest.tmp"
12180    mv "conftest.tmp" "conftest.in"
12181    cp "conftest.in" "conftest.nl"
12182    $as_echo 'FGREP' >> "conftest.nl"
12183    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12184    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12185    as_fn_arith $ac_count + 1 && ac_count=$as_val
12186    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12187      # Best one so far, save it but keep looking for a better one
12188      ac_cv_path_FGREP="$ac_path_FGREP"
12189      ac_path_FGREP_max=$ac_count
12190    fi
12191    # 10*(2^10) chars as input seems more than enough
12192    test $ac_count -gt 10 && break
12193  done
12194  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12195esac
12196
12197      $ac_path_FGREP_found && break 3
12198    done
12199  done
12200  done
12201IFS=$as_save_IFS
12202  if test -z "$ac_cv_path_FGREP"; then
12203    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12204  fi
12205else
12206  ac_cv_path_FGREP=$FGREP
12207fi
12208
12209   fi
12210fi
12211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12212$as_echo "$ac_cv_path_FGREP" >&6; }
12213 FGREP="$ac_cv_path_FGREP"
12214
12215
12216    else
12217      # If it succeeded, then it was overridden by the user. We will use it
12218      # for the tool.
12219
12220      # First remove it from the list of overridden variables, so we can test
12221      # for unknown variables in the end.
12222      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12223
12224      # Check if the provided tool contains a complete path.
12225      tool_specified="$FGREP"
12226      tool_basename="${tool_specified##*/}"
12227      if test "x$tool_basename" = "x$tool_specified"; then
12228        # A command without a complete path is provided, search $PATH.
12229        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12230$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12231        # Extract the first word of "$tool_basename", so it can be a program name with args.
12232set dummy $tool_basename; ac_word=$2
12233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12234$as_echo_n "checking for $ac_word... " >&6; }
12235if ${ac_cv_path_FGREP+:} false; then :
12236  $as_echo_n "(cached) " >&6
12237else
12238  case $FGREP in
12239  [\\/]* | ?:[\\/]*)
12240  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12241  ;;
12242  *)
12243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12244for as_dir in $PATH
12245do
12246  IFS=$as_save_IFS
12247  test -z "$as_dir" && as_dir=.
12248    for ac_exec_ext in '' $ac_executable_extensions; do
12249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12250    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12252    break 2
12253  fi
12254done
12255  done
12256IFS=$as_save_IFS
12257
12258  ;;
12259esac
12260fi
12261FGREP=$ac_cv_path_FGREP
12262if test -n "$FGREP"; then
12263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12264$as_echo "$FGREP" >&6; }
12265else
12266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12267$as_echo "no" >&6; }
12268fi
12269
12270
12271        if test "x$FGREP" = x; then
12272          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12273        fi
12274      else
12275        # Otherwise we believe it is a complete path. Use it as it is.
12276        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12277$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12278        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12279$as_echo_n "checking for FGREP... " >&6; }
12280        if test ! -x "$tool_specified"; then
12281          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12282$as_echo "not found" >&6; }
12283          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12284        fi
12285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12286$as_echo "$tool_specified" >&6; }
12287      fi
12288    fi
12289  fi
12290
12291
12292  if test "x$FGREP" = x; then
12293    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12294  fi
12295
12296
12297
12298
12299  # Publish this variable in the help.
12300
12301
12302  if test "x$SED" = x; then
12303    # The variable is not set by user, try to locate tool using the code snippet
12304    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12305$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12306if ${ac_cv_path_SED+:} false; then :
12307  $as_echo_n "(cached) " >&6
12308else
12309            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12310     for ac_i in 1 2 3 4 5 6 7; do
12311       ac_script="$ac_script$as_nl$ac_script"
12312     done
12313     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12314     { ac_script=; unset ac_script;}
12315     if test -z "$SED"; then
12316  ac_path_SED_found=false
12317  # Loop through the user's path and test for each of PROGNAME-LIST
12318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12319for as_dir in $PATH
12320do
12321  IFS=$as_save_IFS
12322  test -z "$as_dir" && as_dir=.
12323    for ac_prog in sed gsed; do
12324    for ac_exec_ext in '' $ac_executable_extensions; do
12325      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12326      as_fn_executable_p "$ac_path_SED" || continue
12327# Check for GNU ac_path_SED and select it if it is found.
12328  # Check for GNU $ac_path_SED
12329case `"$ac_path_SED" --version 2>&1` in
12330*GNU*)
12331  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12332*)
12333  ac_count=0
12334  $as_echo_n 0123456789 >"conftest.in"
12335  while :
12336  do
12337    cat "conftest.in" "conftest.in" >"conftest.tmp"
12338    mv "conftest.tmp" "conftest.in"
12339    cp "conftest.in" "conftest.nl"
12340    $as_echo '' >> "conftest.nl"
12341    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12342    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12343    as_fn_arith $ac_count + 1 && ac_count=$as_val
12344    if test $ac_count -gt ${ac_path_SED_max-0}; then
12345      # Best one so far, save it but keep looking for a better one
12346      ac_cv_path_SED="$ac_path_SED"
12347      ac_path_SED_max=$ac_count
12348    fi
12349    # 10*(2^10) chars as input seems more than enough
12350    test $ac_count -gt 10 && break
12351  done
12352  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12353esac
12354
12355      $ac_path_SED_found && break 3
12356    done
12357  done
12358  done
12359IFS=$as_save_IFS
12360  if test -z "$ac_cv_path_SED"; then
12361    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12362  fi
12363else
12364  ac_cv_path_SED=$SED
12365fi
12366
12367fi
12368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12369$as_echo "$ac_cv_path_SED" >&6; }
12370 SED="$ac_cv_path_SED"
12371  rm -f conftest.sed
12372
12373  else
12374    # The variable is set, but is it from the command line or the environment?
12375
12376    # Try to remove the string !SED! from our list.
12377    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12378    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12379      # If it failed, the variable was not from the command line. Ignore it,
12380      # but warn the user (except for BASH, which is always set by the calling BASH).
12381      if test "xSED" != xBASH; then
12382        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12383$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12384      fi
12385      # Try to locate tool using the code snippet
12386      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12387$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12388if ${ac_cv_path_SED+:} false; then :
12389  $as_echo_n "(cached) " >&6
12390else
12391            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12392     for ac_i in 1 2 3 4 5 6 7; do
12393       ac_script="$ac_script$as_nl$ac_script"
12394     done
12395     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12396     { ac_script=; unset ac_script;}
12397     if test -z "$SED"; then
12398  ac_path_SED_found=false
12399  # Loop through the user's path and test for each of PROGNAME-LIST
12400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12401for as_dir in $PATH
12402do
12403  IFS=$as_save_IFS
12404  test -z "$as_dir" && as_dir=.
12405    for ac_prog in sed gsed; do
12406    for ac_exec_ext in '' $ac_executable_extensions; do
12407      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12408      as_fn_executable_p "$ac_path_SED" || continue
12409# Check for GNU ac_path_SED and select it if it is found.
12410  # Check for GNU $ac_path_SED
12411case `"$ac_path_SED" --version 2>&1` in
12412*GNU*)
12413  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12414*)
12415  ac_count=0
12416  $as_echo_n 0123456789 >"conftest.in"
12417  while :
12418  do
12419    cat "conftest.in" "conftest.in" >"conftest.tmp"
12420    mv "conftest.tmp" "conftest.in"
12421    cp "conftest.in" "conftest.nl"
12422    $as_echo '' >> "conftest.nl"
12423    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12424    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12425    as_fn_arith $ac_count + 1 && ac_count=$as_val
12426    if test $ac_count -gt ${ac_path_SED_max-0}; then
12427      # Best one so far, save it but keep looking for a better one
12428      ac_cv_path_SED="$ac_path_SED"
12429      ac_path_SED_max=$ac_count
12430    fi
12431    # 10*(2^10) chars as input seems more than enough
12432    test $ac_count -gt 10 && break
12433  done
12434  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12435esac
12436
12437      $ac_path_SED_found && break 3
12438    done
12439  done
12440  done
12441IFS=$as_save_IFS
12442  if test -z "$ac_cv_path_SED"; then
12443    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12444  fi
12445else
12446  ac_cv_path_SED=$SED
12447fi
12448
12449fi
12450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12451$as_echo "$ac_cv_path_SED" >&6; }
12452 SED="$ac_cv_path_SED"
12453  rm -f conftest.sed
12454
12455    else
12456      # If it succeeded, then it was overridden by the user. We will use it
12457      # for the tool.
12458
12459      # First remove it from the list of overridden variables, so we can test
12460      # for unknown variables in the end.
12461      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12462
12463      # Check if the provided tool contains a complete path.
12464      tool_specified="$SED"
12465      tool_basename="${tool_specified##*/}"
12466      if test "x$tool_basename" = "x$tool_specified"; then
12467        # A command without a complete path is provided, search $PATH.
12468        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12469$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12470        # Extract the first word of "$tool_basename", so it can be a program name with args.
12471set dummy $tool_basename; ac_word=$2
12472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12473$as_echo_n "checking for $ac_word... " >&6; }
12474if ${ac_cv_path_SED+:} false; then :
12475  $as_echo_n "(cached) " >&6
12476else
12477  case $SED in
12478  [\\/]* | ?:[\\/]*)
12479  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12480  ;;
12481  *)
12482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12483for as_dir in $PATH
12484do
12485  IFS=$as_save_IFS
12486  test -z "$as_dir" && as_dir=.
12487    for ac_exec_ext in '' $ac_executable_extensions; do
12488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12489    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12491    break 2
12492  fi
12493done
12494  done
12495IFS=$as_save_IFS
12496
12497  ;;
12498esac
12499fi
12500SED=$ac_cv_path_SED
12501if test -n "$SED"; then
12502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12503$as_echo "$SED" >&6; }
12504else
12505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12506$as_echo "no" >&6; }
12507fi
12508
12509
12510        if test "x$SED" = x; then
12511          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12512        fi
12513      else
12514        # Otherwise we believe it is a complete path. Use it as it is.
12515        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12516$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12517        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12518$as_echo_n "checking for SED... " >&6; }
12519        if test ! -x "$tool_specified"; then
12520          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12521$as_echo "not found" >&6; }
12522          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12523        fi
12524        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12525$as_echo "$tool_specified" >&6; }
12526      fi
12527    fi
12528  fi
12529
12530
12531  if test "x$SED" = x; then
12532    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12533  fi
12534
12535
12536
12537  # Always force rm.
12538  RM="$RM -f"
12539
12540  # pwd behaves differently on various platforms and some don't support the -L flag.
12541  # Always use the bash builtin pwd to get uniform behavior.
12542  THEPWDCMD=pwd
12543
12544  # These are not required on all platforms
12545
12546
12547  # Publish this variable in the help.
12548
12549
12550  if test "x$CYGPATH" = x; then
12551    # The variable is not set by user, try to locate tool using the code snippet
12552    for ac_prog in cygpath
12553do
12554  # Extract the first word of "$ac_prog", so it can be a program name with args.
12555set dummy $ac_prog; ac_word=$2
12556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12557$as_echo_n "checking for $ac_word... " >&6; }
12558if ${ac_cv_path_CYGPATH+:} false; then :
12559  $as_echo_n "(cached) " >&6
12560else
12561  case $CYGPATH in
12562  [\\/]* | ?:[\\/]*)
12563  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12564  ;;
12565  *)
12566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12567for as_dir in $PATH
12568do
12569  IFS=$as_save_IFS
12570  test -z "$as_dir" && as_dir=.
12571    for ac_exec_ext in '' $ac_executable_extensions; do
12572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12573    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12575    break 2
12576  fi
12577done
12578  done
12579IFS=$as_save_IFS
12580
12581  ;;
12582esac
12583fi
12584CYGPATH=$ac_cv_path_CYGPATH
12585if test -n "$CYGPATH"; then
12586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12587$as_echo "$CYGPATH" >&6; }
12588else
12589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12590$as_echo "no" >&6; }
12591fi
12592
12593
12594  test -n "$CYGPATH" && break
12595done
12596
12597  else
12598    # The variable is set, but is it from the command line or the environment?
12599
12600    # Try to remove the string !CYGPATH! from our list.
12601    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12602    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12603      # If it failed, the variable was not from the command line. Ignore it,
12604      # but warn the user (except for BASH, which is always set by the calling BASH).
12605      if test "xCYGPATH" != xBASH; then
12606        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12607$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12608      fi
12609      # Try to locate tool using the code snippet
12610      for ac_prog in cygpath
12611do
12612  # Extract the first word of "$ac_prog", so it can be a program name with args.
12613set dummy $ac_prog; ac_word=$2
12614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12615$as_echo_n "checking for $ac_word... " >&6; }
12616if ${ac_cv_path_CYGPATH+:} false; then :
12617  $as_echo_n "(cached) " >&6
12618else
12619  case $CYGPATH in
12620  [\\/]* | ?:[\\/]*)
12621  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12622  ;;
12623  *)
12624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12625for as_dir in $PATH
12626do
12627  IFS=$as_save_IFS
12628  test -z "$as_dir" && as_dir=.
12629    for ac_exec_ext in '' $ac_executable_extensions; do
12630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12631    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12633    break 2
12634  fi
12635done
12636  done
12637IFS=$as_save_IFS
12638
12639  ;;
12640esac
12641fi
12642CYGPATH=$ac_cv_path_CYGPATH
12643if test -n "$CYGPATH"; then
12644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12645$as_echo "$CYGPATH" >&6; }
12646else
12647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12648$as_echo "no" >&6; }
12649fi
12650
12651
12652  test -n "$CYGPATH" && break
12653done
12654
12655    else
12656      # If it succeeded, then it was overridden by the user. We will use it
12657      # for the tool.
12658
12659      # First remove it from the list of overridden variables, so we can test
12660      # for unknown variables in the end.
12661      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12662
12663      # Check if the provided tool contains a complete path.
12664      tool_specified="$CYGPATH"
12665      tool_basename="${tool_specified##*/}"
12666      if test "x$tool_basename" = "x$tool_specified"; then
12667        # A command without a complete path is provided, search $PATH.
12668        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12669$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12670        # Extract the first word of "$tool_basename", so it can be a program name with args.
12671set dummy $tool_basename; ac_word=$2
12672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12673$as_echo_n "checking for $ac_word... " >&6; }
12674if ${ac_cv_path_CYGPATH+:} false; then :
12675  $as_echo_n "(cached) " >&6
12676else
12677  case $CYGPATH in
12678  [\\/]* | ?:[\\/]*)
12679  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12680  ;;
12681  *)
12682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12683for as_dir in $PATH
12684do
12685  IFS=$as_save_IFS
12686  test -z "$as_dir" && as_dir=.
12687    for ac_exec_ext in '' $ac_executable_extensions; do
12688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12689    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12691    break 2
12692  fi
12693done
12694  done
12695IFS=$as_save_IFS
12696
12697  ;;
12698esac
12699fi
12700CYGPATH=$ac_cv_path_CYGPATH
12701if test -n "$CYGPATH"; then
12702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12703$as_echo "$CYGPATH" >&6; }
12704else
12705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12706$as_echo "no" >&6; }
12707fi
12708
12709
12710        if test "x$CYGPATH" = x; then
12711          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12712        fi
12713      else
12714        # Otherwise we believe it is a complete path. Use it as it is.
12715        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12716$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12717        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12718$as_echo_n "checking for CYGPATH... " >&6; }
12719        if test ! -x "$tool_specified"; then
12720          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12721$as_echo "not found" >&6; }
12722          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12723        fi
12724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12725$as_echo "$tool_specified" >&6; }
12726      fi
12727    fi
12728  fi
12729
12730
12731
12732
12733  # Publish this variable in the help.
12734
12735
12736  if test "x$READLINK" = x; then
12737    # The variable is not set by user, try to locate tool using the code snippet
12738    for ac_prog in greadlink readlink
12739do
12740  # Extract the first word of "$ac_prog", so it can be a program name with args.
12741set dummy $ac_prog; ac_word=$2
12742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12743$as_echo_n "checking for $ac_word... " >&6; }
12744if ${ac_cv_path_READLINK+:} false; then :
12745  $as_echo_n "(cached) " >&6
12746else
12747  case $READLINK in
12748  [\\/]* | ?:[\\/]*)
12749  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12750  ;;
12751  *)
12752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12753for as_dir in $PATH
12754do
12755  IFS=$as_save_IFS
12756  test -z "$as_dir" && as_dir=.
12757    for ac_exec_ext in '' $ac_executable_extensions; do
12758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12759    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12761    break 2
12762  fi
12763done
12764  done
12765IFS=$as_save_IFS
12766
12767  ;;
12768esac
12769fi
12770READLINK=$ac_cv_path_READLINK
12771if test -n "$READLINK"; then
12772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12773$as_echo "$READLINK" >&6; }
12774else
12775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12776$as_echo "no" >&6; }
12777fi
12778
12779
12780  test -n "$READLINK" && break
12781done
12782
12783  else
12784    # The variable is set, but is it from the command line or the environment?
12785
12786    # Try to remove the string !READLINK! from our list.
12787    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12788    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12789      # If it failed, the variable was not from the command line. Ignore it,
12790      # but warn the user (except for BASH, which is always set by the calling BASH).
12791      if test "xREADLINK" != xBASH; then
12792        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12793$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12794      fi
12795      # Try to locate tool using the code snippet
12796      for ac_prog in greadlink readlink
12797do
12798  # Extract the first word of "$ac_prog", so it can be a program name with args.
12799set dummy $ac_prog; ac_word=$2
12800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12801$as_echo_n "checking for $ac_word... " >&6; }
12802if ${ac_cv_path_READLINK+:} false; then :
12803  $as_echo_n "(cached) " >&6
12804else
12805  case $READLINK in
12806  [\\/]* | ?:[\\/]*)
12807  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12808  ;;
12809  *)
12810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12811for as_dir in $PATH
12812do
12813  IFS=$as_save_IFS
12814  test -z "$as_dir" && as_dir=.
12815    for ac_exec_ext in '' $ac_executable_extensions; do
12816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12817    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12819    break 2
12820  fi
12821done
12822  done
12823IFS=$as_save_IFS
12824
12825  ;;
12826esac
12827fi
12828READLINK=$ac_cv_path_READLINK
12829if test -n "$READLINK"; then
12830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12831$as_echo "$READLINK" >&6; }
12832else
12833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12834$as_echo "no" >&6; }
12835fi
12836
12837
12838  test -n "$READLINK" && break
12839done
12840
12841    else
12842      # If it succeeded, then it was overridden by the user. We will use it
12843      # for the tool.
12844
12845      # First remove it from the list of overridden variables, so we can test
12846      # for unknown variables in the end.
12847      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12848
12849      # Check if the provided tool contains a complete path.
12850      tool_specified="$READLINK"
12851      tool_basename="${tool_specified##*/}"
12852      if test "x$tool_basename" = "x$tool_specified"; then
12853        # A command without a complete path is provided, search $PATH.
12854        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12855$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12856        # Extract the first word of "$tool_basename", so it can be a program name with args.
12857set dummy $tool_basename; ac_word=$2
12858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12859$as_echo_n "checking for $ac_word... " >&6; }
12860if ${ac_cv_path_READLINK+:} false; then :
12861  $as_echo_n "(cached) " >&6
12862else
12863  case $READLINK in
12864  [\\/]* | ?:[\\/]*)
12865  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12866  ;;
12867  *)
12868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12869for as_dir in $PATH
12870do
12871  IFS=$as_save_IFS
12872  test -z "$as_dir" && as_dir=.
12873    for ac_exec_ext in '' $ac_executable_extensions; do
12874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12875    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12877    break 2
12878  fi
12879done
12880  done
12881IFS=$as_save_IFS
12882
12883  ;;
12884esac
12885fi
12886READLINK=$ac_cv_path_READLINK
12887if test -n "$READLINK"; then
12888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12889$as_echo "$READLINK" >&6; }
12890else
12891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12892$as_echo "no" >&6; }
12893fi
12894
12895
12896        if test "x$READLINK" = x; then
12897          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12898        fi
12899      else
12900        # Otherwise we believe it is a complete path. Use it as it is.
12901        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12902$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12903        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12904$as_echo_n "checking for READLINK... " >&6; }
12905        if test ! -x "$tool_specified"; then
12906          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12907$as_echo "not found" >&6; }
12908          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12909        fi
12910        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12911$as_echo "$tool_specified" >&6; }
12912      fi
12913    fi
12914  fi
12915
12916
12917
12918
12919  # Publish this variable in the help.
12920
12921
12922  if test "x$DF" = x; then
12923    # The variable is not set by user, try to locate tool using the code snippet
12924    for ac_prog in df
12925do
12926  # Extract the first word of "$ac_prog", so it can be a program name with args.
12927set dummy $ac_prog; ac_word=$2
12928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12929$as_echo_n "checking for $ac_word... " >&6; }
12930if ${ac_cv_path_DF+:} false; then :
12931  $as_echo_n "(cached) " >&6
12932else
12933  case $DF in
12934  [\\/]* | ?:[\\/]*)
12935  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12936  ;;
12937  *)
12938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12939for as_dir in $PATH
12940do
12941  IFS=$as_save_IFS
12942  test -z "$as_dir" && as_dir=.
12943    for ac_exec_ext in '' $ac_executable_extensions; do
12944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12945    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12947    break 2
12948  fi
12949done
12950  done
12951IFS=$as_save_IFS
12952
12953  ;;
12954esac
12955fi
12956DF=$ac_cv_path_DF
12957if test -n "$DF"; then
12958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12959$as_echo "$DF" >&6; }
12960else
12961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12962$as_echo "no" >&6; }
12963fi
12964
12965
12966  test -n "$DF" && break
12967done
12968
12969  else
12970    # The variable is set, but is it from the command line or the environment?
12971
12972    # Try to remove the string !DF! from our list.
12973    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12974    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12975      # If it failed, the variable was not from the command line. Ignore it,
12976      # but warn the user (except for BASH, which is always set by the calling BASH).
12977      if test "xDF" != xBASH; then
12978        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12979$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12980      fi
12981      # Try to locate tool using the code snippet
12982      for ac_prog in df
12983do
12984  # Extract the first word of "$ac_prog", so it can be a program name with args.
12985set dummy $ac_prog; ac_word=$2
12986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12987$as_echo_n "checking for $ac_word... " >&6; }
12988if ${ac_cv_path_DF+:} false; then :
12989  $as_echo_n "(cached) " >&6
12990else
12991  case $DF in
12992  [\\/]* | ?:[\\/]*)
12993  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12994  ;;
12995  *)
12996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12997for as_dir in $PATH
12998do
12999  IFS=$as_save_IFS
13000  test -z "$as_dir" && as_dir=.
13001    for ac_exec_ext in '' $ac_executable_extensions; do
13002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13003    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13005    break 2
13006  fi
13007done
13008  done
13009IFS=$as_save_IFS
13010
13011  ;;
13012esac
13013fi
13014DF=$ac_cv_path_DF
13015if test -n "$DF"; then
13016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13017$as_echo "$DF" >&6; }
13018else
13019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13020$as_echo "no" >&6; }
13021fi
13022
13023
13024  test -n "$DF" && break
13025done
13026
13027    else
13028      # If it succeeded, then it was overridden by the user. We will use it
13029      # for the tool.
13030
13031      # First remove it from the list of overridden variables, so we can test
13032      # for unknown variables in the end.
13033      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13034
13035      # Check if the provided tool contains a complete path.
13036      tool_specified="$DF"
13037      tool_basename="${tool_specified##*/}"
13038      if test "x$tool_basename" = "x$tool_specified"; then
13039        # A command without a complete path is provided, search $PATH.
13040        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13041$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13042        # Extract the first word of "$tool_basename", so it can be a program name with args.
13043set dummy $tool_basename; ac_word=$2
13044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13045$as_echo_n "checking for $ac_word... " >&6; }
13046if ${ac_cv_path_DF+:} false; then :
13047  $as_echo_n "(cached) " >&6
13048else
13049  case $DF in
13050  [\\/]* | ?:[\\/]*)
13051  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13052  ;;
13053  *)
13054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13055for as_dir in $PATH
13056do
13057  IFS=$as_save_IFS
13058  test -z "$as_dir" && as_dir=.
13059    for ac_exec_ext in '' $ac_executable_extensions; do
13060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13061    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13063    break 2
13064  fi
13065done
13066  done
13067IFS=$as_save_IFS
13068
13069  ;;
13070esac
13071fi
13072DF=$ac_cv_path_DF
13073if test -n "$DF"; then
13074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13075$as_echo "$DF" >&6; }
13076else
13077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13078$as_echo "no" >&6; }
13079fi
13080
13081
13082        if test "x$DF" = x; then
13083          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13084        fi
13085      else
13086        # Otherwise we believe it is a complete path. Use it as it is.
13087        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13088$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13089        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13090$as_echo_n "checking for DF... " >&6; }
13091        if test ! -x "$tool_specified"; then
13092          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13093$as_echo "not found" >&6; }
13094          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13095        fi
13096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13097$as_echo "$tool_specified" >&6; }
13098      fi
13099    fi
13100  fi
13101
13102
13103
13104
13105  # Publish this variable in the help.
13106
13107
13108  if test "x$SETFILE" = x; then
13109    # The variable is not set by user, try to locate tool using the code snippet
13110    for ac_prog in SetFile
13111do
13112  # Extract the first word of "$ac_prog", so it can be a program name with args.
13113set dummy $ac_prog; ac_word=$2
13114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13115$as_echo_n "checking for $ac_word... " >&6; }
13116if ${ac_cv_path_SETFILE+:} false; then :
13117  $as_echo_n "(cached) " >&6
13118else
13119  case $SETFILE in
13120  [\\/]* | ?:[\\/]*)
13121  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13122  ;;
13123  *)
13124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13125for as_dir in $PATH
13126do
13127  IFS=$as_save_IFS
13128  test -z "$as_dir" && as_dir=.
13129    for ac_exec_ext in '' $ac_executable_extensions; do
13130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13131    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13133    break 2
13134  fi
13135done
13136  done
13137IFS=$as_save_IFS
13138
13139  ;;
13140esac
13141fi
13142SETFILE=$ac_cv_path_SETFILE
13143if test -n "$SETFILE"; then
13144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13145$as_echo "$SETFILE" >&6; }
13146else
13147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13148$as_echo "no" >&6; }
13149fi
13150
13151
13152  test -n "$SETFILE" && break
13153done
13154
13155  else
13156    # The variable is set, but is it from the command line or the environment?
13157
13158    # Try to remove the string !SETFILE! from our list.
13159    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13160    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13161      # If it failed, the variable was not from the command line. Ignore it,
13162      # but warn the user (except for BASH, which is always set by the calling BASH).
13163      if test "xSETFILE" != xBASH; then
13164        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13165$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13166      fi
13167      # Try to locate tool using the code snippet
13168      for ac_prog in SetFile
13169do
13170  # Extract the first word of "$ac_prog", so it can be a program name with args.
13171set dummy $ac_prog; ac_word=$2
13172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13173$as_echo_n "checking for $ac_word... " >&6; }
13174if ${ac_cv_path_SETFILE+:} false; then :
13175  $as_echo_n "(cached) " >&6
13176else
13177  case $SETFILE in
13178  [\\/]* | ?:[\\/]*)
13179  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13180  ;;
13181  *)
13182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13183for as_dir in $PATH
13184do
13185  IFS=$as_save_IFS
13186  test -z "$as_dir" && as_dir=.
13187    for ac_exec_ext in '' $ac_executable_extensions; do
13188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13189    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13191    break 2
13192  fi
13193done
13194  done
13195IFS=$as_save_IFS
13196
13197  ;;
13198esac
13199fi
13200SETFILE=$ac_cv_path_SETFILE
13201if test -n "$SETFILE"; then
13202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13203$as_echo "$SETFILE" >&6; }
13204else
13205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13206$as_echo "no" >&6; }
13207fi
13208
13209
13210  test -n "$SETFILE" && break
13211done
13212
13213    else
13214      # If it succeeded, then it was overridden by the user. We will use it
13215      # for the tool.
13216
13217      # First remove it from the list of overridden variables, so we can test
13218      # for unknown variables in the end.
13219      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13220
13221      # Check if the provided tool contains a complete path.
13222      tool_specified="$SETFILE"
13223      tool_basename="${tool_specified##*/}"
13224      if test "x$tool_basename" = "x$tool_specified"; then
13225        # A command without a complete path is provided, search $PATH.
13226        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13227$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13228        # Extract the first word of "$tool_basename", so it can be a program name with args.
13229set dummy $tool_basename; ac_word=$2
13230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13231$as_echo_n "checking for $ac_word... " >&6; }
13232if ${ac_cv_path_SETFILE+:} false; then :
13233  $as_echo_n "(cached) " >&6
13234else
13235  case $SETFILE in
13236  [\\/]* | ?:[\\/]*)
13237  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13238  ;;
13239  *)
13240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13241for as_dir in $PATH
13242do
13243  IFS=$as_save_IFS
13244  test -z "$as_dir" && as_dir=.
13245    for ac_exec_ext in '' $ac_executable_extensions; do
13246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13247    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13249    break 2
13250  fi
13251done
13252  done
13253IFS=$as_save_IFS
13254
13255  ;;
13256esac
13257fi
13258SETFILE=$ac_cv_path_SETFILE
13259if test -n "$SETFILE"; then
13260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13261$as_echo "$SETFILE" >&6; }
13262else
13263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13264$as_echo "no" >&6; }
13265fi
13266
13267
13268        if test "x$SETFILE" = x; then
13269          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13270        fi
13271      else
13272        # Otherwise we believe it is a complete path. Use it as it is.
13273        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13274$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13275        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13276$as_echo_n "checking for SETFILE... " >&6; }
13277        if test ! -x "$tool_specified"; then
13278          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13279$as_echo "not found" >&6; }
13280          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13281        fi
13282        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13283$as_echo "$tool_specified" >&6; }
13284      fi
13285    fi
13286  fi
13287
13288
13289
13290
13291# Now we can determine OpenJDK build and target platforms. This is required to
13292# have early on.
13293# Make sure we can run config.sub.
13294$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13295  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13296
13297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13298$as_echo_n "checking build system type... " >&6; }
13299if ${ac_cv_build+:} false; then :
13300  $as_echo_n "(cached) " >&6
13301else
13302  ac_build_alias=$build_alias
13303test "x$ac_build_alias" = x &&
13304  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13305test "x$ac_build_alias" = x &&
13306  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13307ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13308  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13309
13310fi
13311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13312$as_echo "$ac_cv_build" >&6; }
13313case $ac_cv_build in
13314*-*-*) ;;
13315*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13316esac
13317build=$ac_cv_build
13318ac_save_IFS=$IFS; IFS='-'
13319set x $ac_cv_build
13320shift
13321build_cpu=$1
13322build_vendor=$2
13323shift; shift
13324# Remember, the first character of IFS is used to create $*,
13325# except with old shells:
13326build_os=$*
13327IFS=$ac_save_IFS
13328case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13329
13330
13331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13332$as_echo_n "checking host system type... " >&6; }
13333if ${ac_cv_host+:} false; then :
13334  $as_echo_n "(cached) " >&6
13335else
13336  if test "x$host_alias" = x; then
13337  ac_cv_host=$ac_cv_build
13338else
13339  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13340    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13341fi
13342
13343fi
13344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13345$as_echo "$ac_cv_host" >&6; }
13346case $ac_cv_host in
13347*-*-*) ;;
13348*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13349esac
13350host=$ac_cv_host
13351ac_save_IFS=$IFS; IFS='-'
13352set x $ac_cv_host
13353shift
13354host_cpu=$1
13355host_vendor=$2
13356shift; shift
13357# Remember, the first character of IFS is used to create $*,
13358# except with old shells:
13359host_os=$*
13360IFS=$ac_save_IFS
13361case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13362
13363
13364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13365$as_echo_n "checking target system type... " >&6; }
13366if ${ac_cv_target+:} false; then :
13367  $as_echo_n "(cached) " >&6
13368else
13369  if test "x$target_alias" = x; then
13370  ac_cv_target=$ac_cv_host
13371else
13372  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13373    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13374fi
13375
13376fi
13377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13378$as_echo "$ac_cv_target" >&6; }
13379case $ac_cv_target in
13380*-*-*) ;;
13381*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13382esac
13383target=$ac_cv_target
13384ac_save_IFS=$IFS; IFS='-'
13385set x $ac_cv_target
13386shift
13387target_cpu=$1
13388target_vendor=$2
13389shift; shift
13390# Remember, the first character of IFS is used to create $*,
13391# except with old shells:
13392target_os=$*
13393IFS=$ac_save_IFS
13394case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13395
13396
13397# The aliases save the names the user supplied, while $host etc.
13398# will get canonicalized.
13399test -n "$target_alias" &&
13400  test "$program_prefix$program_suffix$program_transform_name" = \
13401    NONENONEs,x,x, &&
13402  program_prefix=${target_alias}-
13403
13404  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13405  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13406  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13407  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13408  # to use the configure naming style.
13409
13410
13411
13412
13413
13414  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13415  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13416  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13417  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13418  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13419  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13420
13421
13422
13423  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13424
13425  case "$build_os" in
13426    *linux*)
13427      VAR_OS=linux
13428      VAR_OS_API=posix
13429      VAR_OS_ENV=linux
13430      ;;
13431    *solaris*)
13432      VAR_OS=solaris
13433      VAR_OS_API=posix
13434      VAR_OS_ENV=solaris
13435      ;;
13436    *darwin*)
13437      VAR_OS=macosx
13438      VAR_OS_API=posix
13439      VAR_OS_ENV=macosx
13440      ;;
13441    *bsd*)
13442      VAR_OS=bsd
13443      VAR_OS_API=posix
13444      VAR_OS_ENV=bsd
13445      ;;
13446    *cygwin*)
13447      VAR_OS=windows
13448      VAR_OS_API=winapi
13449      VAR_OS_ENV=windows.cygwin
13450      ;;
13451    *mingw*)
13452      VAR_OS=windows
13453      VAR_OS_API=winapi
13454      VAR_OS_ENV=windows.msys
13455      ;;
13456    *aix*)
13457      VAR_OS=aix
13458      VAR_OS_API=posix
13459      VAR_OS_ENV=aix
13460      ;;
13461    *)
13462      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13463      ;;
13464  esac
13465
13466
13467  # First argument is the cpu name from the trip/quad
13468  case "$build_cpu" in
13469    x86_64)
13470      VAR_CPU=x86_64
13471      VAR_CPU_ARCH=x86
13472      VAR_CPU_BITS=64
13473      VAR_CPU_ENDIAN=little
13474      ;;
13475    i?86)
13476      VAR_CPU=x86
13477      VAR_CPU_ARCH=x86
13478      VAR_CPU_BITS=32
13479      VAR_CPU_ENDIAN=little
13480      ;;
13481    arm*)
13482      VAR_CPU=arm
13483      VAR_CPU_ARCH=arm
13484      VAR_CPU_BITS=32
13485      VAR_CPU_ENDIAN=little
13486      ;;
13487    powerpc)
13488      VAR_CPU=ppc
13489      VAR_CPU_ARCH=ppc
13490      VAR_CPU_BITS=32
13491      VAR_CPU_ENDIAN=big
13492      ;;
13493    powerpc64)
13494      VAR_CPU=ppc64
13495      VAR_CPU_ARCH=ppc
13496      VAR_CPU_BITS=64
13497      VAR_CPU_ENDIAN=big
13498      ;;
13499    s390)
13500      VAR_CPU=s390
13501      VAR_CPU_ARCH=s390
13502      VAR_CPU_BITS=32
13503      VAR_CPU_ENDIAN=big
13504      ;;
13505    s390x)
13506      VAR_CPU=s390x
13507      VAR_CPU_ARCH=s390
13508      VAR_CPU_BITS=64
13509      VAR_CPU_ENDIAN=big
13510      ;;
13511    sparc)
13512      VAR_CPU=sparc
13513      VAR_CPU_ARCH=sparc
13514      VAR_CPU_BITS=32
13515      VAR_CPU_ENDIAN=big
13516      ;;
13517    sparcv9)
13518      VAR_CPU=sparcv9
13519      VAR_CPU_ARCH=sparc
13520      VAR_CPU_BITS=64
13521      VAR_CPU_ENDIAN=big
13522      ;;
13523    *)
13524      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13525      ;;
13526  esac
13527
13528  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13529  OPENJDK_BUILD_OS="$VAR_OS"
13530  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13531  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13532  OPENJDK_BUILD_CPU="$VAR_CPU"
13533  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13534  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13535  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13536
13537
13538
13539
13540
13541
13542
13543  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13544$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13546$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13547
13548  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13549
13550  case "$host_os" in
13551    *linux*)
13552      VAR_OS=linux
13553      VAR_OS_API=posix
13554      VAR_OS_ENV=linux
13555      ;;
13556    *solaris*)
13557      VAR_OS=solaris
13558      VAR_OS_API=posix
13559      VAR_OS_ENV=solaris
13560      ;;
13561    *darwin*)
13562      VAR_OS=macosx
13563      VAR_OS_API=posix
13564      VAR_OS_ENV=macosx
13565      ;;
13566    *bsd*)
13567      VAR_OS=bsd
13568      VAR_OS_API=posix
13569      VAR_OS_ENV=bsd
13570      ;;
13571    *cygwin*)
13572      VAR_OS=windows
13573      VAR_OS_API=winapi
13574      VAR_OS_ENV=windows.cygwin
13575      ;;
13576    *mingw*)
13577      VAR_OS=windows
13578      VAR_OS_API=winapi
13579      VAR_OS_ENV=windows.msys
13580      ;;
13581    *aix*)
13582      VAR_OS=aix
13583      VAR_OS_API=posix
13584      VAR_OS_ENV=aix
13585      ;;
13586    *)
13587      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13588      ;;
13589  esac
13590
13591
13592  # First argument is the cpu name from the trip/quad
13593  case "$host_cpu" in
13594    x86_64)
13595      VAR_CPU=x86_64
13596      VAR_CPU_ARCH=x86
13597      VAR_CPU_BITS=64
13598      VAR_CPU_ENDIAN=little
13599      ;;
13600    i?86)
13601      VAR_CPU=x86
13602      VAR_CPU_ARCH=x86
13603      VAR_CPU_BITS=32
13604      VAR_CPU_ENDIAN=little
13605      ;;
13606    arm*)
13607      VAR_CPU=arm
13608      VAR_CPU_ARCH=arm
13609      VAR_CPU_BITS=32
13610      VAR_CPU_ENDIAN=little
13611      ;;
13612    powerpc)
13613      VAR_CPU=ppc
13614      VAR_CPU_ARCH=ppc
13615      VAR_CPU_BITS=32
13616      VAR_CPU_ENDIAN=big
13617      ;;
13618    powerpc64)
13619      VAR_CPU=ppc64
13620      VAR_CPU_ARCH=ppc
13621      VAR_CPU_BITS=64
13622      VAR_CPU_ENDIAN=big
13623      ;;
13624    s390)
13625      VAR_CPU=s390
13626      VAR_CPU_ARCH=s390
13627      VAR_CPU_BITS=32
13628      VAR_CPU_ENDIAN=big
13629      ;;
13630    s390x)
13631      VAR_CPU=s390x
13632      VAR_CPU_ARCH=s390
13633      VAR_CPU_BITS=64
13634      VAR_CPU_ENDIAN=big
13635      ;;
13636    sparc)
13637      VAR_CPU=sparc
13638      VAR_CPU_ARCH=sparc
13639      VAR_CPU_BITS=32
13640      VAR_CPU_ENDIAN=big
13641      ;;
13642    sparcv9)
13643      VAR_CPU=sparcv9
13644      VAR_CPU_ARCH=sparc
13645      VAR_CPU_BITS=64
13646      VAR_CPU_ENDIAN=big
13647      ;;
13648    *)
13649      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13650      ;;
13651  esac
13652
13653  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13654  OPENJDK_TARGET_OS="$VAR_OS"
13655  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13656  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13657  OPENJDK_TARGET_CPU="$VAR_CPU"
13658  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13659  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13660  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13661
13662
13663
13664
13665
13666
13667
13668  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13669$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13671$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13672
13673
13674
13675# Check whether --with-target-bits was given.
13676if test "${with_target_bits+set}" = set; then :
13677  withval=$with_target_bits;
13678fi
13679
13680
13681  # We have three types of compiles:
13682  # native  == normal compilation, target system == build system
13683  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13684  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13685  #
13686  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13687    # We're doing a proper cross-compilation
13688    COMPILE_TYPE="cross"
13689  else
13690    COMPILE_TYPE="native"
13691  fi
13692
13693  if test "x$with_target_bits" != x; then
13694    if test "x$COMPILE_TYPE" = "xcross"; then
13695      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13696    fi
13697
13698    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13699      # A reduced build is requested
13700      COMPILE_TYPE="reduced"
13701      OPENJDK_TARGET_CPU_BITS=32
13702      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13703        OPENJDK_TARGET_CPU=x86
13704      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13705        OPENJDK_TARGET_CPU=sparc
13706      else
13707        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13708      fi
13709    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13710      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
13711    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13712      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13713$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13714    else
13715      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13716    fi
13717  fi
13718
13719
13720  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13721$as_echo_n "checking compilation type... " >&6; }
13722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13723$as_echo "$COMPILE_TYPE" >&6; }
13724
13725
13726  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13727    REQUIRED_OS_NAME=SunOS
13728    REQUIRED_OS_VERSION=5.10
13729  fi
13730  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13731    REQUIRED_OS_NAME=Linux
13732    REQUIRED_OS_VERSION=2.6
13733  fi
13734  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13735    REQUIRED_OS_NAME=Windows
13736    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13737      REQUIRED_OS_VERSION=5.2
13738    else
13739      REQUIRED_OS_VERSION=5.1
13740    fi
13741  fi
13742  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13743    REQUIRED_OS_NAME=Darwin
13744    REQUIRED_OS_VERSION=11.2
13745  fi
13746
13747
13748
13749
13750
13751  # Also store the legacy naming of the cpu.
13752  # Ie i586 and amd64 instead of x86 and x86_64
13753  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13754  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13755    OPENJDK_TARGET_CPU_LEGACY="i586"
13756  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13757    # On all platforms except MacOSX replace x86_64 with amd64.
13758    OPENJDK_TARGET_CPU_LEGACY="amd64"
13759  fi
13760
13761
13762  # And the second legacy naming of the cpu.
13763  # Ie i386 and amd64 instead of x86 and x86_64.
13764  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13765  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13766    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13767  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13768    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13769  fi
13770
13771
13772  # This is the name of the cpu (but using i386 and amd64 instead of
13773  # x86 and x86_64, respectively), preceeded by a /, to be used when
13774  # locating libraries. On macosx, it's empty, though.
13775  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13776  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13777    OPENJDK_TARGET_CPU_LIBDIR=""
13778  fi
13779
13780
13781  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13782  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13783  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13784  OPENJDK_TARGET_CPU_ISADIR=""
13785  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13786    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13787      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13788    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13789      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13790    fi
13791  fi
13792
13793
13794  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13795  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13796  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13797    # On linux only, we replace x86 with i386.
13798    OPENJDK_TARGET_CPU_OSARCH="i386"
13799  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13800    # On all platforms except macosx, we replace x86_64 with amd64.
13801    OPENJDK_TARGET_CPU_OSARCH="amd64"
13802  fi
13803
13804
13805  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13806  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13807    OPENJDK_TARGET_CPU_JLI="i386"
13808  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13809    # On all platforms except macosx, we replace x86_64 with amd64.
13810    OPENJDK_TARGET_CPU_JLI="amd64"
13811  fi
13812  # Now setup the -D flags for building libjli.
13813  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13814  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13815    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13816      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13817    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13818      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13819    fi
13820  fi
13821
13822
13823  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13824  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13825    OPENJDK_TARGET_OS_API_DIR="solaris"
13826  fi
13827  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13828    OPENJDK_TARGET_OS_API_DIR="windows"
13829  fi
13830
13831
13832  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13833      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13834  else
13835      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13836  fi
13837
13838
13839  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13840    A_LP64="LP64:="
13841    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13842    # unpack200.exe
13843    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13844      ADD_LP64="-D_LP64=1"
13845    fi
13846  fi
13847  LP64=$A_LP64
13848
13849
13850  if test "x$COMPILE_TYPE" = "xcross"; then
13851    # FIXME: ... or should this include reduced builds..?
13852    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13853  else
13854    DEFINE_CROSS_COMPILE_ARCH=""
13855  fi
13856
13857
13858  # ZERO_ARCHDEF is used to enable architecture-specific code
13859  case "${OPENJDK_TARGET_CPU}" in
13860    ppc*)    ZERO_ARCHDEF=PPC   ;;
13861    s390*)   ZERO_ARCHDEF=S390  ;;
13862    sparc*)  ZERO_ARCHDEF=SPARC ;;
13863    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13864    x86)     ZERO_ARCHDEF=IA32  ;;
13865    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13866  esac
13867
13868
13869
13870
13871# Continue setting up basic stuff. Most remaining code require fundamental tools.
13872
13873  # Save the current directory this script was started from
13874  CURDIR="$PWD"
13875
13876  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13877    PATH_SEP=";"
13878
13879  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13880  if test $SRC_ROOT_LENGTH -gt 100; then
13881    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13882  fi
13883
13884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13885    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13886$as_echo_n "checking cygwin release... " >&6; }
13887    CYGWIN_VERSION=`$UNAME -r`
13888    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13889$as_echo "$CYGWIN_VERSION" >&6; }
13890    WINDOWS_ENV_VENDOR='cygwin'
13891    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13892
13893    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
13894    if test "x$CYGWIN_VERSION_OK" = x; then
13895      { $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
13896$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;}
13897      as_fn_error $? "Cannot continue" "$LINENO" 5
13898    fi
13899    if test "x$CYGPATH" = x; then
13900      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13901    fi
13902    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13903$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13904    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13905    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13906    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13907    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13908    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13909$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13910    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13911    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13912    if test "x$test_cygdrive_prefix" = x; then
13913      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13914    fi
13915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13916    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13917$as_echo_n "checking msys release... " >&6; }
13918    MSYS_VERSION=`$UNAME -r`
13919    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13920$as_echo "$MSYS_VERSION" >&6; }
13921
13922    WINDOWS_ENV_VENDOR='msys'
13923    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13924
13925    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13926$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13927    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13928    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13929
13930  windows_path="$MSYS_ROOT_PATH"
13931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13932    unix_path=`$CYGPATH -u "$windows_path"`
13933    MSYS_ROOT_PATH="$unix_path"
13934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13936    MSYS_ROOT_PATH="$unix_path"
13937  fi
13938
13939    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13940$as_echo "$MSYS_ROOT_PATH" >&6; }
13941    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13942  else
13943    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13944  fi
13945
13946  # Test if windows or unix (cygwin/msys) find is first in path.
13947  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13948$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13949  FIND_BINARY_OUTPUT=`find --version 2>&1`
13950  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13951    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13952$as_echo "unix style" >&6; }
13953  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13954    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13955$as_echo "Windows" >&6; }
13956    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13957$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
13958    { $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
13959$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
13960    as_fn_error $? "Cannot continue" "$LINENO" 5
13961  else
13962    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
13963$as_echo "unknown" >&6; }
13964    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
13965$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
13966  fi
13967
13968  else
13969    PATH_SEP=":"
13970  fi
13971
13972
13973  # We get the top-level directory from the supporting wrappers.
13974  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
13975$as_echo_n "checking for top-level directory... " >&6; }
13976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
13977$as_echo "$TOPDIR" >&6; }
13978
13979
13980  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
13981
13982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13983
13984  # Input might be given as Windows format, start by converting to
13985  # unix format.
13986  path="$CURDIR"
13987  new_path=`$CYGPATH -u "$path"`
13988
13989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13992  # "foo.exe" is OK but "foo" is an error.
13993  #
13994  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13995  # It is also a way to make sure we got the proper file name for the real test later on.
13996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13997  if test "x$test_shortpath" = x; then
13998    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
13999$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14000    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14001  fi
14002
14003  # Call helper function which possibly converts this using DOS-style short mode.
14004  # If so, the updated path is stored in $new_path.
14005
14006  input_path="$new_path"
14007  # Check if we need to convert this using DOS-style short mode. If the path
14008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14009  # take no chances and rewrite it.
14010  # Note: m4 eats our [], so we need to use [ and ] instead.
14011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14012  if test "x$has_forbidden_chars" != x; then
14013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14014    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14015    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14016    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14017      # Going to short mode and back again did indeed matter. Since short mode is
14018      # case insensitive, let's make it lowercase to improve readability.
14019      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14020      # Now convert it back to Unix-stile (cygpath)
14021      input_path=`$CYGPATH -u "$shortmode_path"`
14022      new_path="$input_path"
14023    fi
14024  fi
14025
14026  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14027  if test "x$test_cygdrive_prefix" = x; then
14028    # As a simple fix, exclude /usr/bin since it's not a real path.
14029    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14030      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14031      # a path prefixed by /cygdrive for fixpath to work.
14032      new_path="$CYGWIN_ROOT_PATH$input_path"
14033    fi
14034  fi
14035
14036
14037  if test "x$path" != "x$new_path"; then
14038    CURDIR="$new_path"
14039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14040$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14041  fi
14042
14043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14044
14045  path="$CURDIR"
14046  has_colon=`$ECHO $path | $GREP ^.:`
14047  new_path="$path"
14048  if test "x$has_colon" = x; then
14049    # Not in mixed or Windows style, start by that.
14050    new_path=`cmd //c echo $path`
14051  fi
14052
14053
14054  input_path="$new_path"
14055  # Check if we need to convert this using DOS-style short mode. If the path
14056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14057  # take no chances and rewrite it.
14058  # Note: m4 eats our [], so we need to use [ and ] instead.
14059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14060  if test "x$has_forbidden_chars" != x; then
14061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14062    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14063  fi
14064
14065
14066  windows_path="$new_path"
14067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14068    unix_path=`$CYGPATH -u "$windows_path"`
14069    new_path="$unix_path"
14070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14072    new_path="$unix_path"
14073  fi
14074
14075  if test "x$path" != "x$new_path"; then
14076    CURDIR="$new_path"
14077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14078$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14079  fi
14080
14081  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14082  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14083
14084  else
14085    # We're on a posix platform. Hooray! :)
14086    path="$CURDIR"
14087    has_space=`$ECHO "$path" | $GREP " "`
14088    if test "x$has_space" != x; then
14089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14090$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14091      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14092    fi
14093
14094    # Use eval to expand a potential ~
14095    eval path="$path"
14096    if test ! -f "$path" && test ! -d "$path"; then
14097      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14098    fi
14099
14100    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14101  fi
14102
14103
14104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14105
14106  # Input might be given as Windows format, start by converting to
14107  # unix format.
14108  path="$TOPDIR"
14109  new_path=`$CYGPATH -u "$path"`
14110
14111  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14112  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14113  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14114  # "foo.exe" is OK but "foo" is an error.
14115  #
14116  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14117  # It is also a way to make sure we got the proper file name for the real test later on.
14118  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14119  if test "x$test_shortpath" = x; then
14120    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14121$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14122    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14123  fi
14124
14125  # Call helper function which possibly converts this using DOS-style short mode.
14126  # If so, the updated path is stored in $new_path.
14127
14128  input_path="$new_path"
14129  # Check if we need to convert this using DOS-style short mode. If the path
14130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14131  # take no chances and rewrite it.
14132  # Note: m4 eats our [], so we need to use [ and ] instead.
14133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14134  if test "x$has_forbidden_chars" != x; then
14135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14136    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14137    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14138    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14139      # Going to short mode and back again did indeed matter. Since short mode is
14140      # case insensitive, let's make it lowercase to improve readability.
14141      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14142      # Now convert it back to Unix-stile (cygpath)
14143      input_path=`$CYGPATH -u "$shortmode_path"`
14144      new_path="$input_path"
14145    fi
14146  fi
14147
14148  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14149  if test "x$test_cygdrive_prefix" = x; then
14150    # As a simple fix, exclude /usr/bin since it's not a real path.
14151    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14152      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14153      # a path prefixed by /cygdrive for fixpath to work.
14154      new_path="$CYGWIN_ROOT_PATH$input_path"
14155    fi
14156  fi
14157
14158
14159  if test "x$path" != "x$new_path"; then
14160    TOPDIR="$new_path"
14161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14162$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14163  fi
14164
14165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14166
14167  path="$TOPDIR"
14168  has_colon=`$ECHO $path | $GREP ^.:`
14169  new_path="$path"
14170  if test "x$has_colon" = x; then
14171    # Not in mixed or Windows style, start by that.
14172    new_path=`cmd //c echo $path`
14173  fi
14174
14175
14176  input_path="$new_path"
14177  # Check if we need to convert this using DOS-style short mode. If the path
14178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14179  # take no chances and rewrite it.
14180  # Note: m4 eats our [], so we need to use [ and ] instead.
14181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14182  if test "x$has_forbidden_chars" != x; then
14183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14184    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14185  fi
14186
14187
14188  windows_path="$new_path"
14189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14190    unix_path=`$CYGPATH -u "$windows_path"`
14191    new_path="$unix_path"
14192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14194    new_path="$unix_path"
14195  fi
14196
14197  if test "x$path" != "x$new_path"; then
14198    TOPDIR="$new_path"
14199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14200$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14201  fi
14202
14203  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14204  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14205
14206  else
14207    # We're on a posix platform. Hooray! :)
14208    path="$TOPDIR"
14209    has_space=`$ECHO "$path" | $GREP " "`
14210    if test "x$has_space" != x; then
14211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14212$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14213      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14214    fi
14215
14216    # Use eval to expand a potential ~
14217    eval path="$path"
14218    if test ! -f "$path" && test ! -d "$path"; then
14219      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14220    fi
14221
14222    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14223  fi
14224
14225  # SRC_ROOT is a traditional alias for TOPDIR.
14226  SRC_ROOT=$TOPDIR
14227
14228  # Locate the directory of this script.
14229  AUTOCONF_DIR=$TOPDIR/common/autoconf
14230
14231  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
14232    # Add extra search paths on solaris for utilities like ar and as etc...
14233    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
14234  fi
14235
14236  # You can force the sys-root if the sys-root encoded into the cross compiler tools
14237  # is not correct.
14238
14239# Check whether --with-sys-root was given.
14240if test "${with_sys_root+set}" = set; then :
14241  withval=$with_sys_root;
14242fi
14243
14244
14245  if test "x$with_sys_root" != x; then
14246    SYS_ROOT=$with_sys_root
14247  else
14248    SYS_ROOT=/
14249  fi
14250
14251
14252
14253# Check whether --with-tools-dir was given.
14254if test "${with_tools_dir+set}" = set; then :
14255  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
14256
14257fi
14258
14259
14260
14261# Check whether --with-devkit was given.
14262if test "${with_devkit+set}" = set; then :
14263  withval=$with_devkit;
14264        if test "x$with_sys_root" != x; then
14265          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
14266        fi
14267
14268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14269
14270  # Input might be given as Windows format, start by converting to
14271  # unix format.
14272  path="$with_devkit"
14273  new_path=`$CYGPATH -u "$path"`
14274
14275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14278  # "foo.exe" is OK but "foo" is an error.
14279  #
14280  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14281  # It is also a way to make sure we got the proper file name for the real test later on.
14282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14283  if test "x$test_shortpath" = x; then
14284    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14285$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14286    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14287  fi
14288
14289  # Call helper function which possibly converts this using DOS-style short mode.
14290  # If so, the updated path is stored in $new_path.
14291
14292  input_path="$new_path"
14293  # Check if we need to convert this using DOS-style short mode. If the path
14294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14295  # take no chances and rewrite it.
14296  # Note: m4 eats our [], so we need to use [ and ] instead.
14297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14298  if test "x$has_forbidden_chars" != x; then
14299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14303      # Going to short mode and back again did indeed matter. Since short mode is
14304      # case insensitive, let's make it lowercase to improve readability.
14305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14306      # Now convert it back to Unix-stile (cygpath)
14307      input_path=`$CYGPATH -u "$shortmode_path"`
14308      new_path="$input_path"
14309    fi
14310  fi
14311
14312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14313  if test "x$test_cygdrive_prefix" = x; then
14314    # As a simple fix, exclude /usr/bin since it's not a real path.
14315    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14317      # a path prefixed by /cygdrive for fixpath to work.
14318      new_path="$CYGWIN_ROOT_PATH$input_path"
14319    fi
14320  fi
14321
14322
14323  if test "x$path" != "x$new_path"; then
14324    with_devkit="$new_path"
14325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14326$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14327  fi
14328
14329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14330
14331  path="$with_devkit"
14332  has_colon=`$ECHO $path | $GREP ^.:`
14333  new_path="$path"
14334  if test "x$has_colon" = x; then
14335    # Not in mixed or Windows style, start by that.
14336    new_path=`cmd //c echo $path`
14337  fi
14338
14339
14340  input_path="$new_path"
14341  # Check if we need to convert this using DOS-style short mode. If the path
14342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14343  # take no chances and rewrite it.
14344  # Note: m4 eats our [], so we need to use [ and ] instead.
14345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14346  if test "x$has_forbidden_chars" != x; then
14347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14348    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14349  fi
14350
14351
14352  windows_path="$new_path"
14353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14354    unix_path=`$CYGPATH -u "$windows_path"`
14355    new_path="$unix_path"
14356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14358    new_path="$unix_path"
14359  fi
14360
14361  if test "x$path" != "x$new_path"; then
14362    with_devkit="$new_path"
14363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14364$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14365  fi
14366
14367  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14368  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14369
14370  else
14371    # We're on a posix platform. Hooray! :)
14372    path="$with_devkit"
14373    has_space=`$ECHO "$path" | $GREP " "`
14374    if test "x$has_space" != x; then
14375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14376$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14377      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14378    fi
14379
14380    # Use eval to expand a potential ~
14381    eval path="$path"
14382    if test ! -f "$path" && test ! -d "$path"; then
14383      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14384    fi
14385
14386    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14387  fi
14388
14389
14390  if test "x$TOOLS_DIR" = x; then
14391    TOOLS_DIR="$with_devkit/bin"
14392  else
14393    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
14394  fi
14395
14396        if test -d "$with_devkit/$host_alias/libc"; then
14397          SYS_ROOT=$with_devkit/$host_alias/libc
14398        elif test -d "$with_devkit/$host/sys-root"; then
14399          SYS_ROOT=$with_devkit/$host/sys-root
14400        fi
14401
14402fi
14403
14404
14405
14406  # Setup default logging of stdout and stderr to build.log in the output root.
14407  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14408  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14409  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14410
14411
14412
14413
14414
14415# Check if it's a pure open build or if custom sources are to be used.
14416
14417  # Check whether --enable-openjdk-only was given.
14418if test "${enable_openjdk_only+set}" = set; then :
14419  enableval=$enable_openjdk_only;
14420else
14421  enable_openjdk_only="no"
14422fi
14423
14424
14425  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14426$as_echo_n "checking for presence of closed sources... " >&6; }
14427  if test -d "$SRC_ROOT/jdk/src/closed"; then
14428    CLOSED_SOURCE_PRESENT=yes
14429  else
14430    CLOSED_SOURCE_PRESENT=no
14431  fi
14432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14433$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14434
14435  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14436$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14437  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14439$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14440
14441  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14442    OPENJDK=true
14443    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14444      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14445$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14446    fi
14447  else
14448    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14449      OPENJDK=true
14450    else
14451      OPENJDK=false
14452    fi
14453  fi
14454
14455  if test "x$OPENJDK" = "xtrue"; then
14456    SET_OPENJDK="OPENJDK=true"
14457  fi
14458
14459
14460
14461  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14462  # the IncludeCustomExtension macro.
14463
14464
14465# Check whether --with-custom-make-dir was given.
14466if test "${with_custom_make_dir+set}" = set; then :
14467  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
14468$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14469fi
14470
14471
14472
14473
14474# These are needed to be able to create a configuration name (and thus the output directory)
14475
14476  ###############################################################################
14477  #
14478  # Check which variant of the JDK that we want to build.
14479  # Currently we have:
14480  #    normal:   standard edition
14481  # but the custom make system may add other variants
14482  #
14483  # Effectively the JDK variant gives a name to a specific set of
14484  # modules to compile into the JDK. In the future, these modules
14485  # might even be Jigsaw modules.
14486  #
14487  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14488$as_echo_n "checking which variant of the JDK to build... " >&6; }
14489
14490# Check whether --with-jdk-variant was given.
14491if test "${with_jdk_variant+set}" = set; then :
14492  withval=$with_jdk_variant;
14493fi
14494
14495
14496  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14497    JDK_VARIANT="normal"
14498  else
14499    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14500  fi
14501
14502
14503
14504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14505$as_echo "$JDK_VARIANT" >&6; }
14506
14507
14508###############################################################################
14509#
14510# Check which interpreter of the JVM we want to build.
14511# Currently we have:
14512#    template: Template interpreter (the default)
14513#    cpp     : C++ interpreter
14514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14515$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14516
14517# Check whether --with-jvm-interpreter was given.
14518if test "${with_jvm_interpreter+set}" = set; then :
14519  withval=$with_jvm_interpreter;
14520fi
14521
14522
14523if test "x$with_jvm_interpreter" = x; then
14524     with_jvm_interpreter="template"
14525fi
14526
14527JVM_INTERPRETER="$with_jvm_interpreter"
14528
14529if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14530   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14531fi
14532
14533
14534
14535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14536$as_echo "$with_jvm_interpreter" >&6; }
14537
14538
14539
14540  ###############################################################################
14541  #
14542  # Check which variants of the JVM that we want to build.
14543  # Currently we have:
14544  #    server: normal interpreter and a tiered C1/C2 compiler
14545  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14546  #    minimal1: reduced form of client with optional VM services and features stripped out
14547  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14548  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14549  #    zero: no machine code interpreter, no compiler
14550  #    zeroshark: zero interpreter and shark/llvm compiler backend
14551#    core: interpreter only, no compiler (only works on some platforms)
14552  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14553$as_echo_n "checking which variants of the JVM to build... " >&6; }
14554
14555# Check whether --with-jvm-variants was given.
14556if test "${with_jvm_variants+set}" = set; then :
14557  withval=$with_jvm_variants;
14558fi
14559
14560
14561  if test "x$with_jvm_variants" = x; then
14562    with_jvm_variants="server"
14563  fi
14564
14565  JVM_VARIANTS=",$with_jvm_variants,"
14566  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,//'`
14567
14568  if test "x$TEST_VARIANTS" != "x,"; then
14569     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14570  fi
14571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14572$as_echo "$with_jvm_variants" >&6; }
14573
14574  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14575  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14576  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14577  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14578  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14579  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14580  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14581
14582  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14583    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14584      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14585    fi
14586  fi
14587  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14588    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14589      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14590    fi
14591  fi
14592  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14593    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14594      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14595    fi
14596  fi
14597
14598  # Replace the commas with AND for use in the build directory name.
14599  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14600  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/'`
14601  if test "x$COUNT_VARIANTS" != "x,1"; then
14602    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14603  else
14604    BUILDING_MULTIPLE_JVM_VARIANTS=no
14605  fi
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616  INCLUDE_SA=true
14617  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14618    INCLUDE_SA=false
14619  fi
14620  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14621    INCLUDE_SA=false
14622  fi
14623  if test "x$VAR_CPU" = xppc64 ; then
14624    INCLUDE_SA=false
14625  fi
14626
14627
14628  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14629    MACOSX_UNIVERSAL="true"
14630  fi
14631
14632
14633
14634
14635  ###############################################################################
14636  #
14637  # Set the debug level
14638  #    release: no debug information, all optimizations, no asserts.
14639  #    fastdebug: debug information (-g), all optimizations, all asserts
14640  #    slowdebug: debug information (-g), no optimizations, all asserts
14641  #
14642  DEBUG_LEVEL="release"
14643  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14644$as_echo_n "checking which debug level to use... " >&6; }
14645  # Check whether --enable-debug was given.
14646if test "${enable_debug+set}" = set; then :
14647  enableval=$enable_debug;
14648        ENABLE_DEBUG="${enableval}"
14649        DEBUG_LEVEL="fastdebug"
14650
14651else
14652  ENABLE_DEBUG="no"
14653fi
14654
14655
14656
14657# Check whether --with-debug-level was given.
14658if test "${with_debug_level+set}" = set; then :
14659  withval=$with_debug_level;
14660        DEBUG_LEVEL="${withval}"
14661        if test "x$ENABLE_DEBUG" = xyes; then
14662          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14663        fi
14664
14665fi
14666
14667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14668$as_echo "$DEBUG_LEVEL" >&6; }
14669
14670  if test "x$DEBUG_LEVEL" != xrelease && \
14671      test "x$DEBUG_LEVEL" != xfastdebug && \
14672      test "x$DEBUG_LEVEL" != xslowdebug; then
14673    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14674  fi
14675
14676
14677  ###############################################################################
14678  #
14679  # Setup legacy vars/targets and new vars to deal with different debug levels.
14680  #
14681
14682  case $DEBUG_LEVEL in
14683    release )
14684      VARIANT="OPT"
14685      FASTDEBUG="false"
14686      DEBUG_CLASSFILES="false"
14687      BUILD_VARIANT_RELEASE=""
14688      HOTSPOT_DEBUG_LEVEL="product"
14689      HOTSPOT_EXPORT="product"
14690      ;;
14691    fastdebug )
14692      VARIANT="DBG"
14693      FASTDEBUG="true"
14694      DEBUG_CLASSFILES="true"
14695      BUILD_VARIANT_RELEASE="-fastdebug"
14696      HOTSPOT_DEBUG_LEVEL="fastdebug"
14697      HOTSPOT_EXPORT="fastdebug"
14698      ;;
14699    slowdebug )
14700      VARIANT="DBG"
14701      FASTDEBUG="false"
14702      DEBUG_CLASSFILES="true"
14703      BUILD_VARIANT_RELEASE="-debug"
14704      HOTSPOT_DEBUG_LEVEL="jvmg"
14705      HOTSPOT_EXPORT="debug"
14706      ;;
14707  esac
14708
14709  #####
14710  # Generate the legacy makefile targets for hotspot.
14711  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14712  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14713  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14714  # But until then ...
14715  HOTSPOT_TARGET=""
14716
14717  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14718    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14719  fi
14720
14721  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14722    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14723  fi
14724
14725  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14726    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14727  fi
14728
14729  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14730    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14731  fi
14732
14733  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14734    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14735  fi
14736
14737  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14738    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14739  fi
14740
14741  if test "x$JVM_VARIANT_CORE" = xtrue; then
14742    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14743  fi
14744
14745  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14746
14747  # On Macosx universal binaries are produced, but they only contain
14748  # 64 bit intel. This invalidates control of which jvms are built
14749  # from configure, but only server is valid anyway. Fix this
14750  # when hotspot makefiles are rewritten.
14751  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14752    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14753  fi
14754
14755  #####
14756
14757
14758
14759
14760
14761
14762
14763
14764# With basic setup done, call the custom early hook.
14765
14766
14767# To properly create a configuration name, we need to have the OpenJDK target
14768# and options (variants and debug level) parsed.
14769
14770
14771
14772# Check whether --with-conf-name was given.
14773if test "${with_conf_name+set}" = set; then :
14774  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
14775fi
14776
14777
14778  # Test from where we are running configure, in or outside of src root.
14779  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
14780$as_echo_n "checking where to store configuration... " >&6; }
14781  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
14782      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
14783      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
14784    # We are running configure from the src root.
14785    # Create a default ./build/target-variant-debuglevel output root.
14786    if test "x${CONF_NAME}" = x; then
14787      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
14788$as_echo "in default location" >&6; }
14789      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
14790    else
14791      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
14792$as_echo "in build directory with custom name" >&6; }
14793    fi
14794    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
14795    $MKDIR -p "$OUTPUT_ROOT"
14796    if test ! -d "$OUTPUT_ROOT"; then
14797      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
14798    fi
14799  else
14800    # We are running configure from outside of the src dir.
14801    # Then use the current directory as output dir!
14802    # If configuration is situated in normal build directory, just use the build
14803    # directory name as configuration name, otherwise use the complete path.
14804    if test "x${CONF_NAME}" = x; then
14805      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
14806    fi
14807    OUTPUT_ROOT="$CURDIR"
14808    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
14809$as_echo "in current directory" >&6; }
14810
14811    # WARNING: This might be a bad thing to do. You need to be sure you want to
14812    # have a configuration in this directory. Do some sanity checks!
14813
14814    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
14815      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
14816      # other files
14817      files_present=`$LS $OUTPUT_ROOT`
14818      # Configure has already touched config.log and confdefs.h in the current dir when this check
14819      # is performed.
14820      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
14821      | $TR -d '\n'`
14822      if test "x$filtered_files" != x; then
14823        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
14824$as_echo "$as_me: Current directory is $CURDIR." >&6;}
14825        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
14826$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
14827        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
14828$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
14829        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
14830$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
14831        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
14832$as_echo "$as_me: seriously mess up just about everything." >&6;}
14833        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
14834$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
14835        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
14836$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
14837        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
14838      fi
14839    fi
14840  fi
14841  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
14842$as_echo_n "checking what configuration name to use... " >&6; }
14843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
14844$as_echo "$CONF_NAME" >&6; }
14845
14846
14847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14848
14849  # Input might be given as Windows format, start by converting to
14850  # unix format.
14851  path="$OUTPUT_ROOT"
14852  new_path=`$CYGPATH -u "$path"`
14853
14854  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14855  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14856  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14857  # "foo.exe" is OK but "foo" is an error.
14858  #
14859  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14860  # It is also a way to make sure we got the proper file name for the real test later on.
14861  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14862  if test "x$test_shortpath" = x; then
14863    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14864$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14865    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
14866  fi
14867
14868  # Call helper function which possibly converts this using DOS-style short mode.
14869  # If so, the updated path is stored in $new_path.
14870
14871  input_path="$new_path"
14872  # Check if we need to convert this using DOS-style short mode. If the path
14873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14874  # take no chances and rewrite it.
14875  # Note: m4 eats our [], so we need to use [ and ] instead.
14876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14877  if test "x$has_forbidden_chars" != x; then
14878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14882      # Going to short mode and back again did indeed matter. Since short mode is
14883      # case insensitive, let's make it lowercase to improve readability.
14884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14885      # Now convert it back to Unix-stile (cygpath)
14886      input_path=`$CYGPATH -u "$shortmode_path"`
14887      new_path="$input_path"
14888    fi
14889  fi
14890
14891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14892  if test "x$test_cygdrive_prefix" = x; then
14893    # As a simple fix, exclude /usr/bin since it's not a real path.
14894    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14896      # a path prefixed by /cygdrive for fixpath to work.
14897      new_path="$CYGWIN_ROOT_PATH$input_path"
14898    fi
14899  fi
14900
14901
14902  if test "x$path" != "x$new_path"; then
14903    OUTPUT_ROOT="$new_path"
14904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14905$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14906  fi
14907
14908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14909
14910  path="$OUTPUT_ROOT"
14911  has_colon=`$ECHO $path | $GREP ^.:`
14912  new_path="$path"
14913  if test "x$has_colon" = x; then
14914    # Not in mixed or Windows style, start by that.
14915    new_path=`cmd //c echo $path`
14916  fi
14917
14918
14919  input_path="$new_path"
14920  # Check if we need to convert this using DOS-style short mode. If the path
14921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14922  # take no chances and rewrite it.
14923  # Note: m4 eats our [], so we need to use [ and ] instead.
14924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14925  if test "x$has_forbidden_chars" != x; then
14926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14927    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14928  fi
14929
14930
14931  windows_path="$new_path"
14932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14933    unix_path=`$CYGPATH -u "$windows_path"`
14934    new_path="$unix_path"
14935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14937    new_path="$unix_path"
14938  fi
14939
14940  if test "x$path" != "x$new_path"; then
14941    OUTPUT_ROOT="$new_path"
14942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14943$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14944  fi
14945
14946  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14947  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14948
14949  else
14950    # We're on a posix platform. Hooray! :)
14951    path="$OUTPUT_ROOT"
14952    has_space=`$ECHO "$path" | $GREP " "`
14953    if test "x$has_space" != x; then
14954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14955$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14956      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14957    fi
14958
14959    # Use eval to expand a potential ~
14960    eval path="$path"
14961    if test ! -f "$path" && test ! -d "$path"; then
14962      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
14963    fi
14964
14965    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
14966  fi
14967
14968
14969  SPEC=$OUTPUT_ROOT/spec.gmk
14970
14971  CONF_NAME=$CONF_NAME
14972
14973  OUTPUT_ROOT=$OUTPUT_ROOT
14974
14975
14976  # Most of the probed defines are put into config.h
14977  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
14978
14979  # The spec.gmk file contains all variables for the make system.
14980  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
14981
14982  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
14983  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
14984
14985  # The bootcycle-spec.gmk file contains support for boot cycle builds.
14986  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
14987
14988  # The compare.sh is used to compare the build output to other builds.
14989  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
14990
14991  # Spec.sh is currently used by compare-objects.sh
14992  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
14993
14994  # The generated Makefile knows where the spec.gmk is and where the source is.
14995  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
14996  # which will look for generated configurations
14997  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
14998
14999
15000
15001# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15002
15003  for ac_prog in apt-get yum port pkgutil pkgadd
15004do
15005  # Extract the first word of "$ac_prog", so it can be a program name with args.
15006set dummy $ac_prog; ac_word=$2
15007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15008$as_echo_n "checking for $ac_word... " >&6; }
15009if ${ac_cv_prog_PKGHANDLER+:} false; then :
15010  $as_echo_n "(cached) " >&6
15011else
15012  if test -n "$PKGHANDLER"; then
15013  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15014else
15015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15016for as_dir in $PATH
15017do
15018  IFS=$as_save_IFS
15019  test -z "$as_dir" && as_dir=.
15020    for ac_exec_ext in '' $ac_executable_extensions; do
15021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15022    ac_cv_prog_PKGHANDLER="$ac_prog"
15023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15024    break 2
15025  fi
15026done
15027  done
15028IFS=$as_save_IFS
15029
15030fi
15031fi
15032PKGHANDLER=$ac_cv_prog_PKGHANDLER
15033if test -n "$PKGHANDLER"; then
15034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15035$as_echo "$PKGHANDLER" >&6; }
15036else
15037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15038$as_echo "no" >&6; }
15039fi
15040
15041
15042  test -n "$PKGHANDLER" && break
15043done
15044
15045
15046
15047# Setup tools that requires more complex handling, or that is not needed by the configure script.
15048
15049
15050  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15051  if test "x$MAKE" != x; then
15052    # User has supplied a make, test it.
15053    if test ! -f "$MAKE"; then
15054      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15055    fi
15056
15057  MAKE_CANDIDATE=""$MAKE""
15058  DESCRIPTION="user supplied MAKE=$MAKE"
15059  if test "x$MAKE_CANDIDATE" != x; then
15060    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15061$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15062    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15063    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15064    if test "x$IS_GNU_MAKE" = x; then
15065      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15066$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15067    else
15068      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15069      if test "x$IS_MODERN_MAKE" = x; then
15070        { $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
15071$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;}
15072      else
15073        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15074          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15075            MAKE_EXPECTED_ENV='cygwin'
15076          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15077            MAKE_EXPECTED_ENV='msys'
15078          else
15079            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15080          fi
15081          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15082          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15083        else
15084          # Not relevant for non-Windows
15085          IS_MAKE_CORRECT_ENV=true
15086        fi
15087        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15088          { $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
15089$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;}
15090        else
15091          FOUND_MAKE=$MAKE_CANDIDATE
15092
15093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15094
15095  # First separate the path from the arguments. This will split at the first
15096  # space.
15097  complete="$FOUND_MAKE"
15098  path="${complete%% *}"
15099  tmp="$complete EOL"
15100  arguments="${tmp#* }"
15101
15102  # Input might be given as Windows format, start by converting to
15103  # unix format.
15104  new_path=`$CYGPATH -u "$path"`
15105
15106  # Now try to locate executable using which
15107  new_path=`$WHICH "$new_path" 2> /dev/null`
15108  # bat and cmd files are not always considered executable in cygwin causing which
15109  # to not find them
15110  if test "x$new_path" = x \
15111      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15112      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15113    new_path=`$CYGPATH -u "$path"`
15114  fi
15115  if test "x$new_path" = x; then
15116    # Oops. Which didn't find the executable.
15117    # The splitting of arguments from the executable at a space might have been incorrect,
15118    # since paths with space are more likely in Windows. Give it another try with the whole
15119    # argument.
15120    path="$complete"
15121    arguments="EOL"
15122    new_path=`$CYGPATH -u "$path"`
15123    new_path=`$WHICH "$new_path" 2> /dev/null`
15124    # bat and cmd files are not always considered executable in cygwin causing which
15125    # to not find them
15126    if test "x$new_path" = x \
15127        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15128        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15129      new_path=`$CYGPATH -u "$path"`
15130    fi
15131    if test "x$new_path" = x; then
15132      # It's still not found. Now this is an unrecoverable error.
15133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15134$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15135      has_space=`$ECHO "$complete" | $GREP " "`
15136      if test "x$has_space" != x; then
15137        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15138$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15139      fi
15140      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15141    fi
15142  fi
15143
15144  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15145  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15146  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15147  # "foo.exe" is OK but "foo" is an error.
15148  #
15149  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15150  # It is also a way to make sure we got the proper file name for the real test later on.
15151  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15152  if test "x$test_shortpath" = x; then
15153    # Short path failed, file does not exist as specified.
15154    # Try adding .exe or .cmd
15155    if test -f "${new_path}.exe"; then
15156      input_to_shortpath="${new_path}.exe"
15157    elif test -f "${new_path}.cmd"; then
15158      input_to_shortpath="${new_path}.cmd"
15159    else
15160      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15161$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15162      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15163$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15164      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15165    fi
15166  else
15167    input_to_shortpath="$new_path"
15168  fi
15169
15170  # Call helper function which possibly converts this using DOS-style short mode.
15171  # If so, the updated path is stored in $new_path.
15172  new_path="$input_to_shortpath"
15173
15174  input_path="$input_to_shortpath"
15175  # Check if we need to convert this using DOS-style short mode. If the path
15176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15177  # take no chances and rewrite it.
15178  # Note: m4 eats our [], so we need to use [ and ] instead.
15179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15180  if test "x$has_forbidden_chars" != x; then
15181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15185      # Going to short mode and back again did indeed matter. Since short mode is
15186      # case insensitive, let's make it lowercase to improve readability.
15187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15188      # Now convert it back to Unix-stile (cygpath)
15189      input_path=`$CYGPATH -u "$shortmode_path"`
15190      new_path="$input_path"
15191    fi
15192  fi
15193
15194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15195  if test "x$test_cygdrive_prefix" = x; then
15196    # As a simple fix, exclude /usr/bin since it's not a real path.
15197    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15199      # a path prefixed by /cygdrive for fixpath to work.
15200      new_path="$CYGWIN_ROOT_PATH$input_path"
15201    fi
15202  fi
15203
15204  # remove trailing .exe if any
15205  new_path="${new_path/%.exe/}"
15206
15207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15208
15209  # First separate the path from the arguments. This will split at the first
15210  # space.
15211  complete="$FOUND_MAKE"
15212  path="${complete%% *}"
15213  tmp="$complete EOL"
15214  arguments="${tmp#* }"
15215
15216  # Input might be given as Windows format, start by converting to
15217  # unix format.
15218  new_path="$path"
15219
15220  windows_path="$new_path"
15221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15222    unix_path=`$CYGPATH -u "$windows_path"`
15223    new_path="$unix_path"
15224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15226    new_path="$unix_path"
15227  fi
15228
15229
15230  # Now try to locate executable using which
15231  new_path=`$WHICH "$new_path" 2> /dev/null`
15232
15233  if test "x$new_path" = x; then
15234    # Oops. Which didn't find the executable.
15235    # The splitting of arguments from the executable at a space might have been incorrect,
15236    # since paths with space are more likely in Windows. Give it another try with the whole
15237    # argument.
15238    path="$complete"
15239    arguments="EOL"
15240    new_path="$path"
15241
15242  windows_path="$new_path"
15243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15244    unix_path=`$CYGPATH -u "$windows_path"`
15245    new_path="$unix_path"
15246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15248    new_path="$unix_path"
15249  fi
15250
15251
15252    new_path=`$WHICH "$new_path" 2> /dev/null`
15253
15254    if test "x$new_path" = x; then
15255      # It's still not found. Now this is an unrecoverable error.
15256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15257$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15258      has_space=`$ECHO "$complete" | $GREP " "`
15259      if test "x$has_space" != x; then
15260        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15261$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15262      fi
15263      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15264    fi
15265  fi
15266
15267  # Now new_path has a complete unix path to the binary
15268  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15269    # Keep paths in /bin as-is, but remove trailing .exe if any
15270    new_path="${new_path/%.exe/}"
15271    # Do not save /bin paths to all_fixpath_prefixes!
15272  else
15273    # Not in mixed or Windows style, start by that.
15274    new_path=`cmd //c echo $new_path`
15275
15276  input_path="$new_path"
15277  # Check if we need to convert this using DOS-style short mode. If the path
15278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15279  # take no chances and rewrite it.
15280  # Note: m4 eats our [], so we need to use [ and ] instead.
15281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15282  if test "x$has_forbidden_chars" != x; then
15283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15284    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15285  fi
15286
15287    # Output is in $new_path
15288
15289  windows_path="$new_path"
15290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15291    unix_path=`$CYGPATH -u "$windows_path"`
15292    new_path="$unix_path"
15293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15295    new_path="$unix_path"
15296  fi
15297
15298    # remove trailing .exe if any
15299    new_path="${new_path/%.exe/}"
15300
15301    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15302    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15303  fi
15304
15305  else
15306    # We're on a posix platform. Hooray! :)
15307    # First separate the path from the arguments. This will split at the first
15308    # space.
15309    complete="$FOUND_MAKE"
15310    path="${complete%% *}"
15311    tmp="$complete EOL"
15312    arguments="${tmp#* }"
15313
15314    # Cannot rely on the command "which" here since it doesn't always work.
15315    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15316    if test -z "$is_absolute_path"; then
15317      # Path to executable is not absolute. Find it.
15318      IFS_save="$IFS"
15319      IFS=:
15320      for p in $PATH; do
15321        if test -f "$p/$path" && test -x "$p/$path"; then
15322          new_path="$p/$path"
15323          break
15324        fi
15325      done
15326      IFS="$IFS_save"
15327    else
15328      # This is an absolute path, we can use it without further modifications.
15329      new_path="$path"
15330    fi
15331
15332    if test "x$new_path" = x; then
15333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15334$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15335      has_space=`$ECHO "$complete" | $GREP " "`
15336      if test "x$has_space" != x; then
15337        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15338$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15339      fi
15340      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15341    fi
15342  fi
15343
15344  # Now join together the path and the arguments once again
15345  if test "x$arguments" != xEOL; then
15346    new_complete="$new_path ${arguments% *}"
15347  else
15348    new_complete="$new_path"
15349  fi
15350
15351  if test "x$complete" != "x$new_complete"; then
15352    FOUND_MAKE="$new_complete"
15353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15354$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15355  fi
15356
15357        fi
15358      fi
15359    fi
15360  fi
15361
15362    if test "x$FOUND_MAKE" = x; then
15363      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15364    fi
15365  else
15366    # Try our hardest to locate a correct version of GNU make
15367    for ac_prog in gmake
15368do
15369  # Extract the first word of "$ac_prog", so it can be a program name with args.
15370set dummy $ac_prog; ac_word=$2
15371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15372$as_echo_n "checking for $ac_word... " >&6; }
15373if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15374  $as_echo_n "(cached) " >&6
15375else
15376  case $CHECK_GMAKE in
15377  [\\/]* | ?:[\\/]*)
15378  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15379  ;;
15380  *)
15381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15382for as_dir in $PATH
15383do
15384  IFS=$as_save_IFS
15385  test -z "$as_dir" && as_dir=.
15386    for ac_exec_ext in '' $ac_executable_extensions; do
15387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15388    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15390    break 2
15391  fi
15392done
15393  done
15394IFS=$as_save_IFS
15395
15396  ;;
15397esac
15398fi
15399CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15400if test -n "$CHECK_GMAKE"; then
15401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15402$as_echo "$CHECK_GMAKE" >&6; }
15403else
15404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15405$as_echo "no" >&6; }
15406fi
15407
15408
15409  test -n "$CHECK_GMAKE" && break
15410done
15411
15412
15413  MAKE_CANDIDATE=""$CHECK_GMAKE""
15414  DESCRIPTION="gmake in PATH"
15415  if test "x$MAKE_CANDIDATE" != x; then
15416    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15417$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15418    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15419    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15420    if test "x$IS_GNU_MAKE" = x; then
15421      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15422$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15423    else
15424      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15425      if test "x$IS_MODERN_MAKE" = x; then
15426        { $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
15427$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;}
15428      else
15429        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15430          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15431            MAKE_EXPECTED_ENV='cygwin'
15432          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15433            MAKE_EXPECTED_ENV='msys'
15434          else
15435            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15436          fi
15437          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15438          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15439        else
15440          # Not relevant for non-Windows
15441          IS_MAKE_CORRECT_ENV=true
15442        fi
15443        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15444          { $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
15445$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;}
15446        else
15447          FOUND_MAKE=$MAKE_CANDIDATE
15448
15449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15450
15451  # First separate the path from the arguments. This will split at the first
15452  # space.
15453  complete="$FOUND_MAKE"
15454  path="${complete%% *}"
15455  tmp="$complete EOL"
15456  arguments="${tmp#* }"
15457
15458  # Input might be given as Windows format, start by converting to
15459  # unix format.
15460  new_path=`$CYGPATH -u "$path"`
15461
15462  # Now try to locate executable using which
15463  new_path=`$WHICH "$new_path" 2> /dev/null`
15464  # bat and cmd files are not always considered executable in cygwin causing which
15465  # to not find them
15466  if test "x$new_path" = x \
15467      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15468      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15469    new_path=`$CYGPATH -u "$path"`
15470  fi
15471  if test "x$new_path" = x; then
15472    # Oops. Which didn't find the executable.
15473    # The splitting of arguments from the executable at a space might have been incorrect,
15474    # since paths with space are more likely in Windows. Give it another try with the whole
15475    # argument.
15476    path="$complete"
15477    arguments="EOL"
15478    new_path=`$CYGPATH -u "$path"`
15479    new_path=`$WHICH "$new_path" 2> /dev/null`
15480    # bat and cmd files are not always considered executable in cygwin causing which
15481    # to not find them
15482    if test "x$new_path" = x \
15483        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15484        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15485      new_path=`$CYGPATH -u "$path"`
15486    fi
15487    if test "x$new_path" = x; then
15488      # It's still not found. Now this is an unrecoverable error.
15489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15490$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15491      has_space=`$ECHO "$complete" | $GREP " "`
15492      if test "x$has_space" != x; then
15493        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15494$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15495      fi
15496      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15497    fi
15498  fi
15499
15500  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15501  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15502  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15503  # "foo.exe" is OK but "foo" is an error.
15504  #
15505  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15506  # It is also a way to make sure we got the proper file name for the real test later on.
15507  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15508  if test "x$test_shortpath" = x; then
15509    # Short path failed, file does not exist as specified.
15510    # Try adding .exe or .cmd
15511    if test -f "${new_path}.exe"; then
15512      input_to_shortpath="${new_path}.exe"
15513    elif test -f "${new_path}.cmd"; then
15514      input_to_shortpath="${new_path}.cmd"
15515    else
15516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15517$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15518      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15519$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15520      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15521    fi
15522  else
15523    input_to_shortpath="$new_path"
15524  fi
15525
15526  # Call helper function which possibly converts this using DOS-style short mode.
15527  # If so, the updated path is stored in $new_path.
15528  new_path="$input_to_shortpath"
15529
15530  input_path="$input_to_shortpath"
15531  # Check if we need to convert this using DOS-style short mode. If the path
15532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15533  # take no chances and rewrite it.
15534  # Note: m4 eats our [], so we need to use [ and ] instead.
15535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15536  if test "x$has_forbidden_chars" != x; then
15537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15541      # Going to short mode and back again did indeed matter. Since short mode is
15542      # case insensitive, let's make it lowercase to improve readability.
15543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15544      # Now convert it back to Unix-stile (cygpath)
15545      input_path=`$CYGPATH -u "$shortmode_path"`
15546      new_path="$input_path"
15547    fi
15548  fi
15549
15550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15551  if test "x$test_cygdrive_prefix" = x; then
15552    # As a simple fix, exclude /usr/bin since it's not a real path.
15553    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15555      # a path prefixed by /cygdrive for fixpath to work.
15556      new_path="$CYGWIN_ROOT_PATH$input_path"
15557    fi
15558  fi
15559
15560  # remove trailing .exe if any
15561  new_path="${new_path/%.exe/}"
15562
15563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15564
15565  # First separate the path from the arguments. This will split at the first
15566  # space.
15567  complete="$FOUND_MAKE"
15568  path="${complete%% *}"
15569  tmp="$complete EOL"
15570  arguments="${tmp#* }"
15571
15572  # Input might be given as Windows format, start by converting to
15573  # unix format.
15574  new_path="$path"
15575
15576  windows_path="$new_path"
15577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15578    unix_path=`$CYGPATH -u "$windows_path"`
15579    new_path="$unix_path"
15580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15582    new_path="$unix_path"
15583  fi
15584
15585
15586  # Now try to locate executable using which
15587  new_path=`$WHICH "$new_path" 2> /dev/null`
15588
15589  if test "x$new_path" = x; then
15590    # Oops. Which didn't find the executable.
15591    # The splitting of arguments from the executable at a space might have been incorrect,
15592    # since paths with space are more likely in Windows. Give it another try with the whole
15593    # argument.
15594    path="$complete"
15595    arguments="EOL"
15596    new_path="$path"
15597
15598  windows_path="$new_path"
15599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15600    unix_path=`$CYGPATH -u "$windows_path"`
15601    new_path="$unix_path"
15602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15604    new_path="$unix_path"
15605  fi
15606
15607
15608    new_path=`$WHICH "$new_path" 2> /dev/null`
15609
15610    if test "x$new_path" = x; then
15611      # It's still not found. Now this is an unrecoverable error.
15612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15613$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15614      has_space=`$ECHO "$complete" | $GREP " "`
15615      if test "x$has_space" != x; then
15616        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15617$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15618      fi
15619      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15620    fi
15621  fi
15622
15623  # Now new_path has a complete unix path to the binary
15624  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15625    # Keep paths in /bin as-is, but remove trailing .exe if any
15626    new_path="${new_path/%.exe/}"
15627    # Do not save /bin paths to all_fixpath_prefixes!
15628  else
15629    # Not in mixed or Windows style, start by that.
15630    new_path=`cmd //c echo $new_path`
15631
15632  input_path="$new_path"
15633  # Check if we need to convert this using DOS-style short mode. If the path
15634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15635  # take no chances and rewrite it.
15636  # Note: m4 eats our [], so we need to use [ and ] instead.
15637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15638  if test "x$has_forbidden_chars" != x; then
15639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15640    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15641  fi
15642
15643    # Output is in $new_path
15644
15645  windows_path="$new_path"
15646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15647    unix_path=`$CYGPATH -u "$windows_path"`
15648    new_path="$unix_path"
15649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15651    new_path="$unix_path"
15652  fi
15653
15654    # remove trailing .exe if any
15655    new_path="${new_path/%.exe/}"
15656
15657    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15658    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15659  fi
15660
15661  else
15662    # We're on a posix platform. Hooray! :)
15663    # First separate the path from the arguments. This will split at the first
15664    # space.
15665    complete="$FOUND_MAKE"
15666    path="${complete%% *}"
15667    tmp="$complete EOL"
15668    arguments="${tmp#* }"
15669
15670    # Cannot rely on the command "which" here since it doesn't always work.
15671    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15672    if test -z "$is_absolute_path"; then
15673      # Path to executable is not absolute. Find it.
15674      IFS_save="$IFS"
15675      IFS=:
15676      for p in $PATH; do
15677        if test -f "$p/$path" && test -x "$p/$path"; then
15678          new_path="$p/$path"
15679          break
15680        fi
15681      done
15682      IFS="$IFS_save"
15683    else
15684      # This is an absolute path, we can use it without further modifications.
15685      new_path="$path"
15686    fi
15687
15688    if test "x$new_path" = x; then
15689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15690$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15691      has_space=`$ECHO "$complete" | $GREP " "`
15692      if test "x$has_space" != x; then
15693        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15694$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15695      fi
15696      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15697    fi
15698  fi
15699
15700  # Now join together the path and the arguments once again
15701  if test "x$arguments" != xEOL; then
15702    new_complete="$new_path ${arguments% *}"
15703  else
15704    new_complete="$new_path"
15705  fi
15706
15707  if test "x$complete" != "x$new_complete"; then
15708    FOUND_MAKE="$new_complete"
15709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15710$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15711  fi
15712
15713        fi
15714      fi
15715    fi
15716  fi
15717
15718
15719    if test "x$FOUND_MAKE" = x; then
15720      for ac_prog in make
15721do
15722  # Extract the first word of "$ac_prog", so it can be a program name with args.
15723set dummy $ac_prog; ac_word=$2
15724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15725$as_echo_n "checking for $ac_word... " >&6; }
15726if ${ac_cv_path_CHECK_MAKE+:} false; then :
15727  $as_echo_n "(cached) " >&6
15728else
15729  case $CHECK_MAKE in
15730  [\\/]* | ?:[\\/]*)
15731  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
15732  ;;
15733  *)
15734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15735for as_dir in $PATH
15736do
15737  IFS=$as_save_IFS
15738  test -z "$as_dir" && as_dir=.
15739    for ac_exec_ext in '' $ac_executable_extensions; do
15740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15741    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
15742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15743    break 2
15744  fi
15745done
15746  done
15747IFS=$as_save_IFS
15748
15749  ;;
15750esac
15751fi
15752CHECK_MAKE=$ac_cv_path_CHECK_MAKE
15753if test -n "$CHECK_MAKE"; then
15754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
15755$as_echo "$CHECK_MAKE" >&6; }
15756else
15757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15758$as_echo "no" >&6; }
15759fi
15760
15761
15762  test -n "$CHECK_MAKE" && break
15763done
15764
15765
15766  MAKE_CANDIDATE=""$CHECK_MAKE""
15767  DESCRIPTION="make in PATH"
15768  if test "x$MAKE_CANDIDATE" != x; then
15769    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15770$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15771    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15772    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15773    if test "x$IS_GNU_MAKE" = x; then
15774      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15775$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15776    else
15777      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15778      if test "x$IS_MODERN_MAKE" = x; then
15779        { $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
15780$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;}
15781      else
15782        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15783          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15784            MAKE_EXPECTED_ENV='cygwin'
15785          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15786            MAKE_EXPECTED_ENV='msys'
15787          else
15788            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15789          fi
15790          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15791          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15792        else
15793          # Not relevant for non-Windows
15794          IS_MAKE_CORRECT_ENV=true
15795        fi
15796        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15797          { $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
15798$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;}
15799        else
15800          FOUND_MAKE=$MAKE_CANDIDATE
15801
15802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15803
15804  # First separate the path from the arguments. This will split at the first
15805  # space.
15806  complete="$FOUND_MAKE"
15807  path="${complete%% *}"
15808  tmp="$complete EOL"
15809  arguments="${tmp#* }"
15810
15811  # Input might be given as Windows format, start by converting to
15812  # unix format.
15813  new_path=`$CYGPATH -u "$path"`
15814
15815  # Now try to locate executable using which
15816  new_path=`$WHICH "$new_path" 2> /dev/null`
15817  # bat and cmd files are not always considered executable in cygwin causing which
15818  # to not find them
15819  if test "x$new_path" = x \
15820      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15821      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15822    new_path=`$CYGPATH -u "$path"`
15823  fi
15824  if test "x$new_path" = x; then
15825    # Oops. Which didn't find the executable.
15826    # The splitting of arguments from the executable at a space might have been incorrect,
15827    # since paths with space are more likely in Windows. Give it another try with the whole
15828    # argument.
15829    path="$complete"
15830    arguments="EOL"
15831    new_path=`$CYGPATH -u "$path"`
15832    new_path=`$WHICH "$new_path" 2> /dev/null`
15833    # bat and cmd files are not always considered executable in cygwin causing which
15834    # to not find them
15835    if test "x$new_path" = x \
15836        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15837        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15838      new_path=`$CYGPATH -u "$path"`
15839    fi
15840    if test "x$new_path" = x; then
15841      # It's still not found. Now this is an unrecoverable error.
15842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15843$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15844      has_space=`$ECHO "$complete" | $GREP " "`
15845      if test "x$has_space" != x; then
15846        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15847$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15848      fi
15849      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15850    fi
15851  fi
15852
15853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15856  # "foo.exe" is OK but "foo" is an error.
15857  #
15858  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15859  # It is also a way to make sure we got the proper file name for the real test later on.
15860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15861  if test "x$test_shortpath" = x; then
15862    # Short path failed, file does not exist as specified.
15863    # Try adding .exe or .cmd
15864    if test -f "${new_path}.exe"; then
15865      input_to_shortpath="${new_path}.exe"
15866    elif test -f "${new_path}.cmd"; then
15867      input_to_shortpath="${new_path}.cmd"
15868    else
15869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15870$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15871      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15872$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15873      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15874    fi
15875  else
15876    input_to_shortpath="$new_path"
15877  fi
15878
15879  # Call helper function which possibly converts this using DOS-style short mode.
15880  # If so, the updated path is stored in $new_path.
15881  new_path="$input_to_shortpath"
15882
15883  input_path="$input_to_shortpath"
15884  # Check if we need to convert this using DOS-style short mode. If the path
15885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15886  # take no chances and rewrite it.
15887  # Note: m4 eats our [], so we need to use [ and ] instead.
15888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15889  if test "x$has_forbidden_chars" != x; then
15890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15894      # Going to short mode and back again did indeed matter. Since short mode is
15895      # case insensitive, let's make it lowercase to improve readability.
15896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15897      # Now convert it back to Unix-stile (cygpath)
15898      input_path=`$CYGPATH -u "$shortmode_path"`
15899      new_path="$input_path"
15900    fi
15901  fi
15902
15903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15904  if test "x$test_cygdrive_prefix" = x; then
15905    # As a simple fix, exclude /usr/bin since it's not a real path.
15906    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15908      # a path prefixed by /cygdrive for fixpath to work.
15909      new_path="$CYGWIN_ROOT_PATH$input_path"
15910    fi
15911  fi
15912
15913  # remove trailing .exe if any
15914  new_path="${new_path/%.exe/}"
15915
15916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15917
15918  # First separate the path from the arguments. This will split at the first
15919  # space.
15920  complete="$FOUND_MAKE"
15921  path="${complete%% *}"
15922  tmp="$complete EOL"
15923  arguments="${tmp#* }"
15924
15925  # Input might be given as Windows format, start by converting to
15926  # unix format.
15927  new_path="$path"
15928
15929  windows_path="$new_path"
15930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15931    unix_path=`$CYGPATH -u "$windows_path"`
15932    new_path="$unix_path"
15933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15935    new_path="$unix_path"
15936  fi
15937
15938
15939  # Now try to locate executable using which
15940  new_path=`$WHICH "$new_path" 2> /dev/null`
15941
15942  if test "x$new_path" = x; then
15943    # Oops. Which didn't find the executable.
15944    # The splitting of arguments from the executable at a space might have been incorrect,
15945    # since paths with space are more likely in Windows. Give it another try with the whole
15946    # argument.
15947    path="$complete"
15948    arguments="EOL"
15949    new_path="$path"
15950
15951  windows_path="$new_path"
15952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15953    unix_path=`$CYGPATH -u "$windows_path"`
15954    new_path="$unix_path"
15955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15957    new_path="$unix_path"
15958  fi
15959
15960
15961    new_path=`$WHICH "$new_path" 2> /dev/null`
15962
15963    if test "x$new_path" = x; then
15964      # It's still not found. Now this is an unrecoverable error.
15965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15966$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15967      has_space=`$ECHO "$complete" | $GREP " "`
15968      if test "x$has_space" != x; then
15969        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15970$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15971      fi
15972      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15973    fi
15974  fi
15975
15976  # Now new_path has a complete unix path to the binary
15977  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15978    # Keep paths in /bin as-is, but remove trailing .exe if any
15979    new_path="${new_path/%.exe/}"
15980    # Do not save /bin paths to all_fixpath_prefixes!
15981  else
15982    # Not in mixed or Windows style, start by that.
15983    new_path=`cmd //c echo $new_path`
15984
15985  input_path="$new_path"
15986  # Check if we need to convert this using DOS-style short mode. If the path
15987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15988  # take no chances and rewrite it.
15989  # Note: m4 eats our [], so we need to use [ and ] instead.
15990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15991  if test "x$has_forbidden_chars" != x; then
15992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15993    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15994  fi
15995
15996    # Output is in $new_path
15997
15998  windows_path="$new_path"
15999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16000    unix_path=`$CYGPATH -u "$windows_path"`
16001    new_path="$unix_path"
16002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16004    new_path="$unix_path"
16005  fi
16006
16007    # remove trailing .exe if any
16008    new_path="${new_path/%.exe/}"
16009
16010    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16011    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16012  fi
16013
16014  else
16015    # We're on a posix platform. Hooray! :)
16016    # First separate the path from the arguments. This will split at the first
16017    # space.
16018    complete="$FOUND_MAKE"
16019    path="${complete%% *}"
16020    tmp="$complete EOL"
16021    arguments="${tmp#* }"
16022
16023    # Cannot rely on the command "which" here since it doesn't always work.
16024    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16025    if test -z "$is_absolute_path"; then
16026      # Path to executable is not absolute. Find it.
16027      IFS_save="$IFS"
16028      IFS=:
16029      for p in $PATH; do
16030        if test -f "$p/$path" && test -x "$p/$path"; then
16031          new_path="$p/$path"
16032          break
16033        fi
16034      done
16035      IFS="$IFS_save"
16036    else
16037      # This is an absolute path, we can use it without further modifications.
16038      new_path="$path"
16039    fi
16040
16041    if test "x$new_path" = x; then
16042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16043$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16044      has_space=`$ECHO "$complete" | $GREP " "`
16045      if test "x$has_space" != x; then
16046        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16047$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16048      fi
16049      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16050    fi
16051  fi
16052
16053  # Now join together the path and the arguments once again
16054  if test "x$arguments" != xEOL; then
16055    new_complete="$new_path ${arguments% *}"
16056  else
16057    new_complete="$new_path"
16058  fi
16059
16060  if test "x$complete" != "x$new_complete"; then
16061    FOUND_MAKE="$new_complete"
16062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16063$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16064  fi
16065
16066        fi
16067      fi
16068    fi
16069  fi
16070
16071    fi
16072
16073    if test "x$FOUND_MAKE" = x; then
16074      if test "x$TOOLS_DIR" != x; then
16075        # We have a tools-dir, check that as well before giving up.
16076        OLD_PATH=$PATH
16077        PATH=$TOOLS_DIR:$PATH
16078        for ac_prog in gmake
16079do
16080  # Extract the first word of "$ac_prog", so it can be a program name with args.
16081set dummy $ac_prog; ac_word=$2
16082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16083$as_echo_n "checking for $ac_word... " >&6; }
16084if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16085  $as_echo_n "(cached) " >&6
16086else
16087  case $CHECK_TOOLSDIR_GMAKE in
16088  [\\/]* | ?:[\\/]*)
16089  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16090  ;;
16091  *)
16092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16093for as_dir in $PATH
16094do
16095  IFS=$as_save_IFS
16096  test -z "$as_dir" && as_dir=.
16097    for ac_exec_ext in '' $ac_executable_extensions; do
16098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16099    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16101    break 2
16102  fi
16103done
16104  done
16105IFS=$as_save_IFS
16106
16107  ;;
16108esac
16109fi
16110CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16111if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16113$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16114else
16115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16116$as_echo "no" >&6; }
16117fi
16118
16119
16120  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16121done
16122
16123
16124  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16125  DESCRIPTION="gmake in tools-dir"
16126  if test "x$MAKE_CANDIDATE" != x; then
16127    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16128$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16129    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16130    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16131    if test "x$IS_GNU_MAKE" = x; then
16132      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16133$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16134    else
16135      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16136      if test "x$IS_MODERN_MAKE" = x; then
16137        { $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
16138$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;}
16139      else
16140        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16141          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16142            MAKE_EXPECTED_ENV='cygwin'
16143          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16144            MAKE_EXPECTED_ENV='msys'
16145          else
16146            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16147          fi
16148          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16149          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16150        else
16151          # Not relevant for non-Windows
16152          IS_MAKE_CORRECT_ENV=true
16153        fi
16154        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16155          { $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
16156$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;}
16157        else
16158          FOUND_MAKE=$MAKE_CANDIDATE
16159
16160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16161
16162  # First separate the path from the arguments. This will split at the first
16163  # space.
16164  complete="$FOUND_MAKE"
16165  path="${complete%% *}"
16166  tmp="$complete EOL"
16167  arguments="${tmp#* }"
16168
16169  # Input might be given as Windows format, start by converting to
16170  # unix format.
16171  new_path=`$CYGPATH -u "$path"`
16172
16173  # Now try to locate executable using which
16174  new_path=`$WHICH "$new_path" 2> /dev/null`
16175  # bat and cmd files are not always considered executable in cygwin causing which
16176  # to not find them
16177  if test "x$new_path" = x \
16178      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16179      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16180    new_path=`$CYGPATH -u "$path"`
16181  fi
16182  if test "x$new_path" = x; then
16183    # Oops. Which didn't find the executable.
16184    # The splitting of arguments from the executable at a space might have been incorrect,
16185    # since paths with space are more likely in Windows. Give it another try with the whole
16186    # argument.
16187    path="$complete"
16188    arguments="EOL"
16189    new_path=`$CYGPATH -u "$path"`
16190    new_path=`$WHICH "$new_path" 2> /dev/null`
16191    # bat and cmd files are not always considered executable in cygwin causing which
16192    # to not find them
16193    if test "x$new_path" = x \
16194        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16195        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16196      new_path=`$CYGPATH -u "$path"`
16197    fi
16198    if test "x$new_path" = x; then
16199      # It's still not found. Now this is an unrecoverable error.
16200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16201$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16202      has_space=`$ECHO "$complete" | $GREP " "`
16203      if test "x$has_space" != x; then
16204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16206      fi
16207      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16208    fi
16209  fi
16210
16211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16214  # "foo.exe" is OK but "foo" is an error.
16215  #
16216  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16217  # It is also a way to make sure we got the proper file name for the real test later on.
16218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16219  if test "x$test_shortpath" = x; then
16220    # Short path failed, file does not exist as specified.
16221    # Try adding .exe or .cmd
16222    if test -f "${new_path}.exe"; then
16223      input_to_shortpath="${new_path}.exe"
16224    elif test -f "${new_path}.cmd"; then
16225      input_to_shortpath="${new_path}.cmd"
16226    else
16227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16228$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16229      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16230$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16231      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16232    fi
16233  else
16234    input_to_shortpath="$new_path"
16235  fi
16236
16237  # Call helper function which possibly converts this using DOS-style short mode.
16238  # If so, the updated path is stored in $new_path.
16239  new_path="$input_to_shortpath"
16240
16241  input_path="$input_to_shortpath"
16242  # Check if we need to convert this using DOS-style short mode. If the path
16243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16244  # take no chances and rewrite it.
16245  # Note: m4 eats our [], so we need to use [ and ] instead.
16246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16247  if test "x$has_forbidden_chars" != x; then
16248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16252      # Going to short mode and back again did indeed matter. Since short mode is
16253      # case insensitive, let's make it lowercase to improve readability.
16254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16255      # Now convert it back to Unix-stile (cygpath)
16256      input_path=`$CYGPATH -u "$shortmode_path"`
16257      new_path="$input_path"
16258    fi
16259  fi
16260
16261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16262  if test "x$test_cygdrive_prefix" = x; then
16263    # As a simple fix, exclude /usr/bin since it's not a real path.
16264    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16266      # a path prefixed by /cygdrive for fixpath to work.
16267      new_path="$CYGWIN_ROOT_PATH$input_path"
16268    fi
16269  fi
16270
16271  # remove trailing .exe if any
16272  new_path="${new_path/%.exe/}"
16273
16274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16275
16276  # First separate the path from the arguments. This will split at the first
16277  # space.
16278  complete="$FOUND_MAKE"
16279  path="${complete%% *}"
16280  tmp="$complete EOL"
16281  arguments="${tmp#* }"
16282
16283  # Input might be given as Windows format, start by converting to
16284  # unix format.
16285  new_path="$path"
16286
16287  windows_path="$new_path"
16288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16289    unix_path=`$CYGPATH -u "$windows_path"`
16290    new_path="$unix_path"
16291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16293    new_path="$unix_path"
16294  fi
16295
16296
16297  # Now try to locate executable using which
16298  new_path=`$WHICH "$new_path" 2> /dev/null`
16299
16300  if test "x$new_path" = x; then
16301    # Oops. Which didn't find the executable.
16302    # The splitting of arguments from the executable at a space might have been incorrect,
16303    # since paths with space are more likely in Windows. Give it another try with the whole
16304    # argument.
16305    path="$complete"
16306    arguments="EOL"
16307    new_path="$path"
16308
16309  windows_path="$new_path"
16310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16311    unix_path=`$CYGPATH -u "$windows_path"`
16312    new_path="$unix_path"
16313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16315    new_path="$unix_path"
16316  fi
16317
16318
16319    new_path=`$WHICH "$new_path" 2> /dev/null`
16320
16321    if test "x$new_path" = x; then
16322      # It's still not found. Now this is an unrecoverable error.
16323      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16324$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16325      has_space=`$ECHO "$complete" | $GREP " "`
16326      if test "x$has_space" != x; then
16327        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16328$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16329      fi
16330      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16331    fi
16332  fi
16333
16334  # Now new_path has a complete unix path to the binary
16335  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16336    # Keep paths in /bin as-is, but remove trailing .exe if any
16337    new_path="${new_path/%.exe/}"
16338    # Do not save /bin paths to all_fixpath_prefixes!
16339  else
16340    # Not in mixed or Windows style, start by that.
16341    new_path=`cmd //c echo $new_path`
16342
16343  input_path="$new_path"
16344  # Check if we need to convert this using DOS-style short mode. If the path
16345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16346  # take no chances and rewrite it.
16347  # Note: m4 eats our [], so we need to use [ and ] instead.
16348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16349  if test "x$has_forbidden_chars" != x; then
16350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16351    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16352  fi
16353
16354    # Output is in $new_path
16355
16356  windows_path="$new_path"
16357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16358    unix_path=`$CYGPATH -u "$windows_path"`
16359    new_path="$unix_path"
16360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16362    new_path="$unix_path"
16363  fi
16364
16365    # remove trailing .exe if any
16366    new_path="${new_path/%.exe/}"
16367
16368    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16369    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16370  fi
16371
16372  else
16373    # We're on a posix platform. Hooray! :)
16374    # First separate the path from the arguments. This will split at the first
16375    # space.
16376    complete="$FOUND_MAKE"
16377    path="${complete%% *}"
16378    tmp="$complete EOL"
16379    arguments="${tmp#* }"
16380
16381    # Cannot rely on the command "which" here since it doesn't always work.
16382    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16383    if test -z "$is_absolute_path"; then
16384      # Path to executable is not absolute. Find it.
16385      IFS_save="$IFS"
16386      IFS=:
16387      for p in $PATH; do
16388        if test -f "$p/$path" && test -x "$p/$path"; then
16389          new_path="$p/$path"
16390          break
16391        fi
16392      done
16393      IFS="$IFS_save"
16394    else
16395      # This is an absolute path, we can use it without further modifications.
16396      new_path="$path"
16397    fi
16398
16399    if test "x$new_path" = x; then
16400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16401$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16402      has_space=`$ECHO "$complete" | $GREP " "`
16403      if test "x$has_space" != x; then
16404        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16405$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16406      fi
16407      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16408    fi
16409  fi
16410
16411  # Now join together the path and the arguments once again
16412  if test "x$arguments" != xEOL; then
16413    new_complete="$new_path ${arguments% *}"
16414  else
16415    new_complete="$new_path"
16416  fi
16417
16418  if test "x$complete" != "x$new_complete"; then
16419    FOUND_MAKE="$new_complete"
16420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16421$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16422  fi
16423
16424        fi
16425      fi
16426    fi
16427  fi
16428
16429        if test "x$FOUND_MAKE" = x; then
16430          for ac_prog in make
16431do
16432  # Extract the first word of "$ac_prog", so it can be a program name with args.
16433set dummy $ac_prog; ac_word=$2
16434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16435$as_echo_n "checking for $ac_word... " >&6; }
16436if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16437  $as_echo_n "(cached) " >&6
16438else
16439  case $CHECK_TOOLSDIR_MAKE in
16440  [\\/]* | ?:[\\/]*)
16441  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16442  ;;
16443  *)
16444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16445for as_dir in $PATH
16446do
16447  IFS=$as_save_IFS
16448  test -z "$as_dir" && as_dir=.
16449    for ac_exec_ext in '' $ac_executable_extensions; do
16450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16451    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16453    break 2
16454  fi
16455done
16456  done
16457IFS=$as_save_IFS
16458
16459  ;;
16460esac
16461fi
16462CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16463if test -n "$CHECK_TOOLSDIR_MAKE"; then
16464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16465$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16466else
16467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16468$as_echo "no" >&6; }
16469fi
16470
16471
16472  test -n "$CHECK_TOOLSDIR_MAKE" && break
16473done
16474
16475
16476  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16477  DESCRIPTION="make in tools-dir"
16478  if test "x$MAKE_CANDIDATE" != x; then
16479    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16480$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16481    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16482    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16483    if test "x$IS_GNU_MAKE" = x; then
16484      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16485$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16486    else
16487      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16488      if test "x$IS_MODERN_MAKE" = x; then
16489        { $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
16490$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;}
16491      else
16492        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16493          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16494            MAKE_EXPECTED_ENV='cygwin'
16495          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16496            MAKE_EXPECTED_ENV='msys'
16497          else
16498            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16499          fi
16500          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16501          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16502        else
16503          # Not relevant for non-Windows
16504          IS_MAKE_CORRECT_ENV=true
16505        fi
16506        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16507          { $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
16508$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;}
16509        else
16510          FOUND_MAKE=$MAKE_CANDIDATE
16511
16512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16513
16514  # First separate the path from the arguments. This will split at the first
16515  # space.
16516  complete="$FOUND_MAKE"
16517  path="${complete%% *}"
16518  tmp="$complete EOL"
16519  arguments="${tmp#* }"
16520
16521  # Input might be given as Windows format, start by converting to
16522  # unix format.
16523  new_path=`$CYGPATH -u "$path"`
16524
16525  # Now try to locate executable using which
16526  new_path=`$WHICH "$new_path" 2> /dev/null`
16527  # bat and cmd files are not always considered executable in cygwin causing which
16528  # to not find them
16529  if test "x$new_path" = x \
16530      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16531      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16532    new_path=`$CYGPATH -u "$path"`
16533  fi
16534  if test "x$new_path" = x; then
16535    # Oops. Which didn't find the executable.
16536    # The splitting of arguments from the executable at a space might have been incorrect,
16537    # since paths with space are more likely in Windows. Give it another try with the whole
16538    # argument.
16539    path="$complete"
16540    arguments="EOL"
16541    new_path=`$CYGPATH -u "$path"`
16542    new_path=`$WHICH "$new_path" 2> /dev/null`
16543    # bat and cmd files are not always considered executable in cygwin causing which
16544    # to not find them
16545    if test "x$new_path" = x \
16546        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16547        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16548      new_path=`$CYGPATH -u "$path"`
16549    fi
16550    if test "x$new_path" = x; then
16551      # It's still not found. Now this is an unrecoverable error.
16552      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16553$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16554      has_space=`$ECHO "$complete" | $GREP " "`
16555      if test "x$has_space" != x; then
16556        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16557$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16558      fi
16559      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16560    fi
16561  fi
16562
16563  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16564  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16565  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16566  # "foo.exe" is OK but "foo" is an error.
16567  #
16568  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16569  # It is also a way to make sure we got the proper file name for the real test later on.
16570  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16571  if test "x$test_shortpath" = x; then
16572    # Short path failed, file does not exist as specified.
16573    # Try adding .exe or .cmd
16574    if test -f "${new_path}.exe"; then
16575      input_to_shortpath="${new_path}.exe"
16576    elif test -f "${new_path}.cmd"; then
16577      input_to_shortpath="${new_path}.cmd"
16578    else
16579      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16580$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16581      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16582$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16583      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16584    fi
16585  else
16586    input_to_shortpath="$new_path"
16587  fi
16588
16589  # Call helper function which possibly converts this using DOS-style short mode.
16590  # If so, the updated path is stored in $new_path.
16591  new_path="$input_to_shortpath"
16592
16593  input_path="$input_to_shortpath"
16594  # Check if we need to convert this using DOS-style short mode. If the path
16595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16596  # take no chances and rewrite it.
16597  # Note: m4 eats our [], so we need to use [ and ] instead.
16598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16599  if test "x$has_forbidden_chars" != x; then
16600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16601    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16602    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16603    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16604      # Going to short mode and back again did indeed matter. Since short mode is
16605      # case insensitive, let's make it lowercase to improve readability.
16606      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16607      # Now convert it back to Unix-stile (cygpath)
16608      input_path=`$CYGPATH -u "$shortmode_path"`
16609      new_path="$input_path"
16610    fi
16611  fi
16612
16613  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16614  if test "x$test_cygdrive_prefix" = x; then
16615    # As a simple fix, exclude /usr/bin since it's not a real path.
16616    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16617      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16618      # a path prefixed by /cygdrive for fixpath to work.
16619      new_path="$CYGWIN_ROOT_PATH$input_path"
16620    fi
16621  fi
16622
16623  # remove trailing .exe if any
16624  new_path="${new_path/%.exe/}"
16625
16626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16627
16628  # First separate the path from the arguments. This will split at the first
16629  # space.
16630  complete="$FOUND_MAKE"
16631  path="${complete%% *}"
16632  tmp="$complete EOL"
16633  arguments="${tmp#* }"
16634
16635  # Input might be given as Windows format, start by converting to
16636  # unix format.
16637  new_path="$path"
16638
16639  windows_path="$new_path"
16640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16641    unix_path=`$CYGPATH -u "$windows_path"`
16642    new_path="$unix_path"
16643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16645    new_path="$unix_path"
16646  fi
16647
16648
16649  # Now try to locate executable using which
16650  new_path=`$WHICH "$new_path" 2> /dev/null`
16651
16652  if test "x$new_path" = x; then
16653    # Oops. Which didn't find the executable.
16654    # The splitting of arguments from the executable at a space might have been incorrect,
16655    # since paths with space are more likely in Windows. Give it another try with the whole
16656    # argument.
16657    path="$complete"
16658    arguments="EOL"
16659    new_path="$path"
16660
16661  windows_path="$new_path"
16662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16663    unix_path=`$CYGPATH -u "$windows_path"`
16664    new_path="$unix_path"
16665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16667    new_path="$unix_path"
16668  fi
16669
16670
16671    new_path=`$WHICH "$new_path" 2> /dev/null`
16672
16673    if test "x$new_path" = x; then
16674      # It's still not found. Now this is an unrecoverable error.
16675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16676$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16677      has_space=`$ECHO "$complete" | $GREP " "`
16678      if test "x$has_space" != x; then
16679        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16680$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16681      fi
16682      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16683    fi
16684  fi
16685
16686  # Now new_path has a complete unix path to the binary
16687  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16688    # Keep paths in /bin as-is, but remove trailing .exe if any
16689    new_path="${new_path/%.exe/}"
16690    # Do not save /bin paths to all_fixpath_prefixes!
16691  else
16692    # Not in mixed or Windows style, start by that.
16693    new_path=`cmd //c echo $new_path`
16694
16695  input_path="$new_path"
16696  # Check if we need to convert this using DOS-style short mode. If the path
16697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16698  # take no chances and rewrite it.
16699  # Note: m4 eats our [], so we need to use [ and ] instead.
16700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16701  if test "x$has_forbidden_chars" != x; then
16702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16704  fi
16705
16706    # Output is in $new_path
16707
16708  windows_path="$new_path"
16709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16710    unix_path=`$CYGPATH -u "$windows_path"`
16711    new_path="$unix_path"
16712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16714    new_path="$unix_path"
16715  fi
16716
16717    # remove trailing .exe if any
16718    new_path="${new_path/%.exe/}"
16719
16720    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16721    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16722  fi
16723
16724  else
16725    # We're on a posix platform. Hooray! :)
16726    # First separate the path from the arguments. This will split at the first
16727    # space.
16728    complete="$FOUND_MAKE"
16729    path="${complete%% *}"
16730    tmp="$complete EOL"
16731    arguments="${tmp#* }"
16732
16733    # Cannot rely on the command "which" here since it doesn't always work.
16734    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16735    if test -z "$is_absolute_path"; then
16736      # Path to executable is not absolute. Find it.
16737      IFS_save="$IFS"
16738      IFS=:
16739      for p in $PATH; do
16740        if test -f "$p/$path" && test -x "$p/$path"; then
16741          new_path="$p/$path"
16742          break
16743        fi
16744      done
16745      IFS="$IFS_save"
16746    else
16747      # This is an absolute path, we can use it without further modifications.
16748      new_path="$path"
16749    fi
16750
16751    if test "x$new_path" = x; then
16752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16753$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16754      has_space=`$ECHO "$complete" | $GREP " "`
16755      if test "x$has_space" != x; then
16756        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16757$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16758      fi
16759      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16760    fi
16761  fi
16762
16763  # Now join together the path and the arguments once again
16764  if test "x$arguments" != xEOL; then
16765    new_complete="$new_path ${arguments% *}"
16766  else
16767    new_complete="$new_path"
16768  fi
16769
16770  if test "x$complete" != "x$new_complete"; then
16771    FOUND_MAKE="$new_complete"
16772    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16773$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16774  fi
16775
16776        fi
16777      fi
16778    fi
16779  fi
16780
16781        fi
16782        PATH=$OLD_PATH
16783      fi
16784    fi
16785
16786    if test "x$FOUND_MAKE" = x; then
16787      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
16788    fi
16789  fi
16790
16791  MAKE=$FOUND_MAKE
16792
16793  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
16794$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
16795
16796
16797
16798  # Test if find supports -delete
16799  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
16800$as_echo_n "checking if find supports -delete... " >&6; }
16801  FIND_DELETE="-delete"
16802
16803  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
16804
16805  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
16806
16807  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
16808  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
16809    # No, it does not.
16810    rm $DELETEDIR/TestIfFindSupportsDelete
16811    FIND_DELETE="-exec rm \{\} \+"
16812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16813$as_echo "no" >&6; }
16814  else
16815    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16816$as_echo "yes" >&6; }
16817  fi
16818  rmdir $DELETEDIR
16819
16820
16821
16822  # These tools might not be installed by default,
16823  # need hint on how to install them.
16824
16825
16826
16827  # Publish this variable in the help.
16828
16829
16830  if test "x$UNZIP" = x; then
16831    # The variable is not set by user, try to locate tool using the code snippet
16832    for ac_prog in unzip
16833do
16834  # Extract the first word of "$ac_prog", so it can be a program name with args.
16835set dummy $ac_prog; ac_word=$2
16836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16837$as_echo_n "checking for $ac_word... " >&6; }
16838if ${ac_cv_path_UNZIP+:} false; then :
16839  $as_echo_n "(cached) " >&6
16840else
16841  case $UNZIP in
16842  [\\/]* | ?:[\\/]*)
16843  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16844  ;;
16845  *)
16846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16847for as_dir in $PATH
16848do
16849  IFS=$as_save_IFS
16850  test -z "$as_dir" && as_dir=.
16851    for ac_exec_ext in '' $ac_executable_extensions; do
16852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16853    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16855    break 2
16856  fi
16857done
16858  done
16859IFS=$as_save_IFS
16860
16861  ;;
16862esac
16863fi
16864UNZIP=$ac_cv_path_UNZIP
16865if test -n "$UNZIP"; then
16866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16867$as_echo "$UNZIP" >&6; }
16868else
16869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16870$as_echo "no" >&6; }
16871fi
16872
16873
16874  test -n "$UNZIP" && break
16875done
16876
16877  else
16878    # The variable is set, but is it from the command line or the environment?
16879
16880    # Try to remove the string !UNZIP! from our list.
16881    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
16882    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
16883      # If it failed, the variable was not from the command line. Ignore it,
16884      # but warn the user (except for BASH, which is always set by the calling BASH).
16885      if test "xUNZIP" != xBASH; then
16886        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
16887$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
16888      fi
16889      # Try to locate tool using the code snippet
16890      for ac_prog in unzip
16891do
16892  # Extract the first word of "$ac_prog", so it can be a program name with args.
16893set dummy $ac_prog; ac_word=$2
16894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16895$as_echo_n "checking for $ac_word... " >&6; }
16896if ${ac_cv_path_UNZIP+:} false; then :
16897  $as_echo_n "(cached) " >&6
16898else
16899  case $UNZIP in
16900  [\\/]* | ?:[\\/]*)
16901  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16902  ;;
16903  *)
16904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16905for as_dir in $PATH
16906do
16907  IFS=$as_save_IFS
16908  test -z "$as_dir" && as_dir=.
16909    for ac_exec_ext in '' $ac_executable_extensions; do
16910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16911    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16913    break 2
16914  fi
16915done
16916  done
16917IFS=$as_save_IFS
16918
16919  ;;
16920esac
16921fi
16922UNZIP=$ac_cv_path_UNZIP
16923if test -n "$UNZIP"; then
16924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16925$as_echo "$UNZIP" >&6; }
16926else
16927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16928$as_echo "no" >&6; }
16929fi
16930
16931
16932  test -n "$UNZIP" && break
16933done
16934
16935    else
16936      # If it succeeded, then it was overridden by the user. We will use it
16937      # for the tool.
16938
16939      # First remove it from the list of overridden variables, so we can test
16940      # for unknown variables in the end.
16941      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
16942
16943      # Check if the provided tool contains a complete path.
16944      tool_specified="$UNZIP"
16945      tool_basename="${tool_specified##*/}"
16946      if test "x$tool_basename" = "x$tool_specified"; then
16947        # A command without a complete path is provided, search $PATH.
16948        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
16949$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
16950        # Extract the first word of "$tool_basename", so it can be a program name with args.
16951set dummy $tool_basename; ac_word=$2
16952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16953$as_echo_n "checking for $ac_word... " >&6; }
16954if ${ac_cv_path_UNZIP+:} false; then :
16955  $as_echo_n "(cached) " >&6
16956else
16957  case $UNZIP in
16958  [\\/]* | ?:[\\/]*)
16959  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16960  ;;
16961  *)
16962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16963for as_dir in $PATH
16964do
16965  IFS=$as_save_IFS
16966  test -z "$as_dir" && as_dir=.
16967    for ac_exec_ext in '' $ac_executable_extensions; do
16968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16969    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16971    break 2
16972  fi
16973done
16974  done
16975IFS=$as_save_IFS
16976
16977  ;;
16978esac
16979fi
16980UNZIP=$ac_cv_path_UNZIP
16981if test -n "$UNZIP"; then
16982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16983$as_echo "$UNZIP" >&6; }
16984else
16985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16986$as_echo "no" >&6; }
16987fi
16988
16989
16990        if test "x$UNZIP" = x; then
16991          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
16992        fi
16993      else
16994        # Otherwise we believe it is a complete path. Use it as it is.
16995        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
16996$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
16997        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
16998$as_echo_n "checking for UNZIP... " >&6; }
16999        if test ! -x "$tool_specified"; then
17000          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17001$as_echo "not found" >&6; }
17002          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17003        fi
17004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17005$as_echo "$tool_specified" >&6; }
17006      fi
17007    fi
17008  fi
17009
17010
17011
17012  if test "x$UNZIP" = x; then
17013    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17014  fi
17015
17016
17017
17018
17019
17020  # Publish this variable in the help.
17021
17022
17023  if test "x$ZIP" = x; then
17024    # The variable is not set by user, try to locate tool using the code snippet
17025    for ac_prog in zip
17026do
17027  # Extract the first word of "$ac_prog", so it can be a program name with args.
17028set dummy $ac_prog; ac_word=$2
17029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17030$as_echo_n "checking for $ac_word... " >&6; }
17031if ${ac_cv_path_ZIP+:} false; then :
17032  $as_echo_n "(cached) " >&6
17033else
17034  case $ZIP in
17035  [\\/]* | ?:[\\/]*)
17036  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17037  ;;
17038  *)
17039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17040for as_dir in $PATH
17041do
17042  IFS=$as_save_IFS
17043  test -z "$as_dir" && as_dir=.
17044    for ac_exec_ext in '' $ac_executable_extensions; do
17045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17046    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17048    break 2
17049  fi
17050done
17051  done
17052IFS=$as_save_IFS
17053
17054  ;;
17055esac
17056fi
17057ZIP=$ac_cv_path_ZIP
17058if test -n "$ZIP"; then
17059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17060$as_echo "$ZIP" >&6; }
17061else
17062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17063$as_echo "no" >&6; }
17064fi
17065
17066
17067  test -n "$ZIP" && break
17068done
17069
17070  else
17071    # The variable is set, but is it from the command line or the environment?
17072
17073    # Try to remove the string !ZIP! from our list.
17074    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17075    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17076      # If it failed, the variable was not from the command line. Ignore it,
17077      # but warn the user (except for BASH, which is always set by the calling BASH).
17078      if test "xZIP" != xBASH; then
17079        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17080$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17081      fi
17082      # Try to locate tool using the code snippet
17083      for ac_prog in zip
17084do
17085  # Extract the first word of "$ac_prog", so it can be a program name with args.
17086set dummy $ac_prog; ac_word=$2
17087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17088$as_echo_n "checking for $ac_word... " >&6; }
17089if ${ac_cv_path_ZIP+:} false; then :
17090  $as_echo_n "(cached) " >&6
17091else
17092  case $ZIP in
17093  [\\/]* | ?:[\\/]*)
17094  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17095  ;;
17096  *)
17097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17098for as_dir in $PATH
17099do
17100  IFS=$as_save_IFS
17101  test -z "$as_dir" && as_dir=.
17102    for ac_exec_ext in '' $ac_executable_extensions; do
17103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17104    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17106    break 2
17107  fi
17108done
17109  done
17110IFS=$as_save_IFS
17111
17112  ;;
17113esac
17114fi
17115ZIP=$ac_cv_path_ZIP
17116if test -n "$ZIP"; then
17117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17118$as_echo "$ZIP" >&6; }
17119else
17120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17121$as_echo "no" >&6; }
17122fi
17123
17124
17125  test -n "$ZIP" && break
17126done
17127
17128    else
17129      # If it succeeded, then it was overridden by the user. We will use it
17130      # for the tool.
17131
17132      # First remove it from the list of overridden variables, so we can test
17133      # for unknown variables in the end.
17134      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17135
17136      # Check if the provided tool contains a complete path.
17137      tool_specified="$ZIP"
17138      tool_basename="${tool_specified##*/}"
17139      if test "x$tool_basename" = "x$tool_specified"; then
17140        # A command without a complete path is provided, search $PATH.
17141        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17142$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17143        # Extract the first word of "$tool_basename", so it can be a program name with args.
17144set dummy $tool_basename; ac_word=$2
17145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17146$as_echo_n "checking for $ac_word... " >&6; }
17147if ${ac_cv_path_ZIP+:} false; then :
17148  $as_echo_n "(cached) " >&6
17149else
17150  case $ZIP in
17151  [\\/]* | ?:[\\/]*)
17152  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17153  ;;
17154  *)
17155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17156for as_dir in $PATH
17157do
17158  IFS=$as_save_IFS
17159  test -z "$as_dir" && as_dir=.
17160    for ac_exec_ext in '' $ac_executable_extensions; do
17161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17162    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17164    break 2
17165  fi
17166done
17167  done
17168IFS=$as_save_IFS
17169
17170  ;;
17171esac
17172fi
17173ZIP=$ac_cv_path_ZIP
17174if test -n "$ZIP"; then
17175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17176$as_echo "$ZIP" >&6; }
17177else
17178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17179$as_echo "no" >&6; }
17180fi
17181
17182
17183        if test "x$ZIP" = x; then
17184          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17185        fi
17186      else
17187        # Otherwise we believe it is a complete path. Use it as it is.
17188        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17189$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17191$as_echo_n "checking for ZIP... " >&6; }
17192        if test ! -x "$tool_specified"; then
17193          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17194$as_echo "not found" >&6; }
17195          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17196        fi
17197        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17198$as_echo "$tool_specified" >&6; }
17199      fi
17200    fi
17201  fi
17202
17203
17204
17205  if test "x$ZIP" = x; then
17206    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17207  fi
17208
17209
17210
17211  # Non-required basic tools
17212
17213
17214
17215  # Publish this variable in the help.
17216
17217
17218  if test "x$LDD" = x; then
17219    # The variable is not set by user, try to locate tool using the code snippet
17220    for ac_prog in ldd
17221do
17222  # Extract the first word of "$ac_prog", so it can be a program name with args.
17223set dummy $ac_prog; ac_word=$2
17224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17225$as_echo_n "checking for $ac_word... " >&6; }
17226if ${ac_cv_path_LDD+:} false; then :
17227  $as_echo_n "(cached) " >&6
17228else
17229  case $LDD in
17230  [\\/]* | ?:[\\/]*)
17231  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17232  ;;
17233  *)
17234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17235for as_dir in $PATH
17236do
17237  IFS=$as_save_IFS
17238  test -z "$as_dir" && as_dir=.
17239    for ac_exec_ext in '' $ac_executable_extensions; do
17240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17241    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17243    break 2
17244  fi
17245done
17246  done
17247IFS=$as_save_IFS
17248
17249  ;;
17250esac
17251fi
17252LDD=$ac_cv_path_LDD
17253if test -n "$LDD"; then
17254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17255$as_echo "$LDD" >&6; }
17256else
17257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17258$as_echo "no" >&6; }
17259fi
17260
17261
17262  test -n "$LDD" && break
17263done
17264
17265  else
17266    # The variable is set, but is it from the command line or the environment?
17267
17268    # Try to remove the string !LDD! from our list.
17269    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17270    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17271      # If it failed, the variable was not from the command line. Ignore it,
17272      # but warn the user (except for BASH, which is always set by the calling BASH).
17273      if test "xLDD" != xBASH; then
17274        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17275$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17276      fi
17277      # Try to locate tool using the code snippet
17278      for ac_prog in ldd
17279do
17280  # Extract the first word of "$ac_prog", so it can be a program name with args.
17281set dummy $ac_prog; ac_word=$2
17282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17283$as_echo_n "checking for $ac_word... " >&6; }
17284if ${ac_cv_path_LDD+:} false; then :
17285  $as_echo_n "(cached) " >&6
17286else
17287  case $LDD in
17288  [\\/]* | ?:[\\/]*)
17289  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17290  ;;
17291  *)
17292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17293for as_dir in $PATH
17294do
17295  IFS=$as_save_IFS
17296  test -z "$as_dir" && as_dir=.
17297    for ac_exec_ext in '' $ac_executable_extensions; do
17298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17299    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17301    break 2
17302  fi
17303done
17304  done
17305IFS=$as_save_IFS
17306
17307  ;;
17308esac
17309fi
17310LDD=$ac_cv_path_LDD
17311if test -n "$LDD"; then
17312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17313$as_echo "$LDD" >&6; }
17314else
17315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17316$as_echo "no" >&6; }
17317fi
17318
17319
17320  test -n "$LDD" && break
17321done
17322
17323    else
17324      # If it succeeded, then it was overridden by the user. We will use it
17325      # for the tool.
17326
17327      # First remove it from the list of overridden variables, so we can test
17328      # for unknown variables in the end.
17329      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17330
17331      # Check if the provided tool contains a complete path.
17332      tool_specified="$LDD"
17333      tool_basename="${tool_specified##*/}"
17334      if test "x$tool_basename" = "x$tool_specified"; then
17335        # A command without a complete path is provided, search $PATH.
17336        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17337$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17338        # Extract the first word of "$tool_basename", so it can be a program name with args.
17339set dummy $tool_basename; ac_word=$2
17340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17341$as_echo_n "checking for $ac_word... " >&6; }
17342if ${ac_cv_path_LDD+:} false; then :
17343  $as_echo_n "(cached) " >&6
17344else
17345  case $LDD in
17346  [\\/]* | ?:[\\/]*)
17347  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17348  ;;
17349  *)
17350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17351for as_dir in $PATH
17352do
17353  IFS=$as_save_IFS
17354  test -z "$as_dir" && as_dir=.
17355    for ac_exec_ext in '' $ac_executable_extensions; do
17356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17357    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17359    break 2
17360  fi
17361done
17362  done
17363IFS=$as_save_IFS
17364
17365  ;;
17366esac
17367fi
17368LDD=$ac_cv_path_LDD
17369if test -n "$LDD"; then
17370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17371$as_echo "$LDD" >&6; }
17372else
17373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17374$as_echo "no" >&6; }
17375fi
17376
17377
17378        if test "x$LDD" = x; then
17379          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17380        fi
17381      else
17382        # Otherwise we believe it is a complete path. Use it as it is.
17383        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17384$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17385        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17386$as_echo_n "checking for LDD... " >&6; }
17387        if test ! -x "$tool_specified"; then
17388          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17389$as_echo "not found" >&6; }
17390          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17391        fi
17392        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17393$as_echo "$tool_specified" >&6; }
17394      fi
17395    fi
17396  fi
17397
17398
17399  if test "x$LDD" = "x"; then
17400    # List shared lib dependencies is used for
17401    # debug output and checking for forbidden dependencies.
17402    # We can build without it.
17403    LDD="true"
17404  fi
17405
17406
17407  # Publish this variable in the help.
17408
17409
17410  if test "x$OTOOL" = x; then
17411    # The variable is not set by user, try to locate tool using the code snippet
17412    for ac_prog in otool
17413do
17414  # Extract the first word of "$ac_prog", so it can be a program name with args.
17415set dummy $ac_prog; ac_word=$2
17416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17417$as_echo_n "checking for $ac_word... " >&6; }
17418if ${ac_cv_path_OTOOL+:} false; then :
17419  $as_echo_n "(cached) " >&6
17420else
17421  case $OTOOL in
17422  [\\/]* | ?:[\\/]*)
17423  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17424  ;;
17425  *)
17426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17427for as_dir in $PATH
17428do
17429  IFS=$as_save_IFS
17430  test -z "$as_dir" && as_dir=.
17431    for ac_exec_ext in '' $ac_executable_extensions; do
17432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17433    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17435    break 2
17436  fi
17437done
17438  done
17439IFS=$as_save_IFS
17440
17441  ;;
17442esac
17443fi
17444OTOOL=$ac_cv_path_OTOOL
17445if test -n "$OTOOL"; then
17446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17447$as_echo "$OTOOL" >&6; }
17448else
17449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17450$as_echo "no" >&6; }
17451fi
17452
17453
17454  test -n "$OTOOL" && break
17455done
17456
17457  else
17458    # The variable is set, but is it from the command line or the environment?
17459
17460    # Try to remove the string !OTOOL! from our list.
17461    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17462    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17463      # If it failed, the variable was not from the command line. Ignore it,
17464      # but warn the user (except for BASH, which is always set by the calling BASH).
17465      if test "xOTOOL" != xBASH; then
17466        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17467$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17468      fi
17469      # Try to locate tool using the code snippet
17470      for ac_prog in otool
17471do
17472  # Extract the first word of "$ac_prog", so it can be a program name with args.
17473set dummy $ac_prog; ac_word=$2
17474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17475$as_echo_n "checking for $ac_word... " >&6; }
17476if ${ac_cv_path_OTOOL+:} false; then :
17477  $as_echo_n "(cached) " >&6
17478else
17479  case $OTOOL in
17480  [\\/]* | ?:[\\/]*)
17481  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17482  ;;
17483  *)
17484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17485for as_dir in $PATH
17486do
17487  IFS=$as_save_IFS
17488  test -z "$as_dir" && as_dir=.
17489    for ac_exec_ext in '' $ac_executable_extensions; do
17490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17491    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17493    break 2
17494  fi
17495done
17496  done
17497IFS=$as_save_IFS
17498
17499  ;;
17500esac
17501fi
17502OTOOL=$ac_cv_path_OTOOL
17503if test -n "$OTOOL"; then
17504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17505$as_echo "$OTOOL" >&6; }
17506else
17507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17508$as_echo "no" >&6; }
17509fi
17510
17511
17512  test -n "$OTOOL" && break
17513done
17514
17515    else
17516      # If it succeeded, then it was overridden by the user. We will use it
17517      # for the tool.
17518
17519      # First remove it from the list of overridden variables, so we can test
17520      # for unknown variables in the end.
17521      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17522
17523      # Check if the provided tool contains a complete path.
17524      tool_specified="$OTOOL"
17525      tool_basename="${tool_specified##*/}"
17526      if test "x$tool_basename" = "x$tool_specified"; then
17527        # A command without a complete path is provided, search $PATH.
17528        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17529$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17530        # Extract the first word of "$tool_basename", so it can be a program name with args.
17531set dummy $tool_basename; ac_word=$2
17532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17533$as_echo_n "checking for $ac_word... " >&6; }
17534if ${ac_cv_path_OTOOL+:} false; then :
17535  $as_echo_n "(cached) " >&6
17536else
17537  case $OTOOL in
17538  [\\/]* | ?:[\\/]*)
17539  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17540  ;;
17541  *)
17542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17543for as_dir in $PATH
17544do
17545  IFS=$as_save_IFS
17546  test -z "$as_dir" && as_dir=.
17547    for ac_exec_ext in '' $ac_executable_extensions; do
17548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17549    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17551    break 2
17552  fi
17553done
17554  done
17555IFS=$as_save_IFS
17556
17557  ;;
17558esac
17559fi
17560OTOOL=$ac_cv_path_OTOOL
17561if test -n "$OTOOL"; then
17562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17563$as_echo "$OTOOL" >&6; }
17564else
17565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17566$as_echo "no" >&6; }
17567fi
17568
17569
17570        if test "x$OTOOL" = x; then
17571          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17572        fi
17573      else
17574        # Otherwise we believe it is a complete path. Use it as it is.
17575        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
17576$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
17577        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
17578$as_echo_n "checking for OTOOL... " >&6; }
17579        if test ! -x "$tool_specified"; then
17580          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17581$as_echo "not found" >&6; }
17582          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
17583        fi
17584        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17585$as_echo "$tool_specified" >&6; }
17586      fi
17587    fi
17588  fi
17589
17590
17591  if test "x$OTOOL" = "x"; then
17592    OTOOL="true"
17593  fi
17594
17595
17596  # Publish this variable in the help.
17597
17598
17599  if test "x$READELF" = x; then
17600    # The variable is not set by user, try to locate tool using the code snippet
17601    for ac_prog in greadelf readelf
17602do
17603  # Extract the first word of "$ac_prog", so it can be a program name with args.
17604set dummy $ac_prog; ac_word=$2
17605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17606$as_echo_n "checking for $ac_word... " >&6; }
17607if ${ac_cv_path_READELF+:} false; then :
17608  $as_echo_n "(cached) " >&6
17609else
17610  case $READELF in
17611  [\\/]* | ?:[\\/]*)
17612  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17613  ;;
17614  *)
17615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17616for as_dir in $PATH
17617do
17618  IFS=$as_save_IFS
17619  test -z "$as_dir" && as_dir=.
17620    for ac_exec_ext in '' $ac_executable_extensions; do
17621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17622    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17624    break 2
17625  fi
17626done
17627  done
17628IFS=$as_save_IFS
17629
17630  ;;
17631esac
17632fi
17633READELF=$ac_cv_path_READELF
17634if test -n "$READELF"; then
17635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17636$as_echo "$READELF" >&6; }
17637else
17638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17639$as_echo "no" >&6; }
17640fi
17641
17642
17643  test -n "$READELF" && break
17644done
17645
17646  else
17647    # The variable is set, but is it from the command line or the environment?
17648
17649    # Try to remove the string !READELF! from our list.
17650    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17651    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17652      # If it failed, the variable was not from the command line. Ignore it,
17653      # but warn the user (except for BASH, which is always set by the calling BASH).
17654      if test "xREADELF" != xBASH; then
17655        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17656$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17657      fi
17658      # Try to locate tool using the code snippet
17659      for ac_prog in greadelf readelf
17660do
17661  # Extract the first word of "$ac_prog", so it can be a program name with args.
17662set dummy $ac_prog; ac_word=$2
17663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17664$as_echo_n "checking for $ac_word... " >&6; }
17665if ${ac_cv_path_READELF+:} false; then :
17666  $as_echo_n "(cached) " >&6
17667else
17668  case $READELF in
17669  [\\/]* | ?:[\\/]*)
17670  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17671  ;;
17672  *)
17673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17674for as_dir in $PATH
17675do
17676  IFS=$as_save_IFS
17677  test -z "$as_dir" && as_dir=.
17678    for ac_exec_ext in '' $ac_executable_extensions; do
17679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17680    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17682    break 2
17683  fi
17684done
17685  done
17686IFS=$as_save_IFS
17687
17688  ;;
17689esac
17690fi
17691READELF=$ac_cv_path_READELF
17692if test -n "$READELF"; then
17693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17694$as_echo "$READELF" >&6; }
17695else
17696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17697$as_echo "no" >&6; }
17698fi
17699
17700
17701  test -n "$READELF" && break
17702done
17703
17704    else
17705      # If it succeeded, then it was overridden by the user. We will use it
17706      # for the tool.
17707
17708      # First remove it from the list of overridden variables, so we can test
17709      # for unknown variables in the end.
17710      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17711
17712      # Check if the provided tool contains a complete path.
17713      tool_specified="$READELF"
17714      tool_basename="${tool_specified##*/}"
17715      if test "x$tool_basename" = "x$tool_specified"; then
17716        # A command without a complete path is provided, search $PATH.
17717        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17718$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17719        # Extract the first word of "$tool_basename", so it can be a program name with args.
17720set dummy $tool_basename; ac_word=$2
17721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17722$as_echo_n "checking for $ac_word... " >&6; }
17723if ${ac_cv_path_READELF+:} false; then :
17724  $as_echo_n "(cached) " >&6
17725else
17726  case $READELF in
17727  [\\/]* | ?:[\\/]*)
17728  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17729  ;;
17730  *)
17731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17732for as_dir in $PATH
17733do
17734  IFS=$as_save_IFS
17735  test -z "$as_dir" && as_dir=.
17736    for ac_exec_ext in '' $ac_executable_extensions; do
17737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17738    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17740    break 2
17741  fi
17742done
17743  done
17744IFS=$as_save_IFS
17745
17746  ;;
17747esac
17748fi
17749READELF=$ac_cv_path_READELF
17750if test -n "$READELF"; then
17751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17752$as_echo "$READELF" >&6; }
17753else
17754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17755$as_echo "no" >&6; }
17756fi
17757
17758
17759        if test "x$READELF" = x; then
17760          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17761        fi
17762      else
17763        # Otherwise we believe it is a complete path. Use it as it is.
17764        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
17765$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
17766        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
17767$as_echo_n "checking for READELF... " >&6; }
17768        if test ! -x "$tool_specified"; then
17769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17770$as_echo "not found" >&6; }
17771          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
17772        fi
17773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17774$as_echo "$tool_specified" >&6; }
17775      fi
17776    fi
17777  fi
17778
17779
17780
17781
17782  # Publish this variable in the help.
17783
17784
17785  if test "x$HG" = x; then
17786    # The variable is not set by user, try to locate tool using the code snippet
17787    for ac_prog in hg
17788do
17789  # Extract the first word of "$ac_prog", so it can be a program name with args.
17790set dummy $ac_prog; ac_word=$2
17791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17792$as_echo_n "checking for $ac_word... " >&6; }
17793if ${ac_cv_path_HG+:} false; then :
17794  $as_echo_n "(cached) " >&6
17795else
17796  case $HG in
17797  [\\/]* | ?:[\\/]*)
17798  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17799  ;;
17800  *)
17801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17802for as_dir in $PATH
17803do
17804  IFS=$as_save_IFS
17805  test -z "$as_dir" && as_dir=.
17806    for ac_exec_ext in '' $ac_executable_extensions; do
17807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17808    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17810    break 2
17811  fi
17812done
17813  done
17814IFS=$as_save_IFS
17815
17816  ;;
17817esac
17818fi
17819HG=$ac_cv_path_HG
17820if test -n "$HG"; then
17821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17822$as_echo "$HG" >&6; }
17823else
17824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17825$as_echo "no" >&6; }
17826fi
17827
17828
17829  test -n "$HG" && break
17830done
17831
17832  else
17833    # The variable is set, but is it from the command line or the environment?
17834
17835    # Try to remove the string !HG! from our list.
17836    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
17837    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17838      # If it failed, the variable was not from the command line. Ignore it,
17839      # but warn the user (except for BASH, which is always set by the calling BASH).
17840      if test "xHG" != xBASH; then
17841        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
17842$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
17843      fi
17844      # Try to locate tool using the code snippet
17845      for ac_prog in hg
17846do
17847  # Extract the first word of "$ac_prog", so it can be a program name with args.
17848set dummy $ac_prog; ac_word=$2
17849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17850$as_echo_n "checking for $ac_word... " >&6; }
17851if ${ac_cv_path_HG+:} false; then :
17852  $as_echo_n "(cached) " >&6
17853else
17854  case $HG in
17855  [\\/]* | ?:[\\/]*)
17856  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17857  ;;
17858  *)
17859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17860for as_dir in $PATH
17861do
17862  IFS=$as_save_IFS
17863  test -z "$as_dir" && as_dir=.
17864    for ac_exec_ext in '' $ac_executable_extensions; do
17865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17866    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17868    break 2
17869  fi
17870done
17871  done
17872IFS=$as_save_IFS
17873
17874  ;;
17875esac
17876fi
17877HG=$ac_cv_path_HG
17878if test -n "$HG"; then
17879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17880$as_echo "$HG" >&6; }
17881else
17882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17883$as_echo "no" >&6; }
17884fi
17885
17886
17887  test -n "$HG" && break
17888done
17889
17890    else
17891      # If it succeeded, then it was overridden by the user. We will use it
17892      # for the tool.
17893
17894      # First remove it from the list of overridden variables, so we can test
17895      # for unknown variables in the end.
17896      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17897
17898      # Check if the provided tool contains a complete path.
17899      tool_specified="$HG"
17900      tool_basename="${tool_specified##*/}"
17901      if test "x$tool_basename" = "x$tool_specified"; then
17902        # A command without a complete path is provided, search $PATH.
17903        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
17904$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
17905        # Extract the first word of "$tool_basename", so it can be a program name with args.
17906set dummy $tool_basename; ac_word=$2
17907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17908$as_echo_n "checking for $ac_word... " >&6; }
17909if ${ac_cv_path_HG+:} false; then :
17910  $as_echo_n "(cached) " >&6
17911else
17912  case $HG in
17913  [\\/]* | ?:[\\/]*)
17914  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17915  ;;
17916  *)
17917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17918for as_dir in $PATH
17919do
17920  IFS=$as_save_IFS
17921  test -z "$as_dir" && as_dir=.
17922    for ac_exec_ext in '' $ac_executable_extensions; do
17923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17924    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17926    break 2
17927  fi
17928done
17929  done
17930IFS=$as_save_IFS
17931
17932  ;;
17933esac
17934fi
17935HG=$ac_cv_path_HG
17936if test -n "$HG"; then
17937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17938$as_echo "$HG" >&6; }
17939else
17940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17941$as_echo "no" >&6; }
17942fi
17943
17944
17945        if test "x$HG" = x; then
17946          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17947        fi
17948      else
17949        # Otherwise we believe it is a complete path. Use it as it is.
17950        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
17951$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
17952        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
17953$as_echo_n "checking for HG... " >&6; }
17954        if test ! -x "$tool_specified"; then
17955          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17956$as_echo "not found" >&6; }
17957          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
17958        fi
17959        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17960$as_echo "$tool_specified" >&6; }
17961      fi
17962    fi
17963  fi
17964
17965
17966
17967
17968  # Publish this variable in the help.
17969
17970
17971  if test "x$STAT" = x; then
17972    # The variable is not set by user, try to locate tool using the code snippet
17973    for ac_prog in stat
17974do
17975  # Extract the first word of "$ac_prog", so it can be a program name with args.
17976set dummy $ac_prog; ac_word=$2
17977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17978$as_echo_n "checking for $ac_word... " >&6; }
17979if ${ac_cv_path_STAT+:} false; then :
17980  $as_echo_n "(cached) " >&6
17981else
17982  case $STAT in
17983  [\\/]* | ?:[\\/]*)
17984  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17985  ;;
17986  *)
17987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17988for as_dir in $PATH
17989do
17990  IFS=$as_save_IFS
17991  test -z "$as_dir" && as_dir=.
17992    for ac_exec_ext in '' $ac_executable_extensions; do
17993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17994    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
17995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17996    break 2
17997  fi
17998done
17999  done
18000IFS=$as_save_IFS
18001
18002  ;;
18003esac
18004fi
18005STAT=$ac_cv_path_STAT
18006if test -n "$STAT"; then
18007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18008$as_echo "$STAT" >&6; }
18009else
18010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18011$as_echo "no" >&6; }
18012fi
18013
18014
18015  test -n "$STAT" && break
18016done
18017
18018  else
18019    # The variable is set, but is it from the command line or the environment?
18020
18021    # Try to remove the string !STAT! from our list.
18022    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18023    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18024      # If it failed, the variable was not from the command line. Ignore it,
18025      # but warn the user (except for BASH, which is always set by the calling BASH).
18026      if test "xSTAT" != xBASH; then
18027        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18028$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18029      fi
18030      # Try to locate tool using the code snippet
18031      for ac_prog in stat
18032do
18033  # Extract the first word of "$ac_prog", so it can be a program name with args.
18034set dummy $ac_prog; ac_word=$2
18035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18036$as_echo_n "checking for $ac_word... " >&6; }
18037if ${ac_cv_path_STAT+:} false; then :
18038  $as_echo_n "(cached) " >&6
18039else
18040  case $STAT in
18041  [\\/]* | ?:[\\/]*)
18042  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18043  ;;
18044  *)
18045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18046for as_dir in $PATH
18047do
18048  IFS=$as_save_IFS
18049  test -z "$as_dir" && as_dir=.
18050    for ac_exec_ext in '' $ac_executable_extensions; do
18051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18052    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18054    break 2
18055  fi
18056done
18057  done
18058IFS=$as_save_IFS
18059
18060  ;;
18061esac
18062fi
18063STAT=$ac_cv_path_STAT
18064if test -n "$STAT"; then
18065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18066$as_echo "$STAT" >&6; }
18067else
18068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18069$as_echo "no" >&6; }
18070fi
18071
18072
18073  test -n "$STAT" && break
18074done
18075
18076    else
18077      # If it succeeded, then it was overridden by the user. We will use it
18078      # for the tool.
18079
18080      # First remove it from the list of overridden variables, so we can test
18081      # for unknown variables in the end.
18082      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18083
18084      # Check if the provided tool contains a complete path.
18085      tool_specified="$STAT"
18086      tool_basename="${tool_specified##*/}"
18087      if test "x$tool_basename" = "x$tool_specified"; then
18088        # A command without a complete path is provided, search $PATH.
18089        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18090$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18091        # Extract the first word of "$tool_basename", so it can be a program name with args.
18092set dummy $tool_basename; ac_word=$2
18093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18094$as_echo_n "checking for $ac_word... " >&6; }
18095if ${ac_cv_path_STAT+:} false; then :
18096  $as_echo_n "(cached) " >&6
18097else
18098  case $STAT in
18099  [\\/]* | ?:[\\/]*)
18100  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18101  ;;
18102  *)
18103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18104for as_dir in $PATH
18105do
18106  IFS=$as_save_IFS
18107  test -z "$as_dir" && as_dir=.
18108    for ac_exec_ext in '' $ac_executable_extensions; do
18109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18110    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18112    break 2
18113  fi
18114done
18115  done
18116IFS=$as_save_IFS
18117
18118  ;;
18119esac
18120fi
18121STAT=$ac_cv_path_STAT
18122if test -n "$STAT"; then
18123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18124$as_echo "$STAT" >&6; }
18125else
18126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18127$as_echo "no" >&6; }
18128fi
18129
18130
18131        if test "x$STAT" = x; then
18132          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18133        fi
18134      else
18135        # Otherwise we believe it is a complete path. Use it as it is.
18136        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18137$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18138        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18139$as_echo_n "checking for STAT... " >&6; }
18140        if test ! -x "$tool_specified"; then
18141          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18142$as_echo "not found" >&6; }
18143          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18144        fi
18145        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18146$as_echo "$tool_specified" >&6; }
18147      fi
18148    fi
18149  fi
18150
18151
18152
18153
18154  # Publish this variable in the help.
18155
18156
18157  if test "x$TIME" = x; then
18158    # The variable is not set by user, try to locate tool using the code snippet
18159    for ac_prog in time
18160do
18161  # Extract the first word of "$ac_prog", so it can be a program name with args.
18162set dummy $ac_prog; ac_word=$2
18163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18164$as_echo_n "checking for $ac_word... " >&6; }
18165if ${ac_cv_path_TIME+:} false; then :
18166  $as_echo_n "(cached) " >&6
18167else
18168  case $TIME in
18169  [\\/]* | ?:[\\/]*)
18170  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18171  ;;
18172  *)
18173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18174for as_dir in $PATH
18175do
18176  IFS=$as_save_IFS
18177  test -z "$as_dir" && as_dir=.
18178    for ac_exec_ext in '' $ac_executable_extensions; do
18179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18180    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18182    break 2
18183  fi
18184done
18185  done
18186IFS=$as_save_IFS
18187
18188  ;;
18189esac
18190fi
18191TIME=$ac_cv_path_TIME
18192if test -n "$TIME"; then
18193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18194$as_echo "$TIME" >&6; }
18195else
18196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18197$as_echo "no" >&6; }
18198fi
18199
18200
18201  test -n "$TIME" && break
18202done
18203
18204  else
18205    # The variable is set, but is it from the command line or the environment?
18206
18207    # Try to remove the string !TIME! from our list.
18208    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18209    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18210      # If it failed, the variable was not from the command line. Ignore it,
18211      # but warn the user (except for BASH, which is always set by the calling BASH).
18212      if test "xTIME" != xBASH; then
18213        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18214$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18215      fi
18216      # Try to locate tool using the code snippet
18217      for ac_prog in time
18218do
18219  # Extract the first word of "$ac_prog", so it can be a program name with args.
18220set dummy $ac_prog; ac_word=$2
18221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18222$as_echo_n "checking for $ac_word... " >&6; }
18223if ${ac_cv_path_TIME+:} false; then :
18224  $as_echo_n "(cached) " >&6
18225else
18226  case $TIME in
18227  [\\/]* | ?:[\\/]*)
18228  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18229  ;;
18230  *)
18231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18232for as_dir in $PATH
18233do
18234  IFS=$as_save_IFS
18235  test -z "$as_dir" && as_dir=.
18236    for ac_exec_ext in '' $ac_executable_extensions; do
18237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18238    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18240    break 2
18241  fi
18242done
18243  done
18244IFS=$as_save_IFS
18245
18246  ;;
18247esac
18248fi
18249TIME=$ac_cv_path_TIME
18250if test -n "$TIME"; then
18251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18252$as_echo "$TIME" >&6; }
18253else
18254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18255$as_echo "no" >&6; }
18256fi
18257
18258
18259  test -n "$TIME" && break
18260done
18261
18262    else
18263      # If it succeeded, then it was overridden by the user. We will use it
18264      # for the tool.
18265
18266      # First remove it from the list of overridden variables, so we can test
18267      # for unknown variables in the end.
18268      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18269
18270      # Check if the provided tool contains a complete path.
18271      tool_specified="$TIME"
18272      tool_basename="${tool_specified##*/}"
18273      if test "x$tool_basename" = "x$tool_specified"; then
18274        # A command without a complete path is provided, search $PATH.
18275        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18276$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18277        # Extract the first word of "$tool_basename", so it can be a program name with args.
18278set dummy $tool_basename; ac_word=$2
18279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18280$as_echo_n "checking for $ac_word... " >&6; }
18281if ${ac_cv_path_TIME+:} false; then :
18282  $as_echo_n "(cached) " >&6
18283else
18284  case $TIME in
18285  [\\/]* | ?:[\\/]*)
18286  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18287  ;;
18288  *)
18289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18290for as_dir in $PATH
18291do
18292  IFS=$as_save_IFS
18293  test -z "$as_dir" && as_dir=.
18294    for ac_exec_ext in '' $ac_executable_extensions; do
18295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18296    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18298    break 2
18299  fi
18300done
18301  done
18302IFS=$as_save_IFS
18303
18304  ;;
18305esac
18306fi
18307TIME=$ac_cv_path_TIME
18308if test -n "$TIME"; then
18309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18310$as_echo "$TIME" >&6; }
18311else
18312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18313$as_echo "no" >&6; }
18314fi
18315
18316
18317        if test "x$TIME" = x; then
18318          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18319        fi
18320      else
18321        # Otherwise we believe it is a complete path. Use it as it is.
18322        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18323$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18324        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18325$as_echo_n "checking for TIME... " >&6; }
18326        if test ! -x "$tool_specified"; then
18327          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18328$as_echo "not found" >&6; }
18329          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18330        fi
18331        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18332$as_echo "$tool_specified" >&6; }
18333      fi
18334    fi
18335  fi
18336
18337
18338  # Check if it's GNU time
18339  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18340  if test "x$IS_GNU_TIME" != x; then
18341    IS_GNU_TIME=yes
18342  else
18343    IS_GNU_TIME=no
18344  fi
18345
18346
18347  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18348
18349
18350
18351  # Publish this variable in the help.
18352
18353
18354  if test "x$COMM" = x; then
18355    # The variable is not set by user, try to locate tool using the code snippet
18356    for ac_prog in comm
18357do
18358  # Extract the first word of "$ac_prog", so it can be a program name with args.
18359set dummy $ac_prog; ac_word=$2
18360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18361$as_echo_n "checking for $ac_word... " >&6; }
18362if ${ac_cv_path_COMM+:} false; then :
18363  $as_echo_n "(cached) " >&6
18364else
18365  case $COMM in
18366  [\\/]* | ?:[\\/]*)
18367  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18368  ;;
18369  *)
18370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18371for as_dir in $PATH
18372do
18373  IFS=$as_save_IFS
18374  test -z "$as_dir" && as_dir=.
18375    for ac_exec_ext in '' $ac_executable_extensions; do
18376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18377    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18379    break 2
18380  fi
18381done
18382  done
18383IFS=$as_save_IFS
18384
18385  ;;
18386esac
18387fi
18388COMM=$ac_cv_path_COMM
18389if test -n "$COMM"; then
18390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18391$as_echo "$COMM" >&6; }
18392else
18393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18394$as_echo "no" >&6; }
18395fi
18396
18397
18398  test -n "$COMM" && break
18399done
18400
18401  else
18402    # The variable is set, but is it from the command line or the environment?
18403
18404    # Try to remove the string !COMM! from our list.
18405    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18406    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18407      # If it failed, the variable was not from the command line. Ignore it,
18408      # but warn the user (except for BASH, which is always set by the calling BASH).
18409      if test "xCOMM" != xBASH; then
18410        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18411$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18412      fi
18413      # Try to locate tool using the code snippet
18414      for ac_prog in comm
18415do
18416  # Extract the first word of "$ac_prog", so it can be a program name with args.
18417set dummy $ac_prog; ac_word=$2
18418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18419$as_echo_n "checking for $ac_word... " >&6; }
18420if ${ac_cv_path_COMM+:} false; then :
18421  $as_echo_n "(cached) " >&6
18422else
18423  case $COMM in
18424  [\\/]* | ?:[\\/]*)
18425  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18426  ;;
18427  *)
18428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18429for as_dir in $PATH
18430do
18431  IFS=$as_save_IFS
18432  test -z "$as_dir" && as_dir=.
18433    for ac_exec_ext in '' $ac_executable_extensions; do
18434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18435    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18437    break 2
18438  fi
18439done
18440  done
18441IFS=$as_save_IFS
18442
18443  ;;
18444esac
18445fi
18446COMM=$ac_cv_path_COMM
18447if test -n "$COMM"; then
18448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18449$as_echo "$COMM" >&6; }
18450else
18451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18452$as_echo "no" >&6; }
18453fi
18454
18455
18456  test -n "$COMM" && break
18457done
18458
18459    else
18460      # If it succeeded, then it was overridden by the user. We will use it
18461      # for the tool.
18462
18463      # First remove it from the list of overridden variables, so we can test
18464      # for unknown variables in the end.
18465      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18466
18467      # Check if the provided tool contains a complete path.
18468      tool_specified="$COMM"
18469      tool_basename="${tool_specified##*/}"
18470      if test "x$tool_basename" = "x$tool_specified"; then
18471        # A command without a complete path is provided, search $PATH.
18472        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18473$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18474        # Extract the first word of "$tool_basename", so it can be a program name with args.
18475set dummy $tool_basename; ac_word=$2
18476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18477$as_echo_n "checking for $ac_word... " >&6; }
18478if ${ac_cv_path_COMM+:} false; then :
18479  $as_echo_n "(cached) " >&6
18480else
18481  case $COMM in
18482  [\\/]* | ?:[\\/]*)
18483  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18484  ;;
18485  *)
18486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18487for as_dir in $PATH
18488do
18489  IFS=$as_save_IFS
18490  test -z "$as_dir" && as_dir=.
18491    for ac_exec_ext in '' $ac_executable_extensions; do
18492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18493    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18495    break 2
18496  fi
18497done
18498  done
18499IFS=$as_save_IFS
18500
18501  ;;
18502esac
18503fi
18504COMM=$ac_cv_path_COMM
18505if test -n "$COMM"; then
18506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18507$as_echo "$COMM" >&6; }
18508else
18509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18510$as_echo "no" >&6; }
18511fi
18512
18513
18514        if test "x$COMM" = x; then
18515          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18516        fi
18517      else
18518        # Otherwise we believe it is a complete path. Use it as it is.
18519        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18520$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18521        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18522$as_echo_n "checking for COMM... " >&6; }
18523        if test ! -x "$tool_specified"; then
18524          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18525$as_echo "not found" >&6; }
18526          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18527        fi
18528        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18529$as_echo "$tool_specified" >&6; }
18530      fi
18531    fi
18532  fi
18533
18534
18535
18536  if test "x$COMM" = x; then
18537    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18538  fi
18539
18540
18541  fi
18542
18543  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18544
18545
18546
18547  # Publish this variable in the help.
18548
18549
18550  if test "x$DSYMUTIL" = x; then
18551    # The variable is not set by user, try to locate tool using the code snippet
18552    for ac_prog in dsymutil
18553do
18554  # Extract the first word of "$ac_prog", so it can be a program name with args.
18555set dummy $ac_prog; ac_word=$2
18556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18557$as_echo_n "checking for $ac_word... " >&6; }
18558if ${ac_cv_path_DSYMUTIL+:} false; then :
18559  $as_echo_n "(cached) " >&6
18560else
18561  case $DSYMUTIL in
18562  [\\/]* | ?:[\\/]*)
18563  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18564  ;;
18565  *)
18566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18567for as_dir in $PATH
18568do
18569  IFS=$as_save_IFS
18570  test -z "$as_dir" && as_dir=.
18571    for ac_exec_ext in '' $ac_executable_extensions; do
18572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18573    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18575    break 2
18576  fi
18577done
18578  done
18579IFS=$as_save_IFS
18580
18581  ;;
18582esac
18583fi
18584DSYMUTIL=$ac_cv_path_DSYMUTIL
18585if test -n "$DSYMUTIL"; then
18586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18587$as_echo "$DSYMUTIL" >&6; }
18588else
18589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18590$as_echo "no" >&6; }
18591fi
18592
18593
18594  test -n "$DSYMUTIL" && break
18595done
18596
18597  else
18598    # The variable is set, but is it from the command line or the environment?
18599
18600    # Try to remove the string !DSYMUTIL! from our list.
18601    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18602    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18603      # If it failed, the variable was not from the command line. Ignore it,
18604      # but warn the user (except for BASH, which is always set by the calling BASH).
18605      if test "xDSYMUTIL" != xBASH; then
18606        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18607$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18608      fi
18609      # Try to locate tool using the code snippet
18610      for ac_prog in dsymutil
18611do
18612  # Extract the first word of "$ac_prog", so it can be a program name with args.
18613set dummy $ac_prog; ac_word=$2
18614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18615$as_echo_n "checking for $ac_word... " >&6; }
18616if ${ac_cv_path_DSYMUTIL+:} false; then :
18617  $as_echo_n "(cached) " >&6
18618else
18619  case $DSYMUTIL in
18620  [\\/]* | ?:[\\/]*)
18621  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18622  ;;
18623  *)
18624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18625for as_dir in $PATH
18626do
18627  IFS=$as_save_IFS
18628  test -z "$as_dir" && as_dir=.
18629    for ac_exec_ext in '' $ac_executable_extensions; do
18630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18631    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18633    break 2
18634  fi
18635done
18636  done
18637IFS=$as_save_IFS
18638
18639  ;;
18640esac
18641fi
18642DSYMUTIL=$ac_cv_path_DSYMUTIL
18643if test -n "$DSYMUTIL"; then
18644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18645$as_echo "$DSYMUTIL" >&6; }
18646else
18647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18648$as_echo "no" >&6; }
18649fi
18650
18651
18652  test -n "$DSYMUTIL" && break
18653done
18654
18655    else
18656      # If it succeeded, then it was overridden by the user. We will use it
18657      # for the tool.
18658
18659      # First remove it from the list of overridden variables, so we can test
18660      # for unknown variables in the end.
18661      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18662
18663      # Check if the provided tool contains a complete path.
18664      tool_specified="$DSYMUTIL"
18665      tool_basename="${tool_specified##*/}"
18666      if test "x$tool_basename" = "x$tool_specified"; then
18667        # A command without a complete path is provided, search $PATH.
18668        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18669$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18670        # Extract the first word of "$tool_basename", so it can be a program name with args.
18671set dummy $tool_basename; ac_word=$2
18672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18673$as_echo_n "checking for $ac_word... " >&6; }
18674if ${ac_cv_path_DSYMUTIL+:} false; then :
18675  $as_echo_n "(cached) " >&6
18676else
18677  case $DSYMUTIL in
18678  [\\/]* | ?:[\\/]*)
18679  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18680  ;;
18681  *)
18682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18683for as_dir in $PATH
18684do
18685  IFS=$as_save_IFS
18686  test -z "$as_dir" && as_dir=.
18687    for ac_exec_ext in '' $ac_executable_extensions; do
18688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18689    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18691    break 2
18692  fi
18693done
18694  done
18695IFS=$as_save_IFS
18696
18697  ;;
18698esac
18699fi
18700DSYMUTIL=$ac_cv_path_DSYMUTIL
18701if test -n "$DSYMUTIL"; then
18702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18703$as_echo "$DSYMUTIL" >&6; }
18704else
18705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18706$as_echo "no" >&6; }
18707fi
18708
18709
18710        if test "x$DSYMUTIL" = x; then
18711          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18712        fi
18713      else
18714        # Otherwise we believe it is a complete path. Use it as it is.
18715        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18716$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18717        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18718$as_echo_n "checking for DSYMUTIL... " >&6; }
18719        if test ! -x "$tool_specified"; then
18720          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18721$as_echo "not found" >&6; }
18722          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18723        fi
18724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18725$as_echo "$tool_specified" >&6; }
18726      fi
18727    fi
18728  fi
18729
18730
18731
18732  if test "x$DSYMUTIL" = x; then
18733    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
18734  fi
18735
18736
18737
18738
18739
18740  # Publish this variable in the help.
18741
18742
18743  if test "x$XATTR" = x; then
18744    # The variable is not set by user, try to locate tool using the code snippet
18745    for ac_prog in xattr
18746do
18747  # Extract the first word of "$ac_prog", so it can be a program name with args.
18748set dummy $ac_prog; ac_word=$2
18749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18750$as_echo_n "checking for $ac_word... " >&6; }
18751if ${ac_cv_path_XATTR+:} false; then :
18752  $as_echo_n "(cached) " >&6
18753else
18754  case $XATTR in
18755  [\\/]* | ?:[\\/]*)
18756  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18757  ;;
18758  *)
18759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18760for as_dir in $PATH
18761do
18762  IFS=$as_save_IFS
18763  test -z "$as_dir" && as_dir=.
18764    for ac_exec_ext in '' $ac_executable_extensions; do
18765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18766    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18768    break 2
18769  fi
18770done
18771  done
18772IFS=$as_save_IFS
18773
18774  ;;
18775esac
18776fi
18777XATTR=$ac_cv_path_XATTR
18778if test -n "$XATTR"; then
18779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18780$as_echo "$XATTR" >&6; }
18781else
18782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18783$as_echo "no" >&6; }
18784fi
18785
18786
18787  test -n "$XATTR" && break
18788done
18789
18790  else
18791    # The variable is set, but is it from the command line or the environment?
18792
18793    # Try to remove the string !XATTR! from our list.
18794    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
18795    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18796      # If it failed, the variable was not from the command line. Ignore it,
18797      # but warn the user (except for BASH, which is always set by the calling BASH).
18798      if test "xXATTR" != xBASH; then
18799        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
18800$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
18801      fi
18802      # Try to locate tool using the code snippet
18803      for ac_prog in xattr
18804do
18805  # Extract the first word of "$ac_prog", so it can be a program name with args.
18806set dummy $ac_prog; ac_word=$2
18807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18808$as_echo_n "checking for $ac_word... " >&6; }
18809if ${ac_cv_path_XATTR+:} false; then :
18810  $as_echo_n "(cached) " >&6
18811else
18812  case $XATTR in
18813  [\\/]* | ?:[\\/]*)
18814  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18815  ;;
18816  *)
18817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18818for as_dir in $PATH
18819do
18820  IFS=$as_save_IFS
18821  test -z "$as_dir" && as_dir=.
18822    for ac_exec_ext in '' $ac_executable_extensions; do
18823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18824    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18826    break 2
18827  fi
18828done
18829  done
18830IFS=$as_save_IFS
18831
18832  ;;
18833esac
18834fi
18835XATTR=$ac_cv_path_XATTR
18836if test -n "$XATTR"; then
18837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18838$as_echo "$XATTR" >&6; }
18839else
18840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18841$as_echo "no" >&6; }
18842fi
18843
18844
18845  test -n "$XATTR" && break
18846done
18847
18848    else
18849      # If it succeeded, then it was overridden by the user. We will use it
18850      # for the tool.
18851
18852      # First remove it from the list of overridden variables, so we can test
18853      # for unknown variables in the end.
18854      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18855
18856      # Check if the provided tool contains a complete path.
18857      tool_specified="$XATTR"
18858      tool_basename="${tool_specified##*/}"
18859      if test "x$tool_basename" = "x$tool_specified"; then
18860        # A command without a complete path is provided, search $PATH.
18861        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
18862$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
18863        # Extract the first word of "$tool_basename", so it can be a program name with args.
18864set dummy $tool_basename; ac_word=$2
18865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18866$as_echo_n "checking for $ac_word... " >&6; }
18867if ${ac_cv_path_XATTR+:} false; then :
18868  $as_echo_n "(cached) " >&6
18869else
18870  case $XATTR in
18871  [\\/]* | ?:[\\/]*)
18872  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18873  ;;
18874  *)
18875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18876for as_dir in $PATH
18877do
18878  IFS=$as_save_IFS
18879  test -z "$as_dir" && as_dir=.
18880    for ac_exec_ext in '' $ac_executable_extensions; do
18881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18882    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18884    break 2
18885  fi
18886done
18887  done
18888IFS=$as_save_IFS
18889
18890  ;;
18891esac
18892fi
18893XATTR=$ac_cv_path_XATTR
18894if test -n "$XATTR"; then
18895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18896$as_echo "$XATTR" >&6; }
18897else
18898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18899$as_echo "no" >&6; }
18900fi
18901
18902
18903        if test "x$XATTR" = x; then
18904          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18905        fi
18906      else
18907        # Otherwise we believe it is a complete path. Use it as it is.
18908        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
18909$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
18910        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
18911$as_echo_n "checking for XATTR... " >&6; }
18912        if test ! -x "$tool_specified"; then
18913          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18914$as_echo "not found" >&6; }
18915          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
18916        fi
18917        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18918$as_echo "$tool_specified" >&6; }
18919      fi
18920    fi
18921  fi
18922
18923
18924
18925  if test "x$XATTR" = x; then
18926    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
18927  fi
18928
18929
18930
18931
18932  # Publish this variable in the help.
18933
18934
18935  if test "x$CODESIGN" = x; then
18936    # The variable is not set by user, try to locate tool using the code snippet
18937    for ac_prog in codesign
18938do
18939  # Extract the first word of "$ac_prog", so it can be a program name with args.
18940set dummy $ac_prog; ac_word=$2
18941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18942$as_echo_n "checking for $ac_word... " >&6; }
18943if ${ac_cv_path_CODESIGN+:} false; then :
18944  $as_echo_n "(cached) " >&6
18945else
18946  case $CODESIGN in
18947  [\\/]* | ?:[\\/]*)
18948  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18949  ;;
18950  *)
18951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18952for as_dir in $PATH
18953do
18954  IFS=$as_save_IFS
18955  test -z "$as_dir" && as_dir=.
18956    for ac_exec_ext in '' $ac_executable_extensions; do
18957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18958    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18960    break 2
18961  fi
18962done
18963  done
18964IFS=$as_save_IFS
18965
18966  ;;
18967esac
18968fi
18969CODESIGN=$ac_cv_path_CODESIGN
18970if test -n "$CODESIGN"; then
18971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18972$as_echo "$CODESIGN" >&6; }
18973else
18974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18975$as_echo "no" >&6; }
18976fi
18977
18978
18979  test -n "$CODESIGN" && break
18980done
18981
18982  else
18983    # The variable is set, but is it from the command line or the environment?
18984
18985    # Try to remove the string !CODESIGN! from our list.
18986    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
18987    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18988      # If it failed, the variable was not from the command line. Ignore it,
18989      # but warn the user (except for BASH, which is always set by the calling BASH).
18990      if test "xCODESIGN" != xBASH; then
18991        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
18992$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
18993      fi
18994      # Try to locate tool using the code snippet
18995      for ac_prog in codesign
18996do
18997  # Extract the first word of "$ac_prog", so it can be a program name with args.
18998set dummy $ac_prog; ac_word=$2
18999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19000$as_echo_n "checking for $ac_word... " >&6; }
19001if ${ac_cv_path_CODESIGN+:} false; then :
19002  $as_echo_n "(cached) " >&6
19003else
19004  case $CODESIGN in
19005  [\\/]* | ?:[\\/]*)
19006  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19007  ;;
19008  *)
19009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19010for as_dir in $PATH
19011do
19012  IFS=$as_save_IFS
19013  test -z "$as_dir" && as_dir=.
19014    for ac_exec_ext in '' $ac_executable_extensions; do
19015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19016    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19018    break 2
19019  fi
19020done
19021  done
19022IFS=$as_save_IFS
19023
19024  ;;
19025esac
19026fi
19027CODESIGN=$ac_cv_path_CODESIGN
19028if test -n "$CODESIGN"; then
19029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19030$as_echo "$CODESIGN" >&6; }
19031else
19032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19033$as_echo "no" >&6; }
19034fi
19035
19036
19037  test -n "$CODESIGN" && break
19038done
19039
19040    else
19041      # If it succeeded, then it was overridden by the user. We will use it
19042      # for the tool.
19043
19044      # First remove it from the list of overridden variables, so we can test
19045      # for unknown variables in the end.
19046      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19047
19048      # Check if the provided tool contains a complete path.
19049      tool_specified="$CODESIGN"
19050      tool_basename="${tool_specified##*/}"
19051      if test "x$tool_basename" = "x$tool_specified"; then
19052        # A command without a complete path is provided, search $PATH.
19053        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19054$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19055        # Extract the first word of "$tool_basename", so it can be a program name with args.
19056set dummy $tool_basename; ac_word=$2
19057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19058$as_echo_n "checking for $ac_word... " >&6; }
19059if ${ac_cv_path_CODESIGN+:} false; then :
19060  $as_echo_n "(cached) " >&6
19061else
19062  case $CODESIGN in
19063  [\\/]* | ?:[\\/]*)
19064  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19065  ;;
19066  *)
19067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19068for as_dir in $PATH
19069do
19070  IFS=$as_save_IFS
19071  test -z "$as_dir" && as_dir=.
19072    for ac_exec_ext in '' $ac_executable_extensions; do
19073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19074    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19076    break 2
19077  fi
19078done
19079  done
19080IFS=$as_save_IFS
19081
19082  ;;
19083esac
19084fi
19085CODESIGN=$ac_cv_path_CODESIGN
19086if test -n "$CODESIGN"; then
19087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19088$as_echo "$CODESIGN" >&6; }
19089else
19090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19091$as_echo "no" >&6; }
19092fi
19093
19094
19095        if test "x$CODESIGN" = x; then
19096          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19097        fi
19098      else
19099        # Otherwise we believe it is a complete path. Use it as it is.
19100        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19101$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19103$as_echo_n "checking for CODESIGN... " >&6; }
19104        if test ! -x "$tool_specified"; then
19105          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19106$as_echo "not found" >&6; }
19107          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19108        fi
19109        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19110$as_echo "$tool_specified" >&6; }
19111      fi
19112    fi
19113  fi
19114
19115
19116    if test "x$CODESIGN" != "x"; then
19117      # Verify that the openjdk_codesign certificate is present
19118      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19119$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19120      rm -f codesign-testfile
19121      touch codesign-testfile
19122      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19123      rm -f codesign-testfile
19124      if test "x$CODESIGN" = x; then
19125        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19126$as_echo "no" >&6; }
19127      else
19128        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19129$as_echo "yes" >&6; }
19130      fi
19131    fi
19132  fi
19133
19134
19135# Check if pkg-config is available.
19136
19137
19138if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19139	if test -n "$ac_tool_prefix"; then
19140  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19141set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19143$as_echo_n "checking for $ac_word... " >&6; }
19144if ${ac_cv_path_PKG_CONFIG+:} false; then :
19145  $as_echo_n "(cached) " >&6
19146else
19147  case $PKG_CONFIG in
19148  [\\/]* | ?:[\\/]*)
19149  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19150  ;;
19151  *)
19152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19153for as_dir in $PATH
19154do
19155  IFS=$as_save_IFS
19156  test -z "$as_dir" && as_dir=.
19157    for ac_exec_ext in '' $ac_executable_extensions; do
19158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19159    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19161    break 2
19162  fi
19163done
19164  done
19165IFS=$as_save_IFS
19166
19167  ;;
19168esac
19169fi
19170PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19171if test -n "$PKG_CONFIG"; then
19172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19173$as_echo "$PKG_CONFIG" >&6; }
19174else
19175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19176$as_echo "no" >&6; }
19177fi
19178
19179
19180fi
19181if test -z "$ac_cv_path_PKG_CONFIG"; then
19182  ac_pt_PKG_CONFIG=$PKG_CONFIG
19183  # Extract the first word of "pkg-config", so it can be a program name with args.
19184set dummy pkg-config; ac_word=$2
19185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19186$as_echo_n "checking for $ac_word... " >&6; }
19187if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19188  $as_echo_n "(cached) " >&6
19189else
19190  case $ac_pt_PKG_CONFIG in
19191  [\\/]* | ?:[\\/]*)
19192  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19193  ;;
19194  *)
19195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19196for as_dir in $PATH
19197do
19198  IFS=$as_save_IFS
19199  test -z "$as_dir" && as_dir=.
19200    for ac_exec_ext in '' $ac_executable_extensions; do
19201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19202    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19204    break 2
19205  fi
19206done
19207  done
19208IFS=$as_save_IFS
19209
19210  ;;
19211esac
19212fi
19213ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19214if test -n "$ac_pt_PKG_CONFIG"; then
19215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19216$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19217else
19218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19219$as_echo "no" >&6; }
19220fi
19221
19222  if test "x$ac_pt_PKG_CONFIG" = x; then
19223    PKG_CONFIG=""
19224  else
19225    case $cross_compiling:$ac_tool_warned in
19226yes:)
19227{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19228$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19229ac_tool_warned=yes ;;
19230esac
19231    PKG_CONFIG=$ac_pt_PKG_CONFIG
19232  fi
19233else
19234  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19235fi
19236
19237fi
19238if test -n "$PKG_CONFIG"; then
19239	_pkg_min_version=0.9.0
19240	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19241$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19242	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19243		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19244$as_echo "yes" >&6; }
19245	else
19246		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19247$as_echo "no" >&6; }
19248		PKG_CONFIG=""
19249	fi
19250
19251fi
19252
19253# After basic tools have been setup, we can check build os specific details.
19254
19255  ###############################################################################
19256
19257  # Note that this is the build platform OS version!
19258
19259  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19260  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19261  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19262  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19263
19264
19265
19266
19267
19268# Setup builddeps, for automatic downloading of tools we need.
19269# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19270# boot-jdk setup, but we need to have basic tools setup first.
19271
19272
19273# Check whether --with-builddeps-conf was given.
19274if test "${with_builddeps_conf+set}" = set; then :
19275  withval=$with_builddeps_conf;
19276fi
19277
19278
19279
19280# Check whether --with-builddeps-server was given.
19281if test "${with_builddeps_server+set}" = set; then :
19282  withval=$with_builddeps_server;
19283fi
19284
19285
19286
19287# Check whether --with-builddeps-dir was given.
19288if test "${with_builddeps_dir+set}" = set; then :
19289  withval=$with_builddeps_dir;
19290else
19291  with_builddeps_dir=/localhome/builddeps
19292fi
19293
19294
19295
19296# Check whether --with-builddeps-group was given.
19297if test "${with_builddeps_group+set}" = set; then :
19298  withval=$with_builddeps_group;
19299fi
19300
19301
19302
19303
19304  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19305    if test "x$with_builddeps_conf" != x; then
19306      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19307$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19308      builddepsfile=$with_builddeps_conf
19309      if test -s $builddepsfile; then
19310        . $builddepsfile
19311        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19312$as_echo "loaded!" >&6; }
19313      else
19314        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19315      fi
19316    else
19317      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19318$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19319      builddepsfile=`mktemp`
19320      touch $builddepsfile
19321      # Put all found confs into a single file.
19322      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19323      # Source the file to acquire the variables
19324      if test -s $builddepsfile; then
19325        . $builddepsfile
19326        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19327$as_echo "found at least one!" >&6; }
19328      else
19329        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19330      fi
19331    fi
19332    # Create build and target names that use _ instead of "-" and ".".
19333    # This is necessary to use them in variable names.
19334    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19335    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19336    # Extract rewrite information for build and target
19337    eval rewritten_build=\${REWRITE_${build_var}}
19338    if test "x$rewritten_build" = x; then
19339      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19340      echo Build stays the same $rewritten_build
19341    else
19342      echo Rewriting build for builddeps into $rewritten_build
19343    fi
19344    eval rewritten_target=\${REWRITE_${target_var}}
19345    if test "x$rewritten_target" = x; then
19346      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19347      echo Target stays the same $rewritten_target
19348    else
19349      echo Rewriting target for builddeps into $rewritten_target
19350    fi
19351    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19352    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19353  fi
19354  for ac_prog in 7z unzip
19355do
19356  # Extract the first word of "$ac_prog", so it can be a program name with args.
19357set dummy $ac_prog; ac_word=$2
19358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19359$as_echo_n "checking for $ac_word... " >&6; }
19360if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19361  $as_echo_n "(cached) " >&6
19362else
19363  if test -n "$BDEPS_UNZIP"; then
19364  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19365else
19366as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19367for as_dir in $PATH
19368do
19369  IFS=$as_save_IFS
19370  test -z "$as_dir" && as_dir=.
19371    for ac_exec_ext in '' $ac_executable_extensions; do
19372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19373    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19375    break 2
19376  fi
19377done
19378  done
19379IFS=$as_save_IFS
19380
19381fi
19382fi
19383BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19384if test -n "$BDEPS_UNZIP"; then
19385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19386$as_echo "$BDEPS_UNZIP" >&6; }
19387else
19388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19389$as_echo "no" >&6; }
19390fi
19391
19392
19393  test -n "$BDEPS_UNZIP" && break
19394done
19395
19396  if test "x$BDEPS_UNZIP" = x7z; then
19397    BDEPS_UNZIP="7z x"
19398  fi
19399
19400  for ac_prog in wget lftp ftp
19401do
19402  # Extract the first word of "$ac_prog", so it can be a program name with args.
19403set dummy $ac_prog; ac_word=$2
19404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19405$as_echo_n "checking for $ac_word... " >&6; }
19406if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19407  $as_echo_n "(cached) " >&6
19408else
19409  if test -n "$BDEPS_FTP"; then
19410  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19411else
19412as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19413for as_dir in $PATH
19414do
19415  IFS=$as_save_IFS
19416  test -z "$as_dir" && as_dir=.
19417    for ac_exec_ext in '' $ac_executable_extensions; do
19418  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19419    ac_cv_prog_BDEPS_FTP="$ac_prog"
19420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19421    break 2
19422  fi
19423done
19424  done
19425IFS=$as_save_IFS
19426
19427fi
19428fi
19429BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19430if test -n "$BDEPS_FTP"; then
19431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19432$as_echo "$BDEPS_FTP" >&6; }
19433else
19434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19435$as_echo "no" >&6; }
19436fi
19437
19438
19439  test -n "$BDEPS_FTP" && break
19440done
19441
19442
19443
19444###############################################################################
19445#
19446# Determine OpenJDK variants, options and version numbers.
19447#
19448###############################################################################
19449
19450# We need build & target for this.
19451
19452
19453  ###############################################################################
19454  #
19455  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19456  # We always build headless support.
19457  #
19458  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19459$as_echo_n "checking headful support... " >&6; }
19460  # Check whether --enable-headful was given.
19461if test "${enable_headful+set}" = set; then :
19462  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19463else
19464  SUPPORT_HEADFUL=yes
19465fi
19466
19467
19468  SUPPORT_HEADLESS=yes
19469  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19470
19471  if test "x$SUPPORT_HEADFUL" = xyes; then
19472    # We are building both headful and headless.
19473    headful_msg="include support for both headful and headless"
19474  fi
19475
19476  if test "x$SUPPORT_HEADFUL" = xno; then
19477    # Thus we are building headless only.
19478    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19479    headful_msg="headless only"
19480  fi
19481
19482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19483$as_echo "$headful_msg" >&6; }
19484
19485
19486
19487
19488
19489  # Control wether Hotspot runs Queens test after build.
19490  # Check whether --enable-hotspot-test-in-build was given.
19491if test "${enable_hotspot_test_in_build+set}" = set; then :
19492  enableval=$enable_hotspot_test_in_build;
19493else
19494  enable_hotspot_test_in_build=no
19495fi
19496
19497  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19498    TEST_IN_BUILD=true
19499  else
19500    TEST_IN_BUILD=false
19501  fi
19502
19503
19504  ###############################################################################
19505  #
19506  # Choose cacerts source file
19507  #
19508
19509# Check whether --with-cacerts-file was given.
19510if test "${with_cacerts_file+set}" = set; then :
19511  withval=$with_cacerts_file;
19512fi
19513
19514  if test "x$with_cacerts_file" != x; then
19515    CACERTS_FILE=$with_cacerts_file
19516  else
19517    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19518  fi
19519
19520
19521  ###############################################################################
19522  #
19523  # Enable or disable unlimited crypto
19524  #
19525  # Check whether --enable-unlimited-crypto was given.
19526if test "${enable_unlimited_crypto+set}" = set; then :
19527  enableval=$enable_unlimited_crypto;
19528else
19529  enable_unlimited_crypto=no
19530fi
19531
19532  if test "x$enable_unlimited_crypto" = "xyes"; then
19533    UNLIMITED_CRYPTO=true
19534  else
19535    UNLIMITED_CRYPTO=false
19536  fi
19537
19538
19539  ###############################################################################
19540  #
19541  # Enable or disable the elliptic curve crypto implementation
19542  #
19543
19544
19545  ###############################################################################
19546  #
19547  # --enable-rmiconnector-iiop
19548  #
19549  # Check whether --enable-rmiconnector-iiop was given.
19550if test "${enable_rmiconnector_iiop+set}" = set; then :
19551  enableval=$enable_rmiconnector_iiop;
19552fi
19553
19554  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19555    RMICONNECTOR_IIOP=true
19556  else
19557    RMICONNECTOR_IIOP=false
19558  fi
19559
19560
19561  ###############################################################################
19562  #
19563  # Compress jars
19564  #
19565  COMPRESS_JARS=false
19566
19567
19568
19569
19570  # Source the version numbers
19571  . $AUTOCONF_DIR/version-numbers
19572
19573  # Get the settings from parameters
19574
19575# Check whether --with-milestone was given.
19576if test "${with_milestone+set}" = set; then :
19577  withval=$with_milestone;
19578fi
19579
19580  if test "x$with_milestone" = xyes; then
19581    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19582  elif test "x$with_milestone" != x; then
19583    MILESTONE="$with_milestone"
19584  fi
19585  if test "x$MILESTONE" = x; then
19586    MILESTONE=internal
19587  fi
19588
19589
19590# Check whether --with-update-version was given.
19591if test "${with_update_version+set}" = set; then :
19592  withval=$with_update_version;
19593fi
19594
19595  if test "x$with_update_version" = xyes; then
19596    as_fn_error $? "Update version must have a value" "$LINENO" 5
19597  elif test "x$with_update_version" != x; then
19598    JDK_UPDATE_VERSION="$with_update_version"
19599    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19600    # to a bug in expr (which reduces it to just X). To work around this, we
19601    # always add a 0 to one digit update versions.
19602    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19603      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19604    fi
19605  fi
19606
19607
19608# Check whether --with-user-release-suffix was given.
19609if test "${with_user_release_suffix+set}" = set; then :
19610  withval=$with_user_release_suffix;
19611fi
19612
19613  if test "x$with_user_release_suffix" = xyes; then
19614    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19615  elif test "x$with_user_release_suffix" != x; then
19616    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19617  fi
19618
19619
19620# Check whether --with-build-number was given.
19621if test "${with_build_number+set}" = set; then :
19622  withval=$with_build_number;
19623fi
19624
19625  if test "x$with_build_number" = xyes; then
19626    as_fn_error $? "Build number must have a value" "$LINENO" 5
19627  elif test "x$with_build_number" != x; then
19628    JDK_BUILD_NUMBER="$with_build_number"
19629  fi
19630  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19631  if test "x$JDK_BUILD_NUMBER" = x; then
19632    JDK_BUILD_NUMBER=b00
19633    if test "x$USER_RELEASE_SUFFIX" = x; then
19634      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19635      # Avoid [:alnum:] since it depends on the locale.
19636      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19637      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19638    fi
19639  fi
19640
19641  # Now set the JDK version, milestone, build number etc.
19642
19643
19644
19645
19646
19647
19648
19649
19650
19651
19652
19653
19654
19655
19656
19657  COPYRIGHT_YEAR=`date +'%Y'`
19658
19659
19660  if test "x$JDK_UPDATE_VERSION" != x; then
19661    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19662  else
19663    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19664  fi
19665
19666
19667  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19668
19669
19670
19671###############################################################################
19672#
19673# Setup BootJDK, used to bootstrap the build.
19674#
19675###############################################################################
19676
19677
19678  BOOT_JDK_FOUND=no
19679
19680# Check whether --with-boot-jdk was given.
19681if test "${with_boot_jdk+set}" = set; then :
19682  withval=$with_boot_jdk;
19683fi
19684
19685
19686  # We look for the Boot JDK through various means, going from more certain to
19687  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19688  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19689  # must check if this is indeed valid; otherwise we'll continue looking.
19690
19691  # Test: Is bootjdk explicitely set by command line arguments?
19692
19693  if test "x$BOOT_JDK_FOUND" = xno; then
19694    # Now execute the test
19695
19696  if test "x$with_boot_jdk" != x; then
19697    BOOT_JDK=$with_boot_jdk
19698    BOOT_JDK_FOUND=maybe
19699    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19700$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19701  fi
19702
19703
19704    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19705    if test "x$BOOT_JDK_FOUND" = xmaybe; then
19706      # Do we have a bin/java?
19707      if test ! -x "$BOOT_JDK/bin/java"; then
19708        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19709$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19710        BOOT_JDK_FOUND=no
19711      else
19712        # Do we have a bin/javac?
19713        if test ! -x "$BOOT_JDK/bin/javac"; then
19714          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19715$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19716          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19717$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19718          BOOT_JDK_FOUND=no
19719        else
19720          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19721          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19722            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19723$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19724            BOOT_JDK_FOUND=no
19725          else
19726            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19727            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19728
19729            # Extra M4 quote needed to protect [] in grep expression.
19730            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
19731            if test "x$FOUND_CORRECT_VERSION" = x; then
19732              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19733$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19734              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
19735$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
19736              BOOT_JDK_FOUND=no
19737            else
19738              # We're done! :-)
19739              BOOT_JDK_FOUND=yes
19740
19741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19742
19743  # Input might be given as Windows format, start by converting to
19744  # unix format.
19745  path="$BOOT_JDK"
19746  new_path=`$CYGPATH -u "$path"`
19747
19748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19751  # "foo.exe" is OK but "foo" is an error.
19752  #
19753  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19754  # It is also a way to make sure we got the proper file name for the real test later on.
19755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19756  if test "x$test_shortpath" = x; then
19757    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19758$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19759    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19760  fi
19761
19762  # Call helper function which possibly converts this using DOS-style short mode.
19763  # If so, the updated path is stored in $new_path.
19764
19765  input_path="$new_path"
19766  # Check if we need to convert this using DOS-style short mode. If the path
19767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19768  # take no chances and rewrite it.
19769  # Note: m4 eats our [], so we need to use [ and ] instead.
19770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19771  if test "x$has_forbidden_chars" != x; then
19772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19776      # Going to short mode and back again did indeed matter. Since short mode is
19777      # case insensitive, let's make it lowercase to improve readability.
19778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19779      # Now convert it back to Unix-stile (cygpath)
19780      input_path=`$CYGPATH -u "$shortmode_path"`
19781      new_path="$input_path"
19782    fi
19783  fi
19784
19785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19786  if test "x$test_cygdrive_prefix" = x; then
19787    # As a simple fix, exclude /usr/bin since it's not a real path.
19788    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19790      # a path prefixed by /cygdrive for fixpath to work.
19791      new_path="$CYGWIN_ROOT_PATH$input_path"
19792    fi
19793  fi
19794
19795
19796  if test "x$path" != "x$new_path"; then
19797    BOOT_JDK="$new_path"
19798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19799$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19800  fi
19801
19802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19803
19804  path="$BOOT_JDK"
19805  has_colon=`$ECHO $path | $GREP ^.:`
19806  new_path="$path"
19807  if test "x$has_colon" = x; then
19808    # Not in mixed or Windows style, start by that.
19809    new_path=`cmd //c echo $path`
19810  fi
19811
19812
19813  input_path="$new_path"
19814  # Check if we need to convert this using DOS-style short mode. If the path
19815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19816  # take no chances and rewrite it.
19817  # Note: m4 eats our [], so we need to use [ and ] instead.
19818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19819  if test "x$has_forbidden_chars" != x; then
19820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19821    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19822  fi
19823
19824
19825  windows_path="$new_path"
19826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19827    unix_path=`$CYGPATH -u "$windows_path"`
19828    new_path="$unix_path"
19829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19831    new_path="$unix_path"
19832  fi
19833
19834  if test "x$path" != "x$new_path"; then
19835    BOOT_JDK="$new_path"
19836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19837$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19838  fi
19839
19840  # Save the first 10 bytes of this path to the storage, so fixpath can work.
19841  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19842
19843  else
19844    # We're on a posix platform. Hooray! :)
19845    path="$BOOT_JDK"
19846    has_space=`$ECHO "$path" | $GREP " "`
19847    if test "x$has_space" != x; then
19848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19849$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19850      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
19851    fi
19852
19853    # Use eval to expand a potential ~
19854    eval path="$path"
19855    if test ! -f "$path" && test ! -d "$path"; then
19856      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
19857    fi
19858
19859    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
19860  fi
19861
19862              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
19863$as_echo_n "checking for Boot JDK... " >&6; }
19864              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
19865$as_echo "$BOOT_JDK" >&6; }
19866              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
19867$as_echo_n "checking Boot JDK version... " >&6; }
19868              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
19869              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
19870$as_echo "$BOOT_JDK_VERSION" >&6; }
19871            fi # end check jdk version
19872          fi # end check rt.jar
19873        fi # end check javac
19874      fi # end check java
19875    fi # end check boot jdk found
19876  fi
19877
19878  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
19879    # Having specified an argument which is incorrect will produce an instant failure;
19880    # we should not go on looking
19881    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
19882  fi
19883
19884  # Test: Is bootjdk available from builddeps?
19885
19886  if test "x$BOOT_JDK_FOUND" = xno; then
19887    # Now execute the test
19888
19889
19890
19891  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19892    # Source the builddeps file again, to make sure it uses the latest variables!
19893    . $builddepsfile
19894    # Look for a target and build machine specific resource!
19895    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19896    if test "x$resource" = x; then
19897      # Ok, lets instead look for a target specific resource
19898      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
19899    fi
19900    if test "x$resource" = x; then
19901      # Ok, lets instead look for a build specific resource
19902      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
19903    fi
19904    if test "x$resource" = x; then
19905      # Ok, lets instead look for a generic resource
19906      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
19907      resource=${builddep_bootjdk}
19908    fi
19909    if test "x$resource" != x; then
19910      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
19911$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
19912      # If the resource in the builddeps.conf file is an existing directory,
19913      # for example /java/linux/cups
19914      if test -d ${resource}; then
19915        depdir=${resource}
19916      else
19917
19918  # bootjdk is for example mymodule
19919  # $resource is for example libs/general/libmymod_1_2_3.zip
19920  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19921  # $with_builddeps_dir is for example /localhome/builddeps
19922  # depdir is the name of the variable into which we store the depdir, eg MYMOD
19923  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19924  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19925  filename=`basename $resource`
19926  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19927  filebase=${filename%%.*}
19928  extension=${filename#*.}
19929  installdir=$with_builddeps_dir/$filebase
19930  if test ! -f $installdir/$filename.unpacked; then
19931    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
19932$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19933    if test ! -d $installdir; then
19934      mkdir -p $installdir
19935    fi
19936    if test ! -d $installdir; then
19937      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19938    fi
19939    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
19940    touch $tmpfile
19941    if test ! -f $tmpfile; then
19942      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19943    fi
19944
19945  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19946  # $tmpfile is the local file name for the downloaded file.
19947  VALID_TOOL=no
19948  if test "x$BDEPS_FTP" = xwget; then
19949    VALID_TOOL=yes
19950    wget -O $tmpfile $with_builddeps_server/$resource
19951  fi
19952  if test "x$BDEPS_FTP" = xlftp; then
19953    VALID_TOOL=yes
19954    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19955  fi
19956  if test "x$BDEPS_FTP" = xftp; then
19957    VALID_TOOL=yes
19958    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19959    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19960    FTPUSERPWD=${FTPSERVER%%@*}
19961    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19962      FTPUSER=${userpwd%%:*}
19963      FTPPWD=${userpwd#*@}
19964      FTPSERVER=${FTPSERVER#*@}
19965    else
19966      FTPUSER=ftp
19967      FTPPWD=ftp
19968    fi
19969    # the "pass" command does not work on some
19970    # ftp clients (read ftp.exe) but if it works,
19971    # passive mode is better!
19972    ( \
19973        echo "user $FTPUSER $FTPPWD"        ; \
19974        echo "pass"                         ; \
19975        echo "bin"                          ; \
19976        echo "get $FTPPATH $tmpfile"              ; \
19977    ) | ftp -in $FTPSERVER
19978  fi
19979  if test "x$VALID_TOOL" != xyes; then
19980    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19981  fi
19982
19983    mv $tmpfile $installdir/$filename
19984    if test ! -s $installdir/$filename; then
19985      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19986    fi
19987    case "$extension" in
19988      zip)  echo "Unzipping $installdir/$filename..."
19989        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19990        ;;
19991      tar.gz) echo "Untaring $installdir/$filename..."
19992        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19993        ;;
19994      tgz) echo "Untaring $installdir/$filename..."
19995        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19996        ;;
19997      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19998        ;;
19999    esac
20000  fi
20001  if test -f $installdir/$filename.unpacked; then
20002    depdir=$installdir
20003  fi
20004
20005      fi
20006      # Source the builddeps file again, because in the previous command, the depdir
20007      # was updated to point at the current build dependency install directory.
20008      . $builddepsfile
20009      # Now extract variables from the builddeps.conf files.
20010      theroot=${builddep_bootjdk_ROOT}
20011      thecflags=${builddep_bootjdk_CFLAGS}
20012      thelibs=${builddep_bootjdk_LIBS}
20013      if test "x$depdir" = x; then
20014        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20015      fi
20016      BOOT_JDK=$depdir
20017      if test "x$theroot" != x; then
20018        BOOT_JDK="$theroot"
20019      fi
20020      if test "x$thecflags" != x; then
20021        BOOT_JDK_CFLAGS="$thecflags"
20022      fi
20023      if test "x$thelibs" != x; then
20024        BOOT_JDK_LIBS="$thelibs"
20025      fi
20026      BOOT_JDK_FOUND=maybe
20027      else BOOT_JDK_FOUND=no
20028
20029    fi
20030    else BOOT_JDK_FOUND=no
20031
20032  fi
20033
20034
20035
20036    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20037    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20038      # Do we have a bin/java?
20039      if test ! -x "$BOOT_JDK/bin/java"; then
20040        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20041$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20042        BOOT_JDK_FOUND=no
20043      else
20044        # Do we have a bin/javac?
20045        if test ! -x "$BOOT_JDK/bin/javac"; then
20046          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20047$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20048          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20049$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20050          BOOT_JDK_FOUND=no
20051        else
20052          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20053          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20054            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20055$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20056            BOOT_JDK_FOUND=no
20057          else
20058            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20059            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20060
20061            # Extra M4 quote needed to protect [] in grep expression.
20062            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20063            if test "x$FOUND_CORRECT_VERSION" = x; then
20064              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20065$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20066              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20067$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20068              BOOT_JDK_FOUND=no
20069            else
20070              # We're done! :-)
20071              BOOT_JDK_FOUND=yes
20072
20073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20074
20075  # Input might be given as Windows format, start by converting to
20076  # unix format.
20077  path="$BOOT_JDK"
20078  new_path=`$CYGPATH -u "$path"`
20079
20080  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20081  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20082  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20083  # "foo.exe" is OK but "foo" is an error.
20084  #
20085  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20086  # It is also a way to make sure we got the proper file name for the real test later on.
20087  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20088  if test "x$test_shortpath" = x; then
20089    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20090$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20091    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20092  fi
20093
20094  # Call helper function which possibly converts this using DOS-style short mode.
20095  # If so, the updated path is stored in $new_path.
20096
20097  input_path="$new_path"
20098  # Check if we need to convert this using DOS-style short mode. If the path
20099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20100  # take no chances and rewrite it.
20101  # Note: m4 eats our [], so we need to use [ and ] instead.
20102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20103  if test "x$has_forbidden_chars" != x; then
20104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20108      # Going to short mode and back again did indeed matter. Since short mode is
20109      # case insensitive, let's make it lowercase to improve readability.
20110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20111      # Now convert it back to Unix-stile (cygpath)
20112      input_path=`$CYGPATH -u "$shortmode_path"`
20113      new_path="$input_path"
20114    fi
20115  fi
20116
20117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20118  if test "x$test_cygdrive_prefix" = x; then
20119    # As a simple fix, exclude /usr/bin since it's not a real path.
20120    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20122      # a path prefixed by /cygdrive for fixpath to work.
20123      new_path="$CYGWIN_ROOT_PATH$input_path"
20124    fi
20125  fi
20126
20127
20128  if test "x$path" != "x$new_path"; then
20129    BOOT_JDK="$new_path"
20130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20131$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20132  fi
20133
20134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20135
20136  path="$BOOT_JDK"
20137  has_colon=`$ECHO $path | $GREP ^.:`
20138  new_path="$path"
20139  if test "x$has_colon" = x; then
20140    # Not in mixed or Windows style, start by that.
20141    new_path=`cmd //c echo $path`
20142  fi
20143
20144
20145  input_path="$new_path"
20146  # Check if we need to convert this using DOS-style short mode. If the path
20147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20148  # take no chances and rewrite it.
20149  # Note: m4 eats our [], so we need to use [ and ] instead.
20150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20151  if test "x$has_forbidden_chars" != x; then
20152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20153    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20154  fi
20155
20156
20157  windows_path="$new_path"
20158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20159    unix_path=`$CYGPATH -u "$windows_path"`
20160    new_path="$unix_path"
20161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20163    new_path="$unix_path"
20164  fi
20165
20166  if test "x$path" != "x$new_path"; then
20167    BOOT_JDK="$new_path"
20168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20169$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20170  fi
20171
20172  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20173  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20174
20175  else
20176    # We're on a posix platform. Hooray! :)
20177    path="$BOOT_JDK"
20178    has_space=`$ECHO "$path" | $GREP " "`
20179    if test "x$has_space" != x; then
20180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20181$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20182      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20183    fi
20184
20185    # Use eval to expand a potential ~
20186    eval path="$path"
20187    if test ! -f "$path" && test ! -d "$path"; then
20188      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20189    fi
20190
20191    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20192  fi
20193
20194              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20195$as_echo_n "checking for Boot JDK... " >&6; }
20196              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20197$as_echo "$BOOT_JDK" >&6; }
20198              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20199$as_echo_n "checking Boot JDK version... " >&6; }
20200              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20201              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20202$as_echo "$BOOT_JDK_VERSION" >&6; }
20203            fi # end check jdk version
20204          fi # end check rt.jar
20205        fi # end check javac
20206      fi # end check java
20207    fi # end check boot jdk found
20208  fi
20209
20210
20211  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20212
20213  if test "x$BOOT_JDK_FOUND" = xno; then
20214    # Now execute the test
20215
20216  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20217    # First check at user selected default
20218
20219  if test "x$BOOT_JDK_FOUND" = xno; then
20220    # Now execute the test
20221
20222  if test -x /usr/libexec/java_home; then
20223    BOOT_JDK=`/usr/libexec/java_home `
20224    BOOT_JDK_FOUND=maybe
20225    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20226$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20227  fi
20228
20229
20230    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20231    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20232      # Do we have a bin/java?
20233      if test ! -x "$BOOT_JDK/bin/java"; then
20234        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20235$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20236        BOOT_JDK_FOUND=no
20237      else
20238        # Do we have a bin/javac?
20239        if test ! -x "$BOOT_JDK/bin/javac"; then
20240          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20241$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20242          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20243$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20244          BOOT_JDK_FOUND=no
20245        else
20246          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20247          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20248            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20250            BOOT_JDK_FOUND=no
20251          else
20252            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20253            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20254
20255            # Extra M4 quote needed to protect [] in grep expression.
20256            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20257            if test "x$FOUND_CORRECT_VERSION" = x; then
20258              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20259$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20260              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20261$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20262              BOOT_JDK_FOUND=no
20263            else
20264              # We're done! :-)
20265              BOOT_JDK_FOUND=yes
20266
20267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20268
20269  # Input might be given as Windows format, start by converting to
20270  # unix format.
20271  path="$BOOT_JDK"
20272  new_path=`$CYGPATH -u "$path"`
20273
20274  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20275  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20276  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20277  # "foo.exe" is OK but "foo" is an error.
20278  #
20279  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20280  # It is also a way to make sure we got the proper file name for the real test later on.
20281  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20282  if test "x$test_shortpath" = x; then
20283    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20284$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20285    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20286  fi
20287
20288  # Call helper function which possibly converts this using DOS-style short mode.
20289  # If so, the updated path is stored in $new_path.
20290
20291  input_path="$new_path"
20292  # Check if we need to convert this using DOS-style short mode. If the path
20293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20294  # take no chances and rewrite it.
20295  # Note: m4 eats our [], so we need to use [ and ] instead.
20296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20297  if test "x$has_forbidden_chars" != x; then
20298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20299    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20300    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20301    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20302      # Going to short mode and back again did indeed matter. Since short mode is
20303      # case insensitive, let's make it lowercase to improve readability.
20304      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20305      # Now convert it back to Unix-stile (cygpath)
20306      input_path=`$CYGPATH -u "$shortmode_path"`
20307      new_path="$input_path"
20308    fi
20309  fi
20310
20311  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20312  if test "x$test_cygdrive_prefix" = x; then
20313    # As a simple fix, exclude /usr/bin since it's not a real path.
20314    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20315      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20316      # a path prefixed by /cygdrive for fixpath to work.
20317      new_path="$CYGWIN_ROOT_PATH$input_path"
20318    fi
20319  fi
20320
20321
20322  if test "x$path" != "x$new_path"; then
20323    BOOT_JDK="$new_path"
20324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20325$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20326  fi
20327
20328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20329
20330  path="$BOOT_JDK"
20331  has_colon=`$ECHO $path | $GREP ^.:`
20332  new_path="$path"
20333  if test "x$has_colon" = x; then
20334    # Not in mixed or Windows style, start by that.
20335    new_path=`cmd //c echo $path`
20336  fi
20337
20338
20339  input_path="$new_path"
20340  # Check if we need to convert this using DOS-style short mode. If the path
20341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20342  # take no chances and rewrite it.
20343  # Note: m4 eats our [], so we need to use [ and ] instead.
20344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20345  if test "x$has_forbidden_chars" != x; then
20346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20347    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20348  fi
20349
20350
20351  windows_path="$new_path"
20352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20353    unix_path=`$CYGPATH -u "$windows_path"`
20354    new_path="$unix_path"
20355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20357    new_path="$unix_path"
20358  fi
20359
20360  if test "x$path" != "x$new_path"; then
20361    BOOT_JDK="$new_path"
20362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20363$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20364  fi
20365
20366  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20367  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20368
20369  else
20370    # We're on a posix platform. Hooray! :)
20371    path="$BOOT_JDK"
20372    has_space=`$ECHO "$path" | $GREP " "`
20373    if test "x$has_space" != x; then
20374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20375$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20376      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20377    fi
20378
20379    # Use eval to expand a potential ~
20380    eval path="$path"
20381    if test ! -f "$path" && test ! -d "$path"; then
20382      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20383    fi
20384
20385    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20386  fi
20387
20388              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20389$as_echo_n "checking for Boot JDK... " >&6; }
20390              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20391$as_echo "$BOOT_JDK" >&6; }
20392              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20393$as_echo_n "checking Boot JDK version... " >&6; }
20394              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20395              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20396$as_echo "$BOOT_JDK_VERSION" >&6; }
20397            fi # end check jdk version
20398          fi # end check rt.jar
20399        fi # end check javac
20400      fi # end check java
20401    fi # end check boot jdk found
20402  fi
20403
20404    # If that did not work out (e.g. too old), try explicit versions instead
20405
20406  if test "x$BOOT_JDK_FOUND" = xno; then
20407    # Now execute the test
20408
20409  if test -x /usr/libexec/java_home; then
20410    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20411    BOOT_JDK_FOUND=maybe
20412    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20413$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20414  fi
20415
20416
20417    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20418    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20419      # Do we have a bin/java?
20420      if test ! -x "$BOOT_JDK/bin/java"; then
20421        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20422$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20423        BOOT_JDK_FOUND=no
20424      else
20425        # Do we have a bin/javac?
20426        if test ! -x "$BOOT_JDK/bin/javac"; then
20427          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20429          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20430$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20431          BOOT_JDK_FOUND=no
20432        else
20433          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20434          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20435            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20436$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20437            BOOT_JDK_FOUND=no
20438          else
20439            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20440            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20441
20442            # Extra M4 quote needed to protect [] in grep expression.
20443            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20444            if test "x$FOUND_CORRECT_VERSION" = x; then
20445              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20447              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20448$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20449              BOOT_JDK_FOUND=no
20450            else
20451              # We're done! :-)
20452              BOOT_JDK_FOUND=yes
20453
20454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20455
20456  # Input might be given as Windows format, start by converting to
20457  # unix format.
20458  path="$BOOT_JDK"
20459  new_path=`$CYGPATH -u "$path"`
20460
20461  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20462  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20463  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20464  # "foo.exe" is OK but "foo" is an error.
20465  #
20466  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20467  # It is also a way to make sure we got the proper file name for the real test later on.
20468  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20469  if test "x$test_shortpath" = x; then
20470    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20471$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20472    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20473  fi
20474
20475  # Call helper function which possibly converts this using DOS-style short mode.
20476  # If so, the updated path is stored in $new_path.
20477
20478  input_path="$new_path"
20479  # Check if we need to convert this using DOS-style short mode. If the path
20480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20481  # take no chances and rewrite it.
20482  # Note: m4 eats our [], so we need to use [ and ] instead.
20483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20484  if test "x$has_forbidden_chars" != x; then
20485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20486    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20487    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20488    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20489      # Going to short mode and back again did indeed matter. Since short mode is
20490      # case insensitive, let's make it lowercase to improve readability.
20491      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20492      # Now convert it back to Unix-stile (cygpath)
20493      input_path=`$CYGPATH -u "$shortmode_path"`
20494      new_path="$input_path"
20495    fi
20496  fi
20497
20498  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20499  if test "x$test_cygdrive_prefix" = x; then
20500    # As a simple fix, exclude /usr/bin since it's not a real path.
20501    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20502      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20503      # a path prefixed by /cygdrive for fixpath to work.
20504      new_path="$CYGWIN_ROOT_PATH$input_path"
20505    fi
20506  fi
20507
20508
20509  if test "x$path" != "x$new_path"; then
20510    BOOT_JDK="$new_path"
20511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20512$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20513  fi
20514
20515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20516
20517  path="$BOOT_JDK"
20518  has_colon=`$ECHO $path | $GREP ^.:`
20519  new_path="$path"
20520  if test "x$has_colon" = x; then
20521    # Not in mixed or Windows style, start by that.
20522    new_path=`cmd //c echo $path`
20523  fi
20524
20525
20526  input_path="$new_path"
20527  # Check if we need to convert this using DOS-style short mode. If the path
20528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20529  # take no chances and rewrite it.
20530  # Note: m4 eats our [], so we need to use [ and ] instead.
20531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20532  if test "x$has_forbidden_chars" != x; then
20533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20535  fi
20536
20537
20538  windows_path="$new_path"
20539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20540    unix_path=`$CYGPATH -u "$windows_path"`
20541    new_path="$unix_path"
20542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20544    new_path="$unix_path"
20545  fi
20546
20547  if test "x$path" != "x$new_path"; then
20548    BOOT_JDK="$new_path"
20549    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20550$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20551  fi
20552
20553  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20554  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20555
20556  else
20557    # We're on a posix platform. Hooray! :)
20558    path="$BOOT_JDK"
20559    has_space=`$ECHO "$path" | $GREP " "`
20560    if test "x$has_space" != x; then
20561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20562$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20563      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20564    fi
20565
20566    # Use eval to expand a potential ~
20567    eval path="$path"
20568    if test ! -f "$path" && test ! -d "$path"; then
20569      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20570    fi
20571
20572    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20573  fi
20574
20575              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20576$as_echo_n "checking for Boot JDK... " >&6; }
20577              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20578$as_echo "$BOOT_JDK" >&6; }
20579              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20580$as_echo_n "checking Boot JDK version... " >&6; }
20581              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20582              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20583$as_echo "$BOOT_JDK_VERSION" >&6; }
20584            fi # end check jdk version
20585          fi # end check rt.jar
20586        fi # end check javac
20587      fi # end check java
20588    fi # end check boot jdk found
20589  fi
20590
20591
20592  if test "x$BOOT_JDK_FOUND" = xno; then
20593    # Now execute the test
20594
20595  if test -x /usr/libexec/java_home; then
20596    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20597    BOOT_JDK_FOUND=maybe
20598    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20599$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20600  fi
20601
20602
20603    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20604    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20605      # Do we have a bin/java?
20606      if test ! -x "$BOOT_JDK/bin/java"; then
20607        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20608$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20609        BOOT_JDK_FOUND=no
20610      else
20611        # Do we have a bin/javac?
20612        if test ! -x "$BOOT_JDK/bin/javac"; then
20613          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20614$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20615          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20616$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20617          BOOT_JDK_FOUND=no
20618        else
20619          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20620          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20621            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20622$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20623            BOOT_JDK_FOUND=no
20624          else
20625            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20626            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20627
20628            # Extra M4 quote needed to protect [] in grep expression.
20629            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20630            if test "x$FOUND_CORRECT_VERSION" = x; then
20631              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20632$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20633              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20634$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20635              BOOT_JDK_FOUND=no
20636            else
20637              # We're done! :-)
20638              BOOT_JDK_FOUND=yes
20639
20640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20641
20642  # Input might be given as Windows format, start by converting to
20643  # unix format.
20644  path="$BOOT_JDK"
20645  new_path=`$CYGPATH -u "$path"`
20646
20647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20650  # "foo.exe" is OK but "foo" is an error.
20651  #
20652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20653  # It is also a way to make sure we got the proper file name for the real test later on.
20654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20655  if test "x$test_shortpath" = x; then
20656    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20657$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20658    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20659  fi
20660
20661  # Call helper function which possibly converts this using DOS-style short mode.
20662  # If so, the updated path is stored in $new_path.
20663
20664  input_path="$new_path"
20665  # Check if we need to convert this using DOS-style short mode. If the path
20666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20667  # take no chances and rewrite it.
20668  # Note: m4 eats our [], so we need to use [ and ] instead.
20669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20670  if test "x$has_forbidden_chars" != x; then
20671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20675      # Going to short mode and back again did indeed matter. Since short mode is
20676      # case insensitive, let's make it lowercase to improve readability.
20677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20678      # Now convert it back to Unix-stile (cygpath)
20679      input_path=`$CYGPATH -u "$shortmode_path"`
20680      new_path="$input_path"
20681    fi
20682  fi
20683
20684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20685  if test "x$test_cygdrive_prefix" = x; then
20686    # As a simple fix, exclude /usr/bin since it's not a real path.
20687    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20689      # a path prefixed by /cygdrive for fixpath to work.
20690      new_path="$CYGWIN_ROOT_PATH$input_path"
20691    fi
20692  fi
20693
20694
20695  if test "x$path" != "x$new_path"; then
20696    BOOT_JDK="$new_path"
20697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20698$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20699  fi
20700
20701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20702
20703  path="$BOOT_JDK"
20704  has_colon=`$ECHO $path | $GREP ^.:`
20705  new_path="$path"
20706  if test "x$has_colon" = x; then
20707    # Not in mixed or Windows style, start by that.
20708    new_path=`cmd //c echo $path`
20709  fi
20710
20711
20712  input_path="$new_path"
20713  # Check if we need to convert this using DOS-style short mode. If the path
20714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20715  # take no chances and rewrite it.
20716  # Note: m4 eats our [], so we need to use [ and ] instead.
20717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20718  if test "x$has_forbidden_chars" != x; then
20719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20721  fi
20722
20723
20724  windows_path="$new_path"
20725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20726    unix_path=`$CYGPATH -u "$windows_path"`
20727    new_path="$unix_path"
20728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20730    new_path="$unix_path"
20731  fi
20732
20733  if test "x$path" != "x$new_path"; then
20734    BOOT_JDK="$new_path"
20735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20736$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20737  fi
20738
20739  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20740  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20741
20742  else
20743    # We're on a posix platform. Hooray! :)
20744    path="$BOOT_JDK"
20745    has_space=`$ECHO "$path" | $GREP " "`
20746    if test "x$has_space" != x; then
20747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20748$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20749      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20750    fi
20751
20752    # Use eval to expand a potential ~
20753    eval path="$path"
20754    if test ! -f "$path" && test ! -d "$path"; then
20755      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20756    fi
20757
20758    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20759  fi
20760
20761              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20762$as_echo_n "checking for Boot JDK... " >&6; }
20763              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20764$as_echo "$BOOT_JDK" >&6; }
20765              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20766$as_echo_n "checking Boot JDK version... " >&6; }
20767              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20768              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20769$as_echo "$BOOT_JDK_VERSION" >&6; }
20770            fi # end check jdk version
20771          fi # end check rt.jar
20772        fi # end check javac
20773      fi # end check java
20774    fi # end check boot jdk found
20775  fi
20776
20777
20778  if test "x$BOOT_JDK_FOUND" = xno; then
20779    # Now execute the test
20780
20781  if test -x /usr/libexec/java_home; then
20782    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
20783    BOOT_JDK_FOUND=maybe
20784    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
20785$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
20786  fi
20787
20788
20789    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20790    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20791      # Do we have a bin/java?
20792      if test ! -x "$BOOT_JDK/bin/java"; then
20793        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20795        BOOT_JDK_FOUND=no
20796      else
20797        # Do we have a bin/javac?
20798        if test ! -x "$BOOT_JDK/bin/javac"; then
20799          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20800$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20801          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20802$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20803          BOOT_JDK_FOUND=no
20804        else
20805          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20806          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20807            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20809            BOOT_JDK_FOUND=no
20810          else
20811            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20812            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20813
20814            # Extra M4 quote needed to protect [] in grep expression.
20815            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20816            if test "x$FOUND_CORRECT_VERSION" = x; then
20817              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20818$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20819              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20820$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20821              BOOT_JDK_FOUND=no
20822            else
20823              # We're done! :-)
20824              BOOT_JDK_FOUND=yes
20825
20826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20827
20828  # Input might be given as Windows format, start by converting to
20829  # unix format.
20830  path="$BOOT_JDK"
20831  new_path=`$CYGPATH -u "$path"`
20832
20833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20836  # "foo.exe" is OK but "foo" is an error.
20837  #
20838  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20839  # It is also a way to make sure we got the proper file name for the real test later on.
20840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20841  if test "x$test_shortpath" = x; then
20842    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20843$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20844    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20845  fi
20846
20847  # Call helper function which possibly converts this using DOS-style short mode.
20848  # If so, the updated path is stored in $new_path.
20849
20850  input_path="$new_path"
20851  # Check if we need to convert this using DOS-style short mode. If the path
20852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20853  # take no chances and rewrite it.
20854  # Note: m4 eats our [], so we need to use [ and ] instead.
20855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20856  if test "x$has_forbidden_chars" != x; then
20857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20861      # Going to short mode and back again did indeed matter. Since short mode is
20862      # case insensitive, let's make it lowercase to improve readability.
20863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20864      # Now convert it back to Unix-stile (cygpath)
20865      input_path=`$CYGPATH -u "$shortmode_path"`
20866      new_path="$input_path"
20867    fi
20868  fi
20869
20870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20871  if test "x$test_cygdrive_prefix" = x; then
20872    # As a simple fix, exclude /usr/bin since it's not a real path.
20873    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20875      # a path prefixed by /cygdrive for fixpath to work.
20876      new_path="$CYGWIN_ROOT_PATH$input_path"
20877    fi
20878  fi
20879
20880
20881  if test "x$path" != "x$new_path"; then
20882    BOOT_JDK="$new_path"
20883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20884$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20885  fi
20886
20887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20888
20889  path="$BOOT_JDK"
20890  has_colon=`$ECHO $path | $GREP ^.:`
20891  new_path="$path"
20892  if test "x$has_colon" = x; then
20893    # Not in mixed or Windows style, start by that.
20894    new_path=`cmd //c echo $path`
20895  fi
20896
20897
20898  input_path="$new_path"
20899  # Check if we need to convert this using DOS-style short mode. If the path
20900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20901  # take no chances and rewrite it.
20902  # Note: m4 eats our [], so we need to use [ and ] instead.
20903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20904  if test "x$has_forbidden_chars" != x; then
20905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20907  fi
20908
20909
20910  windows_path="$new_path"
20911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20912    unix_path=`$CYGPATH -u "$windows_path"`
20913    new_path="$unix_path"
20914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20916    new_path="$unix_path"
20917  fi
20918
20919  if test "x$path" != "x$new_path"; then
20920    BOOT_JDK="$new_path"
20921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20922$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20923  fi
20924
20925  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20926  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20927
20928  else
20929    # We're on a posix platform. Hooray! :)
20930    path="$BOOT_JDK"
20931    has_space=`$ECHO "$path" | $GREP " "`
20932    if test "x$has_space" != x; then
20933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20934$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20935      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20936    fi
20937
20938    # Use eval to expand a potential ~
20939    eval path="$path"
20940    if test ! -f "$path" && test ! -d "$path"; then
20941      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20942    fi
20943
20944    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20945  fi
20946
20947              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20948$as_echo_n "checking for Boot JDK... " >&6; }
20949              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20950$as_echo "$BOOT_JDK" >&6; }
20951              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20952$as_echo_n "checking Boot JDK version... " >&6; }
20953              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20954              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20955$as_echo "$BOOT_JDK_VERSION" >&6; }
20956            fi # end check jdk version
20957          fi # end check rt.jar
20958        fi # end check javac
20959      fi # end check java
20960    fi # end check boot jdk found
20961  fi
20962
20963  fi
20964
20965
20966    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20967    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20968      # Do we have a bin/java?
20969      if test ! -x "$BOOT_JDK/bin/java"; then
20970        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20972        BOOT_JDK_FOUND=no
20973      else
20974        # Do we have a bin/javac?
20975        if test ! -x "$BOOT_JDK/bin/javac"; then
20976          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20977$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20978          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20979$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20980          BOOT_JDK_FOUND=no
20981        else
20982          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20983          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20984            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20985$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20986            BOOT_JDK_FOUND=no
20987          else
20988            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20989            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20990
20991            # Extra M4 quote needed to protect [] in grep expression.
20992            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20993            if test "x$FOUND_CORRECT_VERSION" = x; then
20994              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20996              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20997$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20998              BOOT_JDK_FOUND=no
20999            else
21000              # We're done! :-)
21001              BOOT_JDK_FOUND=yes
21002
21003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21004
21005  # Input might be given as Windows format, start by converting to
21006  # unix format.
21007  path="$BOOT_JDK"
21008  new_path=`$CYGPATH -u "$path"`
21009
21010  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21011  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21012  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21013  # "foo.exe" is OK but "foo" is an error.
21014  #
21015  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21016  # It is also a way to make sure we got the proper file name for the real test later on.
21017  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21018  if test "x$test_shortpath" = x; then
21019    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21020$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21021    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21022  fi
21023
21024  # Call helper function which possibly converts this using DOS-style short mode.
21025  # If so, the updated path is stored in $new_path.
21026
21027  input_path="$new_path"
21028  # Check if we need to convert this using DOS-style short mode. If the path
21029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21030  # take no chances and rewrite it.
21031  # Note: m4 eats our [], so we need to use [ and ] instead.
21032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21033  if test "x$has_forbidden_chars" != x; then
21034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21035    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21036    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21037    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21038      # Going to short mode and back again did indeed matter. Since short mode is
21039      # case insensitive, let's make it lowercase to improve readability.
21040      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21041      # Now convert it back to Unix-stile (cygpath)
21042      input_path=`$CYGPATH -u "$shortmode_path"`
21043      new_path="$input_path"
21044    fi
21045  fi
21046
21047  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21048  if test "x$test_cygdrive_prefix" = x; then
21049    # As a simple fix, exclude /usr/bin since it's not a real path.
21050    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21051      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21052      # a path prefixed by /cygdrive for fixpath to work.
21053      new_path="$CYGWIN_ROOT_PATH$input_path"
21054    fi
21055  fi
21056
21057
21058  if test "x$path" != "x$new_path"; then
21059    BOOT_JDK="$new_path"
21060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21061$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21062  fi
21063
21064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21065
21066  path="$BOOT_JDK"
21067  has_colon=`$ECHO $path | $GREP ^.:`
21068  new_path="$path"
21069  if test "x$has_colon" = x; then
21070    # Not in mixed or Windows style, start by that.
21071    new_path=`cmd //c echo $path`
21072  fi
21073
21074
21075  input_path="$new_path"
21076  # Check if we need to convert this using DOS-style short mode. If the path
21077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21078  # take no chances and rewrite it.
21079  # Note: m4 eats our [], so we need to use [ and ] instead.
21080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21081  if test "x$has_forbidden_chars" != x; then
21082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21083    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21084  fi
21085
21086
21087  windows_path="$new_path"
21088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21089    unix_path=`$CYGPATH -u "$windows_path"`
21090    new_path="$unix_path"
21091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21093    new_path="$unix_path"
21094  fi
21095
21096  if test "x$path" != "x$new_path"; then
21097    BOOT_JDK="$new_path"
21098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21099$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21100  fi
21101
21102  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21103  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21104
21105  else
21106    # We're on a posix platform. Hooray! :)
21107    path="$BOOT_JDK"
21108    has_space=`$ECHO "$path" | $GREP " "`
21109    if test "x$has_space" != x; then
21110      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21111$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21112      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21113    fi
21114
21115    # Use eval to expand a potential ~
21116    eval path="$path"
21117    if test ! -f "$path" && test ! -d "$path"; then
21118      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21119    fi
21120
21121    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21122  fi
21123
21124              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21125$as_echo_n "checking for Boot JDK... " >&6; }
21126              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21127$as_echo "$BOOT_JDK" >&6; }
21128              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21129$as_echo_n "checking Boot JDK version... " >&6; }
21130              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21131              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21132$as_echo "$BOOT_JDK_VERSION" >&6; }
21133            fi # end check jdk version
21134          fi # end check rt.jar
21135        fi # end check javac
21136      fi # end check java
21137    fi # end check boot jdk found
21138  fi
21139
21140
21141  # Test: Is $JAVA_HOME set?
21142
21143  if test "x$BOOT_JDK_FOUND" = xno; then
21144    # Now execute the test
21145
21146  if test "x$JAVA_HOME" != x; then
21147    JAVA_HOME_PROCESSED="$JAVA_HOME"
21148
21149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21150
21151  # Input might be given as Windows format, start by converting to
21152  # unix format.
21153  path="$JAVA_HOME_PROCESSED"
21154  new_path=`$CYGPATH -u "$path"`
21155
21156  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21157  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21158  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21159  # "foo.exe" is OK but "foo" is an error.
21160  #
21161  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21162  # It is also a way to make sure we got the proper file name for the real test later on.
21163  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21164  if test "x$test_shortpath" = x; then
21165    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21166$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21167    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21168  fi
21169
21170  # Call helper function which possibly converts this using DOS-style short mode.
21171  # If so, the updated path is stored in $new_path.
21172
21173  input_path="$new_path"
21174  # Check if we need to convert this using DOS-style short mode. If the path
21175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21176  # take no chances and rewrite it.
21177  # Note: m4 eats our [], so we need to use [ and ] instead.
21178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21179  if test "x$has_forbidden_chars" != x; then
21180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21181    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21182    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21183    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21184      # Going to short mode and back again did indeed matter. Since short mode is
21185      # case insensitive, let's make it lowercase to improve readability.
21186      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21187      # Now convert it back to Unix-stile (cygpath)
21188      input_path=`$CYGPATH -u "$shortmode_path"`
21189      new_path="$input_path"
21190    fi
21191  fi
21192
21193  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21194  if test "x$test_cygdrive_prefix" = x; then
21195    # As a simple fix, exclude /usr/bin since it's not a real path.
21196    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21197      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21198      # a path prefixed by /cygdrive for fixpath to work.
21199      new_path="$CYGWIN_ROOT_PATH$input_path"
21200    fi
21201  fi
21202
21203
21204  if test "x$path" != "x$new_path"; then
21205    JAVA_HOME_PROCESSED="$new_path"
21206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21207$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21208  fi
21209
21210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21211
21212  path="$JAVA_HOME_PROCESSED"
21213  has_colon=`$ECHO $path | $GREP ^.:`
21214  new_path="$path"
21215  if test "x$has_colon" = x; then
21216    # Not in mixed or Windows style, start by that.
21217    new_path=`cmd //c echo $path`
21218  fi
21219
21220
21221  input_path="$new_path"
21222  # Check if we need to convert this using DOS-style short mode. If the path
21223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21224  # take no chances and rewrite it.
21225  # Note: m4 eats our [], so we need to use [ and ] instead.
21226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21227  if test "x$has_forbidden_chars" != x; then
21228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21229    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21230  fi
21231
21232
21233  windows_path="$new_path"
21234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21235    unix_path=`$CYGPATH -u "$windows_path"`
21236    new_path="$unix_path"
21237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21239    new_path="$unix_path"
21240  fi
21241
21242  if test "x$path" != "x$new_path"; then
21243    JAVA_HOME_PROCESSED="$new_path"
21244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21245$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21246  fi
21247
21248  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21249  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21250
21251  else
21252    # We're on a posix platform. Hooray! :)
21253    path="$JAVA_HOME_PROCESSED"
21254    has_space=`$ECHO "$path" | $GREP " "`
21255    if test "x$has_space" != x; then
21256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21257$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21258      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21259    fi
21260
21261    # Use eval to expand a potential ~
21262    eval path="$path"
21263    if test ! -f "$path" && test ! -d "$path"; then
21264      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21265    fi
21266
21267    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21268  fi
21269
21270    if test ! -d "$JAVA_HOME_PROCESSED"; then
21271      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21272$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21273    else
21274      # Aha, the user has set a JAVA_HOME
21275      # let us use that as the Boot JDK.
21276      BOOT_JDK="$JAVA_HOME_PROCESSED"
21277      BOOT_JDK_FOUND=maybe
21278      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21279$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21280    fi
21281  fi
21282
21283
21284    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21285    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21286      # Do we have a bin/java?
21287      if test ! -x "$BOOT_JDK/bin/java"; then
21288        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21289$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21290        BOOT_JDK_FOUND=no
21291      else
21292        # Do we have a bin/javac?
21293        if test ! -x "$BOOT_JDK/bin/javac"; then
21294          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21295$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21296          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21297$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21298          BOOT_JDK_FOUND=no
21299        else
21300          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21301          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21302            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21303$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21304            BOOT_JDK_FOUND=no
21305          else
21306            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21307            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21308
21309            # Extra M4 quote needed to protect [] in grep expression.
21310            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21311            if test "x$FOUND_CORRECT_VERSION" = x; then
21312              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21313$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21314              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21315$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21316              BOOT_JDK_FOUND=no
21317            else
21318              # We're done! :-)
21319              BOOT_JDK_FOUND=yes
21320
21321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21322
21323  # Input might be given as Windows format, start by converting to
21324  # unix format.
21325  path="$BOOT_JDK"
21326  new_path=`$CYGPATH -u "$path"`
21327
21328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21331  # "foo.exe" is OK but "foo" is an error.
21332  #
21333  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21334  # It is also a way to make sure we got the proper file name for the real test later on.
21335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21336  if test "x$test_shortpath" = x; then
21337    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21338$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21339    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21340  fi
21341
21342  # Call helper function which possibly converts this using DOS-style short mode.
21343  # If so, the updated path is stored in $new_path.
21344
21345  input_path="$new_path"
21346  # Check if we need to convert this using DOS-style short mode. If the path
21347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21348  # take no chances and rewrite it.
21349  # Note: m4 eats our [], so we need to use [ and ] instead.
21350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21351  if test "x$has_forbidden_chars" != x; then
21352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21356      # Going to short mode and back again did indeed matter. Since short mode is
21357      # case insensitive, let's make it lowercase to improve readability.
21358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21359      # Now convert it back to Unix-stile (cygpath)
21360      input_path=`$CYGPATH -u "$shortmode_path"`
21361      new_path="$input_path"
21362    fi
21363  fi
21364
21365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21366  if test "x$test_cygdrive_prefix" = x; then
21367    # As a simple fix, exclude /usr/bin since it's not a real path.
21368    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21370      # a path prefixed by /cygdrive for fixpath to work.
21371      new_path="$CYGWIN_ROOT_PATH$input_path"
21372    fi
21373  fi
21374
21375
21376  if test "x$path" != "x$new_path"; then
21377    BOOT_JDK="$new_path"
21378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21379$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21380  fi
21381
21382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21383
21384  path="$BOOT_JDK"
21385  has_colon=`$ECHO $path | $GREP ^.:`
21386  new_path="$path"
21387  if test "x$has_colon" = x; then
21388    # Not in mixed or Windows style, start by that.
21389    new_path=`cmd //c echo $path`
21390  fi
21391
21392
21393  input_path="$new_path"
21394  # Check if we need to convert this using DOS-style short mode. If the path
21395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21396  # take no chances and rewrite it.
21397  # Note: m4 eats our [], so we need to use [ and ] instead.
21398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21399  if test "x$has_forbidden_chars" != x; then
21400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21402  fi
21403
21404
21405  windows_path="$new_path"
21406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21407    unix_path=`$CYGPATH -u "$windows_path"`
21408    new_path="$unix_path"
21409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21411    new_path="$unix_path"
21412  fi
21413
21414  if test "x$path" != "x$new_path"; then
21415    BOOT_JDK="$new_path"
21416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21417$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21418  fi
21419
21420  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21421  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21422
21423  else
21424    # We're on a posix platform. Hooray! :)
21425    path="$BOOT_JDK"
21426    has_space=`$ECHO "$path" | $GREP " "`
21427    if test "x$has_space" != x; then
21428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21429$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21430      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21431    fi
21432
21433    # Use eval to expand a potential ~
21434    eval path="$path"
21435    if test ! -f "$path" && test ! -d "$path"; then
21436      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21437    fi
21438
21439    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21440  fi
21441
21442              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21443$as_echo_n "checking for Boot JDK... " >&6; }
21444              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21445$as_echo "$BOOT_JDK" >&6; }
21446              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21447$as_echo_n "checking Boot JDK version... " >&6; }
21448              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21449              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21450$as_echo "$BOOT_JDK_VERSION" >&6; }
21451            fi # end check jdk version
21452          fi # end check rt.jar
21453        fi # end check javac
21454      fi # end check java
21455    fi # end check boot jdk found
21456  fi
21457
21458
21459  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21460
21461  if test "x$BOOT_JDK_FOUND" = xno; then
21462    # Now execute the test
21463
21464  # Extract the first word of "javac", so it can be a program name with args.
21465set dummy javac; ac_word=$2
21466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21467$as_echo_n "checking for $ac_word... " >&6; }
21468if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21469  $as_echo_n "(cached) " >&6
21470else
21471  case $JAVAC_CHECK in
21472  [\\/]* | ?:[\\/]*)
21473  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21474  ;;
21475  *)
21476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21477for as_dir in $PATH
21478do
21479  IFS=$as_save_IFS
21480  test -z "$as_dir" && as_dir=.
21481    for ac_exec_ext in '' $ac_executable_extensions; do
21482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21483    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21485    break 2
21486  fi
21487done
21488  done
21489IFS=$as_save_IFS
21490
21491  ;;
21492esac
21493fi
21494JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21495if test -n "$JAVAC_CHECK"; then
21496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21497$as_echo "$JAVAC_CHECK" >&6; }
21498else
21499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21500$as_echo "no" >&6; }
21501fi
21502
21503
21504  # Extract the first word of "java", so it can be a program name with args.
21505set dummy java; ac_word=$2
21506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21507$as_echo_n "checking for $ac_word... " >&6; }
21508if ${ac_cv_path_JAVA_CHECK+:} false; then :
21509  $as_echo_n "(cached) " >&6
21510else
21511  case $JAVA_CHECK in
21512  [\\/]* | ?:[\\/]*)
21513  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21514  ;;
21515  *)
21516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21517for as_dir in $PATH
21518do
21519  IFS=$as_save_IFS
21520  test -z "$as_dir" && as_dir=.
21521    for ac_exec_ext in '' $ac_executable_extensions; do
21522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21523    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21525    break 2
21526  fi
21527done
21528  done
21529IFS=$as_save_IFS
21530
21531  ;;
21532esac
21533fi
21534JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21535if test -n "$JAVA_CHECK"; then
21536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21537$as_echo "$JAVA_CHECK" >&6; }
21538else
21539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21540$as_echo "no" >&6; }
21541fi
21542
21543
21544  BINARY="$JAVAC_CHECK"
21545  if test "x$JAVAC_CHECK" = x; then
21546    BINARY="$JAVA_CHECK"
21547  fi
21548  if test "x$BINARY" != x; then
21549    # So there is a java(c) binary, it might be part of a JDK.
21550    # Lets find the JDK/JRE directory by following symbolic links.
21551    # Linux/GNU systems often have links from /usr/bin/java to
21552    # /etc/alternatives/java to the real JDK binary.
21553
21554  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21555    # Follow a chain of symbolic links. Use readlink
21556    # where it exists, else fall back to horribly
21557    # complicated shell code.
21558    if test "x$READLINK_TESTED" != yes; then
21559      # On MacOSX there is a readlink tool with a different
21560      # purpose than the GNU readlink tool. Check the found readlink.
21561      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21562      if test "x$ISGNU" = x; then
21563        # A readlink that we do not know how to use.
21564        # Are there other non-GNU readlinks out there?
21565        READLINK_TESTED=yes
21566        READLINK=
21567      fi
21568    fi
21569
21570    if test "x$READLINK" != x; then
21571      BINARY=`$READLINK -f $BINARY`
21572    else
21573      # Save the current directory for restoring afterwards
21574      STARTDIR=$PWD
21575      COUNTER=0
21576      sym_link_dir=`$DIRNAME $BINARY`
21577      sym_link_file=`$BASENAME $BINARY`
21578      cd $sym_link_dir
21579      # Use -P flag to resolve symlinks in directories.
21580      cd `$THEPWDCMD -P`
21581      sym_link_dir=`$THEPWDCMD -P`
21582      # Resolve file symlinks
21583      while test $COUNTER -lt 20; do
21584        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21585        if test "x$ISLINK" == x; then
21586          # This is not a symbolic link! We are done!
21587          break
21588        fi
21589        # Again resolve directory symlinks since the target of the just found
21590        # link could be in a different directory
21591        cd `$DIRNAME $ISLINK`
21592        sym_link_dir=`$THEPWDCMD -P`
21593        sym_link_file=`$BASENAME $ISLINK`
21594        let COUNTER=COUNTER+1
21595      done
21596      cd $STARTDIR
21597      BINARY=$sym_link_dir/$sym_link_file
21598    fi
21599  fi
21600
21601    BOOT_JDK=`dirname "$BINARY"`
21602    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21603    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21604      # Looks like we found ourselves an JDK
21605      BOOT_JDK_FOUND=maybe
21606      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21607$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21608    fi
21609  fi
21610
21611
21612    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21613    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21614      # Do we have a bin/java?
21615      if test ! -x "$BOOT_JDK/bin/java"; then
21616        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21618        BOOT_JDK_FOUND=no
21619      else
21620        # Do we have a bin/javac?
21621        if test ! -x "$BOOT_JDK/bin/javac"; then
21622          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21623$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21624          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21625$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21626          BOOT_JDK_FOUND=no
21627        else
21628          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21629          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21630            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21632            BOOT_JDK_FOUND=no
21633          else
21634            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21635            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21636
21637            # Extra M4 quote needed to protect [] in grep expression.
21638            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21639            if test "x$FOUND_CORRECT_VERSION" = x; then
21640              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21641$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21642              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21643$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21644              BOOT_JDK_FOUND=no
21645            else
21646              # We're done! :-)
21647              BOOT_JDK_FOUND=yes
21648
21649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21650
21651  # Input might be given as Windows format, start by converting to
21652  # unix format.
21653  path="$BOOT_JDK"
21654  new_path=`$CYGPATH -u "$path"`
21655
21656  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21657  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21658  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21659  # "foo.exe" is OK but "foo" is an error.
21660  #
21661  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21662  # It is also a way to make sure we got the proper file name for the real test later on.
21663  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21664  if test "x$test_shortpath" = x; then
21665    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21666$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21667    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21668  fi
21669
21670  # Call helper function which possibly converts this using DOS-style short mode.
21671  # If so, the updated path is stored in $new_path.
21672
21673  input_path="$new_path"
21674  # Check if we need to convert this using DOS-style short mode. If the path
21675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21676  # take no chances and rewrite it.
21677  # Note: m4 eats our [], so we need to use [ and ] instead.
21678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21679  if test "x$has_forbidden_chars" != x; then
21680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21684      # Going to short mode and back again did indeed matter. Since short mode is
21685      # case insensitive, let's make it lowercase to improve readability.
21686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21687      # Now convert it back to Unix-stile (cygpath)
21688      input_path=`$CYGPATH -u "$shortmode_path"`
21689      new_path="$input_path"
21690    fi
21691  fi
21692
21693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21694  if test "x$test_cygdrive_prefix" = x; then
21695    # As a simple fix, exclude /usr/bin since it's not a real path.
21696    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21698      # a path prefixed by /cygdrive for fixpath to work.
21699      new_path="$CYGWIN_ROOT_PATH$input_path"
21700    fi
21701  fi
21702
21703
21704  if test "x$path" != "x$new_path"; then
21705    BOOT_JDK="$new_path"
21706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21707$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21708  fi
21709
21710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21711
21712  path="$BOOT_JDK"
21713  has_colon=`$ECHO $path | $GREP ^.:`
21714  new_path="$path"
21715  if test "x$has_colon" = x; then
21716    # Not in mixed or Windows style, start by that.
21717    new_path=`cmd //c echo $path`
21718  fi
21719
21720
21721  input_path="$new_path"
21722  # Check if we need to convert this using DOS-style short mode. If the path
21723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21724  # take no chances and rewrite it.
21725  # Note: m4 eats our [], so we need to use [ and ] instead.
21726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21727  if test "x$has_forbidden_chars" != x; then
21728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21730  fi
21731
21732
21733  windows_path="$new_path"
21734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21735    unix_path=`$CYGPATH -u "$windows_path"`
21736    new_path="$unix_path"
21737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21739    new_path="$unix_path"
21740  fi
21741
21742  if test "x$path" != "x$new_path"; then
21743    BOOT_JDK="$new_path"
21744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21745$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21746  fi
21747
21748  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21749  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21750
21751  else
21752    # We're on a posix platform. Hooray! :)
21753    path="$BOOT_JDK"
21754    has_space=`$ECHO "$path" | $GREP " "`
21755    if test "x$has_space" != x; then
21756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21757$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21758      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21759    fi
21760
21761    # Use eval to expand a potential ~
21762    eval path="$path"
21763    if test ! -f "$path" && test ! -d "$path"; then
21764      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21765    fi
21766
21767    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21768  fi
21769
21770              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21771$as_echo_n "checking for Boot JDK... " >&6; }
21772              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21773$as_echo "$BOOT_JDK" >&6; }
21774              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21775$as_echo_n "checking Boot JDK version... " >&6; }
21776              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21777              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21778$as_echo "$BOOT_JDK_VERSION" >&6; }
21779            fi # end check jdk version
21780          fi # end check rt.jar
21781        fi # end check javac
21782      fi # end check java
21783    fi # end check boot jdk found
21784  fi
21785
21786
21787  # Test: Is there a JDK installed in default, well-known locations?
21788
21789  if test "x$BOOT_JDK_FOUND" = xno; then
21790    # Now execute the test
21791
21792  if test "x$OPENJDK_TARGET_OS" = xwindows; then
21793
21794  if test "x$BOOT_JDK_FOUND" = xno; then
21795    # Now execute the test
21796
21797  if test "x$ProgramW6432" != x; then
21798    VIRTUAL_DIR="$ProgramW6432/Java"
21799
21800  windows_path="$VIRTUAL_DIR"
21801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21802    unix_path=`$CYGPATH -u "$windows_path"`
21803    VIRTUAL_DIR="$unix_path"
21804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21806    VIRTUAL_DIR="$unix_path"
21807  fi
21808
21809
21810  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21811  BOOT_JDK_SUFFIX=""
21812  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21813  if test "x$ALL_JDKS_FOUND" != x; then
21814    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21815
21816  if test "x$BOOT_JDK_FOUND" = xno; then
21817    # Now execute the test
21818
21819        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21820        if test -d "$BOOT_JDK"; then
21821          BOOT_JDK_FOUND=maybe
21822          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21823$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21824        fi
21825
21826
21827    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21828    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21829      # Do we have a bin/java?
21830      if test ! -x "$BOOT_JDK/bin/java"; then
21831        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21832$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21833        BOOT_JDK_FOUND=no
21834      else
21835        # Do we have a bin/javac?
21836        if test ! -x "$BOOT_JDK/bin/javac"; then
21837          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21838$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21839          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21840$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21841          BOOT_JDK_FOUND=no
21842        else
21843          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21844          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21845            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21846$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21847            BOOT_JDK_FOUND=no
21848          else
21849            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21850            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21851
21852            # Extra M4 quote needed to protect [] in grep expression.
21853            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21854            if test "x$FOUND_CORRECT_VERSION" = x; then
21855              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21856$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21857              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21858$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21859              BOOT_JDK_FOUND=no
21860            else
21861              # We're done! :-)
21862              BOOT_JDK_FOUND=yes
21863
21864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21865
21866  # Input might be given as Windows format, start by converting to
21867  # unix format.
21868  path="$BOOT_JDK"
21869  new_path=`$CYGPATH -u "$path"`
21870
21871  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21872  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21873  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21874  # "foo.exe" is OK but "foo" is an error.
21875  #
21876  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21877  # It is also a way to make sure we got the proper file name for the real test later on.
21878  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21879  if test "x$test_shortpath" = x; then
21880    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21881$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21882    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21883  fi
21884
21885  # Call helper function which possibly converts this using DOS-style short mode.
21886  # If so, the updated path is stored in $new_path.
21887
21888  input_path="$new_path"
21889  # Check if we need to convert this using DOS-style short mode. If the path
21890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21891  # take no chances and rewrite it.
21892  # Note: m4 eats our [], so we need to use [ and ] instead.
21893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21894  if test "x$has_forbidden_chars" != x; then
21895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21896    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21897    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21898    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21899      # Going to short mode and back again did indeed matter. Since short mode is
21900      # case insensitive, let's make it lowercase to improve readability.
21901      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21902      # Now convert it back to Unix-stile (cygpath)
21903      input_path=`$CYGPATH -u "$shortmode_path"`
21904      new_path="$input_path"
21905    fi
21906  fi
21907
21908  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21909  if test "x$test_cygdrive_prefix" = x; then
21910    # As a simple fix, exclude /usr/bin since it's not a real path.
21911    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21912      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21913      # a path prefixed by /cygdrive for fixpath to work.
21914      new_path="$CYGWIN_ROOT_PATH$input_path"
21915    fi
21916  fi
21917
21918
21919  if test "x$path" != "x$new_path"; then
21920    BOOT_JDK="$new_path"
21921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21922$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21923  fi
21924
21925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21926
21927  path="$BOOT_JDK"
21928  has_colon=`$ECHO $path | $GREP ^.:`
21929  new_path="$path"
21930  if test "x$has_colon" = x; then
21931    # Not in mixed or Windows style, start by that.
21932    new_path=`cmd //c echo $path`
21933  fi
21934
21935
21936  input_path="$new_path"
21937  # Check if we need to convert this using DOS-style short mode. If the path
21938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21939  # take no chances and rewrite it.
21940  # Note: m4 eats our [], so we need to use [ and ] instead.
21941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21942  if test "x$has_forbidden_chars" != x; then
21943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21944    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21945  fi
21946
21947
21948  windows_path="$new_path"
21949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21950    unix_path=`$CYGPATH -u "$windows_path"`
21951    new_path="$unix_path"
21952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21954    new_path="$unix_path"
21955  fi
21956
21957  if test "x$path" != "x$new_path"; then
21958    BOOT_JDK="$new_path"
21959    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21960$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21961  fi
21962
21963  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21964  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21965
21966  else
21967    # We're on a posix platform. Hooray! :)
21968    path="$BOOT_JDK"
21969    has_space=`$ECHO "$path" | $GREP " "`
21970    if test "x$has_space" != x; then
21971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21972$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21973      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21974    fi
21975
21976    # Use eval to expand a potential ~
21977    eval path="$path"
21978    if test ! -f "$path" && test ! -d "$path"; then
21979      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21980    fi
21981
21982    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21983  fi
21984
21985              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21986$as_echo_n "checking for Boot JDK... " >&6; }
21987              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21988$as_echo "$BOOT_JDK" >&6; }
21989              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21990$as_echo_n "checking Boot JDK version... " >&6; }
21991              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21992              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21993$as_echo "$BOOT_JDK_VERSION" >&6; }
21994            fi # end check jdk version
21995          fi # end check rt.jar
21996        fi # end check javac
21997      fi # end check java
21998    fi # end check boot jdk found
21999  fi
22000
22001    done
22002  fi
22003
22004  fi
22005
22006
22007    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22008    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22009      # Do we have a bin/java?
22010      if test ! -x "$BOOT_JDK/bin/java"; then
22011        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22013        BOOT_JDK_FOUND=no
22014      else
22015        # Do we have a bin/javac?
22016        if test ! -x "$BOOT_JDK/bin/javac"; then
22017          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22019          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22020$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22021          BOOT_JDK_FOUND=no
22022        else
22023          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22024          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22025            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22026$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22027            BOOT_JDK_FOUND=no
22028          else
22029            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22030            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22031
22032            # Extra M4 quote needed to protect [] in grep expression.
22033            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22034            if test "x$FOUND_CORRECT_VERSION" = x; then
22035              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22036$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22037              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22038$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22039              BOOT_JDK_FOUND=no
22040            else
22041              # We're done! :-)
22042              BOOT_JDK_FOUND=yes
22043
22044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22045
22046  # Input might be given as Windows format, start by converting to
22047  # unix format.
22048  path="$BOOT_JDK"
22049  new_path=`$CYGPATH -u "$path"`
22050
22051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22054  # "foo.exe" is OK but "foo" is an error.
22055  #
22056  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22057  # It is also a way to make sure we got the proper file name for the real test later on.
22058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22059  if test "x$test_shortpath" = x; then
22060    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22061$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22062    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22063  fi
22064
22065  # Call helper function which possibly converts this using DOS-style short mode.
22066  # If so, the updated path is stored in $new_path.
22067
22068  input_path="$new_path"
22069  # Check if we need to convert this using DOS-style short mode. If the path
22070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22071  # take no chances and rewrite it.
22072  # Note: m4 eats our [], so we need to use [ and ] instead.
22073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22074  if test "x$has_forbidden_chars" != x; then
22075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22076    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22077    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22078    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22079      # Going to short mode and back again did indeed matter. Since short mode is
22080      # case insensitive, let's make it lowercase to improve readability.
22081      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22082      # Now convert it back to Unix-stile (cygpath)
22083      input_path=`$CYGPATH -u "$shortmode_path"`
22084      new_path="$input_path"
22085    fi
22086  fi
22087
22088  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22089  if test "x$test_cygdrive_prefix" = x; then
22090    # As a simple fix, exclude /usr/bin since it's not a real path.
22091    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22092      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22093      # a path prefixed by /cygdrive for fixpath to work.
22094      new_path="$CYGWIN_ROOT_PATH$input_path"
22095    fi
22096  fi
22097
22098
22099  if test "x$path" != "x$new_path"; then
22100    BOOT_JDK="$new_path"
22101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22102$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22103  fi
22104
22105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22106
22107  path="$BOOT_JDK"
22108  has_colon=`$ECHO $path | $GREP ^.:`
22109  new_path="$path"
22110  if test "x$has_colon" = x; then
22111    # Not in mixed or Windows style, start by that.
22112    new_path=`cmd //c echo $path`
22113  fi
22114
22115
22116  input_path="$new_path"
22117  # Check if we need to convert this using DOS-style short mode. If the path
22118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22119  # take no chances and rewrite it.
22120  # Note: m4 eats our [], so we need to use [ and ] instead.
22121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22122  if test "x$has_forbidden_chars" != x; then
22123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22125  fi
22126
22127
22128  windows_path="$new_path"
22129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22130    unix_path=`$CYGPATH -u "$windows_path"`
22131    new_path="$unix_path"
22132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22134    new_path="$unix_path"
22135  fi
22136
22137  if test "x$path" != "x$new_path"; then
22138    BOOT_JDK="$new_path"
22139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22140$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22141  fi
22142
22143  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22144  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22145
22146  else
22147    # We're on a posix platform. Hooray! :)
22148    path="$BOOT_JDK"
22149    has_space=`$ECHO "$path" | $GREP " "`
22150    if test "x$has_space" != x; then
22151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22152$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22153      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22154    fi
22155
22156    # Use eval to expand a potential ~
22157    eval path="$path"
22158    if test ! -f "$path" && test ! -d "$path"; then
22159      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22160    fi
22161
22162    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22163  fi
22164
22165              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22166$as_echo_n "checking for Boot JDK... " >&6; }
22167              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22168$as_echo "$BOOT_JDK" >&6; }
22169              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22170$as_echo_n "checking Boot JDK version... " >&6; }
22171              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22172              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22173$as_echo "$BOOT_JDK_VERSION" >&6; }
22174            fi # end check jdk version
22175          fi # end check rt.jar
22176        fi # end check javac
22177      fi # end check java
22178    fi # end check boot jdk found
22179  fi
22180
22181
22182  if test "x$BOOT_JDK_FOUND" = xno; then
22183    # Now execute the test
22184
22185  if test "x$PROGRAMW6432" != x; then
22186    VIRTUAL_DIR="$PROGRAMW6432/Java"
22187
22188  windows_path="$VIRTUAL_DIR"
22189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22190    unix_path=`$CYGPATH -u "$windows_path"`
22191    VIRTUAL_DIR="$unix_path"
22192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22194    VIRTUAL_DIR="$unix_path"
22195  fi
22196
22197
22198  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22199  BOOT_JDK_SUFFIX=""
22200  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22201  if test "x$ALL_JDKS_FOUND" != x; then
22202    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22203
22204  if test "x$BOOT_JDK_FOUND" = xno; then
22205    # Now execute the test
22206
22207        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22208        if test -d "$BOOT_JDK"; then
22209          BOOT_JDK_FOUND=maybe
22210          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22211$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22212        fi
22213
22214
22215    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22216    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22217      # Do we have a bin/java?
22218      if test ! -x "$BOOT_JDK/bin/java"; then
22219        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22220$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22221        BOOT_JDK_FOUND=no
22222      else
22223        # Do we have a bin/javac?
22224        if test ! -x "$BOOT_JDK/bin/javac"; then
22225          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22226$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22227          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22228$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22229          BOOT_JDK_FOUND=no
22230        else
22231          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22232          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22233            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22234$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22235            BOOT_JDK_FOUND=no
22236          else
22237            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22238            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22239
22240            # Extra M4 quote needed to protect [] in grep expression.
22241            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22242            if test "x$FOUND_CORRECT_VERSION" = x; then
22243              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22244$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22245              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22246$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22247              BOOT_JDK_FOUND=no
22248            else
22249              # We're done! :-)
22250              BOOT_JDK_FOUND=yes
22251
22252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22253
22254  # Input might be given as Windows format, start by converting to
22255  # unix format.
22256  path="$BOOT_JDK"
22257  new_path=`$CYGPATH -u "$path"`
22258
22259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22262  # "foo.exe" is OK but "foo" is an error.
22263  #
22264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22265  # It is also a way to make sure we got the proper file name for the real test later on.
22266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22267  if test "x$test_shortpath" = x; then
22268    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22269$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22270    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22271  fi
22272
22273  # Call helper function which possibly converts this using DOS-style short mode.
22274  # If so, the updated path is stored in $new_path.
22275
22276  input_path="$new_path"
22277  # Check if we need to convert this using DOS-style short mode. If the path
22278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22279  # take no chances and rewrite it.
22280  # Note: m4 eats our [], so we need to use [ and ] instead.
22281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22282  if test "x$has_forbidden_chars" != x; then
22283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22287      # Going to short mode and back again did indeed matter. Since short mode is
22288      # case insensitive, let's make it lowercase to improve readability.
22289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22290      # Now convert it back to Unix-stile (cygpath)
22291      input_path=`$CYGPATH -u "$shortmode_path"`
22292      new_path="$input_path"
22293    fi
22294  fi
22295
22296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22297  if test "x$test_cygdrive_prefix" = x; then
22298    # As a simple fix, exclude /usr/bin since it's not a real path.
22299    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22301      # a path prefixed by /cygdrive for fixpath to work.
22302      new_path="$CYGWIN_ROOT_PATH$input_path"
22303    fi
22304  fi
22305
22306
22307  if test "x$path" != "x$new_path"; then
22308    BOOT_JDK="$new_path"
22309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22310$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22311  fi
22312
22313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22314
22315  path="$BOOT_JDK"
22316  has_colon=`$ECHO $path | $GREP ^.:`
22317  new_path="$path"
22318  if test "x$has_colon" = x; then
22319    # Not in mixed or Windows style, start by that.
22320    new_path=`cmd //c echo $path`
22321  fi
22322
22323
22324  input_path="$new_path"
22325  # Check if we need to convert this using DOS-style short mode. If the path
22326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22327  # take no chances and rewrite it.
22328  # Note: m4 eats our [], so we need to use [ and ] instead.
22329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22330  if test "x$has_forbidden_chars" != x; then
22331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22333  fi
22334
22335
22336  windows_path="$new_path"
22337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22338    unix_path=`$CYGPATH -u "$windows_path"`
22339    new_path="$unix_path"
22340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22342    new_path="$unix_path"
22343  fi
22344
22345  if test "x$path" != "x$new_path"; then
22346    BOOT_JDK="$new_path"
22347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22348$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22349  fi
22350
22351  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22352  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22353
22354  else
22355    # We're on a posix platform. Hooray! :)
22356    path="$BOOT_JDK"
22357    has_space=`$ECHO "$path" | $GREP " "`
22358    if test "x$has_space" != x; then
22359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22360$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22361      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22362    fi
22363
22364    # Use eval to expand a potential ~
22365    eval path="$path"
22366    if test ! -f "$path" && test ! -d "$path"; then
22367      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22368    fi
22369
22370    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22371  fi
22372
22373              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22374$as_echo_n "checking for Boot JDK... " >&6; }
22375              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22376$as_echo "$BOOT_JDK" >&6; }
22377              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22378$as_echo_n "checking Boot JDK version... " >&6; }
22379              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22380              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22381$as_echo "$BOOT_JDK_VERSION" >&6; }
22382            fi # end check jdk version
22383          fi # end check rt.jar
22384        fi # end check javac
22385      fi # end check java
22386    fi # end check boot jdk found
22387  fi
22388
22389    done
22390  fi
22391
22392  fi
22393
22394
22395    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22396    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22397      # Do we have a bin/java?
22398      if test ! -x "$BOOT_JDK/bin/java"; then
22399        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22400$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22401        BOOT_JDK_FOUND=no
22402      else
22403        # Do we have a bin/javac?
22404        if test ! -x "$BOOT_JDK/bin/javac"; then
22405          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22406$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22407          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22408$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22409          BOOT_JDK_FOUND=no
22410        else
22411          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22412          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22413            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22414$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22415            BOOT_JDK_FOUND=no
22416          else
22417            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22418            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22419
22420            # Extra M4 quote needed to protect [] in grep expression.
22421            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22422            if test "x$FOUND_CORRECT_VERSION" = x; then
22423              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22424$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22425              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22426$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22427              BOOT_JDK_FOUND=no
22428            else
22429              # We're done! :-)
22430              BOOT_JDK_FOUND=yes
22431
22432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22433
22434  # Input might be given as Windows format, start by converting to
22435  # unix format.
22436  path="$BOOT_JDK"
22437  new_path=`$CYGPATH -u "$path"`
22438
22439  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22440  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22441  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22442  # "foo.exe" is OK but "foo" is an error.
22443  #
22444  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22445  # It is also a way to make sure we got the proper file name for the real test later on.
22446  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22447  if test "x$test_shortpath" = x; then
22448    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22449$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22450    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22451  fi
22452
22453  # Call helper function which possibly converts this using DOS-style short mode.
22454  # If so, the updated path is stored in $new_path.
22455
22456  input_path="$new_path"
22457  # Check if we need to convert this using DOS-style short mode. If the path
22458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22459  # take no chances and rewrite it.
22460  # Note: m4 eats our [], so we need to use [ and ] instead.
22461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22462  if test "x$has_forbidden_chars" != x; then
22463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22464    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22465    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22466    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22467      # Going to short mode and back again did indeed matter. Since short mode is
22468      # case insensitive, let's make it lowercase to improve readability.
22469      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22470      # Now convert it back to Unix-stile (cygpath)
22471      input_path=`$CYGPATH -u "$shortmode_path"`
22472      new_path="$input_path"
22473    fi
22474  fi
22475
22476  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22477  if test "x$test_cygdrive_prefix" = x; then
22478    # As a simple fix, exclude /usr/bin since it's not a real path.
22479    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22480      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22481      # a path prefixed by /cygdrive for fixpath to work.
22482      new_path="$CYGWIN_ROOT_PATH$input_path"
22483    fi
22484  fi
22485
22486
22487  if test "x$path" != "x$new_path"; then
22488    BOOT_JDK="$new_path"
22489    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22490$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22491  fi
22492
22493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22494
22495  path="$BOOT_JDK"
22496  has_colon=`$ECHO $path | $GREP ^.:`
22497  new_path="$path"
22498  if test "x$has_colon" = x; then
22499    # Not in mixed or Windows style, start by that.
22500    new_path=`cmd //c echo $path`
22501  fi
22502
22503
22504  input_path="$new_path"
22505  # Check if we need to convert this using DOS-style short mode. If the path
22506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22507  # take no chances and rewrite it.
22508  # Note: m4 eats our [], so we need to use [ and ] instead.
22509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22510  if test "x$has_forbidden_chars" != x; then
22511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22512    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22513  fi
22514
22515
22516  windows_path="$new_path"
22517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22518    unix_path=`$CYGPATH -u "$windows_path"`
22519    new_path="$unix_path"
22520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22522    new_path="$unix_path"
22523  fi
22524
22525  if test "x$path" != "x$new_path"; then
22526    BOOT_JDK="$new_path"
22527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22528$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22529  fi
22530
22531  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22532  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22533
22534  else
22535    # We're on a posix platform. Hooray! :)
22536    path="$BOOT_JDK"
22537    has_space=`$ECHO "$path" | $GREP " "`
22538    if test "x$has_space" != x; then
22539      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22540$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22541      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22542    fi
22543
22544    # Use eval to expand a potential ~
22545    eval path="$path"
22546    if test ! -f "$path" && test ! -d "$path"; then
22547      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22548    fi
22549
22550    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22551  fi
22552
22553              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22554$as_echo_n "checking for Boot JDK... " >&6; }
22555              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22556$as_echo "$BOOT_JDK" >&6; }
22557              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22558$as_echo_n "checking Boot JDK version... " >&6; }
22559              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22560              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22561$as_echo "$BOOT_JDK_VERSION" >&6; }
22562            fi # end check jdk version
22563          fi # end check rt.jar
22564        fi # end check javac
22565      fi # end check java
22566    fi # end check boot jdk found
22567  fi
22568
22569
22570  if test "x$BOOT_JDK_FOUND" = xno; then
22571    # Now execute the test
22572
22573  if test "x$PROGRAMFILES" != x; then
22574    VIRTUAL_DIR="$PROGRAMFILES/Java"
22575
22576  windows_path="$VIRTUAL_DIR"
22577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22578    unix_path=`$CYGPATH -u "$windows_path"`
22579    VIRTUAL_DIR="$unix_path"
22580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22582    VIRTUAL_DIR="$unix_path"
22583  fi
22584
22585
22586  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22587  BOOT_JDK_SUFFIX=""
22588  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22589  if test "x$ALL_JDKS_FOUND" != x; then
22590    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22591
22592  if test "x$BOOT_JDK_FOUND" = xno; then
22593    # Now execute the test
22594
22595        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22596        if test -d "$BOOT_JDK"; then
22597          BOOT_JDK_FOUND=maybe
22598          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22599$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22600        fi
22601
22602
22603    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22604    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22605      # Do we have a bin/java?
22606      if test ! -x "$BOOT_JDK/bin/java"; then
22607        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22608$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22609        BOOT_JDK_FOUND=no
22610      else
22611        # Do we have a bin/javac?
22612        if test ! -x "$BOOT_JDK/bin/javac"; then
22613          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22614$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22615          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22616$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22617          BOOT_JDK_FOUND=no
22618        else
22619          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22620          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22621            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22622$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22623            BOOT_JDK_FOUND=no
22624          else
22625            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22626            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22627
22628            # Extra M4 quote needed to protect [] in grep expression.
22629            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22630            if test "x$FOUND_CORRECT_VERSION" = x; then
22631              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22632$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22633              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22634$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22635              BOOT_JDK_FOUND=no
22636            else
22637              # We're done! :-)
22638              BOOT_JDK_FOUND=yes
22639
22640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22641
22642  # Input might be given as Windows format, start by converting to
22643  # unix format.
22644  path="$BOOT_JDK"
22645  new_path=`$CYGPATH -u "$path"`
22646
22647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22650  # "foo.exe" is OK but "foo" is an error.
22651  #
22652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22653  # It is also a way to make sure we got the proper file name for the real test later on.
22654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22655  if test "x$test_shortpath" = x; then
22656    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22657$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22658    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22659  fi
22660
22661  # Call helper function which possibly converts this using DOS-style short mode.
22662  # If so, the updated path is stored in $new_path.
22663
22664  input_path="$new_path"
22665  # Check if we need to convert this using DOS-style short mode. If the path
22666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22667  # take no chances and rewrite it.
22668  # Note: m4 eats our [], so we need to use [ and ] instead.
22669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22670  if test "x$has_forbidden_chars" != x; then
22671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22675      # Going to short mode and back again did indeed matter. Since short mode is
22676      # case insensitive, let's make it lowercase to improve readability.
22677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22678      # Now convert it back to Unix-stile (cygpath)
22679      input_path=`$CYGPATH -u "$shortmode_path"`
22680      new_path="$input_path"
22681    fi
22682  fi
22683
22684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22685  if test "x$test_cygdrive_prefix" = x; then
22686    # As a simple fix, exclude /usr/bin since it's not a real path.
22687    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22689      # a path prefixed by /cygdrive for fixpath to work.
22690      new_path="$CYGWIN_ROOT_PATH$input_path"
22691    fi
22692  fi
22693
22694
22695  if test "x$path" != "x$new_path"; then
22696    BOOT_JDK="$new_path"
22697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22698$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22699  fi
22700
22701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22702
22703  path="$BOOT_JDK"
22704  has_colon=`$ECHO $path | $GREP ^.:`
22705  new_path="$path"
22706  if test "x$has_colon" = x; then
22707    # Not in mixed or Windows style, start by that.
22708    new_path=`cmd //c echo $path`
22709  fi
22710
22711
22712  input_path="$new_path"
22713  # Check if we need to convert this using DOS-style short mode. If the path
22714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22715  # take no chances and rewrite it.
22716  # Note: m4 eats our [], so we need to use [ and ] instead.
22717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22718  if test "x$has_forbidden_chars" != x; then
22719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22721  fi
22722
22723
22724  windows_path="$new_path"
22725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22726    unix_path=`$CYGPATH -u "$windows_path"`
22727    new_path="$unix_path"
22728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22730    new_path="$unix_path"
22731  fi
22732
22733  if test "x$path" != "x$new_path"; then
22734    BOOT_JDK="$new_path"
22735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22736$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22737  fi
22738
22739  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22740  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22741
22742  else
22743    # We're on a posix platform. Hooray! :)
22744    path="$BOOT_JDK"
22745    has_space=`$ECHO "$path" | $GREP " "`
22746    if test "x$has_space" != x; then
22747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22748$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22749      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22750    fi
22751
22752    # Use eval to expand a potential ~
22753    eval path="$path"
22754    if test ! -f "$path" && test ! -d "$path"; then
22755      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22756    fi
22757
22758    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22759  fi
22760
22761              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22762$as_echo_n "checking for Boot JDK... " >&6; }
22763              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22764$as_echo "$BOOT_JDK" >&6; }
22765              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22766$as_echo_n "checking Boot JDK version... " >&6; }
22767              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22768              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22769$as_echo "$BOOT_JDK_VERSION" >&6; }
22770            fi # end check jdk version
22771          fi # end check rt.jar
22772        fi # end check javac
22773      fi # end check java
22774    fi # end check boot jdk found
22775  fi
22776
22777    done
22778  fi
22779
22780  fi
22781
22782
22783    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22784    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22785      # Do we have a bin/java?
22786      if test ! -x "$BOOT_JDK/bin/java"; then
22787        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22789        BOOT_JDK_FOUND=no
22790      else
22791        # Do we have a bin/javac?
22792        if test ! -x "$BOOT_JDK/bin/javac"; then
22793          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22795          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22796$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22797          BOOT_JDK_FOUND=no
22798        else
22799          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22800          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22801            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22803            BOOT_JDK_FOUND=no
22804          else
22805            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22806            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22807
22808            # Extra M4 quote needed to protect [] in grep expression.
22809            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22810            if test "x$FOUND_CORRECT_VERSION" = x; then
22811              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22812$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22813              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22814$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22815              BOOT_JDK_FOUND=no
22816            else
22817              # We're done! :-)
22818              BOOT_JDK_FOUND=yes
22819
22820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22821
22822  # Input might be given as Windows format, start by converting to
22823  # unix format.
22824  path="$BOOT_JDK"
22825  new_path=`$CYGPATH -u "$path"`
22826
22827  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22828  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22829  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22830  # "foo.exe" is OK but "foo" is an error.
22831  #
22832  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22833  # It is also a way to make sure we got the proper file name for the real test later on.
22834  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22835  if test "x$test_shortpath" = x; then
22836    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22837$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22838    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22839  fi
22840
22841  # Call helper function which possibly converts this using DOS-style short mode.
22842  # If so, the updated path is stored in $new_path.
22843
22844  input_path="$new_path"
22845  # Check if we need to convert this using DOS-style short mode. If the path
22846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22847  # take no chances and rewrite it.
22848  # Note: m4 eats our [], so we need to use [ and ] instead.
22849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22850  if test "x$has_forbidden_chars" != x; then
22851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22852    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22853    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22854    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22855      # Going to short mode and back again did indeed matter. Since short mode is
22856      # case insensitive, let's make it lowercase to improve readability.
22857      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22858      # Now convert it back to Unix-stile (cygpath)
22859      input_path=`$CYGPATH -u "$shortmode_path"`
22860      new_path="$input_path"
22861    fi
22862  fi
22863
22864  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22865  if test "x$test_cygdrive_prefix" = x; then
22866    # As a simple fix, exclude /usr/bin since it's not a real path.
22867    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22868      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22869      # a path prefixed by /cygdrive for fixpath to work.
22870      new_path="$CYGWIN_ROOT_PATH$input_path"
22871    fi
22872  fi
22873
22874
22875  if test "x$path" != "x$new_path"; then
22876    BOOT_JDK="$new_path"
22877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22878$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22879  fi
22880
22881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22882
22883  path="$BOOT_JDK"
22884  has_colon=`$ECHO $path | $GREP ^.:`
22885  new_path="$path"
22886  if test "x$has_colon" = x; then
22887    # Not in mixed or Windows style, start by that.
22888    new_path=`cmd //c echo $path`
22889  fi
22890
22891
22892  input_path="$new_path"
22893  # Check if we need to convert this using DOS-style short mode. If the path
22894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22895  # take no chances and rewrite it.
22896  # Note: m4 eats our [], so we need to use [ and ] instead.
22897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22898  if test "x$has_forbidden_chars" != x; then
22899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22901  fi
22902
22903
22904  windows_path="$new_path"
22905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22906    unix_path=`$CYGPATH -u "$windows_path"`
22907    new_path="$unix_path"
22908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22910    new_path="$unix_path"
22911  fi
22912
22913  if test "x$path" != "x$new_path"; then
22914    BOOT_JDK="$new_path"
22915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22916$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22917  fi
22918
22919  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22920  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22921
22922  else
22923    # We're on a posix platform. Hooray! :)
22924    path="$BOOT_JDK"
22925    has_space=`$ECHO "$path" | $GREP " "`
22926    if test "x$has_space" != x; then
22927      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22928$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22929      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22930    fi
22931
22932    # Use eval to expand a potential ~
22933    eval path="$path"
22934    if test ! -f "$path" && test ! -d "$path"; then
22935      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22936    fi
22937
22938    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22939  fi
22940
22941              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22942$as_echo_n "checking for Boot JDK... " >&6; }
22943              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22944$as_echo "$BOOT_JDK" >&6; }
22945              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22946$as_echo_n "checking Boot JDK version... " >&6; }
22947              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22948              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22949$as_echo "$BOOT_JDK_VERSION" >&6; }
22950            fi # end check jdk version
22951          fi # end check rt.jar
22952        fi # end check javac
22953      fi # end check java
22954    fi # end check boot jdk found
22955  fi
22956
22957
22958  if test "x$BOOT_JDK_FOUND" = xno; then
22959    # Now execute the test
22960
22961  if test "x$ProgramFiles" != x; then
22962    VIRTUAL_DIR="$ProgramFiles/Java"
22963
22964  windows_path="$VIRTUAL_DIR"
22965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22966    unix_path=`$CYGPATH -u "$windows_path"`
22967    VIRTUAL_DIR="$unix_path"
22968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22970    VIRTUAL_DIR="$unix_path"
22971  fi
22972
22973
22974  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22975  BOOT_JDK_SUFFIX=""
22976  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22977  if test "x$ALL_JDKS_FOUND" != x; then
22978    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22979
22980  if test "x$BOOT_JDK_FOUND" = xno; then
22981    # Now execute the test
22982
22983        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22984        if test -d "$BOOT_JDK"; then
22985          BOOT_JDK_FOUND=maybe
22986          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22987$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22988        fi
22989
22990
22991    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22992    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22993      # Do we have a bin/java?
22994      if test ! -x "$BOOT_JDK/bin/java"; then
22995        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22996$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22997        BOOT_JDK_FOUND=no
22998      else
22999        # Do we have a bin/javac?
23000        if test ! -x "$BOOT_JDK/bin/javac"; then
23001          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23003          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23004$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23005          BOOT_JDK_FOUND=no
23006        else
23007          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23008          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23009            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23010$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23011            BOOT_JDK_FOUND=no
23012          else
23013            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23014            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23015
23016            # Extra M4 quote needed to protect [] in grep expression.
23017            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23018            if test "x$FOUND_CORRECT_VERSION" = x; then
23019              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23021              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23022$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23023              BOOT_JDK_FOUND=no
23024            else
23025              # We're done! :-)
23026              BOOT_JDK_FOUND=yes
23027
23028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23029
23030  # Input might be given as Windows format, start by converting to
23031  # unix format.
23032  path="$BOOT_JDK"
23033  new_path=`$CYGPATH -u "$path"`
23034
23035  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23036  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23037  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23038  # "foo.exe" is OK but "foo" is an error.
23039  #
23040  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23041  # It is also a way to make sure we got the proper file name for the real test later on.
23042  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23043  if test "x$test_shortpath" = x; then
23044    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23045$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23046    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23047  fi
23048
23049  # Call helper function which possibly converts this using DOS-style short mode.
23050  # If so, the updated path is stored in $new_path.
23051
23052  input_path="$new_path"
23053  # Check if we need to convert this using DOS-style short mode. If the path
23054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23055  # take no chances and rewrite it.
23056  # Note: m4 eats our [], so we need to use [ and ] instead.
23057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23058  if test "x$has_forbidden_chars" != x; then
23059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23060    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23061    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23062    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23063      # Going to short mode and back again did indeed matter. Since short mode is
23064      # case insensitive, let's make it lowercase to improve readability.
23065      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23066      # Now convert it back to Unix-stile (cygpath)
23067      input_path=`$CYGPATH -u "$shortmode_path"`
23068      new_path="$input_path"
23069    fi
23070  fi
23071
23072  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23073  if test "x$test_cygdrive_prefix" = x; then
23074    # As a simple fix, exclude /usr/bin since it's not a real path.
23075    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23076      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23077      # a path prefixed by /cygdrive for fixpath to work.
23078      new_path="$CYGWIN_ROOT_PATH$input_path"
23079    fi
23080  fi
23081
23082
23083  if test "x$path" != "x$new_path"; then
23084    BOOT_JDK="$new_path"
23085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23086$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23087  fi
23088
23089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23090
23091  path="$BOOT_JDK"
23092  has_colon=`$ECHO $path | $GREP ^.:`
23093  new_path="$path"
23094  if test "x$has_colon" = x; then
23095    # Not in mixed or Windows style, start by that.
23096    new_path=`cmd //c echo $path`
23097  fi
23098
23099
23100  input_path="$new_path"
23101  # Check if we need to convert this using DOS-style short mode. If the path
23102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23103  # take no chances and rewrite it.
23104  # Note: m4 eats our [], so we need to use [ and ] instead.
23105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23106  if test "x$has_forbidden_chars" != x; then
23107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23108    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23109  fi
23110
23111
23112  windows_path="$new_path"
23113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23114    unix_path=`$CYGPATH -u "$windows_path"`
23115    new_path="$unix_path"
23116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23118    new_path="$unix_path"
23119  fi
23120
23121  if test "x$path" != "x$new_path"; then
23122    BOOT_JDK="$new_path"
23123    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23124$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23125  fi
23126
23127  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23128  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23129
23130  else
23131    # We're on a posix platform. Hooray! :)
23132    path="$BOOT_JDK"
23133    has_space=`$ECHO "$path" | $GREP " "`
23134    if test "x$has_space" != x; then
23135      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23136$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23137      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23138    fi
23139
23140    # Use eval to expand a potential ~
23141    eval path="$path"
23142    if test ! -f "$path" && test ! -d "$path"; then
23143      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23144    fi
23145
23146    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23147  fi
23148
23149              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23150$as_echo_n "checking for Boot JDK... " >&6; }
23151              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23152$as_echo "$BOOT_JDK" >&6; }
23153              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23154$as_echo_n "checking Boot JDK version... " >&6; }
23155              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23156              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23157$as_echo "$BOOT_JDK_VERSION" >&6; }
23158            fi # end check jdk version
23159          fi # end check rt.jar
23160        fi # end check javac
23161      fi # end check java
23162    fi # end check boot jdk found
23163  fi
23164
23165    done
23166  fi
23167
23168  fi
23169
23170
23171    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23172    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23173      # Do we have a bin/java?
23174      if test ! -x "$BOOT_JDK/bin/java"; then
23175        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23177        BOOT_JDK_FOUND=no
23178      else
23179        # Do we have a bin/javac?
23180        if test ! -x "$BOOT_JDK/bin/javac"; then
23181          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23183          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23184$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23185          BOOT_JDK_FOUND=no
23186        else
23187          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23188          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23189            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23191            BOOT_JDK_FOUND=no
23192          else
23193            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23194            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23195
23196            # Extra M4 quote needed to protect [] in grep expression.
23197            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23198            if test "x$FOUND_CORRECT_VERSION" = x; then
23199              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23201              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23202$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23203              BOOT_JDK_FOUND=no
23204            else
23205              # We're done! :-)
23206              BOOT_JDK_FOUND=yes
23207
23208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23209
23210  # Input might be given as Windows format, start by converting to
23211  # unix format.
23212  path="$BOOT_JDK"
23213  new_path=`$CYGPATH -u "$path"`
23214
23215  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23216  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23217  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23218  # "foo.exe" is OK but "foo" is an error.
23219  #
23220  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23221  # It is also a way to make sure we got the proper file name for the real test later on.
23222  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23223  if test "x$test_shortpath" = x; then
23224    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23225$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23226    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23227  fi
23228
23229  # Call helper function which possibly converts this using DOS-style short mode.
23230  # If so, the updated path is stored in $new_path.
23231
23232  input_path="$new_path"
23233  # Check if we need to convert this using DOS-style short mode. If the path
23234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23235  # take no chances and rewrite it.
23236  # Note: m4 eats our [], so we need to use [ and ] instead.
23237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23238  if test "x$has_forbidden_chars" != x; then
23239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23243      # Going to short mode and back again did indeed matter. Since short mode is
23244      # case insensitive, let's make it lowercase to improve readability.
23245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23246      # Now convert it back to Unix-stile (cygpath)
23247      input_path=`$CYGPATH -u "$shortmode_path"`
23248      new_path="$input_path"
23249    fi
23250  fi
23251
23252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23253  if test "x$test_cygdrive_prefix" = x; then
23254    # As a simple fix, exclude /usr/bin since it's not a real path.
23255    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23257      # a path prefixed by /cygdrive for fixpath to work.
23258      new_path="$CYGWIN_ROOT_PATH$input_path"
23259    fi
23260  fi
23261
23262
23263  if test "x$path" != "x$new_path"; then
23264    BOOT_JDK="$new_path"
23265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23266$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23267  fi
23268
23269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23270
23271  path="$BOOT_JDK"
23272  has_colon=`$ECHO $path | $GREP ^.:`
23273  new_path="$path"
23274  if test "x$has_colon" = x; then
23275    # Not in mixed or Windows style, start by that.
23276    new_path=`cmd //c echo $path`
23277  fi
23278
23279
23280  input_path="$new_path"
23281  # Check if we need to convert this using DOS-style short mode. If the path
23282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23283  # take no chances and rewrite it.
23284  # Note: m4 eats our [], so we need to use [ and ] instead.
23285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23286  if test "x$has_forbidden_chars" != x; then
23287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23288    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23289  fi
23290
23291
23292  windows_path="$new_path"
23293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23294    unix_path=`$CYGPATH -u "$windows_path"`
23295    new_path="$unix_path"
23296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23298    new_path="$unix_path"
23299  fi
23300
23301  if test "x$path" != "x$new_path"; then
23302    BOOT_JDK="$new_path"
23303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23304$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23305  fi
23306
23307  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23308  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23309
23310  else
23311    # We're on a posix platform. Hooray! :)
23312    path="$BOOT_JDK"
23313    has_space=`$ECHO "$path" | $GREP " "`
23314    if test "x$has_space" != x; then
23315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23316$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23317      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23318    fi
23319
23320    # Use eval to expand a potential ~
23321    eval path="$path"
23322    if test ! -f "$path" && test ! -d "$path"; then
23323      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23324    fi
23325
23326    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23327  fi
23328
23329              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23330$as_echo_n "checking for Boot JDK... " >&6; }
23331              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23332$as_echo "$BOOT_JDK" >&6; }
23333              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23334$as_echo_n "checking Boot JDK version... " >&6; }
23335              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23336              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23337$as_echo "$BOOT_JDK_VERSION" >&6; }
23338            fi # end check jdk version
23339          fi # end check rt.jar
23340        fi # end check javac
23341      fi # end check java
23342    fi # end check boot jdk found
23343  fi
23344
23345
23346  if test "x$BOOT_JDK_FOUND" = xno; then
23347    # Now execute the test
23348
23349  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23350  BOOT_JDK_SUFFIX=""
23351  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23352  if test "x$ALL_JDKS_FOUND" != x; then
23353    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23354
23355  if test "x$BOOT_JDK_FOUND" = xno; then
23356    # Now execute the test
23357
23358        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23359        if test -d "$BOOT_JDK"; then
23360          BOOT_JDK_FOUND=maybe
23361          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23362$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23363        fi
23364
23365
23366    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23367    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23368      # Do we have a bin/java?
23369      if test ! -x "$BOOT_JDK/bin/java"; then
23370        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23371$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23372        BOOT_JDK_FOUND=no
23373      else
23374        # Do we have a bin/javac?
23375        if test ! -x "$BOOT_JDK/bin/javac"; then
23376          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23378          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23379$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23380          BOOT_JDK_FOUND=no
23381        else
23382          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23383          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23384            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23385$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23386            BOOT_JDK_FOUND=no
23387          else
23388            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23389            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23390
23391            # Extra M4 quote needed to protect [] in grep expression.
23392            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23393            if test "x$FOUND_CORRECT_VERSION" = x; then
23394              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23395$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23396              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23397$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23398              BOOT_JDK_FOUND=no
23399            else
23400              # We're done! :-)
23401              BOOT_JDK_FOUND=yes
23402
23403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23404
23405  # Input might be given as Windows format, start by converting to
23406  # unix format.
23407  path="$BOOT_JDK"
23408  new_path=`$CYGPATH -u "$path"`
23409
23410  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23411  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23412  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23413  # "foo.exe" is OK but "foo" is an error.
23414  #
23415  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23416  # It is also a way to make sure we got the proper file name for the real test later on.
23417  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23418  if test "x$test_shortpath" = x; then
23419    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23420$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23421    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23422  fi
23423
23424  # Call helper function which possibly converts this using DOS-style short mode.
23425  # If so, the updated path is stored in $new_path.
23426
23427  input_path="$new_path"
23428  # Check if we need to convert this using DOS-style short mode. If the path
23429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23430  # take no chances and rewrite it.
23431  # Note: m4 eats our [], so we need to use [ and ] instead.
23432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23433  if test "x$has_forbidden_chars" != x; then
23434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23435    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23436    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23437    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23438      # Going to short mode and back again did indeed matter. Since short mode is
23439      # case insensitive, let's make it lowercase to improve readability.
23440      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23441      # Now convert it back to Unix-stile (cygpath)
23442      input_path=`$CYGPATH -u "$shortmode_path"`
23443      new_path="$input_path"
23444    fi
23445  fi
23446
23447  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23448  if test "x$test_cygdrive_prefix" = x; then
23449    # As a simple fix, exclude /usr/bin since it's not a real path.
23450    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23451      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23452      # a path prefixed by /cygdrive for fixpath to work.
23453      new_path="$CYGWIN_ROOT_PATH$input_path"
23454    fi
23455  fi
23456
23457
23458  if test "x$path" != "x$new_path"; then
23459    BOOT_JDK="$new_path"
23460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23461$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23462  fi
23463
23464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23465
23466  path="$BOOT_JDK"
23467  has_colon=`$ECHO $path | $GREP ^.:`
23468  new_path="$path"
23469  if test "x$has_colon" = x; then
23470    # Not in mixed or Windows style, start by that.
23471    new_path=`cmd //c echo $path`
23472  fi
23473
23474
23475  input_path="$new_path"
23476  # Check if we need to convert this using DOS-style short mode. If the path
23477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23478  # take no chances and rewrite it.
23479  # Note: m4 eats our [], so we need to use [ and ] instead.
23480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23481  if test "x$has_forbidden_chars" != x; then
23482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23483    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23484  fi
23485
23486
23487  windows_path="$new_path"
23488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23489    unix_path=`$CYGPATH -u "$windows_path"`
23490    new_path="$unix_path"
23491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23493    new_path="$unix_path"
23494  fi
23495
23496  if test "x$path" != "x$new_path"; then
23497    BOOT_JDK="$new_path"
23498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23499$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23500  fi
23501
23502  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23503  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23504
23505  else
23506    # We're on a posix platform. Hooray! :)
23507    path="$BOOT_JDK"
23508    has_space=`$ECHO "$path" | $GREP " "`
23509    if test "x$has_space" != x; then
23510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23511$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23512      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23513    fi
23514
23515    # Use eval to expand a potential ~
23516    eval path="$path"
23517    if test ! -f "$path" && test ! -d "$path"; then
23518      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23519    fi
23520
23521    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23522  fi
23523
23524              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23525$as_echo_n "checking for Boot JDK... " >&6; }
23526              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23527$as_echo "$BOOT_JDK" >&6; }
23528              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23529$as_echo_n "checking Boot JDK version... " >&6; }
23530              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23531              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23532$as_echo "$BOOT_JDK_VERSION" >&6; }
23533            fi # end check jdk version
23534          fi # end check rt.jar
23535        fi # end check javac
23536      fi # end check java
23537    fi # end check boot jdk found
23538  fi
23539
23540    done
23541  fi
23542
23543
23544    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23545    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23546      # Do we have a bin/java?
23547      if test ! -x "$BOOT_JDK/bin/java"; then
23548        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23549$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23550        BOOT_JDK_FOUND=no
23551      else
23552        # Do we have a bin/javac?
23553        if test ! -x "$BOOT_JDK/bin/javac"; then
23554          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23555$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23556          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23557$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23558          BOOT_JDK_FOUND=no
23559        else
23560          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23561          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23562            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23563$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23564            BOOT_JDK_FOUND=no
23565          else
23566            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23567            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23568
23569            # Extra M4 quote needed to protect [] in grep expression.
23570            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23571            if test "x$FOUND_CORRECT_VERSION" = x; then
23572              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23574              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23575$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23576              BOOT_JDK_FOUND=no
23577            else
23578              # We're done! :-)
23579              BOOT_JDK_FOUND=yes
23580
23581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23582
23583  # Input might be given as Windows format, start by converting to
23584  # unix format.
23585  path="$BOOT_JDK"
23586  new_path=`$CYGPATH -u "$path"`
23587
23588  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23589  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23590  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23591  # "foo.exe" is OK but "foo" is an error.
23592  #
23593  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23594  # It is also a way to make sure we got the proper file name for the real test later on.
23595  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23596  if test "x$test_shortpath" = x; then
23597    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23598$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23599    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23600  fi
23601
23602  # Call helper function which possibly converts this using DOS-style short mode.
23603  # If so, the updated path is stored in $new_path.
23604
23605  input_path="$new_path"
23606  # Check if we need to convert this using DOS-style short mode. If the path
23607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23608  # take no chances and rewrite it.
23609  # Note: m4 eats our [], so we need to use [ and ] instead.
23610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23611  if test "x$has_forbidden_chars" != x; then
23612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23616      # Going to short mode and back again did indeed matter. Since short mode is
23617      # case insensitive, let's make it lowercase to improve readability.
23618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23619      # Now convert it back to Unix-stile (cygpath)
23620      input_path=`$CYGPATH -u "$shortmode_path"`
23621      new_path="$input_path"
23622    fi
23623  fi
23624
23625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23626  if test "x$test_cygdrive_prefix" = x; then
23627    # As a simple fix, exclude /usr/bin since it's not a real path.
23628    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23630      # a path prefixed by /cygdrive for fixpath to work.
23631      new_path="$CYGWIN_ROOT_PATH$input_path"
23632    fi
23633  fi
23634
23635
23636  if test "x$path" != "x$new_path"; then
23637    BOOT_JDK="$new_path"
23638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23639$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23640  fi
23641
23642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23643
23644  path="$BOOT_JDK"
23645  has_colon=`$ECHO $path | $GREP ^.:`
23646  new_path="$path"
23647  if test "x$has_colon" = x; then
23648    # Not in mixed or Windows style, start by that.
23649    new_path=`cmd //c echo $path`
23650  fi
23651
23652
23653  input_path="$new_path"
23654  # Check if we need to convert this using DOS-style short mode. If the path
23655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23656  # take no chances and rewrite it.
23657  # Note: m4 eats our [], so we need to use [ and ] instead.
23658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23659  if test "x$has_forbidden_chars" != x; then
23660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23661    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23662  fi
23663
23664
23665  windows_path="$new_path"
23666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23667    unix_path=`$CYGPATH -u "$windows_path"`
23668    new_path="$unix_path"
23669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23671    new_path="$unix_path"
23672  fi
23673
23674  if test "x$path" != "x$new_path"; then
23675    BOOT_JDK="$new_path"
23676    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23677$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23678  fi
23679
23680  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23681  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23682
23683  else
23684    # We're on a posix platform. Hooray! :)
23685    path="$BOOT_JDK"
23686    has_space=`$ECHO "$path" | $GREP " "`
23687    if test "x$has_space" != x; then
23688      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23689$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23690      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23691    fi
23692
23693    # Use eval to expand a potential ~
23694    eval path="$path"
23695    if test ! -f "$path" && test ! -d "$path"; then
23696      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23697    fi
23698
23699    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23700  fi
23701
23702              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23703$as_echo_n "checking for Boot JDK... " >&6; }
23704              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23705$as_echo "$BOOT_JDK" >&6; }
23706              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23707$as_echo_n "checking Boot JDK version... " >&6; }
23708              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23709              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23710$as_echo "$BOOT_JDK_VERSION" >&6; }
23711            fi # end check jdk version
23712          fi # end check rt.jar
23713        fi # end check javac
23714      fi # end check java
23715    fi # end check boot jdk found
23716  fi
23717
23718  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23719
23720  if test "x$BOOT_JDK_FOUND" = xno; then
23721    # Now execute the test
23722
23723  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23724  BOOT_JDK_SUFFIX="/Contents/Home"
23725  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23726  if test "x$ALL_JDKS_FOUND" != x; then
23727    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23728
23729  if test "x$BOOT_JDK_FOUND" = xno; then
23730    # Now execute the test
23731
23732        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23733        if test -d "$BOOT_JDK"; then
23734          BOOT_JDK_FOUND=maybe
23735          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23736$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23737        fi
23738
23739
23740    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23741    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23742      # Do we have a bin/java?
23743      if test ! -x "$BOOT_JDK/bin/java"; then
23744        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23745$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23746        BOOT_JDK_FOUND=no
23747      else
23748        # Do we have a bin/javac?
23749        if test ! -x "$BOOT_JDK/bin/javac"; then
23750          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23751$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23752          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23753$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23754          BOOT_JDK_FOUND=no
23755        else
23756          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23757          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23758            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23759$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23760            BOOT_JDK_FOUND=no
23761          else
23762            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23763            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23764
23765            # Extra M4 quote needed to protect [] in grep expression.
23766            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23767            if test "x$FOUND_CORRECT_VERSION" = x; then
23768              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23769$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23770              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23771$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23772              BOOT_JDK_FOUND=no
23773            else
23774              # We're done! :-)
23775              BOOT_JDK_FOUND=yes
23776
23777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23778
23779  # Input might be given as Windows format, start by converting to
23780  # unix format.
23781  path="$BOOT_JDK"
23782  new_path=`$CYGPATH -u "$path"`
23783
23784  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23785  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23786  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23787  # "foo.exe" is OK but "foo" is an error.
23788  #
23789  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23790  # It is also a way to make sure we got the proper file name for the real test later on.
23791  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23792  if test "x$test_shortpath" = x; then
23793    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23794$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23795    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23796  fi
23797
23798  # Call helper function which possibly converts this using DOS-style short mode.
23799  # If so, the updated path is stored in $new_path.
23800
23801  input_path="$new_path"
23802  # Check if we need to convert this using DOS-style short mode. If the path
23803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23804  # take no chances and rewrite it.
23805  # Note: m4 eats our [], so we need to use [ and ] instead.
23806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23807  if test "x$has_forbidden_chars" != x; then
23808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23809    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23810    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23811    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23812      # Going to short mode and back again did indeed matter. Since short mode is
23813      # case insensitive, let's make it lowercase to improve readability.
23814      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23815      # Now convert it back to Unix-stile (cygpath)
23816      input_path=`$CYGPATH -u "$shortmode_path"`
23817      new_path="$input_path"
23818    fi
23819  fi
23820
23821  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23822  if test "x$test_cygdrive_prefix" = x; then
23823    # As a simple fix, exclude /usr/bin since it's not a real path.
23824    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23825      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23826      # a path prefixed by /cygdrive for fixpath to work.
23827      new_path="$CYGWIN_ROOT_PATH$input_path"
23828    fi
23829  fi
23830
23831
23832  if test "x$path" != "x$new_path"; then
23833    BOOT_JDK="$new_path"
23834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23835$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23836  fi
23837
23838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23839
23840  path="$BOOT_JDK"
23841  has_colon=`$ECHO $path | $GREP ^.:`
23842  new_path="$path"
23843  if test "x$has_colon" = x; then
23844    # Not in mixed or Windows style, start by that.
23845    new_path=`cmd //c echo $path`
23846  fi
23847
23848
23849  input_path="$new_path"
23850  # Check if we need to convert this using DOS-style short mode. If the path
23851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23852  # take no chances and rewrite it.
23853  # Note: m4 eats our [], so we need to use [ and ] instead.
23854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23855  if test "x$has_forbidden_chars" != x; then
23856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23857    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23858  fi
23859
23860
23861  windows_path="$new_path"
23862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23863    unix_path=`$CYGPATH -u "$windows_path"`
23864    new_path="$unix_path"
23865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23867    new_path="$unix_path"
23868  fi
23869
23870  if test "x$path" != "x$new_path"; then
23871    BOOT_JDK="$new_path"
23872    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23873$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23874  fi
23875
23876  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23877  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23878
23879  else
23880    # We're on a posix platform. Hooray! :)
23881    path="$BOOT_JDK"
23882    has_space=`$ECHO "$path" | $GREP " "`
23883    if test "x$has_space" != x; then
23884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23885$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23886      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23887    fi
23888
23889    # Use eval to expand a potential ~
23890    eval path="$path"
23891    if test ! -f "$path" && test ! -d "$path"; then
23892      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23893    fi
23894
23895    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23896  fi
23897
23898              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23899$as_echo_n "checking for Boot JDK... " >&6; }
23900              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23901$as_echo "$BOOT_JDK" >&6; }
23902              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23903$as_echo_n "checking Boot JDK version... " >&6; }
23904              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23905              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23906$as_echo "$BOOT_JDK_VERSION" >&6; }
23907            fi # end check jdk version
23908          fi # end check rt.jar
23909        fi # end check javac
23910      fi # end check java
23911    fi # end check boot jdk found
23912  fi
23913
23914    done
23915  fi
23916
23917
23918    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23919    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23920      # Do we have a bin/java?
23921      if test ! -x "$BOOT_JDK/bin/java"; then
23922        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23923$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23924        BOOT_JDK_FOUND=no
23925      else
23926        # Do we have a bin/javac?
23927        if test ! -x "$BOOT_JDK/bin/javac"; then
23928          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23929$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23930          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23931$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23932          BOOT_JDK_FOUND=no
23933        else
23934          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23935          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23936            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23937$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23938            BOOT_JDK_FOUND=no
23939          else
23940            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23941            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23942
23943            # Extra M4 quote needed to protect [] in grep expression.
23944            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23945            if test "x$FOUND_CORRECT_VERSION" = x; then
23946              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23947$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23948              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23949$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23950              BOOT_JDK_FOUND=no
23951            else
23952              # We're done! :-)
23953              BOOT_JDK_FOUND=yes
23954
23955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23956
23957  # Input might be given as Windows format, start by converting to
23958  # unix format.
23959  path="$BOOT_JDK"
23960  new_path=`$CYGPATH -u "$path"`
23961
23962  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23963  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23964  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23965  # "foo.exe" is OK but "foo" is an error.
23966  #
23967  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23968  # It is also a way to make sure we got the proper file name for the real test later on.
23969  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23970  if test "x$test_shortpath" = x; then
23971    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23972$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23973    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23974  fi
23975
23976  # Call helper function which possibly converts this using DOS-style short mode.
23977  # If so, the updated path is stored in $new_path.
23978
23979  input_path="$new_path"
23980  # Check if we need to convert this using DOS-style short mode. If the path
23981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23982  # take no chances and rewrite it.
23983  # Note: m4 eats our [], so we need to use [ and ] instead.
23984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23985  if test "x$has_forbidden_chars" != x; then
23986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23987    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23988    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23989    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23990      # Going to short mode and back again did indeed matter. Since short mode is
23991      # case insensitive, let's make it lowercase to improve readability.
23992      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23993      # Now convert it back to Unix-stile (cygpath)
23994      input_path=`$CYGPATH -u "$shortmode_path"`
23995      new_path="$input_path"
23996    fi
23997  fi
23998
23999  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24000  if test "x$test_cygdrive_prefix" = x; then
24001    # As a simple fix, exclude /usr/bin since it's not a real path.
24002    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24003      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24004      # a path prefixed by /cygdrive for fixpath to work.
24005      new_path="$CYGWIN_ROOT_PATH$input_path"
24006    fi
24007  fi
24008
24009
24010  if test "x$path" != "x$new_path"; then
24011    BOOT_JDK="$new_path"
24012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24013$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24014  fi
24015
24016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24017
24018  path="$BOOT_JDK"
24019  has_colon=`$ECHO $path | $GREP ^.:`
24020  new_path="$path"
24021  if test "x$has_colon" = x; then
24022    # Not in mixed or Windows style, start by that.
24023    new_path=`cmd //c echo $path`
24024  fi
24025
24026
24027  input_path="$new_path"
24028  # Check if we need to convert this using DOS-style short mode. If the path
24029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24030  # take no chances and rewrite it.
24031  # Note: m4 eats our [], so we need to use [ and ] instead.
24032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24033  if test "x$has_forbidden_chars" != x; then
24034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24035    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24036  fi
24037
24038
24039  windows_path="$new_path"
24040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24041    unix_path=`$CYGPATH -u "$windows_path"`
24042    new_path="$unix_path"
24043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24045    new_path="$unix_path"
24046  fi
24047
24048  if test "x$path" != "x$new_path"; then
24049    BOOT_JDK="$new_path"
24050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24051$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24052  fi
24053
24054  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24055  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24056
24057  else
24058    # We're on a posix platform. Hooray! :)
24059    path="$BOOT_JDK"
24060    has_space=`$ECHO "$path" | $GREP " "`
24061    if test "x$has_space" != x; then
24062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24063$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24064      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24065    fi
24066
24067    # Use eval to expand a potential ~
24068    eval path="$path"
24069    if test ! -f "$path" && test ! -d "$path"; then
24070      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24071    fi
24072
24073    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24074  fi
24075
24076              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24077$as_echo_n "checking for Boot JDK... " >&6; }
24078              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24079$as_echo "$BOOT_JDK" >&6; }
24080              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24081$as_echo_n "checking Boot JDK version... " >&6; }
24082              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24083              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24084$as_echo "$BOOT_JDK_VERSION" >&6; }
24085            fi # end check jdk version
24086          fi # end check rt.jar
24087        fi # end check javac
24088      fi # end check java
24089    fi # end check boot jdk found
24090  fi
24091
24092
24093  if test "x$BOOT_JDK_FOUND" = xno; then
24094    # Now execute the test
24095
24096  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24097  BOOT_JDK_SUFFIX="/Contents/Home"
24098  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24099  if test "x$ALL_JDKS_FOUND" != x; then
24100    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24101
24102  if test "x$BOOT_JDK_FOUND" = xno; then
24103    # Now execute the test
24104
24105        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24106        if test -d "$BOOT_JDK"; then
24107          BOOT_JDK_FOUND=maybe
24108          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24109$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24110        fi
24111
24112
24113    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24114    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24115      # Do we have a bin/java?
24116      if test ! -x "$BOOT_JDK/bin/java"; then
24117        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24118$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24119        BOOT_JDK_FOUND=no
24120      else
24121        # Do we have a bin/javac?
24122        if test ! -x "$BOOT_JDK/bin/javac"; then
24123          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24124$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24125          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24126$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24127          BOOT_JDK_FOUND=no
24128        else
24129          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24130          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24131            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24133            BOOT_JDK_FOUND=no
24134          else
24135            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24136            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24137
24138            # Extra M4 quote needed to protect [] in grep expression.
24139            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24140            if test "x$FOUND_CORRECT_VERSION" = x; then
24141              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24142$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24143              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24144$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24145              BOOT_JDK_FOUND=no
24146            else
24147              # We're done! :-)
24148              BOOT_JDK_FOUND=yes
24149
24150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24151
24152  # Input might be given as Windows format, start by converting to
24153  # unix format.
24154  path="$BOOT_JDK"
24155  new_path=`$CYGPATH -u "$path"`
24156
24157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24160  # "foo.exe" is OK but "foo" is an error.
24161  #
24162  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24163  # It is also a way to make sure we got the proper file name for the real test later on.
24164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24165  if test "x$test_shortpath" = x; then
24166    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24167$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24168    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24169  fi
24170
24171  # Call helper function which possibly converts this using DOS-style short mode.
24172  # If so, the updated path is stored in $new_path.
24173
24174  input_path="$new_path"
24175  # Check if we need to convert this using DOS-style short mode. If the path
24176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24177  # take no chances and rewrite it.
24178  # Note: m4 eats our [], so we need to use [ and ] instead.
24179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24180  if test "x$has_forbidden_chars" != x; then
24181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24185      # Going to short mode and back again did indeed matter. Since short mode is
24186      # case insensitive, let's make it lowercase to improve readability.
24187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24188      # Now convert it back to Unix-stile (cygpath)
24189      input_path=`$CYGPATH -u "$shortmode_path"`
24190      new_path="$input_path"
24191    fi
24192  fi
24193
24194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24195  if test "x$test_cygdrive_prefix" = x; then
24196    # As a simple fix, exclude /usr/bin since it's not a real path.
24197    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24199      # a path prefixed by /cygdrive for fixpath to work.
24200      new_path="$CYGWIN_ROOT_PATH$input_path"
24201    fi
24202  fi
24203
24204
24205  if test "x$path" != "x$new_path"; then
24206    BOOT_JDK="$new_path"
24207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24208$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24209  fi
24210
24211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24212
24213  path="$BOOT_JDK"
24214  has_colon=`$ECHO $path | $GREP ^.:`
24215  new_path="$path"
24216  if test "x$has_colon" = x; then
24217    # Not in mixed or Windows style, start by that.
24218    new_path=`cmd //c echo $path`
24219  fi
24220
24221
24222  input_path="$new_path"
24223  # Check if we need to convert this using DOS-style short mode. If the path
24224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24225  # take no chances and rewrite it.
24226  # Note: m4 eats our [], so we need to use [ and ] instead.
24227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24228  if test "x$has_forbidden_chars" != x; then
24229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24231  fi
24232
24233
24234  windows_path="$new_path"
24235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24236    unix_path=`$CYGPATH -u "$windows_path"`
24237    new_path="$unix_path"
24238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24240    new_path="$unix_path"
24241  fi
24242
24243  if test "x$path" != "x$new_path"; then
24244    BOOT_JDK="$new_path"
24245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24246$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24247  fi
24248
24249  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24250  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24251
24252  else
24253    # We're on a posix platform. Hooray! :)
24254    path="$BOOT_JDK"
24255    has_space=`$ECHO "$path" | $GREP " "`
24256    if test "x$has_space" != x; then
24257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24258$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24259      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24260    fi
24261
24262    # Use eval to expand a potential ~
24263    eval path="$path"
24264    if test ! -f "$path" && test ! -d "$path"; then
24265      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24266    fi
24267
24268    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24269  fi
24270
24271              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24272$as_echo_n "checking for Boot JDK... " >&6; }
24273              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24274$as_echo "$BOOT_JDK" >&6; }
24275              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24276$as_echo_n "checking Boot JDK version... " >&6; }
24277              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24278              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24279$as_echo "$BOOT_JDK_VERSION" >&6; }
24280            fi # end check jdk version
24281          fi # end check rt.jar
24282        fi # end check javac
24283      fi # end check java
24284    fi # end check boot jdk found
24285  fi
24286
24287    done
24288  fi
24289
24290
24291    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24292    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24293      # Do we have a bin/java?
24294      if test ! -x "$BOOT_JDK/bin/java"; then
24295        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24296$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24297        BOOT_JDK_FOUND=no
24298      else
24299        # Do we have a bin/javac?
24300        if test ! -x "$BOOT_JDK/bin/javac"; then
24301          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24302$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24303          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24304$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24305          BOOT_JDK_FOUND=no
24306        else
24307          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24308          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24309            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24310$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24311            BOOT_JDK_FOUND=no
24312          else
24313            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24314            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24315
24316            # Extra M4 quote needed to protect [] in grep expression.
24317            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24318            if test "x$FOUND_CORRECT_VERSION" = x; then
24319              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24320$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24321              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24322$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24323              BOOT_JDK_FOUND=no
24324            else
24325              # We're done! :-)
24326              BOOT_JDK_FOUND=yes
24327
24328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24329
24330  # Input might be given as Windows format, start by converting to
24331  # unix format.
24332  path="$BOOT_JDK"
24333  new_path=`$CYGPATH -u "$path"`
24334
24335  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24336  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24337  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24338  # "foo.exe" is OK but "foo" is an error.
24339  #
24340  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24341  # It is also a way to make sure we got the proper file name for the real test later on.
24342  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24343  if test "x$test_shortpath" = x; then
24344    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24345$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24346    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24347  fi
24348
24349  # Call helper function which possibly converts this using DOS-style short mode.
24350  # If so, the updated path is stored in $new_path.
24351
24352  input_path="$new_path"
24353  # Check if we need to convert this using DOS-style short mode. If the path
24354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24355  # take no chances and rewrite it.
24356  # Note: m4 eats our [], so we need to use [ and ] instead.
24357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24358  if test "x$has_forbidden_chars" != x; then
24359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24363      # Going to short mode and back again did indeed matter. Since short mode is
24364      # case insensitive, let's make it lowercase to improve readability.
24365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24366      # Now convert it back to Unix-stile (cygpath)
24367      input_path=`$CYGPATH -u "$shortmode_path"`
24368      new_path="$input_path"
24369    fi
24370  fi
24371
24372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24373  if test "x$test_cygdrive_prefix" = x; then
24374    # As a simple fix, exclude /usr/bin since it's not a real path.
24375    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24377      # a path prefixed by /cygdrive for fixpath to work.
24378      new_path="$CYGWIN_ROOT_PATH$input_path"
24379    fi
24380  fi
24381
24382
24383  if test "x$path" != "x$new_path"; then
24384    BOOT_JDK="$new_path"
24385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24386$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24387  fi
24388
24389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24390
24391  path="$BOOT_JDK"
24392  has_colon=`$ECHO $path | $GREP ^.:`
24393  new_path="$path"
24394  if test "x$has_colon" = x; then
24395    # Not in mixed or Windows style, start by that.
24396    new_path=`cmd //c echo $path`
24397  fi
24398
24399
24400  input_path="$new_path"
24401  # Check if we need to convert this using DOS-style short mode. If the path
24402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24403  # take no chances and rewrite it.
24404  # Note: m4 eats our [], so we need to use [ and ] instead.
24405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24406  if test "x$has_forbidden_chars" != x; then
24407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24408    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24409  fi
24410
24411
24412  windows_path="$new_path"
24413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24414    unix_path=`$CYGPATH -u "$windows_path"`
24415    new_path="$unix_path"
24416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24418    new_path="$unix_path"
24419  fi
24420
24421  if test "x$path" != "x$new_path"; then
24422    BOOT_JDK="$new_path"
24423    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24424$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24425  fi
24426
24427  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24428  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24429
24430  else
24431    # We're on a posix platform. Hooray! :)
24432    path="$BOOT_JDK"
24433    has_space=`$ECHO "$path" | $GREP " "`
24434    if test "x$has_space" != x; then
24435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24436$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24437      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24438    fi
24439
24440    # Use eval to expand a potential ~
24441    eval path="$path"
24442    if test ! -f "$path" && test ! -d "$path"; then
24443      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24444    fi
24445
24446    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24447  fi
24448
24449              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24450$as_echo_n "checking for Boot JDK... " >&6; }
24451              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24452$as_echo "$BOOT_JDK" >&6; }
24453              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24454$as_echo_n "checking Boot JDK version... " >&6; }
24455              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24456              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24457$as_echo "$BOOT_JDK_VERSION" >&6; }
24458            fi # end check jdk version
24459          fi # end check rt.jar
24460        fi # end check javac
24461      fi # end check java
24462    fi # end check boot jdk found
24463  fi
24464
24465  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24466
24467  if test "x$BOOT_JDK_FOUND" = xno; then
24468    # Now execute the test
24469
24470  BOOT_JDK_PREFIX="/usr/lib/jvm"
24471  BOOT_JDK_SUFFIX=""
24472  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24473  if test "x$ALL_JDKS_FOUND" != x; then
24474    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24475
24476  if test "x$BOOT_JDK_FOUND" = xno; then
24477    # Now execute the test
24478
24479        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24480        if test -d "$BOOT_JDK"; then
24481          BOOT_JDK_FOUND=maybe
24482          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24483$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24484        fi
24485
24486
24487    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24488    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24489      # Do we have a bin/java?
24490      if test ! -x "$BOOT_JDK/bin/java"; then
24491        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24492$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24493        BOOT_JDK_FOUND=no
24494      else
24495        # Do we have a bin/javac?
24496        if test ! -x "$BOOT_JDK/bin/javac"; then
24497          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24498$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24499          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24500$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24501          BOOT_JDK_FOUND=no
24502        else
24503          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24504          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24505            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24506$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24507            BOOT_JDK_FOUND=no
24508          else
24509            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24510            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24511
24512            # Extra M4 quote needed to protect [] in grep expression.
24513            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24514            if test "x$FOUND_CORRECT_VERSION" = x; then
24515              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24516$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24517              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24518$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24519              BOOT_JDK_FOUND=no
24520            else
24521              # We're done! :-)
24522              BOOT_JDK_FOUND=yes
24523
24524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24525
24526  # Input might be given as Windows format, start by converting to
24527  # unix format.
24528  path="$BOOT_JDK"
24529  new_path=`$CYGPATH -u "$path"`
24530
24531  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24532  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24533  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24534  # "foo.exe" is OK but "foo" is an error.
24535  #
24536  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24537  # It is also a way to make sure we got the proper file name for the real test later on.
24538  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24539  if test "x$test_shortpath" = x; then
24540    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24541$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24542    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24543  fi
24544
24545  # Call helper function which possibly converts this using DOS-style short mode.
24546  # If so, the updated path is stored in $new_path.
24547
24548  input_path="$new_path"
24549  # Check if we need to convert this using DOS-style short mode. If the path
24550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24551  # take no chances and rewrite it.
24552  # Note: m4 eats our [], so we need to use [ and ] instead.
24553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24554  if test "x$has_forbidden_chars" != x; then
24555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24556    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24557    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24558    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24559      # Going to short mode and back again did indeed matter. Since short mode is
24560      # case insensitive, let's make it lowercase to improve readability.
24561      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24562      # Now convert it back to Unix-stile (cygpath)
24563      input_path=`$CYGPATH -u "$shortmode_path"`
24564      new_path="$input_path"
24565    fi
24566  fi
24567
24568  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24569  if test "x$test_cygdrive_prefix" = x; then
24570    # As a simple fix, exclude /usr/bin since it's not a real path.
24571    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24572      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24573      # a path prefixed by /cygdrive for fixpath to work.
24574      new_path="$CYGWIN_ROOT_PATH$input_path"
24575    fi
24576  fi
24577
24578
24579  if test "x$path" != "x$new_path"; then
24580    BOOT_JDK="$new_path"
24581    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24582$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24583  fi
24584
24585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24586
24587  path="$BOOT_JDK"
24588  has_colon=`$ECHO $path | $GREP ^.:`
24589  new_path="$path"
24590  if test "x$has_colon" = x; then
24591    # Not in mixed or Windows style, start by that.
24592    new_path=`cmd //c echo $path`
24593  fi
24594
24595
24596  input_path="$new_path"
24597  # Check if we need to convert this using DOS-style short mode. If the path
24598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24599  # take no chances and rewrite it.
24600  # Note: m4 eats our [], so we need to use [ and ] instead.
24601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24602  if test "x$has_forbidden_chars" != x; then
24603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24604    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24605  fi
24606
24607
24608  windows_path="$new_path"
24609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24610    unix_path=`$CYGPATH -u "$windows_path"`
24611    new_path="$unix_path"
24612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24614    new_path="$unix_path"
24615  fi
24616
24617  if test "x$path" != "x$new_path"; then
24618    BOOT_JDK="$new_path"
24619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24620$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24621  fi
24622
24623  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24624  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24625
24626  else
24627    # We're on a posix platform. Hooray! :)
24628    path="$BOOT_JDK"
24629    has_space=`$ECHO "$path" | $GREP " "`
24630    if test "x$has_space" != x; then
24631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24632$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24633      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24634    fi
24635
24636    # Use eval to expand a potential ~
24637    eval path="$path"
24638    if test ! -f "$path" && test ! -d "$path"; then
24639      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24640    fi
24641
24642    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24643  fi
24644
24645              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24646$as_echo_n "checking for Boot JDK... " >&6; }
24647              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24648$as_echo "$BOOT_JDK" >&6; }
24649              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24650$as_echo_n "checking Boot JDK version... " >&6; }
24651              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24652              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24653$as_echo "$BOOT_JDK_VERSION" >&6; }
24654            fi # end check jdk version
24655          fi # end check rt.jar
24656        fi # end check javac
24657      fi # end check java
24658    fi # end check boot jdk found
24659  fi
24660
24661    done
24662  fi
24663
24664
24665    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24666    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24667      # Do we have a bin/java?
24668      if test ! -x "$BOOT_JDK/bin/java"; then
24669        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24670$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24671        BOOT_JDK_FOUND=no
24672      else
24673        # Do we have a bin/javac?
24674        if test ! -x "$BOOT_JDK/bin/javac"; then
24675          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24676$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24677          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24678$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24679          BOOT_JDK_FOUND=no
24680        else
24681          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24682          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24683            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24684$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24685            BOOT_JDK_FOUND=no
24686          else
24687            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24688            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24689
24690            # Extra M4 quote needed to protect [] in grep expression.
24691            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24692            if test "x$FOUND_CORRECT_VERSION" = x; then
24693              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24694$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24695              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24696$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24697              BOOT_JDK_FOUND=no
24698            else
24699              # We're done! :-)
24700              BOOT_JDK_FOUND=yes
24701
24702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24703
24704  # Input might be given as Windows format, start by converting to
24705  # unix format.
24706  path="$BOOT_JDK"
24707  new_path=`$CYGPATH -u "$path"`
24708
24709  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24710  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24711  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24712  # "foo.exe" is OK but "foo" is an error.
24713  #
24714  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24715  # It is also a way to make sure we got the proper file name for the real test later on.
24716  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24717  if test "x$test_shortpath" = x; then
24718    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24719$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24720    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24721  fi
24722
24723  # Call helper function which possibly converts this using DOS-style short mode.
24724  # If so, the updated path is stored in $new_path.
24725
24726  input_path="$new_path"
24727  # Check if we need to convert this using DOS-style short mode. If the path
24728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24729  # take no chances and rewrite it.
24730  # Note: m4 eats our [], so we need to use [ and ] instead.
24731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24732  if test "x$has_forbidden_chars" != x; then
24733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24734    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24735    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24736    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24737      # Going to short mode and back again did indeed matter. Since short mode is
24738      # case insensitive, let's make it lowercase to improve readability.
24739      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24740      # Now convert it back to Unix-stile (cygpath)
24741      input_path=`$CYGPATH -u "$shortmode_path"`
24742      new_path="$input_path"
24743    fi
24744  fi
24745
24746  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24747  if test "x$test_cygdrive_prefix" = x; then
24748    # As a simple fix, exclude /usr/bin since it's not a real path.
24749    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24750      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24751      # a path prefixed by /cygdrive for fixpath to work.
24752      new_path="$CYGWIN_ROOT_PATH$input_path"
24753    fi
24754  fi
24755
24756
24757  if test "x$path" != "x$new_path"; then
24758    BOOT_JDK="$new_path"
24759    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24760$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24761  fi
24762
24763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24764
24765  path="$BOOT_JDK"
24766  has_colon=`$ECHO $path | $GREP ^.:`
24767  new_path="$path"
24768  if test "x$has_colon" = x; then
24769    # Not in mixed or Windows style, start by that.
24770    new_path=`cmd //c echo $path`
24771  fi
24772
24773
24774  input_path="$new_path"
24775  # Check if we need to convert this using DOS-style short mode. If the path
24776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24777  # take no chances and rewrite it.
24778  # Note: m4 eats our [], so we need to use [ and ] instead.
24779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24780  if test "x$has_forbidden_chars" != x; then
24781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24783  fi
24784
24785
24786  windows_path="$new_path"
24787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24788    unix_path=`$CYGPATH -u "$windows_path"`
24789    new_path="$unix_path"
24790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24792    new_path="$unix_path"
24793  fi
24794
24795  if test "x$path" != "x$new_path"; then
24796    BOOT_JDK="$new_path"
24797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24798$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24799  fi
24800
24801  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24802  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24803
24804  else
24805    # We're on a posix platform. Hooray! :)
24806    path="$BOOT_JDK"
24807    has_space=`$ECHO "$path" | $GREP " "`
24808    if test "x$has_space" != x; then
24809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24810$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24811      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24812    fi
24813
24814    # Use eval to expand a potential ~
24815    eval path="$path"
24816    if test ! -f "$path" && test ! -d "$path"; then
24817      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24818    fi
24819
24820    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24821  fi
24822
24823              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24824$as_echo_n "checking for Boot JDK... " >&6; }
24825              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24826$as_echo "$BOOT_JDK" >&6; }
24827              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24828$as_echo_n "checking Boot JDK version... " >&6; }
24829              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24830              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24831$as_echo "$BOOT_JDK_VERSION" >&6; }
24832            fi # end check jdk version
24833          fi # end check rt.jar
24834        fi # end check javac
24835      fi # end check java
24836    fi # end check boot jdk found
24837  fi
24838
24839  fi
24840
24841
24842    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24843    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24844      # Do we have a bin/java?
24845      if test ! -x "$BOOT_JDK/bin/java"; then
24846        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24847$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24848        BOOT_JDK_FOUND=no
24849      else
24850        # Do we have a bin/javac?
24851        if test ! -x "$BOOT_JDK/bin/javac"; then
24852          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24853$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24854          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24855$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24856          BOOT_JDK_FOUND=no
24857        else
24858          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24859          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24860            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24861$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24862            BOOT_JDK_FOUND=no
24863          else
24864            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24865            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24866
24867            # Extra M4 quote needed to protect [] in grep expression.
24868            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24869            if test "x$FOUND_CORRECT_VERSION" = x; then
24870              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24871$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24872              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24873$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24874              BOOT_JDK_FOUND=no
24875            else
24876              # We're done! :-)
24877              BOOT_JDK_FOUND=yes
24878
24879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24880
24881  # Input might be given as Windows format, start by converting to
24882  # unix format.
24883  path="$BOOT_JDK"
24884  new_path=`$CYGPATH -u "$path"`
24885
24886  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24887  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24888  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24889  # "foo.exe" is OK but "foo" is an error.
24890  #
24891  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24892  # It is also a way to make sure we got the proper file name for the real test later on.
24893  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24894  if test "x$test_shortpath" = x; then
24895    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24896$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24897    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24898  fi
24899
24900  # Call helper function which possibly converts this using DOS-style short mode.
24901  # If so, the updated path is stored in $new_path.
24902
24903  input_path="$new_path"
24904  # Check if we need to convert this using DOS-style short mode. If the path
24905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24906  # take no chances and rewrite it.
24907  # Note: m4 eats our [], so we need to use [ and ] instead.
24908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24909  if test "x$has_forbidden_chars" != x; then
24910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24911    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24912    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24913    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24914      # Going to short mode and back again did indeed matter. Since short mode is
24915      # case insensitive, let's make it lowercase to improve readability.
24916      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24917      # Now convert it back to Unix-stile (cygpath)
24918      input_path=`$CYGPATH -u "$shortmode_path"`
24919      new_path="$input_path"
24920    fi
24921  fi
24922
24923  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24924  if test "x$test_cygdrive_prefix" = x; then
24925    # As a simple fix, exclude /usr/bin since it's not a real path.
24926    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24927      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24928      # a path prefixed by /cygdrive for fixpath to work.
24929      new_path="$CYGWIN_ROOT_PATH$input_path"
24930    fi
24931  fi
24932
24933
24934  if test "x$path" != "x$new_path"; then
24935    BOOT_JDK="$new_path"
24936    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24937$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24938  fi
24939
24940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24941
24942  path="$BOOT_JDK"
24943  has_colon=`$ECHO $path | $GREP ^.:`
24944  new_path="$path"
24945  if test "x$has_colon" = x; then
24946    # Not in mixed or Windows style, start by that.
24947    new_path=`cmd //c echo $path`
24948  fi
24949
24950
24951  input_path="$new_path"
24952  # Check if we need to convert this using DOS-style short mode. If the path
24953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24954  # take no chances and rewrite it.
24955  # Note: m4 eats our [], so we need to use [ and ] instead.
24956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24957  if test "x$has_forbidden_chars" != x; then
24958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24959    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24960  fi
24961
24962
24963  windows_path="$new_path"
24964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24965    unix_path=`$CYGPATH -u "$windows_path"`
24966    new_path="$unix_path"
24967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24969    new_path="$unix_path"
24970  fi
24971
24972  if test "x$path" != "x$new_path"; then
24973    BOOT_JDK="$new_path"
24974    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24975$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24976  fi
24977
24978  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24979  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24980
24981  else
24982    # We're on a posix platform. Hooray! :)
24983    path="$BOOT_JDK"
24984    has_space=`$ECHO "$path" | $GREP " "`
24985    if test "x$has_space" != x; then
24986      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24987$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24988      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24989    fi
24990
24991    # Use eval to expand a potential ~
24992    eval path="$path"
24993    if test ! -f "$path" && test ! -d "$path"; then
24994      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24995    fi
24996
24997    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24998  fi
24999
25000              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25001$as_echo_n "checking for Boot JDK... " >&6; }
25002              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25003$as_echo "$BOOT_JDK" >&6; }
25004              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25005$as_echo_n "checking Boot JDK version... " >&6; }
25006              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25007              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25008$as_echo "$BOOT_JDK_VERSION" >&6; }
25009            fi # end check jdk version
25010          fi # end check rt.jar
25011        fi # end check javac
25012      fi # end check java
25013    fi # end check boot jdk found
25014  fi
25015
25016
25017  # If we haven't found anything yet, we've truly lost. Give up.
25018  if test "x$BOOT_JDK_FOUND" = xno; then
25019
25020  # Print a helpful message on how to acquire the necessary build dependency.
25021  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25022  MISSING_DEPENDENCY=openjdk
25023
25024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25025    cygwin_help $MISSING_DEPENDENCY
25026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25027    msys_help $MISSING_DEPENDENCY
25028  else
25029    PKGHANDLER_COMMAND=
25030
25031    case $PKGHANDLER in
25032      apt-get)
25033        apt_help     $MISSING_DEPENDENCY ;;
25034      yum)
25035        yum_help     $MISSING_DEPENDENCY ;;
25036      port)
25037        port_help    $MISSING_DEPENDENCY ;;
25038      pkgutil)
25039        pkgutil_help $MISSING_DEPENDENCY ;;
25040      pkgadd)
25041        pkgadd_help  $MISSING_DEPENDENCY ;;
25042    esac
25043
25044    if test "x$PKGHANDLER_COMMAND" != x; then
25045      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25046    fi
25047  fi
25048
25049    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25050$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25051    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25052$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25053    as_fn_error $? "Cannot continue" "$LINENO" 5
25054  fi
25055
25056  # Setup proper paths for what we found
25057  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
25058  if test ! -f "$BOOT_RTJAR"; then
25059    # On MacOSX it is called classes.jar
25060    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
25061    if test -f "$BOOT_RTJAR"; then
25062      # Remove the ..
25063      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
25064    fi
25065  fi
25066  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
25067  BOOT_JDK="$BOOT_JDK"
25068
25069
25070
25071
25072  # Setup tools from the Boot JDK.
25073
25074  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25075
25076  # Publish this variable in the help.
25077
25078
25079  if test "x$JAVA" = x; then
25080    # The variable is not set by user, try to locate tool using the code snippet
25081
25082      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25083$as_echo_n "checking for java in Boot JDK... " >&6; }
25084      JAVA=$BOOT_JDK/bin/java
25085      if test ! -x $JAVA; then
25086        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25087$as_echo "not found" >&6; }
25088        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25089$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25090        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25091      fi
25092      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25093$as_echo "ok" >&6; }
25094
25095
25096  else
25097    # The variable is set, but is it from the command line or the environment?
25098
25099    # Try to remove the string !JAVA! from our list.
25100    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25101    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25102      # If it failed, the variable was not from the command line. Ignore it,
25103      # but warn the user (except for BASH, which is always set by the calling BASH).
25104      if test "xJAVA" != xBASH; then
25105        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25106$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25107      fi
25108      # Try to locate tool using the code snippet
25109
25110      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25111$as_echo_n "checking for java in Boot JDK... " >&6; }
25112      JAVA=$BOOT_JDK/bin/java
25113      if test ! -x $JAVA; then
25114        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25115$as_echo "not found" >&6; }
25116        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25117$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25118        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25119      fi
25120      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25121$as_echo "ok" >&6; }
25122
25123
25124    else
25125      # If it succeeded, then it was overridden by the user. We will use it
25126      # for the tool.
25127
25128      # First remove it from the list of overridden variables, so we can test
25129      # for unknown variables in the end.
25130      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25131
25132      # Check if the provided tool contains a complete path.
25133      tool_specified="$JAVA"
25134      tool_basename="${tool_specified##*/}"
25135      if test "x$tool_basename" = "x$tool_specified"; then
25136        # A command without a complete path is provided, search $PATH.
25137        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25138$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25139        # Extract the first word of "$tool_basename", so it can be a program name with args.
25140set dummy $tool_basename; ac_word=$2
25141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25142$as_echo_n "checking for $ac_word... " >&6; }
25143if ${ac_cv_path_JAVA+:} false; then :
25144  $as_echo_n "(cached) " >&6
25145else
25146  case $JAVA in
25147  [\\/]* | ?:[\\/]*)
25148  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25149  ;;
25150  *)
25151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25152for as_dir in $PATH
25153do
25154  IFS=$as_save_IFS
25155  test -z "$as_dir" && as_dir=.
25156    for ac_exec_ext in '' $ac_executable_extensions; do
25157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25158    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25160    break 2
25161  fi
25162done
25163  done
25164IFS=$as_save_IFS
25165
25166  ;;
25167esac
25168fi
25169JAVA=$ac_cv_path_JAVA
25170if test -n "$JAVA"; then
25171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25172$as_echo "$JAVA" >&6; }
25173else
25174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25175$as_echo "no" >&6; }
25176fi
25177
25178
25179        if test "x$JAVA" = x; then
25180          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25181        fi
25182      else
25183        # Otherwise we believe it is a complete path. Use it as it is.
25184        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25185$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25187$as_echo_n "checking for JAVA... " >&6; }
25188        if test ! -x "$tool_specified"; then
25189          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25190$as_echo "not found" >&6; }
25191          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25192        fi
25193        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25194$as_echo "$tool_specified" >&6; }
25195      fi
25196    fi
25197  fi
25198
25199
25200
25201  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25202
25203  # Publish this variable in the help.
25204
25205
25206  if test "x$JAVAC" = x; then
25207    # The variable is not set by user, try to locate tool using the code snippet
25208
25209      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25210$as_echo_n "checking for javac in Boot JDK... " >&6; }
25211      JAVAC=$BOOT_JDK/bin/javac
25212      if test ! -x $JAVAC; then
25213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25214$as_echo "not found" >&6; }
25215        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25216$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25217        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25218      fi
25219      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25220$as_echo "ok" >&6; }
25221
25222
25223  else
25224    # The variable is set, but is it from the command line or the environment?
25225
25226    # Try to remove the string !JAVAC! from our list.
25227    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25228    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25229      # If it failed, the variable was not from the command line. Ignore it,
25230      # but warn the user (except for BASH, which is always set by the calling BASH).
25231      if test "xJAVAC" != xBASH; then
25232        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25233$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25234      fi
25235      # Try to locate tool using the code snippet
25236
25237      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25238$as_echo_n "checking for javac in Boot JDK... " >&6; }
25239      JAVAC=$BOOT_JDK/bin/javac
25240      if test ! -x $JAVAC; then
25241        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25242$as_echo "not found" >&6; }
25243        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25244$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25245        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25246      fi
25247      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25248$as_echo "ok" >&6; }
25249
25250
25251    else
25252      # If it succeeded, then it was overridden by the user. We will use it
25253      # for the tool.
25254
25255      # First remove it from the list of overridden variables, so we can test
25256      # for unknown variables in the end.
25257      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25258
25259      # Check if the provided tool contains a complete path.
25260      tool_specified="$JAVAC"
25261      tool_basename="${tool_specified##*/}"
25262      if test "x$tool_basename" = "x$tool_specified"; then
25263        # A command without a complete path is provided, search $PATH.
25264        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25265$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25266        # Extract the first word of "$tool_basename", so it can be a program name with args.
25267set dummy $tool_basename; ac_word=$2
25268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25269$as_echo_n "checking for $ac_word... " >&6; }
25270if ${ac_cv_path_JAVAC+:} false; then :
25271  $as_echo_n "(cached) " >&6
25272else
25273  case $JAVAC in
25274  [\\/]* | ?:[\\/]*)
25275  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25276  ;;
25277  *)
25278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25279for as_dir in $PATH
25280do
25281  IFS=$as_save_IFS
25282  test -z "$as_dir" && as_dir=.
25283    for ac_exec_ext in '' $ac_executable_extensions; do
25284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25285    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25287    break 2
25288  fi
25289done
25290  done
25291IFS=$as_save_IFS
25292
25293  ;;
25294esac
25295fi
25296JAVAC=$ac_cv_path_JAVAC
25297if test -n "$JAVAC"; then
25298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25299$as_echo "$JAVAC" >&6; }
25300else
25301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25302$as_echo "no" >&6; }
25303fi
25304
25305
25306        if test "x$JAVAC" = x; then
25307          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25308        fi
25309      else
25310        # Otherwise we believe it is a complete path. Use it as it is.
25311        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25312$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25313        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25314$as_echo_n "checking for JAVAC... " >&6; }
25315        if test ! -x "$tool_specified"; then
25316          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25317$as_echo "not found" >&6; }
25318          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25319        fi
25320        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25321$as_echo "$tool_specified" >&6; }
25322      fi
25323    fi
25324  fi
25325
25326
25327
25328  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25329
25330  # Publish this variable in the help.
25331
25332
25333  if test "x$JAVAH" = x; then
25334    # The variable is not set by user, try to locate tool using the code snippet
25335
25336      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25337$as_echo_n "checking for javah in Boot JDK... " >&6; }
25338      JAVAH=$BOOT_JDK/bin/javah
25339      if test ! -x $JAVAH; then
25340        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25341$as_echo "not found" >&6; }
25342        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25343$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25344        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25345      fi
25346      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25347$as_echo "ok" >&6; }
25348
25349
25350  else
25351    # The variable is set, but is it from the command line or the environment?
25352
25353    # Try to remove the string !JAVAH! from our list.
25354    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25355    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25356      # If it failed, the variable was not from the command line. Ignore it,
25357      # but warn the user (except for BASH, which is always set by the calling BASH).
25358      if test "xJAVAH" != xBASH; then
25359        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25360$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25361      fi
25362      # Try to locate tool using the code snippet
25363
25364      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25365$as_echo_n "checking for javah in Boot JDK... " >&6; }
25366      JAVAH=$BOOT_JDK/bin/javah
25367      if test ! -x $JAVAH; then
25368        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25369$as_echo "not found" >&6; }
25370        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25371$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25372        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25373      fi
25374      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25375$as_echo "ok" >&6; }
25376
25377
25378    else
25379      # If it succeeded, then it was overridden by the user. We will use it
25380      # for the tool.
25381
25382      # First remove it from the list of overridden variables, so we can test
25383      # for unknown variables in the end.
25384      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25385
25386      # Check if the provided tool contains a complete path.
25387      tool_specified="$JAVAH"
25388      tool_basename="${tool_specified##*/}"
25389      if test "x$tool_basename" = "x$tool_specified"; then
25390        # A command without a complete path is provided, search $PATH.
25391        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25392$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25393        # Extract the first word of "$tool_basename", so it can be a program name with args.
25394set dummy $tool_basename; ac_word=$2
25395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25396$as_echo_n "checking for $ac_word... " >&6; }
25397if ${ac_cv_path_JAVAH+:} false; then :
25398  $as_echo_n "(cached) " >&6
25399else
25400  case $JAVAH in
25401  [\\/]* | ?:[\\/]*)
25402  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25403  ;;
25404  *)
25405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25406for as_dir in $PATH
25407do
25408  IFS=$as_save_IFS
25409  test -z "$as_dir" && as_dir=.
25410    for ac_exec_ext in '' $ac_executable_extensions; do
25411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25412    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25414    break 2
25415  fi
25416done
25417  done
25418IFS=$as_save_IFS
25419
25420  ;;
25421esac
25422fi
25423JAVAH=$ac_cv_path_JAVAH
25424if test -n "$JAVAH"; then
25425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25426$as_echo "$JAVAH" >&6; }
25427else
25428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25429$as_echo "no" >&6; }
25430fi
25431
25432
25433        if test "x$JAVAH" = x; then
25434          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25435        fi
25436      else
25437        # Otherwise we believe it is a complete path. Use it as it is.
25438        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25439$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25440        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25441$as_echo_n "checking for JAVAH... " >&6; }
25442        if test ! -x "$tool_specified"; then
25443          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25444$as_echo "not found" >&6; }
25445          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25446        fi
25447        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25448$as_echo "$tool_specified" >&6; }
25449      fi
25450    fi
25451  fi
25452
25453
25454
25455  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25456
25457  # Publish this variable in the help.
25458
25459
25460  if test "x$JAR" = x; then
25461    # The variable is not set by user, try to locate tool using the code snippet
25462
25463      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25464$as_echo_n "checking for jar in Boot JDK... " >&6; }
25465      JAR=$BOOT_JDK/bin/jar
25466      if test ! -x $JAR; then
25467        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25468$as_echo "not found" >&6; }
25469        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25470$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25471        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25472      fi
25473      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25474$as_echo "ok" >&6; }
25475
25476
25477  else
25478    # The variable is set, but is it from the command line or the environment?
25479
25480    # Try to remove the string !JAR! from our list.
25481    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25482    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25483      # If it failed, the variable was not from the command line. Ignore it,
25484      # but warn the user (except for BASH, which is always set by the calling BASH).
25485      if test "xJAR" != xBASH; then
25486        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25487$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25488      fi
25489      # Try to locate tool using the code snippet
25490
25491      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25492$as_echo_n "checking for jar in Boot JDK... " >&6; }
25493      JAR=$BOOT_JDK/bin/jar
25494      if test ! -x $JAR; then
25495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25496$as_echo "not found" >&6; }
25497        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25498$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25499        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25500      fi
25501      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25502$as_echo "ok" >&6; }
25503
25504
25505    else
25506      # If it succeeded, then it was overridden by the user. We will use it
25507      # for the tool.
25508
25509      # First remove it from the list of overridden variables, so we can test
25510      # for unknown variables in the end.
25511      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25512
25513      # Check if the provided tool contains a complete path.
25514      tool_specified="$JAR"
25515      tool_basename="${tool_specified##*/}"
25516      if test "x$tool_basename" = "x$tool_specified"; then
25517        # A command without a complete path is provided, search $PATH.
25518        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25519$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25520        # Extract the first word of "$tool_basename", so it can be a program name with args.
25521set dummy $tool_basename; ac_word=$2
25522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25523$as_echo_n "checking for $ac_word... " >&6; }
25524if ${ac_cv_path_JAR+:} false; then :
25525  $as_echo_n "(cached) " >&6
25526else
25527  case $JAR in
25528  [\\/]* | ?:[\\/]*)
25529  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25530  ;;
25531  *)
25532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25533for as_dir in $PATH
25534do
25535  IFS=$as_save_IFS
25536  test -z "$as_dir" && as_dir=.
25537    for ac_exec_ext in '' $ac_executable_extensions; do
25538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25539    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25541    break 2
25542  fi
25543done
25544  done
25545IFS=$as_save_IFS
25546
25547  ;;
25548esac
25549fi
25550JAR=$ac_cv_path_JAR
25551if test -n "$JAR"; then
25552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25553$as_echo "$JAR" >&6; }
25554else
25555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25556$as_echo "no" >&6; }
25557fi
25558
25559
25560        if test "x$JAR" = x; then
25561          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25562        fi
25563      else
25564        # Otherwise we believe it is a complete path. Use it as it is.
25565        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25566$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25567        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25568$as_echo_n "checking for JAR... " >&6; }
25569        if test ! -x "$tool_specified"; then
25570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25571$as_echo "not found" >&6; }
25572          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25573        fi
25574        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25575$as_echo "$tool_specified" >&6; }
25576      fi
25577    fi
25578  fi
25579
25580
25581
25582  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25583
25584  # Publish this variable in the help.
25585
25586
25587  if test "x$NATIVE2ASCII" = x; then
25588    # The variable is not set by user, try to locate tool using the code snippet
25589
25590      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25591$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25592      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25593      if test ! -x $NATIVE2ASCII; then
25594        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25595$as_echo "not found" >&6; }
25596        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25597$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25598        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25599      fi
25600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25601$as_echo "ok" >&6; }
25602
25603
25604  else
25605    # The variable is set, but is it from the command line or the environment?
25606
25607    # Try to remove the string !NATIVE2ASCII! from our list.
25608    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25609    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25610      # If it failed, the variable was not from the command line. Ignore it,
25611      # but warn the user (except for BASH, which is always set by the calling BASH).
25612      if test "xNATIVE2ASCII" != xBASH; then
25613        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25614$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25615      fi
25616      # Try to locate tool using the code snippet
25617
25618      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25619$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25620      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25621      if test ! -x $NATIVE2ASCII; then
25622        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25623$as_echo "not found" >&6; }
25624        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25625$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25626        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25627      fi
25628      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25629$as_echo "ok" >&6; }
25630
25631
25632    else
25633      # If it succeeded, then it was overridden by the user. We will use it
25634      # for the tool.
25635
25636      # First remove it from the list of overridden variables, so we can test
25637      # for unknown variables in the end.
25638      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25639
25640      # Check if the provided tool contains a complete path.
25641      tool_specified="$NATIVE2ASCII"
25642      tool_basename="${tool_specified##*/}"
25643      if test "x$tool_basename" = "x$tool_specified"; then
25644        # A command without a complete path is provided, search $PATH.
25645        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25646$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25647        # Extract the first word of "$tool_basename", so it can be a program name with args.
25648set dummy $tool_basename; ac_word=$2
25649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25650$as_echo_n "checking for $ac_word... " >&6; }
25651if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25652  $as_echo_n "(cached) " >&6
25653else
25654  case $NATIVE2ASCII in
25655  [\\/]* | ?:[\\/]*)
25656  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25657  ;;
25658  *)
25659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25660for as_dir in $PATH
25661do
25662  IFS=$as_save_IFS
25663  test -z "$as_dir" && as_dir=.
25664    for ac_exec_ext in '' $ac_executable_extensions; do
25665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25666    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25668    break 2
25669  fi
25670done
25671  done
25672IFS=$as_save_IFS
25673
25674  ;;
25675esac
25676fi
25677NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25678if test -n "$NATIVE2ASCII"; then
25679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25680$as_echo "$NATIVE2ASCII" >&6; }
25681else
25682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25683$as_echo "no" >&6; }
25684fi
25685
25686
25687        if test "x$NATIVE2ASCII" = x; then
25688          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25689        fi
25690      else
25691        # Otherwise we believe it is a complete path. Use it as it is.
25692        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25693$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25694        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25695$as_echo_n "checking for NATIVE2ASCII... " >&6; }
25696        if test ! -x "$tool_specified"; then
25697          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25698$as_echo "not found" >&6; }
25699          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25700        fi
25701        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25702$as_echo "$tool_specified" >&6; }
25703      fi
25704    fi
25705  fi
25706
25707
25708
25709  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25710
25711  # Publish this variable in the help.
25712
25713
25714  if test "x$JARSIGNER" = x; then
25715    # The variable is not set by user, try to locate tool using the code snippet
25716
25717      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25718$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25719      JARSIGNER=$BOOT_JDK/bin/jarsigner
25720      if test ! -x $JARSIGNER; then
25721        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25722$as_echo "not found" >&6; }
25723        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25724$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25725        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25726      fi
25727      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25728$as_echo "ok" >&6; }
25729
25730
25731  else
25732    # The variable is set, but is it from the command line or the environment?
25733
25734    # Try to remove the string !JARSIGNER! from our list.
25735    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
25736    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25737      # If it failed, the variable was not from the command line. Ignore it,
25738      # but warn the user (except for BASH, which is always set by the calling BASH).
25739      if test "xJARSIGNER" != xBASH; then
25740        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
25741$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
25742      fi
25743      # Try to locate tool using the code snippet
25744
25745      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25746$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25747      JARSIGNER=$BOOT_JDK/bin/jarsigner
25748      if test ! -x $JARSIGNER; then
25749        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25750$as_echo "not found" >&6; }
25751        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25752$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25753        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25754      fi
25755      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25756$as_echo "ok" >&6; }
25757
25758
25759    else
25760      # If it succeeded, then it was overridden by the user. We will use it
25761      # for the tool.
25762
25763      # First remove it from the list of overridden variables, so we can test
25764      # for unknown variables in the end.
25765      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25766
25767      # Check if the provided tool contains a complete path.
25768      tool_specified="$JARSIGNER"
25769      tool_basename="${tool_specified##*/}"
25770      if test "x$tool_basename" = "x$tool_specified"; then
25771        # A command without a complete path is provided, search $PATH.
25772        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
25773$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
25774        # Extract the first word of "$tool_basename", so it can be a program name with args.
25775set dummy $tool_basename; ac_word=$2
25776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25777$as_echo_n "checking for $ac_word... " >&6; }
25778if ${ac_cv_path_JARSIGNER+:} false; then :
25779  $as_echo_n "(cached) " >&6
25780else
25781  case $JARSIGNER in
25782  [\\/]* | ?:[\\/]*)
25783  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
25784  ;;
25785  *)
25786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25787for as_dir in $PATH
25788do
25789  IFS=$as_save_IFS
25790  test -z "$as_dir" && as_dir=.
25791    for ac_exec_ext in '' $ac_executable_extensions; do
25792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25793    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
25794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25795    break 2
25796  fi
25797done
25798  done
25799IFS=$as_save_IFS
25800
25801  ;;
25802esac
25803fi
25804JARSIGNER=$ac_cv_path_JARSIGNER
25805if test -n "$JARSIGNER"; then
25806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
25807$as_echo "$JARSIGNER" >&6; }
25808else
25809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25810$as_echo "no" >&6; }
25811fi
25812
25813
25814        if test "x$JARSIGNER" = x; then
25815          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25816        fi
25817      else
25818        # Otherwise we believe it is a complete path. Use it as it is.
25819        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
25820$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
25821        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
25822$as_echo_n "checking for JARSIGNER... " >&6; }
25823        if test ! -x "$tool_specified"; then
25824          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25825$as_echo "not found" >&6; }
25826          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
25827        fi
25828        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25829$as_echo "$tool_specified" >&6; }
25830      fi
25831    fi
25832  fi
25833
25834
25835
25836  # Finally, set some other options...
25837
25838  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
25839  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
25840
25841
25842
25843
25844  ##############################################################################
25845  #
25846  # Specify jvm options for anything that is run with the Boot JDK.
25847  # Not all JVM:s accept the same arguments on the command line.
25848  #
25849
25850# Check whether --with-boot-jdk-jvmargs was given.
25851if test "${with_boot_jdk_jvmargs+set}" = set; then :
25852  withval=$with_boot_jdk_jvmargs;
25853fi
25854
25855
25856  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
25857$as_echo_n "checking flags for boot jdk java command ... " >&6; }
25858
25859  # Starting amount of heap memory.
25860
25861  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
25862  $ECHO "Command: $JAVA -Xms64M -version" >&5
25863  OUTPUT=`$JAVA -Xms64M -version 2>&1`
25864  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25865  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25866  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25867    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
25868    JVM_ARG_OK=true
25869  else
25870    $ECHO "Arg failed:" >&5
25871    $ECHO "$OUTPUT" >&5
25872    JVM_ARG_OK=false
25873  fi
25874
25875
25876  # Maximum amount of heap memory.
25877  # Maximum stack size.
25878  if test "x$BUILD_NUM_BITS" = x32; then
25879    JVM_MAX_HEAP=1100M
25880    STACK_SIZE=768
25881  else
25882    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
25883    # pointers are used. Apparently, we need to increase the heap and stack
25884    # space for the jvm. More specifically, when running javac to build huge
25885    # jdk batch
25886    JVM_MAX_HEAP=1600M
25887    STACK_SIZE=1536
25888  fi
25889
25890  $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
25891  $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
25892  OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
25893  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25894  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25895  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25896    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx$JVM_MAX_HEAP"
25897    JVM_ARG_OK=true
25898  else
25899    $ECHO "Arg failed:" >&5
25900    $ECHO "$OUTPUT" >&5
25901    JVM_ARG_OK=false
25902  fi
25903
25904
25905  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
25906  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
25907  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
25908  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25909  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25910  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25911    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
25912    JVM_ARG_OK=true
25913  else
25914    $ECHO "Arg failed:" >&5
25915    $ECHO "$OUTPUT" >&5
25916    JVM_ARG_OK=false
25917  fi
25918
25919
25920  # Disable special log output when a debug build is used as Boot JDK...
25921
25922  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
25923  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
25924  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
25925  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25926  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25927  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25928    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
25929    JVM_ARG_OK=true
25930  else
25931    $ECHO "Arg failed:" >&5
25932    $ECHO "$OUTPUT" >&5
25933    JVM_ARG_OK=false
25934  fi
25935
25936
25937  # Apply user provided options.
25938
25939  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
25940  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
25941  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
25942  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25943  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25944  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25945    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
25946    JVM_ARG_OK=true
25947  else
25948    $ECHO "Arg failed:" >&5
25949    $ECHO "$OUTPUT" >&5
25950    JVM_ARG_OK=false
25951  fi
25952
25953
25954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
25955$as_echo "$boot_jdk_jvmargs" >&6; }
25956
25957  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
25958  JAVA_FLAGS=$boot_jdk_jvmargs
25959
25960  BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
25961
25962  JAVA_FLAGS=$JAVA_FLAGS
25963
25964
25965
25966###############################################################################
25967#
25968# Configure the sources to use. We can add or override individual directories.
25969#
25970###############################################################################
25971
25972
25973  # Where are the sources. Any of these can be overridden
25974  # using --with-override-corba and the likes.
25975  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
25976  CORBA_TOPDIR="$SRC_ROOT/corba"
25977  JAXP_TOPDIR="$SRC_ROOT/jaxp"
25978  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
25979  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
25980  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
25981  JDK_TOPDIR="$SRC_ROOT/jdk"
25982
25983
25984
25985
25986
25987
25988
25989
25990
25991
25992  ###############################################################################
25993  #
25994  # Pickup additional source for a component from outside of the source root
25995  # or override source for a component.
25996  #
25997
25998# Check whether --with-add-source-root was given.
25999if test "${with_add_source_root+set}" = set; then :
26000  withval=$with_add_source_root;
26001fi
26002
26003
26004
26005# Check whether --with-override-source-root was given.
26006if test "${with_override_source_root+set}" = set; then :
26007  withval=$with_override_source_root;
26008fi
26009
26010
26011
26012# Check whether --with-adds-and-overrides was given.
26013if test "${with_adds_and_overrides+set}" = set; then :
26014  withval=$with_adds_and_overrides;
26015fi
26016
26017
26018  if test "x$with_adds_and_overrides" != x; then
26019    with_add_source_root="$with_adds_and_overrides/adds"
26020    with_override_source_root="$with_adds_and_overrides/overrides"
26021  fi
26022
26023  if test "x$with_add_source_root" != x; then
26024    if ! test -d $with_add_source_root; then
26025      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26026    fi
26027    CURDIR="$PWD"
26028    cd "$with_add_source_root"
26029    ADD_SRC_ROOT="`pwd`"
26030    cd "$CURDIR"
26031    # Verify that the addon source root does not have any root makefiles.
26032    # If it does, then it is usually an error, prevent this.
26033    if test -f $with_add_source_root/langtools/make/Makefile; then
26034      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
26035    fi
26036    if test -f $with_add_source_root/corba/make/Makefile; then
26037      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
26038    fi
26039    if test -f $with_add_source_root/jaxp/make/Makefile; then
26040      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
26041    fi
26042    if test -f $with_add_source_root/jaxws/make/Makefile; then
26043      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
26044    fi
26045    if test -f $with_add_source_root/hotspot/make/Makefile; then
26046      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
26047    fi
26048    if test -f $with_add_source_root/nashorn/make/Makefile; then
26049      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
26050    fi
26051    if test -f $with_add_source_root/jdk/make/Makefile; then
26052      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
26053    fi
26054  fi
26055
26056
26057  if test "x$with_override_source_root" != x; then
26058    if ! test -d $with_override_source_root; then
26059      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26060    fi
26061    CURDIR="$PWD"
26062    cd "$with_override_source_root"
26063    OVERRIDE_SRC_ROOT="`pwd`"
26064    cd "$CURDIR"
26065    if test -f $with_override_source_root/langtools/make/Makefile; then
26066      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
26067    fi
26068    if test -f $with_override_source_root/corba/make/Makefile; then
26069      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
26070    fi
26071    if test -f $with_override_source_root/jaxp/make/Makefile; then
26072      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
26073    fi
26074    if test -f $with_override_source_root/jaxws/make/Makefile; then
26075      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
26076    fi
26077    if test -f $with_override_source_root/hotspot/make/Makefile; then
26078      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
26079    fi
26080    if test -f $with_override_source_root/nashorn/make/Makefile; then
26081      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
26082    fi
26083    if test -f $with_override_source_root/jdk/make/Makefile; then
26084      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
26085    fi
26086  fi
26087
26088
26089  ###############################################################################
26090  #
26091  # Override a repo completely, this is used for example when you have 3 small
26092  # development sandboxes of the langtools sources and want to avoid having 3 full
26093  # OpenJDK sources checked out on disk.
26094  #
26095  # Assuming that the 3 langtools sandboxes are located here:
26096  # /home/fredrik/sandbox1/langtools
26097  # /home/fredrik/sandbox2/langtools
26098  # /home/fredrik/sandbox3/langtools
26099  #
26100  # From the source root you create build subdirs manually:
26101  #     mkdir -p build1 build2 build3
26102  # in each build directory run:
26103  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26104  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26105  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26106  #
26107
26108
26109# Check whether --with-override-langtools was given.
26110if test "${with_override_langtools+set}" = set; then :
26111  withval=$with_override_langtools;
26112fi
26113
26114
26115
26116# Check whether --with-override-corba was given.
26117if test "${with_override_corba+set}" = set; then :
26118  withval=$with_override_corba;
26119fi
26120
26121
26122
26123# Check whether --with-override-jaxp was given.
26124if test "${with_override_jaxp+set}" = set; then :
26125  withval=$with_override_jaxp;
26126fi
26127
26128
26129
26130# Check whether --with-override-jaxws was given.
26131if test "${with_override_jaxws+set}" = set; then :
26132  withval=$with_override_jaxws;
26133fi
26134
26135
26136
26137# Check whether --with-override-hotspot was given.
26138if test "${with_override_hotspot+set}" = set; then :
26139  withval=$with_override_hotspot;
26140fi
26141
26142
26143
26144# Check whether --with-override-nashorn was given.
26145if test "${with_override_nashorn+set}" = set; then :
26146  withval=$with_override_nashorn;
26147fi
26148
26149
26150
26151# Check whether --with-override-jdk was given.
26152if test "${with_override_jdk+set}" = set; then :
26153  withval=$with_override_jdk;
26154fi
26155
26156
26157  if test "x$with_override_langtools" != x; then
26158    CURDIR="$PWD"
26159    cd "$with_override_langtools"
26160    LANGTOOLS_TOPDIR="`pwd`"
26161    cd "$CURDIR"
26162    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26163      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26164    fi
26165    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26166$as_echo_n "checking if langtools should be overridden... " >&6; }
26167    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26168$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26169  fi
26170  if test "x$with_override_corba" != x; then
26171    CURDIR="$PWD"
26172    cd "$with_override_corba"
26173    CORBA_TOPDIR="`pwd`"
26174    cd "$CURDIR"
26175    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26176      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26177    fi
26178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26179$as_echo_n "checking if corba should be overridden... " >&6; }
26180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26181$as_echo "yes with $CORBA_TOPDIR" >&6; }
26182  fi
26183  if test "x$with_override_jaxp" != x; then
26184    CURDIR="$PWD"
26185    cd "$with_override_jaxp"
26186    JAXP_TOPDIR="`pwd`"
26187    cd "$CURDIR"
26188    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26189      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26190    fi
26191    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26192$as_echo_n "checking if jaxp should be overridden... " >&6; }
26193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26194$as_echo "yes with $JAXP_TOPDIR" >&6; }
26195  fi
26196  if test "x$with_override_jaxws" != x; then
26197    CURDIR="$PWD"
26198    cd "$with_override_jaxws"
26199    JAXWS_TOPDIR="`pwd`"
26200    cd "$CURDIR"
26201    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26202      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26203    fi
26204    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26205$as_echo_n "checking if jaxws should be overridden... " >&6; }
26206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26207$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26208  fi
26209  if test "x$with_override_hotspot" != x; then
26210    CURDIR="$PWD"
26211    cd "$with_override_hotspot"
26212    HOTSPOT_TOPDIR="`pwd`"
26213    cd "$CURDIR"
26214    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26215      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26216    fi
26217    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26218$as_echo_n "checking if hotspot should be overridden... " >&6; }
26219    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26220$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26221  fi
26222  if test "x$with_override_nashorn" != x; then
26223    CURDIR="$PWD"
26224    cd "$with_override_nashorn"
26225    NASHORN_TOPDIR="`pwd`"
26226    cd "$CURDIR"
26227    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26228      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26229    fi
26230    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26231$as_echo_n "checking if nashorn should be overridden... " >&6; }
26232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26233$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26234  fi
26235  if test "x$with_override_jdk" != x; then
26236    CURDIR="$PWD"
26237    cd "$with_override_jdk"
26238    JDK_TOPDIR="`pwd`"
26239    cd "$CURDIR"
26240    if ! test -f $JDK_TOPDIR/make/Makefile; then
26241      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26242    fi
26243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26244$as_echo_n "checking if JDK should be overridden... " >&6; }
26245    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26246$as_echo "yes with $JDK_TOPDIR" >&6; }
26247  fi
26248
26249
26250  BUILD_OUTPUT="$OUTPUT_ROOT"
26251
26252
26253  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26254  BUILD_HOTSPOT=true
26255
26256
26257
26258# Check whether --with-import-hotspot was given.
26259if test "${with_import_hotspot+set}" = set; then :
26260  withval=$with_import_hotspot;
26261fi
26262
26263  if test "x$with_import_hotspot" != x; then
26264    CURDIR="$PWD"
26265    cd "$with_import_hotspot"
26266    HOTSPOT_DIST="`pwd`"
26267    cd "$CURDIR"
26268    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26269      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26270    fi
26271    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26272$as_echo_n "checking if hotspot should be imported... " >&6; }
26273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26274$as_echo "yes from $HOTSPOT_DIST" >&6; }
26275    BUILD_HOTSPOT=false
26276  fi
26277
26278  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26279
26280
26281###############################################################################
26282#
26283# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26284# native code.
26285#
26286###############################################################################
26287
26288# First determine the toolchain type (compiler family)
26289
26290
26291# Check whether --with-toolchain-type was given.
26292if test "${with_toolchain_type+set}" = set; then :
26293  withval=$with_toolchain_type;
26294fi
26295
26296
26297  # Use indirect variable referencing
26298  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26299  VALID_TOOLCHAINS=${!toolchain_var_name}
26300
26301  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26302    # On Mac OS X, default toolchain to clang after Xcode 5
26303    XCODE_VERSION_OUTPUT=`xcodebuild -version 2>&1 | $HEAD -n 1`
26304    $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26305    if test $? -ne 0; then
26306      as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26307    fi
26308    XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26309        $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26310        $CUT -f 1 -d .`
26311    { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26312$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26313    if test $XCODE_MAJOR_VERSION -ge 5; then
26314        DEFAULT_TOOLCHAIN="clang"
26315    else
26316        DEFAULT_TOOLCHAIN="gcc"
26317    fi
26318  else
26319    # First toolchain type in the list is the default
26320    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26321  fi
26322
26323  if test "x$with_toolchain_type" = xlist; then
26324    # List all toolchains
26325    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26326$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26327    for toolchain in $VALID_TOOLCHAINS; do
26328      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26329      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26330      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26331    done
26332
26333    exit 0
26334  elif test "x$with_toolchain_type" != x; then
26335    # User override; check that it is valid
26336    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26337      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26338$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26339      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26340$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26341      as_fn_error $? "Cannot continue." "$LINENO" 5
26342    fi
26343    TOOLCHAIN_TYPE=$with_toolchain_type
26344  else
26345    # No flag given, use default
26346    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26347  fi
26348
26349
26350  TOOLCHAIN_CC_BINARY_clang="clang"
26351  TOOLCHAIN_CC_BINARY_gcc="gcc"
26352  TOOLCHAIN_CC_BINARY_microsoft="cl"
26353  TOOLCHAIN_CC_BINARY_solstudio="cc"
26354  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26355
26356  TOOLCHAIN_CXX_BINARY_clang="clang++"
26357  TOOLCHAIN_CXX_BINARY_gcc="g++"
26358  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26359  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26360  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26361
26362  # Use indirect variable referencing
26363  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26364  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26365  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26366  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26367  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26368  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26369
26370
26371  # Define filename patterns
26372  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26373    LIBRARY_PREFIX=
26374    SHARED_LIBRARY_SUFFIX='.dll'
26375    STATIC_LIBRARY_SUFFIX='.lib'
26376    SHARED_LIBRARY='$1.dll'
26377    STATIC_LIBRARY='$1.lib'
26378    OBJ_SUFFIX='.obj'
26379    EXE_SUFFIX='.exe'
26380  else
26381    LIBRARY_PREFIX=lib
26382    SHARED_LIBRARY_SUFFIX='.so'
26383    STATIC_LIBRARY_SUFFIX='.a'
26384    SHARED_LIBRARY='lib$1.so'
26385    STATIC_LIBRARY='lib$1.a'
26386    OBJ_SUFFIX='.o'
26387    EXE_SUFFIX=''
26388    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26389      SHARED_LIBRARY='lib$1.dylib'
26390      SHARED_LIBRARY_SUFFIX='.dylib'
26391    fi
26392  fi
26393
26394
26395
26396
26397
26398
26399
26400
26401
26402
26403  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26404    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26405$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26406  else
26407    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26408$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26409  fi
26410
26411
26412# Then detect the actual binaries needed
26413
26414  # FIXME: Is this needed?
26415  ac_ext=cpp
26416ac_cpp='$CXXCPP $CPPFLAGS'
26417ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26418ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26419ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26420
26421
26422  # Store the CFLAGS etc passed to the configure script.
26423  ORG_CFLAGS="$CFLAGS"
26424  ORG_CXXFLAGS="$CXXFLAGS"
26425  ORG_OBJCFLAGS="$OBJCFLAGS"
26426
26427  # On Windows, we need to detect the visual studio installation first.
26428  # This will change the PATH, but we need to keep that new PATH even
26429  # after toolchain detection is done, since the compiler (on x86) uses
26430  # it for DLL resolution in runtime.
26431  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26432
26433  # Store path to cygwin link.exe to help excluding it when searching for
26434  # VS linker. This must be done before changing the PATH when looking for VS.
26435  # Extract the first word of "link", so it can be a program name with args.
26436set dummy link; ac_word=$2
26437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26438$as_echo_n "checking for $ac_word... " >&6; }
26439if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26440  $as_echo_n "(cached) " >&6
26441else
26442  case $CYGWIN_LINK in
26443  [\\/]* | ?:[\\/]*)
26444  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26445  ;;
26446  *)
26447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26448for as_dir in $PATH
26449do
26450  IFS=$as_save_IFS
26451  test -z "$as_dir" && as_dir=.
26452    for ac_exec_ext in '' $ac_executable_extensions; do
26453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26454    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26456    break 2
26457  fi
26458done
26459  done
26460IFS=$as_save_IFS
26461
26462  ;;
26463esac
26464fi
26465CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26466if test -n "$CYGWIN_LINK"; then
26467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26468$as_echo "$CYGWIN_LINK" >&6; }
26469else
26470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26471$as_echo "no" >&6; }
26472fi
26473
26474
26475  if test "x$CYGWIN_LINK" != x; then
26476    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26477$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26478    "$CYGWIN_LINK" --version > /dev/null
26479    if test $? -eq 0 ; then
26480      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26481$as_echo "yes" >&6; }
26482    else
26483      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26484$as_echo "no" >&6; }
26485      # This might be the VS linker. Don't exclude it later on.
26486      CYGWIN_LINK=""
26487    fi
26488  fi
26489
26490  # First-hand choice is to locate and run the vsvars bat file.
26491
26492  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26493    VCVARSFILE="vc/bin/vcvars32.bat"
26494  else
26495    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26496  fi
26497
26498  VS_ENV_CMD=""
26499  VS_ENV_ARGS=""
26500  if test "x$with_toolsdir" != x; then
26501
26502  if test "x$VS_ENV_CMD" = x; then
26503    VS100BASE="$with_toolsdir/../.."
26504    METHOD="--with-tools-dir"
26505
26506  windows_path="$VS100BASE"
26507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26508    unix_path=`$CYGPATH -u "$windows_path"`
26509    VS100BASE="$unix_path"
26510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26512    VS100BASE="$unix_path"
26513  fi
26514
26515    if test -d "$VS100BASE"; then
26516      if test -f "$VS100BASE/$VCVARSFILE"; then
26517        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26518$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26519        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26520      else
26521        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26522$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26523        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26524$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26525      fi
26526    fi
26527  fi
26528
26529  fi
26530
26531  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26532    # Having specified an argument which is incorrect will produce an instant failure;
26533    # we should not go on looking
26534    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26535$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26536    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26537$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26538    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26539  fi
26540
26541  if test "x$VS100COMNTOOLS" != x; then
26542
26543  if test "x$VS_ENV_CMD" = x; then
26544    VS100BASE="$VS100COMNTOOLS/../.."
26545    METHOD="VS100COMNTOOLS variable"
26546
26547  windows_path="$VS100BASE"
26548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26549    unix_path=`$CYGPATH -u "$windows_path"`
26550    VS100BASE="$unix_path"
26551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26553    VS100BASE="$unix_path"
26554  fi
26555
26556    if test -d "$VS100BASE"; then
26557      if test -f "$VS100BASE/$VCVARSFILE"; then
26558        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26559$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26560        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26561      else
26562        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26563$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26564        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26565$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26566      fi
26567    fi
26568  fi
26569
26570  fi
26571  if test "x$PROGRAMFILES" != x; then
26572
26573  if test "x$VS_ENV_CMD" = x; then
26574    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26575    METHOD="well-known name"
26576
26577  windows_path="$VS100BASE"
26578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26579    unix_path=`$CYGPATH -u "$windows_path"`
26580    VS100BASE="$unix_path"
26581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26583    VS100BASE="$unix_path"
26584  fi
26585
26586    if test -d "$VS100BASE"; then
26587      if test -f "$VS100BASE/$VCVARSFILE"; then
26588        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26589$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26590        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26591      else
26592        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26593$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26594        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26595$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26596      fi
26597    fi
26598  fi
26599
26600  fi
26601
26602  if test "x$VS_ENV_CMD" = x; then
26603    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26604    METHOD="well-known name"
26605
26606  windows_path="$VS100BASE"
26607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26608    unix_path=`$CYGPATH -u "$windows_path"`
26609    VS100BASE="$unix_path"
26610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26612    VS100BASE="$unix_path"
26613  fi
26614
26615    if test -d "$VS100BASE"; then
26616      if test -f "$VS100BASE/$VCVARSFILE"; then
26617        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26618$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26619        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26620      else
26621        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26622$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26623        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26624$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26625      fi
26626    fi
26627  fi
26628
26629
26630  if test "x$VS_ENV_CMD" = x; then
26631    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26632    METHOD="well-known name"
26633
26634  windows_path="$VS100BASE"
26635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26636    unix_path=`$CYGPATH -u "$windows_path"`
26637    VS100BASE="$unix_path"
26638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26640    VS100BASE="$unix_path"
26641  fi
26642
26643    if test -d "$VS100BASE"; then
26644      if test -f "$VS100BASE/$VCVARSFILE"; then
26645        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26646$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26647        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26648      else
26649        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26650$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26651        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26652$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26653      fi
26654    fi
26655  fi
26656
26657
26658  if test "x$ProgramW6432" != x; then
26659
26660  if test "x$VS_ENV_CMD" = x; then
26661    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26662    METHOD="well-known name"
26663
26664  windows_path="$WIN_SDK_BASE"
26665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26666    unix_path=`$CYGPATH -u "$windows_path"`
26667    WIN_SDK_BASE="$unix_path"
26668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26670    WIN_SDK_BASE="$unix_path"
26671  fi
26672
26673    if test -d "$WIN_SDK_BASE"; then
26674      # There have been cases of partial or broken SDK installations. A missing
26675      # lib dir is not going to work.
26676      if test ! -d "$WIN_SDK_BASE/../lib"; then
26677        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26678$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26679        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26680$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26681      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26682        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26683$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26684        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26685        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26686          VS_ENV_ARGS="/x86"
26687        else
26688          VS_ENV_ARGS="/x64"
26689        fi
26690      else
26691        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26692$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26693        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26694$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26695      fi
26696    fi
26697  fi
26698
26699  fi
26700  if test "x$PROGRAMW6432" != x; then
26701
26702  if test "x$VS_ENV_CMD" = x; then
26703    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
26704    METHOD="well-known name"
26705
26706  windows_path="$WIN_SDK_BASE"
26707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26708    unix_path=`$CYGPATH -u "$windows_path"`
26709    WIN_SDK_BASE="$unix_path"
26710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26712    WIN_SDK_BASE="$unix_path"
26713  fi
26714
26715    if test -d "$WIN_SDK_BASE"; then
26716      # There have been cases of partial or broken SDK installations. A missing
26717      # lib dir is not going to work.
26718      if test ! -d "$WIN_SDK_BASE/../lib"; then
26719        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26720$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26721        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26722$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26723      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26724        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26725$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26726        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26727        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26728          VS_ENV_ARGS="/x86"
26729        else
26730          VS_ENV_ARGS="/x64"
26731        fi
26732      else
26733        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26734$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26735        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26736$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26737      fi
26738    fi
26739  fi
26740
26741  fi
26742  if test "x$PROGRAMFILES" != x; then
26743
26744  if test "x$VS_ENV_CMD" = x; then
26745    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
26746    METHOD="well-known name"
26747
26748  windows_path="$WIN_SDK_BASE"
26749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26750    unix_path=`$CYGPATH -u "$windows_path"`
26751    WIN_SDK_BASE="$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    WIN_SDK_BASE="$unix_path"
26755  fi
26756
26757    if test -d "$WIN_SDK_BASE"; then
26758      # There have been cases of partial or broken SDK installations. A missing
26759      # lib dir is not going to work.
26760      if test ! -d "$WIN_SDK_BASE/../lib"; then
26761        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26762$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26763        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26764$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26765      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26766        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26767$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26768        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26769        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26770          VS_ENV_ARGS="/x86"
26771        else
26772          VS_ENV_ARGS="/x64"
26773        fi
26774      else
26775        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26776$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26777        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26778$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26779      fi
26780    fi
26781  fi
26782
26783  fi
26784
26785  if test "x$VS_ENV_CMD" = x; then
26786    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
26787    METHOD="well-known name"
26788
26789  windows_path="$WIN_SDK_BASE"
26790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26791    unix_path=`$CYGPATH -u "$windows_path"`
26792    WIN_SDK_BASE="$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    WIN_SDK_BASE="$unix_path"
26796  fi
26797
26798    if test -d "$WIN_SDK_BASE"; then
26799      # There have been cases of partial or broken SDK installations. A missing
26800      # lib dir is not going to work.
26801      if test ! -d "$WIN_SDK_BASE/../lib"; then
26802        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26803$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26804        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26805$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26806      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26807        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26808$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26809        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26810        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26811          VS_ENV_ARGS="/x86"
26812        else
26813          VS_ENV_ARGS="/x64"
26814        fi
26815      else
26816        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26817$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26818        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26819$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26820      fi
26821    fi
26822  fi
26823
26824
26825  if test "x$VS_ENV_CMD" = x; then
26826    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
26827    METHOD="well-known name"
26828
26829  windows_path="$WIN_SDK_BASE"
26830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26831    unix_path=`$CYGPATH -u "$windows_path"`
26832    WIN_SDK_BASE="$unix_path"
26833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26835    WIN_SDK_BASE="$unix_path"
26836  fi
26837
26838    if test -d "$WIN_SDK_BASE"; then
26839      # There have been cases of partial or broken SDK installations. A missing
26840      # lib dir is not going to work.
26841      if test ! -d "$WIN_SDK_BASE/../lib"; then
26842        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26843$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26844        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26845$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26846      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26847        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26848$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26849        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26850        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26851          VS_ENV_ARGS="/x86"
26852        else
26853          VS_ENV_ARGS="/x64"
26854        fi
26855      else
26856        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26857$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26858        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26859$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26860      fi
26861    fi
26862  fi
26863
26864
26865  if test "x$VS_ENV_CMD" != x; then
26866    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
26867
26868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26869
26870  # First separate the path from the arguments. This will split at the first
26871  # space.
26872  complete="$VS_ENV_CMD"
26873  path="${complete%% *}"
26874  tmp="$complete EOL"
26875  arguments="${tmp#* }"
26876
26877  # Input might be given as Windows format, start by converting to
26878  # unix format.
26879  new_path=`$CYGPATH -u "$path"`
26880
26881  # Now try to locate executable using which
26882  new_path=`$WHICH "$new_path" 2> /dev/null`
26883  # bat and cmd files are not always considered executable in cygwin causing which
26884  # to not find them
26885  if test "x$new_path" = x \
26886      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26887      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26888    new_path=`$CYGPATH -u "$path"`
26889  fi
26890  if test "x$new_path" = x; then
26891    # Oops. Which didn't find the executable.
26892    # The splitting of arguments from the executable at a space might have been incorrect,
26893    # since paths with space are more likely in Windows. Give it another try with the whole
26894    # argument.
26895    path="$complete"
26896    arguments="EOL"
26897    new_path=`$CYGPATH -u "$path"`
26898    new_path=`$WHICH "$new_path" 2> /dev/null`
26899    # bat and cmd files are not always considered executable in cygwin causing which
26900    # to not find them
26901    if test "x$new_path" = x \
26902        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26903        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26904      new_path=`$CYGPATH -u "$path"`
26905    fi
26906    if test "x$new_path" = x; then
26907      # It's still not found. Now this is an unrecoverable error.
26908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26909$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26910      has_space=`$ECHO "$complete" | $GREP " "`
26911      if test "x$has_space" != x; then
26912        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26913$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26914      fi
26915      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26916    fi
26917  fi
26918
26919  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26920  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26921  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26922  # "foo.exe" is OK but "foo" is an error.
26923  #
26924  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26925  # It is also a way to make sure we got the proper file name for the real test later on.
26926  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26927  if test "x$test_shortpath" = x; then
26928    # Short path failed, file does not exist as specified.
26929    # Try adding .exe or .cmd
26930    if test -f "${new_path}.exe"; then
26931      input_to_shortpath="${new_path}.exe"
26932    elif test -f "${new_path}.cmd"; then
26933      input_to_shortpath="${new_path}.cmd"
26934    else
26935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
26936$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
26937      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26938$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26939      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26940    fi
26941  else
26942    input_to_shortpath="$new_path"
26943  fi
26944
26945  # Call helper function which possibly converts this using DOS-style short mode.
26946  # If so, the updated path is stored in $new_path.
26947  new_path="$input_to_shortpath"
26948
26949  input_path="$input_to_shortpath"
26950  # Check if we need to convert this using DOS-style short mode. If the path
26951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26952  # take no chances and rewrite it.
26953  # Note: m4 eats our [], so we need to use [ and ] instead.
26954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26955  if test "x$has_forbidden_chars" != x; then
26956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26957    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26958    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26959    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26960      # Going to short mode and back again did indeed matter. Since short mode is
26961      # case insensitive, let's make it lowercase to improve readability.
26962      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26963      # Now convert it back to Unix-stile (cygpath)
26964      input_path=`$CYGPATH -u "$shortmode_path"`
26965      new_path="$input_path"
26966    fi
26967  fi
26968
26969  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26970  if test "x$test_cygdrive_prefix" = x; then
26971    # As a simple fix, exclude /usr/bin since it's not a real path.
26972    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26973      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26974      # a path prefixed by /cygdrive for fixpath to work.
26975      new_path="$CYGWIN_ROOT_PATH$input_path"
26976    fi
26977  fi
26978
26979  # remove trailing .exe if any
26980  new_path="${new_path/%.exe/}"
26981
26982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26983
26984  # First separate the path from the arguments. This will split at the first
26985  # space.
26986  complete="$VS_ENV_CMD"
26987  path="${complete%% *}"
26988  tmp="$complete EOL"
26989  arguments="${tmp#* }"
26990
26991  # Input might be given as Windows format, start by converting to
26992  # unix format.
26993  new_path="$path"
26994
26995  windows_path="$new_path"
26996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26997    unix_path=`$CYGPATH -u "$windows_path"`
26998    new_path="$unix_path"
26999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27001    new_path="$unix_path"
27002  fi
27003
27004
27005  # Now try to locate executable using which
27006  new_path=`$WHICH "$new_path" 2> /dev/null`
27007
27008  if test "x$new_path" = x; then
27009    # Oops. Which didn't find the executable.
27010    # The splitting of arguments from the executable at a space might have been incorrect,
27011    # since paths with space are more likely in Windows. Give it another try with the whole
27012    # argument.
27013    path="$complete"
27014    arguments="EOL"
27015    new_path="$path"
27016
27017  windows_path="$new_path"
27018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27019    unix_path=`$CYGPATH -u "$windows_path"`
27020    new_path="$unix_path"
27021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27023    new_path="$unix_path"
27024  fi
27025
27026
27027    new_path=`$WHICH "$new_path" 2> /dev/null`
27028
27029    if test "x$new_path" = x; then
27030      # It's still not found. Now this is an unrecoverable error.
27031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27032$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27033      has_space=`$ECHO "$complete" | $GREP " "`
27034      if test "x$has_space" != x; then
27035        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27036$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27037      fi
27038      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27039    fi
27040  fi
27041
27042  # Now new_path has a complete unix path to the binary
27043  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27044    # Keep paths in /bin as-is, but remove trailing .exe if any
27045    new_path="${new_path/%.exe/}"
27046    # Do not save /bin paths to all_fixpath_prefixes!
27047  else
27048    # Not in mixed or Windows style, start by that.
27049    new_path=`cmd //c echo $new_path`
27050
27051  input_path="$new_path"
27052  # Check if we need to convert this using DOS-style short mode. If the path
27053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27054  # take no chances and rewrite it.
27055  # Note: m4 eats our [], so we need to use [ and ] instead.
27056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27057  if test "x$has_forbidden_chars" != x; then
27058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27060  fi
27061
27062    # Output is in $new_path
27063
27064  windows_path="$new_path"
27065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27066    unix_path=`$CYGPATH -u "$windows_path"`
27067    new_path="$unix_path"
27068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27070    new_path="$unix_path"
27071  fi
27072
27073    # remove trailing .exe if any
27074    new_path="${new_path/%.exe/}"
27075
27076    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27077    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27078  fi
27079
27080  else
27081    # We're on a posix platform. Hooray! :)
27082    # First separate the path from the arguments. This will split at the first
27083    # space.
27084    complete="$VS_ENV_CMD"
27085    path="${complete%% *}"
27086    tmp="$complete EOL"
27087    arguments="${tmp#* }"
27088
27089    # Cannot rely on the command "which" here since it doesn't always work.
27090    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27091    if test -z "$is_absolute_path"; then
27092      # Path to executable is not absolute. Find it.
27093      IFS_save="$IFS"
27094      IFS=:
27095      for p in $PATH; do
27096        if test -f "$p/$path" && test -x "$p/$path"; then
27097          new_path="$p/$path"
27098          break
27099        fi
27100      done
27101      IFS="$IFS_save"
27102    else
27103      # This is an absolute path, we can use it without further modifications.
27104      new_path="$path"
27105    fi
27106
27107    if test "x$new_path" = x; then
27108      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27109$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27110      has_space=`$ECHO "$complete" | $GREP " "`
27111      if test "x$has_space" != x; then
27112        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27113$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27114      fi
27115      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27116    fi
27117  fi
27118
27119  # Now join together the path and the arguments once again
27120  if test "x$arguments" != xEOL; then
27121    new_complete="$new_path ${arguments% *}"
27122  else
27123    new_complete="$new_path"
27124  fi
27125
27126  if test "x$complete" != "x$new_complete"; then
27127    VS_ENV_CMD="$new_complete"
27128    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27129$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27130  fi
27131
27132
27133    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27134    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27135$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27136    cd $OUTPUT_ROOT
27137    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
27138    # to autoconf standards.
27139
27140    #----
27141
27142    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
27143    # but calculate the difference in Cygwin environment before/after running it and then
27144    # apply the diff.
27145
27146    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
27147      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
27148      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
27149      _dosbash=`cygpath -a -w -s \`which bash\`.*`
27150    else
27151      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
27152      _dosbash=`cmd //c echo \`which bash\``
27153    fi
27154
27155    # generate the set of exported vars before/after the vs10 setup
27156    $ECHO "@echo off"                                           >  localdevenvtmp.bat
27157    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
27158    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
27159    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
27160
27161    # Now execute the newly created bat file.
27162    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
27163    cmd /c localdevenvtmp.bat | cat
27164
27165    # apply the diff (less some non-vs10 vars named by "!")
27166    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
27167    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
27168    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
27169
27170    # cleanup
27171    $RM localdevenvtmp*
27172    #----
27173    cd $CURDIR
27174    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
27175      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27176$as_echo "no" >&6; }
27177      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27178$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27179      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27180$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27181      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27182$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27183      as_fn_error $? "Cannot continue" "$LINENO" 5
27184    fi
27185
27186    # Now set all paths and other env variables. This will allow the rest of
27187    # the configure script to find and run the compiler in the proper way.
27188    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27189$as_echo "$as_me: Setting extracted environment variables" >&6;}
27190    . $OUTPUT_ROOT/localdevenv.sh
27191  else
27192    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27193    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27194$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27195  fi
27196
27197  # At this point, we should have corrent variables in the environment, or we can't continue.
27198  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27199$as_echo_n "checking for Visual Studio variables... " >&6; }
27200
27201  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27202    if test "x$INCLUDE" = x || test "x$LIB" = x; then
27203      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27204$as_echo "present but broken" >&6; }
27205      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27206    else
27207      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27208$as_echo "ok" >&6; }
27209      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
27210      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
27211      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
27212      # Remove any paths containing # (typically F#) as that messes up make
27213      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
27214      VS_PATH="$PATH"
27215
27216
27217
27218    fi
27219  else
27220    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27221$as_echo "not found" >&6; }
27222
27223    if test "x$VS_ENV_CMD" = x; then
27224      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27225$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27226      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27227$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27228    else
27229      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27230$as_echo "$as_me: Running the extraction script failed." >&6;}
27231    fi
27232    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27233$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27234    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27235$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27236    as_fn_error $? "Cannot continue" "$LINENO" 5
27237  fi
27238
27239  fi
27240
27241  # autoconf magic only relies on PATH, so update it if tools dir is specified
27242  OLD_PATH="$PATH"
27243
27244  # For solaris we really need solaris tools, and not the GNU equivalent.
27245  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27246  # so add that to path before starting to probe.
27247  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27248  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27249    PATH="/usr/ccs/bin:$PATH"
27250  fi
27251
27252  # Finally add TOOLS_DIR at the beginning, to allow --with-tools-dir to
27253  # override all other locations.
27254  if test "x$TOOLS_DIR" != x; then
27255    PATH=$TOOLS_DIR:$PATH
27256  fi
27257
27258  # If a devkit is found on the builddeps server, then prepend its path to the
27259  # PATH variable. If there are cross compilers available in the devkit, these
27260  # will be found by AC_PROG_CC et al.
27261  DEVKIT=
27262
27263
27264  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
27265    # Source the builddeps file again, to make sure it uses the latest variables!
27266    . $builddepsfile
27267    # Look for a target and build machine specific resource!
27268    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
27269    if test "x$resource" = x; then
27270      # Ok, lets instead look for a target specific resource
27271      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
27272    fi
27273    if test "x$resource" = x; then
27274      # Ok, lets instead look for a build specific resource
27275      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
27276    fi
27277    if test "x$resource" = x; then
27278      # Ok, lets instead look for a generic resource
27279      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
27280      resource=${builddep_devkit}
27281    fi
27282    if test "x$resource" != x; then
27283      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
27284$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
27285      # If the resource in the builddeps.conf file is an existing directory,
27286      # for example /java/linux/cups
27287      if test -d ${resource}; then
27288        depdir=${resource}
27289      else
27290
27291  # devkit is for example mymodule
27292  # $resource is for example libs/general/libmymod_1_2_3.zip
27293  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
27294  # $with_builddeps_dir is for example /localhome/builddeps
27295  # depdir is the name of the variable into which we store the depdir, eg MYMOD
27296  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
27297  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
27298  filename=`basename $resource`
27299  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
27300  filebase=${filename%%.*}
27301  extension=${filename#*.}
27302  installdir=$with_builddeps_dir/$filebase
27303  if test ! -f $installdir/$filename.unpacked; then
27304    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
27305$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
27306    if test ! -d $installdir; then
27307      mkdir -p $installdir
27308    fi
27309    if test ! -d $installdir; then
27310      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
27311    fi
27312    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
27313    touch $tmpfile
27314    if test ! -f $tmpfile; then
27315      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
27316    fi
27317
27318  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
27319  # $tmpfile is the local file name for the downloaded file.
27320  VALID_TOOL=no
27321  if test "x$BDEPS_FTP" = xwget; then
27322    VALID_TOOL=yes
27323    wget -O $tmpfile $with_builddeps_server/$resource
27324  fi
27325  if test "x$BDEPS_FTP" = xlftp; then
27326    VALID_TOOL=yes
27327    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
27328  fi
27329  if test "x$BDEPS_FTP" = xftp; then
27330    VALID_TOOL=yes
27331    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
27332    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
27333    FTPUSERPWD=${FTPSERVER%%@*}
27334    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
27335      FTPUSER=${userpwd%%:*}
27336      FTPPWD=${userpwd#*@}
27337      FTPSERVER=${FTPSERVER#*@}
27338    else
27339      FTPUSER=ftp
27340      FTPPWD=ftp
27341    fi
27342    # the "pass" command does not work on some
27343    # ftp clients (read ftp.exe) but if it works,
27344    # passive mode is better!
27345    ( \
27346        echo "user $FTPUSER $FTPPWD"        ; \
27347        echo "pass"                         ; \
27348        echo "bin"                          ; \
27349        echo "get $FTPPATH $tmpfile"              ; \
27350    ) | ftp -in $FTPSERVER
27351  fi
27352  if test "x$VALID_TOOL" != xyes; then
27353    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
27354  fi
27355
27356    mv $tmpfile $installdir/$filename
27357    if test ! -s $installdir/$filename; then
27358      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
27359    fi
27360    case "$extension" in
27361      zip)  echo "Unzipping $installdir/$filename..."
27362        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
27363        ;;
27364      tar.gz) echo "Untaring $installdir/$filename..."
27365        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
27366        ;;
27367      tgz) echo "Untaring $installdir/$filename..."
27368        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
27369        ;;
27370      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
27371        ;;
27372    esac
27373  fi
27374  if test -f $installdir/$filename.unpacked; then
27375    depdir=$installdir
27376  fi
27377
27378      fi
27379      # Source the builddeps file again, because in the previous command, the depdir
27380      # was updated to point at the current build dependency install directory.
27381      . $builddepsfile
27382      # Now extract variables from the builddeps.conf files.
27383      theroot=${builddep_devkit_ROOT}
27384      thecflags=${builddep_devkit_CFLAGS}
27385      thelibs=${builddep_devkit_LIBS}
27386      if test "x$depdir" = x; then
27387        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
27388      fi
27389      DEVKIT=$depdir
27390      if test "x$theroot" != x; then
27391        DEVKIT="$theroot"
27392      fi
27393      if test "x$thecflags" != x; then
27394        DEVKIT_CFLAGS="$thecflags"
27395      fi
27396      if test "x$thelibs" != x; then
27397        DEVKIT_LIBS="$thelibs"
27398      fi
27399
27400        # Found devkit
27401        PATH="$DEVKIT/bin:$PATH"
27402        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
27403        if test "x$x_includes" = "xNONE"; then
27404          x_includes="$SYS_ROOT/usr/include/X11"
27405        fi
27406        if test "x$x_libraries" = "xNONE"; then
27407          x_libraries="$SYS_ROOT/usr/lib"
27408        fi
27409
27410
27411    fi
27412
27413  fi
27414
27415
27416
27417  #
27418  # Setup the compilers (CC and CXX)
27419  #
27420
27421  COMPILER_NAME=C
27422  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27423
27424  if test "x$CC" != x; then
27425    # User has supplied compiler name already, always let that override.
27426    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27427$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27428    if test "x`basename $CC`" = "x$CC"; then
27429      # A command without a complete path is provided, search $PATH.
27430
27431      for ac_prog in $CC
27432do
27433  # Extract the first word of "$ac_prog", so it can be a program name with args.
27434set dummy $ac_prog; ac_word=$2
27435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27436$as_echo_n "checking for $ac_word... " >&6; }
27437if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27438  $as_echo_n "(cached) " >&6
27439else
27440  case $POTENTIAL_CC in
27441  [\\/]* | ?:[\\/]*)
27442  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27443  ;;
27444  *)
27445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27446for as_dir in $PATH
27447do
27448  IFS=$as_save_IFS
27449  test -z "$as_dir" && as_dir=.
27450    for ac_exec_ext in '' $ac_executable_extensions; do
27451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27452    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27454    break 2
27455  fi
27456done
27457  done
27458IFS=$as_save_IFS
27459
27460  ;;
27461esac
27462fi
27463POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27464if test -n "$POTENTIAL_CC"; then
27465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27466$as_echo "$POTENTIAL_CC" >&6; }
27467else
27468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27469$as_echo "no" >&6; }
27470fi
27471
27472
27473  test -n "$POTENTIAL_CC" && break
27474done
27475
27476      if test "x$POTENTIAL_CC" != x; then
27477        CC=$POTENTIAL_CC
27478      else
27479        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27480      fi
27481    else
27482      # Otherwise it might already be a complete path
27483      if test ! -x "$CC"; then
27484        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27485      fi
27486    fi
27487  else
27488    # No user supplied value. Locate compiler ourselves.
27489
27490    # If we are cross compiling, assume cross compilation tools follows the
27491    # cross compilation standard where they are prefixed with the autoconf
27492    # standard name for the target. For example the binary
27493    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27494    # If we are not cross compiling, then the default compiler name will be
27495    # used.
27496
27497    CC=
27498    # If TOOLS_DIR is set, check for all compiler names in there first
27499    # before checking the rest of the PATH.
27500    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27501    # step, this should not be necessary.
27502    if test -n "$TOOLS_DIR"; then
27503      PATH_save="$PATH"
27504      PATH="$TOOLS_DIR"
27505      for ac_prog in $SEARCH_LIST
27506do
27507  # Extract the first word of "$ac_prog", so it can be a program name with args.
27508set dummy $ac_prog; ac_word=$2
27509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27510$as_echo_n "checking for $ac_word... " >&6; }
27511if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
27512  $as_echo_n "(cached) " >&6
27513else
27514  case $TOOLS_DIR_CC in
27515  [\\/]* | ?:[\\/]*)
27516  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
27517  ;;
27518  *)
27519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27520for as_dir in $PATH
27521do
27522  IFS=$as_save_IFS
27523  test -z "$as_dir" && as_dir=.
27524    for ac_exec_ext in '' $ac_executable_extensions; do
27525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27526    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
27527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27528    break 2
27529  fi
27530done
27531  done
27532IFS=$as_save_IFS
27533
27534  ;;
27535esac
27536fi
27537TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
27538if test -n "$TOOLS_DIR_CC"; then
27539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
27540$as_echo "$TOOLS_DIR_CC" >&6; }
27541else
27542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27543$as_echo "no" >&6; }
27544fi
27545
27546
27547  test -n "$TOOLS_DIR_CC" && break
27548done
27549
27550      CC=$TOOLS_DIR_CC
27551      PATH="$PATH_save"
27552    fi
27553
27554    # AC_PATH_PROGS can't be run multiple times with the same variable,
27555    # so create a new name for this run.
27556    if test "x$CC" = x; then
27557      for ac_prog in $SEARCH_LIST
27558do
27559  # Extract the first word of "$ac_prog", so it can be a program name with args.
27560set dummy $ac_prog; ac_word=$2
27561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27562$as_echo_n "checking for $ac_word... " >&6; }
27563if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27564  $as_echo_n "(cached) " >&6
27565else
27566  case $POTENTIAL_CC in
27567  [\\/]* | ?:[\\/]*)
27568  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27569  ;;
27570  *)
27571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27572for as_dir in $PATH
27573do
27574  IFS=$as_save_IFS
27575  test -z "$as_dir" && as_dir=.
27576    for ac_exec_ext in '' $ac_executable_extensions; do
27577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27578    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27580    break 2
27581  fi
27582done
27583  done
27584IFS=$as_save_IFS
27585
27586  ;;
27587esac
27588fi
27589POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27590if test -n "$POTENTIAL_CC"; then
27591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27592$as_echo "$POTENTIAL_CC" >&6; }
27593else
27594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27595$as_echo "no" >&6; }
27596fi
27597
27598
27599  test -n "$POTENTIAL_CC" && break
27600done
27601
27602      CC=$POTENTIAL_CC
27603    fi
27604
27605    if test "x$CC" = x; then
27606
27607  # Print a helpful message on how to acquire the necessary build dependency.
27608  # devkit is the help tag: freetype, cups, pulse, alsa etc
27609  MISSING_DEPENDENCY=devkit
27610
27611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27612    cygwin_help $MISSING_DEPENDENCY
27613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27614    msys_help $MISSING_DEPENDENCY
27615  else
27616    PKGHANDLER_COMMAND=
27617
27618    case $PKGHANDLER in
27619      apt-get)
27620        apt_help     $MISSING_DEPENDENCY ;;
27621      yum)
27622        yum_help     $MISSING_DEPENDENCY ;;
27623      port)
27624        port_help    $MISSING_DEPENDENCY ;;
27625      pkgutil)
27626        pkgutil_help $MISSING_DEPENDENCY ;;
27627      pkgadd)
27628        pkgadd_help  $MISSING_DEPENDENCY ;;
27629    esac
27630
27631    if test "x$PKGHANDLER_COMMAND" != x; then
27632      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27633    fi
27634  fi
27635
27636      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27637    fi
27638  fi
27639
27640  # Now we have a compiler binary in CC. Make sure it's okay.
27641
27642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27643
27644  # First separate the path from the arguments. This will split at the first
27645  # space.
27646  complete="$CC"
27647  path="${complete%% *}"
27648  tmp="$complete EOL"
27649  arguments="${tmp#* }"
27650
27651  # Input might be given as Windows format, start by converting to
27652  # unix format.
27653  new_path=`$CYGPATH -u "$path"`
27654
27655  # Now try to locate executable using which
27656  new_path=`$WHICH "$new_path" 2> /dev/null`
27657  # bat and cmd files are not always considered executable in cygwin causing which
27658  # to not find them
27659  if test "x$new_path" = x \
27660      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27661      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27662    new_path=`$CYGPATH -u "$path"`
27663  fi
27664  if test "x$new_path" = x; then
27665    # Oops. Which didn't find the executable.
27666    # The splitting of arguments from the executable at a space might have been incorrect,
27667    # since paths with space are more likely in Windows. Give it another try with the whole
27668    # argument.
27669    path="$complete"
27670    arguments="EOL"
27671    new_path=`$CYGPATH -u "$path"`
27672    new_path=`$WHICH "$new_path" 2> /dev/null`
27673    # bat and cmd files are not always considered executable in cygwin causing which
27674    # to not find them
27675    if test "x$new_path" = x \
27676        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27677        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27678      new_path=`$CYGPATH -u "$path"`
27679    fi
27680    if test "x$new_path" = x; then
27681      # It's still not found. Now this is an unrecoverable error.
27682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27683$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27684      has_space=`$ECHO "$complete" | $GREP " "`
27685      if test "x$has_space" != x; then
27686        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27687$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27688      fi
27689      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27690    fi
27691  fi
27692
27693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27696  # "foo.exe" is OK but "foo" is an error.
27697  #
27698  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27699  # It is also a way to make sure we got the proper file name for the real test later on.
27700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27701  if test "x$test_shortpath" = x; then
27702    # Short path failed, file does not exist as specified.
27703    # Try adding .exe or .cmd
27704    if test -f "${new_path}.exe"; then
27705      input_to_shortpath="${new_path}.exe"
27706    elif test -f "${new_path}.cmd"; then
27707      input_to_shortpath="${new_path}.cmd"
27708    else
27709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27710$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27711      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27712$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27713      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27714    fi
27715  else
27716    input_to_shortpath="$new_path"
27717  fi
27718
27719  # Call helper function which possibly converts this using DOS-style short mode.
27720  # If so, the updated path is stored in $new_path.
27721  new_path="$input_to_shortpath"
27722
27723  input_path="$input_to_shortpath"
27724  # Check if we need to convert this using DOS-style short mode. If the path
27725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27726  # take no chances and rewrite it.
27727  # Note: m4 eats our [], so we need to use [ and ] instead.
27728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27729  if test "x$has_forbidden_chars" != x; then
27730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27734      # Going to short mode and back again did indeed matter. Since short mode is
27735      # case insensitive, let's make it lowercase to improve readability.
27736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27737      # Now convert it back to Unix-stile (cygpath)
27738      input_path=`$CYGPATH -u "$shortmode_path"`
27739      new_path="$input_path"
27740    fi
27741  fi
27742
27743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27744  if test "x$test_cygdrive_prefix" = x; then
27745    # As a simple fix, exclude /usr/bin since it's not a real path.
27746    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27748      # a path prefixed by /cygdrive for fixpath to work.
27749      new_path="$CYGWIN_ROOT_PATH$input_path"
27750    fi
27751  fi
27752
27753  # remove trailing .exe if any
27754  new_path="${new_path/%.exe/}"
27755
27756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27757
27758  # First separate the path from the arguments. This will split at the first
27759  # space.
27760  complete="$CC"
27761  path="${complete%% *}"
27762  tmp="$complete EOL"
27763  arguments="${tmp#* }"
27764
27765  # Input might be given as Windows format, start by converting to
27766  # unix format.
27767  new_path="$path"
27768
27769  windows_path="$new_path"
27770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27771    unix_path=`$CYGPATH -u "$windows_path"`
27772    new_path="$unix_path"
27773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27775    new_path="$unix_path"
27776  fi
27777
27778
27779  # Now try to locate executable using which
27780  new_path=`$WHICH "$new_path" 2> /dev/null`
27781
27782  if test "x$new_path" = x; then
27783    # Oops. Which didn't find the executable.
27784    # The splitting of arguments from the executable at a space might have been incorrect,
27785    # since paths with space are more likely in Windows. Give it another try with the whole
27786    # argument.
27787    path="$complete"
27788    arguments="EOL"
27789    new_path="$path"
27790
27791  windows_path="$new_path"
27792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27793    unix_path=`$CYGPATH -u "$windows_path"`
27794    new_path="$unix_path"
27795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27797    new_path="$unix_path"
27798  fi
27799
27800
27801    new_path=`$WHICH "$new_path" 2> /dev/null`
27802
27803    if test "x$new_path" = x; then
27804      # It's still not found. Now this is an unrecoverable error.
27805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27806$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27807      has_space=`$ECHO "$complete" | $GREP " "`
27808      if test "x$has_space" != x; then
27809        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27810$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27811      fi
27812      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27813    fi
27814  fi
27815
27816  # Now new_path has a complete unix path to the binary
27817  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27818    # Keep paths in /bin as-is, but remove trailing .exe if any
27819    new_path="${new_path/%.exe/}"
27820    # Do not save /bin paths to all_fixpath_prefixes!
27821  else
27822    # Not in mixed or Windows style, start by that.
27823    new_path=`cmd //c echo $new_path`
27824
27825  input_path="$new_path"
27826  # Check if we need to convert this using DOS-style short mode. If the path
27827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27828  # take no chances and rewrite it.
27829  # Note: m4 eats our [], so we need to use [ and ] instead.
27830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27831  if test "x$has_forbidden_chars" != x; then
27832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27834  fi
27835
27836    # Output is in $new_path
27837
27838  windows_path="$new_path"
27839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27840    unix_path=`$CYGPATH -u "$windows_path"`
27841    new_path="$unix_path"
27842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27844    new_path="$unix_path"
27845  fi
27846
27847    # remove trailing .exe if any
27848    new_path="${new_path/%.exe/}"
27849
27850    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27851    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27852  fi
27853
27854  else
27855    # We're on a posix platform. Hooray! :)
27856    # First separate the path from the arguments. This will split at the first
27857    # space.
27858    complete="$CC"
27859    path="${complete%% *}"
27860    tmp="$complete EOL"
27861    arguments="${tmp#* }"
27862
27863    # Cannot rely on the command "which" here since it doesn't always work.
27864    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27865    if test -z "$is_absolute_path"; then
27866      # Path to executable is not absolute. Find it.
27867      IFS_save="$IFS"
27868      IFS=:
27869      for p in $PATH; do
27870        if test -f "$p/$path" && test -x "$p/$path"; then
27871          new_path="$p/$path"
27872          break
27873        fi
27874      done
27875      IFS="$IFS_save"
27876    else
27877      # This is an absolute path, we can use it without further modifications.
27878      new_path="$path"
27879    fi
27880
27881    if test "x$new_path" = x; then
27882      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27883$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27884      has_space=`$ECHO "$complete" | $GREP " "`
27885      if test "x$has_space" != x; then
27886        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27887$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27888      fi
27889      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27890    fi
27891  fi
27892
27893  # Now join together the path and the arguments once again
27894  if test "x$arguments" != xEOL; then
27895    new_complete="$new_path ${arguments% *}"
27896  else
27897    new_complete="$new_path"
27898  fi
27899
27900  if test "x$complete" != "x$new_complete"; then
27901    CC="$new_complete"
27902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
27903$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
27904  fi
27905
27906  TEST_COMPILER="$CC"
27907  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
27908  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
27909  if test "x$OPENJDK_BUILD_OS" != xaix; then
27910    # FIXME: This test should not be needed anymore; we don't do that for any platform.
27911    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
27912$as_echo_n "checking resolved symbolic links for CC... " >&6; }
27913
27914  if test "x$OPENJDK_BUILD_OS" != xwindows; then
27915    # Follow a chain of symbolic links. Use readlink
27916    # where it exists, else fall back to horribly
27917    # complicated shell code.
27918    if test "x$READLINK_TESTED" != yes; then
27919      # On MacOSX there is a readlink tool with a different
27920      # purpose than the GNU readlink tool. Check the found readlink.
27921      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27922      if test "x$ISGNU" = x; then
27923        # A readlink that we do not know how to use.
27924        # Are there other non-GNU readlinks out there?
27925        READLINK_TESTED=yes
27926        READLINK=
27927      fi
27928    fi
27929
27930    if test "x$READLINK" != x; then
27931      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
27932    else
27933      # Save the current directory for restoring afterwards
27934      STARTDIR=$PWD
27935      COUNTER=0
27936      sym_link_dir=`$DIRNAME $TEST_COMPILER`
27937      sym_link_file=`$BASENAME $TEST_COMPILER`
27938      cd $sym_link_dir
27939      # Use -P flag to resolve symlinks in directories.
27940      cd `$THEPWDCMD -P`
27941      sym_link_dir=`$THEPWDCMD -P`
27942      # Resolve file symlinks
27943      while test $COUNTER -lt 20; do
27944        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27945        if test "x$ISLINK" == x; then
27946          # This is not a symbolic link! We are done!
27947          break
27948        fi
27949        # Again resolve directory symlinks since the target of the just found
27950        # link could be in a different directory
27951        cd `$DIRNAME $ISLINK`
27952        sym_link_dir=`$THEPWDCMD -P`
27953        sym_link_file=`$BASENAME $ISLINK`
27954        let COUNTER=COUNTER+1
27955      done
27956      cd $STARTDIR
27957      TEST_COMPILER=$sym_link_dir/$sym_link_file
27958    fi
27959  fi
27960
27961    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
27962$as_echo "$TEST_COMPILER" >&6; }
27963  fi
27964  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
27965$as_echo_n "checking if CC is disguised ccache... " >&6; }
27966
27967  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
27968  if test "x$COMPILER_BASENAME" = "xccache"; then
27969    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
27970$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
27971    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
27972    # We want to control ccache invocation ourselves, so ignore this cc and try
27973    # searching again.
27974
27975    # Remove the path to the fake ccache cc from the PATH
27976    RETRY_COMPILER_SAVED_PATH="$PATH"
27977    COMPILER_DIRNAME=`$DIRNAME $CC`
27978    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
27979
27980    # Try again looking for our compiler
27981    if test -n "$ac_tool_prefix"; then
27982  for ac_prog in $TOOLCHAIN_CC_BINARY
27983  do
27984    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27985set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27987$as_echo_n "checking for $ac_word... " >&6; }
27988if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
27989  $as_echo_n "(cached) " >&6
27990else
27991  if test -n "$PROPER_COMPILER_CC"; then
27992  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
27993else
27994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27995for as_dir in $PATH
27996do
27997  IFS=$as_save_IFS
27998  test -z "$as_dir" && as_dir=.
27999    for ac_exec_ext in '' $ac_executable_extensions; do
28000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28001    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28003    break 2
28004  fi
28005done
28006  done
28007IFS=$as_save_IFS
28008
28009fi
28010fi
28011PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28012if test -n "$PROPER_COMPILER_CC"; then
28013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28014$as_echo "$PROPER_COMPILER_CC" >&6; }
28015else
28016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28017$as_echo "no" >&6; }
28018fi
28019
28020
28021    test -n "$PROPER_COMPILER_CC" && break
28022  done
28023fi
28024if test -z "$PROPER_COMPILER_CC"; then
28025  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28026  for ac_prog in $TOOLCHAIN_CC_BINARY
28027do
28028  # Extract the first word of "$ac_prog", so it can be a program name with args.
28029set dummy $ac_prog; ac_word=$2
28030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28031$as_echo_n "checking for $ac_word... " >&6; }
28032if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28033  $as_echo_n "(cached) " >&6
28034else
28035  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28036  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28037else
28038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28039for as_dir in $PATH
28040do
28041  IFS=$as_save_IFS
28042  test -z "$as_dir" && as_dir=.
28043    for ac_exec_ext in '' $ac_executable_extensions; do
28044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28045    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28047    break 2
28048  fi
28049done
28050  done
28051IFS=$as_save_IFS
28052
28053fi
28054fi
28055ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28056if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28058$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28059else
28060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28061$as_echo "no" >&6; }
28062fi
28063
28064
28065  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28066done
28067
28068  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28069    PROPER_COMPILER_CC=""
28070  else
28071    case $cross_compiling:$ac_tool_warned in
28072yes:)
28073{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28074$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28075ac_tool_warned=yes ;;
28076esac
28077    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28078  fi
28079fi
28080
28081
28082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28083
28084  # First separate the path from the arguments. This will split at the first
28085  # space.
28086  complete="$PROPER_COMPILER_CC"
28087  path="${complete%% *}"
28088  tmp="$complete EOL"
28089  arguments="${tmp#* }"
28090
28091  # Input might be given as Windows format, start by converting to
28092  # unix format.
28093  new_path=`$CYGPATH -u "$path"`
28094
28095  # Now try to locate executable using which
28096  new_path=`$WHICH "$new_path" 2> /dev/null`
28097  # bat and cmd files are not always considered executable in cygwin causing which
28098  # to not find them
28099  if test "x$new_path" = x \
28100      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28101      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28102    new_path=`$CYGPATH -u "$path"`
28103  fi
28104  if test "x$new_path" = x; then
28105    # Oops. Which didn't find the executable.
28106    # The splitting of arguments from the executable at a space might have been incorrect,
28107    # since paths with space are more likely in Windows. Give it another try with the whole
28108    # argument.
28109    path="$complete"
28110    arguments="EOL"
28111    new_path=`$CYGPATH -u "$path"`
28112    new_path=`$WHICH "$new_path" 2> /dev/null`
28113    # bat and cmd files are not always considered executable in cygwin causing which
28114    # to not find them
28115    if test "x$new_path" = x \
28116        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28117        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28118      new_path=`$CYGPATH -u "$path"`
28119    fi
28120    if test "x$new_path" = x; then
28121      # It's still not found. Now this is an unrecoverable error.
28122      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28123$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28124      has_space=`$ECHO "$complete" | $GREP " "`
28125      if test "x$has_space" != x; then
28126        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28127$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28128      fi
28129      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28130    fi
28131  fi
28132
28133  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28134  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28135  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28136  # "foo.exe" is OK but "foo" is an error.
28137  #
28138  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28139  # It is also a way to make sure we got the proper file name for the real test later on.
28140  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28141  if test "x$test_shortpath" = x; then
28142    # Short path failed, file does not exist as specified.
28143    # Try adding .exe or .cmd
28144    if test -f "${new_path}.exe"; then
28145      input_to_shortpath="${new_path}.exe"
28146    elif test -f "${new_path}.cmd"; then
28147      input_to_shortpath="${new_path}.cmd"
28148    else
28149      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28150$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28151      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28152$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28153      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28154    fi
28155  else
28156    input_to_shortpath="$new_path"
28157  fi
28158
28159  # Call helper function which possibly converts this using DOS-style short mode.
28160  # If so, the updated path is stored in $new_path.
28161  new_path="$input_to_shortpath"
28162
28163  input_path="$input_to_shortpath"
28164  # Check if we need to convert this using DOS-style short mode. If the path
28165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28166  # take no chances and rewrite it.
28167  # Note: m4 eats our [], so we need to use [ and ] instead.
28168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28169  if test "x$has_forbidden_chars" != x; then
28170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28171    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28172    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28173    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28174      # Going to short mode and back again did indeed matter. Since short mode is
28175      # case insensitive, let's make it lowercase to improve readability.
28176      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28177      # Now convert it back to Unix-stile (cygpath)
28178      input_path=`$CYGPATH -u "$shortmode_path"`
28179      new_path="$input_path"
28180    fi
28181  fi
28182
28183  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28184  if test "x$test_cygdrive_prefix" = x; then
28185    # As a simple fix, exclude /usr/bin since it's not a real path.
28186    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28187      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28188      # a path prefixed by /cygdrive for fixpath to work.
28189      new_path="$CYGWIN_ROOT_PATH$input_path"
28190    fi
28191  fi
28192
28193  # remove trailing .exe if any
28194  new_path="${new_path/%.exe/}"
28195
28196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28197
28198  # First separate the path from the arguments. This will split at the first
28199  # space.
28200  complete="$PROPER_COMPILER_CC"
28201  path="${complete%% *}"
28202  tmp="$complete EOL"
28203  arguments="${tmp#* }"
28204
28205  # Input might be given as Windows format, start by converting to
28206  # unix format.
28207  new_path="$path"
28208
28209  windows_path="$new_path"
28210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28211    unix_path=`$CYGPATH -u "$windows_path"`
28212    new_path="$unix_path"
28213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28215    new_path="$unix_path"
28216  fi
28217
28218
28219  # Now try to locate executable using which
28220  new_path=`$WHICH "$new_path" 2> /dev/null`
28221
28222  if test "x$new_path" = x; then
28223    # Oops. Which didn't find the executable.
28224    # The splitting of arguments from the executable at a space might have been incorrect,
28225    # since paths with space are more likely in Windows. Give it another try with the whole
28226    # argument.
28227    path="$complete"
28228    arguments="EOL"
28229    new_path="$path"
28230
28231  windows_path="$new_path"
28232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28233    unix_path=`$CYGPATH -u "$windows_path"`
28234    new_path="$unix_path"
28235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28237    new_path="$unix_path"
28238  fi
28239
28240
28241    new_path=`$WHICH "$new_path" 2> /dev/null`
28242
28243    if test "x$new_path" = x; then
28244      # It's still not found. Now this is an unrecoverable error.
28245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28246$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28247      has_space=`$ECHO "$complete" | $GREP " "`
28248      if test "x$has_space" != x; then
28249        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28250$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28251      fi
28252      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28253    fi
28254  fi
28255
28256  # Now new_path has a complete unix path to the binary
28257  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28258    # Keep paths in /bin as-is, but remove trailing .exe if any
28259    new_path="${new_path/%.exe/}"
28260    # Do not save /bin paths to all_fixpath_prefixes!
28261  else
28262    # Not in mixed or Windows style, start by that.
28263    new_path=`cmd //c echo $new_path`
28264
28265  input_path="$new_path"
28266  # Check if we need to convert this using DOS-style short mode. If the path
28267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28268  # take no chances and rewrite it.
28269  # Note: m4 eats our [], so we need to use [ and ] instead.
28270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28271  if test "x$has_forbidden_chars" != x; then
28272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28273    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28274  fi
28275
28276    # Output is in $new_path
28277
28278  windows_path="$new_path"
28279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28280    unix_path=`$CYGPATH -u "$windows_path"`
28281    new_path="$unix_path"
28282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28284    new_path="$unix_path"
28285  fi
28286
28287    # remove trailing .exe if any
28288    new_path="${new_path/%.exe/}"
28289
28290    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28291    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28292  fi
28293
28294  else
28295    # We're on a posix platform. Hooray! :)
28296    # First separate the path from the arguments. This will split at the first
28297    # space.
28298    complete="$PROPER_COMPILER_CC"
28299    path="${complete%% *}"
28300    tmp="$complete EOL"
28301    arguments="${tmp#* }"
28302
28303    # Cannot rely on the command "which" here since it doesn't always work.
28304    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28305    if test -z "$is_absolute_path"; then
28306      # Path to executable is not absolute. Find it.
28307      IFS_save="$IFS"
28308      IFS=:
28309      for p in $PATH; do
28310        if test -f "$p/$path" && test -x "$p/$path"; then
28311          new_path="$p/$path"
28312          break
28313        fi
28314      done
28315      IFS="$IFS_save"
28316    else
28317      # This is an absolute path, we can use it without further modifications.
28318      new_path="$path"
28319    fi
28320
28321    if test "x$new_path" = x; then
28322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28323$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28324      has_space=`$ECHO "$complete" | $GREP " "`
28325      if test "x$has_space" != x; then
28326        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28327$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28328      fi
28329      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28330    fi
28331  fi
28332
28333  # Now join together the path and the arguments once again
28334  if test "x$arguments" != xEOL; then
28335    new_complete="$new_path ${arguments% *}"
28336  else
28337    new_complete="$new_path"
28338  fi
28339
28340  if test "x$complete" != "x$new_complete"; then
28341    PROPER_COMPILER_CC="$new_complete"
28342    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28343$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28344  fi
28345
28346    PATH="$RETRY_COMPILER_SAVED_PATH"
28347
28348    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28349$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28350
28351  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28352    # Follow a chain of symbolic links. Use readlink
28353    # where it exists, else fall back to horribly
28354    # complicated shell code.
28355    if test "x$READLINK_TESTED" != yes; then
28356      # On MacOSX there is a readlink tool with a different
28357      # purpose than the GNU readlink tool. Check the found readlink.
28358      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28359      if test "x$ISGNU" = x; then
28360        # A readlink that we do not know how to use.
28361        # Are there other non-GNU readlinks out there?
28362        READLINK_TESTED=yes
28363        READLINK=
28364      fi
28365    fi
28366
28367    if test "x$READLINK" != x; then
28368      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28369    else
28370      # Save the current directory for restoring afterwards
28371      STARTDIR=$PWD
28372      COUNTER=0
28373      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28374      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28375      cd $sym_link_dir
28376      # Use -P flag to resolve symlinks in directories.
28377      cd `$THEPWDCMD -P`
28378      sym_link_dir=`$THEPWDCMD -P`
28379      # Resolve file symlinks
28380      while test $COUNTER -lt 20; do
28381        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28382        if test "x$ISLINK" == x; then
28383          # This is not a symbolic link! We are done!
28384          break
28385        fi
28386        # Again resolve directory symlinks since the target of the just found
28387        # link could be in a different directory
28388        cd `$DIRNAME $ISLINK`
28389        sym_link_dir=`$THEPWDCMD -P`
28390        sym_link_file=`$BASENAME $ISLINK`
28391        let COUNTER=COUNTER+1
28392      done
28393      cd $STARTDIR
28394      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28395    fi
28396  fi
28397
28398    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28399$as_echo "$PROPER_COMPILER_CC" >&6; }
28400    CC="$PROPER_COMPILER_CC"
28401  else
28402    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28403$as_echo "no, keeping CC" >&6; }
28404  fi
28405
28406
28407  COMPILER=$CC
28408  COMPILER_NAME=$COMPILER_NAME
28409
28410  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28411    # cc -V output typically looks like
28412    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28413    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28414    # Check that this is likely to be the Solaris Studio cc.
28415    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28416    if test $? -ne 0; then
28417      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28418      { $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
28419$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28420      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28421$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28422      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28423$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28424      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28425    fi
28426    # Remove usage instructions (if present), and
28427    # collapse compiler output into a single line
28428    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28429        $SED -e 's/ *[Uu]sage:.*//'`
28430    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28431        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28432  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28433    # xlc -qversion output typically looks like
28434    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28435    #     Version: 11.01.0000.0015
28436    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28437    # Check that this is likely to be the IBM XL C compiler.
28438    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28439    if test $? -ne 0; then
28440      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28441      { $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
28442$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28443      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28444$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28445      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28446$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28447      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28448    fi
28449    # Collapse compiler output into a single line
28450    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28451    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28452        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28453  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28454    # There is no specific version flag, but all output starts with a version string.
28455    # First line typically looks something like:
28456    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28457    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28458    # Check that this is likely to be Microsoft CL.EXE.
28459    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28460    if test $? -ne 0; then
28461      { $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
28462$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28463      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28464$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28465      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28466    fi
28467    # Collapse compiler output into a single line
28468    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28469    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28470        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28471  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28472    # gcc --version output typically looks like
28473    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28474    #     Copyright (C) 2013 Free Software Foundation, Inc.
28475    #     This is free software; see the source for copying conditions.  There is NO
28476    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28477    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28478    # Check that this is likely to be GCC.
28479    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28480    if test $? -ne 0; then
28481      { $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
28482$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28483      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28484$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28485      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28486    fi
28487    # Remove Copyright and legalese from version string, and
28488    # collapse into a single line
28489    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28490        $SED -e 's/ *Copyright .*//'`
28491    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28492        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28493  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28494    # clang --version output typically looks like
28495    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28496    #    clang version 3.3 (tags/RELEASE_33/final)
28497    # or
28498    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28499    #    Target: x86_64-pc-linux-gnu
28500    #    Thread model: posix
28501    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28502    # Check that this is likely to be clang
28503    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28504    if test $? -ne 0; then
28505      { $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
28506$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28507      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28508$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28509      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28510    fi
28511    # Collapse compiler output into a single line
28512    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28513    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28514        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28515  else
28516      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28517  fi
28518  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28519  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28520  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28521  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28522
28523  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28524$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28525
28526
28527  # Now that we have resolved CC ourself, let autoconf have its go at it
28528  ac_ext=c
28529ac_cpp='$CPP $CPPFLAGS'
28530ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28531ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28532ac_compiler_gnu=$ac_cv_c_compiler_gnu
28533if test -n "$ac_tool_prefix"; then
28534  for ac_prog in $CC
28535  do
28536    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28537set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28539$as_echo_n "checking for $ac_word... " >&6; }
28540if ${ac_cv_prog_CC+:} false; then :
28541  $as_echo_n "(cached) " >&6
28542else
28543  if test -n "$CC"; then
28544  ac_cv_prog_CC="$CC" # Let the user override the test.
28545else
28546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28547for as_dir in $PATH
28548do
28549  IFS=$as_save_IFS
28550  test -z "$as_dir" && as_dir=.
28551    for ac_exec_ext in '' $ac_executable_extensions; do
28552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28553    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28555    break 2
28556  fi
28557done
28558  done
28559IFS=$as_save_IFS
28560
28561fi
28562fi
28563CC=$ac_cv_prog_CC
28564if test -n "$CC"; then
28565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28566$as_echo "$CC" >&6; }
28567else
28568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28569$as_echo "no" >&6; }
28570fi
28571
28572
28573    test -n "$CC" && break
28574  done
28575fi
28576if test -z "$CC"; then
28577  ac_ct_CC=$CC
28578  for ac_prog in $CC
28579do
28580  # Extract the first word of "$ac_prog", so it can be a program name with args.
28581set dummy $ac_prog; ac_word=$2
28582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28583$as_echo_n "checking for $ac_word... " >&6; }
28584if ${ac_cv_prog_ac_ct_CC+:} false; then :
28585  $as_echo_n "(cached) " >&6
28586else
28587  if test -n "$ac_ct_CC"; then
28588  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28589else
28590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28591for as_dir in $PATH
28592do
28593  IFS=$as_save_IFS
28594  test -z "$as_dir" && as_dir=.
28595    for ac_exec_ext in '' $ac_executable_extensions; do
28596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28597    ac_cv_prog_ac_ct_CC="$ac_prog"
28598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28599    break 2
28600  fi
28601done
28602  done
28603IFS=$as_save_IFS
28604
28605fi
28606fi
28607ac_ct_CC=$ac_cv_prog_ac_ct_CC
28608if test -n "$ac_ct_CC"; then
28609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28610$as_echo "$ac_ct_CC" >&6; }
28611else
28612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28613$as_echo "no" >&6; }
28614fi
28615
28616
28617  test -n "$ac_ct_CC" && break
28618done
28619
28620  if test "x$ac_ct_CC" = x; then
28621    CC=""
28622  else
28623    case $cross_compiling:$ac_tool_warned in
28624yes:)
28625{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28626$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28627ac_tool_warned=yes ;;
28628esac
28629    CC=$ac_ct_CC
28630  fi
28631fi
28632
28633
28634test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28635$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28636as_fn_error $? "no acceptable C compiler found in \$PATH
28637See \`config.log' for more details" "$LINENO" 5; }
28638
28639# Provide some information about the compiler.
28640$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28641set X $ac_compile
28642ac_compiler=$2
28643for ac_option in --version -v -V -qversion; do
28644  { { ac_try="$ac_compiler $ac_option >&5"
28645case "(($ac_try" in
28646  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28647  *) ac_try_echo=$ac_try;;
28648esac
28649eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28650$as_echo "$ac_try_echo"; } >&5
28651  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28652  ac_status=$?
28653  if test -s conftest.err; then
28654    sed '10a\
28655... rest of stderr output deleted ...
28656         10q' conftest.err >conftest.er1
28657    cat conftest.er1 >&5
28658  fi
28659  rm -f conftest.er1 conftest.err
28660  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28661  test $ac_status = 0; }
28662done
28663
28664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28665/* end confdefs.h.  */
28666
28667int
28668main ()
28669{
28670
28671  ;
28672  return 0;
28673}
28674_ACEOF
28675ac_clean_files_save=$ac_clean_files
28676ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28677# Try to create an executable without -o first, disregard a.out.
28678# It will help us diagnose broken compilers, and finding out an intuition
28679# of exeext.
28680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28681$as_echo_n "checking whether the C compiler works... " >&6; }
28682ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28683
28684# The possible output files:
28685ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28686
28687ac_rmfiles=
28688for ac_file in $ac_files
28689do
28690  case $ac_file in
28691    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28692    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28693  esac
28694done
28695rm -f $ac_rmfiles
28696
28697if { { ac_try="$ac_link_default"
28698case "(($ac_try" in
28699  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28700  *) ac_try_echo=$ac_try;;
28701esac
28702eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28703$as_echo "$ac_try_echo"; } >&5
28704  (eval "$ac_link_default") 2>&5
28705  ac_status=$?
28706  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28707  test $ac_status = 0; }; then :
28708  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28709# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28710# in a Makefile.  We should not override ac_cv_exeext if it was cached,
28711# so that the user can short-circuit this test for compilers unknown to
28712# Autoconf.
28713for ac_file in $ac_files ''
28714do
28715  test -f "$ac_file" || continue
28716  case $ac_file in
28717    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28718	;;
28719    [ab].out )
28720	# We found the default executable, but exeext='' is most
28721	# certainly right.
28722	break;;
28723    *.* )
28724	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28725	then :; else
28726	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28727	fi
28728	# We set ac_cv_exeext here because the later test for it is not
28729	# safe: cross compilers may not add the suffix if given an `-o'
28730	# argument, so we may need to know it at that point already.
28731	# Even if this section looks crufty: it has the advantage of
28732	# actually working.
28733	break;;
28734    * )
28735	break;;
28736  esac
28737done
28738test "$ac_cv_exeext" = no && ac_cv_exeext=
28739
28740else
28741  ac_file=''
28742fi
28743if test -z "$ac_file"; then :
28744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28745$as_echo "no" >&6; }
28746$as_echo "$as_me: failed program was:" >&5
28747sed 's/^/| /' conftest.$ac_ext >&5
28748
28749{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28750$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28751as_fn_error 77 "C compiler cannot create executables
28752See \`config.log' for more details" "$LINENO" 5; }
28753else
28754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28755$as_echo "yes" >&6; }
28756fi
28757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28758$as_echo_n "checking for C compiler default output file name... " >&6; }
28759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28760$as_echo "$ac_file" >&6; }
28761ac_exeext=$ac_cv_exeext
28762
28763rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28764ac_clean_files=$ac_clean_files_save
28765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28766$as_echo_n "checking for suffix of executables... " >&6; }
28767if { { ac_try="$ac_link"
28768case "(($ac_try" in
28769  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28770  *) ac_try_echo=$ac_try;;
28771esac
28772eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28773$as_echo "$ac_try_echo"; } >&5
28774  (eval "$ac_link") 2>&5
28775  ac_status=$?
28776  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28777  test $ac_status = 0; }; then :
28778  # If both `conftest.exe' and `conftest' are `present' (well, observable)
28779# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28780# work properly (i.e., refer to `conftest.exe'), while it won't with
28781# `rm'.
28782for ac_file in conftest.exe conftest conftest.*; do
28783  test -f "$ac_file" || continue
28784  case $ac_file in
28785    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28786    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28787	  break;;
28788    * ) break;;
28789  esac
28790done
28791else
28792  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28793$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28794as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28795See \`config.log' for more details" "$LINENO" 5; }
28796fi
28797rm -f conftest conftest$ac_cv_exeext
28798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28799$as_echo "$ac_cv_exeext" >&6; }
28800
28801rm -f conftest.$ac_ext
28802EXEEXT=$ac_cv_exeext
28803ac_exeext=$EXEEXT
28804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28805/* end confdefs.h.  */
28806#include <stdio.h>
28807int
28808main ()
28809{
28810FILE *f = fopen ("conftest.out", "w");
28811 return ferror (f) || fclose (f) != 0;
28812
28813  ;
28814  return 0;
28815}
28816_ACEOF
28817ac_clean_files="$ac_clean_files conftest.out"
28818# Check that the compiler produces executables we can run.  If not, either
28819# the compiler is broken, or we cross compile.
28820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28821$as_echo_n "checking whether we are cross compiling... " >&6; }
28822if test "$cross_compiling" != yes; then
28823  { { ac_try="$ac_link"
28824case "(($ac_try" in
28825  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28826  *) ac_try_echo=$ac_try;;
28827esac
28828eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28829$as_echo "$ac_try_echo"; } >&5
28830  (eval "$ac_link") 2>&5
28831  ac_status=$?
28832  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28833  test $ac_status = 0; }
28834  if { ac_try='./conftest$ac_cv_exeext'
28835  { { case "(($ac_try" in
28836  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28837  *) ac_try_echo=$ac_try;;
28838esac
28839eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28840$as_echo "$ac_try_echo"; } >&5
28841  (eval "$ac_try") 2>&5
28842  ac_status=$?
28843  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28844  test $ac_status = 0; }; }; then
28845    cross_compiling=no
28846  else
28847    if test "$cross_compiling" = maybe; then
28848	cross_compiling=yes
28849    else
28850	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28851$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28852as_fn_error $? "cannot run C compiled programs.
28853If you meant to cross compile, use \`--host'.
28854See \`config.log' for more details" "$LINENO" 5; }
28855    fi
28856  fi
28857fi
28858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
28859$as_echo "$cross_compiling" >&6; }
28860
28861rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
28862ac_clean_files=$ac_clean_files_save
28863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
28864$as_echo_n "checking for suffix of object files... " >&6; }
28865if ${ac_cv_objext+:} false; then :
28866  $as_echo_n "(cached) " >&6
28867else
28868  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28869/* end confdefs.h.  */
28870
28871int
28872main ()
28873{
28874
28875  ;
28876  return 0;
28877}
28878_ACEOF
28879rm -f conftest.o conftest.obj
28880if { { ac_try="$ac_compile"
28881case "(($ac_try" in
28882  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28883  *) ac_try_echo=$ac_try;;
28884esac
28885eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28886$as_echo "$ac_try_echo"; } >&5
28887  (eval "$ac_compile") 2>&5
28888  ac_status=$?
28889  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28890  test $ac_status = 0; }; then :
28891  for ac_file in conftest.o conftest.obj conftest.*; do
28892  test -f "$ac_file" || continue;
28893  case $ac_file in
28894    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
28895    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
28896       break;;
28897  esac
28898done
28899else
28900  $as_echo "$as_me: failed program was:" >&5
28901sed 's/^/| /' conftest.$ac_ext >&5
28902
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 object files: cannot compile
28906See \`config.log' for more details" "$LINENO" 5; }
28907fi
28908rm -f conftest.$ac_cv_objext conftest.$ac_ext
28909fi
28910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
28911$as_echo "$ac_cv_objext" >&6; }
28912OBJEXT=$ac_cv_objext
28913ac_objext=$OBJEXT
28914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
28915$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
28916if ${ac_cv_c_compiler_gnu+:} false; then :
28917  $as_echo_n "(cached) " >&6
28918else
28919  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28920/* end confdefs.h.  */
28921
28922int
28923main ()
28924{
28925#ifndef __GNUC__
28926       choke me
28927#endif
28928
28929  ;
28930  return 0;
28931}
28932_ACEOF
28933if ac_fn_c_try_compile "$LINENO"; then :
28934  ac_compiler_gnu=yes
28935else
28936  ac_compiler_gnu=no
28937fi
28938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28939ac_cv_c_compiler_gnu=$ac_compiler_gnu
28940
28941fi
28942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
28943$as_echo "$ac_cv_c_compiler_gnu" >&6; }
28944if test $ac_compiler_gnu = yes; then
28945  GCC=yes
28946else
28947  GCC=
28948fi
28949ac_test_CFLAGS=${CFLAGS+set}
28950ac_save_CFLAGS=$CFLAGS
28951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
28952$as_echo_n "checking whether $CC accepts -g... " >&6; }
28953if ${ac_cv_prog_cc_g+:} false; then :
28954  $as_echo_n "(cached) " >&6
28955else
28956  ac_save_c_werror_flag=$ac_c_werror_flag
28957   ac_c_werror_flag=yes
28958   ac_cv_prog_cc_g=no
28959   CFLAGS="-g"
28960   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28961/* end confdefs.h.  */
28962
28963int
28964main ()
28965{
28966
28967  ;
28968  return 0;
28969}
28970_ACEOF
28971if ac_fn_c_try_compile "$LINENO"; then :
28972  ac_cv_prog_cc_g=yes
28973else
28974  CFLAGS=""
28975      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28976/* end confdefs.h.  */
28977
28978int
28979main ()
28980{
28981
28982  ;
28983  return 0;
28984}
28985_ACEOF
28986if ac_fn_c_try_compile "$LINENO"; then :
28987
28988else
28989  ac_c_werror_flag=$ac_save_c_werror_flag
28990	 CFLAGS="-g"
28991	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28992/* end confdefs.h.  */
28993
28994int
28995main ()
28996{
28997
28998  ;
28999  return 0;
29000}
29001_ACEOF
29002if ac_fn_c_try_compile "$LINENO"; then :
29003  ac_cv_prog_cc_g=yes
29004fi
29005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29006fi
29007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29008fi
29009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29010   ac_c_werror_flag=$ac_save_c_werror_flag
29011fi
29012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29013$as_echo "$ac_cv_prog_cc_g" >&6; }
29014if test "$ac_test_CFLAGS" = set; then
29015  CFLAGS=$ac_save_CFLAGS
29016elif test $ac_cv_prog_cc_g = yes; then
29017  if test "$GCC" = yes; then
29018    CFLAGS="-g -O2"
29019  else
29020    CFLAGS="-g"
29021  fi
29022else
29023  if test "$GCC" = yes; then
29024    CFLAGS="-O2"
29025  else
29026    CFLAGS=
29027  fi
29028fi
29029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29030$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29031if ${ac_cv_prog_cc_c89+:} false; then :
29032  $as_echo_n "(cached) " >&6
29033else
29034  ac_cv_prog_cc_c89=no
29035ac_save_CC=$CC
29036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29037/* end confdefs.h.  */
29038#include <stdarg.h>
29039#include <stdio.h>
29040struct stat;
29041/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29042struct buf { int x; };
29043FILE * (*rcsopen) (struct buf *, struct stat *, int);
29044static char *e (p, i)
29045     char **p;
29046     int i;
29047{
29048  return p[i];
29049}
29050static char *f (char * (*g) (char **, int), char **p, ...)
29051{
29052  char *s;
29053  va_list v;
29054  va_start (v,p);
29055  s = g (p, va_arg (v,int));
29056  va_end (v);
29057  return s;
29058}
29059
29060/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29061   function prototypes and stuff, but not '\xHH' hex character constants.
29062   These don't provoke an error unfortunately, instead are silently treated
29063   as 'x'.  The following induces an error, until -std is added to get
29064   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29065   array size at least.  It's necessary to write '\x00'==0 to get something
29066   that's true only with -std.  */
29067int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29068
29069/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29070   inside strings and character constants.  */
29071#define FOO(x) 'x'
29072int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29073
29074int test (int i, double x);
29075struct s1 {int (*f) (int a);};
29076struct s2 {int (*f) (double a);};
29077int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29078int argc;
29079char **argv;
29080int
29081main ()
29082{
29083return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29084  ;
29085  return 0;
29086}
29087_ACEOF
29088for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29089	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29090do
29091  CC="$ac_save_CC $ac_arg"
29092  if ac_fn_c_try_compile "$LINENO"; then :
29093  ac_cv_prog_cc_c89=$ac_arg
29094fi
29095rm -f core conftest.err conftest.$ac_objext
29096  test "x$ac_cv_prog_cc_c89" != "xno" && break
29097done
29098rm -f conftest.$ac_ext
29099CC=$ac_save_CC
29100
29101fi
29102# AC_CACHE_VAL
29103case "x$ac_cv_prog_cc_c89" in
29104  x)
29105    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29106$as_echo "none needed" >&6; } ;;
29107  xno)
29108    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29109$as_echo "unsupported" >&6; } ;;
29110  *)
29111    CC="$CC $ac_cv_prog_cc_c89"
29112    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29113$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29114esac
29115if test "x$ac_cv_prog_cc_c89" != xno; then :
29116
29117fi
29118
29119ac_ext=cpp
29120ac_cpp='$CXXCPP $CPPFLAGS'
29121ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29122ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29123ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29124
29125
29126
29127  COMPILER_NAME=C++
29128  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29129
29130  if test "x$CXX" != x; then
29131    # User has supplied compiler name already, always let that override.
29132    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29133$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29134    if test "x`basename $CXX`" = "x$CXX"; then
29135      # A command without a complete path is provided, search $PATH.
29136
29137      for ac_prog in $CXX
29138do
29139  # Extract the first word of "$ac_prog", so it can be a program name with args.
29140set dummy $ac_prog; ac_word=$2
29141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29142$as_echo_n "checking for $ac_word... " >&6; }
29143if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29144  $as_echo_n "(cached) " >&6
29145else
29146  case $POTENTIAL_CXX in
29147  [\\/]* | ?:[\\/]*)
29148  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29149  ;;
29150  *)
29151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29152for as_dir in $PATH
29153do
29154  IFS=$as_save_IFS
29155  test -z "$as_dir" && as_dir=.
29156    for ac_exec_ext in '' $ac_executable_extensions; do
29157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29158    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29160    break 2
29161  fi
29162done
29163  done
29164IFS=$as_save_IFS
29165
29166  ;;
29167esac
29168fi
29169POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29170if test -n "$POTENTIAL_CXX"; then
29171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29172$as_echo "$POTENTIAL_CXX" >&6; }
29173else
29174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29175$as_echo "no" >&6; }
29176fi
29177
29178
29179  test -n "$POTENTIAL_CXX" && break
29180done
29181
29182      if test "x$POTENTIAL_CXX" != x; then
29183        CXX=$POTENTIAL_CXX
29184      else
29185        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29186      fi
29187    else
29188      # Otherwise it might already be a complete path
29189      if test ! -x "$CXX"; then
29190        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29191      fi
29192    fi
29193  else
29194    # No user supplied value. Locate compiler ourselves.
29195
29196    # If we are cross compiling, assume cross compilation tools follows the
29197    # cross compilation standard where they are prefixed with the autoconf
29198    # standard name for the target. For example the binary
29199    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29200    # If we are not cross compiling, then the default compiler name will be
29201    # used.
29202
29203    CXX=
29204    # If TOOLS_DIR is set, check for all compiler names in there first
29205    # before checking the rest of the PATH.
29206    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29207    # step, this should not be necessary.
29208    if test -n "$TOOLS_DIR"; then
29209      PATH_save="$PATH"
29210      PATH="$TOOLS_DIR"
29211      for ac_prog in $SEARCH_LIST
29212do
29213  # Extract the first word of "$ac_prog", so it can be a program name with args.
29214set dummy $ac_prog; ac_word=$2
29215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29216$as_echo_n "checking for $ac_word... " >&6; }
29217if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
29218  $as_echo_n "(cached) " >&6
29219else
29220  case $TOOLS_DIR_CXX in
29221  [\\/]* | ?:[\\/]*)
29222  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
29223  ;;
29224  *)
29225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29226for as_dir in $PATH
29227do
29228  IFS=$as_save_IFS
29229  test -z "$as_dir" && as_dir=.
29230    for ac_exec_ext in '' $ac_executable_extensions; do
29231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29232    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
29233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29234    break 2
29235  fi
29236done
29237  done
29238IFS=$as_save_IFS
29239
29240  ;;
29241esac
29242fi
29243TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
29244if test -n "$TOOLS_DIR_CXX"; then
29245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
29246$as_echo "$TOOLS_DIR_CXX" >&6; }
29247else
29248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29249$as_echo "no" >&6; }
29250fi
29251
29252
29253  test -n "$TOOLS_DIR_CXX" && break
29254done
29255
29256      CXX=$TOOLS_DIR_CXX
29257      PATH="$PATH_save"
29258    fi
29259
29260    # AC_PATH_PROGS can't be run multiple times with the same variable,
29261    # so create a new name for this run.
29262    if test "x$CXX" = x; then
29263      for ac_prog in $SEARCH_LIST
29264do
29265  # Extract the first word of "$ac_prog", so it can be a program name with args.
29266set dummy $ac_prog; ac_word=$2
29267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29268$as_echo_n "checking for $ac_word... " >&6; }
29269if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29270  $as_echo_n "(cached) " >&6
29271else
29272  case $POTENTIAL_CXX in
29273  [\\/]* | ?:[\\/]*)
29274  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29275  ;;
29276  *)
29277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29278for as_dir in $PATH
29279do
29280  IFS=$as_save_IFS
29281  test -z "$as_dir" && as_dir=.
29282    for ac_exec_ext in '' $ac_executable_extensions; do
29283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29284    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29286    break 2
29287  fi
29288done
29289  done
29290IFS=$as_save_IFS
29291
29292  ;;
29293esac
29294fi
29295POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29296if test -n "$POTENTIAL_CXX"; then
29297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29298$as_echo "$POTENTIAL_CXX" >&6; }
29299else
29300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29301$as_echo "no" >&6; }
29302fi
29303
29304
29305  test -n "$POTENTIAL_CXX" && break
29306done
29307
29308      CXX=$POTENTIAL_CXX
29309    fi
29310
29311    if test "x$CXX" = x; then
29312
29313  # Print a helpful message on how to acquire the necessary build dependency.
29314  # devkit is the help tag: freetype, cups, pulse, alsa etc
29315  MISSING_DEPENDENCY=devkit
29316
29317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29318    cygwin_help $MISSING_DEPENDENCY
29319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29320    msys_help $MISSING_DEPENDENCY
29321  else
29322    PKGHANDLER_COMMAND=
29323
29324    case $PKGHANDLER in
29325      apt-get)
29326        apt_help     $MISSING_DEPENDENCY ;;
29327      yum)
29328        yum_help     $MISSING_DEPENDENCY ;;
29329      port)
29330        port_help    $MISSING_DEPENDENCY ;;
29331      pkgutil)
29332        pkgutil_help $MISSING_DEPENDENCY ;;
29333      pkgadd)
29334        pkgadd_help  $MISSING_DEPENDENCY ;;
29335    esac
29336
29337    if test "x$PKGHANDLER_COMMAND" != x; then
29338      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29339    fi
29340  fi
29341
29342      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29343    fi
29344  fi
29345
29346  # Now we have a compiler binary in CXX. Make sure it's okay.
29347
29348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29349
29350  # First separate the path from the arguments. This will split at the first
29351  # space.
29352  complete="$CXX"
29353  path="${complete%% *}"
29354  tmp="$complete EOL"
29355  arguments="${tmp#* }"
29356
29357  # Input might be given as Windows format, start by converting to
29358  # unix format.
29359  new_path=`$CYGPATH -u "$path"`
29360
29361  # Now try to locate executable using which
29362  new_path=`$WHICH "$new_path" 2> /dev/null`
29363  # bat and cmd files are not always considered executable in cygwin causing which
29364  # to not find them
29365  if test "x$new_path" = x \
29366      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29367      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29368    new_path=`$CYGPATH -u "$path"`
29369  fi
29370  if test "x$new_path" = x; then
29371    # Oops. Which didn't find the executable.
29372    # The splitting of arguments from the executable at a space might have been incorrect,
29373    # since paths with space are more likely in Windows. Give it another try with the whole
29374    # argument.
29375    path="$complete"
29376    arguments="EOL"
29377    new_path=`$CYGPATH -u "$path"`
29378    new_path=`$WHICH "$new_path" 2> /dev/null`
29379    # bat and cmd files are not always considered executable in cygwin causing which
29380    # to not find them
29381    if test "x$new_path" = x \
29382        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29383        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29384      new_path=`$CYGPATH -u "$path"`
29385    fi
29386    if test "x$new_path" = x; then
29387      # It's still not found. Now this is an unrecoverable error.
29388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29389$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29390      has_space=`$ECHO "$complete" | $GREP " "`
29391      if test "x$has_space" != x; then
29392        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29393$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29394      fi
29395      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29396    fi
29397  fi
29398
29399  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29400  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29401  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29402  # "foo.exe" is OK but "foo" is an error.
29403  #
29404  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29405  # It is also a way to make sure we got the proper file name for the real test later on.
29406  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29407  if test "x$test_shortpath" = x; then
29408    # Short path failed, file does not exist as specified.
29409    # Try adding .exe or .cmd
29410    if test -f "${new_path}.exe"; then
29411      input_to_shortpath="${new_path}.exe"
29412    elif test -f "${new_path}.cmd"; then
29413      input_to_shortpath="${new_path}.cmd"
29414    else
29415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29416$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29417      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29418$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29419      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29420    fi
29421  else
29422    input_to_shortpath="$new_path"
29423  fi
29424
29425  # Call helper function which possibly converts this using DOS-style short mode.
29426  # If so, the updated path is stored in $new_path.
29427  new_path="$input_to_shortpath"
29428
29429  input_path="$input_to_shortpath"
29430  # Check if we need to convert this using DOS-style short mode. If the path
29431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29432  # take no chances and rewrite it.
29433  # Note: m4 eats our [], so we need to use [ and ] instead.
29434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29435  if test "x$has_forbidden_chars" != x; then
29436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29437    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29438    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29439    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29440      # Going to short mode and back again did indeed matter. Since short mode is
29441      # case insensitive, let's make it lowercase to improve readability.
29442      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29443      # Now convert it back to Unix-stile (cygpath)
29444      input_path=`$CYGPATH -u "$shortmode_path"`
29445      new_path="$input_path"
29446    fi
29447  fi
29448
29449  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29450  if test "x$test_cygdrive_prefix" = x; then
29451    # As a simple fix, exclude /usr/bin since it's not a real path.
29452    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29453      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29454      # a path prefixed by /cygdrive for fixpath to work.
29455      new_path="$CYGWIN_ROOT_PATH$input_path"
29456    fi
29457  fi
29458
29459  # remove trailing .exe if any
29460  new_path="${new_path/%.exe/}"
29461
29462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29463
29464  # First separate the path from the arguments. This will split at the first
29465  # space.
29466  complete="$CXX"
29467  path="${complete%% *}"
29468  tmp="$complete EOL"
29469  arguments="${tmp#* }"
29470
29471  # Input might be given as Windows format, start by converting to
29472  # unix format.
29473  new_path="$path"
29474
29475  windows_path="$new_path"
29476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29477    unix_path=`$CYGPATH -u "$windows_path"`
29478    new_path="$unix_path"
29479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29481    new_path="$unix_path"
29482  fi
29483
29484
29485  # Now try to locate executable using which
29486  new_path=`$WHICH "$new_path" 2> /dev/null`
29487
29488  if test "x$new_path" = x; then
29489    # Oops. Which didn't find the executable.
29490    # The splitting of arguments from the executable at a space might have been incorrect,
29491    # since paths with space are more likely in Windows. Give it another try with the whole
29492    # argument.
29493    path="$complete"
29494    arguments="EOL"
29495    new_path="$path"
29496
29497  windows_path="$new_path"
29498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29499    unix_path=`$CYGPATH -u "$windows_path"`
29500    new_path="$unix_path"
29501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29503    new_path="$unix_path"
29504  fi
29505
29506
29507    new_path=`$WHICH "$new_path" 2> /dev/null`
29508
29509    if test "x$new_path" = x; then
29510      # It's still not found. Now this is an unrecoverable error.
29511      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29512$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29513      has_space=`$ECHO "$complete" | $GREP " "`
29514      if test "x$has_space" != x; then
29515        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29516$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29517      fi
29518      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29519    fi
29520  fi
29521
29522  # Now new_path has a complete unix path to the binary
29523  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29524    # Keep paths in /bin as-is, but remove trailing .exe if any
29525    new_path="${new_path/%.exe/}"
29526    # Do not save /bin paths to all_fixpath_prefixes!
29527  else
29528    # Not in mixed or Windows style, start by that.
29529    new_path=`cmd //c echo $new_path`
29530
29531  input_path="$new_path"
29532  # Check if we need to convert this using DOS-style short mode. If the path
29533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29534  # take no chances and rewrite it.
29535  # Note: m4 eats our [], so we need to use [ and ] instead.
29536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29537  if test "x$has_forbidden_chars" != x; then
29538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29539    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29540  fi
29541
29542    # Output is in $new_path
29543
29544  windows_path="$new_path"
29545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29546    unix_path=`$CYGPATH -u "$windows_path"`
29547    new_path="$unix_path"
29548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29550    new_path="$unix_path"
29551  fi
29552
29553    # remove trailing .exe if any
29554    new_path="${new_path/%.exe/}"
29555
29556    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29557    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29558  fi
29559
29560  else
29561    # We're on a posix platform. Hooray! :)
29562    # First separate the path from the arguments. This will split at the first
29563    # space.
29564    complete="$CXX"
29565    path="${complete%% *}"
29566    tmp="$complete EOL"
29567    arguments="${tmp#* }"
29568
29569    # Cannot rely on the command "which" here since it doesn't always work.
29570    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29571    if test -z "$is_absolute_path"; then
29572      # Path to executable is not absolute. Find it.
29573      IFS_save="$IFS"
29574      IFS=:
29575      for p in $PATH; do
29576        if test -f "$p/$path" && test -x "$p/$path"; then
29577          new_path="$p/$path"
29578          break
29579        fi
29580      done
29581      IFS="$IFS_save"
29582    else
29583      # This is an absolute path, we can use it without further modifications.
29584      new_path="$path"
29585    fi
29586
29587    if test "x$new_path" = x; then
29588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29589$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29590      has_space=`$ECHO "$complete" | $GREP " "`
29591      if test "x$has_space" != x; then
29592        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29593$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29594      fi
29595      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29596    fi
29597  fi
29598
29599  # Now join together the path and the arguments once again
29600  if test "x$arguments" != xEOL; then
29601    new_complete="$new_path ${arguments% *}"
29602  else
29603    new_complete="$new_path"
29604  fi
29605
29606  if test "x$complete" != "x$new_complete"; then
29607    CXX="$new_complete"
29608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29609$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29610  fi
29611
29612  TEST_COMPILER="$CXX"
29613  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29614  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29615  if test "x$OPENJDK_BUILD_OS" != xaix; then
29616    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29618$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29619
29620  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29621    # Follow a chain of symbolic links. Use readlink
29622    # where it exists, else fall back to horribly
29623    # complicated shell code.
29624    if test "x$READLINK_TESTED" != yes; then
29625      # On MacOSX there is a readlink tool with a different
29626      # purpose than the GNU readlink tool. Check the found readlink.
29627      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29628      if test "x$ISGNU" = x; then
29629        # A readlink that we do not know how to use.
29630        # Are there other non-GNU readlinks out there?
29631        READLINK_TESTED=yes
29632        READLINK=
29633      fi
29634    fi
29635
29636    if test "x$READLINK" != x; then
29637      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29638    else
29639      # Save the current directory for restoring afterwards
29640      STARTDIR=$PWD
29641      COUNTER=0
29642      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29643      sym_link_file=`$BASENAME $TEST_COMPILER`
29644      cd $sym_link_dir
29645      # Use -P flag to resolve symlinks in directories.
29646      cd `$THEPWDCMD -P`
29647      sym_link_dir=`$THEPWDCMD -P`
29648      # Resolve file symlinks
29649      while test $COUNTER -lt 20; do
29650        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29651        if test "x$ISLINK" == x; then
29652          # This is not a symbolic link! We are done!
29653          break
29654        fi
29655        # Again resolve directory symlinks since the target of the just found
29656        # link could be in a different directory
29657        cd `$DIRNAME $ISLINK`
29658        sym_link_dir=`$THEPWDCMD -P`
29659        sym_link_file=`$BASENAME $ISLINK`
29660        let COUNTER=COUNTER+1
29661      done
29662      cd $STARTDIR
29663      TEST_COMPILER=$sym_link_dir/$sym_link_file
29664    fi
29665  fi
29666
29667    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29668$as_echo "$TEST_COMPILER" >&6; }
29669  fi
29670  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29671$as_echo_n "checking if CXX is disguised ccache... " >&6; }
29672
29673  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29674  if test "x$COMPILER_BASENAME" = "xccache"; then
29675    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29676$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29677    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29678    # We want to control ccache invocation ourselves, so ignore this cc and try
29679    # searching again.
29680
29681    # Remove the path to the fake ccache cc from the PATH
29682    RETRY_COMPILER_SAVED_PATH="$PATH"
29683    COMPILER_DIRNAME=`$DIRNAME $CXX`
29684    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29685
29686    # Try again looking for our compiler
29687    if test -n "$ac_tool_prefix"; then
29688  for ac_prog in $TOOLCHAIN_CXX_BINARY
29689  do
29690    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29691set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29693$as_echo_n "checking for $ac_word... " >&6; }
29694if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29695  $as_echo_n "(cached) " >&6
29696else
29697  if test -n "$PROPER_COMPILER_CXX"; then
29698  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29699else
29700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29701for as_dir in $PATH
29702do
29703  IFS=$as_save_IFS
29704  test -z "$as_dir" && as_dir=.
29705    for ac_exec_ext in '' $ac_executable_extensions; do
29706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29707    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29709    break 2
29710  fi
29711done
29712  done
29713IFS=$as_save_IFS
29714
29715fi
29716fi
29717PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29718if test -n "$PROPER_COMPILER_CXX"; then
29719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29720$as_echo "$PROPER_COMPILER_CXX" >&6; }
29721else
29722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29723$as_echo "no" >&6; }
29724fi
29725
29726
29727    test -n "$PROPER_COMPILER_CXX" && break
29728  done
29729fi
29730if test -z "$PROPER_COMPILER_CXX"; then
29731  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29732  for ac_prog in $TOOLCHAIN_CXX_BINARY
29733do
29734  # Extract the first word of "$ac_prog", so it can be a program name with args.
29735set dummy $ac_prog; ac_word=$2
29736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29737$as_echo_n "checking for $ac_word... " >&6; }
29738if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29739  $as_echo_n "(cached) " >&6
29740else
29741  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29742  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29743else
29744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29745for as_dir in $PATH
29746do
29747  IFS=$as_save_IFS
29748  test -z "$as_dir" && as_dir=.
29749    for ac_exec_ext in '' $ac_executable_extensions; do
29750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29751    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29753    break 2
29754  fi
29755done
29756  done
29757IFS=$as_save_IFS
29758
29759fi
29760fi
29761ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29762if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29764$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29765else
29766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29767$as_echo "no" >&6; }
29768fi
29769
29770
29771  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29772done
29773
29774  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29775    PROPER_COMPILER_CXX=""
29776  else
29777    case $cross_compiling:$ac_tool_warned in
29778yes:)
29779{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29780$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29781ac_tool_warned=yes ;;
29782esac
29783    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29784  fi
29785fi
29786
29787
29788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29789
29790  # First separate the path from the arguments. This will split at the first
29791  # space.
29792  complete="$PROPER_COMPILER_CXX"
29793  path="${complete%% *}"
29794  tmp="$complete EOL"
29795  arguments="${tmp#* }"
29796
29797  # Input might be given as Windows format, start by converting to
29798  # unix format.
29799  new_path=`$CYGPATH -u "$path"`
29800
29801  # Now try to locate executable using which
29802  new_path=`$WHICH "$new_path" 2> /dev/null`
29803  # bat and cmd files are not always considered executable in cygwin causing which
29804  # to not find them
29805  if test "x$new_path" = x \
29806      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29807      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29808    new_path=`$CYGPATH -u "$path"`
29809  fi
29810  if test "x$new_path" = x; then
29811    # Oops. Which didn't find the executable.
29812    # The splitting of arguments from the executable at a space might have been incorrect,
29813    # since paths with space are more likely in Windows. Give it another try with the whole
29814    # argument.
29815    path="$complete"
29816    arguments="EOL"
29817    new_path=`$CYGPATH -u "$path"`
29818    new_path=`$WHICH "$new_path" 2> /dev/null`
29819    # bat and cmd files are not always considered executable in cygwin causing which
29820    # to not find them
29821    if test "x$new_path" = x \
29822        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29823        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29824      new_path=`$CYGPATH -u "$path"`
29825    fi
29826    if test "x$new_path" = x; then
29827      # It's still not found. Now this is an unrecoverable error.
29828      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29829$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29830      has_space=`$ECHO "$complete" | $GREP " "`
29831      if test "x$has_space" != x; then
29832        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29833$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29834      fi
29835      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29836    fi
29837  fi
29838
29839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29842  # "foo.exe" is OK but "foo" is an error.
29843  #
29844  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29845  # It is also a way to make sure we got the proper file name for the real test later on.
29846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29847  if test "x$test_shortpath" = x; then
29848    # Short path failed, file does not exist as specified.
29849    # Try adding .exe or .cmd
29850    if test -f "${new_path}.exe"; then
29851      input_to_shortpath="${new_path}.exe"
29852    elif test -f "${new_path}.cmd"; then
29853      input_to_shortpath="${new_path}.cmd"
29854    else
29855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
29856$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
29857      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29858$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29859      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29860    fi
29861  else
29862    input_to_shortpath="$new_path"
29863  fi
29864
29865  # Call helper function which possibly converts this using DOS-style short mode.
29866  # If so, the updated path is stored in $new_path.
29867  new_path="$input_to_shortpath"
29868
29869  input_path="$input_to_shortpath"
29870  # Check if we need to convert this using DOS-style short mode. If the path
29871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29872  # take no chances and rewrite it.
29873  # Note: m4 eats our [], so we need to use [ and ] instead.
29874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29875  if test "x$has_forbidden_chars" != x; then
29876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29880      # Going to short mode and back again did indeed matter. Since short mode is
29881      # case insensitive, let's make it lowercase to improve readability.
29882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29883      # Now convert it back to Unix-stile (cygpath)
29884      input_path=`$CYGPATH -u "$shortmode_path"`
29885      new_path="$input_path"
29886    fi
29887  fi
29888
29889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29890  if test "x$test_cygdrive_prefix" = x; then
29891    # As a simple fix, exclude /usr/bin since it's not a real path.
29892    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29894      # a path prefixed by /cygdrive for fixpath to work.
29895      new_path="$CYGWIN_ROOT_PATH$input_path"
29896    fi
29897  fi
29898
29899  # remove trailing .exe if any
29900  new_path="${new_path/%.exe/}"
29901
29902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29903
29904  # First separate the path from the arguments. This will split at the first
29905  # space.
29906  complete="$PROPER_COMPILER_CXX"
29907  path="${complete%% *}"
29908  tmp="$complete EOL"
29909  arguments="${tmp#* }"
29910
29911  # Input might be given as Windows format, start by converting to
29912  # unix format.
29913  new_path="$path"
29914
29915  windows_path="$new_path"
29916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29917    unix_path=`$CYGPATH -u "$windows_path"`
29918    new_path="$unix_path"
29919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29921    new_path="$unix_path"
29922  fi
29923
29924
29925  # Now try to locate executable using which
29926  new_path=`$WHICH "$new_path" 2> /dev/null`
29927
29928  if test "x$new_path" = x; then
29929    # Oops. Which didn't find the executable.
29930    # The splitting of arguments from the executable at a space might have been incorrect,
29931    # since paths with space are more likely in Windows. Give it another try with the whole
29932    # argument.
29933    path="$complete"
29934    arguments="EOL"
29935    new_path="$path"
29936
29937  windows_path="$new_path"
29938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29939    unix_path=`$CYGPATH -u "$windows_path"`
29940    new_path="$unix_path"
29941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29943    new_path="$unix_path"
29944  fi
29945
29946
29947    new_path=`$WHICH "$new_path" 2> /dev/null`
29948
29949    if test "x$new_path" = x; then
29950      # It's still not found. Now this is an unrecoverable error.
29951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29952$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29953      has_space=`$ECHO "$complete" | $GREP " "`
29954      if test "x$has_space" != x; then
29955        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29956$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29957      fi
29958      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29959    fi
29960  fi
29961
29962  # Now new_path has a complete unix path to the binary
29963  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29964    # Keep paths in /bin as-is, but remove trailing .exe if any
29965    new_path="${new_path/%.exe/}"
29966    # Do not save /bin paths to all_fixpath_prefixes!
29967  else
29968    # Not in mixed or Windows style, start by that.
29969    new_path=`cmd //c echo $new_path`
29970
29971  input_path="$new_path"
29972  # Check if we need to convert this using DOS-style short mode. If the path
29973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29974  # take no chances and rewrite it.
29975  # Note: m4 eats our [], so we need to use [ and ] instead.
29976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29977  if test "x$has_forbidden_chars" != x; then
29978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29979    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29980  fi
29981
29982    # Output is in $new_path
29983
29984  windows_path="$new_path"
29985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29986    unix_path=`$CYGPATH -u "$windows_path"`
29987    new_path="$unix_path"
29988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29990    new_path="$unix_path"
29991  fi
29992
29993    # remove trailing .exe if any
29994    new_path="${new_path/%.exe/}"
29995
29996    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29997    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29998  fi
29999
30000  else
30001    # We're on a posix platform. Hooray! :)
30002    # First separate the path from the arguments. This will split at the first
30003    # space.
30004    complete="$PROPER_COMPILER_CXX"
30005    path="${complete%% *}"
30006    tmp="$complete EOL"
30007    arguments="${tmp#* }"
30008
30009    # Cannot rely on the command "which" here since it doesn't always work.
30010    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30011    if test -z "$is_absolute_path"; then
30012      # Path to executable is not absolute. Find it.
30013      IFS_save="$IFS"
30014      IFS=:
30015      for p in $PATH; do
30016        if test -f "$p/$path" && test -x "$p/$path"; then
30017          new_path="$p/$path"
30018          break
30019        fi
30020      done
30021      IFS="$IFS_save"
30022    else
30023      # This is an absolute path, we can use it without further modifications.
30024      new_path="$path"
30025    fi
30026
30027    if test "x$new_path" = x; then
30028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30029$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30030      has_space=`$ECHO "$complete" | $GREP " "`
30031      if test "x$has_space" != x; then
30032        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30033$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30034      fi
30035      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30036    fi
30037  fi
30038
30039  # Now join together the path and the arguments once again
30040  if test "x$arguments" != xEOL; then
30041    new_complete="$new_path ${arguments% *}"
30042  else
30043    new_complete="$new_path"
30044  fi
30045
30046  if test "x$complete" != "x$new_complete"; then
30047    PROPER_COMPILER_CXX="$new_complete"
30048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30049$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30050  fi
30051
30052    PATH="$RETRY_COMPILER_SAVED_PATH"
30053
30054    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30055$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30056
30057  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30058    # Follow a chain of symbolic links. Use readlink
30059    # where it exists, else fall back to horribly
30060    # complicated shell code.
30061    if test "x$READLINK_TESTED" != yes; then
30062      # On MacOSX there is a readlink tool with a different
30063      # purpose than the GNU readlink tool. Check the found readlink.
30064      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30065      if test "x$ISGNU" = x; then
30066        # A readlink that we do not know how to use.
30067        # Are there other non-GNU readlinks out there?
30068        READLINK_TESTED=yes
30069        READLINK=
30070      fi
30071    fi
30072
30073    if test "x$READLINK" != x; then
30074      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30075    else
30076      # Save the current directory for restoring afterwards
30077      STARTDIR=$PWD
30078      COUNTER=0
30079      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30080      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30081      cd $sym_link_dir
30082      # Use -P flag to resolve symlinks in directories.
30083      cd `$THEPWDCMD -P`
30084      sym_link_dir=`$THEPWDCMD -P`
30085      # Resolve file symlinks
30086      while test $COUNTER -lt 20; do
30087        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30088        if test "x$ISLINK" == x; then
30089          # This is not a symbolic link! We are done!
30090          break
30091        fi
30092        # Again resolve directory symlinks since the target of the just found
30093        # link could be in a different directory
30094        cd `$DIRNAME $ISLINK`
30095        sym_link_dir=`$THEPWDCMD -P`
30096        sym_link_file=`$BASENAME $ISLINK`
30097        let COUNTER=COUNTER+1
30098      done
30099      cd $STARTDIR
30100      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30101    fi
30102  fi
30103
30104    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30105$as_echo "$PROPER_COMPILER_CXX" >&6; }
30106    CXX="$PROPER_COMPILER_CXX"
30107  else
30108    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30109$as_echo "no, keeping CXX" >&6; }
30110  fi
30111
30112
30113  COMPILER=$CXX
30114  COMPILER_NAME=$COMPILER_NAME
30115
30116  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30117    # cc -V output typically looks like
30118    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30119    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30120    # Check that this is likely to be the Solaris Studio cc.
30121    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30122    if test $? -ne 0; then
30123      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30124      { $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
30125$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30126      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30127$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30128      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30129$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30130      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30131    fi
30132    # Remove usage instructions (if present), and
30133    # collapse compiler output into a single line
30134    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30135        $SED -e 's/ *[Uu]sage:.*//'`
30136    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30137        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30138  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30139    # xlc -qversion output typically looks like
30140    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30141    #     Version: 11.01.0000.0015
30142    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30143    # Check that this is likely to be the IBM XL C compiler.
30144    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30145    if test $? -ne 0; then
30146      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30147      { $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
30148$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30149      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30150$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30151      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30152$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30153      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30154    fi
30155    # Collapse compiler output into a single line
30156    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30157    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30158        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30159  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30160    # There is no specific version flag, but all output starts with a version string.
30161    # First line typically looks something like:
30162    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30163    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30164    # Check that this is likely to be Microsoft CL.EXE.
30165    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30166    if test $? -ne 0; then
30167      { $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
30168$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30169      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30170$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30171      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30172    fi
30173    # Collapse compiler output into a single line
30174    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30175    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30176        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30177  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30178    # gcc --version output typically looks like
30179    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30180    #     Copyright (C) 2013 Free Software Foundation, Inc.
30181    #     This is free software; see the source for copying conditions.  There is NO
30182    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30183    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30184    # Check that this is likely to be GCC.
30185    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30186    if test $? -ne 0; then
30187      { $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
30188$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30189      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30190$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30191      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30192    fi
30193    # Remove Copyright and legalese from version string, and
30194    # collapse into a single line
30195    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30196        $SED -e 's/ *Copyright .*//'`
30197    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30198        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30199  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30200    # clang --version output typically looks like
30201    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30202    #    clang version 3.3 (tags/RELEASE_33/final)
30203    # or
30204    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30205    #    Target: x86_64-pc-linux-gnu
30206    #    Thread model: posix
30207    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30208    # Check that this is likely to be clang
30209    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30210    if test $? -ne 0; then
30211      { $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
30212$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30213      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30214$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30215      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30216    fi
30217    # Collapse compiler output into a single line
30218    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30219    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30220        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30221  else
30222      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30223  fi
30224  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30225  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30226  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30227  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30228
30229  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30230$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30231
30232
30233  # Now that we have resolved CXX ourself, let autoconf have its go at it
30234  ac_ext=cpp
30235ac_cpp='$CXXCPP $CPPFLAGS'
30236ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30237ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30238ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30239if test -z "$CXX"; then
30240  if test -n "$CCC"; then
30241    CXX=$CCC
30242  else
30243    if test -n "$ac_tool_prefix"; then
30244  for ac_prog in $CXX
30245  do
30246    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30247set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30249$as_echo_n "checking for $ac_word... " >&6; }
30250if ${ac_cv_prog_CXX+:} false; then :
30251  $as_echo_n "(cached) " >&6
30252else
30253  if test -n "$CXX"; then
30254  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30255else
30256as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30257for as_dir in $PATH
30258do
30259  IFS=$as_save_IFS
30260  test -z "$as_dir" && as_dir=.
30261    for ac_exec_ext in '' $ac_executable_extensions; do
30262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30263    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30265    break 2
30266  fi
30267done
30268  done
30269IFS=$as_save_IFS
30270
30271fi
30272fi
30273CXX=$ac_cv_prog_CXX
30274if test -n "$CXX"; then
30275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30276$as_echo "$CXX" >&6; }
30277else
30278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30279$as_echo "no" >&6; }
30280fi
30281
30282
30283    test -n "$CXX" && break
30284  done
30285fi
30286if test -z "$CXX"; then
30287  ac_ct_CXX=$CXX
30288  for ac_prog in $CXX
30289do
30290  # Extract the first word of "$ac_prog", so it can be a program name with args.
30291set dummy $ac_prog; ac_word=$2
30292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30293$as_echo_n "checking for $ac_word... " >&6; }
30294if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30295  $as_echo_n "(cached) " >&6
30296else
30297  if test -n "$ac_ct_CXX"; then
30298  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30299else
30300as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30301for as_dir in $PATH
30302do
30303  IFS=$as_save_IFS
30304  test -z "$as_dir" && as_dir=.
30305    for ac_exec_ext in '' $ac_executable_extensions; do
30306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30307    ac_cv_prog_ac_ct_CXX="$ac_prog"
30308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30309    break 2
30310  fi
30311done
30312  done
30313IFS=$as_save_IFS
30314
30315fi
30316fi
30317ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30318if test -n "$ac_ct_CXX"; then
30319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30320$as_echo "$ac_ct_CXX" >&6; }
30321else
30322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30323$as_echo "no" >&6; }
30324fi
30325
30326
30327  test -n "$ac_ct_CXX" && break
30328done
30329
30330  if test "x$ac_ct_CXX" = x; then
30331    CXX="g++"
30332  else
30333    case $cross_compiling:$ac_tool_warned in
30334yes:)
30335{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30336$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30337ac_tool_warned=yes ;;
30338esac
30339    CXX=$ac_ct_CXX
30340  fi
30341fi
30342
30343  fi
30344fi
30345# Provide some information about the compiler.
30346$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30347set X $ac_compile
30348ac_compiler=$2
30349for ac_option in --version -v -V -qversion; do
30350  { { ac_try="$ac_compiler $ac_option >&5"
30351case "(($ac_try" in
30352  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30353  *) ac_try_echo=$ac_try;;
30354esac
30355eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30356$as_echo "$ac_try_echo"; } >&5
30357  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30358  ac_status=$?
30359  if test -s conftest.err; then
30360    sed '10a\
30361... rest of stderr output deleted ...
30362         10q' conftest.err >conftest.er1
30363    cat conftest.er1 >&5
30364  fi
30365  rm -f conftest.er1 conftest.err
30366  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30367  test $ac_status = 0; }
30368done
30369
30370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30371$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30372if ${ac_cv_cxx_compiler_gnu+:} false; then :
30373  $as_echo_n "(cached) " >&6
30374else
30375  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30376/* end confdefs.h.  */
30377
30378int
30379main ()
30380{
30381#ifndef __GNUC__
30382       choke me
30383#endif
30384
30385  ;
30386  return 0;
30387}
30388_ACEOF
30389if ac_fn_cxx_try_compile "$LINENO"; then :
30390  ac_compiler_gnu=yes
30391else
30392  ac_compiler_gnu=no
30393fi
30394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30395ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30396
30397fi
30398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30399$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30400if test $ac_compiler_gnu = yes; then
30401  GXX=yes
30402else
30403  GXX=
30404fi
30405ac_test_CXXFLAGS=${CXXFLAGS+set}
30406ac_save_CXXFLAGS=$CXXFLAGS
30407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30408$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30409if ${ac_cv_prog_cxx_g+:} false; then :
30410  $as_echo_n "(cached) " >&6
30411else
30412  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30413   ac_cxx_werror_flag=yes
30414   ac_cv_prog_cxx_g=no
30415   CXXFLAGS="-g"
30416   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30417/* end confdefs.h.  */
30418
30419int
30420main ()
30421{
30422
30423  ;
30424  return 0;
30425}
30426_ACEOF
30427if ac_fn_cxx_try_compile "$LINENO"; then :
30428  ac_cv_prog_cxx_g=yes
30429else
30430  CXXFLAGS=""
30431      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30432/* end confdefs.h.  */
30433
30434int
30435main ()
30436{
30437
30438  ;
30439  return 0;
30440}
30441_ACEOF
30442if ac_fn_cxx_try_compile "$LINENO"; then :
30443
30444else
30445  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30446	 CXXFLAGS="-g"
30447	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30448/* end confdefs.h.  */
30449
30450int
30451main ()
30452{
30453
30454  ;
30455  return 0;
30456}
30457_ACEOF
30458if ac_fn_cxx_try_compile "$LINENO"; then :
30459  ac_cv_prog_cxx_g=yes
30460fi
30461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30462fi
30463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30464fi
30465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30466   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30467fi
30468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30469$as_echo "$ac_cv_prog_cxx_g" >&6; }
30470if test "$ac_test_CXXFLAGS" = set; then
30471  CXXFLAGS=$ac_save_CXXFLAGS
30472elif test $ac_cv_prog_cxx_g = yes; then
30473  if test "$GXX" = yes; then
30474    CXXFLAGS="-g -O2"
30475  else
30476    CXXFLAGS="-g"
30477  fi
30478else
30479  if test "$GXX" = yes; then
30480    CXXFLAGS="-O2"
30481  else
30482    CXXFLAGS=
30483  fi
30484fi
30485ac_ext=cpp
30486ac_cpp='$CXXCPP $CPPFLAGS'
30487ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30488ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30489ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30490
30491
30492  #
30493  # Setup the preprocessor (CPP and CXXCPP)
30494  #
30495  ac_ext=c
30496ac_cpp='$CPP $CPPFLAGS'
30497ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30498ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30499ac_compiler_gnu=$ac_cv_c_compiler_gnu
30500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30501$as_echo_n "checking how to run the C preprocessor... " >&6; }
30502# On Suns, sometimes $CPP names a directory.
30503if test -n "$CPP" && test -d "$CPP"; then
30504  CPP=
30505fi
30506if test -z "$CPP"; then
30507  if ${ac_cv_prog_CPP+:} false; then :
30508  $as_echo_n "(cached) " >&6
30509else
30510      # Double quotes because CPP needs to be expanded
30511    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30512    do
30513      ac_preproc_ok=false
30514for ac_c_preproc_warn_flag in '' yes
30515do
30516  # Use a header file that comes with gcc, so configuring glibc
30517  # with a fresh cross-compiler works.
30518  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30519  # <limits.h> exists even on freestanding compilers.
30520  # On the NeXT, cc -E runs the code through the compiler's parser,
30521  # not just through cpp. "Syntax error" is here to catch this case.
30522  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30523/* end confdefs.h.  */
30524#ifdef __STDC__
30525# include <limits.h>
30526#else
30527# include <assert.h>
30528#endif
30529		     Syntax error
30530_ACEOF
30531if ac_fn_c_try_cpp "$LINENO"; then :
30532
30533else
30534  # Broken: fails on valid input.
30535continue
30536fi
30537rm -f conftest.err conftest.i conftest.$ac_ext
30538
30539  # OK, works on sane cases.  Now check whether nonexistent headers
30540  # can be detected and how.
30541  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30542/* end confdefs.h.  */
30543#include <ac_nonexistent.h>
30544_ACEOF
30545if ac_fn_c_try_cpp "$LINENO"; then :
30546  # Broken: success on invalid input.
30547continue
30548else
30549  # Passes both tests.
30550ac_preproc_ok=:
30551break
30552fi
30553rm -f conftest.err conftest.i conftest.$ac_ext
30554
30555done
30556# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30557rm -f conftest.i conftest.err conftest.$ac_ext
30558if $ac_preproc_ok; then :
30559  break
30560fi
30561
30562    done
30563    ac_cv_prog_CPP=$CPP
30564
30565fi
30566  CPP=$ac_cv_prog_CPP
30567else
30568  ac_cv_prog_CPP=$CPP
30569fi
30570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30571$as_echo "$CPP" >&6; }
30572ac_preproc_ok=false
30573for ac_c_preproc_warn_flag in '' yes
30574do
30575  # Use a header file that comes with gcc, so configuring glibc
30576  # with a fresh cross-compiler works.
30577  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30578  # <limits.h> exists even on freestanding compilers.
30579  # On the NeXT, cc -E runs the code through the compiler's parser,
30580  # not just through cpp. "Syntax error" is here to catch this case.
30581  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30582/* end confdefs.h.  */
30583#ifdef __STDC__
30584# include <limits.h>
30585#else
30586# include <assert.h>
30587#endif
30588		     Syntax error
30589_ACEOF
30590if ac_fn_c_try_cpp "$LINENO"; then :
30591
30592else
30593  # Broken: fails on valid input.
30594continue
30595fi
30596rm -f conftest.err conftest.i conftest.$ac_ext
30597
30598  # OK, works on sane cases.  Now check whether nonexistent headers
30599  # can be detected and how.
30600  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30601/* end confdefs.h.  */
30602#include <ac_nonexistent.h>
30603_ACEOF
30604if ac_fn_c_try_cpp "$LINENO"; then :
30605  # Broken: success on invalid input.
30606continue
30607else
30608  # Passes both tests.
30609ac_preproc_ok=:
30610break
30611fi
30612rm -f conftest.err conftest.i conftest.$ac_ext
30613
30614done
30615# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30616rm -f conftest.i conftest.err conftest.$ac_ext
30617if $ac_preproc_ok; then :
30618
30619else
30620  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30621$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30622as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30623See \`config.log' for more details" "$LINENO" 5; }
30624fi
30625
30626ac_ext=cpp
30627ac_cpp='$CXXCPP $CPPFLAGS'
30628ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30629ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30630ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30631
30632
30633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30634
30635  # First separate the path from the arguments. This will split at the first
30636  # space.
30637  complete="$CPP"
30638  path="${complete%% *}"
30639  tmp="$complete EOL"
30640  arguments="${tmp#* }"
30641
30642  # Input might be given as Windows format, start by converting to
30643  # unix format.
30644  new_path=`$CYGPATH -u "$path"`
30645
30646  # Now try to locate executable using which
30647  new_path=`$WHICH "$new_path" 2> /dev/null`
30648  # bat and cmd files are not always considered executable in cygwin causing which
30649  # to not find them
30650  if test "x$new_path" = x \
30651      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30652      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30653    new_path=`$CYGPATH -u "$path"`
30654  fi
30655  if test "x$new_path" = x; then
30656    # Oops. Which didn't find the executable.
30657    # The splitting of arguments from the executable at a space might have been incorrect,
30658    # since paths with space are more likely in Windows. Give it another try with the whole
30659    # argument.
30660    path="$complete"
30661    arguments="EOL"
30662    new_path=`$CYGPATH -u "$path"`
30663    new_path=`$WHICH "$new_path" 2> /dev/null`
30664    # bat and cmd files are not always considered executable in cygwin causing which
30665    # to not find them
30666    if test "x$new_path" = x \
30667        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30668        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30669      new_path=`$CYGPATH -u "$path"`
30670    fi
30671    if test "x$new_path" = x; then
30672      # It's still not found. Now this is an unrecoverable error.
30673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30674$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30675      has_space=`$ECHO "$complete" | $GREP " "`
30676      if test "x$has_space" != x; then
30677        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30678$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30679      fi
30680      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30681    fi
30682  fi
30683
30684  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30685  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30686  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30687  # "foo.exe" is OK but "foo" is an error.
30688  #
30689  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30690  # It is also a way to make sure we got the proper file name for the real test later on.
30691  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30692  if test "x$test_shortpath" = x; then
30693    # Short path failed, file does not exist as specified.
30694    # Try adding .exe or .cmd
30695    if test -f "${new_path}.exe"; then
30696      input_to_shortpath="${new_path}.exe"
30697    elif test -f "${new_path}.cmd"; then
30698      input_to_shortpath="${new_path}.cmd"
30699    else
30700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30701$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30702      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30703$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30704      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30705    fi
30706  else
30707    input_to_shortpath="$new_path"
30708  fi
30709
30710  # Call helper function which possibly converts this using DOS-style short mode.
30711  # If so, the updated path is stored in $new_path.
30712  new_path="$input_to_shortpath"
30713
30714  input_path="$input_to_shortpath"
30715  # Check if we need to convert this using DOS-style short mode. If the path
30716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30717  # take no chances and rewrite it.
30718  # Note: m4 eats our [], so we need to use [ and ] instead.
30719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30720  if test "x$has_forbidden_chars" != x; then
30721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30722    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30723    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30724    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30725      # Going to short mode and back again did indeed matter. Since short mode is
30726      # case insensitive, let's make it lowercase to improve readability.
30727      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30728      # Now convert it back to Unix-stile (cygpath)
30729      input_path=`$CYGPATH -u "$shortmode_path"`
30730      new_path="$input_path"
30731    fi
30732  fi
30733
30734  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30735  if test "x$test_cygdrive_prefix" = x; then
30736    # As a simple fix, exclude /usr/bin since it's not a real path.
30737    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30738      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30739      # a path prefixed by /cygdrive for fixpath to work.
30740      new_path="$CYGWIN_ROOT_PATH$input_path"
30741    fi
30742  fi
30743
30744  # remove trailing .exe if any
30745  new_path="${new_path/%.exe/}"
30746
30747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30748
30749  # First separate the path from the arguments. This will split at the first
30750  # space.
30751  complete="$CPP"
30752  path="${complete%% *}"
30753  tmp="$complete EOL"
30754  arguments="${tmp#* }"
30755
30756  # Input might be given as Windows format, start by converting to
30757  # unix format.
30758  new_path="$path"
30759
30760  windows_path="$new_path"
30761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30762    unix_path=`$CYGPATH -u "$windows_path"`
30763    new_path="$unix_path"
30764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30766    new_path="$unix_path"
30767  fi
30768
30769
30770  # Now try to locate executable using which
30771  new_path=`$WHICH "$new_path" 2> /dev/null`
30772
30773  if test "x$new_path" = x; then
30774    # Oops. Which didn't find the executable.
30775    # The splitting of arguments from the executable at a space might have been incorrect,
30776    # since paths with space are more likely in Windows. Give it another try with the whole
30777    # argument.
30778    path="$complete"
30779    arguments="EOL"
30780    new_path="$path"
30781
30782  windows_path="$new_path"
30783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30784    unix_path=`$CYGPATH -u "$windows_path"`
30785    new_path="$unix_path"
30786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30788    new_path="$unix_path"
30789  fi
30790
30791
30792    new_path=`$WHICH "$new_path" 2> /dev/null`
30793
30794    if test "x$new_path" = x; then
30795      # It's still not found. Now this is an unrecoverable error.
30796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30797$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30798      has_space=`$ECHO "$complete" | $GREP " "`
30799      if test "x$has_space" != x; then
30800        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30801$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30802      fi
30803      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30804    fi
30805  fi
30806
30807  # Now new_path has a complete unix path to the binary
30808  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30809    # Keep paths in /bin as-is, but remove trailing .exe if any
30810    new_path="${new_path/%.exe/}"
30811    # Do not save /bin paths to all_fixpath_prefixes!
30812  else
30813    # Not in mixed or Windows style, start by that.
30814    new_path=`cmd //c echo $new_path`
30815
30816  input_path="$new_path"
30817  # Check if we need to convert this using DOS-style short mode. If the path
30818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30819  # take no chances and rewrite it.
30820  # Note: m4 eats our [], so we need to use [ and ] instead.
30821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30822  if test "x$has_forbidden_chars" != x; then
30823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30824    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30825  fi
30826
30827    # Output is in $new_path
30828
30829  windows_path="$new_path"
30830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30831    unix_path=`$CYGPATH -u "$windows_path"`
30832    new_path="$unix_path"
30833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30835    new_path="$unix_path"
30836  fi
30837
30838    # remove trailing .exe if any
30839    new_path="${new_path/%.exe/}"
30840
30841    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30842    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30843  fi
30844
30845  else
30846    # We're on a posix platform. Hooray! :)
30847    # First separate the path from the arguments. This will split at the first
30848    # space.
30849    complete="$CPP"
30850    path="${complete%% *}"
30851    tmp="$complete EOL"
30852    arguments="${tmp#* }"
30853
30854    # Cannot rely on the command "which" here since it doesn't always work.
30855    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30856    if test -z "$is_absolute_path"; then
30857      # Path to executable is not absolute. Find it.
30858      IFS_save="$IFS"
30859      IFS=:
30860      for p in $PATH; do
30861        if test -f "$p/$path" && test -x "$p/$path"; then
30862          new_path="$p/$path"
30863          break
30864        fi
30865      done
30866      IFS="$IFS_save"
30867    else
30868      # This is an absolute path, we can use it without further modifications.
30869      new_path="$path"
30870    fi
30871
30872    if test "x$new_path" = x; then
30873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30874$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30875      has_space=`$ECHO "$complete" | $GREP " "`
30876      if test "x$has_space" != x; then
30877        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30878$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30879      fi
30880      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30881    fi
30882  fi
30883
30884  # Now join together the path and the arguments once again
30885  if test "x$arguments" != xEOL; then
30886    new_complete="$new_path ${arguments% *}"
30887  else
30888    new_complete="$new_path"
30889  fi
30890
30891  if test "x$complete" != "x$new_complete"; then
30892    CPP="$new_complete"
30893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
30894$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
30895  fi
30896
30897  ac_ext=cpp
30898ac_cpp='$CXXCPP $CPPFLAGS'
30899ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30900ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30901ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
30903$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
30904if test -z "$CXXCPP"; then
30905  if ${ac_cv_prog_CXXCPP+:} false; then :
30906  $as_echo_n "(cached) " >&6
30907else
30908      # Double quotes because CXXCPP needs to be expanded
30909    for CXXCPP in "$CXX -E" "/lib/cpp"
30910    do
30911      ac_preproc_ok=false
30912for ac_cxx_preproc_warn_flag in '' yes
30913do
30914  # Use a header file that comes with gcc, so configuring glibc
30915  # with a fresh cross-compiler works.
30916  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30917  # <limits.h> exists even on freestanding compilers.
30918  # On the NeXT, cc -E runs the code through the compiler's parser,
30919  # not just through cpp. "Syntax error" is here to catch this case.
30920  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30921/* end confdefs.h.  */
30922#ifdef __STDC__
30923# include <limits.h>
30924#else
30925# include <assert.h>
30926#endif
30927		     Syntax error
30928_ACEOF
30929if ac_fn_cxx_try_cpp "$LINENO"; then :
30930
30931else
30932  # Broken: fails on valid input.
30933continue
30934fi
30935rm -f conftest.err conftest.i conftest.$ac_ext
30936
30937  # OK, works on sane cases.  Now check whether nonexistent headers
30938  # can be detected and how.
30939  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30940/* end confdefs.h.  */
30941#include <ac_nonexistent.h>
30942_ACEOF
30943if ac_fn_cxx_try_cpp "$LINENO"; then :
30944  # Broken: success on invalid input.
30945continue
30946else
30947  # Passes both tests.
30948ac_preproc_ok=:
30949break
30950fi
30951rm -f conftest.err conftest.i conftest.$ac_ext
30952
30953done
30954# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30955rm -f conftest.i conftest.err conftest.$ac_ext
30956if $ac_preproc_ok; then :
30957  break
30958fi
30959
30960    done
30961    ac_cv_prog_CXXCPP=$CXXCPP
30962
30963fi
30964  CXXCPP=$ac_cv_prog_CXXCPP
30965else
30966  ac_cv_prog_CXXCPP=$CXXCPP
30967fi
30968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
30969$as_echo "$CXXCPP" >&6; }
30970ac_preproc_ok=false
30971for ac_cxx_preproc_warn_flag in '' yes
30972do
30973  # Use a header file that comes with gcc, so configuring glibc
30974  # with a fresh cross-compiler works.
30975  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30976  # <limits.h> exists even on freestanding compilers.
30977  # On the NeXT, cc -E runs the code through the compiler's parser,
30978  # not just through cpp. "Syntax error" is here to catch this case.
30979  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30980/* end confdefs.h.  */
30981#ifdef __STDC__
30982# include <limits.h>
30983#else
30984# include <assert.h>
30985#endif
30986		     Syntax error
30987_ACEOF
30988if ac_fn_cxx_try_cpp "$LINENO"; then :
30989
30990else
30991  # Broken: fails on valid input.
30992continue
30993fi
30994rm -f conftest.err conftest.i conftest.$ac_ext
30995
30996  # OK, works on sane cases.  Now check whether nonexistent headers
30997  # can be detected and how.
30998  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30999/* end confdefs.h.  */
31000#include <ac_nonexistent.h>
31001_ACEOF
31002if ac_fn_cxx_try_cpp "$LINENO"; then :
31003  # Broken: success on invalid input.
31004continue
31005else
31006  # Passes both tests.
31007ac_preproc_ok=:
31008break
31009fi
31010rm -f conftest.err conftest.i conftest.$ac_ext
31011
31012done
31013# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31014rm -f conftest.i conftest.err conftest.$ac_ext
31015if $ac_preproc_ok; then :
31016
31017else
31018  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31020as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31021See \`config.log' for more details" "$LINENO" 5; }
31022fi
31023
31024ac_ext=cpp
31025ac_cpp='$CXXCPP $CPPFLAGS'
31026ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31027ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31028ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31029
31030
31031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31032
31033  # First separate the path from the arguments. This will split at the first
31034  # space.
31035  complete="$CXXCPP"
31036  path="${complete%% *}"
31037  tmp="$complete EOL"
31038  arguments="${tmp#* }"
31039
31040  # Input might be given as Windows format, start by converting to
31041  # unix format.
31042  new_path=`$CYGPATH -u "$path"`
31043
31044  # Now try to locate executable using which
31045  new_path=`$WHICH "$new_path" 2> /dev/null`
31046  # bat and cmd files are not always considered executable in cygwin causing which
31047  # to not find them
31048  if test "x$new_path" = x \
31049      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31050      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31051    new_path=`$CYGPATH -u "$path"`
31052  fi
31053  if test "x$new_path" = x; then
31054    # Oops. Which didn't find the executable.
31055    # The splitting of arguments from the executable at a space might have been incorrect,
31056    # since paths with space are more likely in Windows. Give it another try with the whole
31057    # argument.
31058    path="$complete"
31059    arguments="EOL"
31060    new_path=`$CYGPATH -u "$path"`
31061    new_path=`$WHICH "$new_path" 2> /dev/null`
31062    # bat and cmd files are not always considered executable in cygwin causing which
31063    # to not find them
31064    if test "x$new_path" = x \
31065        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31066        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31067      new_path=`$CYGPATH -u "$path"`
31068    fi
31069    if test "x$new_path" = x; then
31070      # It's still not found. Now this is an unrecoverable error.
31071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31072$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31073      has_space=`$ECHO "$complete" | $GREP " "`
31074      if test "x$has_space" != x; then
31075        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31076$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31077      fi
31078      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31079    fi
31080  fi
31081
31082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31085  # "foo.exe" is OK but "foo" is an error.
31086  #
31087  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31088  # It is also a way to make sure we got the proper file name for the real test later on.
31089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31090  if test "x$test_shortpath" = x; then
31091    # Short path failed, file does not exist as specified.
31092    # Try adding .exe or .cmd
31093    if test -f "${new_path}.exe"; then
31094      input_to_shortpath="${new_path}.exe"
31095    elif test -f "${new_path}.cmd"; then
31096      input_to_shortpath="${new_path}.cmd"
31097    else
31098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31099$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31100      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31101$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31102      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31103    fi
31104  else
31105    input_to_shortpath="$new_path"
31106  fi
31107
31108  # Call helper function which possibly converts this using DOS-style short mode.
31109  # If so, the updated path is stored in $new_path.
31110  new_path="$input_to_shortpath"
31111
31112  input_path="$input_to_shortpath"
31113  # Check if we need to convert this using DOS-style short mode. If the path
31114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31115  # take no chances and rewrite it.
31116  # Note: m4 eats our [], so we need to use [ and ] instead.
31117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31118  if test "x$has_forbidden_chars" != x; then
31119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31123      # Going to short mode and back again did indeed matter. Since short mode is
31124      # case insensitive, let's make it lowercase to improve readability.
31125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31126      # Now convert it back to Unix-stile (cygpath)
31127      input_path=`$CYGPATH -u "$shortmode_path"`
31128      new_path="$input_path"
31129    fi
31130  fi
31131
31132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31133  if test "x$test_cygdrive_prefix" = x; then
31134    # As a simple fix, exclude /usr/bin since it's not a real path.
31135    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31137      # a path prefixed by /cygdrive for fixpath to work.
31138      new_path="$CYGWIN_ROOT_PATH$input_path"
31139    fi
31140  fi
31141
31142  # remove trailing .exe if any
31143  new_path="${new_path/%.exe/}"
31144
31145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31146
31147  # First separate the path from the arguments. This will split at the first
31148  # space.
31149  complete="$CXXCPP"
31150  path="${complete%% *}"
31151  tmp="$complete EOL"
31152  arguments="${tmp#* }"
31153
31154  # Input might be given as Windows format, start by converting to
31155  # unix format.
31156  new_path="$path"
31157
31158  windows_path="$new_path"
31159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31160    unix_path=`$CYGPATH -u "$windows_path"`
31161    new_path="$unix_path"
31162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31164    new_path="$unix_path"
31165  fi
31166
31167
31168  # Now try to locate executable using which
31169  new_path=`$WHICH "$new_path" 2> /dev/null`
31170
31171  if test "x$new_path" = x; then
31172    # Oops. Which didn't find the executable.
31173    # The splitting of arguments from the executable at a space might have been incorrect,
31174    # since paths with space are more likely in Windows. Give it another try with the whole
31175    # argument.
31176    path="$complete"
31177    arguments="EOL"
31178    new_path="$path"
31179
31180  windows_path="$new_path"
31181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31182    unix_path=`$CYGPATH -u "$windows_path"`
31183    new_path="$unix_path"
31184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31186    new_path="$unix_path"
31187  fi
31188
31189
31190    new_path=`$WHICH "$new_path" 2> /dev/null`
31191
31192    if test "x$new_path" = x; then
31193      # It's still not found. Now this is an unrecoverable error.
31194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31195$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31196      has_space=`$ECHO "$complete" | $GREP " "`
31197      if test "x$has_space" != x; then
31198        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31199$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31200      fi
31201      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31202    fi
31203  fi
31204
31205  # Now new_path has a complete unix path to the binary
31206  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31207    # Keep paths in /bin as-is, but remove trailing .exe if any
31208    new_path="${new_path/%.exe/}"
31209    # Do not save /bin paths to all_fixpath_prefixes!
31210  else
31211    # Not in mixed or Windows style, start by that.
31212    new_path=`cmd //c echo $new_path`
31213
31214  input_path="$new_path"
31215  # Check if we need to convert this using DOS-style short mode. If the path
31216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31217  # take no chances and rewrite it.
31218  # Note: m4 eats our [], so we need to use [ and ] instead.
31219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31220  if test "x$has_forbidden_chars" != x; then
31221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31222    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31223  fi
31224
31225    # Output is in $new_path
31226
31227  windows_path="$new_path"
31228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31229    unix_path=`$CYGPATH -u "$windows_path"`
31230    new_path="$unix_path"
31231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31233    new_path="$unix_path"
31234  fi
31235
31236    # remove trailing .exe if any
31237    new_path="${new_path/%.exe/}"
31238
31239    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31240    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31241  fi
31242
31243  else
31244    # We're on a posix platform. Hooray! :)
31245    # First separate the path from the arguments. This will split at the first
31246    # space.
31247    complete="$CXXCPP"
31248    path="${complete%% *}"
31249    tmp="$complete EOL"
31250    arguments="${tmp#* }"
31251
31252    # Cannot rely on the command "which" here since it doesn't always work.
31253    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31254    if test -z "$is_absolute_path"; then
31255      # Path to executable is not absolute. Find it.
31256      IFS_save="$IFS"
31257      IFS=:
31258      for p in $PATH; do
31259        if test -f "$p/$path" && test -x "$p/$path"; then
31260          new_path="$p/$path"
31261          break
31262        fi
31263      done
31264      IFS="$IFS_save"
31265    else
31266      # This is an absolute path, we can use it without further modifications.
31267      new_path="$path"
31268    fi
31269
31270    if test "x$new_path" = x; then
31271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31272$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31273      has_space=`$ECHO "$complete" | $GREP " "`
31274      if test "x$has_space" != x; then
31275        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31276$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31277      fi
31278      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31279    fi
31280  fi
31281
31282  # Now join together the path and the arguments once again
31283  if test "x$arguments" != xEOL; then
31284    new_complete="$new_path ${arguments% *}"
31285  else
31286    new_complete="$new_path"
31287  fi
31288
31289  if test "x$complete" != "x$new_complete"; then
31290    CXXCPP="$new_complete"
31291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31292$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31293  fi
31294
31295
31296  #
31297  # Setup the linker (LD)
31298  #
31299  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31300    # In the Microsoft toolchain we have a separate LD command "link".
31301    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31302    # a cygwin program for something completely different.
31303    # Extract the first word of "link", so it can be a program name with args.
31304set dummy link; ac_word=$2
31305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31306$as_echo_n "checking for $ac_word... " >&6; }
31307if ${ac_cv_prog_LD+:} false; then :
31308  $as_echo_n "(cached) " >&6
31309else
31310  if test -n "$LD"; then
31311  ac_cv_prog_LD="$LD" # Let the user override the test.
31312else
31313  ac_prog_rejected=no
31314as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31315for as_dir in $PATH
31316do
31317  IFS=$as_save_IFS
31318  test -z "$as_dir" && as_dir=.
31319    for ac_exec_ext in '' $ac_executable_extensions; do
31320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31321    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31322       ac_prog_rejected=yes
31323       continue
31324     fi
31325    ac_cv_prog_LD="link"
31326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31327    break 2
31328  fi
31329done
31330  done
31331IFS=$as_save_IFS
31332
31333if test $ac_prog_rejected = yes; then
31334  # We found a bogon in the path, so make sure we never use it.
31335  set dummy $ac_cv_prog_LD
31336  shift
31337  if test $# != 0; then
31338    # We chose a different compiler from the bogus one.
31339    # However, it has the same basename, so the bogon will be chosen
31340    # first if we set LD to just the basename; use the full file name.
31341    shift
31342    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31343  fi
31344fi
31345fi
31346fi
31347LD=$ac_cv_prog_LD
31348if test -n "$LD"; then
31349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31350$as_echo "$LD" >&6; }
31351else
31352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31353$as_echo "no" >&6; }
31354fi
31355
31356
31357
31358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31359
31360  # First separate the path from the arguments. This will split at the first
31361  # space.
31362  complete="$LD"
31363  path="${complete%% *}"
31364  tmp="$complete EOL"
31365  arguments="${tmp#* }"
31366
31367  # Input might be given as Windows format, start by converting to
31368  # unix format.
31369  new_path=`$CYGPATH -u "$path"`
31370
31371  # Now try to locate executable using which
31372  new_path=`$WHICH "$new_path" 2> /dev/null`
31373  # bat and cmd files are not always considered executable in cygwin causing which
31374  # to not find them
31375  if test "x$new_path" = x \
31376      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31377      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31378    new_path=`$CYGPATH -u "$path"`
31379  fi
31380  if test "x$new_path" = x; then
31381    # Oops. Which didn't find the executable.
31382    # The splitting of arguments from the executable at a space might have been incorrect,
31383    # since paths with space are more likely in Windows. Give it another try with the whole
31384    # argument.
31385    path="$complete"
31386    arguments="EOL"
31387    new_path=`$CYGPATH -u "$path"`
31388    new_path=`$WHICH "$new_path" 2> /dev/null`
31389    # bat and cmd files are not always considered executable in cygwin causing which
31390    # to not find them
31391    if test "x$new_path" = x \
31392        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31393        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31394      new_path=`$CYGPATH -u "$path"`
31395    fi
31396    if test "x$new_path" = x; then
31397      # It's still not found. Now this is an unrecoverable error.
31398      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31399$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31400      has_space=`$ECHO "$complete" | $GREP " "`
31401      if test "x$has_space" != x; then
31402        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31403$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31404      fi
31405      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31406    fi
31407  fi
31408
31409  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31410  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31411  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31412  # "foo.exe" is OK but "foo" is an error.
31413  #
31414  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31415  # It is also a way to make sure we got the proper file name for the real test later on.
31416  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31417  if test "x$test_shortpath" = x; then
31418    # Short path failed, file does not exist as specified.
31419    # Try adding .exe or .cmd
31420    if test -f "${new_path}.exe"; then
31421      input_to_shortpath="${new_path}.exe"
31422    elif test -f "${new_path}.cmd"; then
31423      input_to_shortpath="${new_path}.cmd"
31424    else
31425      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31426$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31427      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31428$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31429      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31430    fi
31431  else
31432    input_to_shortpath="$new_path"
31433  fi
31434
31435  # Call helper function which possibly converts this using DOS-style short mode.
31436  # If so, the updated path is stored in $new_path.
31437  new_path="$input_to_shortpath"
31438
31439  input_path="$input_to_shortpath"
31440  # Check if we need to convert this using DOS-style short mode. If the path
31441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31442  # take no chances and rewrite it.
31443  # Note: m4 eats our [], so we need to use [ and ] instead.
31444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31445  if test "x$has_forbidden_chars" != x; then
31446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31447    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31448    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31449    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31450      # Going to short mode and back again did indeed matter. Since short mode is
31451      # case insensitive, let's make it lowercase to improve readability.
31452      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31453      # Now convert it back to Unix-stile (cygpath)
31454      input_path=`$CYGPATH -u "$shortmode_path"`
31455      new_path="$input_path"
31456    fi
31457  fi
31458
31459  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31460  if test "x$test_cygdrive_prefix" = x; then
31461    # As a simple fix, exclude /usr/bin since it's not a real path.
31462    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31463      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31464      # a path prefixed by /cygdrive for fixpath to work.
31465      new_path="$CYGWIN_ROOT_PATH$input_path"
31466    fi
31467  fi
31468
31469  # remove trailing .exe if any
31470  new_path="${new_path/%.exe/}"
31471
31472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31473
31474  # First separate the path from the arguments. This will split at the first
31475  # space.
31476  complete="$LD"
31477  path="${complete%% *}"
31478  tmp="$complete EOL"
31479  arguments="${tmp#* }"
31480
31481  # Input might be given as Windows format, start by converting to
31482  # unix format.
31483  new_path="$path"
31484
31485  windows_path="$new_path"
31486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31487    unix_path=`$CYGPATH -u "$windows_path"`
31488    new_path="$unix_path"
31489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31491    new_path="$unix_path"
31492  fi
31493
31494
31495  # Now try to locate executable using which
31496  new_path=`$WHICH "$new_path" 2> /dev/null`
31497
31498  if test "x$new_path" = x; then
31499    # Oops. Which didn't find the executable.
31500    # The splitting of arguments from the executable at a space might have been incorrect,
31501    # since paths with space are more likely in Windows. Give it another try with the whole
31502    # argument.
31503    path="$complete"
31504    arguments="EOL"
31505    new_path="$path"
31506
31507  windows_path="$new_path"
31508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31509    unix_path=`$CYGPATH -u "$windows_path"`
31510    new_path="$unix_path"
31511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31513    new_path="$unix_path"
31514  fi
31515
31516
31517    new_path=`$WHICH "$new_path" 2> /dev/null`
31518
31519    if test "x$new_path" = x; then
31520      # It's still not found. Now this is an unrecoverable error.
31521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31522$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31523      has_space=`$ECHO "$complete" | $GREP " "`
31524      if test "x$has_space" != x; then
31525        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31526$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31527      fi
31528      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31529    fi
31530  fi
31531
31532  # Now new_path has a complete unix path to the binary
31533  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31534    # Keep paths in /bin as-is, but remove trailing .exe if any
31535    new_path="${new_path/%.exe/}"
31536    # Do not save /bin paths to all_fixpath_prefixes!
31537  else
31538    # Not in mixed or Windows style, start by that.
31539    new_path=`cmd //c echo $new_path`
31540
31541  input_path="$new_path"
31542  # Check if we need to convert this using DOS-style short mode. If the path
31543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31544  # take no chances and rewrite it.
31545  # Note: m4 eats our [], so we need to use [ and ] instead.
31546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31547  if test "x$has_forbidden_chars" != x; then
31548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31549    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31550  fi
31551
31552    # Output is in $new_path
31553
31554  windows_path="$new_path"
31555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31556    unix_path=`$CYGPATH -u "$windows_path"`
31557    new_path="$unix_path"
31558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31560    new_path="$unix_path"
31561  fi
31562
31563    # remove trailing .exe if any
31564    new_path="${new_path/%.exe/}"
31565
31566    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31567    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31568  fi
31569
31570  else
31571    # We're on a posix platform. Hooray! :)
31572    # First separate the path from the arguments. This will split at the first
31573    # space.
31574    complete="$LD"
31575    path="${complete%% *}"
31576    tmp="$complete EOL"
31577    arguments="${tmp#* }"
31578
31579    # Cannot rely on the command "which" here since it doesn't always work.
31580    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31581    if test -z "$is_absolute_path"; then
31582      # Path to executable is not absolute. Find it.
31583      IFS_save="$IFS"
31584      IFS=:
31585      for p in $PATH; do
31586        if test -f "$p/$path" && test -x "$p/$path"; then
31587          new_path="$p/$path"
31588          break
31589        fi
31590      done
31591      IFS="$IFS_save"
31592    else
31593      # This is an absolute path, we can use it without further modifications.
31594      new_path="$path"
31595    fi
31596
31597    if test "x$new_path" = x; then
31598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31599$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31600      has_space=`$ECHO "$complete" | $GREP " "`
31601      if test "x$has_space" != x; then
31602        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31603$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31604      fi
31605      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31606    fi
31607  fi
31608
31609  # Now join together the path and the arguments once again
31610  if test "x$arguments" != xEOL; then
31611    new_complete="$new_path ${arguments% *}"
31612  else
31613    new_complete="$new_path"
31614  fi
31615
31616  if test "x$complete" != "x$new_complete"; then
31617    LD="$new_complete"
31618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31619$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31620  fi
31621
31622    # Verify that we indeed succeeded with this trick.
31623    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31624$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31625    "$LD" --version > /dev/null
31626    if test $? -eq 0 ; then
31627      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31628$as_echo "no" >&6; }
31629      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31630    else
31631      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31632$as_echo "yes" >&6; }
31633    fi
31634    LDCXX="$LD"
31635  else
31636    # All other toolchains use the compiler to link.
31637    LD="$CC"
31638    LDCXX="$CXX"
31639  fi
31640
31641  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31642
31643
31644  #
31645  # Setup the assembler (AS)
31646  #
31647  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31648    # FIXME: should this really be solaris, or solstudio?
31649
31650
31651  # Publish this variable in the help.
31652
31653
31654  if test "x$AS" = x; then
31655    # The variable is not set by user, try to locate tool using the code snippet
31656    for ac_prog in as
31657do
31658  # Extract the first word of "$ac_prog", so it can be a program name with args.
31659set dummy $ac_prog; ac_word=$2
31660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31661$as_echo_n "checking for $ac_word... " >&6; }
31662if ${ac_cv_path_AS+:} false; then :
31663  $as_echo_n "(cached) " >&6
31664else
31665  case $AS in
31666  [\\/]* | ?:[\\/]*)
31667  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31668  ;;
31669  *)
31670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31671for as_dir in $PATH
31672do
31673  IFS=$as_save_IFS
31674  test -z "$as_dir" && as_dir=.
31675    for ac_exec_ext in '' $ac_executable_extensions; do
31676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31677    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31679    break 2
31680  fi
31681done
31682  done
31683IFS=$as_save_IFS
31684
31685  ;;
31686esac
31687fi
31688AS=$ac_cv_path_AS
31689if test -n "$AS"; then
31690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31691$as_echo "$AS" >&6; }
31692else
31693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31694$as_echo "no" >&6; }
31695fi
31696
31697
31698  test -n "$AS" && break
31699done
31700
31701  else
31702    # The variable is set, but is it from the command line or the environment?
31703
31704    # Try to remove the string !AS! from our list.
31705    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31706    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31707      # If it failed, the variable was not from the command line. Ignore it,
31708      # but warn the user (except for BASH, which is always set by the calling BASH).
31709      if test "xAS" != xBASH; then
31710        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31711$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31712      fi
31713      # Try to locate tool using the code snippet
31714      for ac_prog in as
31715do
31716  # Extract the first word of "$ac_prog", so it can be a program name with args.
31717set dummy $ac_prog; ac_word=$2
31718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31719$as_echo_n "checking for $ac_word... " >&6; }
31720if ${ac_cv_path_AS+:} false; then :
31721  $as_echo_n "(cached) " >&6
31722else
31723  case $AS in
31724  [\\/]* | ?:[\\/]*)
31725  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31726  ;;
31727  *)
31728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31729for as_dir in $PATH
31730do
31731  IFS=$as_save_IFS
31732  test -z "$as_dir" && as_dir=.
31733    for ac_exec_ext in '' $ac_executable_extensions; do
31734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31735    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31737    break 2
31738  fi
31739done
31740  done
31741IFS=$as_save_IFS
31742
31743  ;;
31744esac
31745fi
31746AS=$ac_cv_path_AS
31747if test -n "$AS"; then
31748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31749$as_echo "$AS" >&6; }
31750else
31751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31752$as_echo "no" >&6; }
31753fi
31754
31755
31756  test -n "$AS" && break
31757done
31758
31759    else
31760      # If it succeeded, then it was overridden by the user. We will use it
31761      # for the tool.
31762
31763      # First remove it from the list of overridden variables, so we can test
31764      # for unknown variables in the end.
31765      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31766
31767      # Check if the provided tool contains a complete path.
31768      tool_specified="$AS"
31769      tool_basename="${tool_specified##*/}"
31770      if test "x$tool_basename" = "x$tool_specified"; then
31771        # A command without a complete path is provided, search $PATH.
31772        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
31773$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
31774        # Extract the first word of "$tool_basename", so it can be a program name with args.
31775set dummy $tool_basename; ac_word=$2
31776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31777$as_echo_n "checking for $ac_word... " >&6; }
31778if ${ac_cv_path_AS+:} false; then :
31779  $as_echo_n "(cached) " >&6
31780else
31781  case $AS in
31782  [\\/]* | ?:[\\/]*)
31783  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31784  ;;
31785  *)
31786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31787for as_dir in $PATH
31788do
31789  IFS=$as_save_IFS
31790  test -z "$as_dir" && as_dir=.
31791    for ac_exec_ext in '' $ac_executable_extensions; do
31792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31793    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31795    break 2
31796  fi
31797done
31798  done
31799IFS=$as_save_IFS
31800
31801  ;;
31802esac
31803fi
31804AS=$ac_cv_path_AS
31805if test -n "$AS"; then
31806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31807$as_echo "$AS" >&6; }
31808else
31809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31810$as_echo "no" >&6; }
31811fi
31812
31813
31814        if test "x$AS" = x; then
31815          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31816        fi
31817      else
31818        # Otherwise we believe it is a complete path. Use it as it is.
31819        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
31820$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
31821        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
31822$as_echo_n "checking for AS... " >&6; }
31823        if test ! -x "$tool_specified"; then
31824          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31825$as_echo "not found" >&6; }
31826          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
31827        fi
31828        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31829$as_echo "$tool_specified" >&6; }
31830      fi
31831    fi
31832  fi
31833
31834
31835
31836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31837
31838  # First separate the path from the arguments. This will split at the first
31839  # space.
31840  complete="$AS"
31841  path="${complete%% *}"
31842  tmp="$complete EOL"
31843  arguments="${tmp#* }"
31844
31845  # Input might be given as Windows format, start by converting to
31846  # unix format.
31847  new_path=`$CYGPATH -u "$path"`
31848
31849  # Now try to locate executable using which
31850  new_path=`$WHICH "$new_path" 2> /dev/null`
31851  # bat and cmd files are not always considered executable in cygwin causing which
31852  # to not find them
31853  if test "x$new_path" = x \
31854      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31855      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31856    new_path=`$CYGPATH -u "$path"`
31857  fi
31858  if test "x$new_path" = x; then
31859    # Oops. Which didn't find the executable.
31860    # The splitting of arguments from the executable at a space might have been incorrect,
31861    # since paths with space are more likely in Windows. Give it another try with the whole
31862    # argument.
31863    path="$complete"
31864    arguments="EOL"
31865    new_path=`$CYGPATH -u "$path"`
31866    new_path=`$WHICH "$new_path" 2> /dev/null`
31867    # bat and cmd files are not always considered executable in cygwin causing which
31868    # to not find them
31869    if test "x$new_path" = x \
31870        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31871        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31872      new_path=`$CYGPATH -u "$path"`
31873    fi
31874    if test "x$new_path" = x; then
31875      # It's still not found. Now this is an unrecoverable error.
31876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31877$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31878      has_space=`$ECHO "$complete" | $GREP " "`
31879      if test "x$has_space" != x; then
31880        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31881$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31882      fi
31883      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31884    fi
31885  fi
31886
31887  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31888  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31889  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31890  # "foo.exe" is OK but "foo" is an error.
31891  #
31892  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31893  # It is also a way to make sure we got the proper file name for the real test later on.
31894  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31895  if test "x$test_shortpath" = x; then
31896    # Short path failed, file does not exist as specified.
31897    # Try adding .exe or .cmd
31898    if test -f "${new_path}.exe"; then
31899      input_to_shortpath="${new_path}.exe"
31900    elif test -f "${new_path}.cmd"; then
31901      input_to_shortpath="${new_path}.cmd"
31902    else
31903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
31904$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
31905      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31906$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31907      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31908    fi
31909  else
31910    input_to_shortpath="$new_path"
31911  fi
31912
31913  # Call helper function which possibly converts this using DOS-style short mode.
31914  # If so, the updated path is stored in $new_path.
31915  new_path="$input_to_shortpath"
31916
31917  input_path="$input_to_shortpath"
31918  # Check if we need to convert this using DOS-style short mode. If the path
31919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31920  # take no chances and rewrite it.
31921  # Note: m4 eats our [], so we need to use [ and ] instead.
31922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31923  if test "x$has_forbidden_chars" != x; then
31924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31925    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31926    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31927    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31928      # Going to short mode and back again did indeed matter. Since short mode is
31929      # case insensitive, let's make it lowercase to improve readability.
31930      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31931      # Now convert it back to Unix-stile (cygpath)
31932      input_path=`$CYGPATH -u "$shortmode_path"`
31933      new_path="$input_path"
31934    fi
31935  fi
31936
31937  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31938  if test "x$test_cygdrive_prefix" = x; then
31939    # As a simple fix, exclude /usr/bin since it's not a real path.
31940    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31941      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31942      # a path prefixed by /cygdrive for fixpath to work.
31943      new_path="$CYGWIN_ROOT_PATH$input_path"
31944    fi
31945  fi
31946
31947  # remove trailing .exe if any
31948  new_path="${new_path/%.exe/}"
31949
31950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31951
31952  # First separate the path from the arguments. This will split at the first
31953  # space.
31954  complete="$AS"
31955  path="${complete%% *}"
31956  tmp="$complete EOL"
31957  arguments="${tmp#* }"
31958
31959  # Input might be given as Windows format, start by converting to
31960  # unix format.
31961  new_path="$path"
31962
31963  windows_path="$new_path"
31964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31965    unix_path=`$CYGPATH -u "$windows_path"`
31966    new_path="$unix_path"
31967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31969    new_path="$unix_path"
31970  fi
31971
31972
31973  # Now try to locate executable using which
31974  new_path=`$WHICH "$new_path" 2> /dev/null`
31975
31976  if test "x$new_path" = x; then
31977    # Oops. Which didn't find the executable.
31978    # The splitting of arguments from the executable at a space might have been incorrect,
31979    # since paths with space are more likely in Windows. Give it another try with the whole
31980    # argument.
31981    path="$complete"
31982    arguments="EOL"
31983    new_path="$path"
31984
31985  windows_path="$new_path"
31986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31987    unix_path=`$CYGPATH -u "$windows_path"`
31988    new_path="$unix_path"
31989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31991    new_path="$unix_path"
31992  fi
31993
31994
31995    new_path=`$WHICH "$new_path" 2> /dev/null`
31996
31997    if test "x$new_path" = x; then
31998      # It's still not found. Now this is an unrecoverable error.
31999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32000$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32001      has_space=`$ECHO "$complete" | $GREP " "`
32002      if test "x$has_space" != x; then
32003        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32004$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32005      fi
32006      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32007    fi
32008  fi
32009
32010  # Now new_path has a complete unix path to the binary
32011  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32012    # Keep paths in /bin as-is, but remove trailing .exe if any
32013    new_path="${new_path/%.exe/}"
32014    # Do not save /bin paths to all_fixpath_prefixes!
32015  else
32016    # Not in mixed or Windows style, start by that.
32017    new_path=`cmd //c echo $new_path`
32018
32019  input_path="$new_path"
32020  # Check if we need to convert this using DOS-style short mode. If the path
32021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32022  # take no chances and rewrite it.
32023  # Note: m4 eats our [], so we need to use [ and ] instead.
32024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32025  if test "x$has_forbidden_chars" != x; then
32026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32027    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32028  fi
32029
32030    # Output is in $new_path
32031
32032  windows_path="$new_path"
32033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32034    unix_path=`$CYGPATH -u "$windows_path"`
32035    new_path="$unix_path"
32036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32038    new_path="$unix_path"
32039  fi
32040
32041    # remove trailing .exe if any
32042    new_path="${new_path/%.exe/}"
32043
32044    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32045    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32046  fi
32047
32048  else
32049    # We're on a posix platform. Hooray! :)
32050    # First separate the path from the arguments. This will split at the first
32051    # space.
32052    complete="$AS"
32053    path="${complete%% *}"
32054    tmp="$complete EOL"
32055    arguments="${tmp#* }"
32056
32057    # Cannot rely on the command "which" here since it doesn't always work.
32058    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32059    if test -z "$is_absolute_path"; then
32060      # Path to executable is not absolute. Find it.
32061      IFS_save="$IFS"
32062      IFS=:
32063      for p in $PATH; do
32064        if test -f "$p/$path" && test -x "$p/$path"; then
32065          new_path="$p/$path"
32066          break
32067        fi
32068      done
32069      IFS="$IFS_save"
32070    else
32071      # This is an absolute path, we can use it without further modifications.
32072      new_path="$path"
32073    fi
32074
32075    if test "x$new_path" = x; then
32076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32077$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32078      has_space=`$ECHO "$complete" | $GREP " "`
32079      if test "x$has_space" != x; then
32080        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32081$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32082      fi
32083      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32084    fi
32085  fi
32086
32087  # Now join together the path and the arguments once again
32088  if test "x$arguments" != xEOL; then
32089    new_complete="$new_path ${arguments% *}"
32090  else
32091    new_complete="$new_path"
32092  fi
32093
32094  if test "x$complete" != "x$new_complete"; then
32095    AS="$new_complete"
32096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32097$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32098  fi
32099
32100  else
32101    # FIXME: is this correct for microsoft?
32102    AS="$CC -c"
32103  fi
32104
32105
32106  #
32107  # Setup the archiver (AR)
32108  #
32109  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32110    # The corresponding ar tool is lib.exe (used to create static libraries)
32111    # Extract the first word of "lib", so it can be a program name with args.
32112set dummy lib; ac_word=$2
32113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32114$as_echo_n "checking for $ac_word... " >&6; }
32115if ${ac_cv_prog_AR+:} false; then :
32116  $as_echo_n "(cached) " >&6
32117else
32118  if test -n "$AR"; then
32119  ac_cv_prog_AR="$AR" # Let the user override the test.
32120else
32121as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32122for as_dir in $PATH
32123do
32124  IFS=$as_save_IFS
32125  test -z "$as_dir" && as_dir=.
32126    for ac_exec_ext in '' $ac_executable_extensions; do
32127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32128    ac_cv_prog_AR="lib"
32129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32130    break 2
32131  fi
32132done
32133  done
32134IFS=$as_save_IFS
32135
32136fi
32137fi
32138AR=$ac_cv_prog_AR
32139if test -n "$AR"; then
32140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32141$as_echo "$AR" >&6; }
32142else
32143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32144$as_echo "no" >&6; }
32145fi
32146
32147
32148  else
32149
32150
32151  # Publish this variable in the help.
32152
32153
32154  if test "x$AR" = x; then
32155    # The variable is not set by user, try to locate tool using the code snippet
32156    if test -n "$ac_tool_prefix"; then
32157  for ac_prog in ar
32158  do
32159    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32160set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32162$as_echo_n "checking for $ac_word... " >&6; }
32163if ${ac_cv_prog_AR+:} false; then :
32164  $as_echo_n "(cached) " >&6
32165else
32166  if test -n "$AR"; then
32167  ac_cv_prog_AR="$AR" # Let the user override the test.
32168else
32169as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32170for as_dir in $PATH
32171do
32172  IFS=$as_save_IFS
32173  test -z "$as_dir" && as_dir=.
32174    for ac_exec_ext in '' $ac_executable_extensions; do
32175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32176    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32178    break 2
32179  fi
32180done
32181  done
32182IFS=$as_save_IFS
32183
32184fi
32185fi
32186AR=$ac_cv_prog_AR
32187if test -n "$AR"; then
32188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32189$as_echo "$AR" >&6; }
32190else
32191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32192$as_echo "no" >&6; }
32193fi
32194
32195
32196    test -n "$AR" && break
32197  done
32198fi
32199if test -z "$AR"; then
32200  ac_ct_AR=$AR
32201  for ac_prog in ar
32202do
32203  # Extract the first word of "$ac_prog", so it can be a program name with args.
32204set dummy $ac_prog; ac_word=$2
32205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32206$as_echo_n "checking for $ac_word... " >&6; }
32207if ${ac_cv_prog_ac_ct_AR+:} false; then :
32208  $as_echo_n "(cached) " >&6
32209else
32210  if test -n "$ac_ct_AR"; then
32211  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32212else
32213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32214for as_dir in $PATH
32215do
32216  IFS=$as_save_IFS
32217  test -z "$as_dir" && as_dir=.
32218    for ac_exec_ext in '' $ac_executable_extensions; do
32219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32220    ac_cv_prog_ac_ct_AR="$ac_prog"
32221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32222    break 2
32223  fi
32224done
32225  done
32226IFS=$as_save_IFS
32227
32228fi
32229fi
32230ac_ct_AR=$ac_cv_prog_ac_ct_AR
32231if test -n "$ac_ct_AR"; then
32232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32233$as_echo "$ac_ct_AR" >&6; }
32234else
32235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32236$as_echo "no" >&6; }
32237fi
32238
32239
32240  test -n "$ac_ct_AR" && break
32241done
32242
32243  if test "x$ac_ct_AR" = x; then
32244    AR=""
32245  else
32246    case $cross_compiling:$ac_tool_warned in
32247yes:)
32248{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32249$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32250ac_tool_warned=yes ;;
32251esac
32252    AR=$ac_ct_AR
32253  fi
32254fi
32255
32256  else
32257    # The variable is set, but is it from the command line or the environment?
32258
32259    # Try to remove the string !AR! from our list.
32260    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32261    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32262      # If it failed, the variable was not from the command line. Ignore it,
32263      # but warn the user (except for BASH, which is always set by the calling BASH).
32264      if test "xAR" != xBASH; then
32265        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32266$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32267      fi
32268      # Try to locate tool using the code snippet
32269      if test -n "$ac_tool_prefix"; then
32270  for ac_prog in ar
32271  do
32272    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32273set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32275$as_echo_n "checking for $ac_word... " >&6; }
32276if ${ac_cv_prog_AR+:} false; then :
32277  $as_echo_n "(cached) " >&6
32278else
32279  if test -n "$AR"; then
32280  ac_cv_prog_AR="$AR" # Let the user override the test.
32281else
32282as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32283for as_dir in $PATH
32284do
32285  IFS=$as_save_IFS
32286  test -z "$as_dir" && as_dir=.
32287    for ac_exec_ext in '' $ac_executable_extensions; do
32288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32289    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32291    break 2
32292  fi
32293done
32294  done
32295IFS=$as_save_IFS
32296
32297fi
32298fi
32299AR=$ac_cv_prog_AR
32300if test -n "$AR"; then
32301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32302$as_echo "$AR" >&6; }
32303else
32304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32305$as_echo "no" >&6; }
32306fi
32307
32308
32309    test -n "$AR" && break
32310  done
32311fi
32312if test -z "$AR"; then
32313  ac_ct_AR=$AR
32314  for ac_prog in ar
32315do
32316  # Extract the first word of "$ac_prog", so it can be a program name with args.
32317set dummy $ac_prog; ac_word=$2
32318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32319$as_echo_n "checking for $ac_word... " >&6; }
32320if ${ac_cv_prog_ac_ct_AR+:} false; then :
32321  $as_echo_n "(cached) " >&6
32322else
32323  if test -n "$ac_ct_AR"; then
32324  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32325else
32326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32327for as_dir in $PATH
32328do
32329  IFS=$as_save_IFS
32330  test -z "$as_dir" && as_dir=.
32331    for ac_exec_ext in '' $ac_executable_extensions; do
32332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32333    ac_cv_prog_ac_ct_AR="$ac_prog"
32334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32335    break 2
32336  fi
32337done
32338  done
32339IFS=$as_save_IFS
32340
32341fi
32342fi
32343ac_ct_AR=$ac_cv_prog_ac_ct_AR
32344if test -n "$ac_ct_AR"; then
32345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32346$as_echo "$ac_ct_AR" >&6; }
32347else
32348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32349$as_echo "no" >&6; }
32350fi
32351
32352
32353  test -n "$ac_ct_AR" && break
32354done
32355
32356  if test "x$ac_ct_AR" = x; then
32357    AR=""
32358  else
32359    case $cross_compiling:$ac_tool_warned in
32360yes:)
32361{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32362$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32363ac_tool_warned=yes ;;
32364esac
32365    AR=$ac_ct_AR
32366  fi
32367fi
32368
32369    else
32370      # If it succeeded, then it was overridden by the user. We will use it
32371      # for the tool.
32372
32373      # First remove it from the list of overridden variables, so we can test
32374      # for unknown variables in the end.
32375      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32376
32377      # Check if the provided tool contains a complete path.
32378      tool_specified="$AR"
32379      tool_basename="${tool_specified##*/}"
32380      if test "x$tool_basename" = "x$tool_specified"; then
32381        # A command without a complete path is provided, search $PATH.
32382        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32383$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32384        # Extract the first word of "$tool_basename", so it can be a program name with args.
32385set dummy $tool_basename; ac_word=$2
32386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32387$as_echo_n "checking for $ac_word... " >&6; }
32388if ${ac_cv_path_AR+:} false; then :
32389  $as_echo_n "(cached) " >&6
32390else
32391  case $AR in
32392  [\\/]* | ?:[\\/]*)
32393  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32394  ;;
32395  *)
32396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32397for as_dir in $PATH
32398do
32399  IFS=$as_save_IFS
32400  test -z "$as_dir" && as_dir=.
32401    for ac_exec_ext in '' $ac_executable_extensions; do
32402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32403    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32405    break 2
32406  fi
32407done
32408  done
32409IFS=$as_save_IFS
32410
32411  ;;
32412esac
32413fi
32414AR=$ac_cv_path_AR
32415if test -n "$AR"; then
32416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32417$as_echo "$AR" >&6; }
32418else
32419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32420$as_echo "no" >&6; }
32421fi
32422
32423
32424        if test "x$AR" = x; then
32425          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32426        fi
32427      else
32428        # Otherwise we believe it is a complete path. Use it as it is.
32429        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32430$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32431        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32432$as_echo_n "checking for AR... " >&6; }
32433        if test ! -x "$tool_specified"; then
32434          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32435$as_echo "not found" >&6; }
32436          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32437        fi
32438        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32439$as_echo "$tool_specified" >&6; }
32440      fi
32441    fi
32442  fi
32443
32444
32445  fi
32446
32447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32448
32449  # First separate the path from the arguments. This will split at the first
32450  # space.
32451  complete="$AR"
32452  path="${complete%% *}"
32453  tmp="$complete EOL"
32454  arguments="${tmp#* }"
32455
32456  # Input might be given as Windows format, start by converting to
32457  # unix format.
32458  new_path=`$CYGPATH -u "$path"`
32459
32460  # Now try to locate executable using which
32461  new_path=`$WHICH "$new_path" 2> /dev/null`
32462  # bat and cmd files are not always considered executable in cygwin causing which
32463  # to not find them
32464  if test "x$new_path" = x \
32465      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32466      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32467    new_path=`$CYGPATH -u "$path"`
32468  fi
32469  if test "x$new_path" = x; then
32470    # Oops. Which didn't find the executable.
32471    # The splitting of arguments from the executable at a space might have been incorrect,
32472    # since paths with space are more likely in Windows. Give it another try with the whole
32473    # argument.
32474    path="$complete"
32475    arguments="EOL"
32476    new_path=`$CYGPATH -u "$path"`
32477    new_path=`$WHICH "$new_path" 2> /dev/null`
32478    # bat and cmd files are not always considered executable in cygwin causing which
32479    # to not find them
32480    if test "x$new_path" = x \
32481        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32482        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32483      new_path=`$CYGPATH -u "$path"`
32484    fi
32485    if test "x$new_path" = x; then
32486      # It's still not found. Now this is an unrecoverable error.
32487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32488$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32489      has_space=`$ECHO "$complete" | $GREP " "`
32490      if test "x$has_space" != x; then
32491        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32492$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32493      fi
32494      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32495    fi
32496  fi
32497
32498  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32499  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32500  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32501  # "foo.exe" is OK but "foo" is an error.
32502  #
32503  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32504  # It is also a way to make sure we got the proper file name for the real test later on.
32505  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32506  if test "x$test_shortpath" = x; then
32507    # Short path failed, file does not exist as specified.
32508    # Try adding .exe or .cmd
32509    if test -f "${new_path}.exe"; then
32510      input_to_shortpath="${new_path}.exe"
32511    elif test -f "${new_path}.cmd"; then
32512      input_to_shortpath="${new_path}.cmd"
32513    else
32514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32515$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32516      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32517$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32518      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32519    fi
32520  else
32521    input_to_shortpath="$new_path"
32522  fi
32523
32524  # Call helper function which possibly converts this using DOS-style short mode.
32525  # If so, the updated path is stored in $new_path.
32526  new_path="$input_to_shortpath"
32527
32528  input_path="$input_to_shortpath"
32529  # Check if we need to convert this using DOS-style short mode. If the path
32530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32531  # take no chances and rewrite it.
32532  # Note: m4 eats our [], so we need to use [ and ] instead.
32533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32534  if test "x$has_forbidden_chars" != x; then
32535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32536    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32537    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32538    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32539      # Going to short mode and back again did indeed matter. Since short mode is
32540      # case insensitive, let's make it lowercase to improve readability.
32541      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32542      # Now convert it back to Unix-stile (cygpath)
32543      input_path=`$CYGPATH -u "$shortmode_path"`
32544      new_path="$input_path"
32545    fi
32546  fi
32547
32548  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32549  if test "x$test_cygdrive_prefix" = x; then
32550    # As a simple fix, exclude /usr/bin since it's not a real path.
32551    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32552      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32553      # a path prefixed by /cygdrive for fixpath to work.
32554      new_path="$CYGWIN_ROOT_PATH$input_path"
32555    fi
32556  fi
32557
32558  # remove trailing .exe if any
32559  new_path="${new_path/%.exe/}"
32560
32561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32562
32563  # First separate the path from the arguments. This will split at the first
32564  # space.
32565  complete="$AR"
32566  path="${complete%% *}"
32567  tmp="$complete EOL"
32568  arguments="${tmp#* }"
32569
32570  # Input might be given as Windows format, start by converting to
32571  # unix format.
32572  new_path="$path"
32573
32574  windows_path="$new_path"
32575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32576    unix_path=`$CYGPATH -u "$windows_path"`
32577    new_path="$unix_path"
32578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32580    new_path="$unix_path"
32581  fi
32582
32583
32584  # Now try to locate executable using which
32585  new_path=`$WHICH "$new_path" 2> /dev/null`
32586
32587  if test "x$new_path" = x; then
32588    # Oops. Which didn't find the executable.
32589    # The splitting of arguments from the executable at a space might have been incorrect,
32590    # since paths with space are more likely in Windows. Give it another try with the whole
32591    # argument.
32592    path="$complete"
32593    arguments="EOL"
32594    new_path="$path"
32595
32596  windows_path="$new_path"
32597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32598    unix_path=`$CYGPATH -u "$windows_path"`
32599    new_path="$unix_path"
32600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32602    new_path="$unix_path"
32603  fi
32604
32605
32606    new_path=`$WHICH "$new_path" 2> /dev/null`
32607
32608    if test "x$new_path" = x; then
32609      # It's still not found. Now this is an unrecoverable error.
32610      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32611$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32612      has_space=`$ECHO "$complete" | $GREP " "`
32613      if test "x$has_space" != x; then
32614        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32615$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32616      fi
32617      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32618    fi
32619  fi
32620
32621  # Now new_path has a complete unix path to the binary
32622  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32623    # Keep paths in /bin as-is, but remove trailing .exe if any
32624    new_path="${new_path/%.exe/}"
32625    # Do not save /bin paths to all_fixpath_prefixes!
32626  else
32627    # Not in mixed or Windows style, start by that.
32628    new_path=`cmd //c echo $new_path`
32629
32630  input_path="$new_path"
32631  # Check if we need to convert this using DOS-style short mode. If the path
32632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32633  # take no chances and rewrite it.
32634  # Note: m4 eats our [], so we need to use [ and ] instead.
32635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32636  if test "x$has_forbidden_chars" != x; then
32637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32639  fi
32640
32641    # Output is in $new_path
32642
32643  windows_path="$new_path"
32644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32645    unix_path=`$CYGPATH -u "$windows_path"`
32646    new_path="$unix_path"
32647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32649    new_path="$unix_path"
32650  fi
32651
32652    # remove trailing .exe if any
32653    new_path="${new_path/%.exe/}"
32654
32655    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32656    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32657  fi
32658
32659  else
32660    # We're on a posix platform. Hooray! :)
32661    # First separate the path from the arguments. This will split at the first
32662    # space.
32663    complete="$AR"
32664    path="${complete%% *}"
32665    tmp="$complete EOL"
32666    arguments="${tmp#* }"
32667
32668    # Cannot rely on the command "which" here since it doesn't always work.
32669    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32670    if test -z "$is_absolute_path"; then
32671      # Path to executable is not absolute. Find it.
32672      IFS_save="$IFS"
32673      IFS=:
32674      for p in $PATH; do
32675        if test -f "$p/$path" && test -x "$p/$path"; then
32676          new_path="$p/$path"
32677          break
32678        fi
32679      done
32680      IFS="$IFS_save"
32681    else
32682      # This is an absolute path, we can use it without further modifications.
32683      new_path="$path"
32684    fi
32685
32686    if test "x$new_path" = x; then
32687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32688$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32689      has_space=`$ECHO "$complete" | $GREP " "`
32690      if test "x$has_space" != x; then
32691        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32692$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32693      fi
32694      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32695    fi
32696  fi
32697
32698  # Now join together the path and the arguments once again
32699  if test "x$arguments" != xEOL; then
32700    new_complete="$new_path ${arguments% *}"
32701  else
32702    new_complete="$new_path"
32703  fi
32704
32705  if test "x$complete" != "x$new_complete"; then
32706    AR="$new_complete"
32707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32708$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32709  fi
32710
32711
32712
32713  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32714    ac_ext=m
32715ac_cpp='$OBJCPP $CPPFLAGS'
32716ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32717ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32718ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32719if test -n "$ac_tool_prefix"; then
32720  for ac_prog in gcc objcc objc cc CC
32721  do
32722    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32723set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32725$as_echo_n "checking for $ac_word... " >&6; }
32726if ${ac_cv_prog_OBJC+:} false; then :
32727  $as_echo_n "(cached) " >&6
32728else
32729  if test -n "$OBJC"; then
32730  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32731else
32732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32733for as_dir in $PATH
32734do
32735  IFS=$as_save_IFS
32736  test -z "$as_dir" && as_dir=.
32737    for ac_exec_ext in '' $ac_executable_extensions; do
32738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32739    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32741    break 2
32742  fi
32743done
32744  done
32745IFS=$as_save_IFS
32746
32747fi
32748fi
32749OBJC=$ac_cv_prog_OBJC
32750if test -n "$OBJC"; then
32751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32752$as_echo "$OBJC" >&6; }
32753else
32754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32755$as_echo "no" >&6; }
32756fi
32757
32758
32759    test -n "$OBJC" && break
32760  done
32761fi
32762if test -z "$OBJC"; then
32763  ac_ct_OBJC=$OBJC
32764  for ac_prog in gcc objcc objc cc CC
32765do
32766  # Extract the first word of "$ac_prog", so it can be a program name with args.
32767set dummy $ac_prog; ac_word=$2
32768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32769$as_echo_n "checking for $ac_word... " >&6; }
32770if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32771  $as_echo_n "(cached) " >&6
32772else
32773  if test -n "$ac_ct_OBJC"; then
32774  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32775else
32776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32777for as_dir in $PATH
32778do
32779  IFS=$as_save_IFS
32780  test -z "$as_dir" && as_dir=.
32781    for ac_exec_ext in '' $ac_executable_extensions; do
32782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32783    ac_cv_prog_ac_ct_OBJC="$ac_prog"
32784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32785    break 2
32786  fi
32787done
32788  done
32789IFS=$as_save_IFS
32790
32791fi
32792fi
32793ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32794if test -n "$ac_ct_OBJC"; then
32795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32796$as_echo "$ac_ct_OBJC" >&6; }
32797else
32798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32799$as_echo "no" >&6; }
32800fi
32801
32802
32803  test -n "$ac_ct_OBJC" && break
32804done
32805
32806  if test "x$ac_ct_OBJC" = x; then
32807    OBJC="gcc"
32808  else
32809    case $cross_compiling:$ac_tool_warned in
32810yes:)
32811{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32812$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32813ac_tool_warned=yes ;;
32814esac
32815    OBJC=$ac_ct_OBJC
32816  fi
32817fi
32818
32819# Provide some information about the compiler.
32820$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32821set X $ac_compile
32822ac_compiler=$2
32823for ac_option in --version -v -V -qversion; do
32824  { { ac_try="$ac_compiler $ac_option >&5"
32825case "(($ac_try" in
32826  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32827  *) ac_try_echo=$ac_try;;
32828esac
32829eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32830$as_echo "$ac_try_echo"; } >&5
32831  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32832  ac_status=$?
32833  if test -s conftest.err; then
32834    sed '10a\
32835... rest of stderr output deleted ...
32836         10q' conftest.err >conftest.er1
32837    cat conftest.er1 >&5
32838  fi
32839  rm -f conftest.er1 conftest.err
32840  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32841  test $ac_status = 0; }
32842done
32843
32844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
32845$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
32846if ${ac_cv_objc_compiler_gnu+:} false; then :
32847  $as_echo_n "(cached) " >&6
32848else
32849  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32850/* end confdefs.h.  */
32851
32852int
32853main ()
32854{
32855#ifndef __GNUC__
32856       choke me
32857#endif
32858
32859  ;
32860  return 0;
32861}
32862_ACEOF
32863if ac_fn_objc_try_compile "$LINENO"; then :
32864  ac_compiler_gnu=yes
32865else
32866  ac_compiler_gnu=no
32867fi
32868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32869ac_cv_objc_compiler_gnu=$ac_compiler_gnu
32870
32871fi
32872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
32873$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
32874if test $ac_compiler_gnu = yes; then
32875  GOBJC=yes
32876else
32877  GOBJC=
32878fi
32879ac_test_OBJCFLAGS=${OBJCFLAGS+set}
32880ac_save_OBJCFLAGS=$OBJCFLAGS
32881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
32882$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
32883if ${ac_cv_prog_objc_g+:} false; then :
32884  $as_echo_n "(cached) " >&6
32885else
32886  ac_save_objc_werror_flag=$ac_objc_werror_flag
32887   ac_objc_werror_flag=yes
32888   ac_cv_prog_objc_g=no
32889   OBJCFLAGS="-g"
32890   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32891/* end confdefs.h.  */
32892
32893int
32894main ()
32895{
32896
32897  ;
32898  return 0;
32899}
32900_ACEOF
32901if ac_fn_objc_try_compile "$LINENO"; then :
32902  ac_cv_prog_objc_g=yes
32903else
32904  OBJCFLAGS=""
32905      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32906/* end confdefs.h.  */
32907
32908int
32909main ()
32910{
32911
32912  ;
32913  return 0;
32914}
32915_ACEOF
32916if ac_fn_objc_try_compile "$LINENO"; then :
32917
32918else
32919  ac_objc_werror_flag=$ac_save_objc_werror_flag
32920	 OBJCFLAGS="-g"
32921	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32922/* end confdefs.h.  */
32923
32924int
32925main ()
32926{
32927
32928  ;
32929  return 0;
32930}
32931_ACEOF
32932if ac_fn_objc_try_compile "$LINENO"; then :
32933  ac_cv_prog_objc_g=yes
32934fi
32935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32936fi
32937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32938fi
32939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32940   ac_objc_werror_flag=$ac_save_objc_werror_flag
32941fi
32942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
32943$as_echo "$ac_cv_prog_objc_g" >&6; }
32944if test "$ac_test_OBJCFLAGS" = set; then
32945  OBJCFLAGS=$ac_save_OBJCFLAGS
32946elif test $ac_cv_prog_objc_g = yes; then
32947  if test "$GOBJC" = yes; then
32948    OBJCFLAGS="-g -O2"
32949  else
32950    OBJCFLAGS="-g"
32951  fi
32952else
32953  if test "$GOBJC" = yes; then
32954    OBJCFLAGS="-O2"
32955  else
32956    OBJCFLAGS=
32957  fi
32958fi
32959ac_ext=cpp
32960ac_cpp='$CXXCPP $CPPFLAGS'
32961ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32962ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32963ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32964
32965
32966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32967
32968  # First separate the path from the arguments. This will split at the first
32969  # space.
32970  complete="$OBJC"
32971  path="${complete%% *}"
32972  tmp="$complete EOL"
32973  arguments="${tmp#* }"
32974
32975  # Input might be given as Windows format, start by converting to
32976  # unix format.
32977  new_path=`$CYGPATH -u "$path"`
32978
32979  # Now try to locate executable using which
32980  new_path=`$WHICH "$new_path" 2> /dev/null`
32981  # bat and cmd files are not always considered executable in cygwin causing which
32982  # to not find them
32983  if test "x$new_path" = x \
32984      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32985      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32986    new_path=`$CYGPATH -u "$path"`
32987  fi
32988  if test "x$new_path" = x; then
32989    # Oops. Which didn't find the executable.
32990    # The splitting of arguments from the executable at a space might have been incorrect,
32991    # since paths with space are more likely in Windows. Give it another try with the whole
32992    # argument.
32993    path="$complete"
32994    arguments="EOL"
32995    new_path=`$CYGPATH -u "$path"`
32996    new_path=`$WHICH "$new_path" 2> /dev/null`
32997    # bat and cmd files are not always considered executable in cygwin causing which
32998    # to not find them
32999    if test "x$new_path" = x \
33000        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33001        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33002      new_path=`$CYGPATH -u "$path"`
33003    fi
33004    if test "x$new_path" = x; then
33005      # It's still not found. Now this is an unrecoverable error.
33006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33007$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33008      has_space=`$ECHO "$complete" | $GREP " "`
33009      if test "x$has_space" != x; then
33010        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33011$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33012      fi
33013      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33014    fi
33015  fi
33016
33017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33020  # "foo.exe" is OK but "foo" is an error.
33021  #
33022  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33023  # It is also a way to make sure we got the proper file name for the real test later on.
33024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33025  if test "x$test_shortpath" = x; then
33026    # Short path failed, file does not exist as specified.
33027    # Try adding .exe or .cmd
33028    if test -f "${new_path}.exe"; then
33029      input_to_shortpath="${new_path}.exe"
33030    elif test -f "${new_path}.cmd"; then
33031      input_to_shortpath="${new_path}.cmd"
33032    else
33033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33034$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33035      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33036$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33037      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33038    fi
33039  else
33040    input_to_shortpath="$new_path"
33041  fi
33042
33043  # Call helper function which possibly converts this using DOS-style short mode.
33044  # If so, the updated path is stored in $new_path.
33045  new_path="$input_to_shortpath"
33046
33047  input_path="$input_to_shortpath"
33048  # Check if we need to convert this using DOS-style short mode. If the path
33049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33050  # take no chances and rewrite it.
33051  # Note: m4 eats our [], so we need to use [ and ] instead.
33052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33053  if test "x$has_forbidden_chars" != x; then
33054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33058      # Going to short mode and back again did indeed matter. Since short mode is
33059      # case insensitive, let's make it lowercase to improve readability.
33060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33061      # Now convert it back to Unix-stile (cygpath)
33062      input_path=`$CYGPATH -u "$shortmode_path"`
33063      new_path="$input_path"
33064    fi
33065  fi
33066
33067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33068  if test "x$test_cygdrive_prefix" = x; then
33069    # As a simple fix, exclude /usr/bin since it's not a real path.
33070    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33072      # a path prefixed by /cygdrive for fixpath to work.
33073      new_path="$CYGWIN_ROOT_PATH$input_path"
33074    fi
33075  fi
33076
33077  # remove trailing .exe if any
33078  new_path="${new_path/%.exe/}"
33079
33080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33081
33082  # First separate the path from the arguments. This will split at the first
33083  # space.
33084  complete="$OBJC"
33085  path="${complete%% *}"
33086  tmp="$complete EOL"
33087  arguments="${tmp#* }"
33088
33089  # Input might be given as Windows format, start by converting to
33090  # unix format.
33091  new_path="$path"
33092
33093  windows_path="$new_path"
33094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33095    unix_path=`$CYGPATH -u "$windows_path"`
33096    new_path="$unix_path"
33097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33099    new_path="$unix_path"
33100  fi
33101
33102
33103  # Now try to locate executable using which
33104  new_path=`$WHICH "$new_path" 2> /dev/null`
33105
33106  if test "x$new_path" = x; then
33107    # Oops. Which didn't find the executable.
33108    # The splitting of arguments from the executable at a space might have been incorrect,
33109    # since paths with space are more likely in Windows. Give it another try with the whole
33110    # argument.
33111    path="$complete"
33112    arguments="EOL"
33113    new_path="$path"
33114
33115  windows_path="$new_path"
33116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33117    unix_path=`$CYGPATH -u "$windows_path"`
33118    new_path="$unix_path"
33119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33121    new_path="$unix_path"
33122  fi
33123
33124
33125    new_path=`$WHICH "$new_path" 2> /dev/null`
33126
33127    if test "x$new_path" = x; then
33128      # It's still not found. Now this is an unrecoverable error.
33129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33130$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33131      has_space=`$ECHO "$complete" | $GREP " "`
33132      if test "x$has_space" != x; then
33133        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33134$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33135      fi
33136      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33137    fi
33138  fi
33139
33140  # Now new_path has a complete unix path to the binary
33141  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33142    # Keep paths in /bin as-is, but remove trailing .exe if any
33143    new_path="${new_path/%.exe/}"
33144    # Do not save /bin paths to all_fixpath_prefixes!
33145  else
33146    # Not in mixed or Windows style, start by that.
33147    new_path=`cmd //c echo $new_path`
33148
33149  input_path="$new_path"
33150  # Check if we need to convert this using DOS-style short mode. If the path
33151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33152  # take no chances and rewrite it.
33153  # Note: m4 eats our [], so we need to use [ and ] instead.
33154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33155  if test "x$has_forbidden_chars" != x; then
33156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33157    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33158  fi
33159
33160    # Output is in $new_path
33161
33162  windows_path="$new_path"
33163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33164    unix_path=`$CYGPATH -u "$windows_path"`
33165    new_path="$unix_path"
33166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33168    new_path="$unix_path"
33169  fi
33170
33171    # remove trailing .exe if any
33172    new_path="${new_path/%.exe/}"
33173
33174    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33175    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33176  fi
33177
33178  else
33179    # We're on a posix platform. Hooray! :)
33180    # First separate the path from the arguments. This will split at the first
33181    # space.
33182    complete="$OBJC"
33183    path="${complete%% *}"
33184    tmp="$complete EOL"
33185    arguments="${tmp#* }"
33186
33187    # Cannot rely on the command "which" here since it doesn't always work.
33188    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33189    if test -z "$is_absolute_path"; then
33190      # Path to executable is not absolute. Find it.
33191      IFS_save="$IFS"
33192      IFS=:
33193      for p in $PATH; do
33194        if test -f "$p/$path" && test -x "$p/$path"; then
33195          new_path="$p/$path"
33196          break
33197        fi
33198      done
33199      IFS="$IFS_save"
33200    else
33201      # This is an absolute path, we can use it without further modifications.
33202      new_path="$path"
33203    fi
33204
33205    if test "x$new_path" = x; then
33206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33207$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33208      has_space=`$ECHO "$complete" | $GREP " "`
33209      if test "x$has_space" != x; then
33210        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33211$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33212      fi
33213      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33214    fi
33215  fi
33216
33217  # Now join together the path and the arguments once again
33218  if test "x$arguments" != xEOL; then
33219    new_complete="$new_path ${arguments% *}"
33220  else
33221    new_complete="$new_path"
33222  fi
33223
33224  if test "x$complete" != "x$new_complete"; then
33225    OBJC="$new_complete"
33226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33227$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33228  fi
33229
33230
33231
33232  # Publish this variable in the help.
33233
33234
33235  if test "x$LIPO" = x; then
33236    # The variable is not set by user, try to locate tool using the code snippet
33237    for ac_prog in lipo
33238do
33239  # Extract the first word of "$ac_prog", so it can be a program name with args.
33240set dummy $ac_prog; ac_word=$2
33241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33242$as_echo_n "checking for $ac_word... " >&6; }
33243if ${ac_cv_path_LIPO+:} false; then :
33244  $as_echo_n "(cached) " >&6
33245else
33246  case $LIPO in
33247  [\\/]* | ?:[\\/]*)
33248  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33249  ;;
33250  *)
33251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33252for as_dir in $PATH
33253do
33254  IFS=$as_save_IFS
33255  test -z "$as_dir" && as_dir=.
33256    for ac_exec_ext in '' $ac_executable_extensions; do
33257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33258    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33260    break 2
33261  fi
33262done
33263  done
33264IFS=$as_save_IFS
33265
33266  ;;
33267esac
33268fi
33269LIPO=$ac_cv_path_LIPO
33270if test -n "$LIPO"; then
33271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33272$as_echo "$LIPO" >&6; }
33273else
33274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33275$as_echo "no" >&6; }
33276fi
33277
33278
33279  test -n "$LIPO" && break
33280done
33281
33282  else
33283    # The variable is set, but is it from the command line or the environment?
33284
33285    # Try to remove the string !LIPO! from our list.
33286    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33287    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33288      # If it failed, the variable was not from the command line. Ignore it,
33289      # but warn the user (except for BASH, which is always set by the calling BASH).
33290      if test "xLIPO" != xBASH; then
33291        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33292$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33293      fi
33294      # Try to locate tool using the code snippet
33295      for ac_prog in lipo
33296do
33297  # Extract the first word of "$ac_prog", so it can be a program name with args.
33298set dummy $ac_prog; ac_word=$2
33299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33300$as_echo_n "checking for $ac_word... " >&6; }
33301if ${ac_cv_path_LIPO+:} false; then :
33302  $as_echo_n "(cached) " >&6
33303else
33304  case $LIPO in
33305  [\\/]* | ?:[\\/]*)
33306  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33307  ;;
33308  *)
33309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33310for as_dir in $PATH
33311do
33312  IFS=$as_save_IFS
33313  test -z "$as_dir" && as_dir=.
33314    for ac_exec_ext in '' $ac_executable_extensions; do
33315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33316    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33318    break 2
33319  fi
33320done
33321  done
33322IFS=$as_save_IFS
33323
33324  ;;
33325esac
33326fi
33327LIPO=$ac_cv_path_LIPO
33328if test -n "$LIPO"; then
33329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33330$as_echo "$LIPO" >&6; }
33331else
33332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33333$as_echo "no" >&6; }
33334fi
33335
33336
33337  test -n "$LIPO" && break
33338done
33339
33340    else
33341      # If it succeeded, then it was overridden by the user. We will use it
33342      # for the tool.
33343
33344      # First remove it from the list of overridden variables, so we can test
33345      # for unknown variables in the end.
33346      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33347
33348      # Check if the provided tool contains a complete path.
33349      tool_specified="$LIPO"
33350      tool_basename="${tool_specified##*/}"
33351      if test "x$tool_basename" = "x$tool_specified"; then
33352        # A command without a complete path is provided, search $PATH.
33353        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33354$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33355        # Extract the first word of "$tool_basename", so it can be a program name with args.
33356set dummy $tool_basename; ac_word=$2
33357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33358$as_echo_n "checking for $ac_word... " >&6; }
33359if ${ac_cv_path_LIPO+:} false; then :
33360  $as_echo_n "(cached) " >&6
33361else
33362  case $LIPO in
33363  [\\/]* | ?:[\\/]*)
33364  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33365  ;;
33366  *)
33367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33368for as_dir in $PATH
33369do
33370  IFS=$as_save_IFS
33371  test -z "$as_dir" && as_dir=.
33372    for ac_exec_ext in '' $ac_executable_extensions; do
33373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33374    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33376    break 2
33377  fi
33378done
33379  done
33380IFS=$as_save_IFS
33381
33382  ;;
33383esac
33384fi
33385LIPO=$ac_cv_path_LIPO
33386if test -n "$LIPO"; then
33387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33388$as_echo "$LIPO" >&6; }
33389else
33390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33391$as_echo "no" >&6; }
33392fi
33393
33394
33395        if test "x$LIPO" = x; then
33396          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33397        fi
33398      else
33399        # Otherwise we believe it is a complete path. Use it as it is.
33400        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33401$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33402        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33403$as_echo_n "checking for LIPO... " >&6; }
33404        if test ! -x "$tool_specified"; then
33405          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33406$as_echo "not found" >&6; }
33407          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33408        fi
33409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33410$as_echo "$tool_specified" >&6; }
33411      fi
33412    fi
33413  fi
33414
33415
33416
33417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33418
33419  # First separate the path from the arguments. This will split at the first
33420  # space.
33421  complete="$LIPO"
33422  path="${complete%% *}"
33423  tmp="$complete EOL"
33424  arguments="${tmp#* }"
33425
33426  # Input might be given as Windows format, start by converting to
33427  # unix format.
33428  new_path=`$CYGPATH -u "$path"`
33429
33430  # Now try to locate executable using which
33431  new_path=`$WHICH "$new_path" 2> /dev/null`
33432  # bat and cmd files are not always considered executable in cygwin causing which
33433  # to not find them
33434  if test "x$new_path" = x \
33435      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33436      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33437    new_path=`$CYGPATH -u "$path"`
33438  fi
33439  if test "x$new_path" = x; then
33440    # Oops. Which didn't find the executable.
33441    # The splitting of arguments from the executable at a space might have been incorrect,
33442    # since paths with space are more likely in Windows. Give it another try with the whole
33443    # argument.
33444    path="$complete"
33445    arguments="EOL"
33446    new_path=`$CYGPATH -u "$path"`
33447    new_path=`$WHICH "$new_path" 2> /dev/null`
33448    # bat and cmd files are not always considered executable in cygwin causing which
33449    # to not find them
33450    if test "x$new_path" = x \
33451        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33452        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33453      new_path=`$CYGPATH -u "$path"`
33454    fi
33455    if test "x$new_path" = x; then
33456      # It's still not found. Now this is an unrecoverable error.
33457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33458$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33459      has_space=`$ECHO "$complete" | $GREP " "`
33460      if test "x$has_space" != x; then
33461        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33462$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33463      fi
33464      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33465    fi
33466  fi
33467
33468  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33469  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33470  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33471  # "foo.exe" is OK but "foo" is an error.
33472  #
33473  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33474  # It is also a way to make sure we got the proper file name for the real test later on.
33475  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33476  if test "x$test_shortpath" = x; then
33477    # Short path failed, file does not exist as specified.
33478    # Try adding .exe or .cmd
33479    if test -f "${new_path}.exe"; then
33480      input_to_shortpath="${new_path}.exe"
33481    elif test -f "${new_path}.cmd"; then
33482      input_to_shortpath="${new_path}.cmd"
33483    else
33484      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33485$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33486      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33487$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33488      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33489    fi
33490  else
33491    input_to_shortpath="$new_path"
33492  fi
33493
33494  # Call helper function which possibly converts this using DOS-style short mode.
33495  # If so, the updated path is stored in $new_path.
33496  new_path="$input_to_shortpath"
33497
33498  input_path="$input_to_shortpath"
33499  # Check if we need to convert this using DOS-style short mode. If the path
33500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33501  # take no chances and rewrite it.
33502  # Note: m4 eats our [], so we need to use [ and ] instead.
33503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33504  if test "x$has_forbidden_chars" != x; then
33505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33506    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33507    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33508    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33509      # Going to short mode and back again did indeed matter. Since short mode is
33510      # case insensitive, let's make it lowercase to improve readability.
33511      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33512      # Now convert it back to Unix-stile (cygpath)
33513      input_path=`$CYGPATH -u "$shortmode_path"`
33514      new_path="$input_path"
33515    fi
33516  fi
33517
33518  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33519  if test "x$test_cygdrive_prefix" = x; then
33520    # As a simple fix, exclude /usr/bin since it's not a real path.
33521    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33522      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33523      # a path prefixed by /cygdrive for fixpath to work.
33524      new_path="$CYGWIN_ROOT_PATH$input_path"
33525    fi
33526  fi
33527
33528  # remove trailing .exe if any
33529  new_path="${new_path/%.exe/}"
33530
33531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33532
33533  # First separate the path from the arguments. This will split at the first
33534  # space.
33535  complete="$LIPO"
33536  path="${complete%% *}"
33537  tmp="$complete EOL"
33538  arguments="${tmp#* }"
33539
33540  # Input might be given as Windows format, start by converting to
33541  # unix format.
33542  new_path="$path"
33543
33544  windows_path="$new_path"
33545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33546    unix_path=`$CYGPATH -u "$windows_path"`
33547    new_path="$unix_path"
33548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33550    new_path="$unix_path"
33551  fi
33552
33553
33554  # Now try to locate executable using which
33555  new_path=`$WHICH "$new_path" 2> /dev/null`
33556
33557  if test "x$new_path" = x; then
33558    # Oops. Which didn't find the executable.
33559    # The splitting of arguments from the executable at a space might have been incorrect,
33560    # since paths with space are more likely in Windows. Give it another try with the whole
33561    # argument.
33562    path="$complete"
33563    arguments="EOL"
33564    new_path="$path"
33565
33566  windows_path="$new_path"
33567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33568    unix_path=`$CYGPATH -u "$windows_path"`
33569    new_path="$unix_path"
33570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33572    new_path="$unix_path"
33573  fi
33574
33575
33576    new_path=`$WHICH "$new_path" 2> /dev/null`
33577
33578    if test "x$new_path" = x; then
33579      # It's still not found. Now this is an unrecoverable error.
33580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33581$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33582      has_space=`$ECHO "$complete" | $GREP " "`
33583      if test "x$has_space" != x; then
33584        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33585$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33586      fi
33587      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33588    fi
33589  fi
33590
33591  # Now new_path has a complete unix path to the binary
33592  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33593    # Keep paths in /bin as-is, but remove trailing .exe if any
33594    new_path="${new_path/%.exe/}"
33595    # Do not save /bin paths to all_fixpath_prefixes!
33596  else
33597    # Not in mixed or Windows style, start by that.
33598    new_path=`cmd //c echo $new_path`
33599
33600  input_path="$new_path"
33601  # Check if we need to convert this using DOS-style short mode. If the path
33602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33603  # take no chances and rewrite it.
33604  # Note: m4 eats our [], so we need to use [ and ] instead.
33605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33606  if test "x$has_forbidden_chars" != x; then
33607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33608    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33609  fi
33610
33611    # Output is in $new_path
33612
33613  windows_path="$new_path"
33614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33615    unix_path=`$CYGPATH -u "$windows_path"`
33616    new_path="$unix_path"
33617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33619    new_path="$unix_path"
33620  fi
33621
33622    # remove trailing .exe if any
33623    new_path="${new_path/%.exe/}"
33624
33625    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33626    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33627  fi
33628
33629  else
33630    # We're on a posix platform. Hooray! :)
33631    # First separate the path from the arguments. This will split at the first
33632    # space.
33633    complete="$LIPO"
33634    path="${complete%% *}"
33635    tmp="$complete EOL"
33636    arguments="${tmp#* }"
33637
33638    # Cannot rely on the command "which" here since it doesn't always work.
33639    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33640    if test -z "$is_absolute_path"; then
33641      # Path to executable is not absolute. Find it.
33642      IFS_save="$IFS"
33643      IFS=:
33644      for p in $PATH; do
33645        if test -f "$p/$path" && test -x "$p/$path"; then
33646          new_path="$p/$path"
33647          break
33648        fi
33649      done
33650      IFS="$IFS_save"
33651    else
33652      # This is an absolute path, we can use it without further modifications.
33653      new_path="$path"
33654    fi
33655
33656    if test "x$new_path" = x; then
33657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33658$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33659      has_space=`$ECHO "$complete" | $GREP " "`
33660      if test "x$has_space" != x; then
33661        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33662$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33663      fi
33664      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33665    fi
33666  fi
33667
33668  # Now join together the path and the arguments once again
33669  if test "x$arguments" != xEOL; then
33670    new_complete="$new_path ${arguments% *}"
33671  else
33672    new_complete="$new_path"
33673  fi
33674
33675  if test "x$complete" != "x$new_complete"; then
33676    LIPO="$new_complete"
33677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33678$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33679  fi
33680
33681  else
33682    OBJC=
33683  fi
33684
33685  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33686    # Extract the first word of "mt", so it can be a program name with args.
33687set dummy mt; ac_word=$2
33688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33689$as_echo_n "checking for $ac_word... " >&6; }
33690if ${ac_cv_prog_MT+:} false; then :
33691  $as_echo_n "(cached) " >&6
33692else
33693  if test -n "$MT"; then
33694  ac_cv_prog_MT="$MT" # Let the user override the test.
33695else
33696  ac_prog_rejected=no
33697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33698for as_dir in $PATH
33699do
33700  IFS=$as_save_IFS
33701  test -z "$as_dir" && as_dir=.
33702    for ac_exec_ext in '' $ac_executable_extensions; do
33703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33704    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33705       ac_prog_rejected=yes
33706       continue
33707     fi
33708    ac_cv_prog_MT="mt"
33709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33710    break 2
33711  fi
33712done
33713  done
33714IFS=$as_save_IFS
33715
33716if test $ac_prog_rejected = yes; then
33717  # We found a bogon in the path, so make sure we never use it.
33718  set dummy $ac_cv_prog_MT
33719  shift
33720  if test $# != 0; then
33721    # We chose a different compiler from the bogus one.
33722    # However, it has the same basename, so the bogon will be chosen
33723    # first if we set MT to just the basename; use the full file name.
33724    shift
33725    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33726  fi
33727fi
33728fi
33729fi
33730MT=$ac_cv_prog_MT
33731if test -n "$MT"; then
33732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33733$as_echo "$MT" >&6; }
33734else
33735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33736$as_echo "no" >&6; }
33737fi
33738
33739
33740
33741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33742
33743  # First separate the path from the arguments. This will split at the first
33744  # space.
33745  complete="$MT"
33746  path="${complete%% *}"
33747  tmp="$complete EOL"
33748  arguments="${tmp#* }"
33749
33750  # Input might be given as Windows format, start by converting to
33751  # unix format.
33752  new_path=`$CYGPATH -u "$path"`
33753
33754  # Now try to locate executable using which
33755  new_path=`$WHICH "$new_path" 2> /dev/null`
33756  # bat and cmd files are not always considered executable in cygwin causing which
33757  # to not find them
33758  if test "x$new_path" = x \
33759      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33760      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33761    new_path=`$CYGPATH -u "$path"`
33762  fi
33763  if test "x$new_path" = x; then
33764    # Oops. Which didn't find the executable.
33765    # The splitting of arguments from the executable at a space might have been incorrect,
33766    # since paths with space are more likely in Windows. Give it another try with the whole
33767    # argument.
33768    path="$complete"
33769    arguments="EOL"
33770    new_path=`$CYGPATH -u "$path"`
33771    new_path=`$WHICH "$new_path" 2> /dev/null`
33772    # bat and cmd files are not always considered executable in cygwin causing which
33773    # to not find them
33774    if test "x$new_path" = x \
33775        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33776        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33777      new_path=`$CYGPATH -u "$path"`
33778    fi
33779    if test "x$new_path" = x; then
33780      # It's still not found. Now this is an unrecoverable error.
33781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33782$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33783      has_space=`$ECHO "$complete" | $GREP " "`
33784      if test "x$has_space" != x; then
33785        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33786$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33787      fi
33788      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33789    fi
33790  fi
33791
33792  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33793  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33794  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33795  # "foo.exe" is OK but "foo" is an error.
33796  #
33797  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33798  # It is also a way to make sure we got the proper file name for the real test later on.
33799  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33800  if test "x$test_shortpath" = x; then
33801    # Short path failed, file does not exist as specified.
33802    # Try adding .exe or .cmd
33803    if test -f "${new_path}.exe"; then
33804      input_to_shortpath="${new_path}.exe"
33805    elif test -f "${new_path}.cmd"; then
33806      input_to_shortpath="${new_path}.cmd"
33807    else
33808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33809$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33810      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33811$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33812      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33813    fi
33814  else
33815    input_to_shortpath="$new_path"
33816  fi
33817
33818  # Call helper function which possibly converts this using DOS-style short mode.
33819  # If so, the updated path is stored in $new_path.
33820  new_path="$input_to_shortpath"
33821
33822  input_path="$input_to_shortpath"
33823  # Check if we need to convert this using DOS-style short mode. If the path
33824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33825  # take no chances and rewrite it.
33826  # Note: m4 eats our [], so we need to use [ and ] instead.
33827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33828  if test "x$has_forbidden_chars" != x; then
33829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33830    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33831    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33832    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33833      # Going to short mode and back again did indeed matter. Since short mode is
33834      # case insensitive, let's make it lowercase to improve readability.
33835      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33836      # Now convert it back to Unix-stile (cygpath)
33837      input_path=`$CYGPATH -u "$shortmode_path"`
33838      new_path="$input_path"
33839    fi
33840  fi
33841
33842  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33843  if test "x$test_cygdrive_prefix" = x; then
33844    # As a simple fix, exclude /usr/bin since it's not a real path.
33845    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33846      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33847      # a path prefixed by /cygdrive for fixpath to work.
33848      new_path="$CYGWIN_ROOT_PATH$input_path"
33849    fi
33850  fi
33851
33852  # remove trailing .exe if any
33853  new_path="${new_path/%.exe/}"
33854
33855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33856
33857  # First separate the path from the arguments. This will split at the first
33858  # space.
33859  complete="$MT"
33860  path="${complete%% *}"
33861  tmp="$complete EOL"
33862  arguments="${tmp#* }"
33863
33864  # Input might be given as Windows format, start by converting to
33865  # unix format.
33866  new_path="$path"
33867
33868  windows_path="$new_path"
33869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33870    unix_path=`$CYGPATH -u "$windows_path"`
33871    new_path="$unix_path"
33872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33874    new_path="$unix_path"
33875  fi
33876
33877
33878  # Now try to locate executable using which
33879  new_path=`$WHICH "$new_path" 2> /dev/null`
33880
33881  if test "x$new_path" = x; then
33882    # Oops. Which didn't find the executable.
33883    # The splitting of arguments from the executable at a space might have been incorrect,
33884    # since paths with space are more likely in Windows. Give it another try with the whole
33885    # argument.
33886    path="$complete"
33887    arguments="EOL"
33888    new_path="$path"
33889
33890  windows_path="$new_path"
33891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33892    unix_path=`$CYGPATH -u "$windows_path"`
33893    new_path="$unix_path"
33894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33896    new_path="$unix_path"
33897  fi
33898
33899
33900    new_path=`$WHICH "$new_path" 2> /dev/null`
33901
33902    if test "x$new_path" = x; then
33903      # It's still not found. Now this is an unrecoverable error.
33904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33905$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33906      has_space=`$ECHO "$complete" | $GREP " "`
33907      if test "x$has_space" != x; then
33908        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33909$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33910      fi
33911      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33912    fi
33913  fi
33914
33915  # Now new_path has a complete unix path to the binary
33916  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33917    # Keep paths in /bin as-is, but remove trailing .exe if any
33918    new_path="${new_path/%.exe/}"
33919    # Do not save /bin paths to all_fixpath_prefixes!
33920  else
33921    # Not in mixed or Windows style, start by that.
33922    new_path=`cmd //c echo $new_path`
33923
33924  input_path="$new_path"
33925  # Check if we need to convert this using DOS-style short mode. If the path
33926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33927  # take no chances and rewrite it.
33928  # Note: m4 eats our [], so we need to use [ and ] instead.
33929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33930  if test "x$has_forbidden_chars" != x; then
33931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33932    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33933  fi
33934
33935    # Output is in $new_path
33936
33937  windows_path="$new_path"
33938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33939    unix_path=`$CYGPATH -u "$windows_path"`
33940    new_path="$unix_path"
33941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33943    new_path="$unix_path"
33944  fi
33945
33946    # remove trailing .exe if any
33947    new_path="${new_path/%.exe/}"
33948
33949    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33950    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33951  fi
33952
33953  else
33954    # We're on a posix platform. Hooray! :)
33955    # First separate the path from the arguments. This will split at the first
33956    # space.
33957    complete="$MT"
33958    path="${complete%% *}"
33959    tmp="$complete EOL"
33960    arguments="${tmp#* }"
33961
33962    # Cannot rely on the command "which" here since it doesn't always work.
33963    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33964    if test -z "$is_absolute_path"; then
33965      # Path to executable is not absolute. Find it.
33966      IFS_save="$IFS"
33967      IFS=:
33968      for p in $PATH; do
33969        if test -f "$p/$path" && test -x "$p/$path"; then
33970          new_path="$p/$path"
33971          break
33972        fi
33973      done
33974      IFS="$IFS_save"
33975    else
33976      # This is an absolute path, we can use it without further modifications.
33977      new_path="$path"
33978    fi
33979
33980    if test "x$new_path" = x; then
33981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33982$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33983      has_space=`$ECHO "$complete" | $GREP " "`
33984      if test "x$has_space" != x; then
33985        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33986$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33987      fi
33988      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33989    fi
33990  fi
33991
33992  # Now join together the path and the arguments once again
33993  if test "x$arguments" != xEOL; then
33994    new_complete="$new_path ${arguments% *}"
33995  else
33996    new_complete="$new_path"
33997  fi
33998
33999  if test "x$complete" != "x$new_complete"; then
34000    MT="$new_complete"
34001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34002$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34003  fi
34004
34005    # Setup the resource compiler (RC)
34006    # Extract the first word of "rc", so it can be a program name with args.
34007set dummy rc; ac_word=$2
34008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34009$as_echo_n "checking for $ac_word... " >&6; }
34010if ${ac_cv_prog_RC+:} false; then :
34011  $as_echo_n "(cached) " >&6
34012else
34013  if test -n "$RC"; then
34014  ac_cv_prog_RC="$RC" # Let the user override the test.
34015else
34016  ac_prog_rejected=no
34017as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34018for as_dir in $PATH
34019do
34020  IFS=$as_save_IFS
34021  test -z "$as_dir" && as_dir=.
34022    for ac_exec_ext in '' $ac_executable_extensions; do
34023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34024    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34025       ac_prog_rejected=yes
34026       continue
34027     fi
34028    ac_cv_prog_RC="rc"
34029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34030    break 2
34031  fi
34032done
34033  done
34034IFS=$as_save_IFS
34035
34036if test $ac_prog_rejected = yes; then
34037  # We found a bogon in the path, so make sure we never use it.
34038  set dummy $ac_cv_prog_RC
34039  shift
34040  if test $# != 0; then
34041    # We chose a different compiler from the bogus one.
34042    # However, it has the same basename, so the bogon will be chosen
34043    # first if we set RC to just the basename; use the full file name.
34044    shift
34045    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34046  fi
34047fi
34048fi
34049fi
34050RC=$ac_cv_prog_RC
34051if test -n "$RC"; then
34052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34053$as_echo "$RC" >&6; }
34054else
34055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34056$as_echo "no" >&6; }
34057fi
34058
34059
34060
34061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34062
34063  # First separate the path from the arguments. This will split at the first
34064  # space.
34065  complete="$RC"
34066  path="${complete%% *}"
34067  tmp="$complete EOL"
34068  arguments="${tmp#* }"
34069
34070  # Input might be given as Windows format, start by converting to
34071  # unix format.
34072  new_path=`$CYGPATH -u "$path"`
34073
34074  # Now try to locate executable using which
34075  new_path=`$WHICH "$new_path" 2> /dev/null`
34076  # bat and cmd files are not always considered executable in cygwin causing which
34077  # to not find them
34078  if test "x$new_path" = x \
34079      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34080      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34081    new_path=`$CYGPATH -u "$path"`
34082  fi
34083  if test "x$new_path" = x; then
34084    # Oops. Which didn't find the executable.
34085    # The splitting of arguments from the executable at a space might have been incorrect,
34086    # since paths with space are more likely in Windows. Give it another try with the whole
34087    # argument.
34088    path="$complete"
34089    arguments="EOL"
34090    new_path=`$CYGPATH -u "$path"`
34091    new_path=`$WHICH "$new_path" 2> /dev/null`
34092    # bat and cmd files are not always considered executable in cygwin causing which
34093    # to not find them
34094    if test "x$new_path" = x \
34095        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34096        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34097      new_path=`$CYGPATH -u "$path"`
34098    fi
34099    if test "x$new_path" = x; then
34100      # It's still not found. Now this is an unrecoverable error.
34101      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34102$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34103      has_space=`$ECHO "$complete" | $GREP " "`
34104      if test "x$has_space" != x; then
34105        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34106$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34107      fi
34108      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34109    fi
34110  fi
34111
34112  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34113  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34114  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34115  # "foo.exe" is OK but "foo" is an error.
34116  #
34117  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34118  # It is also a way to make sure we got the proper file name for the real test later on.
34119  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34120  if test "x$test_shortpath" = x; then
34121    # Short path failed, file does not exist as specified.
34122    # Try adding .exe or .cmd
34123    if test -f "${new_path}.exe"; then
34124      input_to_shortpath="${new_path}.exe"
34125    elif test -f "${new_path}.cmd"; then
34126      input_to_shortpath="${new_path}.cmd"
34127    else
34128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34129$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34130      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34131$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34132      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34133    fi
34134  else
34135    input_to_shortpath="$new_path"
34136  fi
34137
34138  # Call helper function which possibly converts this using DOS-style short mode.
34139  # If so, the updated path is stored in $new_path.
34140  new_path="$input_to_shortpath"
34141
34142  input_path="$input_to_shortpath"
34143  # Check if we need to convert this using DOS-style short mode. If the path
34144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34145  # take no chances and rewrite it.
34146  # Note: m4 eats our [], so we need to use [ and ] instead.
34147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34148  if test "x$has_forbidden_chars" != x; then
34149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34153      # Going to short mode and back again did indeed matter. Since short mode is
34154      # case insensitive, let's make it lowercase to improve readability.
34155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34156      # Now convert it back to Unix-stile (cygpath)
34157      input_path=`$CYGPATH -u "$shortmode_path"`
34158      new_path="$input_path"
34159    fi
34160  fi
34161
34162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34163  if test "x$test_cygdrive_prefix" = x; then
34164    # As a simple fix, exclude /usr/bin since it's not a real path.
34165    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34167      # a path prefixed by /cygdrive for fixpath to work.
34168      new_path="$CYGWIN_ROOT_PATH$input_path"
34169    fi
34170  fi
34171
34172  # remove trailing .exe if any
34173  new_path="${new_path/%.exe/}"
34174
34175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34176
34177  # First separate the path from the arguments. This will split at the first
34178  # space.
34179  complete="$RC"
34180  path="${complete%% *}"
34181  tmp="$complete EOL"
34182  arguments="${tmp#* }"
34183
34184  # Input might be given as Windows format, start by converting to
34185  # unix format.
34186  new_path="$path"
34187
34188  windows_path="$new_path"
34189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34190    unix_path=`$CYGPATH -u "$windows_path"`
34191    new_path="$unix_path"
34192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34194    new_path="$unix_path"
34195  fi
34196
34197
34198  # Now try to locate executable using which
34199  new_path=`$WHICH "$new_path" 2> /dev/null`
34200
34201  if test "x$new_path" = x; then
34202    # Oops. Which didn't find the executable.
34203    # The splitting of arguments from the executable at a space might have been incorrect,
34204    # since paths with space are more likely in Windows. Give it another try with the whole
34205    # argument.
34206    path="$complete"
34207    arguments="EOL"
34208    new_path="$path"
34209
34210  windows_path="$new_path"
34211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34212    unix_path=`$CYGPATH -u "$windows_path"`
34213    new_path="$unix_path"
34214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34216    new_path="$unix_path"
34217  fi
34218
34219
34220    new_path=`$WHICH "$new_path" 2> /dev/null`
34221
34222    if test "x$new_path" = x; then
34223      # It's still not found. Now this is an unrecoverable error.
34224      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34225$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34226      has_space=`$ECHO "$complete" | $GREP " "`
34227      if test "x$has_space" != x; then
34228        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34229$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34230      fi
34231      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34232    fi
34233  fi
34234
34235  # Now new_path has a complete unix path to the binary
34236  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34237    # Keep paths in /bin as-is, but remove trailing .exe if any
34238    new_path="${new_path/%.exe/}"
34239    # Do not save /bin paths to all_fixpath_prefixes!
34240  else
34241    # Not in mixed or Windows style, start by that.
34242    new_path=`cmd //c echo $new_path`
34243
34244  input_path="$new_path"
34245  # Check if we need to convert this using DOS-style short mode. If the path
34246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34247  # take no chances and rewrite it.
34248  # Note: m4 eats our [], so we need to use [ and ] instead.
34249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34250  if test "x$has_forbidden_chars" != x; then
34251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34252    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34253  fi
34254
34255    # Output is in $new_path
34256
34257  windows_path="$new_path"
34258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34259    unix_path=`$CYGPATH -u "$windows_path"`
34260    new_path="$unix_path"
34261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34263    new_path="$unix_path"
34264  fi
34265
34266    # remove trailing .exe if any
34267    new_path="${new_path/%.exe/}"
34268
34269    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34270    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34271  fi
34272
34273  else
34274    # We're on a posix platform. Hooray! :)
34275    # First separate the path from the arguments. This will split at the first
34276    # space.
34277    complete="$RC"
34278    path="${complete%% *}"
34279    tmp="$complete EOL"
34280    arguments="${tmp#* }"
34281
34282    # Cannot rely on the command "which" here since it doesn't always work.
34283    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34284    if test -z "$is_absolute_path"; then
34285      # Path to executable is not absolute. Find it.
34286      IFS_save="$IFS"
34287      IFS=:
34288      for p in $PATH; do
34289        if test -f "$p/$path" && test -x "$p/$path"; then
34290          new_path="$p/$path"
34291          break
34292        fi
34293      done
34294      IFS="$IFS_save"
34295    else
34296      # This is an absolute path, we can use it without further modifications.
34297      new_path="$path"
34298    fi
34299
34300    if test "x$new_path" = x; then
34301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34302$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34303      has_space=`$ECHO "$complete" | $GREP " "`
34304      if test "x$has_space" != x; then
34305        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34306$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34307      fi
34308      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34309    fi
34310  fi
34311
34312  # Now join together the path and the arguments once again
34313  if test "x$arguments" != xEOL; then
34314    new_complete="$new_path ${arguments% *}"
34315  else
34316    new_complete="$new_path"
34317  fi
34318
34319  if test "x$complete" != "x$new_complete"; then
34320    RC="$new_complete"
34321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34322$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34323  fi
34324
34325    # Extract the first word of "dumpbin", so it can be a program name with args.
34326set dummy dumpbin; ac_word=$2
34327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34328$as_echo_n "checking for $ac_word... " >&6; }
34329if ${ac_cv_prog_DUMPBIN+:} false; then :
34330  $as_echo_n "(cached) " >&6
34331else
34332  if test -n "$DUMPBIN"; then
34333  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34334else
34335as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34336for as_dir in $PATH
34337do
34338  IFS=$as_save_IFS
34339  test -z "$as_dir" && as_dir=.
34340    for ac_exec_ext in '' $ac_executable_extensions; do
34341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34342    ac_cv_prog_DUMPBIN="dumpbin"
34343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34344    break 2
34345  fi
34346done
34347  done
34348IFS=$as_save_IFS
34349
34350fi
34351fi
34352DUMPBIN=$ac_cv_prog_DUMPBIN
34353if test -n "$DUMPBIN"; then
34354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34355$as_echo "$DUMPBIN" >&6; }
34356else
34357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34358$as_echo "no" >&6; }
34359fi
34360
34361
34362
34363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34364
34365  # First separate the path from the arguments. This will split at the first
34366  # space.
34367  complete="$DUMPBIN"
34368  path="${complete%% *}"
34369  tmp="$complete EOL"
34370  arguments="${tmp#* }"
34371
34372  # Input might be given as Windows format, start by converting to
34373  # unix format.
34374  new_path=`$CYGPATH -u "$path"`
34375
34376  # Now try to locate executable using which
34377  new_path=`$WHICH "$new_path" 2> /dev/null`
34378  # bat and cmd files are not always considered executable in cygwin causing which
34379  # to not find them
34380  if test "x$new_path" = x \
34381      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34382      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34383    new_path=`$CYGPATH -u "$path"`
34384  fi
34385  if test "x$new_path" = x; then
34386    # Oops. Which didn't find the executable.
34387    # The splitting of arguments from the executable at a space might have been incorrect,
34388    # since paths with space are more likely in Windows. Give it another try with the whole
34389    # argument.
34390    path="$complete"
34391    arguments="EOL"
34392    new_path=`$CYGPATH -u "$path"`
34393    new_path=`$WHICH "$new_path" 2> /dev/null`
34394    # bat and cmd files are not always considered executable in cygwin causing which
34395    # to not find them
34396    if test "x$new_path" = x \
34397        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34398        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34399      new_path=`$CYGPATH -u "$path"`
34400    fi
34401    if test "x$new_path" = x; then
34402      # It's still not found. Now this is an unrecoverable error.
34403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34404$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34405      has_space=`$ECHO "$complete" | $GREP " "`
34406      if test "x$has_space" != x; then
34407        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34408$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34409      fi
34410      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34411    fi
34412  fi
34413
34414  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34415  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34416  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34417  # "foo.exe" is OK but "foo" is an error.
34418  #
34419  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34420  # It is also a way to make sure we got the proper file name for the real test later on.
34421  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34422  if test "x$test_shortpath" = x; then
34423    # Short path failed, file does not exist as specified.
34424    # Try adding .exe or .cmd
34425    if test -f "${new_path}.exe"; then
34426      input_to_shortpath="${new_path}.exe"
34427    elif test -f "${new_path}.cmd"; then
34428      input_to_shortpath="${new_path}.cmd"
34429    else
34430      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34431$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34432      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34433$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34434      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34435    fi
34436  else
34437    input_to_shortpath="$new_path"
34438  fi
34439
34440  # Call helper function which possibly converts this using DOS-style short mode.
34441  # If so, the updated path is stored in $new_path.
34442  new_path="$input_to_shortpath"
34443
34444  input_path="$input_to_shortpath"
34445  # Check if we need to convert this using DOS-style short mode. If the path
34446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34447  # take no chances and rewrite it.
34448  # Note: m4 eats our [], so we need to use [ and ] instead.
34449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34450  if test "x$has_forbidden_chars" != x; then
34451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34452    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34453    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34454    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34455      # Going to short mode and back again did indeed matter. Since short mode is
34456      # case insensitive, let's make it lowercase to improve readability.
34457      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34458      # Now convert it back to Unix-stile (cygpath)
34459      input_path=`$CYGPATH -u "$shortmode_path"`
34460      new_path="$input_path"
34461    fi
34462  fi
34463
34464  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34465  if test "x$test_cygdrive_prefix" = x; then
34466    # As a simple fix, exclude /usr/bin since it's not a real path.
34467    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34468      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34469      # a path prefixed by /cygdrive for fixpath to work.
34470      new_path="$CYGWIN_ROOT_PATH$input_path"
34471    fi
34472  fi
34473
34474  # remove trailing .exe if any
34475  new_path="${new_path/%.exe/}"
34476
34477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34478
34479  # First separate the path from the arguments. This will split at the first
34480  # space.
34481  complete="$DUMPBIN"
34482  path="${complete%% *}"
34483  tmp="$complete EOL"
34484  arguments="${tmp#* }"
34485
34486  # Input might be given as Windows format, start by converting to
34487  # unix format.
34488  new_path="$path"
34489
34490  windows_path="$new_path"
34491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34492    unix_path=`$CYGPATH -u "$windows_path"`
34493    new_path="$unix_path"
34494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34496    new_path="$unix_path"
34497  fi
34498
34499
34500  # Now try to locate executable using which
34501  new_path=`$WHICH "$new_path" 2> /dev/null`
34502
34503  if test "x$new_path" = x; then
34504    # Oops. Which didn't find the executable.
34505    # The splitting of arguments from the executable at a space might have been incorrect,
34506    # since paths with space are more likely in Windows. Give it another try with the whole
34507    # argument.
34508    path="$complete"
34509    arguments="EOL"
34510    new_path="$path"
34511
34512  windows_path="$new_path"
34513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34514    unix_path=`$CYGPATH -u "$windows_path"`
34515    new_path="$unix_path"
34516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34518    new_path="$unix_path"
34519  fi
34520
34521
34522    new_path=`$WHICH "$new_path" 2> /dev/null`
34523
34524    if test "x$new_path" = x; then
34525      # It's still not found. Now this is an unrecoverable error.
34526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34527$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34528      has_space=`$ECHO "$complete" | $GREP " "`
34529      if test "x$has_space" != x; then
34530        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34531$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34532      fi
34533      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34534    fi
34535  fi
34536
34537  # Now new_path has a complete unix path to the binary
34538  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34539    # Keep paths in /bin as-is, but remove trailing .exe if any
34540    new_path="${new_path/%.exe/}"
34541    # Do not save /bin paths to all_fixpath_prefixes!
34542  else
34543    # Not in mixed or Windows style, start by that.
34544    new_path=`cmd //c echo $new_path`
34545
34546  input_path="$new_path"
34547  # Check if we need to convert this using DOS-style short mode. If the path
34548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34549  # take no chances and rewrite it.
34550  # Note: m4 eats our [], so we need to use [ and ] instead.
34551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34552  if test "x$has_forbidden_chars" != x; then
34553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34554    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34555  fi
34556
34557    # Output is in $new_path
34558
34559  windows_path="$new_path"
34560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34561    unix_path=`$CYGPATH -u "$windows_path"`
34562    new_path="$unix_path"
34563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34565    new_path="$unix_path"
34566  fi
34567
34568    # remove trailing .exe if any
34569    new_path="${new_path/%.exe/}"
34570
34571    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34572    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34573  fi
34574
34575  else
34576    # We're on a posix platform. Hooray! :)
34577    # First separate the path from the arguments. This will split at the first
34578    # space.
34579    complete="$DUMPBIN"
34580    path="${complete%% *}"
34581    tmp="$complete EOL"
34582    arguments="${tmp#* }"
34583
34584    # Cannot rely on the command "which" here since it doesn't always work.
34585    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34586    if test -z "$is_absolute_path"; then
34587      # Path to executable is not absolute. Find it.
34588      IFS_save="$IFS"
34589      IFS=:
34590      for p in $PATH; do
34591        if test -f "$p/$path" && test -x "$p/$path"; then
34592          new_path="$p/$path"
34593          break
34594        fi
34595      done
34596      IFS="$IFS_save"
34597    else
34598      # This is an absolute path, we can use it without further modifications.
34599      new_path="$path"
34600    fi
34601
34602    if test "x$new_path" = x; then
34603      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34604$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34605      has_space=`$ECHO "$complete" | $GREP " "`
34606      if test "x$has_space" != x; then
34607        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34608$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34609      fi
34610      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34611    fi
34612  fi
34613
34614  # Now join together the path and the arguments once again
34615  if test "x$arguments" != xEOL; then
34616    new_complete="$new_path ${arguments% *}"
34617  else
34618    new_complete="$new_path"
34619  fi
34620
34621  if test "x$complete" != "x$new_complete"; then
34622    DUMPBIN="$new_complete"
34623    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34624$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34625  fi
34626
34627  fi
34628
34629  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34630
34631
34632  # Publish this variable in the help.
34633
34634
34635  if test "x$STRIP" = x; then
34636    # The variable is not set by user, try to locate tool using the code snippet
34637    for ac_prog in strip
34638do
34639  # Extract the first word of "$ac_prog", so it can be a program name with args.
34640set dummy $ac_prog; ac_word=$2
34641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34642$as_echo_n "checking for $ac_word... " >&6; }
34643if ${ac_cv_path_STRIP+:} false; then :
34644  $as_echo_n "(cached) " >&6
34645else
34646  case $STRIP in
34647  [\\/]* | ?:[\\/]*)
34648  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34649  ;;
34650  *)
34651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34652for as_dir in $PATH
34653do
34654  IFS=$as_save_IFS
34655  test -z "$as_dir" && as_dir=.
34656    for ac_exec_ext in '' $ac_executable_extensions; do
34657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34658    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34660    break 2
34661  fi
34662done
34663  done
34664IFS=$as_save_IFS
34665
34666  ;;
34667esac
34668fi
34669STRIP=$ac_cv_path_STRIP
34670if test -n "$STRIP"; then
34671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34672$as_echo "$STRIP" >&6; }
34673else
34674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34675$as_echo "no" >&6; }
34676fi
34677
34678
34679  test -n "$STRIP" && break
34680done
34681
34682  else
34683    # The variable is set, but is it from the command line or the environment?
34684
34685    # Try to remove the string !STRIP! from our list.
34686    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
34687    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34688      # If it failed, the variable was not from the command line. Ignore it,
34689      # but warn the user (except for BASH, which is always set by the calling BASH).
34690      if test "xSTRIP" != xBASH; then
34691        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
34692$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
34693      fi
34694      # Try to locate tool using the code snippet
34695      for ac_prog in strip
34696do
34697  # Extract the first word of "$ac_prog", so it can be a program name with args.
34698set dummy $ac_prog; ac_word=$2
34699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34700$as_echo_n "checking for $ac_word... " >&6; }
34701if ${ac_cv_path_STRIP+:} false; then :
34702  $as_echo_n "(cached) " >&6
34703else
34704  case $STRIP in
34705  [\\/]* | ?:[\\/]*)
34706  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34707  ;;
34708  *)
34709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34710for as_dir in $PATH
34711do
34712  IFS=$as_save_IFS
34713  test -z "$as_dir" && as_dir=.
34714    for ac_exec_ext in '' $ac_executable_extensions; do
34715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34716    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34718    break 2
34719  fi
34720done
34721  done
34722IFS=$as_save_IFS
34723
34724  ;;
34725esac
34726fi
34727STRIP=$ac_cv_path_STRIP
34728if test -n "$STRIP"; then
34729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34730$as_echo "$STRIP" >&6; }
34731else
34732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34733$as_echo "no" >&6; }
34734fi
34735
34736
34737  test -n "$STRIP" && break
34738done
34739
34740    else
34741      # If it succeeded, then it was overridden by the user. We will use it
34742      # for the tool.
34743
34744      # First remove it from the list of overridden variables, so we can test
34745      # for unknown variables in the end.
34746      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34747
34748      # Check if the provided tool contains a complete path.
34749      tool_specified="$STRIP"
34750      tool_basename="${tool_specified##*/}"
34751      if test "x$tool_basename" = "x$tool_specified"; then
34752        # A command without a complete path is provided, search $PATH.
34753        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
34754$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
34755        # Extract the first word of "$tool_basename", so it can be a program name with args.
34756set dummy $tool_basename; ac_word=$2
34757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34758$as_echo_n "checking for $ac_word... " >&6; }
34759if ${ac_cv_path_STRIP+:} false; then :
34760  $as_echo_n "(cached) " >&6
34761else
34762  case $STRIP in
34763  [\\/]* | ?:[\\/]*)
34764  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34765  ;;
34766  *)
34767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34768for as_dir in $PATH
34769do
34770  IFS=$as_save_IFS
34771  test -z "$as_dir" && as_dir=.
34772    for ac_exec_ext in '' $ac_executable_extensions; do
34773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34774    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34776    break 2
34777  fi
34778done
34779  done
34780IFS=$as_save_IFS
34781
34782  ;;
34783esac
34784fi
34785STRIP=$ac_cv_path_STRIP
34786if test -n "$STRIP"; then
34787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34788$as_echo "$STRIP" >&6; }
34789else
34790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34791$as_echo "no" >&6; }
34792fi
34793
34794
34795        if test "x$STRIP" = x; then
34796          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34797        fi
34798      else
34799        # Otherwise we believe it is a complete path. Use it as it is.
34800        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
34801$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
34802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
34803$as_echo_n "checking for STRIP... " >&6; }
34804        if test ! -x "$tool_specified"; then
34805          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34806$as_echo "not found" >&6; }
34807          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
34808        fi
34809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34810$as_echo "$tool_specified" >&6; }
34811      fi
34812    fi
34813  fi
34814
34815
34816
34817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34818
34819  # First separate the path from the arguments. This will split at the first
34820  # space.
34821  complete="$STRIP"
34822  path="${complete%% *}"
34823  tmp="$complete EOL"
34824  arguments="${tmp#* }"
34825
34826  # Input might be given as Windows format, start by converting to
34827  # unix format.
34828  new_path=`$CYGPATH -u "$path"`
34829
34830  # Now try to locate executable using which
34831  new_path=`$WHICH "$new_path" 2> /dev/null`
34832  # bat and cmd files are not always considered executable in cygwin causing which
34833  # to not find them
34834  if test "x$new_path" = x \
34835      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34836      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34837    new_path=`$CYGPATH -u "$path"`
34838  fi
34839  if test "x$new_path" = x; then
34840    # Oops. Which didn't find the executable.
34841    # The splitting of arguments from the executable at a space might have been incorrect,
34842    # since paths with space are more likely in Windows. Give it another try with the whole
34843    # argument.
34844    path="$complete"
34845    arguments="EOL"
34846    new_path=`$CYGPATH -u "$path"`
34847    new_path=`$WHICH "$new_path" 2> /dev/null`
34848    # bat and cmd files are not always considered executable in cygwin causing which
34849    # to not find them
34850    if test "x$new_path" = x \
34851        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34852        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34853      new_path=`$CYGPATH -u "$path"`
34854    fi
34855    if test "x$new_path" = x; then
34856      # It's still not found. Now this is an unrecoverable error.
34857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34858$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34859      has_space=`$ECHO "$complete" | $GREP " "`
34860      if test "x$has_space" != x; then
34861        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34862$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34863      fi
34864      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34865    fi
34866  fi
34867
34868  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34869  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34870  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34871  # "foo.exe" is OK but "foo" is an error.
34872  #
34873  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34874  # It is also a way to make sure we got the proper file name for the real test later on.
34875  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34876  if test "x$test_shortpath" = x; then
34877    # Short path failed, file does not exist as specified.
34878    # Try adding .exe or .cmd
34879    if test -f "${new_path}.exe"; then
34880      input_to_shortpath="${new_path}.exe"
34881    elif test -f "${new_path}.cmd"; then
34882      input_to_shortpath="${new_path}.cmd"
34883    else
34884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
34885$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
34886      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34887$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34888      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34889    fi
34890  else
34891    input_to_shortpath="$new_path"
34892  fi
34893
34894  # Call helper function which possibly converts this using DOS-style short mode.
34895  # If so, the updated path is stored in $new_path.
34896  new_path="$input_to_shortpath"
34897
34898  input_path="$input_to_shortpath"
34899  # Check if we need to convert this using DOS-style short mode. If the path
34900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34901  # take no chances and rewrite it.
34902  # Note: m4 eats our [], so we need to use [ and ] instead.
34903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34904  if test "x$has_forbidden_chars" != x; then
34905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34909      # Going to short mode and back again did indeed matter. Since short mode is
34910      # case insensitive, let's make it lowercase to improve readability.
34911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34912      # Now convert it back to Unix-stile (cygpath)
34913      input_path=`$CYGPATH -u "$shortmode_path"`
34914      new_path="$input_path"
34915    fi
34916  fi
34917
34918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34919  if test "x$test_cygdrive_prefix" = x; then
34920    # As a simple fix, exclude /usr/bin since it's not a real path.
34921    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34923      # a path prefixed by /cygdrive for fixpath to work.
34924      new_path="$CYGWIN_ROOT_PATH$input_path"
34925    fi
34926  fi
34927
34928  # remove trailing .exe if any
34929  new_path="${new_path/%.exe/}"
34930
34931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34932
34933  # First separate the path from the arguments. This will split at the first
34934  # space.
34935  complete="$STRIP"
34936  path="${complete%% *}"
34937  tmp="$complete EOL"
34938  arguments="${tmp#* }"
34939
34940  # Input might be given as Windows format, start by converting to
34941  # unix format.
34942  new_path="$path"
34943
34944  windows_path="$new_path"
34945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34946    unix_path=`$CYGPATH -u "$windows_path"`
34947    new_path="$unix_path"
34948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34950    new_path="$unix_path"
34951  fi
34952
34953
34954  # Now try to locate executable using which
34955  new_path=`$WHICH "$new_path" 2> /dev/null`
34956
34957  if test "x$new_path" = x; then
34958    # Oops. Which didn't find the executable.
34959    # The splitting of arguments from the executable at a space might have been incorrect,
34960    # since paths with space are more likely in Windows. Give it another try with the whole
34961    # argument.
34962    path="$complete"
34963    arguments="EOL"
34964    new_path="$path"
34965
34966  windows_path="$new_path"
34967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34968    unix_path=`$CYGPATH -u "$windows_path"`
34969    new_path="$unix_path"
34970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34972    new_path="$unix_path"
34973  fi
34974
34975
34976    new_path=`$WHICH "$new_path" 2> /dev/null`
34977
34978    if test "x$new_path" = x; then
34979      # It's still not found. Now this is an unrecoverable error.
34980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34981$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34982      has_space=`$ECHO "$complete" | $GREP " "`
34983      if test "x$has_space" != x; then
34984        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34985$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34986      fi
34987      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34988    fi
34989  fi
34990
34991  # Now new_path has a complete unix path to the binary
34992  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34993    # Keep paths in /bin as-is, but remove trailing .exe if any
34994    new_path="${new_path/%.exe/}"
34995    # Do not save /bin paths to all_fixpath_prefixes!
34996  else
34997    # Not in mixed or Windows style, start by that.
34998    new_path=`cmd //c echo $new_path`
34999
35000  input_path="$new_path"
35001  # Check if we need to convert this using DOS-style short mode. If the path
35002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35003  # take no chances and rewrite it.
35004  # Note: m4 eats our [], so we need to use [ and ] instead.
35005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35006  if test "x$has_forbidden_chars" != x; then
35007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35008    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35009  fi
35010
35011    # Output is in $new_path
35012
35013  windows_path="$new_path"
35014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35015    unix_path=`$CYGPATH -u "$windows_path"`
35016    new_path="$unix_path"
35017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35019    new_path="$unix_path"
35020  fi
35021
35022    # remove trailing .exe if any
35023    new_path="${new_path/%.exe/}"
35024
35025    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35026    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35027  fi
35028
35029  else
35030    # We're on a posix platform. Hooray! :)
35031    # First separate the path from the arguments. This will split at the first
35032    # space.
35033    complete="$STRIP"
35034    path="${complete%% *}"
35035    tmp="$complete EOL"
35036    arguments="${tmp#* }"
35037
35038    # Cannot rely on the command "which" here since it doesn't always work.
35039    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35040    if test -z "$is_absolute_path"; then
35041      # Path to executable is not absolute. Find it.
35042      IFS_save="$IFS"
35043      IFS=:
35044      for p in $PATH; do
35045        if test -f "$p/$path" && test -x "$p/$path"; then
35046          new_path="$p/$path"
35047          break
35048        fi
35049      done
35050      IFS="$IFS_save"
35051    else
35052      # This is an absolute path, we can use it without further modifications.
35053      new_path="$path"
35054    fi
35055
35056    if test "x$new_path" = x; then
35057      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35058$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35059      has_space=`$ECHO "$complete" | $GREP " "`
35060      if test "x$has_space" != x; then
35061        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35062$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35063      fi
35064      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35065    fi
35066  fi
35067
35068  # Now join together the path and the arguments once again
35069  if test "x$arguments" != xEOL; then
35070    new_complete="$new_path ${arguments% *}"
35071  else
35072    new_complete="$new_path"
35073  fi
35074
35075  if test "x$complete" != "x$new_complete"; then
35076    STRIP="$new_complete"
35077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35078$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35079  fi
35080
35081
35082
35083  # Publish this variable in the help.
35084
35085
35086  if test "x$NM" = x; then
35087    # The variable is not set by user, try to locate tool using the code snippet
35088    for ac_prog in nm
35089do
35090  # Extract the first word of "$ac_prog", so it can be a program name with args.
35091set dummy $ac_prog; ac_word=$2
35092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35093$as_echo_n "checking for $ac_word... " >&6; }
35094if ${ac_cv_path_NM+:} false; then :
35095  $as_echo_n "(cached) " >&6
35096else
35097  case $NM in
35098  [\\/]* | ?:[\\/]*)
35099  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35100  ;;
35101  *)
35102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35103for as_dir in $PATH
35104do
35105  IFS=$as_save_IFS
35106  test -z "$as_dir" && as_dir=.
35107    for ac_exec_ext in '' $ac_executable_extensions; do
35108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35109    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35111    break 2
35112  fi
35113done
35114  done
35115IFS=$as_save_IFS
35116
35117  ;;
35118esac
35119fi
35120NM=$ac_cv_path_NM
35121if test -n "$NM"; then
35122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35123$as_echo "$NM" >&6; }
35124else
35125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35126$as_echo "no" >&6; }
35127fi
35128
35129
35130  test -n "$NM" && break
35131done
35132
35133  else
35134    # The variable is set, but is it from the command line or the environment?
35135
35136    # Try to remove the string !NM! from our list.
35137    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35138    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35139      # If it failed, the variable was not from the command line. Ignore it,
35140      # but warn the user (except for BASH, which is always set by the calling BASH).
35141      if test "xNM" != xBASH; then
35142        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35143$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35144      fi
35145      # Try to locate tool using the code snippet
35146      for ac_prog in nm
35147do
35148  # Extract the first word of "$ac_prog", so it can be a program name with args.
35149set dummy $ac_prog; ac_word=$2
35150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35151$as_echo_n "checking for $ac_word... " >&6; }
35152if ${ac_cv_path_NM+:} false; then :
35153  $as_echo_n "(cached) " >&6
35154else
35155  case $NM in
35156  [\\/]* | ?:[\\/]*)
35157  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35158  ;;
35159  *)
35160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35161for as_dir in $PATH
35162do
35163  IFS=$as_save_IFS
35164  test -z "$as_dir" && as_dir=.
35165    for ac_exec_ext in '' $ac_executable_extensions; do
35166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35167    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35169    break 2
35170  fi
35171done
35172  done
35173IFS=$as_save_IFS
35174
35175  ;;
35176esac
35177fi
35178NM=$ac_cv_path_NM
35179if test -n "$NM"; then
35180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35181$as_echo "$NM" >&6; }
35182else
35183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35184$as_echo "no" >&6; }
35185fi
35186
35187
35188  test -n "$NM" && break
35189done
35190
35191    else
35192      # If it succeeded, then it was overridden by the user. We will use it
35193      # for the tool.
35194
35195      # First remove it from the list of overridden variables, so we can test
35196      # for unknown variables in the end.
35197      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35198
35199      # Check if the provided tool contains a complete path.
35200      tool_specified="$NM"
35201      tool_basename="${tool_specified##*/}"
35202      if test "x$tool_basename" = "x$tool_specified"; then
35203        # A command without a complete path is provided, search $PATH.
35204        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35205$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35206        # Extract the first word of "$tool_basename", so it can be a program name with args.
35207set dummy $tool_basename; ac_word=$2
35208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35209$as_echo_n "checking for $ac_word... " >&6; }
35210if ${ac_cv_path_NM+:} false; then :
35211  $as_echo_n "(cached) " >&6
35212else
35213  case $NM in
35214  [\\/]* | ?:[\\/]*)
35215  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35216  ;;
35217  *)
35218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35219for as_dir in $PATH
35220do
35221  IFS=$as_save_IFS
35222  test -z "$as_dir" && as_dir=.
35223    for ac_exec_ext in '' $ac_executable_extensions; do
35224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35225    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35227    break 2
35228  fi
35229done
35230  done
35231IFS=$as_save_IFS
35232
35233  ;;
35234esac
35235fi
35236NM=$ac_cv_path_NM
35237if test -n "$NM"; then
35238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35239$as_echo "$NM" >&6; }
35240else
35241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35242$as_echo "no" >&6; }
35243fi
35244
35245
35246        if test "x$NM" = x; then
35247          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35248        fi
35249      else
35250        # Otherwise we believe it is a complete path. Use it as it is.
35251        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35252$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35253        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35254$as_echo_n "checking for NM... " >&6; }
35255        if test ! -x "$tool_specified"; then
35256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35257$as_echo "not found" >&6; }
35258          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35259        fi
35260        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35261$as_echo "$tool_specified" >&6; }
35262      fi
35263    fi
35264  fi
35265
35266
35267
35268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35269
35270  # First separate the path from the arguments. This will split at the first
35271  # space.
35272  complete="$NM"
35273  path="${complete%% *}"
35274  tmp="$complete EOL"
35275  arguments="${tmp#* }"
35276
35277  # Input might be given as Windows format, start by converting to
35278  # unix format.
35279  new_path=`$CYGPATH -u "$path"`
35280
35281  # Now try to locate executable using which
35282  new_path=`$WHICH "$new_path" 2> /dev/null`
35283  # bat and cmd files are not always considered executable in cygwin causing which
35284  # to not find them
35285  if test "x$new_path" = x \
35286      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35287      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35288    new_path=`$CYGPATH -u "$path"`
35289  fi
35290  if test "x$new_path" = x; then
35291    # Oops. Which didn't find the executable.
35292    # The splitting of arguments from the executable at a space might have been incorrect,
35293    # since paths with space are more likely in Windows. Give it another try with the whole
35294    # argument.
35295    path="$complete"
35296    arguments="EOL"
35297    new_path=`$CYGPATH -u "$path"`
35298    new_path=`$WHICH "$new_path" 2> /dev/null`
35299    # bat and cmd files are not always considered executable in cygwin causing which
35300    # to not find them
35301    if test "x$new_path" = x \
35302        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35303        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35304      new_path=`$CYGPATH -u "$path"`
35305    fi
35306    if test "x$new_path" = x; then
35307      # It's still not found. Now this is an unrecoverable error.
35308      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35309$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35310      has_space=`$ECHO "$complete" | $GREP " "`
35311      if test "x$has_space" != x; then
35312        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35313$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35314      fi
35315      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35316    fi
35317  fi
35318
35319  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35320  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35321  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35322  # "foo.exe" is OK but "foo" is an error.
35323  #
35324  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35325  # It is also a way to make sure we got the proper file name for the real test later on.
35326  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35327  if test "x$test_shortpath" = x; then
35328    # Short path failed, file does not exist as specified.
35329    # Try adding .exe or .cmd
35330    if test -f "${new_path}.exe"; then
35331      input_to_shortpath="${new_path}.exe"
35332    elif test -f "${new_path}.cmd"; then
35333      input_to_shortpath="${new_path}.cmd"
35334    else
35335      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35336$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35337      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35338$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35339      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35340    fi
35341  else
35342    input_to_shortpath="$new_path"
35343  fi
35344
35345  # Call helper function which possibly converts this using DOS-style short mode.
35346  # If so, the updated path is stored in $new_path.
35347  new_path="$input_to_shortpath"
35348
35349  input_path="$input_to_shortpath"
35350  # Check if we need to convert this using DOS-style short mode. If the path
35351  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35352  # take no chances and rewrite it.
35353  # Note: m4 eats our [], so we need to use [ and ] instead.
35354  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35355  if test "x$has_forbidden_chars" != x; then
35356    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35357    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35358    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35359    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35360      # Going to short mode and back again did indeed matter. Since short mode is
35361      # case insensitive, let's make it lowercase to improve readability.
35362      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35363      # Now convert it back to Unix-stile (cygpath)
35364      input_path=`$CYGPATH -u "$shortmode_path"`
35365      new_path="$input_path"
35366    fi
35367  fi
35368
35369  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35370  if test "x$test_cygdrive_prefix" = x; then
35371    # As a simple fix, exclude /usr/bin since it's not a real path.
35372    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35373      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35374      # a path prefixed by /cygdrive for fixpath to work.
35375      new_path="$CYGWIN_ROOT_PATH$input_path"
35376    fi
35377  fi
35378
35379  # remove trailing .exe if any
35380  new_path="${new_path/%.exe/}"
35381
35382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35383
35384  # First separate the path from the arguments. This will split at the first
35385  # space.
35386  complete="$NM"
35387  path="${complete%% *}"
35388  tmp="$complete EOL"
35389  arguments="${tmp#* }"
35390
35391  # Input might be given as Windows format, start by converting to
35392  # unix format.
35393  new_path="$path"
35394
35395  windows_path="$new_path"
35396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35397    unix_path=`$CYGPATH -u "$windows_path"`
35398    new_path="$unix_path"
35399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35401    new_path="$unix_path"
35402  fi
35403
35404
35405  # Now try to locate executable using which
35406  new_path=`$WHICH "$new_path" 2> /dev/null`
35407
35408  if test "x$new_path" = x; then
35409    # Oops. Which didn't find the executable.
35410    # The splitting of arguments from the executable at a space might have been incorrect,
35411    # since paths with space are more likely in Windows. Give it another try with the whole
35412    # argument.
35413    path="$complete"
35414    arguments="EOL"
35415    new_path="$path"
35416
35417  windows_path="$new_path"
35418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35419    unix_path=`$CYGPATH -u "$windows_path"`
35420    new_path="$unix_path"
35421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35423    new_path="$unix_path"
35424  fi
35425
35426
35427    new_path=`$WHICH "$new_path" 2> /dev/null`
35428
35429    if test "x$new_path" = x; then
35430      # It's still not found. Now this is an unrecoverable error.
35431      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35432$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35433      has_space=`$ECHO "$complete" | $GREP " "`
35434      if test "x$has_space" != x; then
35435        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35436$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35437      fi
35438      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35439    fi
35440  fi
35441
35442  # Now new_path has a complete unix path to the binary
35443  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35444    # Keep paths in /bin as-is, but remove trailing .exe if any
35445    new_path="${new_path/%.exe/}"
35446    # Do not save /bin paths to all_fixpath_prefixes!
35447  else
35448    # Not in mixed or Windows style, start by that.
35449    new_path=`cmd //c echo $new_path`
35450
35451  input_path="$new_path"
35452  # Check if we need to convert this using DOS-style short mode. If the path
35453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35454  # take no chances and rewrite it.
35455  # Note: m4 eats our [], so we need to use [ and ] instead.
35456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35457  if test "x$has_forbidden_chars" != x; then
35458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35459    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35460  fi
35461
35462    # Output is in $new_path
35463
35464  windows_path="$new_path"
35465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35466    unix_path=`$CYGPATH -u "$windows_path"`
35467    new_path="$unix_path"
35468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35470    new_path="$unix_path"
35471  fi
35472
35473    # remove trailing .exe if any
35474    new_path="${new_path/%.exe/}"
35475
35476    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35477    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35478  fi
35479
35480  else
35481    # We're on a posix platform. Hooray! :)
35482    # First separate the path from the arguments. This will split at the first
35483    # space.
35484    complete="$NM"
35485    path="${complete%% *}"
35486    tmp="$complete EOL"
35487    arguments="${tmp#* }"
35488
35489    # Cannot rely on the command "which" here since it doesn't always work.
35490    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35491    if test -z "$is_absolute_path"; then
35492      # Path to executable is not absolute. Find it.
35493      IFS_save="$IFS"
35494      IFS=:
35495      for p in $PATH; do
35496        if test -f "$p/$path" && test -x "$p/$path"; then
35497          new_path="$p/$path"
35498          break
35499        fi
35500      done
35501      IFS="$IFS_save"
35502    else
35503      # This is an absolute path, we can use it without further modifications.
35504      new_path="$path"
35505    fi
35506
35507    if test "x$new_path" = x; then
35508      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35509$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35510      has_space=`$ECHO "$complete" | $GREP " "`
35511      if test "x$has_space" != x; then
35512        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35513$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35514      fi
35515      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35516    fi
35517  fi
35518
35519  # Now join together the path and the arguments once again
35520  if test "x$arguments" != xEOL; then
35521    new_complete="$new_path ${arguments% *}"
35522  else
35523    new_complete="$new_path"
35524  fi
35525
35526  if test "x$complete" != "x$new_complete"; then
35527    NM="$new_complete"
35528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35529$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35530  fi
35531
35532
35533
35534  # Publish this variable in the help.
35535
35536
35537  if test "x$GNM" = x; then
35538    # The variable is not set by user, try to locate tool using the code snippet
35539    for ac_prog in gnm
35540do
35541  # Extract the first word of "$ac_prog", so it can be a program name with args.
35542set dummy $ac_prog; ac_word=$2
35543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35544$as_echo_n "checking for $ac_word... " >&6; }
35545if ${ac_cv_path_GNM+:} false; then :
35546  $as_echo_n "(cached) " >&6
35547else
35548  case $GNM in
35549  [\\/]* | ?:[\\/]*)
35550  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35551  ;;
35552  *)
35553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35554for as_dir in $PATH
35555do
35556  IFS=$as_save_IFS
35557  test -z "$as_dir" && as_dir=.
35558    for ac_exec_ext in '' $ac_executable_extensions; do
35559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35560    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35562    break 2
35563  fi
35564done
35565  done
35566IFS=$as_save_IFS
35567
35568  ;;
35569esac
35570fi
35571GNM=$ac_cv_path_GNM
35572if test -n "$GNM"; then
35573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35574$as_echo "$GNM" >&6; }
35575else
35576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35577$as_echo "no" >&6; }
35578fi
35579
35580
35581  test -n "$GNM" && break
35582done
35583
35584  else
35585    # The variable is set, but is it from the command line or the environment?
35586
35587    # Try to remove the string !GNM! from our list.
35588    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35589    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35590      # If it failed, the variable was not from the command line. Ignore it,
35591      # but warn the user (except for BASH, which is always set by the calling BASH).
35592      if test "xGNM" != xBASH; then
35593        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35594$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35595      fi
35596      # Try to locate tool using the code snippet
35597      for ac_prog in gnm
35598do
35599  # Extract the first word of "$ac_prog", so it can be a program name with args.
35600set dummy $ac_prog; ac_word=$2
35601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35602$as_echo_n "checking for $ac_word... " >&6; }
35603if ${ac_cv_path_GNM+:} false; then :
35604  $as_echo_n "(cached) " >&6
35605else
35606  case $GNM in
35607  [\\/]* | ?:[\\/]*)
35608  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35609  ;;
35610  *)
35611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35612for as_dir in $PATH
35613do
35614  IFS=$as_save_IFS
35615  test -z "$as_dir" && as_dir=.
35616    for ac_exec_ext in '' $ac_executable_extensions; do
35617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35618    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35620    break 2
35621  fi
35622done
35623  done
35624IFS=$as_save_IFS
35625
35626  ;;
35627esac
35628fi
35629GNM=$ac_cv_path_GNM
35630if test -n "$GNM"; then
35631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35632$as_echo "$GNM" >&6; }
35633else
35634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35635$as_echo "no" >&6; }
35636fi
35637
35638
35639  test -n "$GNM" && break
35640done
35641
35642    else
35643      # If it succeeded, then it was overridden by the user. We will use it
35644      # for the tool.
35645
35646      # First remove it from the list of overridden variables, so we can test
35647      # for unknown variables in the end.
35648      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35649
35650      # Check if the provided tool contains a complete path.
35651      tool_specified="$GNM"
35652      tool_basename="${tool_specified##*/}"
35653      if test "x$tool_basename" = "x$tool_specified"; then
35654        # A command without a complete path is provided, search $PATH.
35655        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35656$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35657        # Extract the first word of "$tool_basename", so it can be a program name with args.
35658set dummy $tool_basename; ac_word=$2
35659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35660$as_echo_n "checking for $ac_word... " >&6; }
35661if ${ac_cv_path_GNM+:} false; then :
35662  $as_echo_n "(cached) " >&6
35663else
35664  case $GNM in
35665  [\\/]* | ?:[\\/]*)
35666  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35667  ;;
35668  *)
35669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35670for as_dir in $PATH
35671do
35672  IFS=$as_save_IFS
35673  test -z "$as_dir" && as_dir=.
35674    for ac_exec_ext in '' $ac_executable_extensions; do
35675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35676    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35678    break 2
35679  fi
35680done
35681  done
35682IFS=$as_save_IFS
35683
35684  ;;
35685esac
35686fi
35687GNM=$ac_cv_path_GNM
35688if test -n "$GNM"; then
35689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35690$as_echo "$GNM" >&6; }
35691else
35692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35693$as_echo "no" >&6; }
35694fi
35695
35696
35697        if test "x$GNM" = x; then
35698          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35699        fi
35700      else
35701        # Otherwise we believe it is a complete path. Use it as it is.
35702        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35703$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35704        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35705$as_echo_n "checking for GNM... " >&6; }
35706        if test ! -x "$tool_specified"; then
35707          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35708$as_echo "not found" >&6; }
35709          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
35710        fi
35711        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35712$as_echo "$tool_specified" >&6; }
35713      fi
35714    fi
35715  fi
35716
35717
35718
35719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35720
35721  # First separate the path from the arguments. This will split at the first
35722  # space.
35723  complete="$GNM"
35724  path="${complete%% *}"
35725  tmp="$complete EOL"
35726  arguments="${tmp#* }"
35727
35728  # Input might be given as Windows format, start by converting to
35729  # unix format.
35730  new_path=`$CYGPATH -u "$path"`
35731
35732  # Now try to locate executable using which
35733  new_path=`$WHICH "$new_path" 2> /dev/null`
35734  # bat and cmd files are not always considered executable in cygwin causing which
35735  # to not find them
35736  if test "x$new_path" = x \
35737      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35738      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35739    new_path=`$CYGPATH -u "$path"`
35740  fi
35741  if test "x$new_path" = x; then
35742    # Oops. Which didn't find the executable.
35743    # The splitting of arguments from the executable at a space might have been incorrect,
35744    # since paths with space are more likely in Windows. Give it another try with the whole
35745    # argument.
35746    path="$complete"
35747    arguments="EOL"
35748    new_path=`$CYGPATH -u "$path"`
35749    new_path=`$WHICH "$new_path" 2> /dev/null`
35750    # bat and cmd files are not always considered executable in cygwin causing which
35751    # to not find them
35752    if test "x$new_path" = x \
35753        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35754        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35755      new_path=`$CYGPATH -u "$path"`
35756    fi
35757    if test "x$new_path" = x; then
35758      # It's still not found. Now this is an unrecoverable error.
35759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35760$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35761      has_space=`$ECHO "$complete" | $GREP " "`
35762      if test "x$has_space" != x; then
35763        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35764$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35765      fi
35766      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35767    fi
35768  fi
35769
35770  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35771  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35772  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35773  # "foo.exe" is OK but "foo" is an error.
35774  #
35775  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35776  # It is also a way to make sure we got the proper file name for the real test later on.
35777  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35778  if test "x$test_shortpath" = x; then
35779    # Short path failed, file does not exist as specified.
35780    # Try adding .exe or .cmd
35781    if test -f "${new_path}.exe"; then
35782      input_to_shortpath="${new_path}.exe"
35783    elif test -f "${new_path}.cmd"; then
35784      input_to_shortpath="${new_path}.cmd"
35785    else
35786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
35787$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
35788      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35789$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35790      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35791    fi
35792  else
35793    input_to_shortpath="$new_path"
35794  fi
35795
35796  # Call helper function which possibly converts this using DOS-style short mode.
35797  # If so, the updated path is stored in $new_path.
35798  new_path="$input_to_shortpath"
35799
35800  input_path="$input_to_shortpath"
35801  # Check if we need to convert this using DOS-style short mode. If the path
35802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35803  # take no chances and rewrite it.
35804  # Note: m4 eats our [], so we need to use [ and ] instead.
35805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35806  if test "x$has_forbidden_chars" != x; then
35807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35811      # Going to short mode and back again did indeed matter. Since short mode is
35812      # case insensitive, let's make it lowercase to improve readability.
35813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35814      # Now convert it back to Unix-stile (cygpath)
35815      input_path=`$CYGPATH -u "$shortmode_path"`
35816      new_path="$input_path"
35817    fi
35818  fi
35819
35820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35821  if test "x$test_cygdrive_prefix" = x; then
35822    # As a simple fix, exclude /usr/bin since it's not a real path.
35823    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35825      # a path prefixed by /cygdrive for fixpath to work.
35826      new_path="$CYGWIN_ROOT_PATH$input_path"
35827    fi
35828  fi
35829
35830  # remove trailing .exe if any
35831  new_path="${new_path/%.exe/}"
35832
35833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35834
35835  # First separate the path from the arguments. This will split at the first
35836  # space.
35837  complete="$GNM"
35838  path="${complete%% *}"
35839  tmp="$complete EOL"
35840  arguments="${tmp#* }"
35841
35842  # Input might be given as Windows format, start by converting to
35843  # unix format.
35844  new_path="$path"
35845
35846  windows_path="$new_path"
35847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35848    unix_path=`$CYGPATH -u "$windows_path"`
35849    new_path="$unix_path"
35850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35852    new_path="$unix_path"
35853  fi
35854
35855
35856  # Now try to locate executable using which
35857  new_path=`$WHICH "$new_path" 2> /dev/null`
35858
35859  if test "x$new_path" = x; then
35860    # Oops. Which didn't find the executable.
35861    # The splitting of arguments from the executable at a space might have been incorrect,
35862    # since paths with space are more likely in Windows. Give it another try with the whole
35863    # argument.
35864    path="$complete"
35865    arguments="EOL"
35866    new_path="$path"
35867
35868  windows_path="$new_path"
35869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35870    unix_path=`$CYGPATH -u "$windows_path"`
35871    new_path="$unix_path"
35872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35874    new_path="$unix_path"
35875  fi
35876
35877
35878    new_path=`$WHICH "$new_path" 2> /dev/null`
35879
35880    if test "x$new_path" = x; then
35881      # It's still not found. Now this is an unrecoverable error.
35882      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35883$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35884      has_space=`$ECHO "$complete" | $GREP " "`
35885      if test "x$has_space" != x; then
35886        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35887$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35888      fi
35889      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35890    fi
35891  fi
35892
35893  # Now new_path has a complete unix path to the binary
35894  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35895    # Keep paths in /bin as-is, but remove trailing .exe if any
35896    new_path="${new_path/%.exe/}"
35897    # Do not save /bin paths to all_fixpath_prefixes!
35898  else
35899    # Not in mixed or Windows style, start by that.
35900    new_path=`cmd //c echo $new_path`
35901
35902  input_path="$new_path"
35903  # Check if we need to convert this using DOS-style short mode. If the path
35904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35905  # take no chances and rewrite it.
35906  # Note: m4 eats our [], so we need to use [ and ] instead.
35907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35908  if test "x$has_forbidden_chars" != x; then
35909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35910    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35911  fi
35912
35913    # Output is in $new_path
35914
35915  windows_path="$new_path"
35916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35917    unix_path=`$CYGPATH -u "$windows_path"`
35918    new_path="$unix_path"
35919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35921    new_path="$unix_path"
35922  fi
35923
35924    # remove trailing .exe if any
35925    new_path="${new_path/%.exe/}"
35926
35927    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35928    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35929  fi
35930
35931  else
35932    # We're on a posix platform. Hooray! :)
35933    # First separate the path from the arguments. This will split at the first
35934    # space.
35935    complete="$GNM"
35936    path="${complete%% *}"
35937    tmp="$complete EOL"
35938    arguments="${tmp#* }"
35939
35940    # Cannot rely on the command "which" here since it doesn't always work.
35941    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35942    if test -z "$is_absolute_path"; then
35943      # Path to executable is not absolute. Find it.
35944      IFS_save="$IFS"
35945      IFS=:
35946      for p in $PATH; do
35947        if test -f "$p/$path" && test -x "$p/$path"; then
35948          new_path="$p/$path"
35949          break
35950        fi
35951      done
35952      IFS="$IFS_save"
35953    else
35954      # This is an absolute path, we can use it without further modifications.
35955      new_path="$path"
35956    fi
35957
35958    if test "x$new_path" = x; then
35959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35960$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35961      has_space=`$ECHO "$complete" | $GREP " "`
35962      if test "x$has_space" != x; then
35963        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35964$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35965      fi
35966      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35967    fi
35968  fi
35969
35970  # Now join together the path and the arguments once again
35971  if test "x$arguments" != xEOL; then
35972    new_complete="$new_path ${arguments% *}"
35973  else
35974    new_complete="$new_path"
35975  fi
35976
35977  if test "x$complete" != "x$new_complete"; then
35978    GNM="$new_complete"
35979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
35980$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
35981  fi
35982
35983
35984
35985
35986  # Publish this variable in the help.
35987
35988
35989  if test "x$MCS" = x; then
35990    # The variable is not set by user, try to locate tool using the code snippet
35991    for ac_prog in mcs
35992do
35993  # Extract the first word of "$ac_prog", so it can be a program name with args.
35994set dummy $ac_prog; ac_word=$2
35995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35996$as_echo_n "checking for $ac_word... " >&6; }
35997if ${ac_cv_path_MCS+:} false; then :
35998  $as_echo_n "(cached) " >&6
35999else
36000  case $MCS in
36001  [\\/]* | ?:[\\/]*)
36002  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36003  ;;
36004  *)
36005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36006for as_dir in $PATH
36007do
36008  IFS=$as_save_IFS
36009  test -z "$as_dir" && as_dir=.
36010    for ac_exec_ext in '' $ac_executable_extensions; do
36011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36012    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36014    break 2
36015  fi
36016done
36017  done
36018IFS=$as_save_IFS
36019
36020  ;;
36021esac
36022fi
36023MCS=$ac_cv_path_MCS
36024if test -n "$MCS"; then
36025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36026$as_echo "$MCS" >&6; }
36027else
36028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36029$as_echo "no" >&6; }
36030fi
36031
36032
36033  test -n "$MCS" && break
36034done
36035
36036  else
36037    # The variable is set, but is it from the command line or the environment?
36038
36039    # Try to remove the string !MCS! from our list.
36040    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36041    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36042      # If it failed, the variable was not from the command line. Ignore it,
36043      # but warn the user (except for BASH, which is always set by the calling BASH).
36044      if test "xMCS" != xBASH; then
36045        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36046$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36047      fi
36048      # Try to locate tool using the code snippet
36049      for ac_prog in mcs
36050do
36051  # Extract the first word of "$ac_prog", so it can be a program name with args.
36052set dummy $ac_prog; ac_word=$2
36053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36054$as_echo_n "checking for $ac_word... " >&6; }
36055if ${ac_cv_path_MCS+:} false; then :
36056  $as_echo_n "(cached) " >&6
36057else
36058  case $MCS in
36059  [\\/]* | ?:[\\/]*)
36060  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36061  ;;
36062  *)
36063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36064for as_dir in $PATH
36065do
36066  IFS=$as_save_IFS
36067  test -z "$as_dir" && as_dir=.
36068    for ac_exec_ext in '' $ac_executable_extensions; do
36069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36070    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36072    break 2
36073  fi
36074done
36075  done
36076IFS=$as_save_IFS
36077
36078  ;;
36079esac
36080fi
36081MCS=$ac_cv_path_MCS
36082if test -n "$MCS"; then
36083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36084$as_echo "$MCS" >&6; }
36085else
36086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36087$as_echo "no" >&6; }
36088fi
36089
36090
36091  test -n "$MCS" && break
36092done
36093
36094    else
36095      # If it succeeded, then it was overridden by the user. We will use it
36096      # for the tool.
36097
36098      # First remove it from the list of overridden variables, so we can test
36099      # for unknown variables in the end.
36100      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36101
36102      # Check if the provided tool contains a complete path.
36103      tool_specified="$MCS"
36104      tool_basename="${tool_specified##*/}"
36105      if test "x$tool_basename" = "x$tool_specified"; then
36106        # A command without a complete path is provided, search $PATH.
36107        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36108$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36109        # Extract the first word of "$tool_basename", so it can be a program name with args.
36110set dummy $tool_basename; ac_word=$2
36111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36112$as_echo_n "checking for $ac_word... " >&6; }
36113if ${ac_cv_path_MCS+:} false; then :
36114  $as_echo_n "(cached) " >&6
36115else
36116  case $MCS in
36117  [\\/]* | ?:[\\/]*)
36118  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36119  ;;
36120  *)
36121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36122for as_dir in $PATH
36123do
36124  IFS=$as_save_IFS
36125  test -z "$as_dir" && as_dir=.
36126    for ac_exec_ext in '' $ac_executable_extensions; do
36127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36128    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36130    break 2
36131  fi
36132done
36133  done
36134IFS=$as_save_IFS
36135
36136  ;;
36137esac
36138fi
36139MCS=$ac_cv_path_MCS
36140if test -n "$MCS"; then
36141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36142$as_echo "$MCS" >&6; }
36143else
36144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36145$as_echo "no" >&6; }
36146fi
36147
36148
36149        if test "x$MCS" = x; then
36150          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36151        fi
36152      else
36153        # Otherwise we believe it is a complete path. Use it as it is.
36154        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36155$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36156        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36157$as_echo_n "checking for MCS... " >&6; }
36158        if test ! -x "$tool_specified"; then
36159          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36160$as_echo "not found" >&6; }
36161          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36162        fi
36163        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36164$as_echo "$tool_specified" >&6; }
36165      fi
36166    fi
36167  fi
36168
36169
36170
36171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36172
36173  # First separate the path from the arguments. This will split at the first
36174  # space.
36175  complete="$MCS"
36176  path="${complete%% *}"
36177  tmp="$complete EOL"
36178  arguments="${tmp#* }"
36179
36180  # Input might be given as Windows format, start by converting to
36181  # unix format.
36182  new_path=`$CYGPATH -u "$path"`
36183
36184  # Now try to locate executable using which
36185  new_path=`$WHICH "$new_path" 2> /dev/null`
36186  # bat and cmd files are not always considered executable in cygwin causing which
36187  # to not find them
36188  if test "x$new_path" = x \
36189      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36190      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36191    new_path=`$CYGPATH -u "$path"`
36192  fi
36193  if test "x$new_path" = x; then
36194    # Oops. Which didn't find the executable.
36195    # The splitting of arguments from the executable at a space might have been incorrect,
36196    # since paths with space are more likely in Windows. Give it another try with the whole
36197    # argument.
36198    path="$complete"
36199    arguments="EOL"
36200    new_path=`$CYGPATH -u "$path"`
36201    new_path=`$WHICH "$new_path" 2> /dev/null`
36202    # bat and cmd files are not always considered executable in cygwin causing which
36203    # to not find them
36204    if test "x$new_path" = x \
36205        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36206        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36207      new_path=`$CYGPATH -u "$path"`
36208    fi
36209    if test "x$new_path" = x; then
36210      # It's still not found. Now this is an unrecoverable error.
36211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36212$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36213      has_space=`$ECHO "$complete" | $GREP " "`
36214      if test "x$has_space" != x; then
36215        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36216$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36217      fi
36218      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36219    fi
36220  fi
36221
36222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36225  # "foo.exe" is OK but "foo" is an error.
36226  #
36227  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36228  # It is also a way to make sure we got the proper file name for the real test later on.
36229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36230  if test "x$test_shortpath" = x; then
36231    # Short path failed, file does not exist as specified.
36232    # Try adding .exe or .cmd
36233    if test -f "${new_path}.exe"; then
36234      input_to_shortpath="${new_path}.exe"
36235    elif test -f "${new_path}.cmd"; then
36236      input_to_shortpath="${new_path}.cmd"
36237    else
36238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36239$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36240      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36241$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36242      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36243    fi
36244  else
36245    input_to_shortpath="$new_path"
36246  fi
36247
36248  # Call helper function which possibly converts this using DOS-style short mode.
36249  # If so, the updated path is stored in $new_path.
36250  new_path="$input_to_shortpath"
36251
36252  input_path="$input_to_shortpath"
36253  # Check if we need to convert this using DOS-style short mode. If the path
36254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36255  # take no chances and rewrite it.
36256  # Note: m4 eats our [], so we need to use [ and ] instead.
36257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36258  if test "x$has_forbidden_chars" != x; then
36259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36263      # Going to short mode and back again did indeed matter. Since short mode is
36264      # case insensitive, let's make it lowercase to improve readability.
36265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36266      # Now convert it back to Unix-stile (cygpath)
36267      input_path=`$CYGPATH -u "$shortmode_path"`
36268      new_path="$input_path"
36269    fi
36270  fi
36271
36272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36273  if test "x$test_cygdrive_prefix" = x; then
36274    # As a simple fix, exclude /usr/bin since it's not a real path.
36275    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36277      # a path prefixed by /cygdrive for fixpath to work.
36278      new_path="$CYGWIN_ROOT_PATH$input_path"
36279    fi
36280  fi
36281
36282  # remove trailing .exe if any
36283  new_path="${new_path/%.exe/}"
36284
36285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36286
36287  # First separate the path from the arguments. This will split at the first
36288  # space.
36289  complete="$MCS"
36290  path="${complete%% *}"
36291  tmp="$complete EOL"
36292  arguments="${tmp#* }"
36293
36294  # Input might be given as Windows format, start by converting to
36295  # unix format.
36296  new_path="$path"
36297
36298  windows_path="$new_path"
36299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36300    unix_path=`$CYGPATH -u "$windows_path"`
36301    new_path="$unix_path"
36302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36304    new_path="$unix_path"
36305  fi
36306
36307
36308  # Now try to locate executable using which
36309  new_path=`$WHICH "$new_path" 2> /dev/null`
36310
36311  if test "x$new_path" = x; then
36312    # Oops. Which didn't find the executable.
36313    # The splitting of arguments from the executable at a space might have been incorrect,
36314    # since paths with space are more likely in Windows. Give it another try with the whole
36315    # argument.
36316    path="$complete"
36317    arguments="EOL"
36318    new_path="$path"
36319
36320  windows_path="$new_path"
36321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36322    unix_path=`$CYGPATH -u "$windows_path"`
36323    new_path="$unix_path"
36324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36326    new_path="$unix_path"
36327  fi
36328
36329
36330    new_path=`$WHICH "$new_path" 2> /dev/null`
36331
36332    if test "x$new_path" = x; then
36333      # It's still not found. Now this is an unrecoverable error.
36334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36335$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36336      has_space=`$ECHO "$complete" | $GREP " "`
36337      if test "x$has_space" != x; then
36338        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36339$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36340      fi
36341      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36342    fi
36343  fi
36344
36345  # Now new_path has a complete unix path to the binary
36346  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36347    # Keep paths in /bin as-is, but remove trailing .exe if any
36348    new_path="${new_path/%.exe/}"
36349    # Do not save /bin paths to all_fixpath_prefixes!
36350  else
36351    # Not in mixed or Windows style, start by that.
36352    new_path=`cmd //c echo $new_path`
36353
36354  input_path="$new_path"
36355  # Check if we need to convert this using DOS-style short mode. If the path
36356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36357  # take no chances and rewrite it.
36358  # Note: m4 eats our [], so we need to use [ and ] instead.
36359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36360  if test "x$has_forbidden_chars" != x; then
36361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36362    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36363  fi
36364
36365    # Output is in $new_path
36366
36367  windows_path="$new_path"
36368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36369    unix_path=`$CYGPATH -u "$windows_path"`
36370    new_path="$unix_path"
36371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36373    new_path="$unix_path"
36374  fi
36375
36376    # remove trailing .exe if any
36377    new_path="${new_path/%.exe/}"
36378
36379    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36380    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36381  fi
36382
36383  else
36384    # We're on a posix platform. Hooray! :)
36385    # First separate the path from the arguments. This will split at the first
36386    # space.
36387    complete="$MCS"
36388    path="${complete%% *}"
36389    tmp="$complete EOL"
36390    arguments="${tmp#* }"
36391
36392    # Cannot rely on the command "which" here since it doesn't always work.
36393    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36394    if test -z "$is_absolute_path"; then
36395      # Path to executable is not absolute. Find it.
36396      IFS_save="$IFS"
36397      IFS=:
36398      for p in $PATH; do
36399        if test -f "$p/$path" && test -x "$p/$path"; then
36400          new_path="$p/$path"
36401          break
36402        fi
36403      done
36404      IFS="$IFS_save"
36405    else
36406      # This is an absolute path, we can use it without further modifications.
36407      new_path="$path"
36408    fi
36409
36410    if test "x$new_path" = x; then
36411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36412$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36413      has_space=`$ECHO "$complete" | $GREP " "`
36414      if test "x$has_space" != x; then
36415        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36416$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36417      fi
36418      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36419    fi
36420  fi
36421
36422  # Now join together the path and the arguments once again
36423  if test "x$arguments" != xEOL; then
36424    new_complete="$new_path ${arguments% *}"
36425  else
36426    new_complete="$new_path"
36427  fi
36428
36429  if test "x$complete" != "x$new_complete"; then
36430    MCS="$new_complete"
36431    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36432$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36433  fi
36434
36435  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36436    # FIXME: we should unify this with the solaris case above.
36437
36438
36439  # Publish this variable in the help.
36440
36441
36442  if test "x$STRIP" = x; then
36443    # The variable is not set by user, try to locate tool using the code snippet
36444    if test -n "$ac_tool_prefix"; then
36445  for ac_prog in strip
36446  do
36447    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36448set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36450$as_echo_n "checking for $ac_word... " >&6; }
36451if ${ac_cv_prog_STRIP+:} false; then :
36452  $as_echo_n "(cached) " >&6
36453else
36454  if test -n "$STRIP"; then
36455  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36456else
36457as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36458for as_dir in $PATH
36459do
36460  IFS=$as_save_IFS
36461  test -z "$as_dir" && as_dir=.
36462    for ac_exec_ext in '' $ac_executable_extensions; do
36463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36464    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36466    break 2
36467  fi
36468done
36469  done
36470IFS=$as_save_IFS
36471
36472fi
36473fi
36474STRIP=$ac_cv_prog_STRIP
36475if test -n "$STRIP"; then
36476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36477$as_echo "$STRIP" >&6; }
36478else
36479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36480$as_echo "no" >&6; }
36481fi
36482
36483
36484    test -n "$STRIP" && break
36485  done
36486fi
36487if test -z "$STRIP"; then
36488  ac_ct_STRIP=$STRIP
36489  for ac_prog in strip
36490do
36491  # Extract the first word of "$ac_prog", so it can be a program name with args.
36492set dummy $ac_prog; ac_word=$2
36493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36494$as_echo_n "checking for $ac_word... " >&6; }
36495if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36496  $as_echo_n "(cached) " >&6
36497else
36498  if test -n "$ac_ct_STRIP"; then
36499  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36500else
36501as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36502for as_dir in $PATH
36503do
36504  IFS=$as_save_IFS
36505  test -z "$as_dir" && as_dir=.
36506    for ac_exec_ext in '' $ac_executable_extensions; do
36507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36508    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36510    break 2
36511  fi
36512done
36513  done
36514IFS=$as_save_IFS
36515
36516fi
36517fi
36518ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36519if test -n "$ac_ct_STRIP"; then
36520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36521$as_echo "$ac_ct_STRIP" >&6; }
36522else
36523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36524$as_echo "no" >&6; }
36525fi
36526
36527
36528  test -n "$ac_ct_STRIP" && break
36529done
36530
36531  if test "x$ac_ct_STRIP" = x; then
36532    STRIP=""
36533  else
36534    case $cross_compiling:$ac_tool_warned in
36535yes:)
36536{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36537$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36538ac_tool_warned=yes ;;
36539esac
36540    STRIP=$ac_ct_STRIP
36541  fi
36542fi
36543
36544  else
36545    # The variable is set, but is it from the command line or the environment?
36546
36547    # Try to remove the string !STRIP! from our list.
36548    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36549    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36550      # If it failed, the variable was not from the command line. Ignore it,
36551      # but warn the user (except for BASH, which is always set by the calling BASH).
36552      if test "xSTRIP" != xBASH; then
36553        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36554$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36555      fi
36556      # Try to locate tool using the code snippet
36557      if test -n "$ac_tool_prefix"; then
36558  for ac_prog in strip
36559  do
36560    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36561set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36563$as_echo_n "checking for $ac_word... " >&6; }
36564if ${ac_cv_prog_STRIP+:} false; then :
36565  $as_echo_n "(cached) " >&6
36566else
36567  if test -n "$STRIP"; then
36568  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36569else
36570as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36571for as_dir in $PATH
36572do
36573  IFS=$as_save_IFS
36574  test -z "$as_dir" && as_dir=.
36575    for ac_exec_ext in '' $ac_executable_extensions; do
36576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36577    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36579    break 2
36580  fi
36581done
36582  done
36583IFS=$as_save_IFS
36584
36585fi
36586fi
36587STRIP=$ac_cv_prog_STRIP
36588if test -n "$STRIP"; then
36589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36590$as_echo "$STRIP" >&6; }
36591else
36592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36593$as_echo "no" >&6; }
36594fi
36595
36596
36597    test -n "$STRIP" && break
36598  done
36599fi
36600if test -z "$STRIP"; then
36601  ac_ct_STRIP=$STRIP
36602  for ac_prog in strip
36603do
36604  # Extract the first word of "$ac_prog", so it can be a program name with args.
36605set dummy $ac_prog; ac_word=$2
36606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36607$as_echo_n "checking for $ac_word... " >&6; }
36608if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36609  $as_echo_n "(cached) " >&6
36610else
36611  if test -n "$ac_ct_STRIP"; then
36612  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36613else
36614as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36615for as_dir in $PATH
36616do
36617  IFS=$as_save_IFS
36618  test -z "$as_dir" && as_dir=.
36619    for ac_exec_ext in '' $ac_executable_extensions; do
36620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36621    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36623    break 2
36624  fi
36625done
36626  done
36627IFS=$as_save_IFS
36628
36629fi
36630fi
36631ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36632if test -n "$ac_ct_STRIP"; then
36633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36634$as_echo "$ac_ct_STRIP" >&6; }
36635else
36636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36637$as_echo "no" >&6; }
36638fi
36639
36640
36641  test -n "$ac_ct_STRIP" && break
36642done
36643
36644  if test "x$ac_ct_STRIP" = x; then
36645    STRIP=""
36646  else
36647    case $cross_compiling:$ac_tool_warned in
36648yes:)
36649{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36650$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36651ac_tool_warned=yes ;;
36652esac
36653    STRIP=$ac_ct_STRIP
36654  fi
36655fi
36656
36657    else
36658      # If it succeeded, then it was overridden by the user. We will use it
36659      # for the tool.
36660
36661      # First remove it from the list of overridden variables, so we can test
36662      # for unknown variables in the end.
36663      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36664
36665      # Check if the provided tool contains a complete path.
36666      tool_specified="$STRIP"
36667      tool_basename="${tool_specified##*/}"
36668      if test "x$tool_basename" = "x$tool_specified"; then
36669        # A command without a complete path is provided, search $PATH.
36670        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36671$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36672        # Extract the first word of "$tool_basename", so it can be a program name with args.
36673set dummy $tool_basename; ac_word=$2
36674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36675$as_echo_n "checking for $ac_word... " >&6; }
36676if ${ac_cv_path_STRIP+:} false; then :
36677  $as_echo_n "(cached) " >&6
36678else
36679  case $STRIP in
36680  [\\/]* | ?:[\\/]*)
36681  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36682  ;;
36683  *)
36684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36685for as_dir in $PATH
36686do
36687  IFS=$as_save_IFS
36688  test -z "$as_dir" && as_dir=.
36689    for ac_exec_ext in '' $ac_executable_extensions; do
36690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36691    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36693    break 2
36694  fi
36695done
36696  done
36697IFS=$as_save_IFS
36698
36699  ;;
36700esac
36701fi
36702STRIP=$ac_cv_path_STRIP
36703if test -n "$STRIP"; then
36704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36705$as_echo "$STRIP" >&6; }
36706else
36707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36708$as_echo "no" >&6; }
36709fi
36710
36711
36712        if test "x$STRIP" = x; then
36713          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36714        fi
36715      else
36716        # Otherwise we believe it is a complete path. Use it as it is.
36717        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36718$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36719        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36720$as_echo_n "checking for STRIP... " >&6; }
36721        if test ! -x "$tool_specified"; then
36722          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36723$as_echo "not found" >&6; }
36724          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36725        fi
36726        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36727$as_echo "$tool_specified" >&6; }
36728      fi
36729    fi
36730  fi
36731
36732
36733
36734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36735
36736  # First separate the path from the arguments. This will split at the first
36737  # space.
36738  complete="$STRIP"
36739  path="${complete%% *}"
36740  tmp="$complete EOL"
36741  arguments="${tmp#* }"
36742
36743  # Input might be given as Windows format, start by converting to
36744  # unix format.
36745  new_path=`$CYGPATH -u "$path"`
36746
36747  # Now try to locate executable using which
36748  new_path=`$WHICH "$new_path" 2> /dev/null`
36749  # bat and cmd files are not always considered executable in cygwin causing which
36750  # to not find them
36751  if test "x$new_path" = x \
36752      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36753      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36754    new_path=`$CYGPATH -u "$path"`
36755  fi
36756  if test "x$new_path" = x; then
36757    # Oops. Which didn't find the executable.
36758    # The splitting of arguments from the executable at a space might have been incorrect,
36759    # since paths with space are more likely in Windows. Give it another try with the whole
36760    # argument.
36761    path="$complete"
36762    arguments="EOL"
36763    new_path=`$CYGPATH -u "$path"`
36764    new_path=`$WHICH "$new_path" 2> /dev/null`
36765    # bat and cmd files are not always considered executable in cygwin causing which
36766    # to not find them
36767    if test "x$new_path" = x \
36768        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36769        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36770      new_path=`$CYGPATH -u "$path"`
36771    fi
36772    if test "x$new_path" = x; then
36773      # It's still not found. Now this is an unrecoverable error.
36774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36775$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36776      has_space=`$ECHO "$complete" | $GREP " "`
36777      if test "x$has_space" != x; then
36778        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36779$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36780      fi
36781      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36782    fi
36783  fi
36784
36785  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36786  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36787  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36788  # "foo.exe" is OK but "foo" is an error.
36789  #
36790  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36791  # It is also a way to make sure we got the proper file name for the real test later on.
36792  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36793  if test "x$test_shortpath" = x; then
36794    # Short path failed, file does not exist as specified.
36795    # Try adding .exe or .cmd
36796    if test -f "${new_path}.exe"; then
36797      input_to_shortpath="${new_path}.exe"
36798    elif test -f "${new_path}.cmd"; then
36799      input_to_shortpath="${new_path}.cmd"
36800    else
36801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36802$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36803      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36804$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36805      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36806    fi
36807  else
36808    input_to_shortpath="$new_path"
36809  fi
36810
36811  # Call helper function which possibly converts this using DOS-style short mode.
36812  # If so, the updated path is stored in $new_path.
36813  new_path="$input_to_shortpath"
36814
36815  input_path="$input_to_shortpath"
36816  # Check if we need to convert this using DOS-style short mode. If the path
36817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36818  # take no chances and rewrite it.
36819  # Note: m4 eats our [], so we need to use [ and ] instead.
36820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36821  if test "x$has_forbidden_chars" != x; then
36822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36826      # Going to short mode and back again did indeed matter. Since short mode is
36827      # case insensitive, let's make it lowercase to improve readability.
36828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36829      # Now convert it back to Unix-stile (cygpath)
36830      input_path=`$CYGPATH -u "$shortmode_path"`
36831      new_path="$input_path"
36832    fi
36833  fi
36834
36835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36836  if test "x$test_cygdrive_prefix" = x; then
36837    # As a simple fix, exclude /usr/bin since it's not a real path.
36838    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36840      # a path prefixed by /cygdrive for fixpath to work.
36841      new_path="$CYGWIN_ROOT_PATH$input_path"
36842    fi
36843  fi
36844
36845  # remove trailing .exe if any
36846  new_path="${new_path/%.exe/}"
36847
36848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36849
36850  # First separate the path from the arguments. This will split at the first
36851  # space.
36852  complete="$STRIP"
36853  path="${complete%% *}"
36854  tmp="$complete EOL"
36855  arguments="${tmp#* }"
36856
36857  # Input might be given as Windows format, start by converting to
36858  # unix format.
36859  new_path="$path"
36860
36861  windows_path="$new_path"
36862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36863    unix_path=`$CYGPATH -u "$windows_path"`
36864    new_path="$unix_path"
36865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36867    new_path="$unix_path"
36868  fi
36869
36870
36871  # Now try to locate executable using which
36872  new_path=`$WHICH "$new_path" 2> /dev/null`
36873
36874  if test "x$new_path" = x; then
36875    # Oops. Which didn't find the executable.
36876    # The splitting of arguments from the executable at a space might have been incorrect,
36877    # since paths with space are more likely in Windows. Give it another try with the whole
36878    # argument.
36879    path="$complete"
36880    arguments="EOL"
36881    new_path="$path"
36882
36883  windows_path="$new_path"
36884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36885    unix_path=`$CYGPATH -u "$windows_path"`
36886    new_path="$unix_path"
36887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36889    new_path="$unix_path"
36890  fi
36891
36892
36893    new_path=`$WHICH "$new_path" 2> /dev/null`
36894
36895    if test "x$new_path" = x; then
36896      # It's still not found. Now this is an unrecoverable error.
36897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36898$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36899      has_space=`$ECHO "$complete" | $GREP " "`
36900      if test "x$has_space" != x; then
36901        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36902$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36903      fi
36904      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36905    fi
36906  fi
36907
36908  # Now new_path has a complete unix path to the binary
36909  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36910    # Keep paths in /bin as-is, but remove trailing .exe if any
36911    new_path="${new_path/%.exe/}"
36912    # Do not save /bin paths to all_fixpath_prefixes!
36913  else
36914    # Not in mixed or Windows style, start by that.
36915    new_path=`cmd //c echo $new_path`
36916
36917  input_path="$new_path"
36918  # Check if we need to convert this using DOS-style short mode. If the path
36919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36920  # take no chances and rewrite it.
36921  # Note: m4 eats our [], so we need to use [ and ] instead.
36922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36923  if test "x$has_forbidden_chars" != x; then
36924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36925    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36926  fi
36927
36928    # Output is in $new_path
36929
36930  windows_path="$new_path"
36931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36932    unix_path=`$CYGPATH -u "$windows_path"`
36933    new_path="$unix_path"
36934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36936    new_path="$unix_path"
36937  fi
36938
36939    # remove trailing .exe if any
36940    new_path="${new_path/%.exe/}"
36941
36942    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36943    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36944  fi
36945
36946  else
36947    # We're on a posix platform. Hooray! :)
36948    # First separate the path from the arguments. This will split at the first
36949    # space.
36950    complete="$STRIP"
36951    path="${complete%% *}"
36952    tmp="$complete EOL"
36953    arguments="${tmp#* }"
36954
36955    # Cannot rely on the command "which" here since it doesn't always work.
36956    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36957    if test -z "$is_absolute_path"; then
36958      # Path to executable is not absolute. Find it.
36959      IFS_save="$IFS"
36960      IFS=:
36961      for p in $PATH; do
36962        if test -f "$p/$path" && test -x "$p/$path"; then
36963          new_path="$p/$path"
36964          break
36965        fi
36966      done
36967      IFS="$IFS_save"
36968    else
36969      # This is an absolute path, we can use it without further modifications.
36970      new_path="$path"
36971    fi
36972
36973    if test "x$new_path" = x; then
36974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36975$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36976      has_space=`$ECHO "$complete" | $GREP " "`
36977      if test "x$has_space" != x; then
36978        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36979$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36980      fi
36981      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36982    fi
36983  fi
36984
36985  # Now join together the path and the arguments once again
36986  if test "x$arguments" != xEOL; then
36987    new_complete="$new_path ${arguments% *}"
36988  else
36989    new_complete="$new_path"
36990  fi
36991
36992  if test "x$complete" != "x$new_complete"; then
36993    STRIP="$new_complete"
36994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36995$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36996  fi
36997
36998
36999
37000  # Publish this variable in the help.
37001
37002
37003  if test "x$NM" = x; then
37004    # The variable is not set by user, try to locate tool using the code snippet
37005    if test -n "$ac_tool_prefix"; then
37006  for ac_prog in nm
37007  do
37008    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37009set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37011$as_echo_n "checking for $ac_word... " >&6; }
37012if ${ac_cv_prog_NM+:} false; then :
37013  $as_echo_n "(cached) " >&6
37014else
37015  if test -n "$NM"; then
37016  ac_cv_prog_NM="$NM" # Let the user override the test.
37017else
37018as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37019for as_dir in $PATH
37020do
37021  IFS=$as_save_IFS
37022  test -z "$as_dir" && as_dir=.
37023    for ac_exec_ext in '' $ac_executable_extensions; do
37024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37025    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37027    break 2
37028  fi
37029done
37030  done
37031IFS=$as_save_IFS
37032
37033fi
37034fi
37035NM=$ac_cv_prog_NM
37036if test -n "$NM"; then
37037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37038$as_echo "$NM" >&6; }
37039else
37040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37041$as_echo "no" >&6; }
37042fi
37043
37044
37045    test -n "$NM" && break
37046  done
37047fi
37048if test -z "$NM"; then
37049  ac_ct_NM=$NM
37050  for ac_prog in nm
37051do
37052  # Extract the first word of "$ac_prog", so it can be a program name with args.
37053set dummy $ac_prog; ac_word=$2
37054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37055$as_echo_n "checking for $ac_word... " >&6; }
37056if ${ac_cv_prog_ac_ct_NM+:} false; then :
37057  $as_echo_n "(cached) " >&6
37058else
37059  if test -n "$ac_ct_NM"; then
37060  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37061else
37062as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37063for as_dir in $PATH
37064do
37065  IFS=$as_save_IFS
37066  test -z "$as_dir" && as_dir=.
37067    for ac_exec_ext in '' $ac_executable_extensions; do
37068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37069    ac_cv_prog_ac_ct_NM="$ac_prog"
37070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37071    break 2
37072  fi
37073done
37074  done
37075IFS=$as_save_IFS
37076
37077fi
37078fi
37079ac_ct_NM=$ac_cv_prog_ac_ct_NM
37080if test -n "$ac_ct_NM"; then
37081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37082$as_echo "$ac_ct_NM" >&6; }
37083else
37084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37085$as_echo "no" >&6; }
37086fi
37087
37088
37089  test -n "$ac_ct_NM" && break
37090done
37091
37092  if test "x$ac_ct_NM" = x; then
37093    NM=""
37094  else
37095    case $cross_compiling:$ac_tool_warned in
37096yes:)
37097{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37098$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37099ac_tool_warned=yes ;;
37100esac
37101    NM=$ac_ct_NM
37102  fi
37103fi
37104
37105  else
37106    # The variable is set, but is it from the command line or the environment?
37107
37108    # Try to remove the string !NM! from our list.
37109    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37110    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37111      # If it failed, the variable was not from the command line. Ignore it,
37112      # but warn the user (except for BASH, which is always set by the calling BASH).
37113      if test "xNM" != xBASH; then
37114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37115$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37116      fi
37117      # Try to locate tool using the code snippet
37118      if test -n "$ac_tool_prefix"; then
37119  for ac_prog in nm
37120  do
37121    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37122set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37124$as_echo_n "checking for $ac_word... " >&6; }
37125if ${ac_cv_prog_NM+:} false; then :
37126  $as_echo_n "(cached) " >&6
37127else
37128  if test -n "$NM"; then
37129  ac_cv_prog_NM="$NM" # Let the user override the test.
37130else
37131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37132for as_dir in $PATH
37133do
37134  IFS=$as_save_IFS
37135  test -z "$as_dir" && as_dir=.
37136    for ac_exec_ext in '' $ac_executable_extensions; do
37137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37138    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37140    break 2
37141  fi
37142done
37143  done
37144IFS=$as_save_IFS
37145
37146fi
37147fi
37148NM=$ac_cv_prog_NM
37149if test -n "$NM"; then
37150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37151$as_echo "$NM" >&6; }
37152else
37153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37154$as_echo "no" >&6; }
37155fi
37156
37157
37158    test -n "$NM" && break
37159  done
37160fi
37161if test -z "$NM"; then
37162  ac_ct_NM=$NM
37163  for ac_prog in nm
37164do
37165  # Extract the first word of "$ac_prog", so it can be a program name with args.
37166set dummy $ac_prog; ac_word=$2
37167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37168$as_echo_n "checking for $ac_word... " >&6; }
37169if ${ac_cv_prog_ac_ct_NM+:} false; then :
37170  $as_echo_n "(cached) " >&6
37171else
37172  if test -n "$ac_ct_NM"; then
37173  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37174else
37175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37176for as_dir in $PATH
37177do
37178  IFS=$as_save_IFS
37179  test -z "$as_dir" && as_dir=.
37180    for ac_exec_ext in '' $ac_executable_extensions; do
37181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37182    ac_cv_prog_ac_ct_NM="$ac_prog"
37183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37184    break 2
37185  fi
37186done
37187  done
37188IFS=$as_save_IFS
37189
37190fi
37191fi
37192ac_ct_NM=$ac_cv_prog_ac_ct_NM
37193if test -n "$ac_ct_NM"; then
37194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37195$as_echo "$ac_ct_NM" >&6; }
37196else
37197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37198$as_echo "no" >&6; }
37199fi
37200
37201
37202  test -n "$ac_ct_NM" && break
37203done
37204
37205  if test "x$ac_ct_NM" = x; then
37206    NM=""
37207  else
37208    case $cross_compiling:$ac_tool_warned in
37209yes:)
37210{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37211$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37212ac_tool_warned=yes ;;
37213esac
37214    NM=$ac_ct_NM
37215  fi
37216fi
37217
37218    else
37219      # If it succeeded, then it was overridden by the user. We will use it
37220      # for the tool.
37221
37222      # First remove it from the list of overridden variables, so we can test
37223      # for unknown variables in the end.
37224      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37225
37226      # Check if the provided tool contains a complete path.
37227      tool_specified="$NM"
37228      tool_basename="${tool_specified##*/}"
37229      if test "x$tool_basename" = "x$tool_specified"; then
37230        # A command without a complete path is provided, search $PATH.
37231        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37232$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37233        # Extract the first word of "$tool_basename", so it can be a program name with args.
37234set dummy $tool_basename; ac_word=$2
37235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37236$as_echo_n "checking for $ac_word... " >&6; }
37237if ${ac_cv_path_NM+:} false; then :
37238  $as_echo_n "(cached) " >&6
37239else
37240  case $NM in
37241  [\\/]* | ?:[\\/]*)
37242  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37243  ;;
37244  *)
37245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37246for as_dir in $PATH
37247do
37248  IFS=$as_save_IFS
37249  test -z "$as_dir" && as_dir=.
37250    for ac_exec_ext in '' $ac_executable_extensions; do
37251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37252    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37254    break 2
37255  fi
37256done
37257  done
37258IFS=$as_save_IFS
37259
37260  ;;
37261esac
37262fi
37263NM=$ac_cv_path_NM
37264if test -n "$NM"; then
37265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37266$as_echo "$NM" >&6; }
37267else
37268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37269$as_echo "no" >&6; }
37270fi
37271
37272
37273        if test "x$NM" = x; then
37274          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37275        fi
37276      else
37277        # Otherwise we believe it is a complete path. Use it as it is.
37278        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37279$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37280        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37281$as_echo_n "checking for NM... " >&6; }
37282        if test ! -x "$tool_specified"; then
37283          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37284$as_echo "not found" >&6; }
37285          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37286        fi
37287        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37288$as_echo "$tool_specified" >&6; }
37289      fi
37290    fi
37291  fi
37292
37293
37294
37295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37296
37297  # First separate the path from the arguments. This will split at the first
37298  # space.
37299  complete="$NM"
37300  path="${complete%% *}"
37301  tmp="$complete EOL"
37302  arguments="${tmp#* }"
37303
37304  # Input might be given as Windows format, start by converting to
37305  # unix format.
37306  new_path=`$CYGPATH -u "$path"`
37307
37308  # Now try to locate executable using which
37309  new_path=`$WHICH "$new_path" 2> /dev/null`
37310  # bat and cmd files are not always considered executable in cygwin causing which
37311  # to not find them
37312  if test "x$new_path" = x \
37313      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37314      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37315    new_path=`$CYGPATH -u "$path"`
37316  fi
37317  if test "x$new_path" = x; then
37318    # Oops. Which didn't find the executable.
37319    # The splitting of arguments from the executable at a space might have been incorrect,
37320    # since paths with space are more likely in Windows. Give it another try with the whole
37321    # argument.
37322    path="$complete"
37323    arguments="EOL"
37324    new_path=`$CYGPATH -u "$path"`
37325    new_path=`$WHICH "$new_path" 2> /dev/null`
37326    # bat and cmd files are not always considered executable in cygwin causing which
37327    # to not find them
37328    if test "x$new_path" = x \
37329        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37330        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37331      new_path=`$CYGPATH -u "$path"`
37332    fi
37333    if test "x$new_path" = x; then
37334      # It's still not found. Now this is an unrecoverable error.
37335      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37336$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37337      has_space=`$ECHO "$complete" | $GREP " "`
37338      if test "x$has_space" != x; then
37339        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37340$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37341      fi
37342      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37343    fi
37344  fi
37345
37346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37349  # "foo.exe" is OK but "foo" is an error.
37350  #
37351  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37352  # It is also a way to make sure we got the proper file name for the real test later on.
37353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37354  if test "x$test_shortpath" = x; then
37355    # Short path failed, file does not exist as specified.
37356    # Try adding .exe or .cmd
37357    if test -f "${new_path}.exe"; then
37358      input_to_shortpath="${new_path}.exe"
37359    elif test -f "${new_path}.cmd"; then
37360      input_to_shortpath="${new_path}.cmd"
37361    else
37362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37363$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37364      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37365$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37366      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37367    fi
37368  else
37369    input_to_shortpath="$new_path"
37370  fi
37371
37372  # Call helper function which possibly converts this using DOS-style short mode.
37373  # If so, the updated path is stored in $new_path.
37374  new_path="$input_to_shortpath"
37375
37376  input_path="$input_to_shortpath"
37377  # Check if we need to convert this using DOS-style short mode. If the path
37378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37379  # take no chances and rewrite it.
37380  # Note: m4 eats our [], so we need to use [ and ] instead.
37381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37382  if test "x$has_forbidden_chars" != x; then
37383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37384    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37385    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37386    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37387      # Going to short mode and back again did indeed matter. Since short mode is
37388      # case insensitive, let's make it lowercase to improve readability.
37389      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37390      # Now convert it back to Unix-stile (cygpath)
37391      input_path=`$CYGPATH -u "$shortmode_path"`
37392      new_path="$input_path"
37393    fi
37394  fi
37395
37396  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37397  if test "x$test_cygdrive_prefix" = x; then
37398    # As a simple fix, exclude /usr/bin since it's not a real path.
37399    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37400      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37401      # a path prefixed by /cygdrive for fixpath to work.
37402      new_path="$CYGWIN_ROOT_PATH$input_path"
37403    fi
37404  fi
37405
37406  # remove trailing .exe if any
37407  new_path="${new_path/%.exe/}"
37408
37409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37410
37411  # First separate the path from the arguments. This will split at the first
37412  # space.
37413  complete="$NM"
37414  path="${complete%% *}"
37415  tmp="$complete EOL"
37416  arguments="${tmp#* }"
37417
37418  # Input might be given as Windows format, start by converting to
37419  # unix format.
37420  new_path="$path"
37421
37422  windows_path="$new_path"
37423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37424    unix_path=`$CYGPATH -u "$windows_path"`
37425    new_path="$unix_path"
37426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37428    new_path="$unix_path"
37429  fi
37430
37431
37432  # Now try to locate executable using which
37433  new_path=`$WHICH "$new_path" 2> /dev/null`
37434
37435  if test "x$new_path" = x; then
37436    # Oops. Which didn't find the executable.
37437    # The splitting of arguments from the executable at a space might have been incorrect,
37438    # since paths with space are more likely in Windows. Give it another try with the whole
37439    # argument.
37440    path="$complete"
37441    arguments="EOL"
37442    new_path="$path"
37443
37444  windows_path="$new_path"
37445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37446    unix_path=`$CYGPATH -u "$windows_path"`
37447    new_path="$unix_path"
37448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37450    new_path="$unix_path"
37451  fi
37452
37453
37454    new_path=`$WHICH "$new_path" 2> /dev/null`
37455
37456    if test "x$new_path" = x; then
37457      # It's still not found. Now this is an unrecoverable error.
37458      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37459$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37460      has_space=`$ECHO "$complete" | $GREP " "`
37461      if test "x$has_space" != x; then
37462        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37463$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37464      fi
37465      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37466    fi
37467  fi
37468
37469  # Now new_path has a complete unix path to the binary
37470  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37471    # Keep paths in /bin as-is, but remove trailing .exe if any
37472    new_path="${new_path/%.exe/}"
37473    # Do not save /bin paths to all_fixpath_prefixes!
37474  else
37475    # Not in mixed or Windows style, start by that.
37476    new_path=`cmd //c echo $new_path`
37477
37478  input_path="$new_path"
37479  # Check if we need to convert this using DOS-style short mode. If the path
37480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37481  # take no chances and rewrite it.
37482  # Note: m4 eats our [], so we need to use [ and ] instead.
37483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37484  if test "x$has_forbidden_chars" != x; then
37485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37486    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37487  fi
37488
37489    # Output is in $new_path
37490
37491  windows_path="$new_path"
37492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37493    unix_path=`$CYGPATH -u "$windows_path"`
37494    new_path="$unix_path"
37495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37497    new_path="$unix_path"
37498  fi
37499
37500    # remove trailing .exe if any
37501    new_path="${new_path/%.exe/}"
37502
37503    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37504    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37505  fi
37506
37507  else
37508    # We're on a posix platform. Hooray! :)
37509    # First separate the path from the arguments. This will split at the first
37510    # space.
37511    complete="$NM"
37512    path="${complete%% *}"
37513    tmp="$complete EOL"
37514    arguments="${tmp#* }"
37515
37516    # Cannot rely on the command "which" here since it doesn't always work.
37517    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37518    if test -z "$is_absolute_path"; then
37519      # Path to executable is not absolute. Find it.
37520      IFS_save="$IFS"
37521      IFS=:
37522      for p in $PATH; do
37523        if test -f "$p/$path" && test -x "$p/$path"; then
37524          new_path="$p/$path"
37525          break
37526        fi
37527      done
37528      IFS="$IFS_save"
37529    else
37530      # This is an absolute path, we can use it without further modifications.
37531      new_path="$path"
37532    fi
37533
37534    if test "x$new_path" = x; then
37535      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37536$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37537      has_space=`$ECHO "$complete" | $GREP " "`
37538      if test "x$has_space" != x; then
37539        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37540$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37541      fi
37542      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37543    fi
37544  fi
37545
37546  # Now join together the path and the arguments once again
37547  if test "x$arguments" != xEOL; then
37548    new_complete="$new_path ${arguments% *}"
37549  else
37550    new_complete="$new_path"
37551  fi
37552
37553  if test "x$complete" != "x$new_complete"; then
37554    NM="$new_complete"
37555    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37556$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37557  fi
37558
37559    GNM="$NM"
37560
37561  fi
37562
37563  # objcopy is used for moving debug symbols to separate files when
37564  # full debug symbols are enabled.
37565  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37566
37567
37568  # Publish this variable in the help.
37569
37570
37571  if test "x$OBJCOPY" = x; then
37572    # The variable is not set by user, try to locate tool using the code snippet
37573    if test -n "$ac_tool_prefix"; then
37574  for ac_prog in gobjcopy objcopy
37575  do
37576    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37577set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37579$as_echo_n "checking for $ac_word... " >&6; }
37580if ${ac_cv_prog_OBJCOPY+:} false; then :
37581  $as_echo_n "(cached) " >&6
37582else
37583  if test -n "$OBJCOPY"; then
37584  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37585else
37586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37587for as_dir in $PATH
37588do
37589  IFS=$as_save_IFS
37590  test -z "$as_dir" && as_dir=.
37591    for ac_exec_ext in '' $ac_executable_extensions; do
37592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37593    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37595    break 2
37596  fi
37597done
37598  done
37599IFS=$as_save_IFS
37600
37601fi
37602fi
37603OBJCOPY=$ac_cv_prog_OBJCOPY
37604if test -n "$OBJCOPY"; then
37605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37606$as_echo "$OBJCOPY" >&6; }
37607else
37608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37609$as_echo "no" >&6; }
37610fi
37611
37612
37613    test -n "$OBJCOPY" && break
37614  done
37615fi
37616if test -z "$OBJCOPY"; then
37617  ac_ct_OBJCOPY=$OBJCOPY
37618  for ac_prog in gobjcopy objcopy
37619do
37620  # Extract the first word of "$ac_prog", so it can be a program name with args.
37621set dummy $ac_prog; ac_word=$2
37622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37623$as_echo_n "checking for $ac_word... " >&6; }
37624if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37625  $as_echo_n "(cached) " >&6
37626else
37627  if test -n "$ac_ct_OBJCOPY"; then
37628  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37629else
37630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37631for as_dir in $PATH
37632do
37633  IFS=$as_save_IFS
37634  test -z "$as_dir" && as_dir=.
37635    for ac_exec_ext in '' $ac_executable_extensions; do
37636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37637    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37639    break 2
37640  fi
37641done
37642  done
37643IFS=$as_save_IFS
37644
37645fi
37646fi
37647ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37648if test -n "$ac_ct_OBJCOPY"; then
37649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37650$as_echo "$ac_ct_OBJCOPY" >&6; }
37651else
37652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37653$as_echo "no" >&6; }
37654fi
37655
37656
37657  test -n "$ac_ct_OBJCOPY" && break
37658done
37659
37660  if test "x$ac_ct_OBJCOPY" = x; then
37661    OBJCOPY=""
37662  else
37663    case $cross_compiling:$ac_tool_warned in
37664yes:)
37665{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37666$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37667ac_tool_warned=yes ;;
37668esac
37669    OBJCOPY=$ac_ct_OBJCOPY
37670  fi
37671fi
37672
37673  else
37674    # The variable is set, but is it from the command line or the environment?
37675
37676    # Try to remove the string !OBJCOPY! from our list.
37677    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37678    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37679      # If it failed, the variable was not from the command line. Ignore it,
37680      # but warn the user (except for BASH, which is always set by the calling BASH).
37681      if test "xOBJCOPY" != xBASH; then
37682        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37683$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37684      fi
37685      # Try to locate tool using the code snippet
37686      if test -n "$ac_tool_prefix"; then
37687  for ac_prog in gobjcopy objcopy
37688  do
37689    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37690set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37692$as_echo_n "checking for $ac_word... " >&6; }
37693if ${ac_cv_prog_OBJCOPY+:} false; then :
37694  $as_echo_n "(cached) " >&6
37695else
37696  if test -n "$OBJCOPY"; then
37697  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37698else
37699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37700for as_dir in $PATH
37701do
37702  IFS=$as_save_IFS
37703  test -z "$as_dir" && as_dir=.
37704    for ac_exec_ext in '' $ac_executable_extensions; do
37705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37706    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37708    break 2
37709  fi
37710done
37711  done
37712IFS=$as_save_IFS
37713
37714fi
37715fi
37716OBJCOPY=$ac_cv_prog_OBJCOPY
37717if test -n "$OBJCOPY"; then
37718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37719$as_echo "$OBJCOPY" >&6; }
37720else
37721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37722$as_echo "no" >&6; }
37723fi
37724
37725
37726    test -n "$OBJCOPY" && break
37727  done
37728fi
37729if test -z "$OBJCOPY"; then
37730  ac_ct_OBJCOPY=$OBJCOPY
37731  for ac_prog in gobjcopy objcopy
37732do
37733  # Extract the first word of "$ac_prog", so it can be a program name with args.
37734set dummy $ac_prog; ac_word=$2
37735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37736$as_echo_n "checking for $ac_word... " >&6; }
37737if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37738  $as_echo_n "(cached) " >&6
37739else
37740  if test -n "$ac_ct_OBJCOPY"; then
37741  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37742else
37743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37744for as_dir in $PATH
37745do
37746  IFS=$as_save_IFS
37747  test -z "$as_dir" && as_dir=.
37748    for ac_exec_ext in '' $ac_executable_extensions; do
37749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37750    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37752    break 2
37753  fi
37754done
37755  done
37756IFS=$as_save_IFS
37757
37758fi
37759fi
37760ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37761if test -n "$ac_ct_OBJCOPY"; then
37762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37763$as_echo "$ac_ct_OBJCOPY" >&6; }
37764else
37765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37766$as_echo "no" >&6; }
37767fi
37768
37769
37770  test -n "$ac_ct_OBJCOPY" && break
37771done
37772
37773  if test "x$ac_ct_OBJCOPY" = x; then
37774    OBJCOPY=""
37775  else
37776    case $cross_compiling:$ac_tool_warned in
37777yes:)
37778{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37779$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37780ac_tool_warned=yes ;;
37781esac
37782    OBJCOPY=$ac_ct_OBJCOPY
37783  fi
37784fi
37785
37786    else
37787      # If it succeeded, then it was overridden by the user. We will use it
37788      # for the tool.
37789
37790      # First remove it from the list of overridden variables, so we can test
37791      # for unknown variables in the end.
37792      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37793
37794      # Check if the provided tool contains a complete path.
37795      tool_specified="$OBJCOPY"
37796      tool_basename="${tool_specified##*/}"
37797      if test "x$tool_basename" = "x$tool_specified"; then
37798        # A command without a complete path is provided, search $PATH.
37799        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37800$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37801        # Extract the first word of "$tool_basename", so it can be a program name with args.
37802set dummy $tool_basename; ac_word=$2
37803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37804$as_echo_n "checking for $ac_word... " >&6; }
37805if ${ac_cv_path_OBJCOPY+:} false; then :
37806  $as_echo_n "(cached) " >&6
37807else
37808  case $OBJCOPY in
37809  [\\/]* | ?:[\\/]*)
37810  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37811  ;;
37812  *)
37813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37814for as_dir in $PATH
37815do
37816  IFS=$as_save_IFS
37817  test -z "$as_dir" && as_dir=.
37818    for ac_exec_ext in '' $ac_executable_extensions; do
37819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37820    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37822    break 2
37823  fi
37824done
37825  done
37826IFS=$as_save_IFS
37827
37828  ;;
37829esac
37830fi
37831OBJCOPY=$ac_cv_path_OBJCOPY
37832if test -n "$OBJCOPY"; then
37833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37834$as_echo "$OBJCOPY" >&6; }
37835else
37836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37837$as_echo "no" >&6; }
37838fi
37839
37840
37841        if test "x$OBJCOPY" = x; then
37842          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37843        fi
37844      else
37845        # Otherwise we believe it is a complete path. Use it as it is.
37846        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
37847$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
37848        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
37849$as_echo_n "checking for OBJCOPY... " >&6; }
37850        if test ! -x "$tool_specified"; then
37851          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37852$as_echo "not found" >&6; }
37853          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
37854        fi
37855        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37856$as_echo "$tool_specified" >&6; }
37857      fi
37858    fi
37859  fi
37860
37861
37862    # Only call fixup if objcopy was found.
37863    if test -n "$OBJCOPY"; then
37864
37865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37866
37867  # First separate the path from the arguments. This will split at the first
37868  # space.
37869  complete="$OBJCOPY"
37870  path="${complete%% *}"
37871  tmp="$complete EOL"
37872  arguments="${tmp#* }"
37873
37874  # Input might be given as Windows format, start by converting to
37875  # unix format.
37876  new_path=`$CYGPATH -u "$path"`
37877
37878  # Now try to locate executable using which
37879  new_path=`$WHICH "$new_path" 2> /dev/null`
37880  # bat and cmd files are not always considered executable in cygwin causing which
37881  # to not find them
37882  if test "x$new_path" = x \
37883      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37884      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37885    new_path=`$CYGPATH -u "$path"`
37886  fi
37887  if test "x$new_path" = x; then
37888    # Oops. Which didn't find the executable.
37889    # The splitting of arguments from the executable at a space might have been incorrect,
37890    # since paths with space are more likely in Windows. Give it another try with the whole
37891    # argument.
37892    path="$complete"
37893    arguments="EOL"
37894    new_path=`$CYGPATH -u "$path"`
37895    new_path=`$WHICH "$new_path" 2> /dev/null`
37896    # bat and cmd files are not always considered executable in cygwin causing which
37897    # to not find them
37898    if test "x$new_path" = x \
37899        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37900        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37901      new_path=`$CYGPATH -u "$path"`
37902    fi
37903    if test "x$new_path" = x; then
37904      # It's still not found. Now this is an unrecoverable error.
37905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
37906$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
37907      has_space=`$ECHO "$complete" | $GREP " "`
37908      if test "x$has_space" != x; then
37909        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37910$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37911      fi
37912      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37913    fi
37914  fi
37915
37916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37919  # "foo.exe" is OK but "foo" is an error.
37920  #
37921  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37922  # It is also a way to make sure we got the proper file name for the real test later on.
37923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37924  if test "x$test_shortpath" = x; then
37925    # Short path failed, file does not exist as specified.
37926    # Try adding .exe or .cmd
37927    if test -f "${new_path}.exe"; then
37928      input_to_shortpath="${new_path}.exe"
37929    elif test -f "${new_path}.cmd"; then
37930      input_to_shortpath="${new_path}.cmd"
37931    else
37932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
37933$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
37934      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37935$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37936      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37937    fi
37938  else
37939    input_to_shortpath="$new_path"
37940  fi
37941
37942  # Call helper function which possibly converts this using DOS-style short mode.
37943  # If so, the updated path is stored in $new_path.
37944  new_path="$input_to_shortpath"
37945
37946  input_path="$input_to_shortpath"
37947  # Check if we need to convert this using DOS-style short mode. If the path
37948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37949  # take no chances and rewrite it.
37950  # Note: m4 eats our [], so we need to use [ and ] instead.
37951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37952  if test "x$has_forbidden_chars" != x; then
37953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37957      # Going to short mode and back again did indeed matter. Since short mode is
37958      # case insensitive, let's make it lowercase to improve readability.
37959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37960      # Now convert it back to Unix-stile (cygpath)
37961      input_path=`$CYGPATH -u "$shortmode_path"`
37962      new_path="$input_path"
37963    fi
37964  fi
37965
37966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37967  if test "x$test_cygdrive_prefix" = x; then
37968    # As a simple fix, exclude /usr/bin since it's not a real path.
37969    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37971      # a path prefixed by /cygdrive for fixpath to work.
37972      new_path="$CYGWIN_ROOT_PATH$input_path"
37973    fi
37974  fi
37975
37976  # remove trailing .exe if any
37977  new_path="${new_path/%.exe/}"
37978
37979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37980
37981  # First separate the path from the arguments. This will split at the first
37982  # space.
37983  complete="$OBJCOPY"
37984  path="${complete%% *}"
37985  tmp="$complete EOL"
37986  arguments="${tmp#* }"
37987
37988  # Input might be given as Windows format, start by converting to
37989  # unix format.
37990  new_path="$path"
37991
37992  windows_path="$new_path"
37993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37994    unix_path=`$CYGPATH -u "$windows_path"`
37995    new_path="$unix_path"
37996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37998    new_path="$unix_path"
37999  fi
38000
38001
38002  # Now try to locate executable using which
38003  new_path=`$WHICH "$new_path" 2> /dev/null`
38004
38005  if test "x$new_path" = x; then
38006    # Oops. Which didn't find the executable.
38007    # The splitting of arguments from the executable at a space might have been incorrect,
38008    # since paths with space are more likely in Windows. Give it another try with the whole
38009    # argument.
38010    path="$complete"
38011    arguments="EOL"
38012    new_path="$path"
38013
38014  windows_path="$new_path"
38015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38016    unix_path=`$CYGPATH -u "$windows_path"`
38017    new_path="$unix_path"
38018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38020    new_path="$unix_path"
38021  fi
38022
38023
38024    new_path=`$WHICH "$new_path" 2> /dev/null`
38025
38026    if test "x$new_path" = x; then
38027      # It's still not found. Now this is an unrecoverable error.
38028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38029$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38030      has_space=`$ECHO "$complete" | $GREP " "`
38031      if test "x$has_space" != x; then
38032        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38033$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38034      fi
38035      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38036    fi
38037  fi
38038
38039  # Now new_path has a complete unix path to the binary
38040  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38041    # Keep paths in /bin as-is, but remove trailing .exe if any
38042    new_path="${new_path/%.exe/}"
38043    # Do not save /bin paths to all_fixpath_prefixes!
38044  else
38045    # Not in mixed or Windows style, start by that.
38046    new_path=`cmd //c echo $new_path`
38047
38048  input_path="$new_path"
38049  # Check if we need to convert this using DOS-style short mode. If the path
38050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38051  # take no chances and rewrite it.
38052  # Note: m4 eats our [], so we need to use [ and ] instead.
38053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38054  if test "x$has_forbidden_chars" != x; then
38055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38056    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38057  fi
38058
38059    # Output is in $new_path
38060
38061  windows_path="$new_path"
38062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38063    unix_path=`$CYGPATH -u "$windows_path"`
38064    new_path="$unix_path"
38065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38067    new_path="$unix_path"
38068  fi
38069
38070    # remove trailing .exe if any
38071    new_path="${new_path/%.exe/}"
38072
38073    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38074    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38075  fi
38076
38077  else
38078    # We're on a posix platform. Hooray! :)
38079    # First separate the path from the arguments. This will split at the first
38080    # space.
38081    complete="$OBJCOPY"
38082    path="${complete%% *}"
38083    tmp="$complete EOL"
38084    arguments="${tmp#* }"
38085
38086    # Cannot rely on the command "which" here since it doesn't always work.
38087    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38088    if test -z "$is_absolute_path"; then
38089      # Path to executable is not absolute. Find it.
38090      IFS_save="$IFS"
38091      IFS=:
38092      for p in $PATH; do
38093        if test -f "$p/$path" && test -x "$p/$path"; then
38094          new_path="$p/$path"
38095          break
38096        fi
38097      done
38098      IFS="$IFS_save"
38099    else
38100      # This is an absolute path, we can use it without further modifications.
38101      new_path="$path"
38102    fi
38103
38104    if test "x$new_path" = x; then
38105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38106$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38107      has_space=`$ECHO "$complete" | $GREP " "`
38108      if test "x$has_space" != x; then
38109        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38110$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38111      fi
38112      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38113    fi
38114  fi
38115
38116  # Now join together the path and the arguments once again
38117  if test "x$arguments" != xEOL; then
38118    new_complete="$new_path ${arguments% *}"
38119  else
38120    new_complete="$new_path"
38121  fi
38122
38123  if test "x$complete" != "x$new_complete"; then
38124    OBJCOPY="$new_complete"
38125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38126$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38127  fi
38128
38129    fi
38130  fi
38131
38132
38133
38134  # Publish this variable in the help.
38135
38136
38137  if test "x$OBJDUMP" = x; then
38138    # The variable is not set by user, try to locate tool using the code snippet
38139    if test -n "$ac_tool_prefix"; then
38140  for ac_prog in gobjdump objdump
38141  do
38142    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38143set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38145$as_echo_n "checking for $ac_word... " >&6; }
38146if ${ac_cv_prog_OBJDUMP+:} false; then :
38147  $as_echo_n "(cached) " >&6
38148else
38149  if test -n "$OBJDUMP"; then
38150  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38151else
38152as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38153for as_dir in $PATH
38154do
38155  IFS=$as_save_IFS
38156  test -z "$as_dir" && as_dir=.
38157    for ac_exec_ext in '' $ac_executable_extensions; do
38158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38159    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38161    break 2
38162  fi
38163done
38164  done
38165IFS=$as_save_IFS
38166
38167fi
38168fi
38169OBJDUMP=$ac_cv_prog_OBJDUMP
38170if test -n "$OBJDUMP"; then
38171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38172$as_echo "$OBJDUMP" >&6; }
38173else
38174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38175$as_echo "no" >&6; }
38176fi
38177
38178
38179    test -n "$OBJDUMP" && break
38180  done
38181fi
38182if test -z "$OBJDUMP"; then
38183  ac_ct_OBJDUMP=$OBJDUMP
38184  for ac_prog in gobjdump objdump
38185do
38186  # Extract the first word of "$ac_prog", so it can be a program name with args.
38187set dummy $ac_prog; ac_word=$2
38188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38189$as_echo_n "checking for $ac_word... " >&6; }
38190if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38191  $as_echo_n "(cached) " >&6
38192else
38193  if test -n "$ac_ct_OBJDUMP"; then
38194  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38195else
38196as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38197for as_dir in $PATH
38198do
38199  IFS=$as_save_IFS
38200  test -z "$as_dir" && as_dir=.
38201    for ac_exec_ext in '' $ac_executable_extensions; do
38202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38203    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38205    break 2
38206  fi
38207done
38208  done
38209IFS=$as_save_IFS
38210
38211fi
38212fi
38213ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38214if test -n "$ac_ct_OBJDUMP"; then
38215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38216$as_echo "$ac_ct_OBJDUMP" >&6; }
38217else
38218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38219$as_echo "no" >&6; }
38220fi
38221
38222
38223  test -n "$ac_ct_OBJDUMP" && break
38224done
38225
38226  if test "x$ac_ct_OBJDUMP" = x; then
38227    OBJDUMP=""
38228  else
38229    case $cross_compiling:$ac_tool_warned in
38230yes:)
38231{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38232$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38233ac_tool_warned=yes ;;
38234esac
38235    OBJDUMP=$ac_ct_OBJDUMP
38236  fi
38237fi
38238
38239  else
38240    # The variable is set, but is it from the command line or the environment?
38241
38242    # Try to remove the string !OBJDUMP! from our list.
38243    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38244    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38245      # If it failed, the variable was not from the command line. Ignore it,
38246      # but warn the user (except for BASH, which is always set by the calling BASH).
38247      if test "xOBJDUMP" != xBASH; then
38248        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38249$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38250      fi
38251      # Try to locate tool using the code snippet
38252      if test -n "$ac_tool_prefix"; then
38253  for ac_prog in gobjdump objdump
38254  do
38255    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38256set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38258$as_echo_n "checking for $ac_word... " >&6; }
38259if ${ac_cv_prog_OBJDUMP+:} false; then :
38260  $as_echo_n "(cached) " >&6
38261else
38262  if test -n "$OBJDUMP"; then
38263  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38264else
38265as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38266for as_dir in $PATH
38267do
38268  IFS=$as_save_IFS
38269  test -z "$as_dir" && as_dir=.
38270    for ac_exec_ext in '' $ac_executable_extensions; do
38271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38272    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38274    break 2
38275  fi
38276done
38277  done
38278IFS=$as_save_IFS
38279
38280fi
38281fi
38282OBJDUMP=$ac_cv_prog_OBJDUMP
38283if test -n "$OBJDUMP"; then
38284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38285$as_echo "$OBJDUMP" >&6; }
38286else
38287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38288$as_echo "no" >&6; }
38289fi
38290
38291
38292    test -n "$OBJDUMP" && break
38293  done
38294fi
38295if test -z "$OBJDUMP"; then
38296  ac_ct_OBJDUMP=$OBJDUMP
38297  for ac_prog in gobjdump objdump
38298do
38299  # Extract the first word of "$ac_prog", so it can be a program name with args.
38300set dummy $ac_prog; ac_word=$2
38301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38302$as_echo_n "checking for $ac_word... " >&6; }
38303if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38304  $as_echo_n "(cached) " >&6
38305else
38306  if test -n "$ac_ct_OBJDUMP"; then
38307  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38308else
38309as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38310for as_dir in $PATH
38311do
38312  IFS=$as_save_IFS
38313  test -z "$as_dir" && as_dir=.
38314    for ac_exec_ext in '' $ac_executable_extensions; do
38315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38316    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38318    break 2
38319  fi
38320done
38321  done
38322IFS=$as_save_IFS
38323
38324fi
38325fi
38326ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38327if test -n "$ac_ct_OBJDUMP"; then
38328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38329$as_echo "$ac_ct_OBJDUMP" >&6; }
38330else
38331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38332$as_echo "no" >&6; }
38333fi
38334
38335
38336  test -n "$ac_ct_OBJDUMP" && break
38337done
38338
38339  if test "x$ac_ct_OBJDUMP" = x; then
38340    OBJDUMP=""
38341  else
38342    case $cross_compiling:$ac_tool_warned in
38343yes:)
38344{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38345$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38346ac_tool_warned=yes ;;
38347esac
38348    OBJDUMP=$ac_ct_OBJDUMP
38349  fi
38350fi
38351
38352    else
38353      # If it succeeded, then it was overridden by the user. We will use it
38354      # for the tool.
38355
38356      # First remove it from the list of overridden variables, so we can test
38357      # for unknown variables in the end.
38358      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38359
38360      # Check if the provided tool contains a complete path.
38361      tool_specified="$OBJDUMP"
38362      tool_basename="${tool_specified##*/}"
38363      if test "x$tool_basename" = "x$tool_specified"; then
38364        # A command without a complete path is provided, search $PATH.
38365        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38366$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38367        # Extract the first word of "$tool_basename", so it can be a program name with args.
38368set dummy $tool_basename; ac_word=$2
38369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38370$as_echo_n "checking for $ac_word... " >&6; }
38371if ${ac_cv_path_OBJDUMP+:} false; then :
38372  $as_echo_n "(cached) " >&6
38373else
38374  case $OBJDUMP in
38375  [\\/]* | ?:[\\/]*)
38376  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38377  ;;
38378  *)
38379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38380for as_dir in $PATH
38381do
38382  IFS=$as_save_IFS
38383  test -z "$as_dir" && as_dir=.
38384    for ac_exec_ext in '' $ac_executable_extensions; do
38385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38386    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38388    break 2
38389  fi
38390done
38391  done
38392IFS=$as_save_IFS
38393
38394  ;;
38395esac
38396fi
38397OBJDUMP=$ac_cv_path_OBJDUMP
38398if test -n "$OBJDUMP"; then
38399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38400$as_echo "$OBJDUMP" >&6; }
38401else
38402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38403$as_echo "no" >&6; }
38404fi
38405
38406
38407        if test "x$OBJDUMP" = x; then
38408          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38409        fi
38410      else
38411        # Otherwise we believe it is a complete path. Use it as it is.
38412        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38413$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38414        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38415$as_echo_n "checking for OBJDUMP... " >&6; }
38416        if test ! -x "$tool_specified"; then
38417          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38418$as_echo "not found" >&6; }
38419          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38420        fi
38421        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38422$as_echo "$tool_specified" >&6; }
38423      fi
38424    fi
38425  fi
38426
38427
38428  if test "x$OBJDUMP" != x; then
38429    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38430    # bails if argument is missing.
38431
38432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38433
38434  # First separate the path from the arguments. This will split at the first
38435  # space.
38436  complete="$OBJDUMP"
38437  path="${complete%% *}"
38438  tmp="$complete EOL"
38439  arguments="${tmp#* }"
38440
38441  # Input might be given as Windows format, start by converting to
38442  # unix format.
38443  new_path=`$CYGPATH -u "$path"`
38444
38445  # Now try to locate executable using which
38446  new_path=`$WHICH "$new_path" 2> /dev/null`
38447  # bat and cmd files are not always considered executable in cygwin causing which
38448  # to not find them
38449  if test "x$new_path" = x \
38450      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38451      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38452    new_path=`$CYGPATH -u "$path"`
38453  fi
38454  if test "x$new_path" = x; then
38455    # Oops. Which didn't find the executable.
38456    # The splitting of arguments from the executable at a space might have been incorrect,
38457    # since paths with space are more likely in Windows. Give it another try with the whole
38458    # argument.
38459    path="$complete"
38460    arguments="EOL"
38461    new_path=`$CYGPATH -u "$path"`
38462    new_path=`$WHICH "$new_path" 2> /dev/null`
38463    # bat and cmd files are not always considered executable in cygwin causing which
38464    # to not find them
38465    if test "x$new_path" = x \
38466        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38467        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38468      new_path=`$CYGPATH -u "$path"`
38469    fi
38470    if test "x$new_path" = x; then
38471      # It's still not found. Now this is an unrecoverable error.
38472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38473$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38474      has_space=`$ECHO "$complete" | $GREP " "`
38475      if test "x$has_space" != x; then
38476        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38477$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38478      fi
38479      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38480    fi
38481  fi
38482
38483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38486  # "foo.exe" is OK but "foo" is an error.
38487  #
38488  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38489  # It is also a way to make sure we got the proper file name for the real test later on.
38490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38491  if test "x$test_shortpath" = x; then
38492    # Short path failed, file does not exist as specified.
38493    # Try adding .exe or .cmd
38494    if test -f "${new_path}.exe"; then
38495      input_to_shortpath="${new_path}.exe"
38496    elif test -f "${new_path}.cmd"; then
38497      input_to_shortpath="${new_path}.cmd"
38498    else
38499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38500$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38501      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38502$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38503      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38504    fi
38505  else
38506    input_to_shortpath="$new_path"
38507  fi
38508
38509  # Call helper function which possibly converts this using DOS-style short mode.
38510  # If so, the updated path is stored in $new_path.
38511  new_path="$input_to_shortpath"
38512
38513  input_path="$input_to_shortpath"
38514  # Check if we need to convert this using DOS-style short mode. If the path
38515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38516  # take no chances and rewrite it.
38517  # Note: m4 eats our [], so we need to use [ and ] instead.
38518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38519  if test "x$has_forbidden_chars" != x; then
38520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38524      # Going to short mode and back again did indeed matter. Since short mode is
38525      # case insensitive, let's make it lowercase to improve readability.
38526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38527      # Now convert it back to Unix-stile (cygpath)
38528      input_path=`$CYGPATH -u "$shortmode_path"`
38529      new_path="$input_path"
38530    fi
38531  fi
38532
38533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38534  if test "x$test_cygdrive_prefix" = x; then
38535    # As a simple fix, exclude /usr/bin since it's not a real path.
38536    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38538      # a path prefixed by /cygdrive for fixpath to work.
38539      new_path="$CYGWIN_ROOT_PATH$input_path"
38540    fi
38541  fi
38542
38543  # remove trailing .exe if any
38544  new_path="${new_path/%.exe/}"
38545
38546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38547
38548  # First separate the path from the arguments. This will split at the first
38549  # space.
38550  complete="$OBJDUMP"
38551  path="${complete%% *}"
38552  tmp="$complete EOL"
38553  arguments="${tmp#* }"
38554
38555  # Input might be given as Windows format, start by converting to
38556  # unix format.
38557  new_path="$path"
38558
38559  windows_path="$new_path"
38560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38561    unix_path=`$CYGPATH -u "$windows_path"`
38562    new_path="$unix_path"
38563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38565    new_path="$unix_path"
38566  fi
38567
38568
38569  # Now try to locate executable using which
38570  new_path=`$WHICH "$new_path" 2> /dev/null`
38571
38572  if test "x$new_path" = x; then
38573    # Oops. Which didn't find the executable.
38574    # The splitting of arguments from the executable at a space might have been incorrect,
38575    # since paths with space are more likely in Windows. Give it another try with the whole
38576    # argument.
38577    path="$complete"
38578    arguments="EOL"
38579    new_path="$path"
38580
38581  windows_path="$new_path"
38582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38583    unix_path=`$CYGPATH -u "$windows_path"`
38584    new_path="$unix_path"
38585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38587    new_path="$unix_path"
38588  fi
38589
38590
38591    new_path=`$WHICH "$new_path" 2> /dev/null`
38592
38593    if test "x$new_path" = x; then
38594      # It's still not found. Now this is an unrecoverable error.
38595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38596$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38597      has_space=`$ECHO "$complete" | $GREP " "`
38598      if test "x$has_space" != x; then
38599        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38600$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38601      fi
38602      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38603    fi
38604  fi
38605
38606  # Now new_path has a complete unix path to the binary
38607  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38608    # Keep paths in /bin as-is, but remove trailing .exe if any
38609    new_path="${new_path/%.exe/}"
38610    # Do not save /bin paths to all_fixpath_prefixes!
38611  else
38612    # Not in mixed or Windows style, start by that.
38613    new_path=`cmd //c echo $new_path`
38614
38615  input_path="$new_path"
38616  # Check if we need to convert this using DOS-style short mode. If the path
38617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38618  # take no chances and rewrite it.
38619  # Note: m4 eats our [], so we need to use [ and ] instead.
38620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38621  if test "x$has_forbidden_chars" != x; then
38622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38624  fi
38625
38626    # Output is in $new_path
38627
38628  windows_path="$new_path"
38629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38630    unix_path=`$CYGPATH -u "$windows_path"`
38631    new_path="$unix_path"
38632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38634    new_path="$unix_path"
38635  fi
38636
38637    # remove trailing .exe if any
38638    new_path="${new_path/%.exe/}"
38639
38640    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38641    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38642  fi
38643
38644  else
38645    # We're on a posix platform. Hooray! :)
38646    # First separate the path from the arguments. This will split at the first
38647    # space.
38648    complete="$OBJDUMP"
38649    path="${complete%% *}"
38650    tmp="$complete EOL"
38651    arguments="${tmp#* }"
38652
38653    # Cannot rely on the command "which" here since it doesn't always work.
38654    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38655    if test -z "$is_absolute_path"; then
38656      # Path to executable is not absolute. Find it.
38657      IFS_save="$IFS"
38658      IFS=:
38659      for p in $PATH; do
38660        if test -f "$p/$path" && test -x "$p/$path"; then
38661          new_path="$p/$path"
38662          break
38663        fi
38664      done
38665      IFS="$IFS_save"
38666    else
38667      # This is an absolute path, we can use it without further modifications.
38668      new_path="$path"
38669    fi
38670
38671    if test "x$new_path" = x; then
38672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38673$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38674      has_space=`$ECHO "$complete" | $GREP " "`
38675      if test "x$has_space" != x; then
38676        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38677$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38678      fi
38679      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38680    fi
38681  fi
38682
38683  # Now join together the path and the arguments once again
38684  if test "x$arguments" != xEOL; then
38685    new_complete="$new_path ${arguments% *}"
38686  else
38687    new_complete="$new_path"
38688  fi
38689
38690  if test "x$complete" != "x$new_complete"; then
38691    OBJDUMP="$new_complete"
38692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38693$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38694  fi
38695
38696  fi
38697
38698
38699  # Restore old path.
38700  PATH="$OLD_PATH"
38701
38702  # Restore the flags to the user specified values.
38703  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38704  CFLAGS="$ORG_CFLAGS"
38705  CXXFLAGS="$ORG_CXXFLAGS"
38706  OBJCFLAGS="$ORG_OBJCFLAGS"
38707
38708
38709# Finally do some processing after the detection phase
38710
38711  if test "x$COMPILE_TYPE" = "xcross"; then
38712    # Now we need to find a C/C++ compiler that can build executables for the
38713    # build platform. We can't use the AC_PROG_CC macro, since it can only be
38714    # used once. Also, we need to do this without adding a tools dir to the
38715    # path, otherwise we might pick up cross-compilers which don't use standard
38716    # naming.
38717
38718    # FIXME: we should list the discovered compilers as an exclude pattern!
38719    # If we do that, we can do this detection before POST_DETECTION, and still
38720    # find the build compilers in the tools dir, if needed.
38721
38722
38723  # Publish this variable in the help.
38724
38725
38726  if test "x$BUILD_CC" = x; then
38727    # The variable is not set by user, try to locate tool using the code snippet
38728    for ac_prog in cl cc gcc
38729do
38730  # Extract the first word of "$ac_prog", so it can be a program name with args.
38731set dummy $ac_prog; ac_word=$2
38732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38733$as_echo_n "checking for $ac_word... " >&6; }
38734if ${ac_cv_path_BUILD_CC+:} false; then :
38735  $as_echo_n "(cached) " >&6
38736else
38737  case $BUILD_CC in
38738  [\\/]* | ?:[\\/]*)
38739  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38740  ;;
38741  *)
38742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38743for as_dir in $PATH
38744do
38745  IFS=$as_save_IFS
38746  test -z "$as_dir" && as_dir=.
38747    for ac_exec_ext in '' $ac_executable_extensions; do
38748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38749    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38751    break 2
38752  fi
38753done
38754  done
38755IFS=$as_save_IFS
38756
38757  ;;
38758esac
38759fi
38760BUILD_CC=$ac_cv_path_BUILD_CC
38761if test -n "$BUILD_CC"; then
38762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38763$as_echo "$BUILD_CC" >&6; }
38764else
38765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38766$as_echo "no" >&6; }
38767fi
38768
38769
38770  test -n "$BUILD_CC" && break
38771done
38772
38773  else
38774    # The variable is set, but is it from the command line or the environment?
38775
38776    # Try to remove the string !BUILD_CC! from our list.
38777    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38778    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38779      # If it failed, the variable was not from the command line. Ignore it,
38780      # but warn the user (except for BASH, which is always set by the calling BASH).
38781      if test "xBUILD_CC" != xBASH; then
38782        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38783$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38784      fi
38785      # Try to locate tool using the code snippet
38786      for ac_prog in cl cc gcc
38787do
38788  # Extract the first word of "$ac_prog", so it can be a program name with args.
38789set dummy $ac_prog; ac_word=$2
38790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38791$as_echo_n "checking for $ac_word... " >&6; }
38792if ${ac_cv_path_BUILD_CC+:} false; then :
38793  $as_echo_n "(cached) " >&6
38794else
38795  case $BUILD_CC in
38796  [\\/]* | ?:[\\/]*)
38797  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38798  ;;
38799  *)
38800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38801for as_dir in $PATH
38802do
38803  IFS=$as_save_IFS
38804  test -z "$as_dir" && as_dir=.
38805    for ac_exec_ext in '' $ac_executable_extensions; do
38806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38807    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38809    break 2
38810  fi
38811done
38812  done
38813IFS=$as_save_IFS
38814
38815  ;;
38816esac
38817fi
38818BUILD_CC=$ac_cv_path_BUILD_CC
38819if test -n "$BUILD_CC"; then
38820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38821$as_echo "$BUILD_CC" >&6; }
38822else
38823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38824$as_echo "no" >&6; }
38825fi
38826
38827
38828  test -n "$BUILD_CC" && break
38829done
38830
38831    else
38832      # If it succeeded, then it was overridden by the user. We will use it
38833      # for the tool.
38834
38835      # First remove it from the list of overridden variables, so we can test
38836      # for unknown variables in the end.
38837      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38838
38839      # Check if the provided tool contains a complete path.
38840      tool_specified="$BUILD_CC"
38841      tool_basename="${tool_specified##*/}"
38842      if test "x$tool_basename" = "x$tool_specified"; then
38843        # A command without a complete path is provided, search $PATH.
38844        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
38845$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
38846        # Extract the first word of "$tool_basename", so it can be a program name with args.
38847set dummy $tool_basename; ac_word=$2
38848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38849$as_echo_n "checking for $ac_word... " >&6; }
38850if ${ac_cv_path_BUILD_CC+:} false; then :
38851  $as_echo_n "(cached) " >&6
38852else
38853  case $BUILD_CC in
38854  [\\/]* | ?:[\\/]*)
38855  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38856  ;;
38857  *)
38858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38859for as_dir in $PATH
38860do
38861  IFS=$as_save_IFS
38862  test -z "$as_dir" && as_dir=.
38863    for ac_exec_ext in '' $ac_executable_extensions; do
38864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38865    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38867    break 2
38868  fi
38869done
38870  done
38871IFS=$as_save_IFS
38872
38873  ;;
38874esac
38875fi
38876BUILD_CC=$ac_cv_path_BUILD_CC
38877if test -n "$BUILD_CC"; then
38878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38879$as_echo "$BUILD_CC" >&6; }
38880else
38881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38882$as_echo "no" >&6; }
38883fi
38884
38885
38886        if test "x$BUILD_CC" = x; then
38887          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38888        fi
38889      else
38890        # Otherwise we believe it is a complete path. Use it as it is.
38891        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
38892$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
38893        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
38894$as_echo_n "checking for BUILD_CC... " >&6; }
38895        if test ! -x "$tool_specified"; then
38896          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38897$as_echo "not found" >&6; }
38898          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
38899        fi
38900        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38901$as_echo "$tool_specified" >&6; }
38902      fi
38903    fi
38904  fi
38905
38906
38907
38908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38909
38910  # First separate the path from the arguments. This will split at the first
38911  # space.
38912  complete="$BUILD_CC"
38913  path="${complete%% *}"
38914  tmp="$complete EOL"
38915  arguments="${tmp#* }"
38916
38917  # Input might be given as Windows format, start by converting to
38918  # unix format.
38919  new_path=`$CYGPATH -u "$path"`
38920
38921  # Now try to locate executable using which
38922  new_path=`$WHICH "$new_path" 2> /dev/null`
38923  # bat and cmd files are not always considered executable in cygwin causing which
38924  # to not find them
38925  if test "x$new_path" = x \
38926      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38927      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38928    new_path=`$CYGPATH -u "$path"`
38929  fi
38930  if test "x$new_path" = x; then
38931    # Oops. Which didn't find the executable.
38932    # The splitting of arguments from the executable at a space might have been incorrect,
38933    # since paths with space are more likely in Windows. Give it another try with the whole
38934    # argument.
38935    path="$complete"
38936    arguments="EOL"
38937    new_path=`$CYGPATH -u "$path"`
38938    new_path=`$WHICH "$new_path" 2> /dev/null`
38939    # bat and cmd files are not always considered executable in cygwin causing which
38940    # to not find them
38941    if test "x$new_path" = x \
38942        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38943        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38944      new_path=`$CYGPATH -u "$path"`
38945    fi
38946    if test "x$new_path" = x; then
38947      # It's still not found. Now this is an unrecoverable error.
38948      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
38949$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
38950      has_space=`$ECHO "$complete" | $GREP " "`
38951      if test "x$has_space" != x; then
38952        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38953$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38954      fi
38955      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
38956    fi
38957  fi
38958
38959  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38960  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38961  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38962  # "foo.exe" is OK but "foo" is an error.
38963  #
38964  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38965  # It is also a way to make sure we got the proper file name for the real test later on.
38966  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38967  if test "x$test_shortpath" = x; then
38968    # Short path failed, file does not exist as specified.
38969    # Try adding .exe or .cmd
38970    if test -f "${new_path}.exe"; then
38971      input_to_shortpath="${new_path}.exe"
38972    elif test -f "${new_path}.cmd"; then
38973      input_to_shortpath="${new_path}.cmd"
38974    else
38975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
38976$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
38977      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38978$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38979      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
38980    fi
38981  else
38982    input_to_shortpath="$new_path"
38983  fi
38984
38985  # Call helper function which possibly converts this using DOS-style short mode.
38986  # If so, the updated path is stored in $new_path.
38987  new_path="$input_to_shortpath"
38988
38989  input_path="$input_to_shortpath"
38990  # Check if we need to convert this using DOS-style short mode. If the path
38991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38992  # take no chances and rewrite it.
38993  # Note: m4 eats our [], so we need to use [ and ] instead.
38994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38995  if test "x$has_forbidden_chars" != x; then
38996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38997    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38998    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38999    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39000      # Going to short mode and back again did indeed matter. Since short mode is
39001      # case insensitive, let's make it lowercase to improve readability.
39002      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39003      # Now convert it back to Unix-stile (cygpath)
39004      input_path=`$CYGPATH -u "$shortmode_path"`
39005      new_path="$input_path"
39006    fi
39007  fi
39008
39009  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39010  if test "x$test_cygdrive_prefix" = x; then
39011    # As a simple fix, exclude /usr/bin since it's not a real path.
39012    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39013      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39014      # a path prefixed by /cygdrive for fixpath to work.
39015      new_path="$CYGWIN_ROOT_PATH$input_path"
39016    fi
39017  fi
39018
39019  # remove trailing .exe if any
39020  new_path="${new_path/%.exe/}"
39021
39022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39023
39024  # First separate the path from the arguments. This will split at the first
39025  # space.
39026  complete="$BUILD_CC"
39027  path="${complete%% *}"
39028  tmp="$complete EOL"
39029  arguments="${tmp#* }"
39030
39031  # Input might be given as Windows format, start by converting to
39032  # unix format.
39033  new_path="$path"
39034
39035  windows_path="$new_path"
39036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39037    unix_path=`$CYGPATH -u "$windows_path"`
39038    new_path="$unix_path"
39039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39041    new_path="$unix_path"
39042  fi
39043
39044
39045  # Now try to locate executable using which
39046  new_path=`$WHICH "$new_path" 2> /dev/null`
39047
39048  if test "x$new_path" = x; then
39049    # Oops. Which didn't find the executable.
39050    # The splitting of arguments from the executable at a space might have been incorrect,
39051    # since paths with space are more likely in Windows. Give it another try with the whole
39052    # argument.
39053    path="$complete"
39054    arguments="EOL"
39055    new_path="$path"
39056
39057  windows_path="$new_path"
39058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39059    unix_path=`$CYGPATH -u "$windows_path"`
39060    new_path="$unix_path"
39061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39063    new_path="$unix_path"
39064  fi
39065
39066
39067    new_path=`$WHICH "$new_path" 2> /dev/null`
39068
39069    if test "x$new_path" = x; then
39070      # It's still not found. Now this is an unrecoverable error.
39071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39072$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39073      has_space=`$ECHO "$complete" | $GREP " "`
39074      if test "x$has_space" != x; then
39075        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39076$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39077      fi
39078      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39079    fi
39080  fi
39081
39082  # Now new_path has a complete unix path to the binary
39083  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39084    # Keep paths in /bin as-is, but remove trailing .exe if any
39085    new_path="${new_path/%.exe/}"
39086    # Do not save /bin paths to all_fixpath_prefixes!
39087  else
39088    # Not in mixed or Windows style, start by that.
39089    new_path=`cmd //c echo $new_path`
39090
39091  input_path="$new_path"
39092  # Check if we need to convert this using DOS-style short mode. If the path
39093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39094  # take no chances and rewrite it.
39095  # Note: m4 eats our [], so we need to use [ and ] instead.
39096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39097  if test "x$has_forbidden_chars" != x; then
39098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39099    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39100  fi
39101
39102    # Output is in $new_path
39103
39104  windows_path="$new_path"
39105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39106    unix_path=`$CYGPATH -u "$windows_path"`
39107    new_path="$unix_path"
39108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39110    new_path="$unix_path"
39111  fi
39112
39113    # remove trailing .exe if any
39114    new_path="${new_path/%.exe/}"
39115
39116    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39117    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39118  fi
39119
39120  else
39121    # We're on a posix platform. Hooray! :)
39122    # First separate the path from the arguments. This will split at the first
39123    # space.
39124    complete="$BUILD_CC"
39125    path="${complete%% *}"
39126    tmp="$complete EOL"
39127    arguments="${tmp#* }"
39128
39129    # Cannot rely on the command "which" here since it doesn't always work.
39130    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39131    if test -z "$is_absolute_path"; then
39132      # Path to executable is not absolute. Find it.
39133      IFS_save="$IFS"
39134      IFS=:
39135      for p in $PATH; do
39136        if test -f "$p/$path" && test -x "$p/$path"; then
39137          new_path="$p/$path"
39138          break
39139        fi
39140      done
39141      IFS="$IFS_save"
39142    else
39143      # This is an absolute path, we can use it without further modifications.
39144      new_path="$path"
39145    fi
39146
39147    if test "x$new_path" = x; then
39148      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39149$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39150      has_space=`$ECHO "$complete" | $GREP " "`
39151      if test "x$has_space" != x; then
39152        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39153$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39154      fi
39155      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39156    fi
39157  fi
39158
39159  # Now join together the path and the arguments once again
39160  if test "x$arguments" != xEOL; then
39161    new_complete="$new_path ${arguments% *}"
39162  else
39163    new_complete="$new_path"
39164  fi
39165
39166  if test "x$complete" != "x$new_complete"; then
39167    BUILD_CC="$new_complete"
39168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39169$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39170  fi
39171
39172
39173
39174  # Publish this variable in the help.
39175
39176
39177  if test "x$BUILD_CXX" = x; then
39178    # The variable is not set by user, try to locate tool using the code snippet
39179    for ac_prog in cl CC g++
39180do
39181  # Extract the first word of "$ac_prog", so it can be a program name with args.
39182set dummy $ac_prog; ac_word=$2
39183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39184$as_echo_n "checking for $ac_word... " >&6; }
39185if ${ac_cv_path_BUILD_CXX+:} false; then :
39186  $as_echo_n "(cached) " >&6
39187else
39188  case $BUILD_CXX in
39189  [\\/]* | ?:[\\/]*)
39190  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39191  ;;
39192  *)
39193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39194for as_dir in $PATH
39195do
39196  IFS=$as_save_IFS
39197  test -z "$as_dir" && as_dir=.
39198    for ac_exec_ext in '' $ac_executable_extensions; do
39199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39200    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39202    break 2
39203  fi
39204done
39205  done
39206IFS=$as_save_IFS
39207
39208  ;;
39209esac
39210fi
39211BUILD_CXX=$ac_cv_path_BUILD_CXX
39212if test -n "$BUILD_CXX"; then
39213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39214$as_echo "$BUILD_CXX" >&6; }
39215else
39216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39217$as_echo "no" >&6; }
39218fi
39219
39220
39221  test -n "$BUILD_CXX" && break
39222done
39223
39224  else
39225    # The variable is set, but is it from the command line or the environment?
39226
39227    # Try to remove the string !BUILD_CXX! from our list.
39228    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39229    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39230      # If it failed, the variable was not from the command line. Ignore it,
39231      # but warn the user (except for BASH, which is always set by the calling BASH).
39232      if test "xBUILD_CXX" != xBASH; then
39233        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39234$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39235      fi
39236      # Try to locate tool using the code snippet
39237      for ac_prog in cl CC g++
39238do
39239  # Extract the first word of "$ac_prog", so it can be a program name with args.
39240set dummy $ac_prog; ac_word=$2
39241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39242$as_echo_n "checking for $ac_word... " >&6; }
39243if ${ac_cv_path_BUILD_CXX+:} false; then :
39244  $as_echo_n "(cached) " >&6
39245else
39246  case $BUILD_CXX in
39247  [\\/]* | ?:[\\/]*)
39248  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39249  ;;
39250  *)
39251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39252for as_dir in $PATH
39253do
39254  IFS=$as_save_IFS
39255  test -z "$as_dir" && as_dir=.
39256    for ac_exec_ext in '' $ac_executable_extensions; do
39257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39258    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39260    break 2
39261  fi
39262done
39263  done
39264IFS=$as_save_IFS
39265
39266  ;;
39267esac
39268fi
39269BUILD_CXX=$ac_cv_path_BUILD_CXX
39270if test -n "$BUILD_CXX"; then
39271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39272$as_echo "$BUILD_CXX" >&6; }
39273else
39274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39275$as_echo "no" >&6; }
39276fi
39277
39278
39279  test -n "$BUILD_CXX" && break
39280done
39281
39282    else
39283      # If it succeeded, then it was overridden by the user. We will use it
39284      # for the tool.
39285
39286      # First remove it from the list of overridden variables, so we can test
39287      # for unknown variables in the end.
39288      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39289
39290      # Check if the provided tool contains a complete path.
39291      tool_specified="$BUILD_CXX"
39292      tool_basename="${tool_specified##*/}"
39293      if test "x$tool_basename" = "x$tool_specified"; then
39294        # A command without a complete path is provided, search $PATH.
39295        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39296$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39297        # Extract the first word of "$tool_basename", so it can be a program name with args.
39298set dummy $tool_basename; ac_word=$2
39299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39300$as_echo_n "checking for $ac_word... " >&6; }
39301if ${ac_cv_path_BUILD_CXX+:} false; then :
39302  $as_echo_n "(cached) " >&6
39303else
39304  case $BUILD_CXX in
39305  [\\/]* | ?:[\\/]*)
39306  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39307  ;;
39308  *)
39309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39310for as_dir in $PATH
39311do
39312  IFS=$as_save_IFS
39313  test -z "$as_dir" && as_dir=.
39314    for ac_exec_ext in '' $ac_executable_extensions; do
39315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39316    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39318    break 2
39319  fi
39320done
39321  done
39322IFS=$as_save_IFS
39323
39324  ;;
39325esac
39326fi
39327BUILD_CXX=$ac_cv_path_BUILD_CXX
39328if test -n "$BUILD_CXX"; then
39329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39330$as_echo "$BUILD_CXX" >&6; }
39331else
39332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39333$as_echo "no" >&6; }
39334fi
39335
39336
39337        if test "x$BUILD_CXX" = x; then
39338          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39339        fi
39340      else
39341        # Otherwise we believe it is a complete path. Use it as it is.
39342        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39343$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39344        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39345$as_echo_n "checking for BUILD_CXX... " >&6; }
39346        if test ! -x "$tool_specified"; then
39347          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39348$as_echo "not found" >&6; }
39349          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39350        fi
39351        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39352$as_echo "$tool_specified" >&6; }
39353      fi
39354    fi
39355  fi
39356
39357
39358
39359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39360
39361  # First separate the path from the arguments. This will split at the first
39362  # space.
39363  complete="$BUILD_CXX"
39364  path="${complete%% *}"
39365  tmp="$complete EOL"
39366  arguments="${tmp#* }"
39367
39368  # Input might be given as Windows format, start by converting to
39369  # unix format.
39370  new_path=`$CYGPATH -u "$path"`
39371
39372  # Now try to locate executable using which
39373  new_path=`$WHICH "$new_path" 2> /dev/null`
39374  # bat and cmd files are not always considered executable in cygwin causing which
39375  # to not find them
39376  if test "x$new_path" = x \
39377      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39378      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39379    new_path=`$CYGPATH -u "$path"`
39380  fi
39381  if test "x$new_path" = x; then
39382    # Oops. Which didn't find the executable.
39383    # The splitting of arguments from the executable at a space might have been incorrect,
39384    # since paths with space are more likely in Windows. Give it another try with the whole
39385    # argument.
39386    path="$complete"
39387    arguments="EOL"
39388    new_path=`$CYGPATH -u "$path"`
39389    new_path=`$WHICH "$new_path" 2> /dev/null`
39390    # bat and cmd files are not always considered executable in cygwin causing which
39391    # to not find them
39392    if test "x$new_path" = x \
39393        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39394        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39395      new_path=`$CYGPATH -u "$path"`
39396    fi
39397    if test "x$new_path" = x; then
39398      # It's still not found. Now this is an unrecoverable error.
39399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39400$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39401      has_space=`$ECHO "$complete" | $GREP " "`
39402      if test "x$has_space" != x; then
39403        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39404$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39405      fi
39406      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39407    fi
39408  fi
39409
39410  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39411  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39412  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39413  # "foo.exe" is OK but "foo" is an error.
39414  #
39415  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39416  # It is also a way to make sure we got the proper file name for the real test later on.
39417  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39418  if test "x$test_shortpath" = x; then
39419    # Short path failed, file does not exist as specified.
39420    # Try adding .exe or .cmd
39421    if test -f "${new_path}.exe"; then
39422      input_to_shortpath="${new_path}.exe"
39423    elif test -f "${new_path}.cmd"; then
39424      input_to_shortpath="${new_path}.cmd"
39425    else
39426      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39427$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39428      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39429$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39430      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39431    fi
39432  else
39433    input_to_shortpath="$new_path"
39434  fi
39435
39436  # Call helper function which possibly converts this using DOS-style short mode.
39437  # If so, the updated path is stored in $new_path.
39438  new_path="$input_to_shortpath"
39439
39440  input_path="$input_to_shortpath"
39441  # Check if we need to convert this using DOS-style short mode. If the path
39442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39443  # take no chances and rewrite it.
39444  # Note: m4 eats our [], so we need to use [ and ] instead.
39445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39446  if test "x$has_forbidden_chars" != x; then
39447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39448    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39449    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39450    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39451      # Going to short mode and back again did indeed matter. Since short mode is
39452      # case insensitive, let's make it lowercase to improve readability.
39453      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39454      # Now convert it back to Unix-stile (cygpath)
39455      input_path=`$CYGPATH -u "$shortmode_path"`
39456      new_path="$input_path"
39457    fi
39458  fi
39459
39460  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39461  if test "x$test_cygdrive_prefix" = x; then
39462    # As a simple fix, exclude /usr/bin since it's not a real path.
39463    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39464      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39465      # a path prefixed by /cygdrive for fixpath to work.
39466      new_path="$CYGWIN_ROOT_PATH$input_path"
39467    fi
39468  fi
39469
39470  # remove trailing .exe if any
39471  new_path="${new_path/%.exe/}"
39472
39473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39474
39475  # First separate the path from the arguments. This will split at the first
39476  # space.
39477  complete="$BUILD_CXX"
39478  path="${complete%% *}"
39479  tmp="$complete EOL"
39480  arguments="${tmp#* }"
39481
39482  # Input might be given as Windows format, start by converting to
39483  # unix format.
39484  new_path="$path"
39485
39486  windows_path="$new_path"
39487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39488    unix_path=`$CYGPATH -u "$windows_path"`
39489    new_path="$unix_path"
39490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39492    new_path="$unix_path"
39493  fi
39494
39495
39496  # Now try to locate executable using which
39497  new_path=`$WHICH "$new_path" 2> /dev/null`
39498
39499  if test "x$new_path" = x; then
39500    # Oops. Which didn't find the executable.
39501    # The splitting of arguments from the executable at a space might have been incorrect,
39502    # since paths with space are more likely in Windows. Give it another try with the whole
39503    # argument.
39504    path="$complete"
39505    arguments="EOL"
39506    new_path="$path"
39507
39508  windows_path="$new_path"
39509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39510    unix_path=`$CYGPATH -u "$windows_path"`
39511    new_path="$unix_path"
39512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39514    new_path="$unix_path"
39515  fi
39516
39517
39518    new_path=`$WHICH "$new_path" 2> /dev/null`
39519
39520    if test "x$new_path" = x; then
39521      # It's still not found. Now this is an unrecoverable error.
39522      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39523$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39524      has_space=`$ECHO "$complete" | $GREP " "`
39525      if test "x$has_space" != x; then
39526        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39527$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39528      fi
39529      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39530    fi
39531  fi
39532
39533  # Now new_path has a complete unix path to the binary
39534  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39535    # Keep paths in /bin as-is, but remove trailing .exe if any
39536    new_path="${new_path/%.exe/}"
39537    # Do not save /bin paths to all_fixpath_prefixes!
39538  else
39539    # Not in mixed or Windows style, start by that.
39540    new_path=`cmd //c echo $new_path`
39541
39542  input_path="$new_path"
39543  # Check if we need to convert this using DOS-style short mode. If the path
39544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39545  # take no chances and rewrite it.
39546  # Note: m4 eats our [], so we need to use [ and ] instead.
39547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39548  if test "x$has_forbidden_chars" != x; then
39549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39550    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39551  fi
39552
39553    # Output is in $new_path
39554
39555  windows_path="$new_path"
39556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39557    unix_path=`$CYGPATH -u "$windows_path"`
39558    new_path="$unix_path"
39559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39561    new_path="$unix_path"
39562  fi
39563
39564    # remove trailing .exe if any
39565    new_path="${new_path/%.exe/}"
39566
39567    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39568    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39569  fi
39570
39571  else
39572    # We're on a posix platform. Hooray! :)
39573    # First separate the path from the arguments. This will split at the first
39574    # space.
39575    complete="$BUILD_CXX"
39576    path="${complete%% *}"
39577    tmp="$complete EOL"
39578    arguments="${tmp#* }"
39579
39580    # Cannot rely on the command "which" here since it doesn't always work.
39581    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39582    if test -z "$is_absolute_path"; then
39583      # Path to executable is not absolute. Find it.
39584      IFS_save="$IFS"
39585      IFS=:
39586      for p in $PATH; do
39587        if test -f "$p/$path" && test -x "$p/$path"; then
39588          new_path="$p/$path"
39589          break
39590        fi
39591      done
39592      IFS="$IFS_save"
39593    else
39594      # This is an absolute path, we can use it without further modifications.
39595      new_path="$path"
39596    fi
39597
39598    if test "x$new_path" = x; then
39599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39600$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39601      has_space=`$ECHO "$complete" | $GREP " "`
39602      if test "x$has_space" != x; then
39603        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39604$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39605      fi
39606      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39607    fi
39608  fi
39609
39610  # Now join together the path and the arguments once again
39611  if test "x$arguments" != xEOL; then
39612    new_complete="$new_path ${arguments% *}"
39613  else
39614    new_complete="$new_path"
39615  fi
39616
39617  if test "x$complete" != "x$new_complete"; then
39618    BUILD_CXX="$new_complete"
39619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39620$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39621  fi
39622
39623
39624
39625  # Publish this variable in the help.
39626
39627
39628  if test "x$BUILD_LD" = x; then
39629    # The variable is not set by user, try to locate tool using the code snippet
39630    for ac_prog in ld
39631do
39632  # Extract the first word of "$ac_prog", so it can be a program name with args.
39633set dummy $ac_prog; ac_word=$2
39634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39635$as_echo_n "checking for $ac_word... " >&6; }
39636if ${ac_cv_path_BUILD_LD+:} false; then :
39637  $as_echo_n "(cached) " >&6
39638else
39639  case $BUILD_LD in
39640  [\\/]* | ?:[\\/]*)
39641  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39642  ;;
39643  *)
39644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39645for as_dir in $PATH
39646do
39647  IFS=$as_save_IFS
39648  test -z "$as_dir" && as_dir=.
39649    for ac_exec_ext in '' $ac_executable_extensions; do
39650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39651    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39653    break 2
39654  fi
39655done
39656  done
39657IFS=$as_save_IFS
39658
39659  ;;
39660esac
39661fi
39662BUILD_LD=$ac_cv_path_BUILD_LD
39663if test -n "$BUILD_LD"; then
39664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39665$as_echo "$BUILD_LD" >&6; }
39666else
39667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39668$as_echo "no" >&6; }
39669fi
39670
39671
39672  test -n "$BUILD_LD" && break
39673done
39674
39675  else
39676    # The variable is set, but is it from the command line or the environment?
39677
39678    # Try to remove the string !BUILD_LD! from our list.
39679    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39680    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39681      # If it failed, the variable was not from the command line. Ignore it,
39682      # but warn the user (except for BASH, which is always set by the calling BASH).
39683      if test "xBUILD_LD" != xBASH; then
39684        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39685$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39686      fi
39687      # Try to locate tool using the code snippet
39688      for ac_prog in ld
39689do
39690  # Extract the first word of "$ac_prog", so it can be a program name with args.
39691set dummy $ac_prog; ac_word=$2
39692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39693$as_echo_n "checking for $ac_word... " >&6; }
39694if ${ac_cv_path_BUILD_LD+:} false; then :
39695  $as_echo_n "(cached) " >&6
39696else
39697  case $BUILD_LD in
39698  [\\/]* | ?:[\\/]*)
39699  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39700  ;;
39701  *)
39702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39703for as_dir in $PATH
39704do
39705  IFS=$as_save_IFS
39706  test -z "$as_dir" && as_dir=.
39707    for ac_exec_ext in '' $ac_executable_extensions; do
39708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39709    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39711    break 2
39712  fi
39713done
39714  done
39715IFS=$as_save_IFS
39716
39717  ;;
39718esac
39719fi
39720BUILD_LD=$ac_cv_path_BUILD_LD
39721if test -n "$BUILD_LD"; then
39722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39723$as_echo "$BUILD_LD" >&6; }
39724else
39725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39726$as_echo "no" >&6; }
39727fi
39728
39729
39730  test -n "$BUILD_LD" && break
39731done
39732
39733    else
39734      # If it succeeded, then it was overridden by the user. We will use it
39735      # for the tool.
39736
39737      # First remove it from the list of overridden variables, so we can test
39738      # for unknown variables in the end.
39739      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39740
39741      # Check if the provided tool contains a complete path.
39742      tool_specified="$BUILD_LD"
39743      tool_basename="${tool_specified##*/}"
39744      if test "x$tool_basename" = "x$tool_specified"; then
39745        # A command without a complete path is provided, search $PATH.
39746        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
39747$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
39748        # Extract the first word of "$tool_basename", so it can be a program name with args.
39749set dummy $tool_basename; ac_word=$2
39750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39751$as_echo_n "checking for $ac_word... " >&6; }
39752if ${ac_cv_path_BUILD_LD+:} false; then :
39753  $as_echo_n "(cached) " >&6
39754else
39755  case $BUILD_LD in
39756  [\\/]* | ?:[\\/]*)
39757  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39758  ;;
39759  *)
39760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39761for as_dir in $PATH
39762do
39763  IFS=$as_save_IFS
39764  test -z "$as_dir" && as_dir=.
39765    for ac_exec_ext in '' $ac_executable_extensions; do
39766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39767    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39769    break 2
39770  fi
39771done
39772  done
39773IFS=$as_save_IFS
39774
39775  ;;
39776esac
39777fi
39778BUILD_LD=$ac_cv_path_BUILD_LD
39779if test -n "$BUILD_LD"; then
39780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39781$as_echo "$BUILD_LD" >&6; }
39782else
39783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39784$as_echo "no" >&6; }
39785fi
39786
39787
39788        if test "x$BUILD_LD" = x; then
39789          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39790        fi
39791      else
39792        # Otherwise we believe it is a complete path. Use it as it is.
39793        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
39794$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
39795        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
39796$as_echo_n "checking for BUILD_LD... " >&6; }
39797        if test ! -x "$tool_specified"; then
39798          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39799$as_echo "not found" >&6; }
39800          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
39801        fi
39802        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39803$as_echo "$tool_specified" >&6; }
39804      fi
39805    fi
39806  fi
39807
39808
39809
39810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39811
39812  # First separate the path from the arguments. This will split at the first
39813  # space.
39814  complete="$BUILD_LD"
39815  path="${complete%% *}"
39816  tmp="$complete EOL"
39817  arguments="${tmp#* }"
39818
39819  # Input might be given as Windows format, start by converting to
39820  # unix format.
39821  new_path=`$CYGPATH -u "$path"`
39822
39823  # Now try to locate executable using which
39824  new_path=`$WHICH "$new_path" 2> /dev/null`
39825  # bat and cmd files are not always considered executable in cygwin causing which
39826  # to not find them
39827  if test "x$new_path" = x \
39828      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39829      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39830    new_path=`$CYGPATH -u "$path"`
39831  fi
39832  if test "x$new_path" = x; then
39833    # Oops. Which didn't find the executable.
39834    # The splitting of arguments from the executable at a space might have been incorrect,
39835    # since paths with space are more likely in Windows. Give it another try with the whole
39836    # argument.
39837    path="$complete"
39838    arguments="EOL"
39839    new_path=`$CYGPATH -u "$path"`
39840    new_path=`$WHICH "$new_path" 2> /dev/null`
39841    # bat and cmd files are not always considered executable in cygwin causing which
39842    # to not find them
39843    if test "x$new_path" = x \
39844        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39845        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39846      new_path=`$CYGPATH -u "$path"`
39847    fi
39848    if test "x$new_path" = x; then
39849      # It's still not found. Now this is an unrecoverable error.
39850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39851$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39852      has_space=`$ECHO "$complete" | $GREP " "`
39853      if test "x$has_space" != x; then
39854        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39855$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39856      fi
39857      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39858    fi
39859  fi
39860
39861  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39862  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39863  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39864  # "foo.exe" is OK but "foo" is an error.
39865  #
39866  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39867  # It is also a way to make sure we got the proper file name for the real test later on.
39868  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39869  if test "x$test_shortpath" = x; then
39870    # Short path failed, file does not exist as specified.
39871    # Try adding .exe or .cmd
39872    if test -f "${new_path}.exe"; then
39873      input_to_shortpath="${new_path}.exe"
39874    elif test -f "${new_path}.cmd"; then
39875      input_to_shortpath="${new_path}.cmd"
39876    else
39877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
39878$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
39879      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39880$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39881      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39882    fi
39883  else
39884    input_to_shortpath="$new_path"
39885  fi
39886
39887  # Call helper function which possibly converts this using DOS-style short mode.
39888  # If so, the updated path is stored in $new_path.
39889  new_path="$input_to_shortpath"
39890
39891  input_path="$input_to_shortpath"
39892  # Check if we need to convert this using DOS-style short mode. If the path
39893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39894  # take no chances and rewrite it.
39895  # Note: m4 eats our [], so we need to use [ and ] instead.
39896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39897  if test "x$has_forbidden_chars" != x; then
39898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39899    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39900    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39901    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39902      # Going to short mode and back again did indeed matter. Since short mode is
39903      # case insensitive, let's make it lowercase to improve readability.
39904      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39905      # Now convert it back to Unix-stile (cygpath)
39906      input_path=`$CYGPATH -u "$shortmode_path"`
39907      new_path="$input_path"
39908    fi
39909  fi
39910
39911  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39912  if test "x$test_cygdrive_prefix" = x; then
39913    # As a simple fix, exclude /usr/bin since it's not a real path.
39914    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39915      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39916      # a path prefixed by /cygdrive for fixpath to work.
39917      new_path="$CYGWIN_ROOT_PATH$input_path"
39918    fi
39919  fi
39920
39921  # remove trailing .exe if any
39922  new_path="${new_path/%.exe/}"
39923
39924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39925
39926  # First separate the path from the arguments. This will split at the first
39927  # space.
39928  complete="$BUILD_LD"
39929  path="${complete%% *}"
39930  tmp="$complete EOL"
39931  arguments="${tmp#* }"
39932
39933  # Input might be given as Windows format, start by converting to
39934  # unix format.
39935  new_path="$path"
39936
39937  windows_path="$new_path"
39938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39939    unix_path=`$CYGPATH -u "$windows_path"`
39940    new_path="$unix_path"
39941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39943    new_path="$unix_path"
39944  fi
39945
39946
39947  # Now try to locate executable using which
39948  new_path=`$WHICH "$new_path" 2> /dev/null`
39949
39950  if test "x$new_path" = x; then
39951    # Oops. Which didn't find the executable.
39952    # The splitting of arguments from the executable at a space might have been incorrect,
39953    # since paths with space are more likely in Windows. Give it another try with the whole
39954    # argument.
39955    path="$complete"
39956    arguments="EOL"
39957    new_path="$path"
39958
39959  windows_path="$new_path"
39960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39961    unix_path=`$CYGPATH -u "$windows_path"`
39962    new_path="$unix_path"
39963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39965    new_path="$unix_path"
39966  fi
39967
39968
39969    new_path=`$WHICH "$new_path" 2> /dev/null`
39970
39971    if test "x$new_path" = x; then
39972      # It's still not found. Now this is an unrecoverable error.
39973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39974$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39975      has_space=`$ECHO "$complete" | $GREP " "`
39976      if test "x$has_space" != x; then
39977        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39978$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39979      fi
39980      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39981    fi
39982  fi
39983
39984  # Now new_path has a complete unix path to the binary
39985  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39986    # Keep paths in /bin as-is, but remove trailing .exe if any
39987    new_path="${new_path/%.exe/}"
39988    # Do not save /bin paths to all_fixpath_prefixes!
39989  else
39990    # Not in mixed or Windows style, start by that.
39991    new_path=`cmd //c echo $new_path`
39992
39993  input_path="$new_path"
39994  # Check if we need to convert this using DOS-style short mode. If the path
39995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39996  # take no chances and rewrite it.
39997  # Note: m4 eats our [], so we need to use [ and ] instead.
39998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39999  if test "x$has_forbidden_chars" != x; then
40000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40002  fi
40003
40004    # Output is in $new_path
40005
40006  windows_path="$new_path"
40007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40008    unix_path=`$CYGPATH -u "$windows_path"`
40009    new_path="$unix_path"
40010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40012    new_path="$unix_path"
40013  fi
40014
40015    # remove trailing .exe if any
40016    new_path="${new_path/%.exe/}"
40017
40018    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40019    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40020  fi
40021
40022  else
40023    # We're on a posix platform. Hooray! :)
40024    # First separate the path from the arguments. This will split at the first
40025    # space.
40026    complete="$BUILD_LD"
40027    path="${complete%% *}"
40028    tmp="$complete EOL"
40029    arguments="${tmp#* }"
40030
40031    # Cannot rely on the command "which" here since it doesn't always work.
40032    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40033    if test -z "$is_absolute_path"; then
40034      # Path to executable is not absolute. Find it.
40035      IFS_save="$IFS"
40036      IFS=:
40037      for p in $PATH; do
40038        if test -f "$p/$path" && test -x "$p/$path"; then
40039          new_path="$p/$path"
40040          break
40041        fi
40042      done
40043      IFS="$IFS_save"
40044    else
40045      # This is an absolute path, we can use it without further modifications.
40046      new_path="$path"
40047    fi
40048
40049    if test "x$new_path" = x; then
40050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40051$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40052      has_space=`$ECHO "$complete" | $GREP " "`
40053      if test "x$has_space" != x; then
40054        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40055$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40056      fi
40057      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40058    fi
40059  fi
40060
40061  # Now join together the path and the arguments once again
40062  if test "x$arguments" != xEOL; then
40063    new_complete="$new_path ${arguments% *}"
40064  else
40065    new_complete="$new_path"
40066  fi
40067
40068  if test "x$complete" != "x$new_complete"; then
40069    BUILD_LD="$new_complete"
40070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40071$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40072  fi
40073
40074  else
40075    # If we are not cross compiling, use the normal target compilers for
40076    # building the build platform executables.
40077    BUILD_CC="$CC"
40078    BUILD_CXX="$CXX"
40079    BUILD_LD="$LD"
40080  fi
40081
40082
40083
40084
40085
40086
40087  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40088    # For hotspot, we need these in Windows mixed path,
40089    # so rewrite them all. Need added .exe suffix.
40090    HOTSPOT_CXX="$CXX.exe"
40091    HOTSPOT_LD="$LD.exe"
40092    HOTSPOT_MT="$MT.exe"
40093    HOTSPOT_RC="$RC.exe"
40094
40095  unix_path="$HOTSPOT_CXX"
40096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40097    windows_path=`$CYGPATH -m "$unix_path"`
40098    HOTSPOT_CXX="$windows_path"
40099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40100    windows_path=`cmd //c echo $unix_path`
40101    HOTSPOT_CXX="$windows_path"
40102  fi
40103
40104
40105  unix_path="$HOTSPOT_LD"
40106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40107    windows_path=`$CYGPATH -m "$unix_path"`
40108    HOTSPOT_LD="$windows_path"
40109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40110    windows_path=`cmd //c echo $unix_path`
40111    HOTSPOT_LD="$windows_path"
40112  fi
40113
40114
40115  unix_path="$HOTSPOT_MT"
40116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40117    windows_path=`$CYGPATH -m "$unix_path"`
40118    HOTSPOT_MT="$windows_path"
40119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40120    windows_path=`cmd //c echo $unix_path`
40121    HOTSPOT_MT="$windows_path"
40122  fi
40123
40124
40125  unix_path="$HOTSPOT_RC"
40126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40127    windows_path=`$CYGPATH -m "$unix_path"`
40128    HOTSPOT_RC="$windows_path"
40129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40130    windows_path=`cmd //c echo $unix_path`
40131    HOTSPOT_RC="$windows_path"
40132  fi
40133
40134
40135
40136  else
40137    HOTSPOT_CXX="$CXX"
40138    HOTSPOT_LD="$LD"
40139  fi
40140
40141
40142
40143  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40144    USE_CLANG=true
40145  fi
40146
40147
40148  # LDEXE is the linker to use, when creating executables. Not really used.
40149  # FIXME: These should just be removed!
40150  LDEXE="$LD"
40151  LDEXECXX="$LDCXX"
40152
40153
40154
40155
40156  # The package path is used only on macosx?
40157  # FIXME: clean this up, and/or move it elsewhere.
40158  PACKAGE_PATH=/opt/local
40159
40160
40161  # Check for extra potential brokenness.
40162  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40163    # On Windows, double-check that we got the right compiler.
40164    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40165    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40166    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40167      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40168        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40169      fi
40170    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40171      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40172        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40173      fi
40174    fi
40175  fi
40176
40177  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40178    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40179    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40180    # This is later checked when setting flags.
40181  fi
40182
40183  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40184  # in executable.'
40185  USING_BROKEN_SUSE_LD=no
40186  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40188$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40189    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
40190    echo "int main() { }" > main.c
40191    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40192      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40193$as_echo "no" >&6; }
40194      USING_BROKEN_SUSE_LD=no
40195    else
40196      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40197$as_echo "yes" >&6; }
40198      USING_BROKEN_SUSE_LD=yes
40199    fi
40200    rm -rf version-script.map main.c a.out
40201  fi
40202
40203
40204
40205# Setup the JTReg Regression Test Harness.
40206
40207
40208# Check whether --with-jtreg was given.
40209if test "${with_jtreg+set}" = set; then :
40210  withval=$with_jtreg;
40211else
40212  with_jtreg=no
40213fi
40214
40215
40216  if test "x$with_jtreg" = xno; then
40217    # jtreg disabled
40218    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40219$as_echo_n "checking for jtreg... " >&6; }
40220    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40221$as_echo "no" >&6; }
40222  else
40223    if test "x$with_jtreg" != xyes; then
40224      # with path specified.
40225      JT_HOME="$with_jtreg"
40226    fi
40227
40228    if test "x$JT_HOME" != x; then
40229      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40230$as_echo_n "checking for jtreg... " >&6; }
40231
40232      # use JT_HOME enviroment var.
40233
40234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40235
40236  # Input might be given as Windows format, start by converting to
40237  # unix format.
40238  path="$JT_HOME"
40239  new_path=`$CYGPATH -u "$path"`
40240
40241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40244  # "foo.exe" is OK but "foo" is an error.
40245  #
40246  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40247  # It is also a way to make sure we got the proper file name for the real test later on.
40248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40249  if test "x$test_shortpath" = x; then
40250    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40251$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40252    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40253  fi
40254
40255  # Call helper function which possibly converts this using DOS-style short mode.
40256  # If so, the updated path is stored in $new_path.
40257
40258  input_path="$new_path"
40259  # Check if we need to convert this using DOS-style short mode. If the path
40260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40261  # take no chances and rewrite it.
40262  # Note: m4 eats our [], so we need to use [ and ] instead.
40263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40264  if test "x$has_forbidden_chars" != x; then
40265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40269      # Going to short mode and back again did indeed matter. Since short mode is
40270      # case insensitive, let's make it lowercase to improve readability.
40271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40272      # Now convert it back to Unix-stile (cygpath)
40273      input_path=`$CYGPATH -u "$shortmode_path"`
40274      new_path="$input_path"
40275    fi
40276  fi
40277
40278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40279  if test "x$test_cygdrive_prefix" = x; then
40280    # As a simple fix, exclude /usr/bin since it's not a real path.
40281    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40283      # a path prefixed by /cygdrive for fixpath to work.
40284      new_path="$CYGWIN_ROOT_PATH$input_path"
40285    fi
40286  fi
40287
40288
40289  if test "x$path" != "x$new_path"; then
40290    JT_HOME="$new_path"
40291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40292$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40293  fi
40294
40295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40296
40297  path="$JT_HOME"
40298  has_colon=`$ECHO $path | $GREP ^.:`
40299  new_path="$path"
40300  if test "x$has_colon" = x; then
40301    # Not in mixed or Windows style, start by that.
40302    new_path=`cmd //c echo $path`
40303  fi
40304
40305
40306  input_path="$new_path"
40307  # Check if we need to convert this using DOS-style short mode. If the path
40308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40309  # take no chances and rewrite it.
40310  # Note: m4 eats our [], so we need to use [ and ] instead.
40311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40312  if test "x$has_forbidden_chars" != x; then
40313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40314    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40315  fi
40316
40317
40318  windows_path="$new_path"
40319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40320    unix_path=`$CYGPATH -u "$windows_path"`
40321    new_path="$unix_path"
40322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40324    new_path="$unix_path"
40325  fi
40326
40327  if test "x$path" != "x$new_path"; then
40328    JT_HOME="$new_path"
40329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40330$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40331  fi
40332
40333  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40334  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40335
40336  else
40337    # We're on a posix platform. Hooray! :)
40338    path="$JT_HOME"
40339    has_space=`$ECHO "$path" | $GREP " "`
40340    if test "x$has_space" != x; then
40341      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40342$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40343      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40344    fi
40345
40346    # Use eval to expand a potential ~
40347    eval path="$path"
40348    if test ! -f "$path" && test ! -d "$path"; then
40349      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40350    fi
40351
40352    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40353  fi
40354
40355
40356      # jtreg win32 script works for everybody
40357      JTREGEXE="$JT_HOME/win32/bin/jtreg"
40358
40359      if test ! -f "$JTREGEXE"; then
40360        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40361      fi
40362
40363      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40364$as_echo "$JTREGEXE" >&6; }
40365    else
40366      # try to find jtreg on path
40367
40368
40369
40370  # Publish this variable in the help.
40371
40372
40373  if test "x$JTREGEXE" = x; then
40374    # The variable is not set by user, try to locate tool using the code snippet
40375    for ac_prog in jtreg
40376do
40377  # Extract the first word of "$ac_prog", so it can be a program name with args.
40378set dummy $ac_prog; ac_word=$2
40379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40380$as_echo_n "checking for $ac_word... " >&6; }
40381if ${ac_cv_path_JTREGEXE+:} false; then :
40382  $as_echo_n "(cached) " >&6
40383else
40384  case $JTREGEXE in
40385  [\\/]* | ?:[\\/]*)
40386  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40387  ;;
40388  *)
40389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40390for as_dir in $PATH
40391do
40392  IFS=$as_save_IFS
40393  test -z "$as_dir" && as_dir=.
40394    for ac_exec_ext in '' $ac_executable_extensions; do
40395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40396    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40398    break 2
40399  fi
40400done
40401  done
40402IFS=$as_save_IFS
40403
40404  ;;
40405esac
40406fi
40407JTREGEXE=$ac_cv_path_JTREGEXE
40408if test -n "$JTREGEXE"; then
40409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40410$as_echo "$JTREGEXE" >&6; }
40411else
40412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40413$as_echo "no" >&6; }
40414fi
40415
40416
40417  test -n "$JTREGEXE" && break
40418done
40419
40420  else
40421    # The variable is set, but is it from the command line or the environment?
40422
40423    # Try to remove the string !JTREGEXE! from our list.
40424    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40425    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40426      # If it failed, the variable was not from the command line. Ignore it,
40427      # but warn the user (except for BASH, which is always set by the calling BASH).
40428      if test "xJTREGEXE" != xBASH; then
40429        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40430$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40431      fi
40432      # Try to locate tool using the code snippet
40433      for ac_prog in jtreg
40434do
40435  # Extract the first word of "$ac_prog", so it can be a program name with args.
40436set dummy $ac_prog; ac_word=$2
40437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40438$as_echo_n "checking for $ac_word... " >&6; }
40439if ${ac_cv_path_JTREGEXE+:} false; then :
40440  $as_echo_n "(cached) " >&6
40441else
40442  case $JTREGEXE in
40443  [\\/]* | ?:[\\/]*)
40444  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40445  ;;
40446  *)
40447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40448for as_dir in $PATH
40449do
40450  IFS=$as_save_IFS
40451  test -z "$as_dir" && as_dir=.
40452    for ac_exec_ext in '' $ac_executable_extensions; do
40453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40454    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40456    break 2
40457  fi
40458done
40459  done
40460IFS=$as_save_IFS
40461
40462  ;;
40463esac
40464fi
40465JTREGEXE=$ac_cv_path_JTREGEXE
40466if test -n "$JTREGEXE"; then
40467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40468$as_echo "$JTREGEXE" >&6; }
40469else
40470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40471$as_echo "no" >&6; }
40472fi
40473
40474
40475  test -n "$JTREGEXE" && break
40476done
40477
40478    else
40479      # If it succeeded, then it was overridden by the user. We will use it
40480      # for the tool.
40481
40482      # First remove it from the list of overridden variables, so we can test
40483      # for unknown variables in the end.
40484      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40485
40486      # Check if the provided tool contains a complete path.
40487      tool_specified="$JTREGEXE"
40488      tool_basename="${tool_specified##*/}"
40489      if test "x$tool_basename" = "x$tool_specified"; then
40490        # A command without a complete path is provided, search $PATH.
40491        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40492$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40493        # Extract the first word of "$tool_basename", so it can be a program name with args.
40494set dummy $tool_basename; ac_word=$2
40495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40496$as_echo_n "checking for $ac_word... " >&6; }
40497if ${ac_cv_path_JTREGEXE+:} false; then :
40498  $as_echo_n "(cached) " >&6
40499else
40500  case $JTREGEXE in
40501  [\\/]* | ?:[\\/]*)
40502  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40503  ;;
40504  *)
40505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40506for as_dir in $PATH
40507do
40508  IFS=$as_save_IFS
40509  test -z "$as_dir" && as_dir=.
40510    for ac_exec_ext in '' $ac_executable_extensions; do
40511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40512    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40514    break 2
40515  fi
40516done
40517  done
40518IFS=$as_save_IFS
40519
40520  ;;
40521esac
40522fi
40523JTREGEXE=$ac_cv_path_JTREGEXE
40524if test -n "$JTREGEXE"; then
40525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40526$as_echo "$JTREGEXE" >&6; }
40527else
40528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40529$as_echo "no" >&6; }
40530fi
40531
40532
40533        if test "x$JTREGEXE" = x; then
40534          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40535        fi
40536      else
40537        # Otherwise we believe it is a complete path. Use it as it is.
40538        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40539$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40540        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40541$as_echo_n "checking for JTREGEXE... " >&6; }
40542        if test ! -x "$tool_specified"; then
40543          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40544$as_echo "not found" >&6; }
40545          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40546        fi
40547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40548$as_echo "$tool_specified" >&6; }
40549      fi
40550    fi
40551  fi
40552
40553
40554
40555  if test "x$JTREGEXE" = x; then
40556    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40557  fi
40558
40559
40560      JT_HOME="`$DIRNAME $JTREGEXE`"
40561    fi
40562  fi
40563
40564
40565
40566
40567
40568
40569  # Option used to tell the compiler whether to create 32- or 64-bit executables
40570  if test "x$TOOLCHAIN_TYPE" = xxlc; then
40571    COMPILER_TARGET_BITS_FLAG="-q"
40572  else
40573    COMPILER_TARGET_BITS_FLAG="-m"
40574  fi
40575
40576
40577  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
40578  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40579    ARFLAGS="-r"
40580  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40581    ARFLAGS="-X64"
40582  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
40583    # lib.exe is used as AR to create static libraries.
40584    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
40585  else
40586    ARFLAGS=""
40587  fi
40588
40589
40590  ## Setup strip.
40591  # FIXME: should this really be per platform, or should it be per toolchain type?
40592  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
40593  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
40594  if test "x$OPENJDK_TARGET_OS" = xlinux; then
40595    STRIPFLAGS="-g"
40596  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
40597    STRIPFLAGS="-x"
40598  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
40599    STRIPFLAGS="-S"
40600  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40601    STRIPFLAGS="-X32_64"
40602  fi
40603
40604  if test "x$OPENJDK_TARGET_OS" != xwindows; then
40605    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
40606  fi
40607
40608
40609  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40610    # FIXME: break out into MCSFLAGS
40611    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
40612  fi
40613
40614
40615  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40616    CC_OUT_OPTION=-Fo
40617    EXE_OUT_OPTION=-out:
40618    LD_OUT_OPTION=-out:
40619    AR_OUT_OPTION=-out:
40620  else
40621    # The option used to specify the target .o,.a or .so file.
40622    # When compiling, how to specify the to be created object file.
40623    CC_OUT_OPTION='-o$(SPACE)'
40624    # When linking, how to specify the to be created executable.
40625    EXE_OUT_OPTION='-o$(SPACE)'
40626    # When linking, how to specify the to be created dynamically linkable library.
40627    LD_OUT_OPTION='-o$(SPACE)'
40628    # When archiving, how to specify the to be create static archive for object files.
40629    AR_OUT_OPTION='rcs$(SPACE)'
40630  fi
40631
40632
40633
40634
40635
40636  # On Windows, we need to set RC flags.
40637  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40638    RC_FLAGS="-nologo -l 0x409 -r"
40639    if test "x$VARIANT" = xOPT; then
40640      RC_FLAGS="$RC_FLAGS -d NDEBUG"
40641    fi
40642
40643    # The version variables used to create RC_FLAGS may be overridden
40644    # in a custom configure script, or possibly the command line.
40645    # Let those variables be expanded at make time in spec.gmk.
40646    # The \$ are escaped to the shell, and the $(...) variables
40647    # are evaluated by make.
40648    RC_FLAGS="$RC_FLAGS \
40649        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
40650        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
40651        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
40652        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
40653        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
40654        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
40655        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
40656  fi
40657
40658
40659  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40660    # FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
40661    CCXXFLAGS="$CCXXFLAGS -nologo"
40662  fi
40663
40664
40665# FIXME: Currently we must test this after toolchain but before flags. Fix!
40666
40667# Now we can test some aspects on the target using configure macros.
40668
40669
40670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
40671$as_echo_n "checking for ANSI C header files... " >&6; }
40672if ${ac_cv_header_stdc+:} false; then :
40673  $as_echo_n "(cached) " >&6
40674else
40675  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40676/* end confdefs.h.  */
40677#include <stdlib.h>
40678#include <stdarg.h>
40679#include <string.h>
40680#include <float.h>
40681
40682int
40683main ()
40684{
40685
40686  ;
40687  return 0;
40688}
40689_ACEOF
40690if ac_fn_cxx_try_compile "$LINENO"; then :
40691  ac_cv_header_stdc=yes
40692else
40693  ac_cv_header_stdc=no
40694fi
40695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40696
40697if test $ac_cv_header_stdc = yes; then
40698  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
40699  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40700/* end confdefs.h.  */
40701#include <string.h>
40702
40703_ACEOF
40704if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40705  $EGREP "memchr" >/dev/null 2>&1; then :
40706
40707else
40708  ac_cv_header_stdc=no
40709fi
40710rm -f conftest*
40711
40712fi
40713
40714if test $ac_cv_header_stdc = yes; then
40715  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
40716  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40717/* end confdefs.h.  */
40718#include <stdlib.h>
40719
40720_ACEOF
40721if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40722  $EGREP "free" >/dev/null 2>&1; then :
40723
40724else
40725  ac_cv_header_stdc=no
40726fi
40727rm -f conftest*
40728
40729fi
40730
40731if test $ac_cv_header_stdc = yes; then
40732  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
40733  if test "$cross_compiling" = yes; then :
40734  :
40735else
40736  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40737/* end confdefs.h.  */
40738#include <ctype.h>
40739#include <stdlib.h>
40740#if ((' ' & 0x0FF) == 0x020)
40741# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
40742# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
40743#else
40744# define ISLOWER(c) \
40745		   (('a' <= (c) && (c) <= 'i') \
40746		     || ('j' <= (c) && (c) <= 'r') \
40747		     || ('s' <= (c) && (c) <= 'z'))
40748# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
40749#endif
40750
40751#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
40752int
40753main ()
40754{
40755  int i;
40756  for (i = 0; i < 256; i++)
40757    if (XOR (islower (i), ISLOWER (i))
40758	|| toupper (i) != TOUPPER (i))
40759      return 2;
40760  return 0;
40761}
40762_ACEOF
40763if ac_fn_cxx_try_run "$LINENO"; then :
40764
40765else
40766  ac_cv_header_stdc=no
40767fi
40768rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40769  conftest.$ac_objext conftest.beam conftest.$ac_ext
40770fi
40771
40772fi
40773fi
40774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
40775$as_echo "$ac_cv_header_stdc" >&6; }
40776if test $ac_cv_header_stdc = yes; then
40777
40778$as_echo "#define STDC_HEADERS 1" >>confdefs.h
40779
40780fi
40781
40782# On IRIX 5.3, sys/types and inttypes.h are conflicting.
40783for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
40784		  inttypes.h stdint.h unistd.h
40785do :
40786  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
40787ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
40788"
40789if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
40790  cat >>confdefs.h <<_ACEOF
40791#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
40792_ACEOF
40793
40794fi
40795
40796done
40797
40798
40799
40800  ###############################################################################
40801  #
40802  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
40803  # (The JVM can use 32 or 64 bit Java pointers but that decision
40804  # is made at runtime.)
40805  #
40806
40807  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
40808    # Always specify -m flag on Solaris
40809    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
40810
40811  # When we add flags to the "official" CFLAGS etc, we need to
40812  # keep track of these additions in ADDED_CFLAGS etc. These
40813  # will later be checked to make sure only controlled additions
40814  # have been made to CFLAGS etc.
40815  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40816  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40817  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40818
40819  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40820  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40821  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40822
40823  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40824  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40825  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40826
40827  elif test "x$COMPILE_TYPE" = xreduced; then
40828    if test "x$OPENJDK_TARGET_OS" != xwindows; then
40829      # Specify -m if running reduced on other Posix platforms
40830
40831  # When we add flags to the "official" CFLAGS etc, we need to
40832  # keep track of these additions in ADDED_CFLAGS etc. These
40833  # will later be checked to make sure only controlled additions
40834  # have been made to CFLAGS etc.
40835  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40836  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40837  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40838
40839  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40840  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40841  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40842
40843  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40844  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40845  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40846
40847    fi
40848  fi
40849
40850  # Make compilation sanity check
40851  for ac_header in stdio.h
40852do :
40853  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
40854if test "x$ac_cv_header_stdio_h" = xyes; then :
40855  cat >>confdefs.h <<_ACEOF
40856#define HAVE_STDIO_H 1
40857_ACEOF
40858
40859else
40860
40861    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
40862$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
40863    if test "x$COMPILE_TYPE" = xreduced; then
40864      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
40865$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
40866    elif test "x$COMPILE_TYPE" = xcross; then
40867      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
40868$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
40869    fi
40870    as_fn_error $? "Cannot continue." "$LINENO" 5
40871
40872fi
40873
40874done
40875
40876
40877  # The cast to long int works around a bug in the HP C Compiler
40878# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40879# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40880# This bug is HP SR number 8606223364.
40881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
40882$as_echo_n "checking size of int *... " >&6; }
40883if ${ac_cv_sizeof_int_p+:} false; then :
40884  $as_echo_n "(cached) " >&6
40885else
40886  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
40887
40888else
40889  if test "$ac_cv_type_int_p" = yes; then
40890     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
40891$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
40892as_fn_error 77 "cannot compute sizeof (int *)
40893See \`config.log' for more details" "$LINENO" 5; }
40894   else
40895     ac_cv_sizeof_int_p=0
40896   fi
40897fi
40898
40899fi
40900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
40901$as_echo "$ac_cv_sizeof_int_p" >&6; }
40902
40903
40904
40905cat >>confdefs.h <<_ACEOF
40906#define SIZEOF_INT_P $ac_cv_sizeof_int_p
40907_ACEOF
40908
40909
40910
40911  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
40912  if test "x$ac_cv_sizeof_int_p" = x; then
40913    # The test failed, lets stick to the assumed value.
40914    { $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
40915$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
40916  else
40917    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
40918
40919    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
40920      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
40921      # Let's try to implicitely set the compilers target architecture and retry the test
40922      { $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
40923$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;}
40924      { $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
40925$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;}
40926
40927  # When we add flags to the "official" CFLAGS etc, we need to
40928  # keep track of these additions in ADDED_CFLAGS etc. These
40929  # will later be checked to make sure only controlled additions
40930  # have been made to CFLAGS etc.
40931  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40932  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40933  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40934
40935  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40936  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40937  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40938
40939  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40940  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40941  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40942
40943
40944      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
40945      unset ac_cv_sizeof_int_p
40946      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
40947      cat >>confdefs.h <<_ACEOF
40948#undef SIZEOF_INT_P
40949_ACEOF
40950
40951      # The cast to long int works around a bug in the HP C Compiler
40952# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40953# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40954# This bug is HP SR number 8606223364.
40955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
40956$as_echo_n "checking size of int *... " >&6; }
40957if ${ac_cv_sizeof_int_p+:} false; then :
40958  $as_echo_n "(cached) " >&6
40959else
40960  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
40961
40962else
40963  if test "$ac_cv_type_int_p" = yes; then
40964     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
40965$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
40966as_fn_error 77 "cannot compute sizeof (int *)
40967See \`config.log' for more details" "$LINENO" 5; }
40968   else
40969     ac_cv_sizeof_int_p=0
40970   fi
40971fi
40972
40973fi
40974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
40975$as_echo "$ac_cv_sizeof_int_p" >&6; }
40976
40977
40978
40979cat >>confdefs.h <<_ACEOF
40980#define SIZEOF_INT_P $ac_cv_sizeof_int_p
40981_ACEOF
40982
40983
40984
40985      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
40986
40987      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
40988        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
40989      fi
40990    fi
40991  fi
40992
40993  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
40994$as_echo_n "checking for target address size... " >&6; }
40995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
40996$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
40997
40998
40999  ###############################################################################
41000  #
41001  # Is the target little of big endian?
41002  #
41003   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41004$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41005if ${ac_cv_c_bigendian+:} false; then :
41006  $as_echo_n "(cached) " >&6
41007else
41008  ac_cv_c_bigendian=unknown
41009    # See if we're dealing with a universal compiler.
41010    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41011/* end confdefs.h.  */
41012#ifndef __APPLE_CC__
41013	       not a universal capable compiler
41014	     #endif
41015	     typedef int dummy;
41016
41017_ACEOF
41018if ac_fn_cxx_try_compile "$LINENO"; then :
41019
41020	# Check for potential -arch flags.  It is not universal unless
41021	# there are at least two -arch flags with different values.
41022	ac_arch=
41023	ac_prev=
41024	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41025	 if test -n "$ac_prev"; then
41026	   case $ac_word in
41027	     i?86 | x86_64 | ppc | ppc64)
41028	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41029		 ac_arch=$ac_word
41030	       else
41031		 ac_cv_c_bigendian=universal
41032		 break
41033	       fi
41034	       ;;
41035	   esac
41036	   ac_prev=
41037	 elif test "x$ac_word" = "x-arch"; then
41038	   ac_prev=arch
41039	 fi
41040       done
41041fi
41042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41043    if test $ac_cv_c_bigendian = unknown; then
41044      # See if sys/param.h defines the BYTE_ORDER macro.
41045      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41046/* end confdefs.h.  */
41047#include <sys/types.h>
41048	     #include <sys/param.h>
41049
41050int
41051main ()
41052{
41053#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41054		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41055		     && LITTLE_ENDIAN)
41056	      bogus endian macros
41057	     #endif
41058
41059  ;
41060  return 0;
41061}
41062_ACEOF
41063if ac_fn_cxx_try_compile "$LINENO"; then :
41064  # It does; now see whether it defined to BIG_ENDIAN or not.
41065	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41066/* end confdefs.h.  */
41067#include <sys/types.h>
41068		#include <sys/param.h>
41069
41070int
41071main ()
41072{
41073#if BYTE_ORDER != BIG_ENDIAN
41074		 not big endian
41075		#endif
41076
41077  ;
41078  return 0;
41079}
41080_ACEOF
41081if ac_fn_cxx_try_compile "$LINENO"; then :
41082  ac_cv_c_bigendian=yes
41083else
41084  ac_cv_c_bigendian=no
41085fi
41086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41087fi
41088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41089    fi
41090    if test $ac_cv_c_bigendian = unknown; then
41091      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41092      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41093/* end confdefs.h.  */
41094#include <limits.h>
41095
41096int
41097main ()
41098{
41099#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41100	      bogus endian macros
41101	     #endif
41102
41103  ;
41104  return 0;
41105}
41106_ACEOF
41107if ac_fn_cxx_try_compile "$LINENO"; then :
41108  # It does; now see whether it defined to _BIG_ENDIAN or not.
41109	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41110/* end confdefs.h.  */
41111#include <limits.h>
41112
41113int
41114main ()
41115{
41116#ifndef _BIG_ENDIAN
41117		 not big endian
41118		#endif
41119
41120  ;
41121  return 0;
41122}
41123_ACEOF
41124if ac_fn_cxx_try_compile "$LINENO"; then :
41125  ac_cv_c_bigendian=yes
41126else
41127  ac_cv_c_bigendian=no
41128fi
41129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41130fi
41131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41132    fi
41133    if test $ac_cv_c_bigendian = unknown; then
41134      # Compile a test program.
41135      if test "$cross_compiling" = yes; then :
41136  # Try to guess by grepping values from an object file.
41137	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41138/* end confdefs.h.  */
41139short int ascii_mm[] =
41140		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41141		short int ascii_ii[] =
41142		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41143		int use_ascii (int i) {
41144		  return ascii_mm[i] + ascii_ii[i];
41145		}
41146		short int ebcdic_ii[] =
41147		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41148		short int ebcdic_mm[] =
41149		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41150		int use_ebcdic (int i) {
41151		  return ebcdic_mm[i] + ebcdic_ii[i];
41152		}
41153		extern int foo;
41154
41155int
41156main ()
41157{
41158return use_ascii (foo) == use_ebcdic (foo);
41159  ;
41160  return 0;
41161}
41162_ACEOF
41163if ac_fn_cxx_try_compile "$LINENO"; then :
41164  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41165	      ac_cv_c_bigendian=yes
41166	    fi
41167	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41168	      if test "$ac_cv_c_bigendian" = unknown; then
41169		ac_cv_c_bigendian=no
41170	      else
41171		# finding both strings is unlikely to happen, but who knows?
41172		ac_cv_c_bigendian=unknown
41173	      fi
41174	    fi
41175fi
41176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41177else
41178  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41179/* end confdefs.h.  */
41180$ac_includes_default
41181int
41182main ()
41183{
41184
41185	     /* Are we little or big endian?  From Harbison&Steele.  */
41186	     union
41187	     {
41188	       long int l;
41189	       char c[sizeof (long int)];
41190	     } u;
41191	     u.l = 1;
41192	     return u.c[sizeof (long int) - 1] == 1;
41193
41194  ;
41195  return 0;
41196}
41197_ACEOF
41198if ac_fn_cxx_try_run "$LINENO"; then :
41199  ac_cv_c_bigendian=no
41200else
41201  ac_cv_c_bigendian=yes
41202fi
41203rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41204  conftest.$ac_objext conftest.beam conftest.$ac_ext
41205fi
41206
41207    fi
41208fi
41209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41210$as_echo "$ac_cv_c_bigendian" >&6; }
41211 case $ac_cv_c_bigendian in #(
41212   yes)
41213     ENDIAN="big";; #(
41214   no)
41215     ENDIAN="little" ;; #(
41216   universal)
41217     ENDIAN="universal_endianness"
41218     ;; #(
41219   *)
41220     ENDIAN="unknown" ;;
41221 esac
41222
41223
41224  if test "x$ENDIAN" = xuniversal_endianness; then
41225    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41226  fi
41227  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41228    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
41229  fi
41230
41231
41232# Configure flags for the tools
41233
41234  ###############################################################################
41235  #
41236  # How to compile shared libraries.
41237  #
41238
41239  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41240    PICFLAG="-fPIC"
41241    C_FLAG_REORDER=''
41242    CXX_FLAG_REORDER=''
41243
41244    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41245      # Linking is different on MacOSX
41246      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41247      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41248      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41249      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41250      SET_SHARED_LIBRARY_MAPFILE=''
41251    else
41252      # Default works for linux, might work on other platforms as well.
41253      SHARED_LIBRARY_FLAGS='-shared'
41254      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41255      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41256      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41257      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41258    fi
41259  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41260    PICFLAG=''
41261    C_FLAG_REORDER=''
41262    CXX_FLAG_REORDER=''
41263
41264    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41265      # Linking is different on MacOSX
41266      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41267      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41268      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41269      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41270      SET_SHARED_LIBRARY_MAPFILE=''
41271    else
41272      # Default works for linux, might work on other platforms as well.
41273      SHARED_LIBRARY_FLAGS='-shared'
41274      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41275      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41276      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41277      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41278    fi
41279  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41280    PICFLAG="-KPIC"
41281    C_FLAG_REORDER='-xF'
41282    CXX_FLAG_REORDER='-xF'
41283    SHARED_LIBRARY_FLAGS="-G"
41284    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41285    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41286    SET_SHARED_LIBRARY_NAME=''
41287    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41288  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41289    PICFLAG="-qpic=large"
41290    C_FLAG_REORDER=''
41291    CXX_FLAG_REORDER=''
41292    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41293    SET_EXECUTABLE_ORIGIN=""
41294    SET_SHARED_LIBRARY_ORIGIN=''
41295    SET_SHARED_LIBRARY_NAME=''
41296    SET_SHARED_LIBRARY_MAPFILE=''
41297  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41298    PICFLAG=""
41299    C_FLAG_REORDER=''
41300    CXX_FLAG_REORDER=''
41301    SHARED_LIBRARY_FLAGS="-LD"
41302    SET_EXECUTABLE_ORIGIN=''
41303    SET_SHARED_LIBRARY_ORIGIN=''
41304    SET_SHARED_LIBRARY_NAME=''
41305    SET_SHARED_LIBRARY_MAPFILE=''
41306  fi
41307
41308
41309
41310
41311
41312
41313
41314
41315
41316  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41317    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41318    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41319    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41320  fi
41321  # The (cross) compiler is now configured, we can now test capabilities
41322  # of the target platform.
41323
41324
41325
41326  ###############################################################################
41327  #
41328  # Setup the opt flags for different compilers
41329  # and different operating systems.
41330  #
41331
41332  # FIXME: this was indirectly the old default, but just inherited.
41333  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41334  #   C_FLAG_DEPS="-MMD -MF"
41335  # fi
41336
41337  # Generate make dependency files
41338  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41339    C_FLAG_DEPS="-MMD -MF"
41340  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41341    C_FLAG_DEPS="-MMD -MF"
41342  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41343    C_FLAG_DEPS="-xMMD -xMF"
41344  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41345    C_FLAG_DEPS="-qmakedep=gcc -MF"
41346  fi
41347  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41348
41349
41350
41351  # Debug symbols
41352  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41353    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41354      CFLAGS_DEBUG_SYMBOLS="-g1"
41355      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41356    else
41357      CFLAGS_DEBUG_SYMBOLS="-g"
41358      CXXFLAGS_DEBUG_SYMBOLS="-g"
41359    fi
41360  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41361    CFLAGS_DEBUG_SYMBOLS="-g"
41362    CXXFLAGS_DEBUG_SYMBOLS="-g"
41363  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41364    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41365    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41366  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41367    CFLAGS_DEBUG_SYMBOLS="-g"
41368    CXXFLAGS_DEBUG_SYMBOLS="-g"
41369  fi
41370
41371
41372
41373  # Optimization levels
41374  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41375    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41376
41377    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41378      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41379      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
41380      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41381      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41382      C_O_FLAG_NONE="-xregs=no%frameptr"
41383      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41384      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41385      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41386      CXX_O_FLAG_NONE="-xregs=no%frameptr"
41387      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41388        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41389        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41390      fi
41391    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41392      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
41393      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41394      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41395      C_O_FLAG_NONE=""
41396      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41397      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41398      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41399      CXX_O_FLAG_NONE=""
41400    fi
41401  else
41402    # The remaining toolchains share opt flags between CC and CXX;
41403    # setup for C and duplicate afterwards.
41404    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41405      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41406        # On MacOSX we optimize for size, something
41407        # we should do for all platforms?
41408        C_O_FLAG_HIGHEST="-Os"
41409        C_O_FLAG_HI="-Os"
41410        C_O_FLAG_NORM="-Os"
41411        C_O_FLAG_NONE=""
41412      else
41413        C_O_FLAG_HIGHEST="-O3"
41414        C_O_FLAG_HI="-O3"
41415        C_O_FLAG_NORM="-O2"
41416        C_O_FLAG_NONE="-O0"
41417      fi
41418    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41419      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41420        # On MacOSX we optimize for size, something
41421        # we should do for all platforms?
41422        C_O_FLAG_HIGHEST="-Os"
41423        C_O_FLAG_HI="-Os"
41424        C_O_FLAG_NORM="-Os"
41425        C_O_FLAG_NONE=""
41426      else
41427        C_O_FLAG_HIGHEST="-O3"
41428        C_O_FLAG_HI="-O3"
41429        C_O_FLAG_NORM="-O2"
41430        C_O_FLAG_NONE="-O0"
41431      fi
41432    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41433      C_O_FLAG_HIGHEST="-O3"
41434      C_O_FLAG_HI="-O3 -qstrict"
41435      C_O_FLAG_NORM="-O2"
41436      C_O_FLAG_NONE=""
41437    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41438      C_O_FLAG_HIGHEST="-O2"
41439      C_O_FLAG_HI="-O1"
41440      C_O_FLAG_NORM="-O1"
41441      C_O_FLAG_NONE="-Od"
41442    fi
41443    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41444    CXX_O_FLAG_HI="$C_O_FLAG_HI"
41445    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41446    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41447  fi
41448
41449
41450
41451
41452
41453
41454
41455
41456
41457
41458
41459  # Special extras...
41460  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41461    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41462      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41463      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41464    fi
41465  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41466    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
41467    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41468    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41469  fi
41470
41471  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41472    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41473$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41474  fi
41475
41476  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41477    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41478$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41479  fi
41480
41481  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41482    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41483$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41484  fi
41485
41486
41487# Check whether --with-extra-cflags was given.
41488if test "${with_extra_cflags+set}" = set; then :
41489  withval=$with_extra_cflags;
41490fi
41491
41492
41493
41494# Check whether --with-extra-cxxflags was given.
41495if test "${with_extra_cxxflags+set}" = set; then :
41496  withval=$with_extra_cxxflags;
41497fi
41498
41499
41500
41501# Check whether --with-extra-ldflags was given.
41502if test "${with_extra_ldflags+set}" = set; then :
41503  withval=$with_extra_ldflags;
41504fi
41505
41506
41507  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
41508  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
41509  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
41510
41511  # Hotspot needs these set in their legacy form
41512  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
41513  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
41514  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
41515
41516
41517
41518
41519
41520  ###############################################################################
41521  #
41522  # Now setup the CFLAGS and LDFLAGS for the JDK build.
41523  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
41524  #
41525
41526  # Setup compiler/platform specific flags to CFLAGS_JDK,
41527  # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
41528  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41529    # these options are used for both C and C++ compiles
41530    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
41531        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
41532    case $OPENJDK_TARGET_CPU_ARCH in
41533      arm )
41534        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41535        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41536        ;;
41537      ppc )
41538        # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
41539        ;;
41540      * )
41541        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
41542        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41543        ;;
41544    esac
41545  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41546    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
41547    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
41548      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
41549      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
41550    fi
41551
41552    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
41553    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
41554  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41555    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41556    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41557  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41558    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
41559    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
41560    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
41561    -DWIN32 -DIAL"
41562    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
41563      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
41564    else
41565      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
41566    fi
41567  fi
41568
41569  ###############################################################################
41570
41571  # Adjust flags according to debug level.
41572  case $DEBUG_LEVEL in
41573    fastdebug )
41574      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41575      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41576      C_O_FLAG_HI="$C_O_FLAG_NORM"
41577      C_O_FLAG_NORM="$C_O_FLAG_NORM"
41578      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41579      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
41580      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41581      ;;
41582    slowdebug )
41583      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41584      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41585      C_O_FLAG_HI="$C_O_FLAG_NONE"
41586      C_O_FLAG_NORM="$C_O_FLAG_NONE"
41587      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
41588      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
41589      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41590      ;;
41591  esac
41592
41593  # Setup LP64
41594  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
41595
41596  # Set some common defines. These works for all compilers, but assume
41597  # -D is universally accepted.
41598
41599  # Setup endianness
41600  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
41601    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
41602    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
41603    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
41604    #   Note: -Dmacro         is the same as    #define macro 1
41605    #         -Dmacro=        is the same as    #define macro
41606    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41607      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
41608    else
41609      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
41610    fi
41611  else
41612    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
41613  fi
41614
41615  # Setup target OS define. Use OS target name but in upper case.
41616  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
41617  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
41618
41619  # Setup target CPU
41620  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
41621
41622  # Setup debug/release defines
41623  if test "x$DEBUG_LEVEL" = xrelease; then
41624    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
41625    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41626      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
41627    fi
41628  else
41629    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
41630  fi
41631
41632  # Setup release name
41633  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
41634
41635
41636  # Set some additional per-OS defines.
41637  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41638    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
41639  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41640    # FIXME: PPC64 should not be here.
41641    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DPPC64"
41642  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
41643    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
41644  fi
41645
41646  # Additional macosx handling
41647  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41648    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41649      # FIXME: This needs to be exported in spec.gmk due to closed legacy code.
41650      # FIXME: clean this up, and/or move it elsewhere.
41651
41652      # Setting these parameters makes it an error to link to macosx APIs that are
41653      # newer than the given OS version and makes the linked binaries compatible
41654      # even if built on a newer version of the OS.
41655      # The expected format is X.Y.Z
41656      MACOSX_VERSION_MIN=10.7.0
41657
41658
41659      # The macro takes the version with no dots, ex: 1070
41660      # Let the flags variables get resolved in make for easier override on make
41661      # command line.
41662      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41663      LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41664    fi
41665  fi
41666
41667  # Setup some hard coded includes
41668  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
41669      -I${JDK_OUTPUTDIR}/include \
41670      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
41671      -I${JDK_TOPDIR}/src/share/javavm/export \
41672      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
41673      -I${JDK_TOPDIR}/src/share/native/common \
41674      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
41675
41676  # The shared libraries are compiled using the picflag.
41677  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
41678  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
41679
41680  # Executable flags
41681  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
41682  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
41683
41684
41685
41686
41687
41688
41689  # Setup LDFLAGS et al.
41690  #
41691  # Now this is odd. The JDK native libraries have to link against libjvm.so
41692  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
41693  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
41694  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
41695  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
41696  # libraries will link to whatever is in memory. Yuck.
41697  #
41698  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
41699  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41700    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
41701    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41702      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
41703    fi
41704    # TODO: make -debug optional "--disable-full-debug-symbols"
41705    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
41706    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
41707    LDFLAGS_JDKLIB_SUFFIX=""
41708    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
41709      LDFLAGS_STACK_SIZE=1048576
41710    else
41711      LDFLAGS_STACK_SIZE=327680
41712    fi
41713    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
41714  else
41715    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41716      # If this is a --hash-style=gnu system, use --hash-style=both, why?
41717      # We have previously set HAS_GNU_HASH if this is the case
41718      if test -n "$HAS_GNU_HASH"; then
41719        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
41720      fi
41721      if test "x$OPENJDK_TARGET_OS" = xlinux; then
41722        # And since we now know that the linker is gnu, then add -z defs, to forbid
41723        # undefined symbols in object files.
41724        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
41725        if test "x$DEBUG_LEVEL" = "xrelease"; then
41726          # When building release libraries, tell the linker optimize them.
41727          # Should this be supplied to the OSS linker as well?
41728          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
41729        fi
41730      fi
41731    fi
41732
41733    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41734      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
41735      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
41736    fi
41737
41738    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
41739        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
41740
41741    # On some platforms (mac) the linker warns about non existing -L dirs.
41742    # Add server first if available. Linking aginst client does not always produce the same results.
41743    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
41744    # Default to server for other variants.
41745    if test "x$JVM_VARIANT_SERVER" = xtrue; then
41746      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41747    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
41748      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
41749    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
41750      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
41751    else
41752      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41753    fi
41754
41755    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
41756    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41757      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
41758    fi
41759
41760    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
41761    if test "x$OPENJDK_TARGET_OS" = xlinux; then
41762      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
41763    fi
41764  fi
41765
41766
41767
41768
41769
41770
41771
41772
41773  # Some Zero and Shark settings.
41774  # ZERO_ARCHFLAG tells the compiler which mode to build for
41775  case "${OPENJDK_TARGET_CPU}" in
41776    s390)
41777      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
41778      ;;
41779    *)
41780      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41781  esac
41782
41783  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
41784$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
41785  supports=yes
41786
41787  saved_cflags="$CFLAGS"
41788  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
41789  ac_ext=c
41790ac_cpp='$CPP $CPPFLAGS'
41791ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41792ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41793ac_compiler_gnu=$ac_cv_c_compiler_gnu
41794
41795  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41796/* end confdefs.h.  */
41797int i;
41798_ACEOF
41799if ac_fn_c_try_compile "$LINENO"; then :
41800
41801else
41802  supports=no
41803fi
41804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41805  ac_ext=cpp
41806ac_cpp='$CXXCPP $CPPFLAGS'
41807ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41808ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41809ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41810
41811  CFLAGS="$saved_cflags"
41812
41813  saved_cxxflags="$CXXFLAGS"
41814  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
41815  ac_ext=cpp
41816ac_cpp='$CXXCPP $CPPFLAGS'
41817ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41818ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41819ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41820
41821  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41822/* end confdefs.h.  */
41823int i;
41824_ACEOF
41825if ac_fn_cxx_try_compile "$LINENO"; then :
41826
41827else
41828  supports=no
41829fi
41830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41831  ac_ext=cpp
41832ac_cpp='$CXXCPP $CPPFLAGS'
41833ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41834ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41835ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41836
41837  CXXFLAGS="$saved_cxxflags"
41838
41839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41840$as_echo "$supports" >&6; }
41841  if test "x$supports" = "xyes" ; then
41842    :
41843  else
41844    ZERO_ARCHFLAG=""
41845  fi
41846
41847
41848
41849  # Check that the compiler supports -mX (or -qX on AIX) flags
41850  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
41851
41852  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
41853$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
41854  supports=yes
41855
41856  saved_cflags="$CFLAGS"
41857  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41858  ac_ext=c
41859ac_cpp='$CPP $CPPFLAGS'
41860ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41861ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41862ac_compiler_gnu=$ac_cv_c_compiler_gnu
41863
41864  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41865/* end confdefs.h.  */
41866int i;
41867_ACEOF
41868if ac_fn_c_try_compile "$LINENO"; then :
41869
41870else
41871  supports=no
41872fi
41873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41874  ac_ext=cpp
41875ac_cpp='$CXXCPP $CPPFLAGS'
41876ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41877ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41878ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41879
41880  CFLAGS="$saved_cflags"
41881
41882  saved_cxxflags="$CXXFLAGS"
41883  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41884  ac_ext=cpp
41885ac_cpp='$CXXCPP $CPPFLAGS'
41886ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41887ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41888ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41889
41890  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41891/* end confdefs.h.  */
41892int i;
41893_ACEOF
41894if ac_fn_cxx_try_compile "$LINENO"; then :
41895
41896else
41897  supports=no
41898fi
41899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41900  ac_ext=cpp
41901ac_cpp='$CXXCPP $CPPFLAGS'
41902ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41903ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41904ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41905
41906  CXXFLAGS="$saved_cxxflags"
41907
41908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41909$as_echo "$supports" >&6; }
41910  if test "x$supports" = "xyes" ; then
41911    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
41912  else
41913    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
41914  fi
41915
41916
41917
41918
41919# Setup debug symbols (need objcopy from the toolchain for that)
41920
41921  #
41922  # ENABLE_DEBUG_SYMBOLS
41923  # This must be done after the toolchain is setup, since we're looking at objcopy.
41924  #
41925  # Check whether --enable-debug-symbols was given.
41926if test "${enable_debug_symbols+set}" = set; then :
41927  enableval=$enable_debug_symbols;
41928fi
41929
41930
41931  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
41932$as_echo_n "checking if we should generate debug symbols... " >&6; }
41933
41934  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
41935    # explicit enabling of enable-debug-symbols and can't find objcopy
41936    #   this is an error
41937    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
41938  fi
41939
41940  if test "x$enable_debug_symbols" = "xyes"; then
41941    ENABLE_DEBUG_SYMBOLS=true
41942  elif test "x$enable_debug_symbols" = "xno"; then
41943    ENABLE_DEBUG_SYMBOLS=false
41944  else
41945    # Default is on if objcopy is found
41946    if test "x$OBJCOPY" != x; then
41947      ENABLE_DEBUG_SYMBOLS=true
41948    # MacOS X and Windows don't use objcopy but default is on for those OSes
41949    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
41950      ENABLE_DEBUG_SYMBOLS=true
41951    else
41952      ENABLE_DEBUG_SYMBOLS=false
41953    fi
41954  fi
41955
41956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
41957$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
41958
41959  #
41960  # ZIP_DEBUGINFO_FILES
41961  #
41962  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
41963$as_echo_n "checking if we should zip debug-info files... " >&6; }
41964  # Check whether --enable-zip-debug-info was given.
41965if test "${enable_zip_debug_info+set}" = set; then :
41966  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
41967else
41968  enable_zip_debug_info="yes"
41969fi
41970
41971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
41972$as_echo "${enable_zip_debug_info}" >&6; }
41973
41974  if test "x${enable_zip_debug_info}" = "xno"; then
41975    ZIP_DEBUGINFO_FILES=false
41976  else
41977    ZIP_DEBUGINFO_FILES=true
41978  fi
41979
41980
41981
41982
41983
41984###############################################################################
41985#
41986# Check dependencies for external and internal libraries.
41987#
41988###############################################################################
41989
41990# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
41991
41992  # When using cygwin or msys, we need a wrapper binary that renames
41993  # /cygdrive/c/ arguments into c:/ arguments and peeks into
41994  # @files and rewrites these too! This wrapper binary is
41995  # called fixpath.
41996  FIXPATH=
41997  if test "x$OPENJDK_BUILD_OS" = xwindows; then
41998    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
41999$as_echo_n "checking if fixpath can be created... " >&6; }
42000    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42001    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42002    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42003      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42004      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42005      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42006      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42007    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42008      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42009      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42010
42011      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42012      # @ was chosen as separator to minimize risk of other tools messing around with it
42013      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42014      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42015
42016      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42017    fi
42018    rm -f $OUTPUT_ROOT/fixpath*
42019    cd $OUTPUT_ROOT
42020    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42021    cd $CURDIR
42022
42023    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42024      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42025$as_echo "no" >&6; }
42026      cat $OUTPUT_ROOT/fixpath1.log
42027      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42028    fi
42029    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42030$as_echo "yes" >&6; }
42031    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42032$as_echo_n "checking if fixpath.exe works... " >&6; }
42033    cd $OUTPUT_ROOT
42034    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42035    cd $CURDIR
42036    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42037      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42038$as_echo "no" >&6; }
42039      cat $OUTPUT_ROOT/fixpath2.log
42040      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42041    fi
42042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42043$as_echo "yes" >&6; }
42044    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42045  fi
42046
42047
42048
42049
42050
42051
42052  ###############################################################################
42053  #
42054  # OS specific settings that we never will need to probe.
42055  #
42056  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42057    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42058$as_echo_n "checking what is not needed on Linux?... " >&6; }
42059    PULSE_NOT_NEEDED=yes
42060    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42061$as_echo "pulse" >&6; }
42062  fi
42063
42064  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42065    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42066$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42067    ALSA_NOT_NEEDED=yes
42068    PULSE_NOT_NEEDED=yes
42069    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42070$as_echo "alsa pulse" >&6; }
42071  fi
42072
42073  if test "x$OPENJDK_TARGET_OS" = xaix; then
42074    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42075$as_echo_n "checking what is not needed on AIX?... " >&6; }
42076    ALSA_NOT_NEEDED=yes
42077    PULSE_NOT_NEEDED=yes
42078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42079$as_echo "alsa pulse" >&6; }
42080  fi
42081
42082
42083  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42084    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42085$as_echo_n "checking what is not needed on Windows?... " >&6; }
42086    CUPS_NOT_NEEDED=yes
42087    ALSA_NOT_NEEDED=yes
42088    PULSE_NOT_NEEDED=yes
42089    X11_NOT_NEEDED=yes
42090    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42091$as_echo "alsa cups pulse x11" >&6; }
42092  fi
42093
42094  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42095    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42096$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42097    ALSA_NOT_NEEDED=yes
42098    PULSE_NOT_NEEDED=yes
42099    X11_NOT_NEEDED=yes
42100    # If the java runtime framework is disabled, then we need X11.
42101    # This will be adjusted below.
42102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42103$as_echo "alsa pulse x11" >&6; }
42104  fi
42105
42106  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42107    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42108$as_echo_n "checking what is not needed on bsd?... " >&6; }
42109    ALSA_NOT_NEEDED=yes
42110    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42111$as_echo "alsa" >&6; }
42112  fi
42113
42114  if test "x$OPENJDK" = "xfalse"; then
42115    FREETYPE_NOT_NEEDED=yes
42116  fi
42117
42118  if test "x$SUPPORT_HEADFUL" = xno; then
42119    X11_NOT_NEEDED=yes
42120  fi
42121
42122  ###############################################################################
42123  #
42124  # Check for MacOSX support for OpenJDK.
42125  #
42126
42127
42128  # Check whether --enable-macosx-runtime-support was given.
42129if test "${enable_macosx_runtime_support+set}" = set; then :
42130  enableval=$enable_macosx_runtime_support;
42131fi
42132
42133  if test "x$enable_macosx_runtime_support" != x; then
42134    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
42135$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
42136  fi
42137
42138
42139  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
42140$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
42141  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
42142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
42143$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
42144  else
42145    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42146$as_echo "no" >&6; }
42147  fi
42148
42149
42150
42151  ###############################################################################
42152  #
42153  # Check for X Windows
42154  #
42155
42156  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42157  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42158  # --x-libraries for the sysroot, if that seems to be correct.
42159  if test "x$SYS_ROOT" != "x/"; then
42160    if test "x$x_includes" = xNONE; then
42161      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
42162        x_includes="$SYS_ROOT/usr/X11R6/include"
42163      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
42164        x_includes="$SYS_ROOT/usr/include"
42165      fi
42166    fi
42167    if test "x$x_libraries" = xNONE; then
42168      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
42169        x_libraries="$SYS_ROOT/usr/X11R6/lib"
42170      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42171        x_libraries="$SYS_ROOT/usr/lib64"
42172      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
42173        x_libraries="$SYS_ROOT/usr/lib"
42174      fi
42175    fi
42176  fi
42177
42178  # Now let autoconf do it's magic
42179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42180$as_echo_n "checking for X... " >&6; }
42181
42182
42183# Check whether --with-x was given.
42184if test "${with_x+set}" = set; then :
42185  withval=$with_x;
42186fi
42187
42188# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42189if test "x$with_x" = xno; then
42190  # The user explicitly disabled X.
42191  have_x=disabled
42192else
42193  case $x_includes,$x_libraries in #(
42194    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42195    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42196  $as_echo_n "(cached) " >&6
42197else
42198  # One or both of the vars are not set, and there is no cached value.
42199ac_x_includes=no ac_x_libraries=no
42200rm -f -r conftest.dir
42201if mkdir conftest.dir; then
42202  cd conftest.dir
42203  cat >Imakefile <<'_ACEOF'
42204incroot:
42205	@echo incroot='${INCROOT}'
42206usrlibdir:
42207	@echo usrlibdir='${USRLIBDIR}'
42208libdir:
42209	@echo libdir='${LIBDIR}'
42210_ACEOF
42211  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42212    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42213    for ac_var in incroot usrlibdir libdir; do
42214      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42215    done
42216    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42217    for ac_extension in a so sl dylib la dll; do
42218      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42219	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42220	ac_im_usrlibdir=$ac_im_libdir; break
42221      fi
42222    done
42223    # Screen out bogus values from the imake configuration.  They are
42224    # bogus both because they are the default anyway, and because
42225    # using them would break gcc on systems where it needs fixed includes.
42226    case $ac_im_incroot in
42227	/usr/include) ac_x_includes= ;;
42228	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42229    esac
42230    case $ac_im_usrlibdir in
42231	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
42232	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42233    esac
42234  fi
42235  cd ..
42236  rm -f -r conftest.dir
42237fi
42238
42239# Standard set of common directories for X headers.
42240# Check X11 before X11Rn because it is often a symlink to the current release.
42241ac_x_header_dirs='
42242/usr/X11/include
42243/usr/X11R7/include
42244/usr/X11R6/include
42245/usr/X11R5/include
42246/usr/X11R4/include
42247
42248/usr/include/X11
42249/usr/include/X11R7
42250/usr/include/X11R6
42251/usr/include/X11R5
42252/usr/include/X11R4
42253
42254/usr/local/X11/include
42255/usr/local/X11R7/include
42256/usr/local/X11R6/include
42257/usr/local/X11R5/include
42258/usr/local/X11R4/include
42259
42260/usr/local/include/X11
42261/usr/local/include/X11R7
42262/usr/local/include/X11R6
42263/usr/local/include/X11R5
42264/usr/local/include/X11R4
42265
42266/usr/X386/include
42267/usr/x386/include
42268/usr/XFree86/include/X11
42269
42270/usr/include
42271/usr/local/include
42272/usr/unsupported/include
42273/usr/athena/include
42274/usr/local/x11r5/include
42275/usr/lpp/Xamples/include
42276
42277/usr/openwin/include
42278/usr/openwin/share/include'
42279
42280if test "$ac_x_includes" = no; then
42281  # Guess where to find include files, by looking for Xlib.h.
42282  # First, try using that file with no special directory specified.
42283  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42284/* end confdefs.h.  */
42285#include <X11/Xlib.h>
42286_ACEOF
42287if ac_fn_cxx_try_cpp "$LINENO"; then :
42288  # We can compile using X headers with no special include directory.
42289ac_x_includes=
42290else
42291  for ac_dir in $ac_x_header_dirs; do
42292  if test -r "$ac_dir/X11/Xlib.h"; then
42293    ac_x_includes=$ac_dir
42294    break
42295  fi
42296done
42297fi
42298rm -f conftest.err conftest.i conftest.$ac_ext
42299fi # $ac_x_includes = no
42300
42301if test "$ac_x_libraries" = no; then
42302  # Check for the libraries.
42303  # See if we find them without any special options.
42304  # Don't add to $LIBS permanently.
42305  ac_save_LIBS=$LIBS
42306  LIBS="-lX11 $LIBS"
42307  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42308/* end confdefs.h.  */
42309#include <X11/Xlib.h>
42310int
42311main ()
42312{
42313XrmInitialize ()
42314  ;
42315  return 0;
42316}
42317_ACEOF
42318if ac_fn_cxx_try_link "$LINENO"; then :
42319  LIBS=$ac_save_LIBS
42320# We can link X programs with no special library path.
42321ac_x_libraries=
42322else
42323  LIBS=$ac_save_LIBS
42324for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42325do
42326  # Don't even attempt the hair of trying to link an X program!
42327  for ac_extension in a so sl dylib la dll; do
42328    if test -r "$ac_dir/libX11.$ac_extension"; then
42329      ac_x_libraries=$ac_dir
42330      break 2
42331    fi
42332  done
42333done
42334fi
42335rm -f core conftest.err conftest.$ac_objext \
42336    conftest$ac_exeext conftest.$ac_ext
42337fi # $ac_x_libraries = no
42338
42339case $ac_x_includes,$ac_x_libraries in #(
42340  no,* | *,no | *\'*)
42341    # Didn't find X, or a directory has "'" in its name.
42342    ac_cv_have_x="have_x=no";; #(
42343  *)
42344    # Record where we found X for the cache.
42345    ac_cv_have_x="have_x=yes\
42346	ac_x_includes='$ac_x_includes'\
42347	ac_x_libraries='$ac_x_libraries'"
42348esac
42349fi
42350;; #(
42351    *) have_x=yes;;
42352  esac
42353  eval "$ac_cv_have_x"
42354fi # $with_x != no
42355
42356if test "$have_x" != yes; then
42357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
42358$as_echo "$have_x" >&6; }
42359  no_x=yes
42360else
42361  # If each of the values was on the command line, it overrides each guess.
42362  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
42363  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
42364  # Update the cache value to reflect the command line values.
42365  ac_cv_have_x="have_x=yes\
42366	ac_x_includes='$x_includes'\
42367	ac_x_libraries='$x_libraries'"
42368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
42369$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
42370fi
42371
42372  if test "$no_x" = yes; then
42373  # Not all programs may use this symbol, but it does not hurt to define it.
42374
42375$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
42376
42377  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
42378else
42379  if test -n "$x_includes"; then
42380    X_CFLAGS="$X_CFLAGS -I$x_includes"
42381  fi
42382
42383  # It would also be nice to do this for all -L options, not just this one.
42384  if test -n "$x_libraries"; then
42385    X_LIBS="$X_LIBS -L$x_libraries"
42386    # For Solaris; some versions of Sun CC require a space after -R and
42387    # others require no space.  Words are not sufficient . . . .
42388    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
42389$as_echo_n "checking whether -R must be followed by a space... " >&6; }
42390    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
42391    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
42392    ac_cxx_werror_flag=yes
42393    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42394/* end confdefs.h.  */
42395
42396int
42397main ()
42398{
42399
42400  ;
42401  return 0;
42402}
42403_ACEOF
42404if ac_fn_cxx_try_link "$LINENO"; then :
42405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42406$as_echo "no" >&6; }
42407       X_LIBS="$X_LIBS -R$x_libraries"
42408else
42409  LIBS="$ac_xsave_LIBS -R $x_libraries"
42410       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42411/* end confdefs.h.  */
42412
42413int
42414main ()
42415{
42416
42417  ;
42418  return 0;
42419}
42420_ACEOF
42421if ac_fn_cxx_try_link "$LINENO"; then :
42422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42423$as_echo "yes" >&6; }
42424	  X_LIBS="$X_LIBS -R $x_libraries"
42425else
42426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
42427$as_echo "neither works" >&6; }
42428fi
42429rm -f core conftest.err conftest.$ac_objext \
42430    conftest$ac_exeext conftest.$ac_ext
42431fi
42432rm -f core conftest.err conftest.$ac_objext \
42433    conftest$ac_exeext conftest.$ac_ext
42434    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
42435    LIBS=$ac_xsave_LIBS
42436  fi
42437
42438  # Check for system-dependent libraries X programs must link with.
42439  # Do this before checking for the system-independent R6 libraries
42440  # (-lICE), since we may need -lsocket or whatever for X linking.
42441
42442  if test "$ISC" = yes; then
42443    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
42444  else
42445    # Martyn Johnson says this is needed for Ultrix, if the X
42446    # libraries were built with DECnet support.  And Karl Berry says
42447    # the Alpha needs dnet_stub (dnet does not exist).
42448    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
42449    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42450/* end confdefs.h.  */
42451
42452/* Override any GCC internal prototype to avoid an error.
42453   Use char because int might match the return type of a GCC
42454   builtin and then its argument prototype would still apply.  */
42455#ifdef __cplusplus
42456extern "C"
42457#endif
42458char XOpenDisplay ();
42459int
42460main ()
42461{
42462return XOpenDisplay ();
42463  ;
42464  return 0;
42465}
42466_ACEOF
42467if ac_fn_cxx_try_link "$LINENO"; then :
42468
42469else
42470  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
42471$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
42472if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
42473  $as_echo_n "(cached) " >&6
42474else
42475  ac_check_lib_save_LIBS=$LIBS
42476LIBS="-ldnet  $LIBS"
42477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42478/* end confdefs.h.  */
42479
42480/* Override any GCC internal prototype to avoid an error.
42481   Use char because int might match the return type of a GCC
42482   builtin and then its argument prototype would still apply.  */
42483#ifdef __cplusplus
42484extern "C"
42485#endif
42486char dnet_ntoa ();
42487int
42488main ()
42489{
42490return dnet_ntoa ();
42491  ;
42492  return 0;
42493}
42494_ACEOF
42495if ac_fn_cxx_try_link "$LINENO"; then :
42496  ac_cv_lib_dnet_dnet_ntoa=yes
42497else
42498  ac_cv_lib_dnet_dnet_ntoa=no
42499fi
42500rm -f core conftest.err conftest.$ac_objext \
42501    conftest$ac_exeext conftest.$ac_ext
42502LIBS=$ac_check_lib_save_LIBS
42503fi
42504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
42505$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
42506if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
42507  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
42508fi
42509
42510    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
42511      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
42512$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
42513if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
42514  $as_echo_n "(cached) " >&6
42515else
42516  ac_check_lib_save_LIBS=$LIBS
42517LIBS="-ldnet_stub  $LIBS"
42518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42519/* end confdefs.h.  */
42520
42521/* Override any GCC internal prototype to avoid an error.
42522   Use char because int might match the return type of a GCC
42523   builtin and then its argument prototype would still apply.  */
42524#ifdef __cplusplus
42525extern "C"
42526#endif
42527char dnet_ntoa ();
42528int
42529main ()
42530{
42531return dnet_ntoa ();
42532  ;
42533  return 0;
42534}
42535_ACEOF
42536if ac_fn_cxx_try_link "$LINENO"; then :
42537  ac_cv_lib_dnet_stub_dnet_ntoa=yes
42538else
42539  ac_cv_lib_dnet_stub_dnet_ntoa=no
42540fi
42541rm -f core conftest.err conftest.$ac_objext \
42542    conftest$ac_exeext conftest.$ac_ext
42543LIBS=$ac_check_lib_save_LIBS
42544fi
42545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
42546$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
42547if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
42548  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
42549fi
42550
42551    fi
42552fi
42553rm -f core conftest.err conftest.$ac_objext \
42554    conftest$ac_exeext conftest.$ac_ext
42555    LIBS="$ac_xsave_LIBS"
42556
42557    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
42558    # to get the SysV transport functions.
42559    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
42560    # needs -lnsl.
42561    # The nsl library prevents programs from opening the X display
42562    # on Irix 5.2, according to T.E. Dickey.
42563    # The functions gethostbyname, getservbyname, and inet_addr are
42564    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
42565    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
42566if test "x$ac_cv_func_gethostbyname" = xyes; then :
42567
42568fi
42569
42570    if test $ac_cv_func_gethostbyname = no; then
42571      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
42572$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
42573if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
42574  $as_echo_n "(cached) " >&6
42575else
42576  ac_check_lib_save_LIBS=$LIBS
42577LIBS="-lnsl  $LIBS"
42578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42579/* end confdefs.h.  */
42580
42581/* Override any GCC internal prototype to avoid an error.
42582   Use char because int might match the return type of a GCC
42583   builtin and then its argument prototype would still apply.  */
42584#ifdef __cplusplus
42585extern "C"
42586#endif
42587char gethostbyname ();
42588int
42589main ()
42590{
42591return gethostbyname ();
42592  ;
42593  return 0;
42594}
42595_ACEOF
42596if ac_fn_cxx_try_link "$LINENO"; then :
42597  ac_cv_lib_nsl_gethostbyname=yes
42598else
42599  ac_cv_lib_nsl_gethostbyname=no
42600fi
42601rm -f core conftest.err conftest.$ac_objext \
42602    conftest$ac_exeext conftest.$ac_ext
42603LIBS=$ac_check_lib_save_LIBS
42604fi
42605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
42606$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
42607if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
42608  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
42609fi
42610
42611      if test $ac_cv_lib_nsl_gethostbyname = no; then
42612	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
42613$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
42614if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
42615  $as_echo_n "(cached) " >&6
42616else
42617  ac_check_lib_save_LIBS=$LIBS
42618LIBS="-lbsd  $LIBS"
42619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42620/* end confdefs.h.  */
42621
42622/* Override any GCC internal prototype to avoid an error.
42623   Use char because int might match the return type of a GCC
42624   builtin and then its argument prototype would still apply.  */
42625#ifdef __cplusplus
42626extern "C"
42627#endif
42628char gethostbyname ();
42629int
42630main ()
42631{
42632return gethostbyname ();
42633  ;
42634  return 0;
42635}
42636_ACEOF
42637if ac_fn_cxx_try_link "$LINENO"; then :
42638  ac_cv_lib_bsd_gethostbyname=yes
42639else
42640  ac_cv_lib_bsd_gethostbyname=no
42641fi
42642rm -f core conftest.err conftest.$ac_objext \
42643    conftest$ac_exeext conftest.$ac_ext
42644LIBS=$ac_check_lib_save_LIBS
42645fi
42646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
42647$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
42648if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
42649  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
42650fi
42651
42652      fi
42653    fi
42654
42655    # lieder@skyler.mavd.honeywell.com says without -lsocket,
42656    # socket/setsockopt and other routines are undefined under SCO ODT
42657    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
42658    # on later versions), says Simon Leinen: it contains gethostby*
42659    # variants that don't use the name server (or something).  -lsocket
42660    # must be given before -lnsl if both are needed.  We assume that
42661    # if connect needs -lnsl, so does gethostbyname.
42662    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
42663if test "x$ac_cv_func_connect" = xyes; then :
42664
42665fi
42666
42667    if test $ac_cv_func_connect = no; then
42668      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
42669$as_echo_n "checking for connect in -lsocket... " >&6; }
42670if ${ac_cv_lib_socket_connect+:} false; then :
42671  $as_echo_n "(cached) " >&6
42672else
42673  ac_check_lib_save_LIBS=$LIBS
42674LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
42675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42676/* end confdefs.h.  */
42677
42678/* Override any GCC internal prototype to avoid an error.
42679   Use char because int might match the return type of a GCC
42680   builtin and then its argument prototype would still apply.  */
42681#ifdef __cplusplus
42682extern "C"
42683#endif
42684char connect ();
42685int
42686main ()
42687{
42688return connect ();
42689  ;
42690  return 0;
42691}
42692_ACEOF
42693if ac_fn_cxx_try_link "$LINENO"; then :
42694  ac_cv_lib_socket_connect=yes
42695else
42696  ac_cv_lib_socket_connect=no
42697fi
42698rm -f core conftest.err conftest.$ac_objext \
42699    conftest$ac_exeext conftest.$ac_ext
42700LIBS=$ac_check_lib_save_LIBS
42701fi
42702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
42703$as_echo "$ac_cv_lib_socket_connect" >&6; }
42704if test "x$ac_cv_lib_socket_connect" = xyes; then :
42705  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
42706fi
42707
42708    fi
42709
42710    # Guillermo Gomez says -lposix is necessary on A/UX.
42711    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
42712if test "x$ac_cv_func_remove" = xyes; then :
42713
42714fi
42715
42716    if test $ac_cv_func_remove = no; then
42717      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
42718$as_echo_n "checking for remove in -lposix... " >&6; }
42719if ${ac_cv_lib_posix_remove+:} false; then :
42720  $as_echo_n "(cached) " >&6
42721else
42722  ac_check_lib_save_LIBS=$LIBS
42723LIBS="-lposix  $LIBS"
42724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42725/* end confdefs.h.  */
42726
42727/* Override any GCC internal prototype to avoid an error.
42728   Use char because int might match the return type of a GCC
42729   builtin and then its argument prototype would still apply.  */
42730#ifdef __cplusplus
42731extern "C"
42732#endif
42733char remove ();
42734int
42735main ()
42736{
42737return remove ();
42738  ;
42739  return 0;
42740}
42741_ACEOF
42742if ac_fn_cxx_try_link "$LINENO"; then :
42743  ac_cv_lib_posix_remove=yes
42744else
42745  ac_cv_lib_posix_remove=no
42746fi
42747rm -f core conftest.err conftest.$ac_objext \
42748    conftest$ac_exeext conftest.$ac_ext
42749LIBS=$ac_check_lib_save_LIBS
42750fi
42751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
42752$as_echo "$ac_cv_lib_posix_remove" >&6; }
42753if test "x$ac_cv_lib_posix_remove" = xyes; then :
42754  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
42755fi
42756
42757    fi
42758
42759    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
42760    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
42761if test "x$ac_cv_func_shmat" = xyes; then :
42762
42763fi
42764
42765    if test $ac_cv_func_shmat = no; then
42766      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
42767$as_echo_n "checking for shmat in -lipc... " >&6; }
42768if ${ac_cv_lib_ipc_shmat+:} false; then :
42769  $as_echo_n "(cached) " >&6
42770else
42771  ac_check_lib_save_LIBS=$LIBS
42772LIBS="-lipc  $LIBS"
42773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42774/* end confdefs.h.  */
42775
42776/* Override any GCC internal prototype to avoid an error.
42777   Use char because int might match the return type of a GCC
42778   builtin and then its argument prototype would still apply.  */
42779#ifdef __cplusplus
42780extern "C"
42781#endif
42782char shmat ();
42783int
42784main ()
42785{
42786return shmat ();
42787  ;
42788  return 0;
42789}
42790_ACEOF
42791if ac_fn_cxx_try_link "$LINENO"; then :
42792  ac_cv_lib_ipc_shmat=yes
42793else
42794  ac_cv_lib_ipc_shmat=no
42795fi
42796rm -f core conftest.err conftest.$ac_objext \
42797    conftest$ac_exeext conftest.$ac_ext
42798LIBS=$ac_check_lib_save_LIBS
42799fi
42800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
42801$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
42802if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
42803  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
42804fi
42805
42806    fi
42807  fi
42808
42809  # Check for libraries that X11R6 Xt/Xaw programs need.
42810  ac_save_LDFLAGS=$LDFLAGS
42811  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
42812  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
42813  # check for ICE first), but we must link in the order -lSM -lICE or
42814  # we get undefined symbols.  So assume we have SM if we have ICE.
42815  # These have to be linked with before -lX11, unlike the other
42816  # libraries we check for below, so use a different variable.
42817  # John Interrante, Karl Berry
42818  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
42819$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
42820if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
42821  $as_echo_n "(cached) " >&6
42822else
42823  ac_check_lib_save_LIBS=$LIBS
42824LIBS="-lICE $X_EXTRA_LIBS $LIBS"
42825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42826/* end confdefs.h.  */
42827
42828/* Override any GCC internal prototype to avoid an error.
42829   Use char because int might match the return type of a GCC
42830   builtin and then its argument prototype would still apply.  */
42831#ifdef __cplusplus
42832extern "C"
42833#endif
42834char IceConnectionNumber ();
42835int
42836main ()
42837{
42838return IceConnectionNumber ();
42839  ;
42840  return 0;
42841}
42842_ACEOF
42843if ac_fn_cxx_try_link "$LINENO"; then :
42844  ac_cv_lib_ICE_IceConnectionNumber=yes
42845else
42846  ac_cv_lib_ICE_IceConnectionNumber=no
42847fi
42848rm -f core conftest.err conftest.$ac_objext \
42849    conftest$ac_exeext conftest.$ac_ext
42850LIBS=$ac_check_lib_save_LIBS
42851fi
42852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
42853$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
42854if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
42855  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
42856fi
42857
42858  LDFLAGS=$ac_save_LDFLAGS
42859
42860fi
42861
42862
42863  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
42864  # this doesn't make sense so we remove it.
42865  if test "x$COMPILE_TYPE" = xcross; then
42866    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
42867  fi
42868
42869  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
42870
42871  # Print a helpful message on how to acquire the necessary build dependency.
42872  # x11 is the help tag: freetype, cups, pulse, alsa etc
42873  MISSING_DEPENDENCY=x11
42874
42875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42876    cygwin_help $MISSING_DEPENDENCY
42877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42878    msys_help $MISSING_DEPENDENCY
42879  else
42880    PKGHANDLER_COMMAND=
42881
42882    case $PKGHANDLER in
42883      apt-get)
42884        apt_help     $MISSING_DEPENDENCY ;;
42885      yum)
42886        yum_help     $MISSING_DEPENDENCY ;;
42887      port)
42888        port_help    $MISSING_DEPENDENCY ;;
42889      pkgutil)
42890        pkgutil_help $MISSING_DEPENDENCY ;;
42891      pkgadd)
42892        pkgadd_help  $MISSING_DEPENDENCY ;;
42893    esac
42894
42895    if test "x$PKGHANDLER_COMMAND" != x; then
42896      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42897    fi
42898  fi
42899
42900    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
42901  fi
42902
42903  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42904    OPENWIN_HOME="/usr/openwin"
42905  fi
42906
42907
42908
42909  #
42910  # Weird Sol10 something check...TODO change to try compile
42911  #
42912  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
42913    if test "`uname -r`" = "5.10"; then
42914      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
42915        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
42916      fi
42917    fi
42918  fi
42919
42920  ac_ext=c
42921ac_cpp='$CPP $CPPFLAGS'
42922ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42923ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42924ac_compiler_gnu=$ac_cv_c_compiler_gnu
42925
42926  OLD_CFLAGS="$CFLAGS"
42927  CFLAGS="$CFLAGS $X_CFLAGS"
42928
42929  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
42930  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
42931do :
42932  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
42933ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
42934        # include <X11/Xlib.h>
42935        # include <X11/Xutil.h>
42936
42937
42938"
42939if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
42940  cat >>confdefs.h <<_ACEOF
42941#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
42942_ACEOF
42943 X11_A_OK=yes
42944else
42945  X11_A_OK=no; break
42946fi
42947
42948done
42949
42950
42951  CFLAGS="$OLD_CFLAGS"
42952  ac_ext=cpp
42953ac_cpp='$CXXCPP $CPPFLAGS'
42954ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42955ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42956ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42957
42958
42959  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
42960
42961  # Print a helpful message on how to acquire the necessary build dependency.
42962  # x11 is the help tag: freetype, cups, pulse, alsa etc
42963  MISSING_DEPENDENCY=x11
42964
42965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42966    cygwin_help $MISSING_DEPENDENCY
42967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42968    msys_help $MISSING_DEPENDENCY
42969  else
42970    PKGHANDLER_COMMAND=
42971
42972    case $PKGHANDLER in
42973      apt-get)
42974        apt_help     $MISSING_DEPENDENCY ;;
42975      yum)
42976        yum_help     $MISSING_DEPENDENCY ;;
42977      port)
42978        port_help    $MISSING_DEPENDENCY ;;
42979      pkgutil)
42980        pkgutil_help $MISSING_DEPENDENCY ;;
42981      pkgadd)
42982        pkgadd_help  $MISSING_DEPENDENCY ;;
42983    esac
42984
42985    if test "x$PKGHANDLER_COMMAND" != x; then
42986      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42987    fi
42988  fi
42989
42990    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
42991  fi
42992
42993
42994
42995
42996
42997
42998  ###############################################################################
42999  #
43000  # The common unix printing system cups is used to print from java.
43001  #
43002
43003# Check whether --with-cups was given.
43004if test "${with_cups+set}" = set; then :
43005  withval=$with_cups;
43006fi
43007
43008
43009# Check whether --with-cups-include was given.
43010if test "${with_cups_include+set}" = set; then :
43011  withval=$with_cups_include;
43012fi
43013
43014
43015  if test "x$CUPS_NOT_NEEDED" = xyes; then
43016    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43017      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43018$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43019    fi
43020    CUPS_CFLAGS=
43021  else
43022    CUPS_FOUND=no
43023
43024    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43025      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43026    fi
43027
43028    if test "x${with_cups}" != x; then
43029      CUPS_CFLAGS="-I${with_cups}/include"
43030      CUPS_FOUND=yes
43031    fi
43032    if test "x${with_cups_include}" != x; then
43033      CUPS_CFLAGS="-I${with_cups_include}"
43034      CUPS_FOUND=yes
43035    fi
43036    if test "x$CUPS_FOUND" = xno; then
43037
43038
43039  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43040    # Source the builddeps file again, to make sure it uses the latest variables!
43041    . $builddepsfile
43042    # Look for a target and build machine specific resource!
43043    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43044    if test "x$resource" = x; then
43045      # Ok, lets instead look for a target specific resource
43046      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43047    fi
43048    if test "x$resource" = x; then
43049      # Ok, lets instead look for a build specific resource
43050      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43051    fi
43052    if test "x$resource" = x; then
43053      # Ok, lets instead look for a generic resource
43054      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43055      resource=${builddep_cups}
43056    fi
43057    if test "x$resource" != x; then
43058      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43059$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43060      # If the resource in the builddeps.conf file is an existing directory,
43061      # for example /java/linux/cups
43062      if test -d ${resource}; then
43063        depdir=${resource}
43064      else
43065
43066  # cups is for example mymodule
43067  # $resource is for example libs/general/libmymod_1_2_3.zip
43068  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43069  # $with_builddeps_dir is for example /localhome/builddeps
43070  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43071  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43072  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43073  filename=`basename $resource`
43074  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43075  filebase=${filename%%.*}
43076  extension=${filename#*.}
43077  installdir=$with_builddeps_dir/$filebase
43078  if test ! -f $installdir/$filename.unpacked; then
43079    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43080$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43081    if test ! -d $installdir; then
43082      mkdir -p $installdir
43083    fi
43084    if test ! -d $installdir; then
43085      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43086    fi
43087    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43088    touch $tmpfile
43089    if test ! -f $tmpfile; then
43090      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43091    fi
43092
43093  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43094  # $tmpfile is the local file name for the downloaded file.
43095  VALID_TOOL=no
43096  if test "x$BDEPS_FTP" = xwget; then
43097    VALID_TOOL=yes
43098    wget -O $tmpfile $with_builddeps_server/$resource
43099  fi
43100  if test "x$BDEPS_FTP" = xlftp; then
43101    VALID_TOOL=yes
43102    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43103  fi
43104  if test "x$BDEPS_FTP" = xftp; then
43105    VALID_TOOL=yes
43106    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43107    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43108    FTPUSERPWD=${FTPSERVER%%@*}
43109    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43110      FTPUSER=${userpwd%%:*}
43111      FTPPWD=${userpwd#*@}
43112      FTPSERVER=${FTPSERVER#*@}
43113    else
43114      FTPUSER=ftp
43115      FTPPWD=ftp
43116    fi
43117    # the "pass" command does not work on some
43118    # ftp clients (read ftp.exe) but if it works,
43119    # passive mode is better!
43120    ( \
43121        echo "user $FTPUSER $FTPPWD"        ; \
43122        echo "pass"                         ; \
43123        echo "bin"                          ; \
43124        echo "get $FTPPATH $tmpfile"              ; \
43125    ) | ftp -in $FTPSERVER
43126  fi
43127  if test "x$VALID_TOOL" != xyes; then
43128    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43129  fi
43130
43131    mv $tmpfile $installdir/$filename
43132    if test ! -s $installdir/$filename; then
43133      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43134    fi
43135    case "$extension" in
43136      zip)  echo "Unzipping $installdir/$filename..."
43137        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43138        ;;
43139      tar.gz) echo "Untaring $installdir/$filename..."
43140        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43141        ;;
43142      tgz) echo "Untaring $installdir/$filename..."
43143        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43144        ;;
43145      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43146        ;;
43147    esac
43148  fi
43149  if test -f $installdir/$filename.unpacked; then
43150    depdir=$installdir
43151  fi
43152
43153      fi
43154      # Source the builddeps file again, because in the previous command, the depdir
43155      # was updated to point at the current build dependency install directory.
43156      . $builddepsfile
43157      # Now extract variables from the builddeps.conf files.
43158      theroot=${builddep_cups_ROOT}
43159      thecflags=${builddep_cups_CFLAGS}
43160      thelibs=${builddep_cups_LIBS}
43161      if test "x$depdir" = x; then
43162        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43163      fi
43164      CUPS=$depdir
43165      if test "x$theroot" != x; then
43166        CUPS="$theroot"
43167      fi
43168      if test "x$thecflags" != x; then
43169        CUPS_CFLAGS="$thecflags"
43170      fi
43171      if test "x$thelibs" != x; then
43172        CUPS_LIBS="$thelibs"
43173      fi
43174      CUPS_FOUND=yes
43175
43176    fi
43177
43178  fi
43179
43180    fi
43181    if test "x$CUPS_FOUND" = xno; then
43182      # Are the cups headers installed in the default /usr/include location?
43183      for ac_header in cups/cups.h cups/ppd.h
43184do :
43185  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43186ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43187if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43188  cat >>confdefs.h <<_ACEOF
43189#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43190_ACEOF
43191
43192            CUPS_FOUND=yes
43193            CUPS_CFLAGS=
43194            DEFAULT_CUPS=yes
43195
43196
43197fi
43198
43199done
43200
43201    fi
43202    if test "x$CUPS_FOUND" = xno; then
43203      # Getting nervous now? Lets poke around for standard Solaris third-party
43204      # package installation locations.
43205      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43206$as_echo_n "checking for cups headers... " >&6; }
43207      if test -s /opt/sfw/cups/include/cups/cups.h; then
43208        # An SFW package seems to be installed!
43209        CUPS_FOUND=yes
43210        CUPS_CFLAGS="-I/opt/sfw/cups/include"
43211      elif test -s /opt/csw/include/cups/cups.h; then
43212        # A CSW package seems to be installed!
43213        CUPS_FOUND=yes
43214        CUPS_CFLAGS="-I/opt/csw/include"
43215      fi
43216      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43217$as_echo "$CUPS_FOUND" >&6; }
43218    fi
43219    if test "x$CUPS_FOUND" = xno; then
43220
43221  # Print a helpful message on how to acquire the necessary build dependency.
43222  # cups is the help tag: freetype, cups, pulse, alsa etc
43223  MISSING_DEPENDENCY=cups
43224
43225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43226    cygwin_help $MISSING_DEPENDENCY
43227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43228    msys_help $MISSING_DEPENDENCY
43229  else
43230    PKGHANDLER_COMMAND=
43231
43232    case $PKGHANDLER in
43233      apt-get)
43234        apt_help     $MISSING_DEPENDENCY ;;
43235      yum)
43236        yum_help     $MISSING_DEPENDENCY ;;
43237      port)
43238        port_help    $MISSING_DEPENDENCY ;;
43239      pkgutil)
43240        pkgutil_help $MISSING_DEPENDENCY ;;
43241      pkgadd)
43242        pkgadd_help  $MISSING_DEPENDENCY ;;
43243    esac
43244
43245    if test "x$PKGHANDLER_COMMAND" != x; then
43246      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43247    fi
43248  fi
43249
43250      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43251    fi
43252  fi
43253
43254
43255
43256
43257
43258
43259  ###############################################################################
43260  #
43261  # The ubiquitous freetype library is used to render fonts.
43262  #
43263
43264# Check whether --with-freetype was given.
43265if test "${with_freetype+set}" = set; then :
43266  withval=$with_freetype;
43267fi
43268
43269
43270# Check whether --with-freetype-include was given.
43271if test "${with_freetype_include+set}" = set; then :
43272  withval=$with_freetype_include;
43273fi
43274
43275
43276# Check whether --with-freetype-lib was given.
43277if test "${with_freetype_lib+set}" = set; then :
43278  withval=$with_freetype_lib;
43279fi
43280
43281  # Check whether --enable-freetype-bundling was given.
43282if test "${enable_freetype_bundling+set}" = set; then :
43283  enableval=$enable_freetype_bundling;
43284fi
43285
43286
43287  FREETYPE_CFLAGS=
43288  FREETYPE_LIBS=
43289  FREETYPE_BUNDLE_LIB_PATH=
43290
43291  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43292    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43293      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43294$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43295    fi
43296    if test "x$enable_freetype_bundling" != x; then
43297      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43298$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43299    fi
43300  else
43301    # freetype is needed to build; go get it!
43302
43303    BUNDLE_FREETYPE="$enable_freetype_bundling"
43304
43305    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43306      # User has specified settings
43307
43308      if test "x$BUNDLE_FREETYPE" = x; then
43309        # If not specified, default is to bundle freetype
43310        BUNDLE_FREETYPE=yes
43311      fi
43312
43313      if test "x$with_freetype" != x; then
43314        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
43315        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
43316      fi
43317
43318      # Allow --with-freetype-lib and --with-freetype-include to override
43319      if test "x$with_freetype_include" != x; then
43320        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
43321      fi
43322      if test "x$with_freetype_lib" != x; then
43323        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
43324      fi
43325
43326      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
43327        # Okay, we got it. Check that it works.
43328
43329  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43330  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43331  METHOD="--with-freetype"
43332
43333  # First check if the files exists.
43334  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43335    # We found an arbitrary include file. That's a good sign.
43336    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43337$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43338    FOUND_FREETYPE=yes
43339
43340    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43341    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43342      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43343$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43344      FOUND_FREETYPE=no
43345    else
43346      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43347        # On Windows, we will need both .lib and .dll file.
43348        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43349          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43350$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43351          FOUND_FREETYPE=no
43352        fi
43353      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
43354        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43355        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43356      fi
43357    fi
43358  fi
43359
43360  if test "x$FOUND_FREETYPE" = xyes; then
43361
43362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43363
43364  # Input might be given as Windows format, start by converting to
43365  # unix format.
43366  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43367  new_path=`$CYGPATH -u "$path"`
43368
43369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43372  # "foo.exe" is OK but "foo" is an error.
43373  #
43374  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43375  # It is also a way to make sure we got the proper file name for the real test later on.
43376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43377  if test "x$test_shortpath" = x; then
43378    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43379$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43380    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43381  fi
43382
43383  # Call helper function which possibly converts this using DOS-style short mode.
43384  # If so, the updated path is stored in $new_path.
43385
43386  input_path="$new_path"
43387  # Check if we need to convert this using DOS-style short mode. If the path
43388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43389  # take no chances and rewrite it.
43390  # Note: m4 eats our [], so we need to use [ and ] instead.
43391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43392  if test "x$has_forbidden_chars" != x; then
43393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43397      # Going to short mode and back again did indeed matter. Since short mode is
43398      # case insensitive, let's make it lowercase to improve readability.
43399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43400      # Now convert it back to Unix-stile (cygpath)
43401      input_path=`$CYGPATH -u "$shortmode_path"`
43402      new_path="$input_path"
43403    fi
43404  fi
43405
43406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43407  if test "x$test_cygdrive_prefix" = x; then
43408    # As a simple fix, exclude /usr/bin since it's not a real path.
43409    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43411      # a path prefixed by /cygdrive for fixpath to work.
43412      new_path="$CYGWIN_ROOT_PATH$input_path"
43413    fi
43414  fi
43415
43416
43417  if test "x$path" != "x$new_path"; then
43418    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43420$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43421  fi
43422
43423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43424
43425  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43426  has_colon=`$ECHO $path | $GREP ^.:`
43427  new_path="$path"
43428  if test "x$has_colon" = x; then
43429    # Not in mixed or Windows style, start by that.
43430    new_path=`cmd //c echo $path`
43431  fi
43432
43433
43434  input_path="$new_path"
43435  # Check if we need to convert this using DOS-style short mode. If the path
43436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43437  # take no chances and rewrite it.
43438  # Note: m4 eats our [], so we need to use [ and ] instead.
43439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43440  if test "x$has_forbidden_chars" != x; then
43441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43443  fi
43444
43445
43446  windows_path="$new_path"
43447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43448    unix_path=`$CYGPATH -u "$windows_path"`
43449    new_path="$unix_path"
43450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43452    new_path="$unix_path"
43453  fi
43454
43455  if test "x$path" != "x$new_path"; then
43456    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43458$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43459  fi
43460
43461  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43462  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43463
43464  else
43465    # We're on a posix platform. Hooray! :)
43466    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43467    has_space=`$ECHO "$path" | $GREP " "`
43468    if test "x$has_space" != x; then
43469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43470$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43471      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43472    fi
43473
43474    # Use eval to expand a potential ~
43475    eval path="$path"
43476    if test ! -f "$path" && test ! -d "$path"; then
43477      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43478    fi
43479
43480    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43481  fi
43482
43483
43484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43485
43486  # Input might be given as Windows format, start by converting to
43487  # unix format.
43488  path="$POTENTIAL_FREETYPE_LIB_PATH"
43489  new_path=`$CYGPATH -u "$path"`
43490
43491  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43492  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43493  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43494  # "foo.exe" is OK but "foo" is an error.
43495  #
43496  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43497  # It is also a way to make sure we got the proper file name for the real test later on.
43498  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43499  if test "x$test_shortpath" = x; then
43500    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43501$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43502    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43503  fi
43504
43505  # Call helper function which possibly converts this using DOS-style short mode.
43506  # If so, the updated path is stored in $new_path.
43507
43508  input_path="$new_path"
43509  # Check if we need to convert this using DOS-style short mode. If the path
43510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43511  # take no chances and rewrite it.
43512  # Note: m4 eats our [], so we need to use [ and ] instead.
43513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43514  if test "x$has_forbidden_chars" != x; then
43515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43516    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43517    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43518    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43519      # Going to short mode and back again did indeed matter. Since short mode is
43520      # case insensitive, let's make it lowercase to improve readability.
43521      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43522      # Now convert it back to Unix-stile (cygpath)
43523      input_path=`$CYGPATH -u "$shortmode_path"`
43524      new_path="$input_path"
43525    fi
43526  fi
43527
43528  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43529  if test "x$test_cygdrive_prefix" = x; then
43530    # As a simple fix, exclude /usr/bin since it's not a real path.
43531    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43532      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43533      # a path prefixed by /cygdrive for fixpath to work.
43534      new_path="$CYGWIN_ROOT_PATH$input_path"
43535    fi
43536  fi
43537
43538
43539  if test "x$path" != "x$new_path"; then
43540    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43541    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43542$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43543  fi
43544
43545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43546
43547  path="$POTENTIAL_FREETYPE_LIB_PATH"
43548  has_colon=`$ECHO $path | $GREP ^.:`
43549  new_path="$path"
43550  if test "x$has_colon" = x; then
43551    # Not in mixed or Windows style, start by that.
43552    new_path=`cmd //c echo $path`
43553  fi
43554
43555
43556  input_path="$new_path"
43557  # Check if we need to convert this using DOS-style short mode. If the path
43558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43559  # take no chances and rewrite it.
43560  # Note: m4 eats our [], so we need to use [ and ] instead.
43561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43562  if test "x$has_forbidden_chars" != x; then
43563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43564    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43565  fi
43566
43567
43568  windows_path="$new_path"
43569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43570    unix_path=`$CYGPATH -u "$windows_path"`
43571    new_path="$unix_path"
43572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43574    new_path="$unix_path"
43575  fi
43576
43577  if test "x$path" != "x$new_path"; then
43578    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43579    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43580$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43581  fi
43582
43583  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43584  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43585
43586  else
43587    # We're on a posix platform. Hooray! :)
43588    path="$POTENTIAL_FREETYPE_LIB_PATH"
43589    has_space=`$ECHO "$path" | $GREP " "`
43590    if test "x$has_space" != x; then
43591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43592$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43593      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43594    fi
43595
43596    # Use eval to expand a potential ~
43597    eval path="$path"
43598    if test ! -f "$path" && test ! -d "$path"; then
43599      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43600    fi
43601
43602    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43603  fi
43604
43605
43606    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43607    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43608$as_echo_n "checking for freetype includes... " >&6; }
43609    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43610$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43611    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43612    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43613$as_echo_n "checking for freetype libraries... " >&6; }
43614    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43615$as_echo "$FREETYPE_LIB_PATH" >&6; }
43616  fi
43617
43618        if test "x$FOUND_FREETYPE" != xyes; then
43619          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
43620        fi
43621      else
43622        # User specified only one of lib or include. This is an error.
43623        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
43624          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
43625$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
43626          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43627        else
43628          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
43629$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
43630          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43631        fi
43632      fi
43633    else
43634      # User did not specify settings, but we need freetype. Try to locate it.
43635
43636      if test "x$BUNDLE_FREETYPE" = x; then
43637        # If not specified, default is to bundle freetype only on windows
43638        if test "x$OPENJDK_TARGET_OS" = xwindows; then
43639          BUNDLE_FREETYPE=yes
43640        else
43641          BUNDLE_FREETYPE=no
43642        fi
43643      fi
43644
43645      if test "x$FOUND_FREETYPE" != xyes; then
43646        # Check builddeps
43647
43648
43649  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43650    # Source the builddeps file again, to make sure it uses the latest variables!
43651    . $builddepsfile
43652    # Look for a target and build machine specific resource!
43653    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43654    if test "x$resource" = x; then
43655      # Ok, lets instead look for a target specific resource
43656      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
43657    fi
43658    if test "x$resource" = x; then
43659      # Ok, lets instead look for a build specific resource
43660      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
43661    fi
43662    if test "x$resource" = x; then
43663      # Ok, lets instead look for a generic resource
43664      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
43665      resource=${builddep_freetype2}
43666    fi
43667    if test "x$resource" != x; then
43668      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
43669$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
43670      # If the resource in the builddeps.conf file is an existing directory,
43671      # for example /java/linux/cups
43672      if test -d ${resource}; then
43673        depdir=${resource}
43674      else
43675
43676  # freetype2 is for example mymodule
43677  # $resource is for example libs/general/libmymod_1_2_3.zip
43678  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43679  # $with_builddeps_dir is for example /localhome/builddeps
43680  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43681  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43682  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43683  filename=`basename $resource`
43684  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43685  filebase=${filename%%.*}
43686  extension=${filename#*.}
43687  installdir=$with_builddeps_dir/$filebase
43688  if test ! -f $installdir/$filename.unpacked; then
43689    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
43690$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43691    if test ! -d $installdir; then
43692      mkdir -p $installdir
43693    fi
43694    if test ! -d $installdir; then
43695      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43696    fi
43697    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
43698    touch $tmpfile
43699    if test ! -f $tmpfile; then
43700      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43701    fi
43702
43703  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43704  # $tmpfile is the local file name for the downloaded file.
43705  VALID_TOOL=no
43706  if test "x$BDEPS_FTP" = xwget; then
43707    VALID_TOOL=yes
43708    wget -O $tmpfile $with_builddeps_server/$resource
43709  fi
43710  if test "x$BDEPS_FTP" = xlftp; then
43711    VALID_TOOL=yes
43712    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43713  fi
43714  if test "x$BDEPS_FTP" = xftp; then
43715    VALID_TOOL=yes
43716    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43717    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43718    FTPUSERPWD=${FTPSERVER%%@*}
43719    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43720      FTPUSER=${userpwd%%:*}
43721      FTPPWD=${userpwd#*@}
43722      FTPSERVER=${FTPSERVER#*@}
43723    else
43724      FTPUSER=ftp
43725      FTPPWD=ftp
43726    fi
43727    # the "pass" command does not work on some
43728    # ftp clients (read ftp.exe) but if it works,
43729    # passive mode is better!
43730    ( \
43731        echo "user $FTPUSER $FTPPWD"        ; \
43732        echo "pass"                         ; \
43733        echo "bin"                          ; \
43734        echo "get $FTPPATH $tmpfile"              ; \
43735    ) | ftp -in $FTPSERVER
43736  fi
43737  if test "x$VALID_TOOL" != xyes; then
43738    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43739  fi
43740
43741    mv $tmpfile $installdir/$filename
43742    if test ! -s $installdir/$filename; then
43743      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43744    fi
43745    case "$extension" in
43746      zip)  echo "Unzipping $installdir/$filename..."
43747        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43748        ;;
43749      tar.gz) echo "Untaring $installdir/$filename..."
43750        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43751        ;;
43752      tgz) echo "Untaring $installdir/$filename..."
43753        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43754        ;;
43755      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43756        ;;
43757    esac
43758  fi
43759  if test -f $installdir/$filename.unpacked; then
43760    depdir=$installdir
43761  fi
43762
43763      fi
43764      # Source the builddeps file again, because in the previous command, the depdir
43765      # was updated to point at the current build dependency install directory.
43766      . $builddepsfile
43767      # Now extract variables from the builddeps.conf files.
43768      theroot=${builddep_freetype2_ROOT}
43769      thecflags=${builddep_freetype2_CFLAGS}
43770      thelibs=${builddep_freetype2_LIBS}
43771      if test "x$depdir" = x; then
43772        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
43773      fi
43774      FREETYPE=$depdir
43775      if test "x$theroot" != x; then
43776        FREETYPE="$theroot"
43777      fi
43778      if test "x$thecflags" != x; then
43779        FREETYPE_CFLAGS="$thecflags"
43780      fi
43781      if test "x$thelibs" != x; then
43782        FREETYPE_LIBS="$thelibs"
43783      fi
43784      FOUND_FREETYPE=yes
43785      else FOUND_FREETYPE=no
43786
43787    fi
43788    else FOUND_FREETYPE=no
43789
43790  fi
43791
43792        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
43793        if test "x$FOUND_FREETYPE" = xyes; then
43794          if test "x$BUNDLE_FREETYPE" = xyes; then
43795            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
43796$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
43797            FOUND_FREETYPE=no
43798          else
43799            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
43800$as_echo_n "checking for freetype... " >&6; }
43801            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
43802$as_echo "yes (using builddeps)" >&6; }
43803          fi
43804        fi
43805      fi
43806
43807      if test "x$FOUND_FREETYPE" != xyes; then
43808        # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
43809        if test "x$PKG_CONFIG" != x; then
43810
43811pkg_failed=no
43812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
43813$as_echo_n "checking for FREETYPE... " >&6; }
43814
43815if test -n "$FREETYPE_CFLAGS"; then
43816    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
43817 elif test -n "$PKG_CONFIG"; then
43818    if test -n "$PKG_CONFIG" && \
43819    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43820  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43821  ac_status=$?
43822  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43823  test $ac_status = 0; }; then
43824  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
43825else
43826  pkg_failed=yes
43827fi
43828 else
43829    pkg_failed=untried
43830fi
43831if test -n "$FREETYPE_LIBS"; then
43832    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
43833 elif test -n "$PKG_CONFIG"; then
43834    if test -n "$PKG_CONFIG" && \
43835    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43836  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43837  ac_status=$?
43838  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43839  test $ac_status = 0; }; then
43840  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
43841else
43842  pkg_failed=yes
43843fi
43844 else
43845    pkg_failed=untried
43846fi
43847
43848
43849
43850if test $pkg_failed = yes; then
43851
43852if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
43853        _pkg_short_errors_supported=yes
43854else
43855        _pkg_short_errors_supported=no
43856fi
43857        if test $_pkg_short_errors_supported = yes; then
43858	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
43859        else
43860	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
43861        fi
43862	# Put the nasty error message in config.log where it belongs
43863	echo "$FREETYPE_PKG_ERRORS" >&5
43864
43865	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43866$as_echo "no" >&6; }
43867                FOUND_FREETYPE=no
43868elif test $pkg_failed = untried; then
43869	FOUND_FREETYPE=no
43870else
43871	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
43872	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
43873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43874$as_echo "yes" >&6; }
43875	FOUND_FREETYPE=yes
43876fi
43877          if test "x$FOUND_FREETYPE" = xyes; then
43878            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
43879            FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
43880            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
43881            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
43882              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
43883            fi
43884            # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
43885            if test "x$BUNDLE_FREETYPE" = xyes; then
43886              { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
43887$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
43888              FOUND_FREETYPE=no
43889            else
43890              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
43891$as_echo_n "checking for freetype... " >&6; }
43892              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
43893$as_echo "yes (using pkg-config)" >&6; }
43894            fi
43895          fi
43896        fi
43897      fi
43898
43899      if test "x$FOUND_FREETYPE" != xyes; then
43900        # Check in well-known locations
43901        if test "x$OPENJDK_TARGET_OS" = xwindows; then
43902          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
43903
43904  windows_path="$FREETYPE_BASE_DIR"
43905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43906    unix_path=`$CYGPATH -u "$windows_path"`
43907    FREETYPE_BASE_DIR="$unix_path"
43908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43910    FREETYPE_BASE_DIR="$unix_path"
43911  fi
43912
43913
43914  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
43915  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
43916  METHOD="well-known location"
43917
43918  # First check if the files exists.
43919  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43920    # We found an arbitrary include file. That's a good sign.
43921    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43922$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43923    FOUND_FREETYPE=yes
43924
43925    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43926    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43927      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43928$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43929      FOUND_FREETYPE=no
43930    else
43931      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43932        # On Windows, we will need both .lib and .dll file.
43933        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43934          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43935$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43936          FOUND_FREETYPE=no
43937        fi
43938      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
43939        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43940        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43941      fi
43942    fi
43943  fi
43944
43945  if test "x$FOUND_FREETYPE" = xyes; then
43946
43947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43948
43949  # Input might be given as Windows format, start by converting to
43950  # unix format.
43951  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43952  new_path=`$CYGPATH -u "$path"`
43953
43954  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43955  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43956  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43957  # "foo.exe" is OK but "foo" is an error.
43958  #
43959  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43960  # It is also a way to make sure we got the proper file name for the real test later on.
43961  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43962  if test "x$test_shortpath" = x; then
43963    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43964$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43965    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43966  fi
43967
43968  # Call helper function which possibly converts this using DOS-style short mode.
43969  # If so, the updated path is stored in $new_path.
43970
43971  input_path="$new_path"
43972  # Check if we need to convert this using DOS-style short mode. If the path
43973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43974  # take no chances and rewrite it.
43975  # Note: m4 eats our [], so we need to use [ and ] instead.
43976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43977  if test "x$has_forbidden_chars" != x; then
43978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43979    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43980    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43981    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43982      # Going to short mode and back again did indeed matter. Since short mode is
43983      # case insensitive, let's make it lowercase to improve readability.
43984      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43985      # Now convert it back to Unix-stile (cygpath)
43986      input_path=`$CYGPATH -u "$shortmode_path"`
43987      new_path="$input_path"
43988    fi
43989  fi
43990
43991  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43992  if test "x$test_cygdrive_prefix" = x; then
43993    # As a simple fix, exclude /usr/bin since it's not a real path.
43994    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43995      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43996      # a path prefixed by /cygdrive for fixpath to work.
43997      new_path="$CYGWIN_ROOT_PATH$input_path"
43998    fi
43999  fi
44000
44001
44002  if test "x$path" != "x$new_path"; then
44003    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44005$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44006  fi
44007
44008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44009
44010  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44011  has_colon=`$ECHO $path | $GREP ^.:`
44012  new_path="$path"
44013  if test "x$has_colon" = x; then
44014    # Not in mixed or Windows style, start by that.
44015    new_path=`cmd //c echo $path`
44016  fi
44017
44018
44019  input_path="$new_path"
44020  # Check if we need to convert this using DOS-style short mode. If the path
44021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44022  # take no chances and rewrite it.
44023  # Note: m4 eats our [], so we need to use [ and ] instead.
44024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44025  if test "x$has_forbidden_chars" != x; then
44026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44027    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44028  fi
44029
44030
44031  windows_path="$new_path"
44032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44033    unix_path=`$CYGPATH -u "$windows_path"`
44034    new_path="$unix_path"
44035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44037    new_path="$unix_path"
44038  fi
44039
44040  if test "x$path" != "x$new_path"; then
44041    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44043$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44044  fi
44045
44046  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44047  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44048
44049  else
44050    # We're on a posix platform. Hooray! :)
44051    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44052    has_space=`$ECHO "$path" | $GREP " "`
44053    if test "x$has_space" != x; then
44054      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44055$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44056      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44057    fi
44058
44059    # Use eval to expand a potential ~
44060    eval path="$path"
44061    if test ! -f "$path" && test ! -d "$path"; then
44062      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44063    fi
44064
44065    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44066  fi
44067
44068
44069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44070
44071  # Input might be given as Windows format, start by converting to
44072  # unix format.
44073  path="$POTENTIAL_FREETYPE_LIB_PATH"
44074  new_path=`$CYGPATH -u "$path"`
44075
44076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44079  # "foo.exe" is OK but "foo" is an error.
44080  #
44081  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44082  # It is also a way to make sure we got the proper file name for the real test later on.
44083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44084  if test "x$test_shortpath" = x; then
44085    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44086$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44087    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44088  fi
44089
44090  # Call helper function which possibly converts this using DOS-style short mode.
44091  # If so, the updated path is stored in $new_path.
44092
44093  input_path="$new_path"
44094  # Check if we need to convert this using DOS-style short mode. If the path
44095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44096  # take no chances and rewrite it.
44097  # Note: m4 eats our [], so we need to use [ and ] instead.
44098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44099  if test "x$has_forbidden_chars" != x; then
44100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44104      # Going to short mode and back again did indeed matter. Since short mode is
44105      # case insensitive, let's make it lowercase to improve readability.
44106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44107      # Now convert it back to Unix-stile (cygpath)
44108      input_path=`$CYGPATH -u "$shortmode_path"`
44109      new_path="$input_path"
44110    fi
44111  fi
44112
44113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44114  if test "x$test_cygdrive_prefix" = x; then
44115    # As a simple fix, exclude /usr/bin since it's not a real path.
44116    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44118      # a path prefixed by /cygdrive for fixpath to work.
44119      new_path="$CYGWIN_ROOT_PATH$input_path"
44120    fi
44121  fi
44122
44123
44124  if test "x$path" != "x$new_path"; then
44125    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44127$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44128  fi
44129
44130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44131
44132  path="$POTENTIAL_FREETYPE_LIB_PATH"
44133  has_colon=`$ECHO $path | $GREP ^.:`
44134  new_path="$path"
44135  if test "x$has_colon" = x; then
44136    # Not in mixed or Windows style, start by that.
44137    new_path=`cmd //c echo $path`
44138  fi
44139
44140
44141  input_path="$new_path"
44142  # Check if we need to convert this using DOS-style short mode. If the path
44143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44144  # take no chances and rewrite it.
44145  # Note: m4 eats our [], so we need to use [ and ] instead.
44146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44147  if test "x$has_forbidden_chars" != x; then
44148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44149    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44150  fi
44151
44152
44153  windows_path="$new_path"
44154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44155    unix_path=`$CYGPATH -u "$windows_path"`
44156    new_path="$unix_path"
44157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44159    new_path="$unix_path"
44160  fi
44161
44162  if test "x$path" != "x$new_path"; then
44163    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44165$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44166  fi
44167
44168  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44169  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44170
44171  else
44172    # We're on a posix platform. Hooray! :)
44173    path="$POTENTIAL_FREETYPE_LIB_PATH"
44174    has_space=`$ECHO "$path" | $GREP " "`
44175    if test "x$has_space" != x; then
44176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44177$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44178      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44179    fi
44180
44181    # Use eval to expand a potential ~
44182    eval path="$path"
44183    if test ! -f "$path" && test ! -d "$path"; then
44184      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44185    fi
44186
44187    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44188  fi
44189
44190
44191    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44192    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44193$as_echo_n "checking for freetype includes... " >&6; }
44194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44195$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44196    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44197    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44198$as_echo_n "checking for freetype libraries... " >&6; }
44199    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44200$as_echo "$FREETYPE_LIB_PATH" >&6; }
44201  fi
44202
44203          if test "x$FOUND_FREETYPE" != xyes; then
44204            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44205
44206  windows_path="$FREETYPE_BASE_DIR"
44207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44208    unix_path=`$CYGPATH -u "$windows_path"`
44209    FREETYPE_BASE_DIR="$unix_path"
44210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44212    FREETYPE_BASE_DIR="$unix_path"
44213  fi
44214
44215
44216  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44217  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44218  METHOD="well-known location"
44219
44220  # First check if the files exists.
44221  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44222    # We found an arbitrary include file. That's a good sign.
44223    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44224$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44225    FOUND_FREETYPE=yes
44226
44227    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44228    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44229      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44230$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44231      FOUND_FREETYPE=no
44232    else
44233      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44234        # On Windows, we will need both .lib and .dll file.
44235        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44236          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44237$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44238          FOUND_FREETYPE=no
44239        fi
44240      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
44241        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44242        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44243      fi
44244    fi
44245  fi
44246
44247  if test "x$FOUND_FREETYPE" = xyes; then
44248
44249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44250
44251  # Input might be given as Windows format, start by converting to
44252  # unix format.
44253  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44254  new_path=`$CYGPATH -u "$path"`
44255
44256  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44257  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44258  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44259  # "foo.exe" is OK but "foo" is an error.
44260  #
44261  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44262  # It is also a way to make sure we got the proper file name for the real test later on.
44263  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44264  if test "x$test_shortpath" = x; then
44265    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44266$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44267    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44268  fi
44269
44270  # Call helper function which possibly converts this using DOS-style short mode.
44271  # If so, the updated path is stored in $new_path.
44272
44273  input_path="$new_path"
44274  # Check if we need to convert this using DOS-style short mode. If the path
44275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44276  # take no chances and rewrite it.
44277  # Note: m4 eats our [], so we need to use [ and ] instead.
44278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44279  if test "x$has_forbidden_chars" != x; then
44280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44281    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44282    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44283    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44284      # Going to short mode and back again did indeed matter. Since short mode is
44285      # case insensitive, let's make it lowercase to improve readability.
44286      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44287      # Now convert it back to Unix-stile (cygpath)
44288      input_path=`$CYGPATH -u "$shortmode_path"`
44289      new_path="$input_path"
44290    fi
44291  fi
44292
44293  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44294  if test "x$test_cygdrive_prefix" = x; then
44295    # As a simple fix, exclude /usr/bin since it's not a real path.
44296    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44297      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44298      # a path prefixed by /cygdrive for fixpath to work.
44299      new_path="$CYGWIN_ROOT_PATH$input_path"
44300    fi
44301  fi
44302
44303
44304  if test "x$path" != "x$new_path"; then
44305    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44307$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44308  fi
44309
44310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44311
44312  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44313  has_colon=`$ECHO $path | $GREP ^.:`
44314  new_path="$path"
44315  if test "x$has_colon" = x; then
44316    # Not in mixed or Windows style, start by that.
44317    new_path=`cmd //c echo $path`
44318  fi
44319
44320
44321  input_path="$new_path"
44322  # Check if we need to convert this using DOS-style short mode. If the path
44323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44324  # take no chances and rewrite it.
44325  # Note: m4 eats our [], so we need to use [ and ] instead.
44326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44327  if test "x$has_forbidden_chars" != x; then
44328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44329    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44330  fi
44331
44332
44333  windows_path="$new_path"
44334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44335    unix_path=`$CYGPATH -u "$windows_path"`
44336    new_path="$unix_path"
44337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44339    new_path="$unix_path"
44340  fi
44341
44342  if test "x$path" != "x$new_path"; then
44343    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44345$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44346  fi
44347
44348  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44349  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44350
44351  else
44352    # We're on a posix platform. Hooray! :)
44353    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44354    has_space=`$ECHO "$path" | $GREP " "`
44355    if test "x$has_space" != x; then
44356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44357$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44358      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44359    fi
44360
44361    # Use eval to expand a potential ~
44362    eval path="$path"
44363    if test ! -f "$path" && test ! -d "$path"; then
44364      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44365    fi
44366
44367    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44368  fi
44369
44370
44371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44372
44373  # Input might be given as Windows format, start by converting to
44374  # unix format.
44375  path="$POTENTIAL_FREETYPE_LIB_PATH"
44376  new_path=`$CYGPATH -u "$path"`
44377
44378  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44379  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44380  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44381  # "foo.exe" is OK but "foo" is an error.
44382  #
44383  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44384  # It is also a way to make sure we got the proper file name for the real test later on.
44385  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44386  if test "x$test_shortpath" = x; then
44387    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44388$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44389    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44390  fi
44391
44392  # Call helper function which possibly converts this using DOS-style short mode.
44393  # If so, the updated path is stored in $new_path.
44394
44395  input_path="$new_path"
44396  # Check if we need to convert this using DOS-style short mode. If the path
44397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44398  # take no chances and rewrite it.
44399  # Note: m4 eats our [], so we need to use [ and ] instead.
44400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44401  if test "x$has_forbidden_chars" != x; then
44402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44403    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44404    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44405    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44406      # Going to short mode and back again did indeed matter. Since short mode is
44407      # case insensitive, let's make it lowercase to improve readability.
44408      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44409      # Now convert it back to Unix-stile (cygpath)
44410      input_path=`$CYGPATH -u "$shortmode_path"`
44411      new_path="$input_path"
44412    fi
44413  fi
44414
44415  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44416  if test "x$test_cygdrive_prefix" = x; then
44417    # As a simple fix, exclude /usr/bin since it's not a real path.
44418    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44419      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44420      # a path prefixed by /cygdrive for fixpath to work.
44421      new_path="$CYGWIN_ROOT_PATH$input_path"
44422    fi
44423  fi
44424
44425
44426  if test "x$path" != "x$new_path"; then
44427    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44429$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44430  fi
44431
44432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44433
44434  path="$POTENTIAL_FREETYPE_LIB_PATH"
44435  has_colon=`$ECHO $path | $GREP ^.:`
44436  new_path="$path"
44437  if test "x$has_colon" = x; then
44438    # Not in mixed or Windows style, start by that.
44439    new_path=`cmd //c echo $path`
44440  fi
44441
44442
44443  input_path="$new_path"
44444  # Check if we need to convert this using DOS-style short mode. If the path
44445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44446  # take no chances and rewrite it.
44447  # Note: m4 eats our [], so we need to use [ and ] instead.
44448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44449  if test "x$has_forbidden_chars" != x; then
44450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44451    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44452  fi
44453
44454
44455  windows_path="$new_path"
44456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44457    unix_path=`$CYGPATH -u "$windows_path"`
44458    new_path="$unix_path"
44459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44461    new_path="$unix_path"
44462  fi
44463
44464  if test "x$path" != "x$new_path"; then
44465    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44467$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44468  fi
44469
44470  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44471  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44472
44473  else
44474    # We're on a posix platform. Hooray! :)
44475    path="$POTENTIAL_FREETYPE_LIB_PATH"
44476    has_space=`$ECHO "$path" | $GREP " "`
44477    if test "x$has_space" != x; then
44478      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44479$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44480      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44481    fi
44482
44483    # Use eval to expand a potential ~
44484    eval path="$path"
44485    if test ! -f "$path" && test ! -d "$path"; then
44486      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44487    fi
44488
44489    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44490  fi
44491
44492
44493    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44494    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44495$as_echo_n "checking for freetype includes... " >&6; }
44496    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44497$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44498    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44499    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44500$as_echo_n "checking for freetype libraries... " >&6; }
44501    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44502$as_echo "$FREETYPE_LIB_PATH" >&6; }
44503  fi
44504
44505          fi
44506        else
44507          if test "x$SYS_ROOT" = "x/"; then
44508            FREETYPE_ROOT=
44509          else
44510            FREETYPE_ROOT="$SYS_ROOT"
44511          fi
44512          FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
44513
44514  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44515  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44516  METHOD="well-known location"
44517
44518  # First check if the files exists.
44519  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44520    # We found an arbitrary include file. That's a good sign.
44521    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44522$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44523    FOUND_FREETYPE=yes
44524
44525    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44526    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44527      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44528$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44529      FOUND_FREETYPE=no
44530    else
44531      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44532        # On Windows, we will need both .lib and .dll file.
44533        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44534          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44535$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44536          FOUND_FREETYPE=no
44537        fi
44538      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
44539        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44540        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44541      fi
44542    fi
44543  fi
44544
44545  if test "x$FOUND_FREETYPE" = xyes; then
44546
44547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44548
44549  # Input might be given as Windows format, start by converting to
44550  # unix format.
44551  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44552  new_path=`$CYGPATH -u "$path"`
44553
44554  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44555  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44556  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44557  # "foo.exe" is OK but "foo" is an error.
44558  #
44559  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44560  # It is also a way to make sure we got the proper file name for the real test later on.
44561  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44562  if test "x$test_shortpath" = x; then
44563    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44564$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44565    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44566  fi
44567
44568  # Call helper function which possibly converts this using DOS-style short mode.
44569  # If so, the updated path is stored in $new_path.
44570
44571  input_path="$new_path"
44572  # Check if we need to convert this using DOS-style short mode. If the path
44573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44574  # take no chances and rewrite it.
44575  # Note: m4 eats our [], so we need to use [ and ] instead.
44576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44577  if test "x$has_forbidden_chars" != x; then
44578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44579    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44580    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44581    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44582      # Going to short mode and back again did indeed matter. Since short mode is
44583      # case insensitive, let's make it lowercase to improve readability.
44584      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44585      # Now convert it back to Unix-stile (cygpath)
44586      input_path=`$CYGPATH -u "$shortmode_path"`
44587      new_path="$input_path"
44588    fi
44589  fi
44590
44591  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44592  if test "x$test_cygdrive_prefix" = x; then
44593    # As a simple fix, exclude /usr/bin since it's not a real path.
44594    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44595      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44596      # a path prefixed by /cygdrive for fixpath to work.
44597      new_path="$CYGWIN_ROOT_PATH$input_path"
44598    fi
44599  fi
44600
44601
44602  if test "x$path" != "x$new_path"; then
44603    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44605$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44606  fi
44607
44608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44609
44610  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44611  has_colon=`$ECHO $path | $GREP ^.:`
44612  new_path="$path"
44613  if test "x$has_colon" = x; then
44614    # Not in mixed or Windows style, start by that.
44615    new_path=`cmd //c echo $path`
44616  fi
44617
44618
44619  input_path="$new_path"
44620  # Check if we need to convert this using DOS-style short mode. If the path
44621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44622  # take no chances and rewrite it.
44623  # Note: m4 eats our [], so we need to use [ and ] instead.
44624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44625  if test "x$has_forbidden_chars" != x; then
44626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44628  fi
44629
44630
44631  windows_path="$new_path"
44632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44633    unix_path=`$CYGPATH -u "$windows_path"`
44634    new_path="$unix_path"
44635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44637    new_path="$unix_path"
44638  fi
44639
44640  if test "x$path" != "x$new_path"; then
44641    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44643$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44644  fi
44645
44646  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44647  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44648
44649  else
44650    # We're on a posix platform. Hooray! :)
44651    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44652    has_space=`$ECHO "$path" | $GREP " "`
44653    if test "x$has_space" != x; then
44654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44655$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44656      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44657    fi
44658
44659    # Use eval to expand a potential ~
44660    eval path="$path"
44661    if test ! -f "$path" && test ! -d "$path"; then
44662      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44663    fi
44664
44665    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44666  fi
44667
44668
44669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44670
44671  # Input might be given as Windows format, start by converting to
44672  # unix format.
44673  path="$POTENTIAL_FREETYPE_LIB_PATH"
44674  new_path=`$CYGPATH -u "$path"`
44675
44676  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44677  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44678  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44679  # "foo.exe" is OK but "foo" is an error.
44680  #
44681  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44682  # It is also a way to make sure we got the proper file name for the real test later on.
44683  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44684  if test "x$test_shortpath" = x; then
44685    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44686$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44687    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44688  fi
44689
44690  # Call helper function which possibly converts this using DOS-style short mode.
44691  # If so, the updated path is stored in $new_path.
44692
44693  input_path="$new_path"
44694  # Check if we need to convert this using DOS-style short mode. If the path
44695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44696  # take no chances and rewrite it.
44697  # Note: m4 eats our [], so we need to use [ and ] instead.
44698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44699  if test "x$has_forbidden_chars" != x; then
44700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44701    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44702    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44703    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44704      # Going to short mode and back again did indeed matter. Since short mode is
44705      # case insensitive, let's make it lowercase to improve readability.
44706      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44707      # Now convert it back to Unix-stile (cygpath)
44708      input_path=`$CYGPATH -u "$shortmode_path"`
44709      new_path="$input_path"
44710    fi
44711  fi
44712
44713  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44714  if test "x$test_cygdrive_prefix" = x; then
44715    # As a simple fix, exclude /usr/bin since it's not a real path.
44716    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44717      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44718      # a path prefixed by /cygdrive for fixpath to work.
44719      new_path="$CYGWIN_ROOT_PATH$input_path"
44720    fi
44721  fi
44722
44723
44724  if test "x$path" != "x$new_path"; then
44725    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44727$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44728  fi
44729
44730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44731
44732  path="$POTENTIAL_FREETYPE_LIB_PATH"
44733  has_colon=`$ECHO $path | $GREP ^.:`
44734  new_path="$path"
44735  if test "x$has_colon" = x; then
44736    # Not in mixed or Windows style, start by that.
44737    new_path=`cmd //c echo $path`
44738  fi
44739
44740
44741  input_path="$new_path"
44742  # Check if we need to convert this using DOS-style short mode. If the path
44743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44744  # take no chances and rewrite it.
44745  # Note: m4 eats our [], so we need to use [ and ] instead.
44746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44747  if test "x$has_forbidden_chars" != x; then
44748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44749    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44750  fi
44751
44752
44753  windows_path="$new_path"
44754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44755    unix_path=`$CYGPATH -u "$windows_path"`
44756    new_path="$unix_path"
44757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44759    new_path="$unix_path"
44760  fi
44761
44762  if test "x$path" != "x$new_path"; then
44763    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44765$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44766  fi
44767
44768  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44769  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44770
44771  else
44772    # We're on a posix platform. Hooray! :)
44773    path="$POTENTIAL_FREETYPE_LIB_PATH"
44774    has_space=`$ECHO "$path" | $GREP " "`
44775    if test "x$has_space" != x; then
44776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44777$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44778      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44779    fi
44780
44781    # Use eval to expand a potential ~
44782    eval path="$path"
44783    if test ! -f "$path" && test ! -d "$path"; then
44784      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44785    fi
44786
44787    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44788  fi
44789
44790
44791    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44792    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44793$as_echo_n "checking for freetype includes... " >&6; }
44794    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44795$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44796    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44797    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44798$as_echo_n "checking for freetype libraries... " >&6; }
44799    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44800$as_echo "$FREETYPE_LIB_PATH" >&6; }
44801  fi
44802
44803
44804          if test "x$FOUND_FREETYPE" != xyes; then
44805            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
44806
44807  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44808  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44809  METHOD="well-known location"
44810
44811  # First check if the files exists.
44812  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44813    # We found an arbitrary include file. That's a good sign.
44814    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44815$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44816    FOUND_FREETYPE=yes
44817
44818    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44819    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44820      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44821$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44822      FOUND_FREETYPE=no
44823    else
44824      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44825        # On Windows, we will need both .lib and .dll file.
44826        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44827          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44828$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44829          FOUND_FREETYPE=no
44830        fi
44831      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
44832        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44833        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44834      fi
44835    fi
44836  fi
44837
44838  if test "x$FOUND_FREETYPE" = xyes; then
44839
44840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44841
44842  # Input might be given as Windows format, start by converting to
44843  # unix format.
44844  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44845  new_path=`$CYGPATH -u "$path"`
44846
44847  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44848  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44849  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44850  # "foo.exe" is OK but "foo" is an error.
44851  #
44852  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44853  # It is also a way to make sure we got the proper file name for the real test later on.
44854  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44855  if test "x$test_shortpath" = x; then
44856    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44857$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44858    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44859  fi
44860
44861  # Call helper function which possibly converts this using DOS-style short mode.
44862  # If so, the updated path is stored in $new_path.
44863
44864  input_path="$new_path"
44865  # Check if we need to convert this using DOS-style short mode. If the path
44866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44867  # take no chances and rewrite it.
44868  # Note: m4 eats our [], so we need to use [ and ] instead.
44869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44870  if test "x$has_forbidden_chars" != x; then
44871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44872    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44873    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44874    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44875      # Going to short mode and back again did indeed matter. Since short mode is
44876      # case insensitive, let's make it lowercase to improve readability.
44877      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44878      # Now convert it back to Unix-stile (cygpath)
44879      input_path=`$CYGPATH -u "$shortmode_path"`
44880      new_path="$input_path"
44881    fi
44882  fi
44883
44884  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44885  if test "x$test_cygdrive_prefix" = x; then
44886    # As a simple fix, exclude /usr/bin since it's not a real path.
44887    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44888      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44889      # a path prefixed by /cygdrive for fixpath to work.
44890      new_path="$CYGWIN_ROOT_PATH$input_path"
44891    fi
44892  fi
44893
44894
44895  if test "x$path" != "x$new_path"; then
44896    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44898$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44899  fi
44900
44901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44902
44903  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44904  has_colon=`$ECHO $path | $GREP ^.:`
44905  new_path="$path"
44906  if test "x$has_colon" = x; then
44907    # Not in mixed or Windows style, start by that.
44908    new_path=`cmd //c echo $path`
44909  fi
44910
44911
44912  input_path="$new_path"
44913  # Check if we need to convert this using DOS-style short mode. If the path
44914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44915  # take no chances and rewrite it.
44916  # Note: m4 eats our [], so we need to use [ and ] instead.
44917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44918  if test "x$has_forbidden_chars" != x; then
44919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44920    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44921  fi
44922
44923
44924  windows_path="$new_path"
44925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44926    unix_path=`$CYGPATH -u "$windows_path"`
44927    new_path="$unix_path"
44928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44930    new_path="$unix_path"
44931  fi
44932
44933  if test "x$path" != "x$new_path"; then
44934    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44935    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44936$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44937  fi
44938
44939  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44940  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44941
44942  else
44943    # We're on a posix platform. Hooray! :)
44944    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44945    has_space=`$ECHO "$path" | $GREP " "`
44946    if test "x$has_space" != x; then
44947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44948$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44949      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44950    fi
44951
44952    # Use eval to expand a potential ~
44953    eval path="$path"
44954    if test ! -f "$path" && test ! -d "$path"; then
44955      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44956    fi
44957
44958    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44959  fi
44960
44961
44962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44963
44964  # Input might be given as Windows format, start by converting to
44965  # unix format.
44966  path="$POTENTIAL_FREETYPE_LIB_PATH"
44967  new_path=`$CYGPATH -u "$path"`
44968
44969  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44970  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44971  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44972  # "foo.exe" is OK but "foo" is an error.
44973  #
44974  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44975  # It is also a way to make sure we got the proper file name for the real test later on.
44976  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44977  if test "x$test_shortpath" = x; then
44978    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44979$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44980    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44981  fi
44982
44983  # Call helper function which possibly converts this using DOS-style short mode.
44984  # If so, the updated path is stored in $new_path.
44985
44986  input_path="$new_path"
44987  # Check if we need to convert this using DOS-style short mode. If the path
44988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44989  # take no chances and rewrite it.
44990  # Note: m4 eats our [], so we need to use [ and ] instead.
44991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44992  if test "x$has_forbidden_chars" != x; then
44993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44997      # Going to short mode and back again did indeed matter. Since short mode is
44998      # case insensitive, let's make it lowercase to improve readability.
44999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45000      # Now convert it back to Unix-stile (cygpath)
45001      input_path=`$CYGPATH -u "$shortmode_path"`
45002      new_path="$input_path"
45003    fi
45004  fi
45005
45006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45007  if test "x$test_cygdrive_prefix" = x; then
45008    # As a simple fix, exclude /usr/bin since it's not a real path.
45009    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45011      # a path prefixed by /cygdrive for fixpath to work.
45012      new_path="$CYGWIN_ROOT_PATH$input_path"
45013    fi
45014  fi
45015
45016
45017  if test "x$path" != "x$new_path"; then
45018    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45020$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45021  fi
45022
45023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45024
45025  path="$POTENTIAL_FREETYPE_LIB_PATH"
45026  has_colon=`$ECHO $path | $GREP ^.:`
45027  new_path="$path"
45028  if test "x$has_colon" = x; then
45029    # Not in mixed or Windows style, start by that.
45030    new_path=`cmd //c echo $path`
45031  fi
45032
45033
45034  input_path="$new_path"
45035  # Check if we need to convert this using DOS-style short mode. If the path
45036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45037  # take no chances and rewrite it.
45038  # Note: m4 eats our [], so we need to use [ and ] instead.
45039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45040  if test "x$has_forbidden_chars" != x; then
45041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45043  fi
45044
45045
45046  windows_path="$new_path"
45047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45048    unix_path=`$CYGPATH -u "$windows_path"`
45049    new_path="$unix_path"
45050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45052    new_path="$unix_path"
45053  fi
45054
45055  if test "x$path" != "x$new_path"; then
45056    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45058$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45059  fi
45060
45061  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45062  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45063
45064  else
45065    # We're on a posix platform. Hooray! :)
45066    path="$POTENTIAL_FREETYPE_LIB_PATH"
45067    has_space=`$ECHO "$path" | $GREP " "`
45068    if test "x$has_space" != x; then
45069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45070$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45071      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45072    fi
45073
45074    # Use eval to expand a potential ~
45075    eval path="$path"
45076    if test ! -f "$path" && test ! -d "$path"; then
45077      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45078    fi
45079
45080    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45081  fi
45082
45083
45084    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45085    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45086$as_echo_n "checking for freetype includes... " >&6; }
45087    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45088$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45089    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45090    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45091$as_echo_n "checking for freetype libraries... " >&6; }
45092    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45093$as_echo "$FREETYPE_LIB_PATH" >&6; }
45094  fi
45095
45096          fi
45097
45098          if test "x$FOUND_FREETYPE" != xyes; then
45099            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
45100            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45101
45102  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45103  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
45104  METHOD="well-known location"
45105
45106  # First check if the files exists.
45107  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45108    # We found an arbitrary include file. That's a good sign.
45109    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45110$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45111    FOUND_FREETYPE=yes
45112
45113    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45114    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45115      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45116$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45117      FOUND_FREETYPE=no
45118    else
45119      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45120        # On Windows, we will need both .lib and .dll file.
45121        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45122          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45123$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45124          FOUND_FREETYPE=no
45125        fi
45126      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
45127        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45128        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45129      fi
45130    fi
45131  fi
45132
45133  if test "x$FOUND_FREETYPE" = xyes; then
45134
45135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45136
45137  # Input might be given as Windows format, start by converting to
45138  # unix format.
45139  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45140  new_path=`$CYGPATH -u "$path"`
45141
45142  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45143  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45144  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45145  # "foo.exe" is OK but "foo" is an error.
45146  #
45147  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45148  # It is also a way to make sure we got the proper file name for the real test later on.
45149  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45150  if test "x$test_shortpath" = x; then
45151    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45152$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45153    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45154  fi
45155
45156  # Call helper function which possibly converts this using DOS-style short mode.
45157  # If so, the updated path is stored in $new_path.
45158
45159  input_path="$new_path"
45160  # Check if we need to convert this using DOS-style short mode. If the path
45161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45162  # take no chances and rewrite it.
45163  # Note: m4 eats our [], so we need to use [ and ] instead.
45164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45165  if test "x$has_forbidden_chars" != x; then
45166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45167    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45168    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45169    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45170      # Going to short mode and back again did indeed matter. Since short mode is
45171      # case insensitive, let's make it lowercase to improve readability.
45172      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45173      # Now convert it back to Unix-stile (cygpath)
45174      input_path=`$CYGPATH -u "$shortmode_path"`
45175      new_path="$input_path"
45176    fi
45177  fi
45178
45179  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45180  if test "x$test_cygdrive_prefix" = x; then
45181    # As a simple fix, exclude /usr/bin since it's not a real path.
45182    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45183      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45184      # a path prefixed by /cygdrive for fixpath to work.
45185      new_path="$CYGWIN_ROOT_PATH$input_path"
45186    fi
45187  fi
45188
45189
45190  if test "x$path" != "x$new_path"; then
45191    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45193$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45194  fi
45195
45196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45197
45198  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45199  has_colon=`$ECHO $path | $GREP ^.:`
45200  new_path="$path"
45201  if test "x$has_colon" = x; then
45202    # Not in mixed or Windows style, start by that.
45203    new_path=`cmd //c echo $path`
45204  fi
45205
45206
45207  input_path="$new_path"
45208  # Check if we need to convert this using DOS-style short mode. If the path
45209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45210  # take no chances and rewrite it.
45211  # Note: m4 eats our [], so we need to use [ and ] instead.
45212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45213  if test "x$has_forbidden_chars" != x; then
45214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45215    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45216  fi
45217
45218
45219  windows_path="$new_path"
45220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45221    unix_path=`$CYGPATH -u "$windows_path"`
45222    new_path="$unix_path"
45223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45225    new_path="$unix_path"
45226  fi
45227
45228  if test "x$path" != "x$new_path"; then
45229    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45231$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45232  fi
45233
45234  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45235  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45236
45237  else
45238    # We're on a posix platform. Hooray! :)
45239    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45240    has_space=`$ECHO "$path" | $GREP " "`
45241    if test "x$has_space" != x; then
45242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45243$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45244      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45245    fi
45246
45247    # Use eval to expand a potential ~
45248    eval path="$path"
45249    if test ! -f "$path" && test ! -d "$path"; then
45250      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45251    fi
45252
45253    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45254  fi
45255
45256
45257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45258
45259  # Input might be given as Windows format, start by converting to
45260  # unix format.
45261  path="$POTENTIAL_FREETYPE_LIB_PATH"
45262  new_path=`$CYGPATH -u "$path"`
45263
45264  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45265  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45266  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45267  # "foo.exe" is OK but "foo" is an error.
45268  #
45269  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45270  # It is also a way to make sure we got the proper file name for the real test later on.
45271  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45272  if test "x$test_shortpath" = x; then
45273    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45274$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45275    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45276  fi
45277
45278  # Call helper function which possibly converts this using DOS-style short mode.
45279  # If so, the updated path is stored in $new_path.
45280
45281  input_path="$new_path"
45282  # Check if we need to convert this using DOS-style short mode. If the path
45283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45284  # take no chances and rewrite it.
45285  # Note: m4 eats our [], so we need to use [ and ] instead.
45286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45287  if test "x$has_forbidden_chars" != x; then
45288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45289    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45290    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45291    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45292      # Going to short mode and back again did indeed matter. Since short mode is
45293      # case insensitive, let's make it lowercase to improve readability.
45294      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45295      # Now convert it back to Unix-stile (cygpath)
45296      input_path=`$CYGPATH -u "$shortmode_path"`
45297      new_path="$input_path"
45298    fi
45299  fi
45300
45301  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45302  if test "x$test_cygdrive_prefix" = x; then
45303    # As a simple fix, exclude /usr/bin since it's not a real path.
45304    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45305      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45306      # a path prefixed by /cygdrive for fixpath to work.
45307      new_path="$CYGWIN_ROOT_PATH$input_path"
45308    fi
45309  fi
45310
45311
45312  if test "x$path" != "x$new_path"; then
45313    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45315$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45316  fi
45317
45318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45319
45320  path="$POTENTIAL_FREETYPE_LIB_PATH"
45321  has_colon=`$ECHO $path | $GREP ^.:`
45322  new_path="$path"
45323  if test "x$has_colon" = x; then
45324    # Not in mixed or Windows style, start by that.
45325    new_path=`cmd //c echo $path`
45326  fi
45327
45328
45329  input_path="$new_path"
45330  # Check if we need to convert this using DOS-style short mode. If the path
45331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45332  # take no chances and rewrite it.
45333  # Note: m4 eats our [], so we need to use [ and ] instead.
45334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45335  if test "x$has_forbidden_chars" != x; then
45336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45337    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45338  fi
45339
45340
45341  windows_path="$new_path"
45342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45343    unix_path=`$CYGPATH -u "$windows_path"`
45344    new_path="$unix_path"
45345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45347    new_path="$unix_path"
45348  fi
45349
45350  if test "x$path" != "x$new_path"; then
45351    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45353$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45354  fi
45355
45356  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45357  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45358
45359  else
45360    # We're on a posix platform. Hooray! :)
45361    path="$POTENTIAL_FREETYPE_LIB_PATH"
45362    has_space=`$ECHO "$path" | $GREP " "`
45363    if test "x$has_space" != x; then
45364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45365$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45366      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45367    fi
45368
45369    # Use eval to expand a potential ~
45370    eval path="$path"
45371    if test ! -f "$path" && test ! -d "$path"; then
45372      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45373    fi
45374
45375    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45376  fi
45377
45378
45379    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45380    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45381$as_echo_n "checking for freetype includes... " >&6; }
45382    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45383$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45384    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45385    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45386$as_echo_n "checking for freetype libraries... " >&6; }
45387    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45388$as_echo "$FREETYPE_LIB_PATH" >&6; }
45389  fi
45390
45391            else
45392
45393  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45394  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
45395  METHOD="well-known location"
45396
45397  # First check if the files exists.
45398  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45399    # We found an arbitrary include file. That's a good sign.
45400    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45401$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45402    FOUND_FREETYPE=yes
45403
45404    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45405    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45406      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45407$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45408      FOUND_FREETYPE=no
45409    else
45410      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45411        # On Windows, we will need both .lib and .dll file.
45412        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45413          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45414$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45415          FOUND_FREETYPE=no
45416        fi
45417      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
45418        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45419        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45420      fi
45421    fi
45422  fi
45423
45424  if test "x$FOUND_FREETYPE" = xyes; then
45425
45426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45427
45428  # Input might be given as Windows format, start by converting to
45429  # unix format.
45430  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45431  new_path=`$CYGPATH -u "$path"`
45432
45433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45436  # "foo.exe" is OK but "foo" is an error.
45437  #
45438  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45439  # It is also a way to make sure we got the proper file name for the real test later on.
45440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45441  if test "x$test_shortpath" = x; then
45442    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45443$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45444    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45445  fi
45446
45447  # Call helper function which possibly converts this using DOS-style short mode.
45448  # If so, the updated path is stored in $new_path.
45449
45450  input_path="$new_path"
45451  # Check if we need to convert this using DOS-style short mode. If the path
45452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45453  # take no chances and rewrite it.
45454  # Note: m4 eats our [], so we need to use [ and ] instead.
45455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45456  if test "x$has_forbidden_chars" != x; then
45457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45461      # Going to short mode and back again did indeed matter. Since short mode is
45462      # case insensitive, let's make it lowercase to improve readability.
45463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45464      # Now convert it back to Unix-stile (cygpath)
45465      input_path=`$CYGPATH -u "$shortmode_path"`
45466      new_path="$input_path"
45467    fi
45468  fi
45469
45470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45471  if test "x$test_cygdrive_prefix" = x; then
45472    # As a simple fix, exclude /usr/bin since it's not a real path.
45473    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45475      # a path prefixed by /cygdrive for fixpath to work.
45476      new_path="$CYGWIN_ROOT_PATH$input_path"
45477    fi
45478  fi
45479
45480
45481  if test "x$path" != "x$new_path"; then
45482    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45484$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45485  fi
45486
45487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45488
45489  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45490  has_colon=`$ECHO $path | $GREP ^.:`
45491  new_path="$path"
45492  if test "x$has_colon" = x; then
45493    # Not in mixed or Windows style, start by that.
45494    new_path=`cmd //c echo $path`
45495  fi
45496
45497
45498  input_path="$new_path"
45499  # Check if we need to convert this using DOS-style short mode. If the path
45500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45501  # take no chances and rewrite it.
45502  # Note: m4 eats our [], so we need to use [ and ] instead.
45503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45504  if test "x$has_forbidden_chars" != x; then
45505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45506    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45507  fi
45508
45509
45510  windows_path="$new_path"
45511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45512    unix_path=`$CYGPATH -u "$windows_path"`
45513    new_path="$unix_path"
45514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45516    new_path="$unix_path"
45517  fi
45518
45519  if test "x$path" != "x$new_path"; then
45520    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45522$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45523  fi
45524
45525  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45526  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45527
45528  else
45529    # We're on a posix platform. Hooray! :)
45530    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45531    has_space=`$ECHO "$path" | $GREP " "`
45532    if test "x$has_space" != x; then
45533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45534$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45535      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45536    fi
45537
45538    # Use eval to expand a potential ~
45539    eval path="$path"
45540    if test ! -f "$path" && test ! -d "$path"; then
45541      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45542    fi
45543
45544    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45545  fi
45546
45547
45548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45549
45550  # Input might be given as Windows format, start by converting to
45551  # unix format.
45552  path="$POTENTIAL_FREETYPE_LIB_PATH"
45553  new_path=`$CYGPATH -u "$path"`
45554
45555  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45556  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45557  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45558  # "foo.exe" is OK but "foo" is an error.
45559  #
45560  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45561  # It is also a way to make sure we got the proper file name for the real test later on.
45562  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45563  if test "x$test_shortpath" = x; then
45564    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45565$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45566    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45567  fi
45568
45569  # Call helper function which possibly converts this using DOS-style short mode.
45570  # If so, the updated path is stored in $new_path.
45571
45572  input_path="$new_path"
45573  # Check if we need to convert this using DOS-style short mode. If the path
45574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45575  # take no chances and rewrite it.
45576  # Note: m4 eats our [], so we need to use [ and ] instead.
45577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45578  if test "x$has_forbidden_chars" != x; then
45579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45580    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45581    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45582    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45583      # Going to short mode and back again did indeed matter. Since short mode is
45584      # case insensitive, let's make it lowercase to improve readability.
45585      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45586      # Now convert it back to Unix-stile (cygpath)
45587      input_path=`$CYGPATH -u "$shortmode_path"`
45588      new_path="$input_path"
45589    fi
45590  fi
45591
45592  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45593  if test "x$test_cygdrive_prefix" = x; then
45594    # As a simple fix, exclude /usr/bin since it's not a real path.
45595    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45596      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45597      # a path prefixed by /cygdrive for fixpath to work.
45598      new_path="$CYGWIN_ROOT_PATH$input_path"
45599    fi
45600  fi
45601
45602
45603  if test "x$path" != "x$new_path"; then
45604    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45606$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45607  fi
45608
45609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45610
45611  path="$POTENTIAL_FREETYPE_LIB_PATH"
45612  has_colon=`$ECHO $path | $GREP ^.:`
45613  new_path="$path"
45614  if test "x$has_colon" = x; then
45615    # Not in mixed or Windows style, start by that.
45616    new_path=`cmd //c echo $path`
45617  fi
45618
45619
45620  input_path="$new_path"
45621  # Check if we need to convert this using DOS-style short mode. If the path
45622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45623  # take no chances and rewrite it.
45624  # Note: m4 eats our [], so we need to use [ and ] instead.
45625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45626  if test "x$has_forbidden_chars" != x; then
45627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45628    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45629  fi
45630
45631
45632  windows_path="$new_path"
45633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45634    unix_path=`$CYGPATH -u "$windows_path"`
45635    new_path="$unix_path"
45636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45638    new_path="$unix_path"
45639  fi
45640
45641  if test "x$path" != "x$new_path"; then
45642    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45644$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45645  fi
45646
45647  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45648  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45649
45650  else
45651    # We're on a posix platform. Hooray! :)
45652    path="$POTENTIAL_FREETYPE_LIB_PATH"
45653    has_space=`$ECHO "$path" | $GREP " "`
45654    if test "x$has_space" != x; then
45655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45656$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45657      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45658    fi
45659
45660    # Use eval to expand a potential ~
45661    eval path="$path"
45662    if test ! -f "$path" && test ! -d "$path"; then
45663      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45664    fi
45665
45666    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45667  fi
45668
45669
45670    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45671    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45672$as_echo_n "checking for freetype includes... " >&6; }
45673    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45674$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45675    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45676    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45677$as_echo_n "checking for freetype libraries... " >&6; }
45678    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45679$as_echo "$FREETYPE_LIB_PATH" >&6; }
45680  fi
45681
45682              if test "x$FOUND_FREETYPE" != xyes; then
45683
45684  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45685  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
45686  METHOD="well-known location"
45687
45688  # First check if the files exists.
45689  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45690    # We found an arbitrary include file. That's a good sign.
45691    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45692$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45693    FOUND_FREETYPE=yes
45694
45695    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45696    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45697      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45698$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45699      FOUND_FREETYPE=no
45700    else
45701      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45702        # On Windows, we will need both .lib and .dll file.
45703        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45704          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45705$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45706          FOUND_FREETYPE=no
45707        fi
45708      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
45709        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45710        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45711      fi
45712    fi
45713  fi
45714
45715  if test "x$FOUND_FREETYPE" = xyes; then
45716
45717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45718
45719  # Input might be given as Windows format, start by converting to
45720  # unix format.
45721  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45722  new_path=`$CYGPATH -u "$path"`
45723
45724  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45725  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45726  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45727  # "foo.exe" is OK but "foo" is an error.
45728  #
45729  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45730  # It is also a way to make sure we got the proper file name for the real test later on.
45731  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45732  if test "x$test_shortpath" = x; then
45733    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45734$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45735    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45736  fi
45737
45738  # Call helper function which possibly converts this using DOS-style short mode.
45739  # If so, the updated path is stored in $new_path.
45740
45741  input_path="$new_path"
45742  # Check if we need to convert this using DOS-style short mode. If the path
45743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45744  # take no chances and rewrite it.
45745  # Note: m4 eats our [], so we need to use [ and ] instead.
45746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45747  if test "x$has_forbidden_chars" != x; then
45748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45749    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45750    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45751    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45752      # Going to short mode and back again did indeed matter. Since short mode is
45753      # case insensitive, let's make it lowercase to improve readability.
45754      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45755      # Now convert it back to Unix-stile (cygpath)
45756      input_path=`$CYGPATH -u "$shortmode_path"`
45757      new_path="$input_path"
45758    fi
45759  fi
45760
45761  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45762  if test "x$test_cygdrive_prefix" = x; then
45763    # As a simple fix, exclude /usr/bin since it's not a real path.
45764    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45765      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45766      # a path prefixed by /cygdrive for fixpath to work.
45767      new_path="$CYGWIN_ROOT_PATH$input_path"
45768    fi
45769  fi
45770
45771
45772  if test "x$path" != "x$new_path"; then
45773    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45775$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45776  fi
45777
45778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45779
45780  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45781  has_colon=`$ECHO $path | $GREP ^.:`
45782  new_path="$path"
45783  if test "x$has_colon" = x; then
45784    # Not in mixed or Windows style, start by that.
45785    new_path=`cmd //c echo $path`
45786  fi
45787
45788
45789  input_path="$new_path"
45790  # Check if we need to convert this using DOS-style short mode. If the path
45791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45792  # take no chances and rewrite it.
45793  # Note: m4 eats our [], so we need to use [ and ] instead.
45794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45795  if test "x$has_forbidden_chars" != x; then
45796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45797    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45798  fi
45799
45800
45801  windows_path="$new_path"
45802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45803    unix_path=`$CYGPATH -u "$windows_path"`
45804    new_path="$unix_path"
45805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45807    new_path="$unix_path"
45808  fi
45809
45810  if test "x$path" != "x$new_path"; then
45811    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45813$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45814  fi
45815
45816  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45817  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45818
45819  else
45820    # We're on a posix platform. Hooray! :)
45821    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45822    has_space=`$ECHO "$path" | $GREP " "`
45823    if test "x$has_space" != x; then
45824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45825$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45826      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45827    fi
45828
45829    # Use eval to expand a potential ~
45830    eval path="$path"
45831    if test ! -f "$path" && test ! -d "$path"; then
45832      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45833    fi
45834
45835    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45836  fi
45837
45838
45839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45840
45841  # Input might be given as Windows format, start by converting to
45842  # unix format.
45843  path="$POTENTIAL_FREETYPE_LIB_PATH"
45844  new_path=`$CYGPATH -u "$path"`
45845
45846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45849  # "foo.exe" is OK but "foo" is an error.
45850  #
45851  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45852  # It is also a way to make sure we got the proper file name for the real test later on.
45853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45854  if test "x$test_shortpath" = x; then
45855    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45856$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45857    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45858  fi
45859
45860  # Call helper function which possibly converts this using DOS-style short mode.
45861  # If so, the updated path is stored in $new_path.
45862
45863  input_path="$new_path"
45864  # Check if we need to convert this using DOS-style short mode. If the path
45865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45866  # take no chances and rewrite it.
45867  # Note: m4 eats our [], so we need to use [ and ] instead.
45868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45869  if test "x$has_forbidden_chars" != x; then
45870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45874      # Going to short mode and back again did indeed matter. Since short mode is
45875      # case insensitive, let's make it lowercase to improve readability.
45876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45877      # Now convert it back to Unix-stile (cygpath)
45878      input_path=`$CYGPATH -u "$shortmode_path"`
45879      new_path="$input_path"
45880    fi
45881  fi
45882
45883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45884  if test "x$test_cygdrive_prefix" = x; then
45885    # As a simple fix, exclude /usr/bin since it's not a real path.
45886    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45888      # a path prefixed by /cygdrive for fixpath to work.
45889      new_path="$CYGWIN_ROOT_PATH$input_path"
45890    fi
45891  fi
45892
45893
45894  if test "x$path" != "x$new_path"; then
45895    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45897$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45898  fi
45899
45900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45901
45902  path="$POTENTIAL_FREETYPE_LIB_PATH"
45903  has_colon=`$ECHO $path | $GREP ^.:`
45904  new_path="$path"
45905  if test "x$has_colon" = x; then
45906    # Not in mixed or Windows style, start by that.
45907    new_path=`cmd //c echo $path`
45908  fi
45909
45910
45911  input_path="$new_path"
45912  # Check if we need to convert this using DOS-style short mode. If the path
45913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45914  # take no chances and rewrite it.
45915  # Note: m4 eats our [], so we need to use [ and ] instead.
45916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45917  if test "x$has_forbidden_chars" != x; then
45918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45919    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45920  fi
45921
45922
45923  windows_path="$new_path"
45924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45925    unix_path=`$CYGPATH -u "$windows_path"`
45926    new_path="$unix_path"
45927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45929    new_path="$unix_path"
45930  fi
45931
45932  if test "x$path" != "x$new_path"; then
45933    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45935$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45936  fi
45937
45938  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45939  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45940
45941  else
45942    # We're on a posix platform. Hooray! :)
45943    path="$POTENTIAL_FREETYPE_LIB_PATH"
45944    has_space=`$ECHO "$path" | $GREP " "`
45945    if test "x$has_space" != x; then
45946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45947$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45948      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45949    fi
45950
45951    # Use eval to expand a potential ~
45952    eval path="$path"
45953    if test ! -f "$path" && test ! -d "$path"; then
45954      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45955    fi
45956
45957    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45958  fi
45959
45960
45961    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45962    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45963$as_echo_n "checking for freetype includes... " >&6; }
45964    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45965$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45966    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45967    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45968$as_echo_n "checking for freetype libraries... " >&6; }
45969    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45970$as_echo "$FREETYPE_LIB_PATH" >&6; }
45971  fi
45972
45973              fi
45974            fi
45975          fi
45976        fi
45977      fi # end check in well-known locations
45978
45979      if test "x$FOUND_FREETYPE" != xyes; then
45980
45981  # Print a helpful message on how to acquire the necessary build dependency.
45982  # freetype is the help tag: freetype, cups, pulse, alsa etc
45983  MISSING_DEPENDENCY=freetype
45984
45985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45986    cygwin_help $MISSING_DEPENDENCY
45987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45988    msys_help $MISSING_DEPENDENCY
45989  else
45990    PKGHANDLER_COMMAND=
45991
45992    case $PKGHANDLER in
45993      apt-get)
45994        apt_help     $MISSING_DEPENDENCY ;;
45995      yum)
45996        yum_help     $MISSING_DEPENDENCY ;;
45997      port)
45998        port_help    $MISSING_DEPENDENCY ;;
45999      pkgutil)
46000        pkgutil_help $MISSING_DEPENDENCY ;;
46001      pkgadd)
46002        pkgadd_help  $MISSING_DEPENDENCY ;;
46003    esac
46004
46005    if test "x$PKGHANDLER_COMMAND" != x; then
46006      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46007    fi
46008  fi
46009
46010        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
46011      fi
46012    fi # end user specified settings
46013
46014    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
46015    if test "x$FREETYPE_CFLAGS" = x; then
46016
46017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46018
46019  # Input might be given as Windows format, start by converting to
46020  # unix format.
46021  path="$FREETYPE_INCLUDE_PATH"
46022  new_path=`$CYGPATH -u "$path"`
46023
46024  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46025  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46026  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46027  # "foo.exe" is OK but "foo" is an error.
46028  #
46029  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46030  # It is also a way to make sure we got the proper file name for the real test later on.
46031  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46032  if test "x$test_shortpath" = x; then
46033    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46034$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46035    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
46036  fi
46037
46038  # Call helper function which possibly converts this using DOS-style short mode.
46039  # If so, the updated path is stored in $new_path.
46040
46041  input_path="$new_path"
46042  # Check if we need to convert this using DOS-style short mode. If the path
46043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46044  # take no chances and rewrite it.
46045  # Note: m4 eats our [], so we need to use [ and ] instead.
46046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46047  if test "x$has_forbidden_chars" != x; then
46048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46049    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46050    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46051    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46052      # Going to short mode and back again did indeed matter. Since short mode is
46053      # case insensitive, let's make it lowercase to improve readability.
46054      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46055      # Now convert it back to Unix-stile (cygpath)
46056      input_path=`$CYGPATH -u "$shortmode_path"`
46057      new_path="$input_path"
46058    fi
46059  fi
46060
46061  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46062  if test "x$test_cygdrive_prefix" = x; then
46063    # As a simple fix, exclude /usr/bin since it's not a real path.
46064    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46065      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46066      # a path prefixed by /cygdrive for fixpath to work.
46067      new_path="$CYGWIN_ROOT_PATH$input_path"
46068    fi
46069  fi
46070
46071
46072  if test "x$path" != "x$new_path"; then
46073    FREETYPE_INCLUDE_PATH="$new_path"
46074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46075$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46076  fi
46077
46078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46079
46080  path="$FREETYPE_INCLUDE_PATH"
46081  has_colon=`$ECHO $path | $GREP ^.:`
46082  new_path="$path"
46083  if test "x$has_colon" = x; then
46084    # Not in mixed or Windows style, start by that.
46085    new_path=`cmd //c echo $path`
46086  fi
46087
46088
46089  input_path="$new_path"
46090  # Check if we need to convert this using DOS-style short mode. If the path
46091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46092  # take no chances and rewrite it.
46093  # Note: m4 eats our [], so we need to use [ and ] instead.
46094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46095  if test "x$has_forbidden_chars" != x; then
46096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46098  fi
46099
46100
46101  windows_path="$new_path"
46102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46103    unix_path=`$CYGPATH -u "$windows_path"`
46104    new_path="$unix_path"
46105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46107    new_path="$unix_path"
46108  fi
46109
46110  if test "x$path" != "x$new_path"; then
46111    FREETYPE_INCLUDE_PATH="$new_path"
46112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46113$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46114  fi
46115
46116  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46117  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46118
46119  else
46120    # We're on a posix platform. Hooray! :)
46121    path="$FREETYPE_INCLUDE_PATH"
46122    has_space=`$ECHO "$path" | $GREP " "`
46123    if test "x$has_space" != x; then
46124      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46125$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46126      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46127    fi
46128
46129    # Use eval to expand a potential ~
46130    eval path="$path"
46131    if test ! -f "$path" && test ! -d "$path"; then
46132      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46133    fi
46134
46135    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46136  fi
46137
46138      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
46139        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
46140      else
46141        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
46142      fi
46143    fi
46144
46145    if test "x$FREETYPE_LIBS" = x; then
46146
46147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46148
46149  # Input might be given as Windows format, start by converting to
46150  # unix format.
46151  path="$FREETYPE_LIB_PATH"
46152  new_path=`$CYGPATH -u "$path"`
46153
46154  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46155  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46156  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46157  # "foo.exe" is OK but "foo" is an error.
46158  #
46159  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46160  # It is also a way to make sure we got the proper file name for the real test later on.
46161  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46162  if test "x$test_shortpath" = x; then
46163    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46164$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46165    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
46166  fi
46167
46168  # Call helper function which possibly converts this using DOS-style short mode.
46169  # If so, the updated path is stored in $new_path.
46170
46171  input_path="$new_path"
46172  # Check if we need to convert this using DOS-style short mode. If the path
46173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46174  # take no chances and rewrite it.
46175  # Note: m4 eats our [], so we need to use [ and ] instead.
46176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46177  if test "x$has_forbidden_chars" != x; then
46178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46179    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46180    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46181    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46182      # Going to short mode and back again did indeed matter. Since short mode is
46183      # case insensitive, let's make it lowercase to improve readability.
46184      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46185      # Now convert it back to Unix-stile (cygpath)
46186      input_path=`$CYGPATH -u "$shortmode_path"`
46187      new_path="$input_path"
46188    fi
46189  fi
46190
46191  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46192  if test "x$test_cygdrive_prefix" = x; then
46193    # As a simple fix, exclude /usr/bin since it's not a real path.
46194    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46195      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46196      # a path prefixed by /cygdrive for fixpath to work.
46197      new_path="$CYGWIN_ROOT_PATH$input_path"
46198    fi
46199  fi
46200
46201
46202  if test "x$path" != "x$new_path"; then
46203    FREETYPE_LIB_PATH="$new_path"
46204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46205$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46206  fi
46207
46208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46209
46210  path="$FREETYPE_LIB_PATH"
46211  has_colon=`$ECHO $path | $GREP ^.:`
46212  new_path="$path"
46213  if test "x$has_colon" = x; then
46214    # Not in mixed or Windows style, start by that.
46215    new_path=`cmd //c echo $path`
46216  fi
46217
46218
46219  input_path="$new_path"
46220  # Check if we need to convert this using DOS-style short mode. If the path
46221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46222  # take no chances and rewrite it.
46223  # Note: m4 eats our [], so we need to use [ and ] instead.
46224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46225  if test "x$has_forbidden_chars" != x; then
46226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46228  fi
46229
46230
46231  windows_path="$new_path"
46232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46233    unix_path=`$CYGPATH -u "$windows_path"`
46234    new_path="$unix_path"
46235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46237    new_path="$unix_path"
46238  fi
46239
46240  if test "x$path" != "x$new_path"; then
46241    FREETYPE_LIB_PATH="$new_path"
46242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46243$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46244  fi
46245
46246  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46247  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46248
46249  else
46250    # We're on a posix platform. Hooray! :)
46251    path="$FREETYPE_LIB_PATH"
46252    has_space=`$ECHO "$path" | $GREP " "`
46253    if test "x$has_space" != x; then
46254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46255$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46256      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46257    fi
46258
46259    # Use eval to expand a potential ~
46260    eval path="$path"
46261    if test ! -f "$path" && test ! -d "$path"; then
46262      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46263    fi
46264
46265    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46266  fi
46267
46268      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46269        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
46270      else
46271        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
46272      fi
46273    fi
46274
46275    # Try to compile it
46276    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
46277$as_echo_n "checking if we can compile and link with freetype... " >&6; }
46278    ac_ext=cpp
46279ac_cpp='$CXXCPP $CPPFLAGS'
46280ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46281ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46282ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46283
46284    PREV_CXXCFLAGS="$CXXFLAGS"
46285    PREV_LIBS="$LIBS"
46286    PREV_CXX="$CXX"
46287    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
46288    LIBS="$LIBS $FREETYPE_LIBS"
46289    CXX="$FIXPATH $CXX"
46290    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46291/* end confdefs.h.  */
46292
46293          #include<ft2build.h>
46294          #include FT_FREETYPE_H
46295          int main () {
46296            FT_Init_FreeType(NULL);
46297            return 0;
46298          }
46299
46300_ACEOF
46301if ac_fn_cxx_try_link "$LINENO"; then :
46302
46303          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46304$as_echo "yes" >&6; }
46305
46306else
46307
46308          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46309$as_echo "no" >&6; }
46310          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
46311$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
46312          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
46313$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
46314
46315
46316  # Print a helpful message on how to acquire the necessary build dependency.
46317  # freetype is the help tag: freetype, cups, pulse, alsa etc
46318  MISSING_DEPENDENCY=freetype
46319
46320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46321    cygwin_help $MISSING_DEPENDENCY
46322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46323    msys_help $MISSING_DEPENDENCY
46324  else
46325    PKGHANDLER_COMMAND=
46326
46327    case $PKGHANDLER in
46328      apt-get)
46329        apt_help     $MISSING_DEPENDENCY ;;
46330      yum)
46331        yum_help     $MISSING_DEPENDENCY ;;
46332      port)
46333        port_help    $MISSING_DEPENDENCY ;;
46334      pkgutil)
46335        pkgutil_help $MISSING_DEPENDENCY ;;
46336      pkgadd)
46337        pkgadd_help  $MISSING_DEPENDENCY ;;
46338    esac
46339
46340    if test "x$PKGHANDLER_COMMAND" != x; then
46341      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46342    fi
46343  fi
46344
46345
46346          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
46347
46348
46349fi
46350rm -f core conftest.err conftest.$ac_objext \
46351    conftest$ac_exeext conftest.$ac_ext
46352    CXXCFLAGS="$PREV_CXXFLAGS"
46353    LIBS="$PREV_LIBS"
46354    CXX="$PREV_CXX"
46355    ac_ext=cpp
46356ac_cpp='$CXXCPP $CPPFLAGS'
46357ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46358ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46359ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46360
46361
46362    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
46363$as_echo_n "checking if we should bundle freetype... " >&6; }
46364    if test "x$BUNDLE_FREETYPE" = xyes; then
46365      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
46366    fi
46367    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
46368$as_echo "$BUNDLE_FREETYPE" >&6; }
46369
46370  fi # end freetype needed
46371
46372
46373
46374
46375
46376
46377
46378  ###############################################################################
46379  #
46380  # Check for alsa headers and libraries. Used on Linux/GNU systems.
46381  #
46382
46383# Check whether --with-alsa was given.
46384if test "${with_alsa+set}" = set; then :
46385  withval=$with_alsa;
46386fi
46387
46388
46389# Check whether --with-alsa-include was given.
46390if test "${with_alsa_include+set}" = set; then :
46391  withval=$with_alsa_include;
46392fi
46393
46394
46395# Check whether --with-alsa-lib was given.
46396if test "${with_alsa_lib+set}" = set; then :
46397  withval=$with_alsa_lib;
46398fi
46399
46400
46401  if test "x$ALSA_NOT_NEEDED" = xyes; then
46402    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
46403      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
46404$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
46405    fi
46406    ALSA_CFLAGS=
46407    ALSA_LIBS=
46408  else
46409    ALSA_FOUND=no
46410
46411    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
46412      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
46413    fi
46414
46415    if test "x${with_alsa}" != x; then
46416      ALSA_LIBS="-L${with_alsa}/lib -lasound"
46417      ALSA_CFLAGS="-I${with_alsa}/include"
46418      ALSA_FOUND=yes
46419    fi
46420    if test "x${with_alsa_include}" != x; then
46421      ALSA_CFLAGS="-I${with_alsa_include}"
46422      ALSA_FOUND=yes
46423    fi
46424    if test "x${with_alsa_lib}" != x; then
46425      ALSA_LIBS="-L${with_alsa_lib} -lasound"
46426      ALSA_FOUND=yes
46427    fi
46428    if test "x$ALSA_FOUND" = xno; then
46429
46430
46431  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
46432    # Source the builddeps file again, to make sure it uses the latest variables!
46433    . $builddepsfile
46434    # Look for a target and build machine specific resource!
46435    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
46436    if test "x$resource" = x; then
46437      # Ok, lets instead look for a target specific resource
46438      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
46439    fi
46440    if test "x$resource" = x; then
46441      # Ok, lets instead look for a build specific resource
46442      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
46443    fi
46444    if test "x$resource" = x; then
46445      # Ok, lets instead look for a generic resource
46446      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
46447      resource=${builddep_alsa}
46448    fi
46449    if test "x$resource" != x; then
46450      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
46451$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
46452      # If the resource in the builddeps.conf file is an existing directory,
46453      # for example /java/linux/cups
46454      if test -d ${resource}; then
46455        depdir=${resource}
46456      else
46457
46458  # alsa is for example mymodule
46459  # $resource is for example libs/general/libmymod_1_2_3.zip
46460  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
46461  # $with_builddeps_dir is for example /localhome/builddeps
46462  # depdir is the name of the variable into which we store the depdir, eg MYMOD
46463  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
46464  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
46465  filename=`basename $resource`
46466  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
46467  filebase=${filename%%.*}
46468  extension=${filename#*.}
46469  installdir=$with_builddeps_dir/$filebase
46470  if test ! -f $installdir/$filename.unpacked; then
46471    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
46472$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
46473    if test ! -d $installdir; then
46474      mkdir -p $installdir
46475    fi
46476    if test ! -d $installdir; then
46477      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
46478    fi
46479    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
46480    touch $tmpfile
46481    if test ! -f $tmpfile; then
46482      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
46483    fi
46484
46485  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
46486  # $tmpfile is the local file name for the downloaded file.
46487  VALID_TOOL=no
46488  if test "x$BDEPS_FTP" = xwget; then
46489    VALID_TOOL=yes
46490    wget -O $tmpfile $with_builddeps_server/$resource
46491  fi
46492  if test "x$BDEPS_FTP" = xlftp; then
46493    VALID_TOOL=yes
46494    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
46495  fi
46496  if test "x$BDEPS_FTP" = xftp; then
46497    VALID_TOOL=yes
46498    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
46499    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
46500    FTPUSERPWD=${FTPSERVER%%@*}
46501    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
46502      FTPUSER=${userpwd%%:*}
46503      FTPPWD=${userpwd#*@}
46504      FTPSERVER=${FTPSERVER#*@}
46505    else
46506      FTPUSER=ftp
46507      FTPPWD=ftp
46508    fi
46509    # the "pass" command does not work on some
46510    # ftp clients (read ftp.exe) but if it works,
46511    # passive mode is better!
46512    ( \
46513        echo "user $FTPUSER $FTPPWD"        ; \
46514        echo "pass"                         ; \
46515        echo "bin"                          ; \
46516        echo "get $FTPPATH $tmpfile"              ; \
46517    ) | ftp -in $FTPSERVER
46518  fi
46519  if test "x$VALID_TOOL" != xyes; then
46520    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
46521  fi
46522
46523    mv $tmpfile $installdir/$filename
46524    if test ! -s $installdir/$filename; then
46525      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
46526    fi
46527    case "$extension" in
46528      zip)  echo "Unzipping $installdir/$filename..."
46529        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
46530        ;;
46531      tar.gz) echo "Untaring $installdir/$filename..."
46532        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46533        ;;
46534      tgz) echo "Untaring $installdir/$filename..."
46535        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46536        ;;
46537      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
46538        ;;
46539    esac
46540  fi
46541  if test -f $installdir/$filename.unpacked; then
46542    depdir=$installdir
46543  fi
46544
46545      fi
46546      # Source the builddeps file again, because in the previous command, the depdir
46547      # was updated to point at the current build dependency install directory.
46548      . $builddepsfile
46549      # Now extract variables from the builddeps.conf files.
46550      theroot=${builddep_alsa_ROOT}
46551      thecflags=${builddep_alsa_CFLAGS}
46552      thelibs=${builddep_alsa_LIBS}
46553      if test "x$depdir" = x; then
46554        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
46555      fi
46556      ALSA=$depdir
46557      if test "x$theroot" != x; then
46558        ALSA="$theroot"
46559      fi
46560      if test "x$thecflags" != x; then
46561        ALSA_CFLAGS="$thecflags"
46562      fi
46563      if test "x$thelibs" != x; then
46564        ALSA_LIBS="$thelibs"
46565      fi
46566      ALSA_FOUND=yes
46567      else ALSA_FOUND=no
46568
46569    fi
46570    else ALSA_FOUND=no
46571
46572  fi
46573
46574    fi
46575    if test "x$ALSA_FOUND" = xno; then
46576
46577pkg_failed=no
46578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
46579$as_echo_n "checking for ALSA... " >&6; }
46580
46581if test -n "$ALSA_CFLAGS"; then
46582    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
46583 elif test -n "$PKG_CONFIG"; then
46584    if test -n "$PKG_CONFIG" && \
46585    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46586  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46587  ac_status=$?
46588  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46589  test $ac_status = 0; }; then
46590  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
46591else
46592  pkg_failed=yes
46593fi
46594 else
46595    pkg_failed=untried
46596fi
46597if test -n "$ALSA_LIBS"; then
46598    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
46599 elif test -n "$PKG_CONFIG"; then
46600    if test -n "$PKG_CONFIG" && \
46601    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46602  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46603  ac_status=$?
46604  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46605  test $ac_status = 0; }; then
46606  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
46607else
46608  pkg_failed=yes
46609fi
46610 else
46611    pkg_failed=untried
46612fi
46613
46614
46615
46616if test $pkg_failed = yes; then
46617
46618if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
46619        _pkg_short_errors_supported=yes
46620else
46621        _pkg_short_errors_supported=no
46622fi
46623        if test $_pkg_short_errors_supported = yes; then
46624	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
46625        else
46626	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
46627        fi
46628	# Put the nasty error message in config.log where it belongs
46629	echo "$ALSA_PKG_ERRORS" >&5
46630
46631	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46632$as_echo "no" >&6; }
46633                ALSA_FOUND=no
46634elif test $pkg_failed = untried; then
46635	ALSA_FOUND=no
46636else
46637	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
46638	ALSA_LIBS=$pkg_cv_ALSA_LIBS
46639        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46640$as_echo "yes" >&6; }
46641	ALSA_FOUND=yes
46642fi
46643    fi
46644    if test "x$ALSA_FOUND" = xno; then
46645      for ac_header in alsa/asoundlib.h
46646do :
46647  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
46648if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
46649  cat >>confdefs.h <<_ACEOF
46650#define HAVE_ALSA_ASOUNDLIB_H 1
46651_ACEOF
46652
46653            ALSA_FOUND=yes
46654            ALSA_CFLAGS=-Iignoreme
46655            ALSA_LIBS=-lasound
46656            DEFAULT_ALSA=yes
46657
46658else
46659  ALSA_FOUND=no
46660fi
46661
46662done
46663
46664    fi
46665    if test "x$ALSA_FOUND" = xno; then
46666
46667  # Print a helpful message on how to acquire the necessary build dependency.
46668  # alsa is the help tag: freetype, cups, pulse, alsa etc
46669  MISSING_DEPENDENCY=alsa
46670
46671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46672    cygwin_help $MISSING_DEPENDENCY
46673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46674    msys_help $MISSING_DEPENDENCY
46675  else
46676    PKGHANDLER_COMMAND=
46677
46678    case $PKGHANDLER in
46679      apt-get)
46680        apt_help     $MISSING_DEPENDENCY ;;
46681      yum)
46682        yum_help     $MISSING_DEPENDENCY ;;
46683      port)
46684        port_help    $MISSING_DEPENDENCY ;;
46685      pkgutil)
46686        pkgutil_help $MISSING_DEPENDENCY ;;
46687      pkgadd)
46688        pkgadd_help  $MISSING_DEPENDENCY ;;
46689    esac
46690
46691    if test "x$PKGHANDLER_COMMAND" != x; then
46692      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46693    fi
46694  fi
46695
46696      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
46697    fi
46698  fi
46699
46700
46701
46702
46703
46704
46705  ###############################################################################
46706  #
46707  # Check for the jpeg library
46708  #
46709
46710  USE_EXTERNAL_LIBJPEG=true
46711  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
46712$as_echo_n "checking for main in -ljpeg... " >&6; }
46713if ${ac_cv_lib_jpeg_main+:} false; then :
46714  $as_echo_n "(cached) " >&6
46715else
46716  ac_check_lib_save_LIBS=$LIBS
46717LIBS="-ljpeg  $LIBS"
46718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46719/* end confdefs.h.  */
46720
46721
46722int
46723main ()
46724{
46725return main ();
46726  ;
46727  return 0;
46728}
46729_ACEOF
46730if ac_fn_cxx_try_link "$LINENO"; then :
46731  ac_cv_lib_jpeg_main=yes
46732else
46733  ac_cv_lib_jpeg_main=no
46734fi
46735rm -f core conftest.err conftest.$ac_objext \
46736    conftest$ac_exeext conftest.$ac_ext
46737LIBS=$ac_check_lib_save_LIBS
46738fi
46739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
46740$as_echo "$ac_cv_lib_jpeg_main" >&6; }
46741if test "x$ac_cv_lib_jpeg_main" = xyes; then :
46742  cat >>confdefs.h <<_ACEOF
46743#define HAVE_LIBJPEG 1
46744_ACEOF
46745
46746  LIBS="-ljpeg $LIBS"
46747
46748else
46749   USE_EXTERNAL_LIBJPEG=false
46750      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
46751$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
46752
46753fi
46754
46755
46756
46757  ###############################################################################
46758  #
46759  # Check for the gif library
46760  #
46761
46762
46763# Check whether --with-giflib was given.
46764if test "${with_giflib+set}" = set; then :
46765  withval=$with_giflib;
46766fi
46767
46768
46769
46770  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
46771$as_echo_n "checking for which giflib to use... " >&6; }
46772
46773  # default is bundled
46774  DEFAULT_GIFLIB=bundled
46775
46776  #
46777  # if user didn't specify, use DEFAULT_GIFLIB
46778  #
46779  if test "x${with_giflib}" = "x"; then
46780    with_giflib=${DEFAULT_GIFLIB}
46781  fi
46782
46783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
46784$as_echo "${with_giflib}" >&6; }
46785
46786  if test "x${with_giflib}" = "xbundled"; then
46787    USE_EXTERNAL_LIBGIF=false
46788  elif test "x${with_giflib}" = "xsystem"; then
46789    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
46790if test "x$ac_cv_header_gif_lib_h" = xyes; then :
46791
46792else
46793   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
46794fi
46795
46796
46797    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
46798$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
46799if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
46800  $as_echo_n "(cached) " >&6
46801else
46802  ac_check_lib_save_LIBS=$LIBS
46803LIBS="-lgif  $LIBS"
46804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46805/* end confdefs.h.  */
46806
46807/* Override any GCC internal prototype to avoid an error.
46808   Use char because int might match the return type of a GCC
46809   builtin and then its argument prototype would still apply.  */
46810#ifdef __cplusplus
46811extern "C"
46812#endif
46813char DGifGetCode ();
46814int
46815main ()
46816{
46817return DGifGetCode ();
46818  ;
46819  return 0;
46820}
46821_ACEOF
46822if ac_fn_cxx_try_link "$LINENO"; then :
46823  ac_cv_lib_gif_DGifGetCode=yes
46824else
46825  ac_cv_lib_gif_DGifGetCode=no
46826fi
46827rm -f core conftest.err conftest.$ac_objext \
46828    conftest$ac_exeext conftest.$ac_ext
46829LIBS=$ac_check_lib_save_LIBS
46830fi
46831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
46832$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
46833if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
46834  cat >>confdefs.h <<_ACEOF
46835#define HAVE_LIBGIF 1
46836_ACEOF
46837
46838  LIBS="-lgif $LIBS"
46839
46840else
46841   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
46842fi
46843
46844
46845    USE_EXTERNAL_LIBGIF=true
46846  else
46847    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
46848  fi
46849
46850
46851  ###############################################################################
46852  #
46853  # Check for the zlib library
46854  #
46855
46856
46857# Check whether --with-zlib was given.
46858if test "${with_zlib+set}" = set; then :
46859  withval=$with_zlib;
46860fi
46861
46862
46863  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
46864$as_echo_n "checking for compress in -lz... " >&6; }
46865if ${ac_cv_lib_z_compress+:} false; then :
46866  $as_echo_n "(cached) " >&6
46867else
46868  ac_check_lib_save_LIBS=$LIBS
46869LIBS="-lz  $LIBS"
46870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46871/* end confdefs.h.  */
46872
46873/* Override any GCC internal prototype to avoid an error.
46874   Use char because int might match the return type of a GCC
46875   builtin and then its argument prototype would still apply.  */
46876#ifdef __cplusplus
46877extern "C"
46878#endif
46879char compress ();
46880int
46881main ()
46882{
46883return compress ();
46884  ;
46885  return 0;
46886}
46887_ACEOF
46888if ac_fn_cxx_try_link "$LINENO"; then :
46889  ac_cv_lib_z_compress=yes
46890else
46891  ac_cv_lib_z_compress=no
46892fi
46893rm -f core conftest.err conftest.$ac_objext \
46894    conftest$ac_exeext conftest.$ac_ext
46895LIBS=$ac_check_lib_save_LIBS
46896fi
46897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
46898$as_echo "$ac_cv_lib_z_compress" >&6; }
46899if test "x$ac_cv_lib_z_compress" = xyes; then :
46900   ZLIB_FOUND=yes
46901else
46902   ZLIB_FOUND=no
46903fi
46904
46905
46906  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
46907$as_echo_n "checking for which zlib to use... " >&6; }
46908
46909  DEFAULT_ZLIB=bundled
46910  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46911    #
46912    # On macosx default is system...on others default is
46913    #
46914    DEFAULT_ZLIB=system
46915  fi
46916
46917  if test "x${ZLIB_FOUND}" != "xyes"; then
46918    #
46919    # If we don't find any system...set default to bundled
46920    #
46921    DEFAULT_ZLIB=bundled
46922  fi
46923
46924  #
46925  # If user didn't specify, use DEFAULT_ZLIB
46926  #
46927  if test "x${with_zlib}" = "x"; then
46928    with_zlib=${DEFAULT_ZLIB}
46929  fi
46930
46931  if test "x${with_zlib}" = "xbundled"; then
46932    USE_EXTERNAL_LIBZ=false
46933    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
46934$as_echo "bundled" >&6; }
46935  elif test "x${with_zlib}" = "xsystem"; then
46936    if test "x${ZLIB_FOUND}" = "xyes"; then
46937      USE_EXTERNAL_LIBZ=true
46938      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
46939$as_echo "system" >&6; }
46940    else
46941      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
46942$as_echo "system not found" >&6; }
46943      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
46944    fi
46945  else
46946    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
46947  fi
46948
46949
46950
46951  ###############################################################################
46952  LIBZIP_CAN_USE_MMAP=true
46953
46954
46955
46956  ###############################################################################
46957  #
46958  # Check if altzone exists in time.h
46959  #
46960
46961  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46962/* end confdefs.h.  */
46963#include <time.h>
46964int
46965main ()
46966{
46967return (int)altzone;
46968  ;
46969  return 0;
46970}
46971_ACEOF
46972if ac_fn_cxx_try_link "$LINENO"; then :
46973  has_altzone=yes
46974else
46975  has_altzone=no
46976fi
46977rm -f core conftest.err conftest.$ac_objext \
46978    conftest$ac_exeext conftest.$ac_ext
46979  if test "x$has_altzone" = xyes; then
46980
46981$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
46982
46983  fi
46984
46985  ###############################################################################
46986  #
46987  # Check the maths library
46988  #
46989
46990  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
46991$as_echo_n "checking for cos in -lm... " >&6; }
46992if ${ac_cv_lib_m_cos+:} false; then :
46993  $as_echo_n "(cached) " >&6
46994else
46995  ac_check_lib_save_LIBS=$LIBS
46996LIBS="-lm  $LIBS"
46997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46998/* end confdefs.h.  */
46999
47000/* Override any GCC internal prototype to avoid an error.
47001   Use char because int might match the return type of a GCC
47002   builtin and then its argument prototype would still apply.  */
47003#ifdef __cplusplus
47004extern "C"
47005#endif
47006char cos ();
47007int
47008main ()
47009{
47010return cos ();
47011  ;
47012  return 0;
47013}
47014_ACEOF
47015if ac_fn_cxx_try_link "$LINENO"; then :
47016  ac_cv_lib_m_cos=yes
47017else
47018  ac_cv_lib_m_cos=no
47019fi
47020rm -f core conftest.err conftest.$ac_objext \
47021    conftest$ac_exeext conftest.$ac_ext
47022LIBS=$ac_check_lib_save_LIBS
47023fi
47024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
47025$as_echo "$ac_cv_lib_m_cos" >&6; }
47026if test "x$ac_cv_lib_m_cos" = xyes; then :
47027  cat >>confdefs.h <<_ACEOF
47028#define HAVE_LIBM 1
47029_ACEOF
47030
47031  LIBS="-lm $LIBS"
47032
47033else
47034
47035        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
47036$as_echo "$as_me: Maths library was not found" >&6;}
47037
47038
47039fi
47040
47041
47042
47043  ###############################################################################
47044  #
47045  # Check for libdl.so
47046
47047  save_LIBS="$LIBS"
47048  LIBS=""
47049  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
47050$as_echo_n "checking for dlopen in -ldl... " >&6; }
47051if ${ac_cv_lib_dl_dlopen+:} false; then :
47052  $as_echo_n "(cached) " >&6
47053else
47054  ac_check_lib_save_LIBS=$LIBS
47055LIBS="-ldl  $LIBS"
47056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47057/* end confdefs.h.  */
47058
47059/* Override any GCC internal prototype to avoid an error.
47060   Use char because int might match the return type of a GCC
47061   builtin and then its argument prototype would still apply.  */
47062#ifdef __cplusplus
47063extern "C"
47064#endif
47065char dlopen ();
47066int
47067main ()
47068{
47069return dlopen ();
47070  ;
47071  return 0;
47072}
47073_ACEOF
47074if ac_fn_cxx_try_link "$LINENO"; then :
47075  ac_cv_lib_dl_dlopen=yes
47076else
47077  ac_cv_lib_dl_dlopen=no
47078fi
47079rm -f core conftest.err conftest.$ac_objext \
47080    conftest$ac_exeext conftest.$ac_ext
47081LIBS=$ac_check_lib_save_LIBS
47082fi
47083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
47084$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
47085if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
47086  cat >>confdefs.h <<_ACEOF
47087#define HAVE_LIBDL 1
47088_ACEOF
47089
47090  LIBS="-ldl $LIBS"
47091
47092fi
47093
47094  LIBDL="$LIBS"
47095
47096  LIBS="$save_LIBS"
47097
47098
47099  ###############################################################################
47100  #
47101  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47102  # dynamic build is configured on command line.
47103  #
47104
47105# Check whether --with-stdc++lib was given.
47106if test "${with_stdc__lib+set}" = set; then :
47107  withval=$with_stdc__lib;
47108        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47109                && test "x$with_stdc__lib" != xdefault; then
47110          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47111        fi
47112
47113else
47114  with_stdc__lib=default
47115
47116fi
47117
47118
47119  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47120    # Test if -lstdc++ works.
47121    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47122$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47123    ac_ext=cpp
47124ac_cpp='$CXXCPP $CPPFLAGS'
47125ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47126ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47127ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47128
47129    OLD_CXXFLAGS="$CXXFLAGS"
47130    CXXFLAGS="$CXXFLAGS -lstdc++"
47131    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47132/* end confdefs.h.  */
47133
47134int
47135main ()
47136{
47137return 0;
47138  ;
47139  return 0;
47140}
47141_ACEOF
47142if ac_fn_cxx_try_link "$LINENO"; then :
47143  has_dynamic_libstdcxx=yes
47144else
47145  has_dynamic_libstdcxx=no
47146fi
47147rm -f core conftest.err conftest.$ac_objext \
47148    conftest$ac_exeext conftest.$ac_ext
47149    CXXFLAGS="$OLD_CXXFLAGS"
47150    ac_ext=cpp
47151ac_cpp='$CXXCPP $CPPFLAGS'
47152ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47153ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47154ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47155
47156    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47157$as_echo "$has_dynamic_libstdcxx" >&6; }
47158
47159    # Test if stdc++ can be linked statically.
47160    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47161$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47162    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47163    ac_ext=cpp
47164ac_cpp='$CXXCPP $CPPFLAGS'
47165ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47166ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47167ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47168
47169    OLD_LIBS="$LIBS"
47170    OLD_CXX="$CXX"
47171    LIBS="$STATIC_STDCXX_FLAGS"
47172    CXX="$CC"
47173    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47174/* end confdefs.h.  */
47175
47176int
47177main ()
47178{
47179return 0;
47180  ;
47181  return 0;
47182}
47183_ACEOF
47184if ac_fn_cxx_try_link "$LINENO"; then :
47185  has_static_libstdcxx=yes
47186else
47187  has_static_libstdcxx=no
47188fi
47189rm -f core conftest.err conftest.$ac_objext \
47190    conftest$ac_exeext conftest.$ac_ext
47191    LIBS="$OLD_LIBS"
47192    CXX="$OLD_CXX"
47193    ac_ext=cpp
47194ac_cpp='$CXXCPP $CPPFLAGS'
47195ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47196ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47197ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47198
47199    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47200$as_echo "$has_static_libstdcxx" >&6; }
47201
47202    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47203      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47204    fi
47205
47206    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47207      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47208    fi
47209
47210    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47211      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47212    fi
47213
47214    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47215$as_echo_n "checking how to link with libstdc++... " >&6; }
47216    # If dynamic was requested, it's available since it would fail above otherwise.
47217    # If dynamic wasn't requested, go with static unless it isn't available.
47218    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47219      LIBCXX="$LIBCXX -lstdc++"
47220      LDCXX="$CXX"
47221      STATIC_CXX_SETTING="STATIC_CXX=false"
47222      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47223$as_echo "dynamic" >&6; }
47224    else
47225      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47226      LDCXX="$CC"
47227      STATIC_CXX_SETTING="STATIC_CXX=true"
47228      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47229$as_echo "static" >&6; }
47230    fi
47231  fi
47232
47233
47234  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47235    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
47236
47237pkg_failed=no
47238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
47239$as_echo_n "checking for LIBFFI... " >&6; }
47240
47241if test -n "$LIBFFI_CFLAGS"; then
47242    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
47243 elif test -n "$PKG_CONFIG"; then
47244    if test -n "$PKG_CONFIG" && \
47245    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47246  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47247  ac_status=$?
47248  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47249  test $ac_status = 0; }; then
47250  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
47251else
47252  pkg_failed=yes
47253fi
47254 else
47255    pkg_failed=untried
47256fi
47257if test -n "$LIBFFI_LIBS"; then
47258    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
47259 elif test -n "$PKG_CONFIG"; then
47260    if test -n "$PKG_CONFIG" && \
47261    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47262  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47263  ac_status=$?
47264  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47265  test $ac_status = 0; }; then
47266  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
47267else
47268  pkg_failed=yes
47269fi
47270 else
47271    pkg_failed=untried
47272fi
47273
47274
47275
47276if test $pkg_failed = yes; then
47277
47278if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47279        _pkg_short_errors_supported=yes
47280else
47281        _pkg_short_errors_supported=no
47282fi
47283        if test $_pkg_short_errors_supported = yes; then
47284	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
47285        else
47286	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
47287        fi
47288	# Put the nasty error message in config.log where it belongs
47289	echo "$LIBFFI_PKG_ERRORS" >&5
47290
47291	as_fn_error $? "Package requirements (libffi) were not met:
47292
47293$LIBFFI_PKG_ERRORS
47294
47295Consider adjusting the PKG_CONFIG_PATH environment variable if you
47296installed software in a non-standard prefix.
47297
47298Alternatively, you may set the environment variables LIBFFI_CFLAGS
47299and LIBFFI_LIBS to avoid the need to call pkg-config.
47300See the pkg-config man page for more details.
47301" "$LINENO" 5
47302elif test $pkg_failed = untried; then
47303	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47304$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47305as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
47306is in your PATH or set the PKG_CONFIG environment variable to the full
47307path to pkg-config.
47308
47309Alternatively, you may set the environment variables LIBFFI_CFLAGS
47310and LIBFFI_LIBS to avoid the need to call pkg-config.
47311See the pkg-config man page for more details.
47312
47313To get pkg-config, see <http://pkg-config.freedesktop.org/>.
47314See \`config.log' for more details" "$LINENO" 5; }
47315else
47316	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
47317	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
47318        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47319$as_echo "yes" >&6; }
47320	:
47321fi
47322
47323  fi
47324
47325  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47326    # Extract the first word of "llvm-config", so it can be a program name with args.
47327set dummy llvm-config; ac_word=$2
47328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47329$as_echo_n "checking for $ac_word... " >&6; }
47330if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
47331  $as_echo_n "(cached) " >&6
47332else
47333  if test -n "$LLVM_CONFIG"; then
47334  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
47335else
47336as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47337for as_dir in $PATH
47338do
47339  IFS=$as_save_IFS
47340  test -z "$as_dir" && as_dir=.
47341    for ac_exec_ext in '' $ac_executable_extensions; do
47342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47343    ac_cv_prog_LLVM_CONFIG="llvm-config"
47344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47345    break 2
47346  fi
47347done
47348  done
47349IFS=$as_save_IFS
47350
47351fi
47352fi
47353LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
47354if test -n "$LLVM_CONFIG"; then
47355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
47356$as_echo "$LLVM_CONFIG" >&6; }
47357else
47358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47359$as_echo "no" >&6; }
47360fi
47361
47362
47363
47364    if test "x$LLVM_CONFIG" != xllvm-config; then
47365      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
47366    fi
47367
47368    llvm_components="jit mcjit engine nativecodegen native"
47369    unset LLVM_CFLAGS
47370    for flag in $("$LLVM_CONFIG" --cxxflags); do
47371      if echo "${flag}" | grep -q '^-[ID]'; then
47372        if test "${flag}" != "-D_DEBUG" ; then
47373          if test "${LLVM_CFLAGS}" != "" ; then
47374            LLVM_CFLAGS="${LLVM_CFLAGS} "
47375          fi
47376          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
47377        fi
47378      fi
47379    done
47380    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
47381    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
47382
47383    unset LLVM_LDFLAGS
47384    for flag in $("${LLVM_CONFIG}" --ldflags); do
47385      if echo "${flag}" | grep -q '^-L'; then
47386        if test "${LLVM_LDFLAGS}" != ""; then
47387          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
47388        fi
47389        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
47390      fi
47391    done
47392
47393    unset LLVM_LIBS
47394    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
47395      if echo "${flag}" | grep -q '^-l'; then
47396        if test "${LLVM_LIBS}" != ""; then
47397          LLVM_LIBS="${LLVM_LIBS} "
47398        fi
47399        LLVM_LIBS="${LLVM_LIBS}${flag}"
47400      fi
47401    done
47402
47403
47404
47405
47406  fi
47407
47408  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47409  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47410    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47411  fi
47412
47413  # TODO better (platform agnostic) test
47414  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47415    LIBCXX="-lstdc++"
47416  fi
47417
47418
47419
47420
47421  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47422
47423
47424# Check whether --with-msvcr-dll was given.
47425if test "${with_msvcr_dll+set}" = set; then :
47426  withval=$with_msvcr_dll;
47427fi
47428
47429
47430  if test "x$with_msvcr_dll" != x; then
47431    # If given explicitely by user, do not probe. If not present, fail directly.
47432
47433  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
47434  METHOD="--with-msvcr-dll"
47435  if test -e "$POSSIBLE_MSVCR_DLL"; then
47436    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47437$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47438
47439    # Need to check if the found msvcr is correct architecture
47440    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47441$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47442    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47443    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47444      CORRECT_MSVCR_ARCH=386
47445    else
47446      CORRECT_MSVCR_ARCH=x86-64
47447    fi
47448    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47449      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47450$as_echo "ok" >&6; }
47451      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47452      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47453$as_echo_n "checking for msvcr100.dll... " >&6; }
47454      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47455$as_echo "$MSVCR_DLL" >&6; }
47456    else
47457      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47458$as_echo "incorrect, ignoring" >&6; }
47459      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47460$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47461    fi
47462  fi
47463
47464    if test "x$MSVCR_DLL" = x; then
47465      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
47466    fi
47467  fi
47468
47469  if test "x$MSVCR_DLL" = x; then
47470    # Probe: Using well-known location from Visual Studio 10.0
47471    if test "x$VCINSTALLDIR" != x; then
47472      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
47473
47474  windows_path="$CYGWIN_VC_INSTALL_DIR"
47475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47476    unix_path=`$CYGPATH -u "$windows_path"`
47477    CYGWIN_VC_INSTALL_DIR="$unix_path"
47478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47480    CYGWIN_VC_INSTALL_DIR="$unix_path"
47481  fi
47482
47483      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47484        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
47485      else
47486        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
47487      fi
47488
47489  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47490  METHOD="well-known location in VCINSTALLDIR"
47491  if test -e "$POSSIBLE_MSVCR_DLL"; then
47492    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47493$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47494
47495    # Need to check if the found msvcr is correct architecture
47496    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47497$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47498    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47499    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47500      CORRECT_MSVCR_ARCH=386
47501    else
47502      CORRECT_MSVCR_ARCH=x86-64
47503    fi
47504    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47505      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47506$as_echo "ok" >&6; }
47507      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47508      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47509$as_echo_n "checking for msvcr100.dll... " >&6; }
47510      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47511$as_echo "$MSVCR_DLL" >&6; }
47512    else
47513      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47514$as_echo "incorrect, ignoring" >&6; }
47515      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47516$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47517    fi
47518  fi
47519
47520    fi
47521  fi
47522
47523  if test "x$MSVCR_DLL" = x; then
47524    # Probe: Check in the Boot JDK directory.
47525    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
47526
47527  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47528  METHOD="well-known location in Boot JDK"
47529  if test -e "$POSSIBLE_MSVCR_DLL"; then
47530    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47531$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47532
47533    # Need to check if the found msvcr is correct architecture
47534    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47535$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47536    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47537    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47538      CORRECT_MSVCR_ARCH=386
47539    else
47540      CORRECT_MSVCR_ARCH=x86-64
47541    fi
47542    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47543      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47544$as_echo "ok" >&6; }
47545      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47546      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47547$as_echo_n "checking for msvcr100.dll... " >&6; }
47548      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47549$as_echo "$MSVCR_DLL" >&6; }
47550    else
47551      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47552$as_echo "incorrect, ignoring" >&6; }
47553      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47554$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47555    fi
47556  fi
47557
47558  fi
47559
47560  if test "x$MSVCR_DLL" = x; then
47561    # Probe: Look in the Windows system32 directory
47562    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
47563
47564  windows_path="$CYGWIN_SYSTEMROOT"
47565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47566    unix_path=`$CYGPATH -u "$windows_path"`
47567    CYGWIN_SYSTEMROOT="$unix_path"
47568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47570    CYGWIN_SYSTEMROOT="$unix_path"
47571  fi
47572
47573    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
47574
47575  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47576  METHOD="well-known location in SYSTEMROOT"
47577  if test -e "$POSSIBLE_MSVCR_DLL"; then
47578    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47579$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47580
47581    # Need to check if the found msvcr is correct architecture
47582    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47583$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47584    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47585    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47586      CORRECT_MSVCR_ARCH=386
47587    else
47588      CORRECT_MSVCR_ARCH=x86-64
47589    fi
47590    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47591      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47592$as_echo "ok" >&6; }
47593      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47594      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47595$as_echo_n "checking for msvcr100.dll... " >&6; }
47596      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47597$as_echo "$MSVCR_DLL" >&6; }
47598    else
47599      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47600$as_echo "incorrect, ignoring" >&6; }
47601      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47602$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47603    fi
47604  fi
47605
47606  fi
47607
47608  if test "x$MSVCR_DLL" = x; then
47609    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
47610    if test "x$VS100COMNTOOLS" != x; then
47611      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
47612
47613  windows_path="$CYGWIN_VS_TOOLS_DIR"
47614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47615    unix_path=`$CYGPATH -u "$windows_path"`
47616    CYGWIN_VS_TOOLS_DIR="$unix_path"
47617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47619    CYGWIN_VS_TOOLS_DIR="$unix_path"
47620  fi
47621
47622      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47623        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
47624      else
47625        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
47626      fi
47627
47628  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47629  METHOD="search of VS100COMNTOOLS"
47630  if test -e "$POSSIBLE_MSVCR_DLL"; then
47631    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47632$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47633
47634    # Need to check if the found msvcr is correct architecture
47635    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47636$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47637    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47638    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47639      CORRECT_MSVCR_ARCH=386
47640    else
47641      CORRECT_MSVCR_ARCH=x86-64
47642    fi
47643    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47644      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47645$as_echo "ok" >&6; }
47646      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47647      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47648$as_echo_n "checking for msvcr100.dll... " >&6; }
47649      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47650$as_echo "$MSVCR_DLL" >&6; }
47651    else
47652      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47653$as_echo "incorrect, ignoring" >&6; }
47654      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47655$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47656    fi
47657  fi
47658
47659    fi
47660  fi
47661
47662  if test "x$MSVCR_DLL" = x; then
47663    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
47664    # (This was the original behaviour; kept since it might turn up something)
47665    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
47666      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47667        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
47668      else
47669        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
47670        if test "x$POSSIBLE_MSVCR_DLL" = x; then
47671          # We're grasping at straws now...
47672          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
47673        fi
47674      fi
47675
47676
47677  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47678  METHOD="search of VCINSTALLDIR"
47679  if test -e "$POSSIBLE_MSVCR_DLL"; then
47680    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47681$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47682
47683    # Need to check if the found msvcr is correct architecture
47684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47685$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47686    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47687    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47688      CORRECT_MSVCR_ARCH=386
47689    else
47690      CORRECT_MSVCR_ARCH=x86-64
47691    fi
47692    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47693      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47694$as_echo "ok" >&6; }
47695      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47696      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47697$as_echo_n "checking for msvcr100.dll... " >&6; }
47698      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47699$as_echo "$MSVCR_DLL" >&6; }
47700    else
47701      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47702$as_echo "incorrect, ignoring" >&6; }
47703      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47704$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47705    fi
47706  fi
47707
47708    fi
47709  fi
47710
47711  if test "x$MSVCR_DLL" = x; then
47712    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47713$as_echo_n "checking for msvcr100.dll... " >&6; }
47714    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47715$as_echo "no" >&6; }
47716    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
47717  fi
47718
47719
47720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47721
47722  # Input might be given as Windows format, start by converting to
47723  # unix format.
47724  path="$MSVCR_DLL"
47725  new_path=`$CYGPATH -u "$path"`
47726
47727  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47728  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47729  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47730  # "foo.exe" is OK but "foo" is an error.
47731  #
47732  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47733  # It is also a way to make sure we got the proper file name for the real test later on.
47734  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47735  if test "x$test_shortpath" = x; then
47736    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
47737$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
47738    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
47739  fi
47740
47741  # Call helper function which possibly converts this using DOS-style short mode.
47742  # If so, the updated path is stored in $new_path.
47743
47744  input_path="$new_path"
47745  # Check if we need to convert this using DOS-style short mode. If the path
47746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47747  # take no chances and rewrite it.
47748  # Note: m4 eats our [], so we need to use [ and ] instead.
47749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47750  if test "x$has_forbidden_chars" != x; then
47751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47752    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47753    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47754    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47755      # Going to short mode and back again did indeed matter. Since short mode is
47756      # case insensitive, let's make it lowercase to improve readability.
47757      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47758      # Now convert it back to Unix-stile (cygpath)
47759      input_path=`$CYGPATH -u "$shortmode_path"`
47760      new_path="$input_path"
47761    fi
47762  fi
47763
47764  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47765  if test "x$test_cygdrive_prefix" = x; then
47766    # As a simple fix, exclude /usr/bin since it's not a real path.
47767    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47768      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47769      # a path prefixed by /cygdrive for fixpath to work.
47770      new_path="$CYGWIN_ROOT_PATH$input_path"
47771    fi
47772  fi
47773
47774
47775  if test "x$path" != "x$new_path"; then
47776    MSVCR_DLL="$new_path"
47777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
47778$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
47779  fi
47780
47781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47782
47783  path="$MSVCR_DLL"
47784  has_colon=`$ECHO $path | $GREP ^.:`
47785  new_path="$path"
47786  if test "x$has_colon" = x; then
47787    # Not in mixed or Windows style, start by that.
47788    new_path=`cmd //c echo $path`
47789  fi
47790
47791
47792  input_path="$new_path"
47793  # Check if we need to convert this using DOS-style short mode. If the path
47794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47795  # take no chances and rewrite it.
47796  # Note: m4 eats our [], so we need to use [ and ] instead.
47797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47798  if test "x$has_forbidden_chars" != x; then
47799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47800    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47801  fi
47802
47803
47804  windows_path="$new_path"
47805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47806    unix_path=`$CYGPATH -u "$windows_path"`
47807    new_path="$unix_path"
47808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47810    new_path="$unix_path"
47811  fi
47812
47813  if test "x$path" != "x$new_path"; then
47814    MSVCR_DLL="$new_path"
47815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
47816$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
47817  fi
47818
47819  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47820  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47821
47822  else
47823    # We're on a posix platform. Hooray! :)
47824    path="$MSVCR_DLL"
47825    has_space=`$ECHO "$path" | $GREP " "`
47826    if test "x$has_space" != x; then
47827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
47828$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
47829      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47830    fi
47831
47832    # Use eval to expand a potential ~
47833    eval path="$path"
47834    if test ! -f "$path" && test ! -d "$path"; then
47835      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47836    fi
47837
47838    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
47839  fi
47840
47841
47842
47843
47844# Check whether --with-dxsdk was given.
47845if test "${with_dxsdk+set}" = set; then :
47846  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
47847$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
47848fi
47849
47850
47851
47852
47853# Check whether --with-dxsdk-lib was given.
47854if test "${with_dxsdk_lib+set}" = set; then :
47855  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
47856$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
47857fi
47858
47859
47860
47861
47862# Check whether --with-dxsdk-include was given.
47863if test "${with_dxsdk_include+set}" = set; then :
47864  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
47865$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
47866fi
47867
47868
47869  fi
47870
47871
47872
47873###############################################################################
47874#
47875# We need to do some final tweaking, when everything else is done.
47876#
47877###############################################################################
47878
47879
47880  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
47881
47882
47883  # The name of the Service Agent jar.
47884  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
47885  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47886    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
47887  fi
47888
47889
47890
47891    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
47892$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
47893
47894    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
47895      ENABLE_INTREE_EC=yes
47896      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47897$as_echo "yes" >&6; }
47898    else
47899      ENABLE_INTREE_EC=no
47900      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47901$as_echo "no" >&6; }
47902    fi
47903
47904
47905
47906
47907###############################################################################
47908#
47909# Configure parts of the build that only affect the build performance,
47910# not the result.
47911#
47912###############################################################################
47913
47914
47915  # How many cores do we have on this build system?
47916
47917# Check whether --with-num-cores was given.
47918if test "${with_num_cores+set}" = set; then :
47919  withval=$with_num_cores;
47920fi
47921
47922  if test "x$with_num_cores" = x; then
47923    # The number of cores were not specified, try to probe them.
47924
47925  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
47926$as_echo_n "checking for number of cores... " >&6; }
47927  NUM_CORES=1
47928  FOUND_CORES=no
47929
47930  if test -f /proc/cpuinfo; then
47931    # Looks like a Linux (or cygwin) system
47932    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
47933    FOUND_CORES=yes
47934  elif test -x /usr/sbin/psrinfo; then
47935    # Looks like a Solaris system
47936    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
47937    FOUND_CORES=yes
47938  elif test -x /usr/sbin/system_profiler; then
47939    # Looks like a MacOSX system
47940    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
47941    FOUND_CORES=yes
47942  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
47943    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
47944    FOUND_CORES=yes
47945  elif test -n "$NUMBER_OF_PROCESSORS"; then
47946    # On windows, look in the env
47947    NUM_CORES=$NUMBER_OF_PROCESSORS
47948    FOUND_CORES=yes
47949  fi
47950
47951  if test "x$FOUND_CORES" = xyes; then
47952    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
47953$as_echo "$NUM_CORES" >&6; }
47954  else
47955    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
47956$as_echo "could not detect number of cores, defaulting to 1" >&6; }
47957    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
47958$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
47959  fi
47960
47961  else
47962    NUM_CORES=$with_num_cores
47963  fi
47964
47965
47966
47967  # How much memory do we have on this build system?
47968
47969# Check whether --with-memory-size was given.
47970if test "${with_memory_size+set}" = set; then :
47971  withval=$with_memory_size;
47972fi
47973
47974  if test "x$with_memory_size" = x; then
47975    # The memory size was not specified, try to probe it.
47976
47977  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
47978$as_echo_n "checking for memory size... " >&6; }
47979  # Default to 1024 MB
47980  MEMORY_SIZE=1024
47981  FOUND_MEM=no
47982
47983  if test -f /proc/meminfo; then
47984    # Looks like a Linux (or cygwin) system
47985    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
47986    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
47987    FOUND_MEM=yes
47988  elif test -x /usr/sbin/prtconf; then
47989    # Looks like a Solaris or AIX system
47990    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
47991    FOUND_MEM=yes
47992  elif test -x /usr/sbin/system_profiler; then
47993    # Looks like a MacOSX system
47994    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
47995    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
47996    FOUND_MEM=yes
47997  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
47998    # Windows, but without cygwin
47999    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
48000    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
48001    FOUND_MEM=yes
48002  fi
48003
48004  if test "x$FOUND_MEM" = xyes; then
48005    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
48006$as_echo "$MEMORY_SIZE MB" >&6; }
48007  else
48008    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
48009$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
48010    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
48011$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
48012  fi
48013
48014  else
48015    MEMORY_SIZE=$with_memory_size
48016  fi
48017
48018
48019
48020  # Provide a decent default number of parallel jobs for make depending on
48021  # number of cores, amount of memory and machine architecture.
48022
48023# Check whether --with-jobs was given.
48024if test "${with_jobs+set}" = set; then :
48025  withval=$with_jobs;
48026fi
48027
48028  if test "x$with_jobs" = x; then
48029    # Number of jobs was not specified, calculate.
48030    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
48031$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
48032    # Approximate memory in GB, rounding up a bit.
48033    memory_gb=`expr $MEMORY_SIZE / 1100`
48034    # Pick the lowest of memory in gb and number of cores.
48035    if test "$memory_gb" -lt "$NUM_CORES"; then
48036      JOBS="$memory_gb"
48037    else
48038      JOBS="$NUM_CORES"
48039      # On bigger machines, leave some room for other processes to run
48040      if test "$JOBS" -gt "4"; then
48041        JOBS=`expr $JOBS '*' 90 / 100`
48042      fi
48043    fi
48044    # Cap number of jobs to 16
48045    if test "$JOBS" -gt "16"; then
48046      JOBS=16
48047    fi
48048    if test "$JOBS" -eq "0"; then
48049      JOBS=1
48050    fi
48051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
48052$as_echo "$JOBS" >&6; }
48053  else
48054    JOBS=$with_jobs
48055  fi
48056
48057
48058
48059# Setup smart javac (after cores and memory have been setup)
48060
48061
48062# Check whether --with-sjavac-server-java was given.
48063if test "${with_sjavac_server_java+set}" = set; then :
48064  withval=$with_sjavac_server_java;
48065fi
48066
48067
48068  if test "x$with_sjavac_server_java" != x; then
48069    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
48070    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
48071    if test "x$FOUND_VERSION" = x; then
48072      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
48073    fi
48074  else
48075    SJAVAC_SERVER_JAVA=""
48076    # Hotspot specific options.
48077
48078  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
48079  $ECHO "Command: $JAVA -verbosegc -version" >&5
48080  OUTPUT=`$JAVA -verbosegc -version 2>&1`
48081  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48082  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48083  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48084    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
48085    JVM_ARG_OK=true
48086  else
48087    $ECHO "Arg failed:" >&5
48088    $ECHO "$OUTPUT" >&5
48089    JVM_ARG_OK=false
48090  fi
48091
48092    # JRockit specific options.
48093
48094  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
48095  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
48096  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
48097  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48098  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48099  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48100    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
48101    JVM_ARG_OK=true
48102  else
48103    $ECHO "Arg failed:" >&5
48104    $ECHO "$OUTPUT" >&5
48105    JVM_ARG_OK=false
48106  fi
48107
48108    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
48109  fi
48110
48111
48112  if test "$MEMORY_SIZE" -gt "2500"; then
48113
48114  $ECHO "Check if jvm arg is ok: -d64" >&5
48115  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
48116  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
48117  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48118  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48119  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48120    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
48121    JVM_ARG_OK=true
48122  else
48123    $ECHO "Arg failed:" >&5
48124    $ECHO "$OUTPUT" >&5
48125    JVM_ARG_OK=false
48126  fi
48127
48128    if test "$JVM_ARG_OK" = true; then
48129      JVM_64BIT=true
48130      JVM_ARG_OK=false
48131    fi
48132  fi
48133
48134  if test "$JVM_64BIT" = true; then
48135    if test "$MEMORY_SIZE" -gt "17000"; then
48136
48137  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
48138  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
48139  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
48140  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48141  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48142  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48143    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
48144    JVM_ARG_OK=true
48145  else
48146    $ECHO "Arg failed:" >&5
48147    $ECHO "$OUTPUT" >&5
48148    JVM_ARG_OK=false
48149  fi
48150
48151    fi
48152    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
48153
48154  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
48155  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
48156  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
48157  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48158  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48159  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48160    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
48161    JVM_ARG_OK=true
48162  else
48163    $ECHO "Arg failed:" >&5
48164    $ECHO "$OUTPUT" >&5
48165    JVM_ARG_OK=false
48166  fi
48167
48168    fi
48169    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
48170
48171  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
48172  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
48173  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
48174  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48175  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48176  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48177    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
48178    JVM_ARG_OK=true
48179  else
48180    $ECHO "Arg failed:" >&5
48181    $ECHO "$OUTPUT" >&5
48182    JVM_ARG_OK=false
48183  fi
48184
48185    fi
48186    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
48187
48188  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
48189  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
48190  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
48191  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48192  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48193  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48194    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
48195    JVM_ARG_OK=true
48196  else
48197    $ECHO "Arg failed:" >&5
48198    $ECHO "$OUTPUT" >&5
48199    JVM_ARG_OK=false
48200  fi
48201
48202    fi
48203  fi
48204  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
48205
48206  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
48207  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
48208  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
48209  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48210  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48211  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48212    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
48213    JVM_ARG_OK=true
48214  else
48215    $ECHO "Arg failed:" >&5
48216    $ECHO "$OUTPUT" >&5
48217    JVM_ARG_OK=false
48218  fi
48219
48220  fi
48221  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
48222
48223  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
48224  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
48225  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
48226  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48227  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48228  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48229    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
48230    JVM_ARG_OK=true
48231  else
48232    $ECHO "Arg failed:" >&5
48233    $ECHO "$OUTPUT" >&5
48234    JVM_ARG_OK=false
48235  fi
48236
48237  fi
48238  if test "$JVM_ARG_OK" = false; then
48239
48240  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
48241  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
48242  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
48243  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48244  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48245  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48246    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
48247    JVM_ARG_OK=true
48248  else
48249    $ECHO "Arg failed:" >&5
48250    $ECHO "$OUTPUT" >&5
48251    JVM_ARG_OK=false
48252  fi
48253
48254  fi
48255
48256  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
48257$as_echo_n "checking whether to use sjavac... " >&6; }
48258  # Check whether --enable-sjavac was given.
48259if test "${enable_sjavac+set}" = set; then :
48260  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
48261else
48262  ENABLE_SJAVAC='no'
48263fi
48264
48265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
48266$as_echo "$ENABLE_SJAVAC" >&6; }
48267
48268
48269  if test "x$ENABLE_SJAVAC" = xyes; then
48270    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
48271  else
48272    SJAVAC_SERVER_DIR=
48273  fi
48274
48275
48276
48277# Can the C/C++ compiler use precompiled headers?
48278
48279
48280  ###############################################################################
48281  #
48282  # Can the C/C++ compiler use precompiled headers?
48283  #
48284  # Check whether --enable-precompiled-headers was given.
48285if test "${enable_precompiled_headers+set}" = set; then :
48286  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
48287else
48288  ENABLE_PRECOMPH=yes
48289fi
48290
48291
48292  USE_PRECOMPILED_HEADER=1
48293  if test "x$ENABLE_PRECOMPH" = xno; then
48294    USE_PRECOMPILED_HEADER=0
48295  fi
48296
48297  if test "x$ENABLE_PRECOMPH" = xyes; then
48298    # Check that the compiler actually supports precomp headers.
48299    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48300      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
48301$as_echo_n "checking that precompiled headers work... " >&6; }
48302      echo "int alfa();" > conftest.h
48303      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
48304      if test ! -f conftest.hpp.gch; then
48305        USE_PRECOMPILED_HEADER=0
48306        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48307$as_echo "no" >&6; }
48308      else
48309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48310$as_echo "yes" >&6; }
48311      fi
48312      rm -f conftest.h conftest.hpp.gch
48313    fi
48314  fi
48315
48316
48317
48318
48319# Setup use of ccache, if available
48320
48321  # Check whether --enable-ccache was given.
48322if test "${enable_ccache+set}" = set; then :
48323  enableval=$enable_ccache;
48324fi
48325
48326
48327  CCACHE=
48328  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
48329$as_echo_n "checking is ccache enabled... " >&6; }
48330  ENABLE_CCACHE=$enable_ccache
48331  if test "x$enable_ccache" = xyes; then
48332    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48333$as_echo "yes" >&6; }
48334    OLD_PATH="$PATH"
48335    if test "x$TOOLS_DIR" != x; then
48336      PATH=$TOOLS_DIR:$PATH
48337    fi
48338
48339
48340
48341  # Publish this variable in the help.
48342
48343
48344  if test "x$CCACHE" = x; then
48345    # The variable is not set by user, try to locate tool using the code snippet
48346    for ac_prog in ccache
48347do
48348  # Extract the first word of "$ac_prog", so it can be a program name with args.
48349set dummy $ac_prog; ac_word=$2
48350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48351$as_echo_n "checking for $ac_word... " >&6; }
48352if ${ac_cv_path_CCACHE+:} false; then :
48353  $as_echo_n "(cached) " >&6
48354else
48355  case $CCACHE in
48356  [\\/]* | ?:[\\/]*)
48357  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48358  ;;
48359  *)
48360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48361for as_dir in $PATH
48362do
48363  IFS=$as_save_IFS
48364  test -z "$as_dir" && as_dir=.
48365    for ac_exec_ext in '' $ac_executable_extensions; do
48366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48367    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48369    break 2
48370  fi
48371done
48372  done
48373IFS=$as_save_IFS
48374
48375  ;;
48376esac
48377fi
48378CCACHE=$ac_cv_path_CCACHE
48379if test -n "$CCACHE"; then
48380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48381$as_echo "$CCACHE" >&6; }
48382else
48383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48384$as_echo "no" >&6; }
48385fi
48386
48387
48388  test -n "$CCACHE" && break
48389done
48390
48391  else
48392    # The variable is set, but is it from the command line or the environment?
48393
48394    # Try to remove the string !CCACHE! from our list.
48395    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
48396    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48397      # If it failed, the variable was not from the command line. Ignore it,
48398      # but warn the user (except for BASH, which is always set by the calling BASH).
48399      if test "xCCACHE" != xBASH; then
48400        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
48401$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
48402      fi
48403      # Try to locate tool using the code snippet
48404      for ac_prog in ccache
48405do
48406  # Extract the first word of "$ac_prog", so it can be a program name with args.
48407set dummy $ac_prog; ac_word=$2
48408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48409$as_echo_n "checking for $ac_word... " >&6; }
48410if ${ac_cv_path_CCACHE+:} false; then :
48411  $as_echo_n "(cached) " >&6
48412else
48413  case $CCACHE in
48414  [\\/]* | ?:[\\/]*)
48415  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48416  ;;
48417  *)
48418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48419for as_dir in $PATH
48420do
48421  IFS=$as_save_IFS
48422  test -z "$as_dir" && as_dir=.
48423    for ac_exec_ext in '' $ac_executable_extensions; do
48424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48425    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48427    break 2
48428  fi
48429done
48430  done
48431IFS=$as_save_IFS
48432
48433  ;;
48434esac
48435fi
48436CCACHE=$ac_cv_path_CCACHE
48437if test -n "$CCACHE"; then
48438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48439$as_echo "$CCACHE" >&6; }
48440else
48441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48442$as_echo "no" >&6; }
48443fi
48444
48445
48446  test -n "$CCACHE" && break
48447done
48448
48449    else
48450      # If it succeeded, then it was overridden by the user. We will use it
48451      # for the tool.
48452
48453      # First remove it from the list of overridden variables, so we can test
48454      # for unknown variables in the end.
48455      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48456
48457      # Check if the provided tool contains a complete path.
48458      tool_specified="$CCACHE"
48459      tool_basename="${tool_specified##*/}"
48460      if test "x$tool_basename" = "x$tool_specified"; then
48461        # A command without a complete path is provided, search $PATH.
48462        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
48463$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
48464        # Extract the first word of "$tool_basename", so it can be a program name with args.
48465set dummy $tool_basename; ac_word=$2
48466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48467$as_echo_n "checking for $ac_word... " >&6; }
48468if ${ac_cv_path_CCACHE+:} false; then :
48469  $as_echo_n "(cached) " >&6
48470else
48471  case $CCACHE in
48472  [\\/]* | ?:[\\/]*)
48473  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48474  ;;
48475  *)
48476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48477for as_dir in $PATH
48478do
48479  IFS=$as_save_IFS
48480  test -z "$as_dir" && as_dir=.
48481    for ac_exec_ext in '' $ac_executable_extensions; do
48482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48483    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48485    break 2
48486  fi
48487done
48488  done
48489IFS=$as_save_IFS
48490
48491  ;;
48492esac
48493fi
48494CCACHE=$ac_cv_path_CCACHE
48495if test -n "$CCACHE"; then
48496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48497$as_echo "$CCACHE" >&6; }
48498else
48499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48500$as_echo "no" >&6; }
48501fi
48502
48503
48504        if test "x$CCACHE" = x; then
48505          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48506        fi
48507      else
48508        # Otherwise we believe it is a complete path. Use it as it is.
48509        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
48510$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
48511        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
48512$as_echo_n "checking for CCACHE... " >&6; }
48513        if test ! -x "$tool_specified"; then
48514          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48515$as_echo "not found" >&6; }
48516          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
48517        fi
48518        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48519$as_echo "$tool_specified" >&6; }
48520      fi
48521    fi
48522  fi
48523
48524
48525
48526  if test "x$CCACHE" = x; then
48527    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
48528  fi
48529
48530
48531    CCACHE_STATUS="enabled"
48532    PATH="$OLD_PATH"
48533  elif test "x$enable_ccache" = xno; then
48534    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
48535$as_echo "no, explicitly disabled" >&6; }
48536  elif test "x$enable_ccache" = x; then
48537    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48538$as_echo "no" >&6; }
48539  else
48540    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
48541$as_echo "unknown" >&6; }
48542    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
48543  fi
48544
48545
48546
48547# Check whether --with-ccache-dir was given.
48548if test "${with_ccache_dir+set}" = set; then :
48549  withval=$with_ccache_dir;
48550fi
48551
48552
48553  if test "x$with_ccache_dir" != x; then
48554    # When using a non home ccache directory, assume the use is to share ccache files
48555    # with other users. Thus change the umask.
48556    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
48557    if test "x$CCACHE" = x; then
48558      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
48559$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
48560    fi
48561  fi
48562
48563  if test "x$CCACHE" != x; then
48564
48565  if test "x$CCACHE" != x; then
48566    # Only use ccache if it is 3.1.4 or later, which supports
48567    # precompiled headers.
48568    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
48569$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
48570    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
48571    if test "x$HAS_GOOD_CCACHE" = x; then
48572      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
48573$as_echo "no, disabling ccache" >&6; }
48574      CCACHE=
48575      CCACHE_STATUS="disabled"
48576    else
48577      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48578$as_echo "yes" >&6; }
48579      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
48580$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
48581      PUSHED_FLAGS="$CXXFLAGS"
48582      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
48583      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48584/* end confdefs.h.  */
48585
48586int
48587main ()
48588{
48589
48590  ;
48591  return 0;
48592}
48593_ACEOF
48594if ac_fn_cxx_try_compile "$LINENO"; then :
48595  CC_KNOWS_CCACHE_TRICK=yes
48596else
48597  CC_KNOWS_CCACHE_TRICK=no
48598fi
48599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48600      CXXFLAGS="$PUSHED_FLAGS"
48601      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
48602        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48603$as_echo "yes" >&6; }
48604      else
48605        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
48606$as_echo "no, disabling ccaching of precompiled headers" >&6; }
48607        CCACHE=
48608        CCACHE_STATUS="disabled"
48609      fi
48610    fi
48611  fi
48612
48613  if test "x$CCACHE" != x; then
48614    CCACHE_SLOPPINESS=time_macros
48615    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
48616    CCACHE_FLAGS=-fpch-preprocess
48617
48618    if test "x$SET_CCACHE_DIR" != x; then
48619      mkdir -p $CCACHE_DIR > /dev/null 2>&1
48620      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
48621    fi
48622  fi
48623
48624  fi
48625
48626
48627###############################################################################
48628#
48629# And now the finish...
48630#
48631###############################################################################
48632
48633# Check for some common pitfalls
48634
48635  if test x"$OPENJDK_BUILD_OS" = xwindows; then
48636    file_to_test="$SRC_ROOT/LICENSE"
48637    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
48638      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
48639    fi
48640  fi
48641
48642
48643  # Did user specify any unknown variables?
48644
48645  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
48646    # Replace the separating ! with spaces before presenting for end user.
48647    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
48648    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
48649$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
48650  fi
48651
48652
48653  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
48654$as_echo_n "checking if build directory is on local disk... " >&6; }
48655
48656  # df -l lists only local disks; if the given directory is not found then
48657  # a non-zero exit code is given
48658  if test "x$DF" = x; then
48659    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48660      # msys does not have df; use Windows "net use" instead.
48661      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
48662      if test "x$IS_NETWORK_DISK" = x; then
48663        OUTPUT_DIR_IS_LOCAL="yes"
48664      else
48665        OUTPUT_DIR_IS_LOCAL="no"
48666      fi
48667    else
48668      # No df here, say it's local
48669      OUTPUT_DIR_IS_LOCAL="yes"
48670    fi
48671  else
48672    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
48673      OUTPUT_DIR_IS_LOCAL="yes"
48674    else
48675      OUTPUT_DIR_IS_LOCAL="no"
48676    fi
48677  fi
48678
48679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
48680$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
48681
48682
48683
48684  # Check if the user has any old-style ALT_ variables set.
48685  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
48686
48687  # Before generating output files, test if they exist. If they do, this is a reconfigure.
48688  # Since we can't properly handle the dependencies for this, warn the user about the situation
48689  if test -e $OUTPUT_ROOT/spec.gmk; then
48690    IS_RECONFIGURE=yes
48691  else
48692    IS_RECONFIGURE=no
48693  fi
48694
48695
48696# At the end, call the custom hook. (Dummy macro if no custom sources available)
48697
48698
48699# We're messing a bit with internal autoconf variables to put the config.status
48700# in the output directory instead of the current directory.
48701CONFIG_STATUS="$OUTPUT_ROOT/config.status"
48702
48703# Create the actual output files. Now the main work of configure is done.
48704cat >confcache <<\_ACEOF
48705# This file is a shell script that caches the results of configure
48706# tests run on this system so they can be shared between configure
48707# scripts and configure runs, see configure's option --config-cache.
48708# It is not useful on other systems.  If it contains results you don't
48709# want to keep, you may remove or edit it.
48710#
48711# config.status only pays attention to the cache file if you give it
48712# the --recheck option to rerun configure.
48713#
48714# `ac_cv_env_foo' variables (set or unset) will be overridden when
48715# loading this file, other *unset* `ac_cv_foo' will be assigned the
48716# following values.
48717
48718_ACEOF
48719
48720# The following way of writing the cache mishandles newlines in values,
48721# but we know of no workaround that is simple, portable, and efficient.
48722# So, we kill variables containing newlines.
48723# Ultrix sh set writes to stderr and can't be redirected directly,
48724# and sets the high bit in the cache file unless we assign to the vars.
48725(
48726  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
48727    eval ac_val=\$$ac_var
48728    case $ac_val in #(
48729    *${as_nl}*)
48730      case $ac_var in #(
48731      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
48732$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
48733      esac
48734      case $ac_var in #(
48735      _ | IFS | as_nl) ;; #(
48736      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
48737      *) { eval $ac_var=; unset $ac_var;} ;;
48738      esac ;;
48739    esac
48740  done
48741
48742  (set) 2>&1 |
48743    case $as_nl`(ac_space=' '; set) 2>&1` in #(
48744    *${as_nl}ac_space=\ *)
48745      # `set' does not quote correctly, so add quotes: double-quote
48746      # substitution turns \\\\ into \\, and sed turns \\ into \.
48747      sed -n \
48748	"s/'/'\\\\''/g;
48749	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
48750      ;; #(
48751    *)
48752      # `set' quotes correctly as required by POSIX, so do not add quotes.
48753      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
48754      ;;
48755    esac |
48756    sort
48757) |
48758  sed '
48759     /^ac_cv_env_/b end
48760     t clear
48761     :clear
48762     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
48763     t end
48764     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
48765     :end' >>confcache
48766if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
48767  if test -w "$cache_file"; then
48768    if test "x$cache_file" != "x/dev/null"; then
48769      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
48770$as_echo "$as_me: updating cache $cache_file" >&6;}
48771      if test ! -f "$cache_file" || test -h "$cache_file"; then
48772	cat confcache >"$cache_file"
48773      else
48774        case $cache_file in #(
48775        */* | ?:*)
48776	  mv -f confcache "$cache_file"$$ &&
48777	  mv -f "$cache_file"$$ "$cache_file" ;; #(
48778        *)
48779	  mv -f confcache "$cache_file" ;;
48780	esac
48781      fi
48782    fi
48783  else
48784    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
48785$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
48786  fi
48787fi
48788rm -f confcache
48789
48790test "x$prefix" = xNONE && prefix=$ac_default_prefix
48791# Let make expand exec_prefix.
48792test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
48793
48794DEFS=-DHAVE_CONFIG_H
48795
48796ac_libobjs=
48797ac_ltlibobjs=
48798U=
48799for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
48800  # 1. Remove the extension, and $U if already installed.
48801  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
48802  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
48803  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
48804  #    will be set to the directory where LIBOBJS objects are built.
48805  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
48806  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
48807done
48808LIBOBJS=$ac_libobjs
48809
48810LTLIBOBJS=$ac_ltlibobjs
48811
48812
48813
48814: "${CONFIG_STATUS=./config.status}"
48815ac_write_fail=0
48816ac_clean_files_save=$ac_clean_files
48817ac_clean_files="$ac_clean_files $CONFIG_STATUS"
48818{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
48819$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
48820as_write_fail=0
48821cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
48822#! $SHELL
48823# Generated by $as_me.
48824# Run this file to recreate the current configuration.
48825# Compiler output produced by configure, useful for debugging
48826# configure, is in config.log if it exists.
48827
48828debug=false
48829ac_cs_recheck=false
48830ac_cs_silent=false
48831
48832SHELL=\${CONFIG_SHELL-$SHELL}
48833export SHELL
48834_ASEOF
48835cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
48836## -------------------- ##
48837## M4sh Initialization. ##
48838## -------------------- ##
48839
48840# Be more Bourne compatible
48841DUALCASE=1; export DUALCASE # for MKS sh
48842if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
48843  emulate sh
48844  NULLCMD=:
48845  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
48846  # is contrary to our usage.  Disable this feature.
48847  alias -g '${1+"$@"}'='"$@"'
48848  setopt NO_GLOB_SUBST
48849else
48850  case `(set -o) 2>/dev/null` in #(
48851  *posix*) :
48852    set -o posix ;; #(
48853  *) :
48854     ;;
48855esac
48856fi
48857
48858
48859as_nl='
48860'
48861export as_nl
48862# Printing a long string crashes Solaris 7 /usr/bin/printf.
48863as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
48864as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48865as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
48866# Prefer a ksh shell builtin over an external printf program on Solaris,
48867# but without wasting forks for bash or zsh.
48868if test -z "$BASH_VERSION$ZSH_VERSION" \
48869    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48870  as_echo='print -r --'
48871  as_echo_n='print -rn --'
48872elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48873  as_echo='printf %s\n'
48874  as_echo_n='printf %s'
48875else
48876  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
48877    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
48878    as_echo_n='/usr/ucb/echo -n'
48879  else
48880    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
48881    as_echo_n_body='eval
48882      arg=$1;
48883      case $arg in #(
48884      *"$as_nl"*)
48885	expr "X$arg" : "X\\(.*\\)$as_nl";
48886	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
48887      esac;
48888      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
48889    '
48890    export as_echo_n_body
48891    as_echo_n='sh -c $as_echo_n_body as_echo'
48892  fi
48893  export as_echo_body
48894  as_echo='sh -c $as_echo_body as_echo'
48895fi
48896
48897# The user is always right.
48898if test "${PATH_SEPARATOR+set}" != set; then
48899  PATH_SEPARATOR=:
48900  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
48901    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
48902      PATH_SEPARATOR=';'
48903  }
48904fi
48905
48906
48907# IFS
48908# We need space, tab and new line, in precisely that order.  Quoting is
48909# there to prevent editors from complaining about space-tab.
48910# (If _AS_PATH_WALK were called with IFS unset, it would disable word
48911# splitting by setting IFS to empty value.)
48912IFS=" ""	$as_nl"
48913
48914# Find who we are.  Look in the path if we contain no directory separator.
48915as_myself=
48916case $0 in #((
48917  *[\\/]* ) as_myself=$0 ;;
48918  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48919for as_dir in $PATH
48920do
48921  IFS=$as_save_IFS
48922  test -z "$as_dir" && as_dir=.
48923    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
48924  done
48925IFS=$as_save_IFS
48926
48927     ;;
48928esac
48929# We did not find ourselves, most probably we were run as `sh COMMAND'
48930# in which case we are not to be found in the path.
48931if test "x$as_myself" = x; then
48932  as_myself=$0
48933fi
48934if test ! -f "$as_myself"; then
48935  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
48936  exit 1
48937fi
48938
48939# Unset variables that we do not need and which cause bugs (e.g. in
48940# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
48941# suppresses any "Segmentation fault" message there.  '((' could
48942# trigger a bug in pdksh 5.2.14.
48943for as_var in BASH_ENV ENV MAIL MAILPATH
48944do eval test x\${$as_var+set} = xset \
48945  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
48946done
48947PS1='$ '
48948PS2='> '
48949PS4='+ '
48950
48951# NLS nuisances.
48952LC_ALL=C
48953export LC_ALL
48954LANGUAGE=C
48955export LANGUAGE
48956
48957# CDPATH.
48958(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
48959
48960
48961# as_fn_error STATUS ERROR [LINENO LOG_FD]
48962# ----------------------------------------
48963# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
48964# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
48965# script with STATUS, using 1 if that was 0.
48966as_fn_error ()
48967{
48968  as_status=$1; test $as_status -eq 0 && as_status=1
48969  if test "$4"; then
48970    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
48971    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
48972  fi
48973  $as_echo "$as_me: error: $2" >&2
48974  as_fn_exit $as_status
48975} # as_fn_error
48976
48977
48978# as_fn_set_status STATUS
48979# -----------------------
48980# Set $? to STATUS, without forking.
48981as_fn_set_status ()
48982{
48983  return $1
48984} # as_fn_set_status
48985
48986# as_fn_exit STATUS
48987# -----------------
48988# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
48989as_fn_exit ()
48990{
48991  set +e
48992  as_fn_set_status $1
48993  exit $1
48994} # as_fn_exit
48995
48996# as_fn_unset VAR
48997# ---------------
48998# Portably unset VAR.
48999as_fn_unset ()
49000{
49001  { eval $1=; unset $1;}
49002}
49003as_unset=as_fn_unset
49004# as_fn_append VAR VALUE
49005# ----------------------
49006# Append the text in VALUE to the end of the definition contained in VAR. Take
49007# advantage of any shell optimizations that allow amortized linear growth over
49008# repeated appends, instead of the typical quadratic growth present in naive
49009# implementations.
49010if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
49011  eval 'as_fn_append ()
49012  {
49013    eval $1+=\$2
49014  }'
49015else
49016  as_fn_append ()
49017  {
49018    eval $1=\$$1\$2
49019  }
49020fi # as_fn_append
49021
49022# as_fn_arith ARG...
49023# ------------------
49024# Perform arithmetic evaluation on the ARGs, and store the result in the
49025# global $as_val. Take advantage of shells that can avoid forks. The arguments
49026# must be portable across $(()) and expr.
49027if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
49028  eval 'as_fn_arith ()
49029  {
49030    as_val=$(( $* ))
49031  }'
49032else
49033  as_fn_arith ()
49034  {
49035    as_val=`expr "$@" || test $? -eq 1`
49036  }
49037fi # as_fn_arith
49038
49039
49040if expr a : '\(a\)' >/dev/null 2>&1 &&
49041   test "X`expr 00001 : '.*\(...\)'`" = X001; then
49042  as_expr=expr
49043else
49044  as_expr=false
49045fi
49046
49047if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
49048  as_basename=basename
49049else
49050  as_basename=false
49051fi
49052
49053if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
49054  as_dirname=dirname
49055else
49056  as_dirname=false
49057fi
49058
49059as_me=`$as_basename -- "$0" ||
49060$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
49061	 X"$0" : 'X\(//\)$' \| \
49062	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
49063$as_echo X/"$0" |
49064    sed '/^.*\/\([^/][^/]*\)\/*$/{
49065	    s//\1/
49066	    q
49067	  }
49068	  /^X\/\(\/\/\)$/{
49069	    s//\1/
49070	    q
49071	  }
49072	  /^X\/\(\/\).*/{
49073	    s//\1/
49074	    q
49075	  }
49076	  s/.*/./; q'`
49077
49078# Avoid depending upon Character Ranges.
49079as_cr_letters='abcdefghijklmnopqrstuvwxyz'
49080as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
49081as_cr_Letters=$as_cr_letters$as_cr_LETTERS
49082as_cr_digits='0123456789'
49083as_cr_alnum=$as_cr_Letters$as_cr_digits
49084
49085ECHO_C= ECHO_N= ECHO_T=
49086case `echo -n x` in #(((((
49087-n*)
49088  case `echo 'xy\c'` in
49089  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
49090  xy)  ECHO_C='\c';;
49091  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
49092       ECHO_T='	';;
49093  esac;;
49094*)
49095  ECHO_N='-n';;
49096esac
49097
49098rm -f conf$$ conf$$.exe conf$$.file
49099if test -d conf$$.dir; then
49100  rm -f conf$$.dir/conf$$.file
49101else
49102  rm -f conf$$.dir
49103  mkdir conf$$.dir 2>/dev/null
49104fi
49105if (echo >conf$$.file) 2>/dev/null; then
49106  if ln -s conf$$.file conf$$ 2>/dev/null; then
49107    as_ln_s='ln -s'
49108    # ... but there are two gotchas:
49109    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
49110    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
49111    # In both cases, we have to default to `cp -pR'.
49112    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
49113      as_ln_s='cp -pR'
49114  elif ln conf$$.file conf$$ 2>/dev/null; then
49115    as_ln_s=ln
49116  else
49117    as_ln_s='cp -pR'
49118  fi
49119else
49120  as_ln_s='cp -pR'
49121fi
49122rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
49123rmdir conf$$.dir 2>/dev/null
49124
49125
49126# as_fn_mkdir_p
49127# -------------
49128# Create "$as_dir" as a directory, including parents if necessary.
49129as_fn_mkdir_p ()
49130{
49131
49132  case $as_dir in #(
49133  -*) as_dir=./$as_dir;;
49134  esac
49135  test -d "$as_dir" || eval $as_mkdir_p || {
49136    as_dirs=
49137    while :; do
49138      case $as_dir in #(
49139      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
49140      *) as_qdir=$as_dir;;
49141      esac
49142      as_dirs="'$as_qdir' $as_dirs"
49143      as_dir=`$as_dirname -- "$as_dir" ||
49144$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49145	 X"$as_dir" : 'X\(//\)[^/]' \| \
49146	 X"$as_dir" : 'X\(//\)$' \| \
49147	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
49148$as_echo X"$as_dir" |
49149    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49150	    s//\1/
49151	    q
49152	  }
49153	  /^X\(\/\/\)[^/].*/{
49154	    s//\1/
49155	    q
49156	  }
49157	  /^X\(\/\/\)$/{
49158	    s//\1/
49159	    q
49160	  }
49161	  /^X\(\/\).*/{
49162	    s//\1/
49163	    q
49164	  }
49165	  s/.*/./; q'`
49166      test -d "$as_dir" && break
49167    done
49168    test -z "$as_dirs" || eval "mkdir $as_dirs"
49169  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
49170
49171
49172} # as_fn_mkdir_p
49173if mkdir -p . 2>/dev/null; then
49174  as_mkdir_p='mkdir -p "$as_dir"'
49175else
49176  test -d ./-p && rmdir ./-p
49177  as_mkdir_p=false
49178fi
49179
49180
49181# as_fn_executable_p FILE
49182# -----------------------
49183# Test if FILE is an executable regular file.
49184as_fn_executable_p ()
49185{
49186  test -f "$1" && test -x "$1"
49187} # as_fn_executable_p
49188as_test_x='test -x'
49189as_executable_p=as_fn_executable_p
49190
49191# Sed expression to map a string onto a valid CPP name.
49192as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
49193
49194# Sed expression to map a string onto a valid variable name.
49195as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
49196
49197
49198exec 6>&1
49199## ----------------------------------- ##
49200## Main body of $CONFIG_STATUS script. ##
49201## ----------------------------------- ##
49202_ASEOF
49203test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
49204
49205cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49206# Save the log message, to keep $0 and so on meaningful, and to
49207# report actual input values of CONFIG_FILES etc. instead of their
49208# values after options handling.
49209ac_log="
49210This file was extended by OpenJDK $as_me jdk9, which was
49211generated by GNU Autoconf 2.69.  Invocation command line was
49212
49213  CONFIG_FILES    = $CONFIG_FILES
49214  CONFIG_HEADERS  = $CONFIG_HEADERS
49215  CONFIG_LINKS    = $CONFIG_LINKS
49216  CONFIG_COMMANDS = $CONFIG_COMMANDS
49217  $ $0 $@
49218
49219on `(hostname || uname -n) 2>/dev/null | sed 1q`
49220"
49221
49222_ACEOF
49223
49224case $ac_config_files in *"
49225"*) set x $ac_config_files; shift; ac_config_files=$*;;
49226esac
49227
49228case $ac_config_headers in *"
49229"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
49230esac
49231
49232
49233cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49234# Files that config.status was made for.
49235config_files="$ac_config_files"
49236config_headers="$ac_config_headers"
49237
49238_ACEOF
49239
49240cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49241ac_cs_usage="\
49242\`$as_me' instantiates files and other configuration actions
49243from templates according to the current configuration.  Unless the files
49244and actions are specified as TAGs, all are instantiated by default.
49245
49246Usage: $0 [OPTION]... [TAG]...
49247
49248  -h, --help       print this help, then exit
49249  -V, --version    print version number and configuration settings, then exit
49250      --config     print configuration, then exit
49251  -q, --quiet, --silent
49252                   do not print progress messages
49253  -d, --debug      don't remove temporary files
49254      --recheck    update $as_me by reconfiguring in the same conditions
49255      --file=FILE[:TEMPLATE]
49256                   instantiate the configuration file FILE
49257      --header=FILE[:TEMPLATE]
49258                   instantiate the configuration header FILE
49259
49260Configuration files:
49261$config_files
49262
49263Configuration headers:
49264$config_headers
49265
49266Report bugs to <build-dev@openjdk.java.net>.
49267OpenJDK home page: <http://openjdk.java.net>."
49268
49269_ACEOF
49270cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49271ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
49272ac_cs_version="\\
49273OpenJDK config.status jdk9
49274configured by $0, generated by GNU Autoconf 2.69,
49275  with options \\"\$ac_cs_config\\"
49276
49277Copyright (C) 2012 Free Software Foundation, Inc.
49278This config.status script is free software; the Free Software Foundation
49279gives unlimited permission to copy, distribute and modify it."
49280
49281ac_pwd='$ac_pwd'
49282srcdir='$srcdir'
49283AWK='$AWK'
49284test -n "\$AWK" || AWK=awk
49285_ACEOF
49286
49287cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49288# The default lists apply if the user does not specify any file.
49289ac_need_defaults=:
49290while test $# != 0
49291do
49292  case $1 in
49293  --*=?*)
49294    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49295    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
49296    ac_shift=:
49297    ;;
49298  --*=)
49299    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49300    ac_optarg=
49301    ac_shift=:
49302    ;;
49303  *)
49304    ac_option=$1
49305    ac_optarg=$2
49306    ac_shift=shift
49307    ;;
49308  esac
49309
49310  case $ac_option in
49311  # Handling of the options.
49312  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
49313    ac_cs_recheck=: ;;
49314  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
49315    $as_echo "$ac_cs_version"; exit ;;
49316  --config | --confi | --conf | --con | --co | --c )
49317    $as_echo "$ac_cs_config"; exit ;;
49318  --debug | --debu | --deb | --de | --d | -d )
49319    debug=: ;;
49320  --file | --fil | --fi | --f )
49321    $ac_shift
49322    case $ac_optarg in
49323    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49324    '') as_fn_error $? "missing file argument" ;;
49325    esac
49326    as_fn_append CONFIG_FILES " '$ac_optarg'"
49327    ac_need_defaults=false;;
49328  --header | --heade | --head | --hea )
49329    $ac_shift
49330    case $ac_optarg in
49331    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49332    esac
49333    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
49334    ac_need_defaults=false;;
49335  --he | --h)
49336    # Conflict between --help and --header
49337    as_fn_error $? "ambiguous option: \`$1'
49338Try \`$0 --help' for more information.";;
49339  --help | --hel | -h )
49340    $as_echo "$ac_cs_usage"; exit ;;
49341  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
49342  | -silent | --silent | --silen | --sile | --sil | --si | --s)
49343    ac_cs_silent=: ;;
49344
49345  # This is an error.
49346  -*) as_fn_error $? "unrecognized option: \`$1'
49347Try \`$0 --help' for more information." ;;
49348
49349  *) as_fn_append ac_config_targets " $1"
49350     ac_need_defaults=false ;;
49351
49352  esac
49353  shift
49354done
49355
49356ac_configure_extra_args=
49357
49358if $ac_cs_silent; then
49359  exec 6>/dev/null
49360  ac_configure_extra_args="$ac_configure_extra_args --silent"
49361fi
49362
49363_ACEOF
49364cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49365if \$ac_cs_recheck; then
49366  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
49367  shift
49368  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
49369  CONFIG_SHELL='$SHELL'
49370  export CONFIG_SHELL
49371  exec "\$@"
49372fi
49373
49374_ACEOF
49375cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49376exec 5>>config.log
49377{
49378  echo
49379  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
49380## Running $as_me. ##
49381_ASBOX
49382  $as_echo "$ac_log"
49383} >&5
49384
49385_ACEOF
49386cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49387_ACEOF
49388
49389cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49390
49391# Handling of arguments.
49392for ac_config_target in $ac_config_targets
49393do
49394  case $ac_config_target in
49395    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
49396    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
49397    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
49398    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
49399    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
49400    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
49401    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
49402
49403  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
49404  esac
49405done
49406
49407
49408# If the user did not use the arguments to specify the items to instantiate,
49409# then the envvar interface is used.  Set only those that are not.
49410# We use the long form for the default assignment because of an extremely
49411# bizarre bug on SunOS 4.1.3.
49412if $ac_need_defaults; then
49413  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
49414  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
49415fi
49416
49417# Have a temporary directory for convenience.  Make it in the build tree
49418# simply because there is no reason against having it here, and in addition,
49419# creating and moving files from /tmp can sometimes cause problems.
49420# Hook for its removal unless debugging.
49421# Note that there is a small window in which the directory will not be cleaned:
49422# after its creation but before its name has been assigned to `$tmp'.
49423$debug ||
49424{
49425  tmp= ac_tmp=
49426  trap 'exit_status=$?
49427  : "${ac_tmp:=$tmp}"
49428  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
49429' 0
49430  trap 'as_fn_exit 1' 1 2 13 15
49431}
49432# Create a (secure) tmp directory for tmp files.
49433
49434{
49435  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
49436  test -d "$tmp"
49437}  ||
49438{
49439  tmp=./conf$$-$RANDOM
49440  (umask 077 && mkdir "$tmp")
49441} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
49442ac_tmp=$tmp
49443
49444# Set up the scripts for CONFIG_FILES section.
49445# No need to generate them if there are no CONFIG_FILES.
49446# This happens for instance with `./config.status config.h'.
49447if test -n "$CONFIG_FILES"; then
49448
49449
49450ac_cr=`echo X | tr X '\015'`
49451# On cygwin, bash can eat \r inside `` if the user requested igncr.
49452# But we know of no other shell where ac_cr would be empty at this
49453# point, so we can use a bashism as a fallback.
49454if test "x$ac_cr" = x; then
49455  eval ac_cr=\$\'\\r\'
49456fi
49457ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
49458if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
49459  ac_cs_awk_cr='\\r'
49460else
49461  ac_cs_awk_cr=$ac_cr
49462fi
49463
49464echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
49465_ACEOF
49466
49467
49468{
49469  echo "cat >conf$$subs.awk <<_ACEOF" &&
49470  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
49471  echo "_ACEOF"
49472} >conf$$subs.sh ||
49473  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49474ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
49475ac_delim='%!_!# '
49476for ac_last_try in false false false false false :; do
49477  . ./conf$$subs.sh ||
49478    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49479
49480  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
49481  if test $ac_delim_n = $ac_delim_num; then
49482    break
49483  elif $ac_last_try; then
49484    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49485  else
49486    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49487  fi
49488done
49489rm -f conf$$subs.sh
49490
49491cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49492cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
49493_ACEOF
49494sed -n '
49495h
49496s/^/S["/; s/!.*/"]=/
49497p
49498g
49499s/^[^!]*!//
49500:repl
49501t repl
49502s/'"$ac_delim"'$//
49503t delim
49504:nl
49505h
49506s/\(.\{148\}\)..*/\1/
49507t more1
49508s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
49509p
49510n
49511b repl
49512:more1
49513s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49514p
49515g
49516s/.\{148\}//
49517t nl
49518:delim
49519h
49520s/\(.\{148\}\)..*/\1/
49521t more2
49522s/["\\]/\\&/g; s/^/"/; s/$/"/
49523p
49524b
49525:more2
49526s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49527p
49528g
49529s/.\{148\}//
49530t delim
49531' <conf$$subs.awk | sed '
49532/^[^""]/{
49533  N
49534  s/\n//
49535}
49536' >>$CONFIG_STATUS || ac_write_fail=1
49537rm -f conf$$subs.awk
49538cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49539_ACAWK
49540cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
49541  for (key in S) S_is_set[key] = 1
49542  FS = ""
49543
49544}
49545{
49546  line = $ 0
49547  nfields = split(line, field, "@")
49548  substed = 0
49549  len = length(field[1])
49550  for (i = 2; i < nfields; i++) {
49551    key = field[i]
49552    keylen = length(key)
49553    if (S_is_set[key]) {
49554      value = S[key]
49555      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
49556      len += length(value) + length(field[++i])
49557      substed = 1
49558    } else
49559      len += 1 + keylen
49560  }
49561
49562  print line
49563}
49564
49565_ACAWK
49566_ACEOF
49567cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49568if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
49569  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
49570else
49571  cat
49572fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
49573  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
49574_ACEOF
49575
49576# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
49577# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
49578# trailing colons and then remove the whole line if VPATH becomes empty
49579# (actually we leave an empty line to preserve line numbers).
49580if test "x$srcdir" = x.; then
49581  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
49582h
49583s///
49584s/^/:/
49585s/[	 ]*$/:/
49586s/:\$(srcdir):/:/g
49587s/:\${srcdir}:/:/g
49588s/:@srcdir@:/:/g
49589s/^:*//
49590s/:*$//
49591x
49592s/\(=[	 ]*\).*/\1/
49593G
49594s/\n//
49595s/^[^=]*=[	 ]*$//
49596}'
49597fi
49598
49599cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49600fi # test -n "$CONFIG_FILES"
49601
49602# Set up the scripts for CONFIG_HEADERS section.
49603# No need to generate them if there are no CONFIG_HEADERS.
49604# This happens for instance with `./config.status Makefile'.
49605if test -n "$CONFIG_HEADERS"; then
49606cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
49607BEGIN {
49608_ACEOF
49609
49610# Transform confdefs.h into an awk script `defines.awk', embedded as
49611# here-document in config.status, that substitutes the proper values into
49612# config.h.in to produce config.h.
49613
49614# Create a delimiter string that does not exist in confdefs.h, to ease
49615# handling of long lines.
49616ac_delim='%!_!# '
49617for ac_last_try in false false :; do
49618  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
49619  if test -z "$ac_tt"; then
49620    break
49621  elif $ac_last_try; then
49622    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
49623  else
49624    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49625  fi
49626done
49627
49628# For the awk script, D is an array of macro values keyed by name,
49629# likewise P contains macro parameters if any.  Preserve backslash
49630# newline sequences.
49631
49632ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
49633sed -n '
49634s/.\{148\}/&'"$ac_delim"'/g
49635t rset
49636:rset
49637s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
49638t def
49639d
49640:def
49641s/\\$//
49642t bsnl
49643s/["\\]/\\&/g
49644s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49645D["\1"]=" \3"/p
49646s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
49647d
49648:bsnl
49649s/["\\]/\\&/g
49650s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49651D["\1"]=" \3\\\\\\n"\\/p
49652t cont
49653s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
49654t cont
49655d
49656:cont
49657n
49658s/.\{148\}/&'"$ac_delim"'/g
49659t clear
49660:clear
49661s/\\$//
49662t bsnlc
49663s/["\\]/\\&/g; s/^/"/; s/$/"/p
49664d
49665:bsnlc
49666s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
49667b cont
49668' <confdefs.h | sed '
49669s/'"$ac_delim"'/"\\\
49670"/g' >>$CONFIG_STATUS || ac_write_fail=1
49671
49672cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49673  for (key in D) D_is_set[key] = 1
49674  FS = ""
49675}
49676/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
49677  line = \$ 0
49678  split(line, arg, " ")
49679  if (arg[1] == "#") {
49680    defundef = arg[2]
49681    mac1 = arg[3]
49682  } else {
49683    defundef = substr(arg[1], 2)
49684    mac1 = arg[2]
49685  }
49686  split(mac1, mac2, "(") #)
49687  macro = mac2[1]
49688  prefix = substr(line, 1, index(line, defundef) - 1)
49689  if (D_is_set[macro]) {
49690    # Preserve the white space surrounding the "#".
49691    print prefix "define", macro P[macro] D[macro]
49692    next
49693  } else {
49694    # Replace #undef with comments.  This is necessary, for example,
49695    # in the case of _POSIX_SOURCE, which is predefined and required
49696    # on some systems where configure will not decide to define it.
49697    if (defundef == "undef") {
49698      print "/*", prefix defundef, macro, "*/"
49699      next
49700    }
49701  }
49702}
49703{ print }
49704_ACAWK
49705_ACEOF
49706cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49707  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
49708fi # test -n "$CONFIG_HEADERS"
49709
49710
49711eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
49712shift
49713for ac_tag
49714do
49715  case $ac_tag in
49716  :[FHLC]) ac_mode=$ac_tag; continue;;
49717  esac
49718  case $ac_mode$ac_tag in
49719  :[FHL]*:*);;
49720  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
49721  :[FH]-) ac_tag=-:-;;
49722  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
49723  esac
49724  ac_save_IFS=$IFS
49725  IFS=:
49726  set x $ac_tag
49727  IFS=$ac_save_IFS
49728  shift
49729  ac_file=$1
49730  shift
49731
49732  case $ac_mode in
49733  :L) ac_source=$1;;
49734  :[FH])
49735    ac_file_inputs=
49736    for ac_f
49737    do
49738      case $ac_f in
49739      -) ac_f="$ac_tmp/stdin";;
49740      *) # Look for the file first in the build tree, then in the source tree
49741	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
49742	 # because $ac_f cannot contain `:'.
49743	 test -f "$ac_f" ||
49744	   case $ac_f in
49745	   [\\/$]*) false;;
49746	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
49747	   esac ||
49748	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
49749      esac
49750      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
49751      as_fn_append ac_file_inputs " '$ac_f'"
49752    done
49753
49754    # Let's still pretend it is `configure' which instantiates (i.e., don't
49755    # use $as_me), people would be surprised to read:
49756    #    /* config.h.  Generated by config.status.  */
49757    configure_input='Generated from '`
49758	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
49759	`' by configure.'
49760    if test x"$ac_file" != x-; then
49761      configure_input="$ac_file.  $configure_input"
49762      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
49763$as_echo "$as_me: creating $ac_file" >&6;}
49764    fi
49765    # Neutralize special characters interpreted by sed in replacement strings.
49766    case $configure_input in #(
49767    *\&* | *\|* | *\\* )
49768       ac_sed_conf_input=`$as_echo "$configure_input" |
49769       sed 's/[\\\\&|]/\\\\&/g'`;; #(
49770    *) ac_sed_conf_input=$configure_input;;
49771    esac
49772
49773    case $ac_tag in
49774    *:-:* | *:-) cat >"$ac_tmp/stdin" \
49775      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
49776    esac
49777    ;;
49778  esac
49779
49780  ac_dir=`$as_dirname -- "$ac_file" ||
49781$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49782	 X"$ac_file" : 'X\(//\)[^/]' \| \
49783	 X"$ac_file" : 'X\(//\)$' \| \
49784	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
49785$as_echo X"$ac_file" |
49786    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49787	    s//\1/
49788	    q
49789	  }
49790	  /^X\(\/\/\)[^/].*/{
49791	    s//\1/
49792	    q
49793	  }
49794	  /^X\(\/\/\)$/{
49795	    s//\1/
49796	    q
49797	  }
49798	  /^X\(\/\).*/{
49799	    s//\1/
49800	    q
49801	  }
49802	  s/.*/./; q'`
49803  as_dir="$ac_dir"; as_fn_mkdir_p
49804  ac_builddir=.
49805
49806case "$ac_dir" in
49807.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
49808*)
49809  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
49810  # A ".." for each directory in $ac_dir_suffix.
49811  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
49812  case $ac_top_builddir_sub in
49813  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
49814  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
49815  esac ;;
49816esac
49817ac_abs_top_builddir=$ac_pwd
49818ac_abs_builddir=$ac_pwd$ac_dir_suffix
49819# for backward compatibility:
49820ac_top_builddir=$ac_top_build_prefix
49821
49822case $srcdir in
49823  .)  # We are building in place.
49824    ac_srcdir=.
49825    ac_top_srcdir=$ac_top_builddir_sub
49826    ac_abs_top_srcdir=$ac_pwd ;;
49827  [\\/]* | ?:[\\/]* )  # Absolute name.
49828    ac_srcdir=$srcdir$ac_dir_suffix;
49829    ac_top_srcdir=$srcdir
49830    ac_abs_top_srcdir=$srcdir ;;
49831  *) # Relative name.
49832    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
49833    ac_top_srcdir=$ac_top_build_prefix$srcdir
49834    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
49835esac
49836ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
49837
49838
49839  case $ac_mode in
49840  :F)
49841  #
49842  # CONFIG_FILE
49843  #
49844
49845_ACEOF
49846
49847cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49848# If the template does not know about datarootdir, expand it.
49849# FIXME: This hack should be removed a few years after 2.60.
49850ac_datarootdir_hack=; ac_datarootdir_seen=
49851ac_sed_dataroot='
49852/datarootdir/ {
49853  p
49854  q
49855}
49856/@datadir@/p
49857/@docdir@/p
49858/@infodir@/p
49859/@localedir@/p
49860/@mandir@/p'
49861case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
49862*datarootdir*) ac_datarootdir_seen=yes;;
49863*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
49864  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
49865$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
49866_ACEOF
49867cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49868  ac_datarootdir_hack='
49869  s&@datadir@&$datadir&g
49870  s&@docdir@&$docdir&g
49871  s&@infodir@&$infodir&g
49872  s&@localedir@&$localedir&g
49873  s&@mandir@&$mandir&g
49874  s&\\\${datarootdir}&$datarootdir&g' ;;
49875esac
49876_ACEOF
49877
49878# Neutralize VPATH when `$srcdir' = `.'.
49879# Shell code in configure.ac might set extrasub.
49880# FIXME: do we really want to maintain this feature?
49881cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49882ac_sed_extra="$ac_vpsub
49883$extrasub
49884_ACEOF
49885cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49886:t
49887/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
49888s|@configure_input@|$ac_sed_conf_input|;t t
49889s&@top_builddir@&$ac_top_builddir_sub&;t t
49890s&@top_build_prefix@&$ac_top_build_prefix&;t t
49891s&@srcdir@&$ac_srcdir&;t t
49892s&@abs_srcdir@&$ac_abs_srcdir&;t t
49893s&@top_srcdir@&$ac_top_srcdir&;t t
49894s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
49895s&@builddir@&$ac_builddir&;t t
49896s&@abs_builddir@&$ac_abs_builddir&;t t
49897s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
49898$ac_datarootdir_hack
49899"
49900eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
49901  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49902
49903test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
49904  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
49905  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
49906      "$ac_tmp/out"`; test -z "$ac_out"; } &&
49907  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
49908which seems to be undefined.  Please make sure it is defined" >&5
49909$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
49910which seems to be undefined.  Please make sure it is defined" >&2;}
49911
49912  rm -f "$ac_tmp/stdin"
49913  case $ac_file in
49914  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
49915  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
49916  esac \
49917  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49918 ;;
49919  :H)
49920  #
49921  # CONFIG_HEADER
49922  #
49923  if test x"$ac_file" != x-; then
49924    {
49925      $as_echo "/* $configure_input  */" \
49926      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
49927    } >"$ac_tmp/config.h" \
49928      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49929    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
49930      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
49931$as_echo "$as_me: $ac_file is unchanged" >&6;}
49932    else
49933      rm -f "$ac_file"
49934      mv "$ac_tmp/config.h" "$ac_file" \
49935	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
49936    fi
49937  else
49938    $as_echo "/* $configure_input  */" \
49939      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
49940      || as_fn_error $? "could not create -" "$LINENO" 5
49941  fi
49942 ;;
49943
49944
49945  esac
49946
49947done # for ac_tag
49948
49949
49950as_fn_exit 0
49951_ACEOF
49952ac_clean_files=$ac_clean_files_save
49953
49954test $ac_write_fail = 0 ||
49955  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
49956
49957
49958# configure is writing to config.log, and then calls config.status.
49959# config.status does its own redirection, appending to config.log.
49960# Unfortunately, on DOS this fails, as config.log is still kept open
49961# by configure, so config.status won't be able to write to it; its
49962# output is simply discarded.  So we exec the FD to /dev/null,
49963# effectively closing config.log, so it can be properly (re)opened and
49964# appended to by config.status.  When coming back to configure, we
49965# need to make the FD available again.
49966if test "$no_create" != yes; then
49967  ac_cs_success=:
49968  ac_config_status_args=
49969  test "$silent" = yes &&
49970    ac_config_status_args="$ac_config_status_args --quiet"
49971  exec 5>/dev/null
49972  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
49973  exec 5>>config.log
49974  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
49975  # would make configure fail if this is the last instruction.
49976  $ac_cs_success || as_fn_exit 1
49977fi
49978if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
49979  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
49980$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
49981fi
49982
49983
49984# Try to move the config.log file to the output directory.
49985if test -e ./config.log; then
49986  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
49987fi
49988
49989# Make the compare script executable
49990$CHMOD +x $OUTPUT_ROOT/compare.sh
49991
49992# Finally output some useful information to the user
49993
49994  # Finally output some useful information to the user
49995
49996  printf "\n"
49997  printf "====================================================\n"
49998  if test "x$no_create" != "xyes"; then
49999    if test "x$IS_RECONFIGURE" != "xyes"; then
50000      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
50001    else
50002      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
50003    fi
50004  else
50005    if test "x$IS_RECONFIGURE" != "xyes"; then
50006      printf "A configuration has been successfully checked but not created\n"
50007    else
50008      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
50009    fi
50010  fi
50011  if test "x$CONFIGURE_COMMAND_LINE" != x; then
50012    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
50013  else
50014    printf "using default settings.\n"
50015  fi
50016
50017  printf "\n"
50018  printf "Configuration summary:\n"
50019  printf "* Debug level:    $DEBUG_LEVEL\n"
50020  printf "* JDK variant:    $JDK_VARIANT\n"
50021  printf "* JVM variants:   $with_jvm_variants\n"
50022  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
50023
50024  printf "\n"
50025  printf "Tools summary:\n"
50026  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
50027    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
50028  fi
50029  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
50030  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
50031  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
50032  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
50033
50034  printf "\n"
50035  printf "Build performance summary:\n"
50036  printf "* Cores to use:   $JOBS\n"
50037  printf "* Memory limit:   $MEMORY_SIZE MB\n"
50038  if test "x$CCACHE_STATUS" != "x"; then
50039    printf "* ccache status:  $CCACHE_STATUS\n"
50040  fi
50041  printf "\n"
50042
50043  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
50044    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
50045    printf "will result in longer build times.\n"
50046    printf "\n"
50047  fi
50048
50049  if test "x$FOUND_ALT_VARIABLES" != "x"; then
50050    printf "WARNING: You have old-style ALT_ environment variables set.\n"
50051    printf "These are not respected, and will be ignored. It is recommended\n"
50052    printf "that you clean your environment. The following variables are set:\n"
50053    printf "$FOUND_ALT_VARIABLES\n"
50054    printf "\n"
50055  fi
50056
50057  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
50058    printf "WARNING: Your build output directory is not on a local disk.\n"
50059    printf "This will severely degrade build performance!\n"
50060    printf "It is recommended that you create an output directory on a local disk,\n"
50061    printf "and run the configure script again from that directory.\n"
50062    printf "\n"
50063  fi
50064
50065  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
50066    printf "WARNING: The result of this configuration has overridden an older\n"
50067    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
50068    printf "proper build. Failure to do so might result in strange build problems.\n"
50069    printf "\n"
50070  fi
50071
50072  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
50073    printf "WARNING: The result of this configuration was not saved.\n"
50074    printf "You should run without '--no-create | -n' to create the configuration.\n"
50075    printf "\n"
50076  fi
50077
50078