generated-configure.sh revision 1008:9786ef8ca58c
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CCACHE
633USE_PRECOMPILED_HEADER
634SJAVAC_SERVER_DIR
635ENABLE_SJAVAC
636SJAVAC_SERVER_JAVA
637JOBS
638MEMORY_SIZE
639NUM_CORES
640ENABLE_INTREE_EC
641SALIB_NAME
642HOTSPOT_MAKE_ARGS
643MSVCR_DLL
644LIBCXX
645LLVM_LIBS
646LLVM_LDFLAGS
647LLVM_CFLAGS
648LLVM_CONFIG
649LIBFFI_LIBS
650LIBFFI_CFLAGS
651STATIC_CXX_SETTING
652LIBDL
653LIBM
654LIBZIP_CAN_USE_MMAP
655USE_EXTERNAL_LIBZ
656USE_EXTERNAL_LIBPNG
657PNG_LIBS
658PNG_CFLAGS
659USE_EXTERNAL_LIBGIF
660USE_EXTERNAL_LIBJPEG
661ALSA_LIBS
662ALSA_CFLAGS
663FREETYPE_BUNDLE_LIB_PATH
664FREETYPE_LIBS
665FREETYPE_CFLAGS
666CUPS_CFLAGS
667X_EXTRA_LIBS
668X_LIBS
669X_PRE_LIBS
670X_CFLAGS
671XMKMF
672FIXPATH
673ZIP_DEBUGINFO_FILES
674ENABLE_DEBUG_SYMBOLS
675CFLAGS_WARNINGS_ARE_ERRORS
676COMPILER_SUPPORTS_TARGET_BITS_FLAG
677ZERO_ARCHFLAG
678LDFLAGS_CXX_JDK
679LDFLAGS_JDKEXE_SUFFIX
680LDFLAGS_JDKLIB_SUFFIX
681LDFLAGS_JDKEXE
682LDFLAGS_JDKLIB
683CXXFLAGS_JDKEXE
684CXXFLAGS_JDKLIB
685CFLAGS_JDKEXE
686CFLAGS_JDKLIB
687MACOSX_VERSION_MIN
688LEGACY_EXTRA_LDFLAGS
689LEGACY_EXTRA_CXXFLAGS
690LEGACY_EXTRA_CFLAGS
691CXX_O_FLAG_NONE
692CXX_O_FLAG_NORM
693CXX_O_FLAG_HI
694CXX_O_FLAG_HIGHEST
695C_O_FLAG_NONE
696C_O_FLAG_NORM
697C_O_FLAG_HI
698C_O_FLAG_HIGHEST
699CXXFLAGS_DEBUG_SYMBOLS
700CFLAGS_DEBUG_SYMBOLS
701CXX_FLAG_DEPS
702C_FLAG_DEPS
703SET_SHARED_LIBRARY_MAPFILE
704SET_SHARED_LIBRARY_NAME
705SET_SHARED_LIBRARY_ORIGIN
706SET_EXECUTABLE_ORIGIN
707SHARED_LIBRARY_FLAGS
708CXX_FLAG_REORDER
709C_FLAG_REORDER
710SYSROOT_LDFLAGS
711SYSROOT_CFLAGS
712RC_FLAGS
713AR_OUT_OPTION
714LD_OUT_OPTION
715EXE_OUT_OPTION
716CC_OUT_OPTION
717POST_MCS_CMD
718POST_STRIP_CMD
719ARFLAGS
720COMPILER_TARGET_BITS_FLAG
721JT_HOME
722JTREGEXE
723USING_BROKEN_SUSE_LD
724PACKAGE_PATH
725LDEXECXX
726LDEXE
727USE_CLANG
728HOTSPOT_LD
729HOTSPOT_CXX
730HOTSPOT_RC
731HOTSPOT_MT
732BUILD_LD
733BUILD_CXX
734BUILD_CC
735ac_ct_OBJDUMP
736OBJDUMP
737ac_ct_OBJCOPY
738OBJCOPY
739ac_ct_NM
740ac_ct_STRIP
741MCS
742GNM
743NM
744STRIP
745DUMPBIN
746RC
747MT
748LIPO
749ac_ct_OBJC
750OBJCFLAGS
751OBJC
752ac_ct_AR
753AR
754AS
755LDCXX
756LD
757CXXCPP
758CPP
759ac_ct_CXX
760CXXFLAGS
761CXX
762ac_ct_PROPER_COMPILER_CXX
763PROPER_COMPILER_CXX
764TOOLCHAIN_PATH_CXX
765POTENTIAL_CXX
766OBJEXT
767EXEEXT
768ac_ct_CC
769CPPFLAGS
770LDFLAGS
771CFLAGS
772CC
773ac_ct_PROPER_COMPILER_CC
774PROPER_COMPILER_CC
775TOOLCHAIN_PATH_CC
776POTENTIAL_CC
777VS_PATH
778VS_LIB
779VS_INCLUDE
780CYGWIN_LINK
781EXE_SUFFIX
782OBJ_SUFFIX
783STATIC_LIBRARY
784SHARED_LIBRARY
785STATIC_LIBRARY_SUFFIX
786SHARED_LIBRARY_SUFFIX
787LIBRARY_PREFIX
788TOOLCHAIN_TYPE
789BUILD_HOTSPOT
790HOTSPOT_DIST
791BUILD_OUTPUT
792OVERRIDE_SRC_ROOT
793ADD_SRC_ROOT
794JDK_TOPDIR
795NASHORN_TOPDIR
796HOTSPOT_TOPDIR
797JAXWS_TOPDIR
798JAXP_TOPDIR
799CORBA_TOPDIR
800LANGTOOLS_TOPDIR
801JAVA_FLAGS_SMALL
802JAVA_FLAGS_BIG
803JAVA_FLAGS
804JAVAC_FLAGS
805BOOT_JDK_SOURCETARGET
806JARSIGNER
807NATIVE2ASCII
808JAR
809JAVAH
810JAVAC
811JAVA
812BOOT_JDK
813BOOT_TOOLSJAR
814BOOT_RTJAR
815JAVA_CHECK
816JAVAC_CHECK
817COOKED_BUILD_NUMBER
818JDK_VERSION
819COPYRIGHT_YEAR
820MACOSX_BUNDLE_ID_BASE
821MACOSX_BUNDLE_NAME_BASE
822COMPANY_NAME
823JDK_RC_PLATFORM_NAME
824PRODUCT_SUFFIX
825PRODUCT_NAME
826LAUNCHER_NAME
827MILESTONE
828JDK_BUILD_NUMBER
829JDK_UPDATE_VERSION
830JDK_MICRO_VERSION
831JDK_MINOR_VERSION
832JDK_MAJOR_VERSION
833USER_RELEASE_SUFFIX
834COMPRESS_JARS
835RMICONNECTOR_IIOP
836UNLIMITED_CRYPTO
837CACERTS_FILE
838TEST_IN_BUILD
839BUILD_HEADLESS
840SUPPORT_HEADFUL
841SUPPORT_HEADLESS
842BDEPS_FTP
843BDEPS_UNZIP
844OS_VERSION_MICRO
845OS_VERSION_MINOR
846OS_VERSION_MAJOR
847PKG_CONFIG
848CODESIGN
849XATTR
850DSYMUTIL
851IS_GNU_TIME
852TIME
853STAT
854HG
855READELF
856OTOOL
857LDD
858ZIP
859UNZIP
860FIND_DELETE
861MAKE
862CHECK_TOOLSDIR_MAKE
863CHECK_TOOLSDIR_GMAKE
864CHECK_MAKE
865CHECK_GMAKE
866PKGHANDLER
867OUTPUT_ROOT
868CONF_NAME
869SPEC
870BUILD_VARIANT_RELEASE
871DEBUG_CLASSFILES
872FASTDEBUG
873VARIANT
874DEBUG_LEVEL
875MACOSX_UNIVERSAL
876INCLUDE_SA
877JVM_VARIANT_CORE
878JVM_VARIANT_ZEROSHARK
879JVM_VARIANT_ZERO
880JVM_VARIANT_KERNEL
881JVM_VARIANT_MINIMAL1
882JVM_VARIANT_CLIENT
883JVM_VARIANT_SERVER
884JVM_VARIANTS
885JVM_INTERPRETER
886JDK_VARIANT
887SET_OPENJDK
888BUILD_LOG_WRAPPER
889BUILD_LOG_PREVIOUS
890BUILD_LOG
891TOPDIR
892PATH_SEP
893ZERO_ARCHDEF
894DEFINE_CROSS_COMPILE_ARCH
895LP64
896OPENJDK_TARGET_OS_EXPORT_DIR
897OPENJDK_TARGET_OS_API_DIR
898OPENJDK_TARGET_CPU_JLI_CFLAGS
899OPENJDK_TARGET_CPU_OSARCH
900OPENJDK_TARGET_CPU_ISADIR
901OPENJDK_TARGET_CPU_LIBDIR
902OPENJDK_TARGET_CPU_LEGACY_LIB
903OPENJDK_TARGET_CPU_LEGACY
904REQUIRED_OS_VERSION
905REQUIRED_OS_NAME
906COMPILE_TYPE
907OPENJDK_TARGET_CPU_ENDIAN
908OPENJDK_TARGET_CPU_BITS
909OPENJDK_TARGET_CPU_ARCH
910OPENJDK_TARGET_CPU
911OPENJDK_TARGET_OS_API
912OPENJDK_TARGET_OS
913OPENJDK_BUILD_CPU_ENDIAN
914OPENJDK_BUILD_CPU_BITS
915OPENJDK_BUILD_CPU_ARCH
916OPENJDK_BUILD_CPU
917OPENJDK_BUILD_OS_API
918OPENJDK_BUILD_OS
919OPENJDK_BUILD_AUTOCONF_NAME
920OPENJDK_TARGET_AUTOCONF_NAME
921target_os
922target_vendor
923target_cpu
924target
925host_os
926host_vendor
927host_cpu
928host
929build_os
930build_vendor
931build_cpu
932build
933SETFILE
934DF
935READLINK
936CYGPATH
937SED
938FGREP
939EGREP
940GREP
941AWK
942XARGS
943WHICH
944WC
945UNIQ
946UNAME
947TR
948TOUCH
949TEE
950TAR
951TAIL
952SORT
953SH
954RM
955PRINTF
956NAWK
957MV
958MKTEMP
959MKDIR
960LS
961LN
962HEAD
963FIND
964FILE
965EXPR
966ECHO
967DIRNAME
968DIFF
969DATE
970CUT
971CPIO
972CP
973COMM
974CMP
975CHMOD
976CAT
977BASH
978BASENAME
979DATE_WHEN_CONFIGURED
980CONFIGURE_COMMAND_LINE
981target_alias
982host_alias
983build_alias
984LIBS
985ECHO_T
986ECHO_N
987ECHO_C
988DEFS
989mandir
990localedir
991libdir
992psdir
993pdfdir
994dvidir
995htmldir
996infodir
997docdir
998oldincludedir
999includedir
1000localstatedir
1001sharedstatedir
1002sysconfdir
1003datadir
1004datarootdir
1005libexecdir
1006sbindir
1007bindir
1008program_transform_name
1009prefix
1010exec_prefix
1011PACKAGE_URL
1012PACKAGE_BUGREPORT
1013PACKAGE_STRING
1014PACKAGE_VERSION
1015PACKAGE_TARNAME
1016PACKAGE_NAME
1017PATH_SEPARATOR
1018SHELL'
1019ac_subst_files=''
1020ac_user_opts='
1021enable_option_checking
1022with_target_bits
1023enable_openjdk_only
1024with_custom_make_dir
1025with_jdk_variant
1026with_jvm_interpreter
1027with_jvm_variants
1028enable_debug
1029with_debug_level
1030with_devkit
1031with_sys_root
1032with_sysroot
1033with_tools_dir
1034with_toolchain_path
1035with_extra_path
1036with_conf_name
1037with_builddeps_conf
1038with_builddeps_server
1039with_builddeps_dir
1040with_builddeps_group
1041enable_headful
1042enable_hotspot_test_in_build
1043with_cacerts_file
1044enable_unlimited_crypto
1045enable_rmiconnector_iiop
1046with_milestone
1047with_update_version
1048with_user_release_suffix
1049with_build_number
1050with_boot_jdk
1051with_boot_jdk_jvmargs
1052with_add_source_root
1053with_override_source_root
1054with_adds_and_overrides
1055with_override_langtools
1056with_override_corba
1057with_override_jaxp
1058with_override_jaxws
1059with_override_hotspot
1060with_override_nashorn
1061with_override_jdk
1062with_import_hotspot
1063with_toolchain_type
1064with_jtreg
1065with_extra_cflags
1066with_extra_cxxflags
1067with_extra_ldflags
1068enable_debug_symbols
1069enable_zip_debug_info
1070enable_macosx_runtime_support
1071with_x
1072with_cups
1073with_cups_include
1074with_freetype
1075with_freetype_include
1076with_freetype_lib
1077enable_freetype_bundling
1078with_alsa
1079with_alsa_include
1080with_alsa_lib
1081with_giflib
1082with_libpng
1083with_zlib
1084with_stdc__lib
1085with_msvcr_dll
1086with_dxsdk
1087with_dxsdk_lib
1088with_dxsdk_include
1089with_num_cores
1090with_memory_size
1091with_jobs
1092with_sjavac_server_java
1093enable_sjavac
1094enable_precompiled_headers
1095enable_ccache
1096with_ccache_dir
1097'
1098      ac_precious_vars='build_alias
1099host_alias
1100target_alias
1101BASENAME
1102BASH
1103CAT
1104CHMOD
1105CMP
1106COMM
1107CP
1108CPIO
1109CUT
1110DATE
1111DIFF
1112DIRNAME
1113ECHO
1114EXPR
1115FILE
1116FIND
1117HEAD
1118LN
1119LS
1120MKDIR
1121MKTEMP
1122MV
1123NAWK
1124PRINTF
1125RM
1126SH
1127SORT
1128TAIL
1129TAR
1130TEE
1131TOUCH
1132TR
1133UNAME
1134UNIQ
1135WC
1136WHICH
1137XARGS
1138AWK
1139GREP
1140EGREP
1141FGREP
1142SED
1143CYGPATH
1144READLINK
1145DF
1146SETFILE
1147UNZIP
1148ZIP
1149LDD
1150OTOOL
1151READELF
1152HG
1153STAT
1154TIME
1155DSYMUTIL
1156XATTR
1157CODESIGN
1158PKG_CONFIG
1159JAVA
1160JAVAC
1161JAVAH
1162JAR
1163NATIVE2ASCII
1164JARSIGNER
1165CC
1166CFLAGS
1167LDFLAGS
1168LIBS
1169CPPFLAGS
1170CXX
1171CXXFLAGS
1172CCC
1173CPP
1174CXXCPP
1175AS
1176AR
1177OBJC
1178OBJCFLAGS
1179LIPO
1180STRIP
1181NM
1182GNM
1183MCS
1184OBJCOPY
1185OBJDUMP
1186BUILD_CC
1187BUILD_CXX
1188BUILD_LD
1189JTREGEXE
1190XMKMF
1191FREETYPE_CFLAGS
1192FREETYPE_LIBS
1193ALSA_CFLAGS
1194ALSA_LIBS
1195PNG_CFLAGS
1196PNG_LIBS
1197LIBFFI_CFLAGS
1198LIBFFI_LIBS
1199CCACHE'
1200
1201
1202# Initialize some variables set by options.
1203ac_init_help=
1204ac_init_version=false
1205ac_unrecognized_opts=
1206ac_unrecognized_sep=
1207# The variables have the same names as the options, with
1208# dashes changed to underlines.
1209cache_file=/dev/null
1210exec_prefix=NONE
1211no_create=
1212no_recursion=
1213prefix=NONE
1214program_prefix=NONE
1215program_suffix=NONE
1216program_transform_name=s,x,x,
1217silent=
1218site=
1219srcdir=
1220verbose=
1221x_includes=NONE
1222x_libraries=NONE
1223
1224# Installation directory options.
1225# These are left unexpanded so users can "make install exec_prefix=/foo"
1226# and all the variables that are supposed to be based on exec_prefix
1227# by default will actually change.
1228# Use braces instead of parens because sh, perl, etc. also accept them.
1229# (The list follows the same order as the GNU Coding Standards.)
1230bindir='${exec_prefix}/bin'
1231sbindir='${exec_prefix}/sbin'
1232libexecdir='${exec_prefix}/libexec'
1233datarootdir='${prefix}/share'
1234datadir='${datarootdir}'
1235sysconfdir='${prefix}/etc'
1236sharedstatedir='${prefix}/com'
1237localstatedir='${prefix}/var'
1238includedir='${prefix}/include'
1239oldincludedir='/usr/include'
1240docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1241infodir='${datarootdir}/info'
1242htmldir='${docdir}'
1243dvidir='${docdir}'
1244pdfdir='${docdir}'
1245psdir='${docdir}'
1246libdir='${exec_prefix}/lib'
1247localedir='${datarootdir}/locale'
1248mandir='${datarootdir}/man'
1249
1250ac_prev=
1251ac_dashdash=
1252for ac_option
1253do
1254  # If the previous option needs an argument, assign it.
1255  if test -n "$ac_prev"; then
1256    eval $ac_prev=\$ac_option
1257    ac_prev=
1258    continue
1259  fi
1260
1261  case $ac_option in
1262  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1263  *=)   ac_optarg= ;;
1264  *)    ac_optarg=yes ;;
1265  esac
1266
1267  # Accept the important Cygnus configure options, so we can diagnose typos.
1268
1269  case $ac_dashdash$ac_option in
1270  --)
1271    ac_dashdash=yes ;;
1272
1273  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1274    ac_prev=bindir ;;
1275  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1276    bindir=$ac_optarg ;;
1277
1278  -build | --build | --buil | --bui | --bu)
1279    ac_prev=build_alias ;;
1280  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1281    build_alias=$ac_optarg ;;
1282
1283  -cache-file | --cache-file | --cache-fil | --cache-fi \
1284  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1285    ac_prev=cache_file ;;
1286  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1287  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1288    cache_file=$ac_optarg ;;
1289
1290  --config-cache | -C)
1291    cache_file=config.cache ;;
1292
1293  -datadir | --datadir | --datadi | --datad)
1294    ac_prev=datadir ;;
1295  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1296    datadir=$ac_optarg ;;
1297
1298  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1299  | --dataroo | --dataro | --datar)
1300    ac_prev=datarootdir ;;
1301  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1302  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1303    datarootdir=$ac_optarg ;;
1304
1305  -disable-* | --disable-*)
1306    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1307    # Reject names that are not valid shell variable names.
1308    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1309      as_fn_error $? "invalid feature name: $ac_useropt"
1310    ac_useropt_orig=$ac_useropt
1311    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1312    case $ac_user_opts in
1313      *"
1314"enable_$ac_useropt"
1315"*) ;;
1316      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1317	 ac_unrecognized_sep=', ';;
1318    esac
1319    eval enable_$ac_useropt=no ;;
1320
1321  -docdir | --docdir | --docdi | --doc | --do)
1322    ac_prev=docdir ;;
1323  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1324    docdir=$ac_optarg ;;
1325
1326  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1327    ac_prev=dvidir ;;
1328  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1329    dvidir=$ac_optarg ;;
1330
1331  -enable-* | --enable-*)
1332    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1333    # Reject names that are not valid shell variable names.
1334    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1335      as_fn_error $? "invalid feature name: $ac_useropt"
1336    ac_useropt_orig=$ac_useropt
1337    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1338    case $ac_user_opts in
1339      *"
1340"enable_$ac_useropt"
1341"*) ;;
1342      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1343	 ac_unrecognized_sep=', ';;
1344    esac
1345    eval enable_$ac_useropt=\$ac_optarg ;;
1346
1347  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1348  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1349  | --exec | --exe | --ex)
1350    ac_prev=exec_prefix ;;
1351  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1352  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1353  | --exec=* | --exe=* | --ex=*)
1354    exec_prefix=$ac_optarg ;;
1355
1356  -gas | --gas | --ga | --g)
1357    # Obsolete; use --with-gas.
1358    with_gas=yes ;;
1359
1360  -help | --help | --hel | --he | -h)
1361    ac_init_help=long ;;
1362  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1363    ac_init_help=recursive ;;
1364  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1365    ac_init_help=short ;;
1366
1367  -host | --host | --hos | --ho)
1368    ac_prev=host_alias ;;
1369  -host=* | --host=* | --hos=* | --ho=*)
1370    host_alias=$ac_optarg ;;
1371
1372  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1373    ac_prev=htmldir ;;
1374  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1375  | --ht=*)
1376    htmldir=$ac_optarg ;;
1377
1378  -includedir | --includedir | --includedi | --included | --include \
1379  | --includ | --inclu | --incl | --inc)
1380    ac_prev=includedir ;;
1381  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1382  | --includ=* | --inclu=* | --incl=* | --inc=*)
1383    includedir=$ac_optarg ;;
1384
1385  -infodir | --infodir | --infodi | --infod | --info | --inf)
1386    ac_prev=infodir ;;
1387  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1388    infodir=$ac_optarg ;;
1389
1390  -libdir | --libdir | --libdi | --libd)
1391    ac_prev=libdir ;;
1392  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1393    libdir=$ac_optarg ;;
1394
1395  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1396  | --libexe | --libex | --libe)
1397    ac_prev=libexecdir ;;
1398  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1399  | --libexe=* | --libex=* | --libe=*)
1400    libexecdir=$ac_optarg ;;
1401
1402  -localedir | --localedir | --localedi | --localed | --locale)
1403    ac_prev=localedir ;;
1404  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1405    localedir=$ac_optarg ;;
1406
1407  -localstatedir | --localstatedir | --localstatedi | --localstated \
1408  | --localstate | --localstat | --localsta | --localst | --locals)
1409    ac_prev=localstatedir ;;
1410  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1411  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1412    localstatedir=$ac_optarg ;;
1413
1414  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1415    ac_prev=mandir ;;
1416  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1417    mandir=$ac_optarg ;;
1418
1419  -nfp | --nfp | --nf)
1420    # Obsolete; use --without-fp.
1421    with_fp=no ;;
1422
1423  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1424  | --no-cr | --no-c | -n)
1425    no_create=yes ;;
1426
1427  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1428  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1429    no_recursion=yes ;;
1430
1431  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1432  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1433  | --oldin | --oldi | --old | --ol | --o)
1434    ac_prev=oldincludedir ;;
1435  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1436  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1437  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1438    oldincludedir=$ac_optarg ;;
1439
1440  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1441    ac_prev=prefix ;;
1442  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1443    prefix=$ac_optarg ;;
1444
1445  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1446  | --program-pre | --program-pr | --program-p)
1447    ac_prev=program_prefix ;;
1448  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1449  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1450    program_prefix=$ac_optarg ;;
1451
1452  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1453  | --program-suf | --program-su | --program-s)
1454    ac_prev=program_suffix ;;
1455  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1456  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1457    program_suffix=$ac_optarg ;;
1458
1459  -program-transform-name | --program-transform-name \
1460  | --program-transform-nam | --program-transform-na \
1461  | --program-transform-n | --program-transform- \
1462  | --program-transform | --program-transfor \
1463  | --program-transfo | --program-transf \
1464  | --program-trans | --program-tran \
1465  | --progr-tra | --program-tr | --program-t)
1466    ac_prev=program_transform_name ;;
1467  -program-transform-name=* | --program-transform-name=* \
1468  | --program-transform-nam=* | --program-transform-na=* \
1469  | --program-transform-n=* | --program-transform-=* \
1470  | --program-transform=* | --program-transfor=* \
1471  | --program-transfo=* | --program-transf=* \
1472  | --program-trans=* | --program-tran=* \
1473  | --progr-tra=* | --program-tr=* | --program-t=*)
1474    program_transform_name=$ac_optarg ;;
1475
1476  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1477    ac_prev=pdfdir ;;
1478  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1479    pdfdir=$ac_optarg ;;
1480
1481  -psdir | --psdir | --psdi | --psd | --ps)
1482    ac_prev=psdir ;;
1483  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1484    psdir=$ac_optarg ;;
1485
1486  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1487  | -silent | --silent | --silen | --sile | --sil)
1488    silent=yes ;;
1489
1490  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1491    ac_prev=sbindir ;;
1492  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1493  | --sbi=* | --sb=*)
1494    sbindir=$ac_optarg ;;
1495
1496  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1497  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1498  | --sharedst | --shareds | --shared | --share | --shar \
1499  | --sha | --sh)
1500    ac_prev=sharedstatedir ;;
1501  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1502  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1503  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1504  | --sha=* | --sh=*)
1505    sharedstatedir=$ac_optarg ;;
1506
1507  -site | --site | --sit)
1508    ac_prev=site ;;
1509  -site=* | --site=* | --sit=*)
1510    site=$ac_optarg ;;
1511
1512  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1513    ac_prev=srcdir ;;
1514  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1515    srcdir=$ac_optarg ;;
1516
1517  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1518  | --syscon | --sysco | --sysc | --sys | --sy)
1519    ac_prev=sysconfdir ;;
1520  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1521  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1522    sysconfdir=$ac_optarg ;;
1523
1524  -target | --target | --targe | --targ | --tar | --ta | --t)
1525    ac_prev=target_alias ;;
1526  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1527    target_alias=$ac_optarg ;;
1528
1529  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1530    verbose=yes ;;
1531
1532  -version | --version | --versio | --versi | --vers | -V)
1533    ac_init_version=: ;;
1534
1535  -with-* | --with-*)
1536    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1537    # Reject names that are not valid shell variable names.
1538    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1539      as_fn_error $? "invalid package name: $ac_useropt"
1540    ac_useropt_orig=$ac_useropt
1541    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1542    case $ac_user_opts in
1543      *"
1544"with_$ac_useropt"
1545"*) ;;
1546      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1547	 ac_unrecognized_sep=', ';;
1548    esac
1549    eval with_$ac_useropt=\$ac_optarg ;;
1550
1551  -without-* | --without-*)
1552    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1553    # Reject names that are not valid shell variable names.
1554    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1555      as_fn_error $? "invalid package name: $ac_useropt"
1556    ac_useropt_orig=$ac_useropt
1557    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1558    case $ac_user_opts in
1559      *"
1560"with_$ac_useropt"
1561"*) ;;
1562      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1563	 ac_unrecognized_sep=', ';;
1564    esac
1565    eval with_$ac_useropt=no ;;
1566
1567  --x)
1568    # Obsolete; use --with-x.
1569    with_x=yes ;;
1570
1571  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1572  | --x-incl | --x-inc | --x-in | --x-i)
1573    ac_prev=x_includes ;;
1574  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1575  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1576    x_includes=$ac_optarg ;;
1577
1578  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1579  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1580    ac_prev=x_libraries ;;
1581  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1582  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1583    x_libraries=$ac_optarg ;;
1584
1585  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1586Try \`$0 --help' for more information"
1587    ;;
1588
1589  *=*)
1590    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1591    # Reject names that are not valid shell variable names.
1592    case $ac_envvar in #(
1593      '' | [0-9]* | *[!_$as_cr_alnum]* )
1594      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1595    esac
1596    eval $ac_envvar=\$ac_optarg
1597    export $ac_envvar ;;
1598
1599  *)
1600    # FIXME: should be removed in autoconf 3.0.
1601    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1602    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1603      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1604    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1605    ;;
1606
1607  esac
1608done
1609
1610if test -n "$ac_prev"; then
1611  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1612  as_fn_error $? "missing argument to $ac_option"
1613fi
1614
1615if test -n "$ac_unrecognized_opts"; then
1616  case $enable_option_checking in
1617    no) ;;
1618    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1619    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1620  esac
1621fi
1622
1623# Check all directory arguments for consistency.
1624for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1625		datadir sysconfdir sharedstatedir localstatedir includedir \
1626		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1627		libdir localedir mandir
1628do
1629  eval ac_val=\$$ac_var
1630  # Remove trailing slashes.
1631  case $ac_val in
1632    */ )
1633      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1634      eval $ac_var=\$ac_val;;
1635  esac
1636  # Be sure to have absolute directory names.
1637  case $ac_val in
1638    [\\/$]* | ?:[\\/]* )  continue;;
1639    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1640  esac
1641  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1642done
1643
1644# There might be people who depend on the old broken behavior: `$host'
1645# used to hold the argument of --host etc.
1646# FIXME: To remove some day.
1647build=$build_alias
1648host=$host_alias
1649target=$target_alias
1650
1651# FIXME: To remove some day.
1652if test "x$host_alias" != x; then
1653  if test "x$build_alias" = x; then
1654    cross_compiling=maybe
1655  elif test "x$build_alias" != "x$host_alias"; then
1656    cross_compiling=yes
1657  fi
1658fi
1659
1660ac_tool_prefix=
1661test -n "$host_alias" && ac_tool_prefix=$host_alias-
1662
1663test "$silent" = yes && exec 6>/dev/null
1664
1665
1666ac_pwd=`pwd` && test -n "$ac_pwd" &&
1667ac_ls_di=`ls -di .` &&
1668ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1669  as_fn_error $? "working directory cannot be determined"
1670test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1671  as_fn_error $? "pwd does not report name of working directory"
1672
1673
1674# Find the source files, if location was not specified.
1675if test -z "$srcdir"; then
1676  ac_srcdir_defaulted=yes
1677  # Try the directory containing this script, then the parent directory.
1678  ac_confdir=`$as_dirname -- "$as_myself" ||
1679$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1680	 X"$as_myself" : 'X\(//\)[^/]' \| \
1681	 X"$as_myself" : 'X\(//\)$' \| \
1682	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1683$as_echo X"$as_myself" |
1684    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1685	    s//\1/
1686	    q
1687	  }
1688	  /^X\(\/\/\)[^/].*/{
1689	    s//\1/
1690	    q
1691	  }
1692	  /^X\(\/\/\)$/{
1693	    s//\1/
1694	    q
1695	  }
1696	  /^X\(\/\).*/{
1697	    s//\1/
1698	    q
1699	  }
1700	  s/.*/./; q'`
1701  srcdir=$ac_confdir
1702  if test ! -r "$srcdir/$ac_unique_file"; then
1703    srcdir=..
1704  fi
1705else
1706  ac_srcdir_defaulted=no
1707fi
1708if test ! -r "$srcdir/$ac_unique_file"; then
1709  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1710  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1711fi
1712ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1713ac_abs_confdir=`(
1714	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1715	pwd)`
1716# When building in place, set srcdir=.
1717if test "$ac_abs_confdir" = "$ac_pwd"; then
1718  srcdir=.
1719fi
1720# Remove unnecessary trailing slashes from srcdir.
1721# Double slashes in file names in object file debugging info
1722# mess up M-x gdb in Emacs.
1723case $srcdir in
1724*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1725esac
1726for ac_var in $ac_precious_vars; do
1727  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1728  eval ac_env_${ac_var}_value=\$${ac_var}
1729  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1730  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1731done
1732
1733#
1734# Report the --help message.
1735#
1736if test "$ac_init_help" = "long"; then
1737  # Omit some internal or obsolete options to make the list less imposing.
1738  # This message is too long to be a string in the A/UX 3.1 sh.
1739  cat <<_ACEOF
1740\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1741
1742Usage: $0 [OPTION]... [VAR=VALUE]...
1743
1744To assign environment variables (e.g., CC, CFLAGS...), specify them as
1745VAR=VALUE.  See below for descriptions of some of the useful variables.
1746
1747Defaults for the options are specified in brackets.
1748
1749Configuration:
1750  -h, --help              display this help and exit
1751      --help=short        display options specific to this package
1752      --help=recursive    display the short help of all the included packages
1753  -V, --version           display version information and exit
1754  -q, --quiet, --silent   do not print \`checking ...' messages
1755      --cache-file=FILE   cache test results in FILE [disabled]
1756  -C, --config-cache      alias for \`--cache-file=config.cache'
1757  -n, --no-create         do not create output files
1758      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1759
1760Installation directories:
1761  --prefix=PREFIX         install architecture-independent files in PREFIX
1762                          [$ac_default_prefix]
1763  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1764                          [PREFIX]
1765
1766By default, \`make install' will install all the files in
1767\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1768an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1769for instance \`--prefix=\$HOME'.
1770
1771For better control, use the options below.
1772
1773Fine tuning of the installation directories:
1774  --bindir=DIR            user executables [EPREFIX/bin]
1775  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1776  --libexecdir=DIR        program executables [EPREFIX/libexec]
1777  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1778  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1779  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1780  --libdir=DIR            object code libraries [EPREFIX/lib]
1781  --includedir=DIR        C header files [PREFIX/include]
1782  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1783  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1784  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1785  --infodir=DIR           info documentation [DATAROOTDIR/info]
1786  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1787  --mandir=DIR            man documentation [DATAROOTDIR/man]
1788  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1789  --htmldir=DIR           html documentation [DOCDIR]
1790  --dvidir=DIR            dvi documentation [DOCDIR]
1791  --pdfdir=DIR            pdf documentation [DOCDIR]
1792  --psdir=DIR             ps documentation [DOCDIR]
1793_ACEOF
1794
1795  cat <<\_ACEOF
1796
1797X features:
1798  --x-includes=DIR    X include files are in DIR
1799  --x-libraries=DIR   X library files are in DIR
1800
1801System types:
1802  --build=BUILD     configure for building on BUILD [guessed]
1803  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1804  --target=TARGET   configure for building compilers for TARGET [HOST]
1805_ACEOF
1806fi
1807
1808if test -n "$ac_init_help"; then
1809  case $ac_init_help in
1810     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1811   esac
1812  cat <<\_ACEOF
1813
1814Optional Features:
1815  --disable-option-checking  ignore unrecognized --enable/--with options
1816  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1817  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1818  --enable-openjdk-only   suppress building custom source even if present
1819                          [disabled]
1820  --enable-debug          set the debug level to fastdebug (shorthand for
1821                          --with-debug-level=fastdebug) [disabled]
1822  --disable-headful       disable building headful support (graphical UI
1823                          support) [enabled]
1824  --enable-hotspot-test-in-build
1825                          run the Queens test after Hotspot build [disabled]
1826  --enable-unlimited-crypto
1827                          Enable unlimited crypto policy [disabled]
1828  --enable-rmiconnector-iiop
1829                          enable the JMX RMIConnector iiop transport
1830                          [disabled]
1831  --disable-debug-symbols disable generation of debug symbols [enabled]
1832  --disable-zip-debug-info
1833                          disable zipping of debug-info files [enabled]
1834  --enable-macosx-runtime-support
1835                          Deprecated. Option is kept for backwards
1836                          compatibility and is ignored
1837  --disable-freetype-bundling
1838                          disable bundling of the freetype library with the
1839                          build result [enabled on Windows or when using
1840                          --with-freetype, disabled otherwise]
1841  --enable-sjavac         use sjavac to do fast incremental compiles
1842                          [disabled]
1843  --disable-precompiled-headers
1844                          disable using precompiled headers when compiling C++
1845                          [enabled]
1846  --enable-ccache         enable using ccache to speed up recompilations
1847                          [disabled]
1848
1849Optional Packages:
1850  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1851  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1852  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1853                          support it), e.g. --with-target-bits=32 [guessed]
1854  --with-custom-make-dir  Deprecated. Option is kept for backwards
1855                          compatibility and is ignored
1856  --with-jdk-variant      JDK variant to build (normal) [normal]
1857  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1858  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1859                          client, minimal1, kernel, zero, zeroshark, core)
1860                          [server]
1861  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1862                          optimized (HotSpot build only)) [release]
1863  --with-devkit           use this devkit for compilers, tools and resources
1864  --with-sys-root         alias for --with-sysroot for backwards compatability
1865  --with-sysroot          use this directory as sysroot)
1866  --with-tools-dir        alias for --with-toolchain-path for backwards
1867                          compatibility
1868  --with-toolchain-path   prepend these directories when searching for
1869                          toolchain binaries (compilers etc)
1870  --with-extra-path       prepend these directories to the default path
1871  --with-conf-name        use this as the name of the configuration [generated
1872                          from important configuration options]
1873  --with-builddeps-conf   use this configuration file for the builddeps
1874  --with-builddeps-server download and use build dependencies from this server
1875                          url
1876  --with-builddeps-dir    store downloaded build dependencies here
1877                          [/localhome/builddeps]
1878  --with-builddeps-group  chgrp the downloaded build dependencies to this
1879                          group
1880  --with-cacerts-file     specify alternative cacerts file
1881  --with-milestone        Set milestone value for build [internal]
1882  --with-update-version   Set update version value for build [b00]
1883  --with-user-release-suffix
1884                          Add a custom string to the version string if build
1885                          number is not set.[username_builddateb00]
1886  --with-build-number     Set build number value for build [b00]
1887  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1888  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1889                          invocations of boot JDK, overriding the default
1890                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1891                          -enableassertions"
1892  --with-add-source-root  for each and every source directory, look in this
1893                          additional source root for the same directory; if it
1894                          exists and have files in it, include it in the build
1895  --with-override-source-root
1896                          for each and every source directory, look in this
1897                          override source root for the same directory; if it
1898                          exists, use that directory instead and ignore the
1899                          directory in the original source root
1900  --with-adds-and-overrides
1901                          use the subdirs 'adds' and 'overrides' in the
1902                          specified directory as add-source-root and
1903                          override-source-root
1904  --with-override-langtools
1905                          use this langtools dir for the build
1906  --with-override-corba   use this corba dir for the build
1907  --with-override-jaxp    use this jaxp dir for the build
1908  --with-override-jaxws   use this jaxws dir for the build
1909  --with-override-hotspot use this hotspot dir for the build
1910  --with-override-nashorn use this nashorn dir for the build
1911  --with-override-jdk     use this jdk dir for the build
1912  --with-import-hotspot   import hotspot binaries from this jdk image or
1913                          hotspot build dist dir instead of building from
1914                          source
1915  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1916                          to show possible values [platform dependent]
1917  --with-jtreg            Regression Test Harness [probed]
1918  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1919  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1920  --with-extra-ldflags    extra flags to be used when linking jdk
1921  --with-x                use the X Window System
1922  --with-cups             specify prefix directory for the cups package
1923                          (expecting the headers under PATH/include)
1924  --with-cups-include     specify directory for the cups include files
1925  --with-freetype         specify prefix directory for the freetype package
1926                          (expecting the libraries under PATH/lib and the
1927                          headers under PATH/include)
1928  --with-freetype-include specify directory for the freetype include files
1929  --with-freetype-lib     specify directory for the freetype library
1930  --with-alsa             specify prefix directory for the alsa package
1931                          (expecting the libraries under PATH/lib and the
1932                          headers under PATH/include)
1933  --with-alsa-include     specify directory for the alsa include files
1934  --with-alsa-lib         specify directory for the alsa library
1935  --with-giflib           use giflib from build system or OpenJDK source
1936                          (system, bundled) [bundled]
1937  --with-libpng           use libpng from build system or OpenJDK source
1938                          (system, bundled) [bundled]
1939  --with-zlib             use zlib from build system or OpenJDK source
1940                          (system, bundled) [bundled]
1941  --with-stdc++lib=<static>,<dynamic>,<default>
1942                          force linking of the C++ runtime on Linux to either
1943                          static or dynamic, default is static with dynamic as
1944                          fallback
1945  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1946                          only) [probed]
1947  --with-dxsdk            Deprecated. Option is kept for backwards
1948                          compatibility and is ignored
1949  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1950                          compatibility and is ignored
1951  --with-dxsdk-include    Deprecated. Option is kept for backwards
1952                          compatibility and is ignored
1953  --with-num-cores        number of cores in the build system, e.g.
1954                          --with-num-cores=8 [probed]
1955  --with-memory-size      memory (in MB) available in the build system, e.g.
1956                          --with-memory-size=1024 [probed]
1957  --with-jobs             number of parallel jobs to let make run [calculated
1958                          based on cores and memory]
1959  --with-sjavac-server-java
1960                          use this java binary for running the sjavac
1961                          background server [Boot JDK java]
1962  --with-ccache-dir       where to store ccache files [~/.ccache]
1963
1964Some influential environment variables:
1965  BASENAME    Override default value for BASENAME
1966  BASH        Override default value for BASH
1967  CAT         Override default value for CAT
1968  CHMOD       Override default value for CHMOD
1969  CMP         Override default value for CMP
1970  COMM        Override default value for COMM
1971  CP          Override default value for CP
1972  CPIO        Override default value for CPIO
1973  CUT         Override default value for CUT
1974  DATE        Override default value for DATE
1975  DIFF        Override default value for DIFF
1976  DIRNAME     Override default value for DIRNAME
1977  ECHO        Override default value for ECHO
1978  EXPR        Override default value for EXPR
1979  FILE        Override default value for FILE
1980  FIND        Override default value for FIND
1981  HEAD        Override default value for HEAD
1982  LN          Override default value for LN
1983  LS          Override default value for LS
1984  MKDIR       Override default value for MKDIR
1985  MKTEMP      Override default value for MKTEMP
1986  MV          Override default value for MV
1987  NAWK        Override default value for NAWK
1988  PRINTF      Override default value for PRINTF
1989  RM          Override default value for RM
1990  SH          Override default value for SH
1991  SORT        Override default value for SORT
1992  TAIL        Override default value for TAIL
1993  TAR         Override default value for TAR
1994  TEE         Override default value for TEE
1995  TOUCH       Override default value for TOUCH
1996  TR          Override default value for TR
1997  UNAME       Override default value for UNAME
1998  UNIQ        Override default value for UNIQ
1999  WC          Override default value for WC
2000  WHICH       Override default value for WHICH
2001  XARGS       Override default value for XARGS
2002  AWK         Override default value for AWK
2003  GREP        Override default value for GREP
2004  EGREP       Override default value for EGREP
2005  FGREP       Override default value for FGREP
2006  SED         Override default value for SED
2007  CYGPATH     Override default value for CYGPATH
2008  READLINK    Override default value for READLINK
2009  DF          Override default value for DF
2010  SETFILE     Override default value for SETFILE
2011  UNZIP       Override default value for UNZIP
2012  ZIP         Override default value for ZIP
2013  LDD         Override default value for LDD
2014  OTOOL       Override default value for OTOOL
2015  READELF     Override default value for READELF
2016  HG          Override default value for HG
2017  STAT        Override default value for STAT
2018  TIME        Override default value for TIME
2019  DSYMUTIL    Override default value for DSYMUTIL
2020  XATTR       Override default value for XATTR
2021  CODESIGN    Override default value for CODESIGN
2022  PKG_CONFIG  path to pkg-config utility
2023  JAVA        Override default value for JAVA
2024  JAVAC       Override default value for JAVAC
2025  JAVAH       Override default value for JAVAH
2026  JAR         Override default value for JAR
2027  NATIVE2ASCII
2028              Override default value for NATIVE2ASCII
2029  JARSIGNER   Override default value for JARSIGNER
2030  CC          C compiler command
2031  CFLAGS      C compiler flags
2032  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2033              nonstandard directory <lib dir>
2034  LIBS        libraries to pass to the linker, e.g. -l<library>
2035  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2036              you have headers in a nonstandard directory <include dir>
2037  CXX         C++ compiler command
2038  CXXFLAGS    C++ compiler flags
2039  CPP         C preprocessor
2040  CXXCPP      C++ preprocessor
2041  AS          Override default value for AS
2042  AR          Override default value for AR
2043  OBJC        Objective C compiler command
2044  OBJCFLAGS   Objective C compiler flags
2045  LIPO        Override default value for LIPO
2046  STRIP       Override default value for STRIP
2047  NM          Override default value for NM
2048  GNM         Override default value for GNM
2049  MCS         Override default value for MCS
2050  OBJCOPY     Override default value for OBJCOPY
2051  OBJDUMP     Override default value for OBJDUMP
2052  BUILD_CC    Override default value for BUILD_CC
2053  BUILD_CXX   Override default value for BUILD_CXX
2054  BUILD_LD    Override default value for BUILD_LD
2055  JTREGEXE    Override default value for JTREGEXE
2056  XMKMF       Path to xmkmf, Makefile generator for X Window System
2057  FREETYPE_CFLAGS
2058              C compiler flags for FREETYPE, overriding pkg-config
2059  FREETYPE_LIBS
2060              linker flags for FREETYPE, overriding pkg-config
2061  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2062  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2063  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2064  PNG_LIBS    linker flags for PNG, overriding pkg-config
2065  LIBFFI_CFLAGS
2066              C compiler flags for LIBFFI, overriding pkg-config
2067  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2068  CCACHE      Override default value for CCACHE
2069
2070Use these variables to override the choices made by `configure' or to help
2071it to find libraries and programs with nonstandard names/locations.
2072
2073Report bugs to <build-dev@openjdk.java.net>.
2074OpenJDK home page: <http://openjdk.java.net>.
2075_ACEOF
2076ac_status=$?
2077fi
2078
2079if test "$ac_init_help" = "recursive"; then
2080  # If there are subdirs, report their specific --help.
2081  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2082    test -d "$ac_dir" ||
2083      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2084      continue
2085    ac_builddir=.
2086
2087case "$ac_dir" in
2088.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2089*)
2090  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2091  # A ".." for each directory in $ac_dir_suffix.
2092  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2093  case $ac_top_builddir_sub in
2094  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2095  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2096  esac ;;
2097esac
2098ac_abs_top_builddir=$ac_pwd
2099ac_abs_builddir=$ac_pwd$ac_dir_suffix
2100# for backward compatibility:
2101ac_top_builddir=$ac_top_build_prefix
2102
2103case $srcdir in
2104  .)  # We are building in place.
2105    ac_srcdir=.
2106    ac_top_srcdir=$ac_top_builddir_sub
2107    ac_abs_top_srcdir=$ac_pwd ;;
2108  [\\/]* | ?:[\\/]* )  # Absolute name.
2109    ac_srcdir=$srcdir$ac_dir_suffix;
2110    ac_top_srcdir=$srcdir
2111    ac_abs_top_srcdir=$srcdir ;;
2112  *) # Relative name.
2113    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2114    ac_top_srcdir=$ac_top_build_prefix$srcdir
2115    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2116esac
2117ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2118
2119    cd "$ac_dir" || { ac_status=$?; continue; }
2120    # Check for guested configure.
2121    if test -f "$ac_srcdir/configure.gnu"; then
2122      echo &&
2123      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2124    elif test -f "$ac_srcdir/configure"; then
2125      echo &&
2126      $SHELL "$ac_srcdir/configure" --help=recursive
2127    else
2128      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2129    fi || ac_status=$?
2130    cd "$ac_pwd" || { ac_status=$?; break; }
2131  done
2132fi
2133
2134test -n "$ac_init_help" && exit $ac_status
2135if $ac_init_version; then
2136  cat <<\_ACEOF
2137OpenJDK configure jdk9
2138generated by GNU Autoconf 2.69
2139
2140Copyright (C) 2012 Free Software Foundation, Inc.
2141This configure script is free software; the Free Software Foundation
2142gives unlimited permission to copy, distribute and modify it.
2143_ACEOF
2144  exit
2145fi
2146
2147## ------------------------ ##
2148## Autoconf initialization. ##
2149## ------------------------ ##
2150
2151# ac_fn_c_try_compile LINENO
2152# --------------------------
2153# Try to compile conftest.$ac_ext, and return whether this succeeded.
2154ac_fn_c_try_compile ()
2155{
2156  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2157  rm -f conftest.$ac_objext
2158  if { { ac_try="$ac_compile"
2159case "(($ac_try" in
2160  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2161  *) ac_try_echo=$ac_try;;
2162esac
2163eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2164$as_echo "$ac_try_echo"; } >&5
2165  (eval "$ac_compile") 2>conftest.err
2166  ac_status=$?
2167  if test -s conftest.err; then
2168    grep -v '^ *+' conftest.err >conftest.er1
2169    cat conftest.er1 >&5
2170    mv -f conftest.er1 conftest.err
2171  fi
2172  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2173  test $ac_status = 0; } && {
2174	 test -z "$ac_c_werror_flag" ||
2175	 test ! -s conftest.err
2176       } && test -s conftest.$ac_objext; then :
2177  ac_retval=0
2178else
2179  $as_echo "$as_me: failed program was:" >&5
2180sed 's/^/| /' conftest.$ac_ext >&5
2181
2182	ac_retval=1
2183fi
2184  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2185  as_fn_set_status $ac_retval
2186
2187} # ac_fn_c_try_compile
2188
2189# ac_fn_cxx_try_compile LINENO
2190# ----------------------------
2191# Try to compile conftest.$ac_ext, and return whether this succeeded.
2192ac_fn_cxx_try_compile ()
2193{
2194  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2195  rm -f conftest.$ac_objext
2196  if { { ac_try="$ac_compile"
2197case "(($ac_try" in
2198  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2199  *) ac_try_echo=$ac_try;;
2200esac
2201eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2202$as_echo "$ac_try_echo"; } >&5
2203  (eval "$ac_compile") 2>conftest.err
2204  ac_status=$?
2205  if test -s conftest.err; then
2206    grep -v '^ *+' conftest.err >conftest.er1
2207    cat conftest.er1 >&5
2208    mv -f conftest.er1 conftest.err
2209  fi
2210  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2211  test $ac_status = 0; } && {
2212	 test -z "$ac_cxx_werror_flag" ||
2213	 test ! -s conftest.err
2214       } && test -s conftest.$ac_objext; then :
2215  ac_retval=0
2216else
2217  $as_echo "$as_me: failed program was:" >&5
2218sed 's/^/| /' conftest.$ac_ext >&5
2219
2220	ac_retval=1
2221fi
2222  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2223  as_fn_set_status $ac_retval
2224
2225} # ac_fn_cxx_try_compile
2226
2227# ac_fn_c_try_cpp LINENO
2228# ----------------------
2229# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2230ac_fn_c_try_cpp ()
2231{
2232  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2233  if { { ac_try="$ac_cpp conftest.$ac_ext"
2234case "(($ac_try" in
2235  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2236  *) ac_try_echo=$ac_try;;
2237esac
2238eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2239$as_echo "$ac_try_echo"; } >&5
2240  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2241  ac_status=$?
2242  if test -s conftest.err; then
2243    grep -v '^ *+' conftest.err >conftest.er1
2244    cat conftest.er1 >&5
2245    mv -f conftest.er1 conftest.err
2246  fi
2247  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2248  test $ac_status = 0; } > conftest.i && {
2249	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2250	 test ! -s conftest.err
2251       }; then :
2252  ac_retval=0
2253else
2254  $as_echo "$as_me: failed program was:" >&5
2255sed 's/^/| /' conftest.$ac_ext >&5
2256
2257    ac_retval=1
2258fi
2259  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2260  as_fn_set_status $ac_retval
2261
2262} # ac_fn_c_try_cpp
2263
2264# ac_fn_cxx_try_cpp LINENO
2265# ------------------------
2266# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2267ac_fn_cxx_try_cpp ()
2268{
2269  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2270  if { { ac_try="$ac_cpp conftest.$ac_ext"
2271case "(($ac_try" in
2272  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2273  *) ac_try_echo=$ac_try;;
2274esac
2275eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2276$as_echo "$ac_try_echo"; } >&5
2277  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2278  ac_status=$?
2279  if test -s conftest.err; then
2280    grep -v '^ *+' conftest.err >conftest.er1
2281    cat conftest.er1 >&5
2282    mv -f conftest.er1 conftest.err
2283  fi
2284  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2285  test $ac_status = 0; } > conftest.i && {
2286	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2287	 test ! -s conftest.err
2288       }; then :
2289  ac_retval=0
2290else
2291  $as_echo "$as_me: failed program was:" >&5
2292sed 's/^/| /' conftest.$ac_ext >&5
2293
2294    ac_retval=1
2295fi
2296  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2297  as_fn_set_status $ac_retval
2298
2299} # ac_fn_cxx_try_cpp
2300
2301# ac_fn_objc_try_compile LINENO
2302# -----------------------------
2303# Try to compile conftest.$ac_ext, and return whether this succeeded.
2304ac_fn_objc_try_compile ()
2305{
2306  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2307  rm -f conftest.$ac_objext
2308  if { { ac_try="$ac_compile"
2309case "(($ac_try" in
2310  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2311  *) ac_try_echo=$ac_try;;
2312esac
2313eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2314$as_echo "$ac_try_echo"; } >&5
2315  (eval "$ac_compile") 2>conftest.err
2316  ac_status=$?
2317  if test -s conftest.err; then
2318    grep -v '^ *+' conftest.err >conftest.er1
2319    cat conftest.er1 >&5
2320    mv -f conftest.er1 conftest.err
2321  fi
2322  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2323  test $ac_status = 0; } && {
2324	 test -z "$ac_objc_werror_flag" ||
2325	 test ! -s conftest.err
2326       } && test -s conftest.$ac_objext; then :
2327  ac_retval=0
2328else
2329  $as_echo "$as_me: failed program was:" >&5
2330sed 's/^/| /' conftest.$ac_ext >&5
2331
2332	ac_retval=1
2333fi
2334  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2335  as_fn_set_status $ac_retval
2336
2337} # ac_fn_objc_try_compile
2338
2339# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2340# ---------------------------------------------------------
2341# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2342# the include files in INCLUDES and setting the cache variable VAR
2343# accordingly.
2344ac_fn_cxx_check_header_mongrel ()
2345{
2346  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2347  if eval \${$3+:} false; then :
2348  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2349$as_echo_n "checking for $2... " >&6; }
2350if eval \${$3+:} false; then :
2351  $as_echo_n "(cached) " >&6
2352fi
2353eval ac_res=\$$3
2354	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2355$as_echo "$ac_res" >&6; }
2356else
2357  # Is the header compilable?
2358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2359$as_echo_n "checking $2 usability... " >&6; }
2360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2361/* end confdefs.h.  */
2362$4
2363#include <$2>
2364_ACEOF
2365if ac_fn_cxx_try_compile "$LINENO"; then :
2366  ac_header_compiler=yes
2367else
2368  ac_header_compiler=no
2369fi
2370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2372$as_echo "$ac_header_compiler" >&6; }
2373
2374# Is the header present?
2375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2376$as_echo_n "checking $2 presence... " >&6; }
2377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2378/* end confdefs.h.  */
2379#include <$2>
2380_ACEOF
2381if ac_fn_cxx_try_cpp "$LINENO"; then :
2382  ac_header_preproc=yes
2383else
2384  ac_header_preproc=no
2385fi
2386rm -f conftest.err conftest.i conftest.$ac_ext
2387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2388$as_echo "$ac_header_preproc" >&6; }
2389
2390# So?  What about this header?
2391case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2392  yes:no: )
2393    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2394$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2395    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2396$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2397    ;;
2398  no:yes:* )
2399    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2400$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2401    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2402$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2403    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2404$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2405    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2406$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2407    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2408$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2409( $as_echo "## ----------------------------------------- ##
2410## Report this to build-dev@openjdk.java.net ##
2411## ----------------------------------------- ##"
2412     ) | sed "s/^/$as_me: WARNING:     /" >&2
2413    ;;
2414esac
2415  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2416$as_echo_n "checking for $2... " >&6; }
2417if eval \${$3+:} false; then :
2418  $as_echo_n "(cached) " >&6
2419else
2420  eval "$3=\$ac_header_compiler"
2421fi
2422eval ac_res=\$$3
2423	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2424$as_echo "$ac_res" >&6; }
2425fi
2426  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2427
2428} # ac_fn_cxx_check_header_mongrel
2429
2430# ac_fn_cxx_try_run LINENO
2431# ------------------------
2432# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2433# that executables *can* be run.
2434ac_fn_cxx_try_run ()
2435{
2436  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2437  if { { ac_try="$ac_link"
2438case "(($ac_try" in
2439  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2440  *) ac_try_echo=$ac_try;;
2441esac
2442eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2443$as_echo "$ac_try_echo"; } >&5
2444  (eval "$ac_link") 2>&5
2445  ac_status=$?
2446  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2447  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2448  { { case "(($ac_try" in
2449  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2450  *) ac_try_echo=$ac_try;;
2451esac
2452eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2453$as_echo "$ac_try_echo"; } >&5
2454  (eval "$ac_try") 2>&5
2455  ac_status=$?
2456  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2457  test $ac_status = 0; }; }; then :
2458  ac_retval=0
2459else
2460  $as_echo "$as_me: program exited with status $ac_status" >&5
2461       $as_echo "$as_me: failed program was:" >&5
2462sed 's/^/| /' conftest.$ac_ext >&5
2463
2464       ac_retval=$ac_status
2465fi
2466  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2467  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2468  as_fn_set_status $ac_retval
2469
2470} # ac_fn_cxx_try_run
2471
2472# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2473# ---------------------------------------------------------
2474# Tests whether HEADER exists and can be compiled using the include files in
2475# INCLUDES, setting the cache variable VAR accordingly.
2476ac_fn_cxx_check_header_compile ()
2477{
2478  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2479  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2480$as_echo_n "checking for $2... " >&6; }
2481if eval \${$3+:} false; then :
2482  $as_echo_n "(cached) " >&6
2483else
2484  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2485/* end confdefs.h.  */
2486$4
2487#include <$2>
2488_ACEOF
2489if ac_fn_cxx_try_compile "$LINENO"; then :
2490  eval "$3=yes"
2491else
2492  eval "$3=no"
2493fi
2494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2495fi
2496eval ac_res=\$$3
2497	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2498$as_echo "$ac_res" >&6; }
2499  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2500
2501} # ac_fn_cxx_check_header_compile
2502
2503# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2504# ----------------------------------------------
2505# Tries to find the compile-time value of EXPR in a program that includes
2506# INCLUDES, setting VAR accordingly. Returns whether the value could be
2507# computed
2508ac_fn_cxx_compute_int ()
2509{
2510  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2511  if test "$cross_compiling" = yes; then
2512    # Depending upon the size, compute the lo and hi bounds.
2513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2514/* end confdefs.h.  */
2515$4
2516int
2517main ()
2518{
2519static int test_array [1 - 2 * !(($2) >= 0)];
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_lo=0 ac_mid=0
2529  while :; do
2530    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2531/* end confdefs.h.  */
2532$4
2533int
2534main ()
2535{
2536static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2537test_array [0] = 0;
2538return test_array [0];
2539
2540  ;
2541  return 0;
2542}
2543_ACEOF
2544if ac_fn_cxx_try_compile "$LINENO"; then :
2545  ac_hi=$ac_mid; break
2546else
2547  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2548			if test $ac_lo -le $ac_mid; then
2549			  ac_lo= ac_hi=
2550			  break
2551			fi
2552			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2553fi
2554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2555  done
2556else
2557  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2558/* end confdefs.h.  */
2559$4
2560int
2561main ()
2562{
2563static int test_array [1 - 2 * !(($2) < 0)];
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_hi=-1 ac_mid=-1
2573  while :; do
2574    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2575/* end confdefs.h.  */
2576$4
2577int
2578main ()
2579{
2580static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2581test_array [0] = 0;
2582return test_array [0];
2583
2584  ;
2585  return 0;
2586}
2587_ACEOF
2588if ac_fn_cxx_try_compile "$LINENO"; then :
2589  ac_lo=$ac_mid; break
2590else
2591  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2592			if test $ac_mid -le $ac_hi; then
2593			  ac_lo= ac_hi=
2594			  break
2595			fi
2596			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2597fi
2598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2599  done
2600else
2601  ac_lo= ac_hi=
2602fi
2603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2604fi
2605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2606# Binary search between lo and hi bounds.
2607while test "x$ac_lo" != "x$ac_hi"; do
2608  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2609  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2610/* end confdefs.h.  */
2611$4
2612int
2613main ()
2614{
2615static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2616test_array [0] = 0;
2617return test_array [0];
2618
2619  ;
2620  return 0;
2621}
2622_ACEOF
2623if ac_fn_cxx_try_compile "$LINENO"; then :
2624  ac_hi=$ac_mid
2625else
2626  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2627fi
2628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2629done
2630case $ac_lo in #((
2631?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2632'') ac_retval=1 ;;
2633esac
2634  else
2635    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2636/* end confdefs.h.  */
2637$4
2638static long int longval () { return $2; }
2639static unsigned long int ulongval () { return $2; }
2640#include <stdio.h>
2641#include <stdlib.h>
2642int
2643main ()
2644{
2645
2646  FILE *f = fopen ("conftest.val", "w");
2647  if (! f)
2648    return 1;
2649  if (($2) < 0)
2650    {
2651      long int i = longval ();
2652      if (i != ($2))
2653	return 1;
2654      fprintf (f, "%ld", i);
2655    }
2656  else
2657    {
2658      unsigned long int i = ulongval ();
2659      if (i != ($2))
2660	return 1;
2661      fprintf (f, "%lu", i);
2662    }
2663  /* Do not output a trailing newline, as this causes \r\n confusion
2664     on some platforms.  */
2665  return ferror (f) || fclose (f) != 0;
2666
2667  ;
2668  return 0;
2669}
2670_ACEOF
2671if ac_fn_cxx_try_run "$LINENO"; then :
2672  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2673else
2674  ac_retval=1
2675fi
2676rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2677  conftest.$ac_objext conftest.beam conftest.$ac_ext
2678rm -f conftest.val
2679
2680  fi
2681  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2682  as_fn_set_status $ac_retval
2683
2684} # ac_fn_cxx_compute_int
2685
2686# ac_fn_cxx_try_link LINENO
2687# -------------------------
2688# Try to link conftest.$ac_ext, and return whether this succeeded.
2689ac_fn_cxx_try_link ()
2690{
2691  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2692  rm -f conftest.$ac_objext conftest$ac_exeext
2693  if { { ac_try="$ac_link"
2694case "(($ac_try" in
2695  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2696  *) ac_try_echo=$ac_try;;
2697esac
2698eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2699$as_echo "$ac_try_echo"; } >&5
2700  (eval "$ac_link") 2>conftest.err
2701  ac_status=$?
2702  if test -s conftest.err; then
2703    grep -v '^ *+' conftest.err >conftest.er1
2704    cat conftest.er1 >&5
2705    mv -f conftest.er1 conftest.err
2706  fi
2707  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2708  test $ac_status = 0; } && {
2709	 test -z "$ac_cxx_werror_flag" ||
2710	 test ! -s conftest.err
2711       } && test -s conftest$ac_exeext && {
2712	 test "$cross_compiling" = yes ||
2713	 test -x conftest$ac_exeext
2714       }; then :
2715  ac_retval=0
2716else
2717  $as_echo "$as_me: failed program was:" >&5
2718sed 's/^/| /' conftest.$ac_ext >&5
2719
2720	ac_retval=1
2721fi
2722  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2723  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2724  # interfere with the next link command; also delete a directory that is
2725  # left behind by Apple's compiler.  We do this before executing the actions.
2726  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2727  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2728  as_fn_set_status $ac_retval
2729
2730} # ac_fn_cxx_try_link
2731
2732# ac_fn_cxx_check_func LINENO FUNC VAR
2733# ------------------------------------
2734# Tests whether FUNC exists, setting the cache variable VAR accordingly
2735ac_fn_cxx_check_func ()
2736{
2737  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2738  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2739$as_echo_n "checking for $2... " >&6; }
2740if eval \${$3+:} false; then :
2741  $as_echo_n "(cached) " >&6
2742else
2743  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2744/* end confdefs.h.  */
2745/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2746   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2747#define $2 innocuous_$2
2748
2749/* System header to define __stub macros and hopefully few prototypes,
2750    which can conflict with char $2 (); below.
2751    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2752    <limits.h> exists even on freestanding compilers.  */
2753
2754#ifdef __STDC__
2755# include <limits.h>
2756#else
2757# include <assert.h>
2758#endif
2759
2760#undef $2
2761
2762/* Override any GCC internal prototype to avoid an error.
2763   Use char because int might match the return type of a GCC
2764   builtin and then its argument prototype would still apply.  */
2765#ifdef __cplusplus
2766extern "C"
2767#endif
2768char $2 ();
2769/* The GNU C library defines this for functions which it implements
2770    to always fail with ENOSYS.  Some functions are actually named
2771    something starting with __ and the normal name is an alias.  */
2772#if defined __stub_$2 || defined __stub___$2
2773choke me
2774#endif
2775
2776int
2777main ()
2778{
2779return $2 ();
2780  ;
2781  return 0;
2782}
2783_ACEOF
2784if ac_fn_cxx_try_link "$LINENO"; then :
2785  eval "$3=yes"
2786else
2787  eval "$3=no"
2788fi
2789rm -f core conftest.err conftest.$ac_objext \
2790    conftest$ac_exeext conftest.$ac_ext
2791fi
2792eval ac_res=\$$3
2793	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2794$as_echo "$ac_res" >&6; }
2795  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2796
2797} # ac_fn_cxx_check_func
2798
2799# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2800# -------------------------------------------------------
2801# Tests whether HEADER exists and can be compiled using the include files in
2802# INCLUDES, setting the cache variable VAR accordingly.
2803ac_fn_c_check_header_compile ()
2804{
2805  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2806  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2807$as_echo_n "checking for $2... " >&6; }
2808if eval \${$3+:} false; then :
2809  $as_echo_n "(cached) " >&6
2810else
2811  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2812/* end confdefs.h.  */
2813$4
2814#include <$2>
2815_ACEOF
2816if ac_fn_c_try_compile "$LINENO"; then :
2817  eval "$3=yes"
2818else
2819  eval "$3=no"
2820fi
2821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2822fi
2823eval ac_res=\$$3
2824	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2825$as_echo "$ac_res" >&6; }
2826  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2827
2828} # ac_fn_c_check_header_compile
2829cat >config.log <<_ACEOF
2830This file contains any messages produced by compilers while
2831running configure, to aid debugging if configure makes a mistake.
2832
2833It was created by OpenJDK $as_me jdk9, which was
2834generated by GNU Autoconf 2.69.  Invocation command line was
2835
2836  $ $0 $@
2837
2838_ACEOF
2839exec 5>>config.log
2840{
2841cat <<_ASUNAME
2842## --------- ##
2843## Platform. ##
2844## --------- ##
2845
2846hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2847uname -m = `(uname -m) 2>/dev/null || echo unknown`
2848uname -r = `(uname -r) 2>/dev/null || echo unknown`
2849uname -s = `(uname -s) 2>/dev/null || echo unknown`
2850uname -v = `(uname -v) 2>/dev/null || echo unknown`
2851
2852/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2853/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2854
2855/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2856/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2857/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2858/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2859/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2860/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2861/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2862
2863_ASUNAME
2864
2865as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2866for as_dir in $PATH
2867do
2868  IFS=$as_save_IFS
2869  test -z "$as_dir" && as_dir=.
2870    $as_echo "PATH: $as_dir"
2871  done
2872IFS=$as_save_IFS
2873
2874} >&5
2875
2876cat >&5 <<_ACEOF
2877
2878
2879## ----------- ##
2880## Core tests. ##
2881## ----------- ##
2882
2883_ACEOF
2884
2885
2886# Keep a trace of the command line.
2887# Strip out --no-create and --no-recursion so they do not pile up.
2888# Strip out --silent because we don't want to record it for future runs.
2889# Also quote any args containing shell meta-characters.
2890# Make two passes to allow for proper duplicate-argument suppression.
2891ac_configure_args=
2892ac_configure_args0=
2893ac_configure_args1=
2894ac_must_keep_next=false
2895for ac_pass in 1 2
2896do
2897  for ac_arg
2898  do
2899    case $ac_arg in
2900    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2901    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2902    | -silent | --silent | --silen | --sile | --sil)
2903      continue ;;
2904    *\'*)
2905      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2906    esac
2907    case $ac_pass in
2908    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2909    2)
2910      as_fn_append ac_configure_args1 " '$ac_arg'"
2911      if test $ac_must_keep_next = true; then
2912	ac_must_keep_next=false # Got value, back to normal.
2913      else
2914	case $ac_arg in
2915	  *=* | --config-cache | -C | -disable-* | --disable-* \
2916	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2917	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2918	  | -with-* | --with-* | -without-* | --without-* | --x)
2919	    case "$ac_configure_args0 " in
2920	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2921	    esac
2922	    ;;
2923	  -* ) ac_must_keep_next=true ;;
2924	esac
2925      fi
2926      as_fn_append ac_configure_args " '$ac_arg'"
2927      ;;
2928    esac
2929  done
2930done
2931{ ac_configure_args0=; unset ac_configure_args0;}
2932{ ac_configure_args1=; unset ac_configure_args1;}
2933
2934# When interrupted or exit'd, cleanup temporary files, and complete
2935# config.log.  We remove comments because anyway the quotes in there
2936# would cause problems or look ugly.
2937# WARNING: Use '\'' to represent an apostrophe within the trap.
2938# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2939trap 'exit_status=$?
2940  # Save into config.log some information that might help in debugging.
2941  {
2942    echo
2943
2944    $as_echo "## ---------------- ##
2945## Cache variables. ##
2946## ---------------- ##"
2947    echo
2948    # The following way of writing the cache mishandles newlines in values,
2949(
2950  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2951    eval ac_val=\$$ac_var
2952    case $ac_val in #(
2953    *${as_nl}*)
2954      case $ac_var in #(
2955      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2956$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2957      esac
2958      case $ac_var in #(
2959      _ | IFS | as_nl) ;; #(
2960      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2961      *) { eval $ac_var=; unset $ac_var;} ;;
2962      esac ;;
2963    esac
2964  done
2965  (set) 2>&1 |
2966    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2967    *${as_nl}ac_space=\ *)
2968      sed -n \
2969	"s/'\''/'\''\\\\'\'''\''/g;
2970	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2971      ;; #(
2972    *)
2973      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2974      ;;
2975    esac |
2976    sort
2977)
2978    echo
2979
2980    $as_echo "## ----------------- ##
2981## Output variables. ##
2982## ----------------- ##"
2983    echo
2984    for ac_var in $ac_subst_vars
2985    do
2986      eval ac_val=\$$ac_var
2987      case $ac_val in
2988      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2989      esac
2990      $as_echo "$ac_var='\''$ac_val'\''"
2991    done | sort
2992    echo
2993
2994    if test -n "$ac_subst_files"; then
2995      $as_echo "## ------------------- ##
2996## File substitutions. ##
2997## ------------------- ##"
2998      echo
2999      for ac_var in $ac_subst_files
3000      do
3001	eval ac_val=\$$ac_var
3002	case $ac_val in
3003	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3004	esac
3005	$as_echo "$ac_var='\''$ac_val'\''"
3006      done | sort
3007      echo
3008    fi
3009
3010    if test -s confdefs.h; then
3011      $as_echo "## ----------- ##
3012## confdefs.h. ##
3013## ----------- ##"
3014      echo
3015      cat confdefs.h
3016      echo
3017    fi
3018    test "$ac_signal" != 0 &&
3019      $as_echo "$as_me: caught signal $ac_signal"
3020    $as_echo "$as_me: exit $exit_status"
3021  } >&5
3022  rm -f core *.core core.conftest.* &&
3023    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3024    exit $exit_status
3025' 0
3026for ac_signal in 1 2 13 15; do
3027  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3028done
3029ac_signal=0
3030
3031# confdefs.h avoids OS command line length limits that DEFS can exceed.
3032rm -f -r conftest* confdefs.h
3033
3034$as_echo "/* confdefs.h */" > confdefs.h
3035
3036# Predefined preprocessor variables.
3037
3038cat >>confdefs.h <<_ACEOF
3039#define PACKAGE_NAME "$PACKAGE_NAME"
3040_ACEOF
3041
3042cat >>confdefs.h <<_ACEOF
3043#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3044_ACEOF
3045
3046cat >>confdefs.h <<_ACEOF
3047#define PACKAGE_VERSION "$PACKAGE_VERSION"
3048_ACEOF
3049
3050cat >>confdefs.h <<_ACEOF
3051#define PACKAGE_STRING "$PACKAGE_STRING"
3052_ACEOF
3053
3054cat >>confdefs.h <<_ACEOF
3055#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3056_ACEOF
3057
3058cat >>confdefs.h <<_ACEOF
3059#define PACKAGE_URL "$PACKAGE_URL"
3060_ACEOF
3061
3062
3063# Let the site file select an alternate cache file if it wants to.
3064# Prefer an explicitly selected file to automatically selected ones.
3065ac_site_file1=NONE
3066ac_site_file2=NONE
3067if test -n "$CONFIG_SITE"; then
3068  # We do not want a PATH search for config.site.
3069  case $CONFIG_SITE in #((
3070    -*)  ac_site_file1=./$CONFIG_SITE;;
3071    */*) ac_site_file1=$CONFIG_SITE;;
3072    *)   ac_site_file1=./$CONFIG_SITE;;
3073  esac
3074elif test "x$prefix" != xNONE; then
3075  ac_site_file1=$prefix/share/config.site
3076  ac_site_file2=$prefix/etc/config.site
3077else
3078  ac_site_file1=$ac_default_prefix/share/config.site
3079  ac_site_file2=$ac_default_prefix/etc/config.site
3080fi
3081for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3082do
3083  test "x$ac_site_file" = xNONE && continue
3084  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3085    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3086$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3087    sed 's/^/| /' "$ac_site_file" >&5
3088    . "$ac_site_file" \
3089      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3090$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3091as_fn_error $? "failed to load site script $ac_site_file
3092See \`config.log' for more details" "$LINENO" 5; }
3093  fi
3094done
3095
3096if test -r "$cache_file"; then
3097  # Some versions of bash will fail to source /dev/null (special files
3098  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3099  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3100    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3101$as_echo "$as_me: loading cache $cache_file" >&6;}
3102    case $cache_file in
3103      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3104      *)                      . "./$cache_file";;
3105    esac
3106  fi
3107else
3108  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3109$as_echo "$as_me: creating cache $cache_file" >&6;}
3110  >$cache_file
3111fi
3112
3113# Check that the precious variables saved in the cache have kept the same
3114# value.
3115ac_cache_corrupted=false
3116for ac_var in $ac_precious_vars; do
3117  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3118  eval ac_new_set=\$ac_env_${ac_var}_set
3119  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3120  eval ac_new_val=\$ac_env_${ac_var}_value
3121  case $ac_old_set,$ac_new_set in
3122    set,)
3123      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3124$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3125      ac_cache_corrupted=: ;;
3126    ,set)
3127      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3128$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3129      ac_cache_corrupted=: ;;
3130    ,);;
3131    *)
3132      if test "x$ac_old_val" != "x$ac_new_val"; then
3133	# differences in whitespace do not lead to failure.
3134	ac_old_val_w=`echo x $ac_old_val`
3135	ac_new_val_w=`echo x $ac_new_val`
3136	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3137	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3138$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3139	  ac_cache_corrupted=:
3140	else
3141	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3142$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3143	  eval $ac_var=\$ac_old_val
3144	fi
3145	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3146$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3147	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3148$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3149      fi;;
3150  esac
3151  # Pass precious variables to config.status.
3152  if test "$ac_new_set" = set; then
3153    case $ac_new_val in
3154    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3155    *) ac_arg=$ac_var=$ac_new_val ;;
3156    esac
3157    case " $ac_configure_args " in
3158      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3159      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3160    esac
3161  fi
3162done
3163if $ac_cache_corrupted; then
3164  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3165$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3166  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3167$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3168  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3169fi
3170## -------------------- ##
3171## Main body of script. ##
3172## -------------------- ##
3173
3174ac_ext=c
3175ac_cpp='$CPP $CPPFLAGS'
3176ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3177ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3178ac_compiler_gnu=$ac_cv_c_compiler_gnu
3179
3180
3181
3182ac_aux_dir=
3183for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3184  if test -f "$ac_dir/install-sh"; then
3185    ac_aux_dir=$ac_dir
3186    ac_install_sh="$ac_aux_dir/install-sh -c"
3187    break
3188  elif test -f "$ac_dir/install.sh"; then
3189    ac_aux_dir=$ac_dir
3190    ac_install_sh="$ac_aux_dir/install.sh -c"
3191    break
3192  elif test -f "$ac_dir/shtool"; then
3193    ac_aux_dir=$ac_dir
3194    ac_install_sh="$ac_aux_dir/shtool install -c"
3195    break
3196  fi
3197done
3198if test -z "$ac_aux_dir"; then
3199  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
3200fi
3201
3202# These three variables are undocumented and unsupported,
3203# and are intended to be withdrawn in a future Autoconf release.
3204# They can cause serious problems if a builder's source tree is in a directory
3205# whose full name contains unusual characters.
3206ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3207ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3208ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3209
3210
3211# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3212
3213#
3214# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3215# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3216#
3217# This code is free software; you can redistribute it and/or modify it
3218# under the terms of the GNU General Public License version 2 only, as
3219# published by the Free Software Foundation.  Oracle designates this
3220# particular file as subject to the "Classpath" exception as provided
3221# by Oracle in the LICENSE file that accompanied this code.
3222#
3223# This code is distributed in the hope that it will be useful, but WITHOUT
3224# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3225# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3226# version 2 for more details (a copy is included in the LICENSE file that
3227# accompanied this code).
3228#
3229# You should have received a copy of the GNU General Public License version
3230# 2 along with this work; if not, write to the Free Software Foundation,
3231# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3232#
3233# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3234# or visit www.oracle.com if you need additional information or have any
3235# questions.
3236#
3237
3238#
3239# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3240#
3241# This program is free software; you can redistribute it and/or modify
3242# it under the terms of the GNU General Public License as published by
3243# the Free Software Foundation; either version 2 of the License, or
3244# (at your option) any later version.
3245#
3246# This program is distributed in the hope that it will be useful, but
3247# WITHOUT ANY WARRANTY; without even the implied warranty of
3248# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3249# General Public License for more details.
3250#
3251# You should have received a copy of the GNU General Public License
3252# along with this program; if not, write to the Free Software
3253# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3254#
3255# As a special exception to the GNU General Public License, if you
3256# distribute this file as part of a program that contains a
3257# configuration script generated by Autoconf, you may include it under
3258# the same distribution terms that you use for the rest of that program.
3259
3260# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3261# ----------------------------------
3262# PKG_PROG_PKG_CONFIG
3263
3264# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3265#
3266# Check to see whether a particular set of modules exists.  Similar
3267# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3268#
3269#
3270# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3271# this or PKG_CHECK_MODULES is called, or make sure to call
3272# PKG_CHECK_EXISTS manually
3273# --------------------------------------------------------------
3274
3275
3276
3277# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3278# ---------------------------------------------
3279# _PKG_CONFIG
3280
3281# _PKG_SHORT_ERRORS_SUPPORTED
3282# -----------------------------
3283# _PKG_SHORT_ERRORS_SUPPORTED
3284
3285
3286# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3287# [ACTION-IF-NOT-FOUND])
3288#
3289#
3290# Note that if there is a possibility the first call to
3291# PKG_CHECK_MODULES might not happen, you should be sure to include an
3292# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3293#
3294#
3295# --------------------------------------------------------------
3296# PKG_CHECK_MODULES
3297
3298
3299# Include these first...
3300#
3301# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3302# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3303#
3304# This code is free software; you can redistribute it and/or modify it
3305# under the terms of the GNU General Public License version 2 only, as
3306# published by the Free Software Foundation.  Oracle designates this
3307# particular file as subject to the "Classpath" exception as provided
3308# by Oracle in the LICENSE file that accompanied this code.
3309#
3310# This code is distributed in the hope that it will be useful, but WITHOUT
3311# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3312# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3313# version 2 for more details (a copy is included in the LICENSE file that
3314# accompanied this code).
3315#
3316# You should have received a copy of the GNU General Public License version
3317# 2 along with this work; if not, write to the Free Software Foundation,
3318# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3319#
3320# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3321# or visit www.oracle.com if you need additional information or have any
3322# questions.
3323#
3324
3325# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3326# If so, then append $1 to $2 \
3327# Also set JVM_ARG_OK to true/false depending on outcome.
3328
3329
3330# Appends a string to a path variable, only adding the : when needed.
3331
3332
3333# Prepends a string to a path variable, only adding the : when needed.
3334
3335
3336# This will make sure the given variable points to a full and proper
3337# path. This means:
3338# 1) There will be no spaces in the path. On posix platforms,
3339#    spaces in the path will result in an error. On Windows,
3340#    the path will be rewritten using short-style to be space-free.
3341# 2) The path will be absolute, and it will be in unix-style (on
3342#     cygwin).
3343# $1: The name of the variable to fix
3344
3345
3346# This will make sure the given variable points to a executable
3347# with a full and proper path. This means:
3348# 1) There will be no spaces in the path. On posix platforms,
3349#    spaces in the path will result in an error. On Windows,
3350#    the path will be rewritten using short-style to be space-free.
3351# 2) The path will be absolute, and it will be in unix-style (on
3352#     cygwin).
3353# Any arguments given to the executable is preserved.
3354# If the input variable does not have a directory specification, then
3355# it need to be in the PATH.
3356# $1: The name of the variable to fix
3357
3358
3359
3360
3361# Register a --with argument but mark it as deprecated
3362# $1: The name of the with argument to deprecate, not including --with-
3363
3364
3365# Register a --enable argument but mark it as deprecated
3366# $1: The name of the with argument to deprecate, not including --enable-
3367# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3368
3369
3370
3371
3372# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3373# $1: variable to check
3374
3375
3376# Check that there are no unprocessed overridden variables left.
3377# If so, they are an incorrect argument and we will exit with an error.
3378
3379
3380# Setup a tool for the given variable. If correctly specified by the user,
3381# use that value, otherwise search for the tool using the supplied code snippet.
3382# $1: variable to set
3383# $2: code snippet to call to look for the tool
3384
3385
3386# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3387# $1: variable to set
3388# $2: executable name (or list of names) to look for
3389
3390
3391# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3392# $1: variable to set
3393# $2: executable name (or list of names) to look for
3394
3395
3396# Like BASIC_PATH_PROGS but fails if no tool was found.
3397# $1: variable to set
3398# $2: executable name (or list of names) to look for
3399
3400
3401# Like BASIC_SETUP_TOOL but fails if no tool was found.
3402# $1: variable to set
3403# $2: autoconf macro to call to look for the special tool
3404
3405
3406# Setup the most fundamental tools that relies on not much else to set up,
3407# but is used by much of the early bootstrap code.
3408
3409
3410# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420#%%% Simple tools %%%
3421
3422# Check if we have found a usable version of make
3423# $1: the path to a potential make binary (or empty)
3424# $2: the description on how we found this
3425
3426
3427# Goes looking for a usable version of GNU make.
3428
3429
3430
3431
3432
3433
3434# Check if build directory is on local disk. If not possible to determine,
3435# we prefer to claim it's local.
3436# Argument 1: directory to test
3437# Argument 2: what to do if it is on local disk
3438# Argument 3: what to do otherwise (remote disk or failure)
3439
3440
3441# Check that source files have basic read permissions set. This might
3442# not be the case in cygwin in certain conditions.
3443
3444
3445
3446
3447#
3448# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3449# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3450#
3451# This code is free software; you can redistribute it and/or modify it
3452# under the terms of the GNU General Public License version 2 only, as
3453# published by the Free Software Foundation.  Oracle designates this
3454# particular file as subject to the "Classpath" exception as provided
3455# by Oracle in the LICENSE file that accompanied this code.
3456#
3457# This code is distributed in the hope that it will be useful, but WITHOUT
3458# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3459# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3460# version 2 for more details (a copy is included in the LICENSE file that
3461# accompanied this code).
3462#
3463# You should have received a copy of the GNU General Public License version
3464# 2 along with this work; if not, write to the Free Software Foundation,
3465# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3466#
3467# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3468# or visit www.oracle.com if you need additional information or have any
3469# questions.
3470#
3471
3472
3473
3474
3475
3476# Helper function which possibly converts a path using DOS-style short mode.
3477# If so, the updated path is stored in $new_path.
3478# $1: The path to check
3479
3480
3481# Helper function which possibly converts a path using DOS-style short mode.
3482# If so, the updated path is stored in $new_path.
3483# $1: The path to check
3484
3485
3486# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3487# and could probably be heavily simplified. However, all changes in this
3488# area tend to need lot of testing in different scenarios, and in lack of
3489# proper unit testing, cleaning this up has not been deemed worth the effort
3490# at the moment.
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3501
3502
3503
3504
3505#
3506# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3507# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3508#
3509# This code is free software; you can redistribute it and/or modify it
3510# under the terms of the GNU General Public License version 2 only, as
3511# published by the Free Software Foundation.  Oracle designates this
3512# particular file as subject to the "Classpath" exception as provided
3513# by Oracle in the LICENSE file that accompanied this code.
3514#
3515# This code is distributed in the hope that it will be useful, but WITHOUT
3516# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3517# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3518# version 2 for more details (a copy is included in the LICENSE file that
3519# accompanied this code).
3520#
3521# You should have received a copy of the GNU General Public License version
3522# 2 along with this work; if not, write to the Free Software Foundation,
3523# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3524#
3525# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3526# or visit www.oracle.com if you need additional information or have any
3527# questions.
3528#
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540# ... then the rest
3541#
3542# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3543# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3544#
3545# This code is free software; you can redistribute it and/or modify it
3546# under the terms of the GNU General Public License version 2 only, as
3547# published by the Free Software Foundation.  Oracle designates this
3548# particular file as subject to the "Classpath" exception as provided
3549# by Oracle in the LICENSE file that accompanied this code.
3550#
3551# This code is distributed in the hope that it will be useful, but WITHOUT
3552# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3553# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3554# version 2 for more details (a copy is included in the LICENSE file that
3555# accompanied this code).
3556#
3557# You should have received a copy of the GNU General Public License version
3558# 2 along with this work; if not, write to the Free Software Foundation,
3559# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3560#
3561# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3562# or visit www.oracle.com if you need additional information or have any
3563# questions.
3564#
3565
3566########################################################################
3567# This file handles detection of the Boot JDK. The Boot JDK detection
3568# process has been developed as a response to solve a complex real-world
3569# problem. Initially, it was simple, but it has grown as platform after
3570# platform, idiosyncracy after idiosyncracy has been supported.
3571#
3572# The basic idea is this:
3573# 1) You need an acceptable *) JDK to use as a Boot JDK
3574# 2) There are several ways to locate a JDK, that are mostly platform
3575#    dependent **)
3576# 3) You can have multiple JDKs installed
3577# 4) If possible, configure should try to dig out an acceptable JDK
3578#    automatically, without having to resort to command-line options
3579#
3580# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3581#     javac) and not a JRE, etc.
3582#
3583# **) On Windows we typically use a well-known path.
3584#     On MacOSX we typically use the tool java_home.
3585#     On Linux we typically find javac in the $PATH, and then follow a
3586#     chain of symlinks that often ends up in a real JDK.
3587#
3588# This leads to the code where we check in different ways to locate a
3589# JDK, and if one is found, check if it is acceptable. If not, we print
3590# our reasons for rejecting it (useful when debugging non-working
3591# configure situations) and continue checking the next one.
3592########################################################################
3593
3594# Execute the check given as argument, and verify the result
3595# If the Boot JDK was previously found, do nothing
3596# $1 A command line (typically autoconf macro) to execute
3597
3598
3599# Test: Is bootjdk explicitely set by command line arguments?
3600
3601
3602# Test: Is bootjdk available from builddeps?
3603
3604
3605# Test: Is $JAVA_HOME set?
3606
3607
3608# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3609
3610
3611# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3612# $1: Argument to the java_home binary (optional)
3613
3614
3615# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3616
3617
3618# Look for a jdk in the given path. If there are multiple, try to select the newest.
3619# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3620# $1 = Path to directory containing jdk installations.
3621# $2 = String to append to the found JDK directory to get the proper JDK home
3622
3623
3624# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3625# environmental variable as base for where to look.
3626# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3627
3628
3629# Test: Is there a JDK installed in default, well-known locations?
3630
3631
3632# Check that a command-line tool in the Boot JDK is correct
3633# $1 = name of variable to assign
3634# $2 = name of binary
3635
3636
3637###############################################################################
3638#
3639# We need a Boot JDK to bootstrap the build.
3640#
3641
3642
3643
3644
3645
3646#
3647# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3648# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3649#
3650# This code is free software; you can redistribute it and/or modify it
3651# under the terms of the GNU General Public License version 2 only, as
3652# published by the Free Software Foundation.  Oracle designates this
3653# particular file as subject to the "Classpath" exception as provided
3654# by Oracle in the LICENSE file that accompanied this code.
3655#
3656# This code is distributed in the hope that it will be useful, but WITHOUT
3657# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3658# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3659# version 2 for more details (a copy is included in the LICENSE file that
3660# accompanied this code).
3661#
3662# You should have received a copy of the GNU General Public License version
3663# 2 along with this work; if not, write to the Free Software Foundation,
3664# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3665#
3666# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3667# or visit www.oracle.com if you need additional information or have any
3668# questions.
3669#
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690#
3691# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3692# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3693#
3694# This code is free software; you can redistribute it and/or modify it
3695# under the terms of the GNU General Public License version 2 only, as
3696# published by the Free Software Foundation.  Oracle designates this
3697# particular file as subject to the "Classpath" exception as provided
3698# by Oracle in the LICENSE file that accompanied this code.
3699#
3700# This code is distributed in the hope that it will be useful, but WITHOUT
3701# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3702# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3703# version 2 for more details (a copy is included in the LICENSE file that
3704# accompanied this code).
3705#
3706# You should have received a copy of the GNU General Public License version
3707# 2 along with this work; if not, write to the Free Software Foundation,
3708# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3709#
3710# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3711# or visit www.oracle.com if you need additional information or have any
3712# questions.
3713#
3714
3715
3716
3717
3718
3719# Documentation on common flags used for solstudio in HIGHEST.
3720#
3721# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3722#          done with care, there are some assumptions below that need to
3723#          be understood about the use of pointers, and IEEE behavior.
3724#
3725# -fns: Use non-standard floating point mode (not IEEE 754)
3726# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3727# -fsingle: Use single precision floating point with 'float'
3728# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3729#   (Source with excessing pointer casting and data access with mixed
3730#    pointer types are not recommended)
3731# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3732#   (If you expect perfect errno behavior, do not use this)
3733# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3734# -xrestrict: Pointer parameters to functions do not overlap
3735#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3736#    If you pass in multiple pointers to the same data, do not use this)
3737# -xlibmil: Inline some library routines
3738#   (If you expect perfect errno behavior, do not use this)
3739# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3740#   (If you expect perfect errno behavior, do not use this)
3741#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3742
3743    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3744    # Bug?
3745    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3746    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3747    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3748    #fi
3749
3750
3751
3752
3753
3754
3755# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3756#                                   [RUN-IF-FALSE])
3757# ------------------------------------------------------------
3758# Check that the c and c++ compilers support an argument
3759
3760
3761
3762
3763#
3764# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3765# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3766#
3767# This code is free software; you can redistribute it and/or modify it
3768# under the terms of the GNU General Public License version 2 only, as
3769# published by the Free Software Foundation.  Oracle designates this
3770# particular file as subject to the "Classpath" exception as provided
3771# by Oracle in the LICENSE file that accompanied this code.
3772#
3773# This code is distributed in the hope that it will be useful, but WITHOUT
3774# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3775# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3776# version 2 for more details (a copy is included in the LICENSE file that
3777# accompanied this code).
3778#
3779# You should have received a copy of the GNU General Public License version
3780# 2 along with this work; if not, write to the Free Software Foundation,
3781# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3782#
3783# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3784# or visit www.oracle.com if you need additional information or have any
3785# questions.
3786#
3787
3788
3789
3790
3791
3792cygwin_help() {
3793  case $1 in
3794    unzip)
3795      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3796      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3797      ;;
3798    zip)
3799      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3800      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3801      ;;
3802    make)
3803      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3804      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3805      ;;
3806    freetype)
3807      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3808        HELP_MSG="To install freetype, run:
3809wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3810chmod +x /tmp/freetype-setup.exe
3811/tmp/freetype-setup.exe
3812Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3813After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3814      else
3815        HELP_MSG="You need to build a 64-bit version of freetype.
3816This is not readily available.
3817You can find source code and build instructions on
3818http://www.freetype.org/
3819If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3820      fi
3821      ;;
3822  esac
3823}
3824
3825msys_help() {
3826  PKGHANDLER_COMMAND=""
3827}
3828
3829apt_help() {
3830  case $1 in
3831    devkit)
3832      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3833    openjdk)
3834      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3835    alsa)
3836      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3837    cups)
3838      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3839    freetype)
3840      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3841    pulse)
3842      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3843    x11)
3844      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3845    ccache)
3846      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3847  esac
3848}
3849
3850yum_help() {
3851  case $1 in
3852    devkit)
3853      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3854    openjdk)
3855      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3856    alsa)
3857      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3858    cups)
3859      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3860    freetype)
3861      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3862    pulse)
3863      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3864    x11)
3865      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3866    ccache)
3867      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3868  esac
3869}
3870
3871port_help() {
3872  PKGHANDLER_COMMAND=""
3873}
3874
3875pkgutil_help() {
3876  PKGHANDLER_COMMAND=""
3877}
3878
3879pkgadd_help() {
3880  PKGHANDLER_COMMAND=""
3881}
3882
3883# This function will check if we're called from the "configure" wrapper while
3884# printing --help. If so, we will print out additional information that can
3885# only be extracted within the autoconf script, and then exit. This must be
3886# called at the very beginning in configure.ac.
3887
3888
3889
3890
3891#
3892# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3893# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3894#
3895# This code is free software; you can redistribute it and/or modify it
3896# under the terms of the GNU General Public License version 2 only, as
3897# published by the Free Software Foundation.  Oracle designates this
3898# particular file as subject to the "Classpath" exception as provided
3899# by Oracle in the LICENSE file that accompanied this code.
3900#
3901# This code is distributed in the hope that it will be useful, but WITHOUT
3902# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3903# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3904# version 2 for more details (a copy is included in the LICENSE file that
3905# accompanied this code).
3906#
3907# You should have received a copy of the GNU General Public License version
3908# 2 along with this work; if not, write to the Free Software Foundation,
3909# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3910#
3911# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3912# or visit www.oracle.com if you need additional information or have any
3913# questions.
3914#
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925###############################################################################
3926#
3927# Should we build only OpenJDK even if closed sources are present?
3928#
3929
3930
3931
3932
3933###############################################################################
3934#
3935# Setup version numbers
3936#
3937
3938
3939
3940
3941
3942
3943#
3944# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3945# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3946#
3947# This code is free software; you can redistribute it and/or modify it
3948# under the terms of the GNU General Public License version 2 only, as
3949# published by the Free Software Foundation.  Oracle designates this
3950# particular file as subject to the "Classpath" exception as provided
3951# by Oracle in the LICENSE file that accompanied this code.
3952#
3953# This code is distributed in the hope that it will be useful, but WITHOUT
3954# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3955# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3956# version 2 for more details (a copy is included in the LICENSE file that
3957# accompanied this code).
3958#
3959# You should have received a copy of the GNU General Public License version
3960# 2 along with this work; if not, write to the Free Software Foundation,
3961# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3962#
3963# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3964# or visit www.oracle.com if you need additional information or have any
3965# questions.
3966#
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986#
3987# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3988# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3989#
3990# This code is free software; you can redistribute it and/or modify it
3991# under the terms of the GNU General Public License version 2 only, as
3992# published by the Free Software Foundation.  Oracle designates this
3993# particular file as subject to the "Classpath" exception as provided
3994# by Oracle in the LICENSE file that accompanied this code.
3995#
3996# This code is distributed in the hope that it will be useful, but WITHOUT
3997# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3998# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3999# version 2 for more details (a copy is included in the LICENSE file that
4000# accompanied this code).
4001#
4002# You should have received a copy of the GNU General Public License version
4003# 2 along with this work; if not, write to the Free Software Foundation,
4004# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4005#
4006# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4007# or visit www.oracle.com if you need additional information or have any
4008# questions.
4009#
4010
4011# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4012# Converts autoconf style CPU name to OpenJDK style, into
4013# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4014
4015
4016# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4017# Converts autoconf style OS name to OpenJDK style, into
4018# VAR_OS and VAR_OS_API.
4019
4020
4021# Expects $host_os $host_cpu $build_os and $build_cpu
4022# and $with_target_bits to have been setup!
4023#
4024# Translate the standard triplet(quadruplet) definition
4025# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4026# OPENJDK_BUILD_OS, etc.
4027
4028
4029# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4030# accordingly. Must be done after setting up build and target system, but before
4031# doing anything else with these values.
4032
4033
4034# Setup the legacy variables, for controlling the old makefiles.
4035#
4036
4037
4038
4039
4040#%%% Build and target systems %%%
4041
4042
4043
4044
4045# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4046# Add -mX to various FLAGS variables.
4047
4048
4049
4050
4051
4052
4053#
4054# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4055# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4056#
4057# This code is free software; you can redistribute it and/or modify it
4058# under the terms of the GNU General Public License version 2 only, as
4059# published by the Free Software Foundation.  Oracle designates this
4060# particular file as subject to the "Classpath" exception as provided
4061# by Oracle in the LICENSE file that accompanied this code.
4062#
4063# This code is distributed in the hope that it will be useful, but WITHOUT
4064# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4065# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4066# version 2 for more details (a copy is included in the LICENSE file that
4067# accompanied this code).
4068#
4069# You should have received a copy of the GNU General Public License version
4070# 2 along with this work; if not, write to the Free Software Foundation,
4071# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4072#
4073# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4074# or visit www.oracle.com if you need additional information or have any
4075# questions.
4076#
4077
4078
4079
4080
4081
4082
4083
4084
4085#
4086# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4087# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4088#
4089# This code is free software; you can redistribute it and/or modify it
4090# under the terms of the GNU General Public License version 2 only, as
4091# published by the Free Software Foundation.  Oracle designates this
4092# particular file as subject to the "Classpath" exception as provided
4093# by Oracle in the LICENSE file that accompanied this code.
4094#
4095# This code is distributed in the hope that it will be useful, but WITHOUT
4096# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4097# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4098# version 2 for more details (a copy is included in the LICENSE file that
4099# accompanied this code).
4100#
4101# You should have received a copy of the GNU General Public License version
4102# 2 along with this work; if not, write to the Free Software Foundation,
4103# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4104#
4105# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4106# or visit www.oracle.com if you need additional information or have any
4107# questions.
4108#
4109
4110########################################################################
4111# This file is responsible for detecting, verifying and setting up the
4112# toolchain, i.e. the compiler, linker and related utilities. It will setup
4113# proper paths to the binaries, but it will not setup any flags.
4114#
4115# The binaries used is determined by the toolchain type, which is the family of
4116# compilers and related tools that are used.
4117########################################################################
4118
4119
4120# All valid toolchains, regardless of platform (used by help.m4)
4121VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4122
4123# These toolchains are valid on different platforms
4124VALID_TOOLCHAINS_linux="gcc clang"
4125VALID_TOOLCHAINS_solaris="solstudio"
4126VALID_TOOLCHAINS_macosx="gcc clang"
4127VALID_TOOLCHAINS_aix="xlc"
4128VALID_TOOLCHAINS_windows="microsoft"
4129
4130# Toolchain descriptions
4131TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4132TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4133TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4134TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4135TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4136
4137# Setup a number of variables describing how native output files are
4138# named on this platform/toolchain.
4139
4140
4141# Determine which toolchain type to use, and make sure it is valid for this
4142# platform. Setup various information about the selected toolchain.
4143
4144
4145# Before we start detecting the toolchain executables, we might need some
4146# special setup, e.g. additional paths etc.
4147
4148
4149# Restore path, etc
4150
4151
4152# Check if a compiler is of the toolchain type we expect, and save the version
4153# information from it. If the compiler does not match the expected type,
4154# this function will abort using AC_MSG_ERROR. If it matches, the version will
4155# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4156# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4157#
4158# $1 = compiler to test (CC or CXX)
4159# $2 = human readable name of compiler (C or C++)
4160
4161
4162# Try to locate the given C or C++ compiler in the path, or otherwise.
4163#
4164# $1 = compiler to test (CC or CXX)
4165# $2 = human readable name of compiler (C or C++)
4166# $3 = list of compiler names to search for
4167
4168
4169# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4170# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4171# archiver (AR). Verify that the compilers are correct according to the
4172# toolchain type.
4173
4174
4175# Setup additional tools that is considered a part of the toolchain, but not the
4176# core part. Many of these are highly platform-specific and do not exist,
4177# and/or are not needed on all platforms.
4178
4179
4180# Setup the build tools (i.e, the compiler and linker used to build programs
4181# that should be run on the build platform, not the target platform, as a build
4182# helper). Since the non-cross-compile case uses the normal, target compilers
4183# for this, we can only do this after these have been setup.
4184
4185
4186# Setup legacy variables that are still needed as alternative ways to refer to
4187# parts of the toolchain.
4188
4189
4190# Do some additional checks on the detected tools.
4191
4192
4193# Setup the JTReg Regression Test Harness.
4194
4195
4196#
4197# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4198# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4199#
4200# This code is free software; you can redistribute it and/or modify it
4201# under the terms of the GNU General Public License version 2 only, as
4202# published by the Free Software Foundation.  Oracle designates this
4203# particular file as subject to the "Classpath" exception as provided
4204# by Oracle in the LICENSE file that accompanied this code.
4205#
4206# This code is distributed in the hope that it will be useful, but WITHOUT
4207# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4208# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4209# version 2 for more details (a copy is included in the LICENSE file that
4210# accompanied this code).
4211#
4212# You should have received a copy of the GNU General Public License version
4213# 2 along with this work; if not, write to the Free Software Foundation,
4214# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4215#
4216# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4217# or visit www.oracle.com if you need additional information or have any
4218# questions.
4219#
4220
4221
4222
4223
4224
4225
4226
4227# Check if the VS env variables were setup prior to running configure.
4228# If not, then find vcvarsall.bat and run it automatically, and integrate
4229# the set env variables into the spec file.
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240# This line needs to be here, verbatim, after all includes and the dummy hook
4241# definitions. It is replaced with custom functionality when building
4242# custom sources.
4243#CUSTOM_AUTOCONF_INCLUDE
4244
4245# Do not change or remove the following line, it is needed for consistency checks:
4246DATE_WHEN_GENERATED=1395839362
4247
4248###############################################################################
4249#
4250# Initialization / Boot-strapping
4251#
4252# The bootstrapping process needs to solve the "chicken or the egg" problem,
4253# thus it jumps back and forth, each time gaining something needed later on.
4254#
4255###############################################################################
4256
4257# If we are requested to print additional help, do that and then exit.
4258# This must be the very first call.
4259
4260  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4261    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4262    $PRINTF "Which are valid to use depends on the build platform.\n"
4263    for toolchain in $VALID_TOOLCHAINS_all; do
4264      # Use indirect variable referencing
4265      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4266      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4267      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4268    done
4269
4270    # And now exit directly
4271    exit 0
4272  fi
4273
4274
4275# Basic initialization that must happen first of all in the normal process.
4276
4277  # Save the original command line. This is passed to us by the wrapper configure script.
4278
4279  DATE_WHEN_CONFIGURED=`LANG=C date`
4280
4281  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4282$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4283  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4284$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4285
4286
4287  # Start with tools that do not need have cross compilation support
4288  # and can be expected to be found in the default PATH. These tools are
4289  # used by configure. Nor are these tools expected to be found in the
4290  # devkit from the builddeps server either, since they are
4291  # needed to download the devkit.
4292
4293  # First are all the simple required tools.
4294
4295
4296
4297  # Publish this variable in the help.
4298
4299
4300  if test "x$BASENAME" = x; then
4301    # The variable is not set by user, try to locate tool using the code snippet
4302    for ac_prog in basename
4303do
4304  # Extract the first word of "$ac_prog", so it can be a program name with args.
4305set dummy $ac_prog; ac_word=$2
4306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4307$as_echo_n "checking for $ac_word... " >&6; }
4308if ${ac_cv_path_BASENAME+:} false; then :
4309  $as_echo_n "(cached) " >&6
4310else
4311  case $BASENAME in
4312  [\\/]* | ?:[\\/]*)
4313  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4314  ;;
4315  *)
4316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4317for as_dir in $PATH
4318do
4319  IFS=$as_save_IFS
4320  test -z "$as_dir" && as_dir=.
4321    for ac_exec_ext in '' $ac_executable_extensions; do
4322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4323    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4325    break 2
4326  fi
4327done
4328  done
4329IFS=$as_save_IFS
4330
4331  ;;
4332esac
4333fi
4334BASENAME=$ac_cv_path_BASENAME
4335if test -n "$BASENAME"; then
4336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4337$as_echo "$BASENAME" >&6; }
4338else
4339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4340$as_echo "no" >&6; }
4341fi
4342
4343
4344  test -n "$BASENAME" && break
4345done
4346
4347  else
4348    # The variable is set, but is it from the command line or the environment?
4349
4350    # Try to remove the string !BASENAME! from our list.
4351    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4352    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4353      # If it failed, the variable was not from the command line. Ignore it,
4354      # but warn the user (except for BASH, which is always set by the calling BASH).
4355      if test "xBASENAME" != xBASH; then
4356        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4357$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4358      fi
4359      # Try to locate tool using the code snippet
4360      for ac_prog in basename
4361do
4362  # Extract the first word of "$ac_prog", so it can be a program name with args.
4363set dummy $ac_prog; ac_word=$2
4364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4365$as_echo_n "checking for $ac_word... " >&6; }
4366if ${ac_cv_path_BASENAME+:} false; then :
4367  $as_echo_n "(cached) " >&6
4368else
4369  case $BASENAME in
4370  [\\/]* | ?:[\\/]*)
4371  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4372  ;;
4373  *)
4374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4375for as_dir in $PATH
4376do
4377  IFS=$as_save_IFS
4378  test -z "$as_dir" && as_dir=.
4379    for ac_exec_ext in '' $ac_executable_extensions; do
4380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4381    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4383    break 2
4384  fi
4385done
4386  done
4387IFS=$as_save_IFS
4388
4389  ;;
4390esac
4391fi
4392BASENAME=$ac_cv_path_BASENAME
4393if test -n "$BASENAME"; then
4394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4395$as_echo "$BASENAME" >&6; }
4396else
4397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4398$as_echo "no" >&6; }
4399fi
4400
4401
4402  test -n "$BASENAME" && break
4403done
4404
4405    else
4406      # If it succeeded, then it was overridden by the user. We will use it
4407      # for the tool.
4408
4409      # First remove it from the list of overridden variables, so we can test
4410      # for unknown variables in the end.
4411      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4412
4413      # Check if the provided tool contains a complete path.
4414      tool_specified="$BASENAME"
4415      tool_basename="${tool_specified##*/}"
4416      if test "x$tool_basename" = "x$tool_specified"; then
4417        # A command without a complete path is provided, search $PATH.
4418        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4419$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4420        # Extract the first word of "$tool_basename", so it can be a program name with args.
4421set dummy $tool_basename; ac_word=$2
4422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4423$as_echo_n "checking for $ac_word... " >&6; }
4424if ${ac_cv_path_BASENAME+:} false; then :
4425  $as_echo_n "(cached) " >&6
4426else
4427  case $BASENAME in
4428  [\\/]* | ?:[\\/]*)
4429  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4430  ;;
4431  *)
4432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4433for as_dir in $PATH
4434do
4435  IFS=$as_save_IFS
4436  test -z "$as_dir" && as_dir=.
4437    for ac_exec_ext in '' $ac_executable_extensions; do
4438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4439    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4441    break 2
4442  fi
4443done
4444  done
4445IFS=$as_save_IFS
4446
4447  ;;
4448esac
4449fi
4450BASENAME=$ac_cv_path_BASENAME
4451if test -n "$BASENAME"; then
4452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4453$as_echo "$BASENAME" >&6; }
4454else
4455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4456$as_echo "no" >&6; }
4457fi
4458
4459
4460        if test "x$BASENAME" = x; then
4461          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4462        fi
4463      else
4464        # Otherwise we believe it is a complete path. Use it as it is.
4465        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4466$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4467        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4468$as_echo_n "checking for BASENAME... " >&6; }
4469        if test ! -x "$tool_specified"; then
4470          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4471$as_echo "not found" >&6; }
4472          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4473        fi
4474        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4475$as_echo "$tool_specified" >&6; }
4476      fi
4477    fi
4478  fi
4479
4480
4481
4482  if test "x$BASENAME" = x; then
4483    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4484  fi
4485
4486
4487
4488
4489
4490  # Publish this variable in the help.
4491
4492
4493  if test "x$BASH" = x; then
4494    # The variable is not set by user, try to locate tool using the code snippet
4495    for ac_prog in bash
4496do
4497  # Extract the first word of "$ac_prog", so it can be a program name with args.
4498set dummy $ac_prog; ac_word=$2
4499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4500$as_echo_n "checking for $ac_word... " >&6; }
4501if ${ac_cv_path_BASH+:} false; then :
4502  $as_echo_n "(cached) " >&6
4503else
4504  case $BASH in
4505  [\\/]* | ?:[\\/]*)
4506  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4507  ;;
4508  *)
4509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4510for as_dir in $PATH
4511do
4512  IFS=$as_save_IFS
4513  test -z "$as_dir" && as_dir=.
4514    for ac_exec_ext in '' $ac_executable_extensions; do
4515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4516    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4518    break 2
4519  fi
4520done
4521  done
4522IFS=$as_save_IFS
4523
4524  ;;
4525esac
4526fi
4527BASH=$ac_cv_path_BASH
4528if test -n "$BASH"; then
4529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4530$as_echo "$BASH" >&6; }
4531else
4532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4533$as_echo "no" >&6; }
4534fi
4535
4536
4537  test -n "$BASH" && break
4538done
4539
4540  else
4541    # The variable is set, but is it from the command line or the environment?
4542
4543    # Try to remove the string !BASH! from our list.
4544    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4545    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4546      # If it failed, the variable was not from the command line. Ignore it,
4547      # but warn the user (except for BASH, which is always set by the calling BASH).
4548      if test "xBASH" != xBASH; then
4549        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4550$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4551      fi
4552      # Try to locate tool using the code snippet
4553      for ac_prog in bash
4554do
4555  # Extract the first word of "$ac_prog", so it can be a program name with args.
4556set dummy $ac_prog; ac_word=$2
4557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4558$as_echo_n "checking for $ac_word... " >&6; }
4559if ${ac_cv_path_BASH+:} false; then :
4560  $as_echo_n "(cached) " >&6
4561else
4562  case $BASH in
4563  [\\/]* | ?:[\\/]*)
4564  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4565  ;;
4566  *)
4567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4568for as_dir in $PATH
4569do
4570  IFS=$as_save_IFS
4571  test -z "$as_dir" && as_dir=.
4572    for ac_exec_ext in '' $ac_executable_extensions; do
4573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4574    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4576    break 2
4577  fi
4578done
4579  done
4580IFS=$as_save_IFS
4581
4582  ;;
4583esac
4584fi
4585BASH=$ac_cv_path_BASH
4586if test -n "$BASH"; then
4587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4588$as_echo "$BASH" >&6; }
4589else
4590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4591$as_echo "no" >&6; }
4592fi
4593
4594
4595  test -n "$BASH" && break
4596done
4597
4598    else
4599      # If it succeeded, then it was overridden by the user. We will use it
4600      # for the tool.
4601
4602      # First remove it from the list of overridden variables, so we can test
4603      # for unknown variables in the end.
4604      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4605
4606      # Check if the provided tool contains a complete path.
4607      tool_specified="$BASH"
4608      tool_basename="${tool_specified##*/}"
4609      if test "x$tool_basename" = "x$tool_specified"; then
4610        # A command without a complete path is provided, search $PATH.
4611        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4612$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4613        # Extract the first word of "$tool_basename", so it can be a program name with args.
4614set dummy $tool_basename; ac_word=$2
4615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4616$as_echo_n "checking for $ac_word... " >&6; }
4617if ${ac_cv_path_BASH+:} false; then :
4618  $as_echo_n "(cached) " >&6
4619else
4620  case $BASH in
4621  [\\/]* | ?:[\\/]*)
4622  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4623  ;;
4624  *)
4625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4626for as_dir in $PATH
4627do
4628  IFS=$as_save_IFS
4629  test -z "$as_dir" && as_dir=.
4630    for ac_exec_ext in '' $ac_executable_extensions; do
4631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4632    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4634    break 2
4635  fi
4636done
4637  done
4638IFS=$as_save_IFS
4639
4640  ;;
4641esac
4642fi
4643BASH=$ac_cv_path_BASH
4644if test -n "$BASH"; then
4645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4646$as_echo "$BASH" >&6; }
4647else
4648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4649$as_echo "no" >&6; }
4650fi
4651
4652
4653        if test "x$BASH" = x; then
4654          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4655        fi
4656      else
4657        # Otherwise we believe it is a complete path. Use it as it is.
4658        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4659$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4660        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4661$as_echo_n "checking for BASH... " >&6; }
4662        if test ! -x "$tool_specified"; then
4663          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4664$as_echo "not found" >&6; }
4665          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4666        fi
4667        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4668$as_echo "$tool_specified" >&6; }
4669      fi
4670    fi
4671  fi
4672
4673
4674
4675  if test "x$BASH" = x; then
4676    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4677  fi
4678
4679
4680
4681
4682
4683  # Publish this variable in the help.
4684
4685
4686  if test "x$CAT" = x; then
4687    # The variable is not set by user, try to locate tool using the code snippet
4688    for ac_prog in cat
4689do
4690  # Extract the first word of "$ac_prog", so it can be a program name with args.
4691set dummy $ac_prog; ac_word=$2
4692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4693$as_echo_n "checking for $ac_word... " >&6; }
4694if ${ac_cv_path_CAT+:} false; then :
4695  $as_echo_n "(cached) " >&6
4696else
4697  case $CAT in
4698  [\\/]* | ?:[\\/]*)
4699  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4700  ;;
4701  *)
4702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4703for as_dir in $PATH
4704do
4705  IFS=$as_save_IFS
4706  test -z "$as_dir" && as_dir=.
4707    for ac_exec_ext in '' $ac_executable_extensions; do
4708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4709    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4711    break 2
4712  fi
4713done
4714  done
4715IFS=$as_save_IFS
4716
4717  ;;
4718esac
4719fi
4720CAT=$ac_cv_path_CAT
4721if test -n "$CAT"; then
4722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4723$as_echo "$CAT" >&6; }
4724else
4725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4726$as_echo "no" >&6; }
4727fi
4728
4729
4730  test -n "$CAT" && break
4731done
4732
4733  else
4734    # The variable is set, but is it from the command line or the environment?
4735
4736    # Try to remove the string !CAT! from our list.
4737    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4738    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4739      # If it failed, the variable was not from the command line. Ignore it,
4740      # but warn the user (except for BASH, which is always set by the calling BASH).
4741      if test "xCAT" != xBASH; then
4742        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4743$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4744      fi
4745      # Try to locate tool using the code snippet
4746      for ac_prog in cat
4747do
4748  # Extract the first word of "$ac_prog", so it can be a program name with args.
4749set dummy $ac_prog; ac_word=$2
4750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4751$as_echo_n "checking for $ac_word... " >&6; }
4752if ${ac_cv_path_CAT+:} false; then :
4753  $as_echo_n "(cached) " >&6
4754else
4755  case $CAT in
4756  [\\/]* | ?:[\\/]*)
4757  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4758  ;;
4759  *)
4760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4761for as_dir in $PATH
4762do
4763  IFS=$as_save_IFS
4764  test -z "$as_dir" && as_dir=.
4765    for ac_exec_ext in '' $ac_executable_extensions; do
4766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4767    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4769    break 2
4770  fi
4771done
4772  done
4773IFS=$as_save_IFS
4774
4775  ;;
4776esac
4777fi
4778CAT=$ac_cv_path_CAT
4779if test -n "$CAT"; then
4780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4781$as_echo "$CAT" >&6; }
4782else
4783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4784$as_echo "no" >&6; }
4785fi
4786
4787
4788  test -n "$CAT" && break
4789done
4790
4791    else
4792      # If it succeeded, then it was overridden by the user. We will use it
4793      # for the tool.
4794
4795      # First remove it from the list of overridden variables, so we can test
4796      # for unknown variables in the end.
4797      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4798
4799      # Check if the provided tool contains a complete path.
4800      tool_specified="$CAT"
4801      tool_basename="${tool_specified##*/}"
4802      if test "x$tool_basename" = "x$tool_specified"; then
4803        # A command without a complete path is provided, search $PATH.
4804        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4805$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4806        # Extract the first word of "$tool_basename", so it can be a program name with args.
4807set dummy $tool_basename; ac_word=$2
4808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4809$as_echo_n "checking for $ac_word... " >&6; }
4810if ${ac_cv_path_CAT+:} false; then :
4811  $as_echo_n "(cached) " >&6
4812else
4813  case $CAT in
4814  [\\/]* | ?:[\\/]*)
4815  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4816  ;;
4817  *)
4818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4819for as_dir in $PATH
4820do
4821  IFS=$as_save_IFS
4822  test -z "$as_dir" && as_dir=.
4823    for ac_exec_ext in '' $ac_executable_extensions; do
4824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4825    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4827    break 2
4828  fi
4829done
4830  done
4831IFS=$as_save_IFS
4832
4833  ;;
4834esac
4835fi
4836CAT=$ac_cv_path_CAT
4837if test -n "$CAT"; then
4838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4839$as_echo "$CAT" >&6; }
4840else
4841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4842$as_echo "no" >&6; }
4843fi
4844
4845
4846        if test "x$CAT" = x; then
4847          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4848        fi
4849      else
4850        # Otherwise we believe it is a complete path. Use it as it is.
4851        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4852$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4853        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4854$as_echo_n "checking for CAT... " >&6; }
4855        if test ! -x "$tool_specified"; then
4856          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4857$as_echo "not found" >&6; }
4858          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4859        fi
4860        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4861$as_echo "$tool_specified" >&6; }
4862      fi
4863    fi
4864  fi
4865
4866
4867
4868  if test "x$CAT" = x; then
4869    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4870  fi
4871
4872
4873
4874
4875
4876  # Publish this variable in the help.
4877
4878
4879  if test "x$CHMOD" = x; then
4880    # The variable is not set by user, try to locate tool using the code snippet
4881    for ac_prog in chmod
4882do
4883  # Extract the first word of "$ac_prog", so it can be a program name with args.
4884set dummy $ac_prog; ac_word=$2
4885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4886$as_echo_n "checking for $ac_word... " >&6; }
4887if ${ac_cv_path_CHMOD+:} false; then :
4888  $as_echo_n "(cached) " >&6
4889else
4890  case $CHMOD in
4891  [\\/]* | ?:[\\/]*)
4892  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4893  ;;
4894  *)
4895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4896for as_dir in $PATH
4897do
4898  IFS=$as_save_IFS
4899  test -z "$as_dir" && as_dir=.
4900    for ac_exec_ext in '' $ac_executable_extensions; do
4901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4902    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4904    break 2
4905  fi
4906done
4907  done
4908IFS=$as_save_IFS
4909
4910  ;;
4911esac
4912fi
4913CHMOD=$ac_cv_path_CHMOD
4914if test -n "$CHMOD"; then
4915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4916$as_echo "$CHMOD" >&6; }
4917else
4918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4919$as_echo "no" >&6; }
4920fi
4921
4922
4923  test -n "$CHMOD" && break
4924done
4925
4926  else
4927    # The variable is set, but is it from the command line or the environment?
4928
4929    # Try to remove the string !CHMOD! from our list.
4930    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
4931    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4932      # If it failed, the variable was not from the command line. Ignore it,
4933      # but warn the user (except for BASH, which is always set by the calling BASH).
4934      if test "xCHMOD" != xBASH; then
4935        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
4936$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
4937      fi
4938      # Try to locate tool using the code snippet
4939      for ac_prog in chmod
4940do
4941  # Extract the first word of "$ac_prog", so it can be a program name with args.
4942set dummy $ac_prog; ac_word=$2
4943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4944$as_echo_n "checking for $ac_word... " >&6; }
4945if ${ac_cv_path_CHMOD+:} false; then :
4946  $as_echo_n "(cached) " >&6
4947else
4948  case $CHMOD in
4949  [\\/]* | ?:[\\/]*)
4950  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4951  ;;
4952  *)
4953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4954for as_dir in $PATH
4955do
4956  IFS=$as_save_IFS
4957  test -z "$as_dir" && as_dir=.
4958    for ac_exec_ext in '' $ac_executable_extensions; do
4959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4960    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4962    break 2
4963  fi
4964done
4965  done
4966IFS=$as_save_IFS
4967
4968  ;;
4969esac
4970fi
4971CHMOD=$ac_cv_path_CHMOD
4972if test -n "$CHMOD"; then
4973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4974$as_echo "$CHMOD" >&6; }
4975else
4976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4977$as_echo "no" >&6; }
4978fi
4979
4980
4981  test -n "$CHMOD" && break
4982done
4983
4984    else
4985      # If it succeeded, then it was overridden by the user. We will use it
4986      # for the tool.
4987
4988      # First remove it from the list of overridden variables, so we can test
4989      # for unknown variables in the end.
4990      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4991
4992      # Check if the provided tool contains a complete path.
4993      tool_specified="$CHMOD"
4994      tool_basename="${tool_specified##*/}"
4995      if test "x$tool_basename" = "x$tool_specified"; then
4996        # A command without a complete path is provided, search $PATH.
4997        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
4998$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
4999        # Extract the first word of "$tool_basename", so it can be a program name with args.
5000set dummy $tool_basename; ac_word=$2
5001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5002$as_echo_n "checking for $ac_word... " >&6; }
5003if ${ac_cv_path_CHMOD+:} false; then :
5004  $as_echo_n "(cached) " >&6
5005else
5006  case $CHMOD in
5007  [\\/]* | ?:[\\/]*)
5008  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5009  ;;
5010  *)
5011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5012for as_dir in $PATH
5013do
5014  IFS=$as_save_IFS
5015  test -z "$as_dir" && as_dir=.
5016    for ac_exec_ext in '' $ac_executable_extensions; do
5017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5018    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5020    break 2
5021  fi
5022done
5023  done
5024IFS=$as_save_IFS
5025
5026  ;;
5027esac
5028fi
5029CHMOD=$ac_cv_path_CHMOD
5030if test -n "$CHMOD"; then
5031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5032$as_echo "$CHMOD" >&6; }
5033else
5034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035$as_echo "no" >&6; }
5036fi
5037
5038
5039        if test "x$CHMOD" = x; then
5040          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5041        fi
5042      else
5043        # Otherwise we believe it is a complete path. Use it as it is.
5044        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5045$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5046        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5047$as_echo_n "checking for CHMOD... " >&6; }
5048        if test ! -x "$tool_specified"; then
5049          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5050$as_echo "not found" >&6; }
5051          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5052        fi
5053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5054$as_echo "$tool_specified" >&6; }
5055      fi
5056    fi
5057  fi
5058
5059
5060
5061  if test "x$CHMOD" = x; then
5062    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5063  fi
5064
5065
5066
5067
5068
5069  # Publish this variable in the help.
5070
5071
5072  if test "x$CMP" = x; then
5073    # The variable is not set by user, try to locate tool using the code snippet
5074    for ac_prog in cmp
5075do
5076  # Extract the first word of "$ac_prog", so it can be a program name with args.
5077set dummy $ac_prog; ac_word=$2
5078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5079$as_echo_n "checking for $ac_word... " >&6; }
5080if ${ac_cv_path_CMP+:} false; then :
5081  $as_echo_n "(cached) " >&6
5082else
5083  case $CMP in
5084  [\\/]* | ?:[\\/]*)
5085  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5086  ;;
5087  *)
5088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5089for as_dir in $PATH
5090do
5091  IFS=$as_save_IFS
5092  test -z "$as_dir" && as_dir=.
5093    for ac_exec_ext in '' $ac_executable_extensions; do
5094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5095    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5097    break 2
5098  fi
5099done
5100  done
5101IFS=$as_save_IFS
5102
5103  ;;
5104esac
5105fi
5106CMP=$ac_cv_path_CMP
5107if test -n "$CMP"; then
5108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5109$as_echo "$CMP" >&6; }
5110else
5111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5112$as_echo "no" >&6; }
5113fi
5114
5115
5116  test -n "$CMP" && break
5117done
5118
5119  else
5120    # The variable is set, but is it from the command line or the environment?
5121
5122    # Try to remove the string !CMP! from our list.
5123    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5124    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5125      # If it failed, the variable was not from the command line. Ignore it,
5126      # but warn the user (except for BASH, which is always set by the calling BASH).
5127      if test "xCMP" != xBASH; then
5128        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5129$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5130      fi
5131      # Try to locate tool using the code snippet
5132      for ac_prog in cmp
5133do
5134  # Extract the first word of "$ac_prog", so it can be a program name with args.
5135set dummy $ac_prog; ac_word=$2
5136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5137$as_echo_n "checking for $ac_word... " >&6; }
5138if ${ac_cv_path_CMP+:} false; then :
5139  $as_echo_n "(cached) " >&6
5140else
5141  case $CMP in
5142  [\\/]* | ?:[\\/]*)
5143  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5144  ;;
5145  *)
5146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5147for as_dir in $PATH
5148do
5149  IFS=$as_save_IFS
5150  test -z "$as_dir" && as_dir=.
5151    for ac_exec_ext in '' $ac_executable_extensions; do
5152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5153    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5155    break 2
5156  fi
5157done
5158  done
5159IFS=$as_save_IFS
5160
5161  ;;
5162esac
5163fi
5164CMP=$ac_cv_path_CMP
5165if test -n "$CMP"; then
5166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5167$as_echo "$CMP" >&6; }
5168else
5169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5170$as_echo "no" >&6; }
5171fi
5172
5173
5174  test -n "$CMP" && break
5175done
5176
5177    else
5178      # If it succeeded, then it was overridden by the user. We will use it
5179      # for the tool.
5180
5181      # First remove it from the list of overridden variables, so we can test
5182      # for unknown variables in the end.
5183      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5184
5185      # Check if the provided tool contains a complete path.
5186      tool_specified="$CMP"
5187      tool_basename="${tool_specified##*/}"
5188      if test "x$tool_basename" = "x$tool_specified"; then
5189        # A command without a complete path is provided, search $PATH.
5190        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5191$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5192        # Extract the first word of "$tool_basename", so it can be a program name with args.
5193set dummy $tool_basename; ac_word=$2
5194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5195$as_echo_n "checking for $ac_word... " >&6; }
5196if ${ac_cv_path_CMP+:} false; then :
5197  $as_echo_n "(cached) " >&6
5198else
5199  case $CMP in
5200  [\\/]* | ?:[\\/]*)
5201  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5202  ;;
5203  *)
5204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5205for as_dir in $PATH
5206do
5207  IFS=$as_save_IFS
5208  test -z "$as_dir" && as_dir=.
5209    for ac_exec_ext in '' $ac_executable_extensions; do
5210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5211    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5213    break 2
5214  fi
5215done
5216  done
5217IFS=$as_save_IFS
5218
5219  ;;
5220esac
5221fi
5222CMP=$ac_cv_path_CMP
5223if test -n "$CMP"; then
5224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5225$as_echo "$CMP" >&6; }
5226else
5227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5228$as_echo "no" >&6; }
5229fi
5230
5231
5232        if test "x$CMP" = x; then
5233          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5234        fi
5235      else
5236        # Otherwise we believe it is a complete path. Use it as it is.
5237        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5238$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5239        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5240$as_echo_n "checking for CMP... " >&6; }
5241        if test ! -x "$tool_specified"; then
5242          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5243$as_echo "not found" >&6; }
5244          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5245        fi
5246        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5247$as_echo "$tool_specified" >&6; }
5248      fi
5249    fi
5250  fi
5251
5252
5253
5254  if test "x$CMP" = x; then
5255    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5256  fi
5257
5258
5259
5260
5261
5262  # Publish this variable in the help.
5263
5264
5265  if test "x$COMM" = x; then
5266    # The variable is not set by user, try to locate tool using the code snippet
5267    for ac_prog in comm
5268do
5269  # Extract the first word of "$ac_prog", so it can be a program name with args.
5270set dummy $ac_prog; ac_word=$2
5271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5272$as_echo_n "checking for $ac_word... " >&6; }
5273if ${ac_cv_path_COMM+:} false; then :
5274  $as_echo_n "(cached) " >&6
5275else
5276  case $COMM in
5277  [\\/]* | ?:[\\/]*)
5278  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5279  ;;
5280  *)
5281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5282for as_dir in $PATH
5283do
5284  IFS=$as_save_IFS
5285  test -z "$as_dir" && as_dir=.
5286    for ac_exec_ext in '' $ac_executable_extensions; do
5287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5288    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5290    break 2
5291  fi
5292done
5293  done
5294IFS=$as_save_IFS
5295
5296  ;;
5297esac
5298fi
5299COMM=$ac_cv_path_COMM
5300if test -n "$COMM"; then
5301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5302$as_echo "$COMM" >&6; }
5303else
5304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5305$as_echo "no" >&6; }
5306fi
5307
5308
5309  test -n "$COMM" && break
5310done
5311
5312  else
5313    # The variable is set, but is it from the command line or the environment?
5314
5315    # Try to remove the string !COMM! from our list.
5316    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5317    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5318      # If it failed, the variable was not from the command line. Ignore it,
5319      # but warn the user (except for BASH, which is always set by the calling BASH).
5320      if test "xCOMM" != xBASH; then
5321        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5322$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5323      fi
5324      # Try to locate tool using the code snippet
5325      for ac_prog in comm
5326do
5327  # Extract the first word of "$ac_prog", so it can be a program name with args.
5328set dummy $ac_prog; ac_word=$2
5329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5330$as_echo_n "checking for $ac_word... " >&6; }
5331if ${ac_cv_path_COMM+:} false; then :
5332  $as_echo_n "(cached) " >&6
5333else
5334  case $COMM in
5335  [\\/]* | ?:[\\/]*)
5336  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5337  ;;
5338  *)
5339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5340for as_dir in $PATH
5341do
5342  IFS=$as_save_IFS
5343  test -z "$as_dir" && as_dir=.
5344    for ac_exec_ext in '' $ac_executable_extensions; do
5345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5346    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5348    break 2
5349  fi
5350done
5351  done
5352IFS=$as_save_IFS
5353
5354  ;;
5355esac
5356fi
5357COMM=$ac_cv_path_COMM
5358if test -n "$COMM"; then
5359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5360$as_echo "$COMM" >&6; }
5361else
5362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5363$as_echo "no" >&6; }
5364fi
5365
5366
5367  test -n "$COMM" && break
5368done
5369
5370    else
5371      # If it succeeded, then it was overridden by the user. We will use it
5372      # for the tool.
5373
5374      # First remove it from the list of overridden variables, so we can test
5375      # for unknown variables in the end.
5376      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5377
5378      # Check if the provided tool contains a complete path.
5379      tool_specified="$COMM"
5380      tool_basename="${tool_specified##*/}"
5381      if test "x$tool_basename" = "x$tool_specified"; then
5382        # A command without a complete path is provided, search $PATH.
5383        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5384$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5385        # Extract the first word of "$tool_basename", so it can be a program name with args.
5386set dummy $tool_basename; ac_word=$2
5387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5388$as_echo_n "checking for $ac_word... " >&6; }
5389if ${ac_cv_path_COMM+:} false; then :
5390  $as_echo_n "(cached) " >&6
5391else
5392  case $COMM in
5393  [\\/]* | ?:[\\/]*)
5394  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5395  ;;
5396  *)
5397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5398for as_dir in $PATH
5399do
5400  IFS=$as_save_IFS
5401  test -z "$as_dir" && as_dir=.
5402    for ac_exec_ext in '' $ac_executable_extensions; do
5403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5404    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5406    break 2
5407  fi
5408done
5409  done
5410IFS=$as_save_IFS
5411
5412  ;;
5413esac
5414fi
5415COMM=$ac_cv_path_COMM
5416if test -n "$COMM"; then
5417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5418$as_echo "$COMM" >&6; }
5419else
5420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5421$as_echo "no" >&6; }
5422fi
5423
5424
5425        if test "x$COMM" = x; then
5426          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5427        fi
5428      else
5429        # Otherwise we believe it is a complete path. Use it as it is.
5430        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5431$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5432        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5433$as_echo_n "checking for COMM... " >&6; }
5434        if test ! -x "$tool_specified"; then
5435          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5436$as_echo "not found" >&6; }
5437          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5438        fi
5439        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5440$as_echo "$tool_specified" >&6; }
5441      fi
5442    fi
5443  fi
5444
5445
5446
5447  if test "x$COMM" = x; then
5448    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5449  fi
5450
5451
5452
5453
5454
5455  # Publish this variable in the help.
5456
5457
5458  if test "x$CP" = x; then
5459    # The variable is not set by user, try to locate tool using the code snippet
5460    for ac_prog in cp
5461do
5462  # Extract the first word of "$ac_prog", so it can be a program name with args.
5463set dummy $ac_prog; ac_word=$2
5464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5465$as_echo_n "checking for $ac_word... " >&6; }
5466if ${ac_cv_path_CP+:} false; then :
5467  $as_echo_n "(cached) " >&6
5468else
5469  case $CP in
5470  [\\/]* | ?:[\\/]*)
5471  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5472  ;;
5473  *)
5474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5475for as_dir in $PATH
5476do
5477  IFS=$as_save_IFS
5478  test -z "$as_dir" && as_dir=.
5479    for ac_exec_ext in '' $ac_executable_extensions; do
5480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5481    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5483    break 2
5484  fi
5485done
5486  done
5487IFS=$as_save_IFS
5488
5489  ;;
5490esac
5491fi
5492CP=$ac_cv_path_CP
5493if test -n "$CP"; then
5494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5495$as_echo "$CP" >&6; }
5496else
5497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5498$as_echo "no" >&6; }
5499fi
5500
5501
5502  test -n "$CP" && break
5503done
5504
5505  else
5506    # The variable is set, but is it from the command line or the environment?
5507
5508    # Try to remove the string !CP! from our list.
5509    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5510    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5511      # If it failed, the variable was not from the command line. Ignore it,
5512      # but warn the user (except for BASH, which is always set by the calling BASH).
5513      if test "xCP" != xBASH; then
5514        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5515$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5516      fi
5517      # Try to locate tool using the code snippet
5518      for ac_prog in cp
5519do
5520  # Extract the first word of "$ac_prog", so it can be a program name with args.
5521set dummy $ac_prog; ac_word=$2
5522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5523$as_echo_n "checking for $ac_word... " >&6; }
5524if ${ac_cv_path_CP+:} false; then :
5525  $as_echo_n "(cached) " >&6
5526else
5527  case $CP in
5528  [\\/]* | ?:[\\/]*)
5529  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5530  ;;
5531  *)
5532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5533for as_dir in $PATH
5534do
5535  IFS=$as_save_IFS
5536  test -z "$as_dir" && as_dir=.
5537    for ac_exec_ext in '' $ac_executable_extensions; do
5538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5539    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5541    break 2
5542  fi
5543done
5544  done
5545IFS=$as_save_IFS
5546
5547  ;;
5548esac
5549fi
5550CP=$ac_cv_path_CP
5551if test -n "$CP"; then
5552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5553$as_echo "$CP" >&6; }
5554else
5555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5556$as_echo "no" >&6; }
5557fi
5558
5559
5560  test -n "$CP" && break
5561done
5562
5563    else
5564      # If it succeeded, then it was overridden by the user. We will use it
5565      # for the tool.
5566
5567      # First remove it from the list of overridden variables, so we can test
5568      # for unknown variables in the end.
5569      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5570
5571      # Check if the provided tool contains a complete path.
5572      tool_specified="$CP"
5573      tool_basename="${tool_specified##*/}"
5574      if test "x$tool_basename" = "x$tool_specified"; then
5575        # A command without a complete path is provided, search $PATH.
5576        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5577$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5578        # Extract the first word of "$tool_basename", so it can be a program name with args.
5579set dummy $tool_basename; ac_word=$2
5580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5581$as_echo_n "checking for $ac_word... " >&6; }
5582if ${ac_cv_path_CP+:} false; then :
5583  $as_echo_n "(cached) " >&6
5584else
5585  case $CP in
5586  [\\/]* | ?:[\\/]*)
5587  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5588  ;;
5589  *)
5590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5591for as_dir in $PATH
5592do
5593  IFS=$as_save_IFS
5594  test -z "$as_dir" && as_dir=.
5595    for ac_exec_ext in '' $ac_executable_extensions; do
5596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5597    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5599    break 2
5600  fi
5601done
5602  done
5603IFS=$as_save_IFS
5604
5605  ;;
5606esac
5607fi
5608CP=$ac_cv_path_CP
5609if test -n "$CP"; then
5610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5611$as_echo "$CP" >&6; }
5612else
5613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5614$as_echo "no" >&6; }
5615fi
5616
5617
5618        if test "x$CP" = x; then
5619          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5620        fi
5621      else
5622        # Otherwise we believe it is a complete path. Use it as it is.
5623        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5624$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5625        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5626$as_echo_n "checking for CP... " >&6; }
5627        if test ! -x "$tool_specified"; then
5628          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5629$as_echo "not found" >&6; }
5630          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5631        fi
5632        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5633$as_echo "$tool_specified" >&6; }
5634      fi
5635    fi
5636  fi
5637
5638
5639
5640  if test "x$CP" = x; then
5641    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5642  fi
5643
5644
5645
5646
5647
5648  # Publish this variable in the help.
5649
5650
5651  if test "x$CPIO" = x; then
5652    # The variable is not set by user, try to locate tool using the code snippet
5653    for ac_prog in cpio
5654do
5655  # Extract the first word of "$ac_prog", so it can be a program name with args.
5656set dummy $ac_prog; ac_word=$2
5657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5658$as_echo_n "checking for $ac_word... " >&6; }
5659if ${ac_cv_path_CPIO+:} false; then :
5660  $as_echo_n "(cached) " >&6
5661else
5662  case $CPIO in
5663  [\\/]* | ?:[\\/]*)
5664  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5665  ;;
5666  *)
5667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5668for as_dir in $PATH
5669do
5670  IFS=$as_save_IFS
5671  test -z "$as_dir" && as_dir=.
5672    for ac_exec_ext in '' $ac_executable_extensions; do
5673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5674    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5676    break 2
5677  fi
5678done
5679  done
5680IFS=$as_save_IFS
5681
5682  ;;
5683esac
5684fi
5685CPIO=$ac_cv_path_CPIO
5686if test -n "$CPIO"; then
5687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5688$as_echo "$CPIO" >&6; }
5689else
5690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5691$as_echo "no" >&6; }
5692fi
5693
5694
5695  test -n "$CPIO" && break
5696done
5697
5698  else
5699    # The variable is set, but is it from the command line or the environment?
5700
5701    # Try to remove the string !CPIO! from our list.
5702    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
5703    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5704      # If it failed, the variable was not from the command line. Ignore it,
5705      # but warn the user (except for BASH, which is always set by the calling BASH).
5706      if test "xCPIO" != xBASH; then
5707        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
5708$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
5709      fi
5710      # Try to locate tool using the code snippet
5711      for ac_prog in cpio
5712do
5713  # Extract the first word of "$ac_prog", so it can be a program name with args.
5714set dummy $ac_prog; ac_word=$2
5715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5716$as_echo_n "checking for $ac_word... " >&6; }
5717if ${ac_cv_path_CPIO+:} false; then :
5718  $as_echo_n "(cached) " >&6
5719else
5720  case $CPIO in
5721  [\\/]* | ?:[\\/]*)
5722  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5723  ;;
5724  *)
5725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5726for as_dir in $PATH
5727do
5728  IFS=$as_save_IFS
5729  test -z "$as_dir" && as_dir=.
5730    for ac_exec_ext in '' $ac_executable_extensions; do
5731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5732    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5734    break 2
5735  fi
5736done
5737  done
5738IFS=$as_save_IFS
5739
5740  ;;
5741esac
5742fi
5743CPIO=$ac_cv_path_CPIO
5744if test -n "$CPIO"; then
5745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5746$as_echo "$CPIO" >&6; }
5747else
5748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5749$as_echo "no" >&6; }
5750fi
5751
5752
5753  test -n "$CPIO" && break
5754done
5755
5756    else
5757      # If it succeeded, then it was overridden by the user. We will use it
5758      # for the tool.
5759
5760      # First remove it from the list of overridden variables, so we can test
5761      # for unknown variables in the end.
5762      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5763
5764      # Check if the provided tool contains a complete path.
5765      tool_specified="$CPIO"
5766      tool_basename="${tool_specified##*/}"
5767      if test "x$tool_basename" = "x$tool_specified"; then
5768        # A command without a complete path is provided, search $PATH.
5769        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
5770$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
5771        # Extract the first word of "$tool_basename", so it can be a program name with args.
5772set dummy $tool_basename; ac_word=$2
5773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5774$as_echo_n "checking for $ac_word... " >&6; }
5775if ${ac_cv_path_CPIO+:} false; then :
5776  $as_echo_n "(cached) " >&6
5777else
5778  case $CPIO in
5779  [\\/]* | ?:[\\/]*)
5780  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5781  ;;
5782  *)
5783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5784for as_dir in $PATH
5785do
5786  IFS=$as_save_IFS
5787  test -z "$as_dir" && as_dir=.
5788    for ac_exec_ext in '' $ac_executable_extensions; do
5789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5790    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5792    break 2
5793  fi
5794done
5795  done
5796IFS=$as_save_IFS
5797
5798  ;;
5799esac
5800fi
5801CPIO=$ac_cv_path_CPIO
5802if test -n "$CPIO"; then
5803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5804$as_echo "$CPIO" >&6; }
5805else
5806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5807$as_echo "no" >&6; }
5808fi
5809
5810
5811        if test "x$CPIO" = x; then
5812          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5813        fi
5814      else
5815        # Otherwise we believe it is a complete path. Use it as it is.
5816        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
5817$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
5818        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
5819$as_echo_n "checking for CPIO... " >&6; }
5820        if test ! -x "$tool_specified"; then
5821          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5822$as_echo "not found" >&6; }
5823          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
5824        fi
5825        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5826$as_echo "$tool_specified" >&6; }
5827      fi
5828    fi
5829  fi
5830
5831
5832
5833  if test "x$CPIO" = x; then
5834    as_fn_error $? "Could not find required tool for CPIO" "$LINENO" 5
5835  fi
5836
5837
5838
5839
5840
5841  # Publish this variable in the help.
5842
5843
5844  if test "x$CUT" = x; then
5845    # The variable is not set by user, try to locate tool using the code snippet
5846    for ac_prog in cut
5847do
5848  # Extract the first word of "$ac_prog", so it can be a program name with args.
5849set dummy $ac_prog; ac_word=$2
5850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5851$as_echo_n "checking for $ac_word... " >&6; }
5852if ${ac_cv_path_CUT+:} false; then :
5853  $as_echo_n "(cached) " >&6
5854else
5855  case $CUT in
5856  [\\/]* | ?:[\\/]*)
5857  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5858  ;;
5859  *)
5860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5861for as_dir in $PATH
5862do
5863  IFS=$as_save_IFS
5864  test -z "$as_dir" && as_dir=.
5865    for ac_exec_ext in '' $ac_executable_extensions; do
5866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5867    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5869    break 2
5870  fi
5871done
5872  done
5873IFS=$as_save_IFS
5874
5875  ;;
5876esac
5877fi
5878CUT=$ac_cv_path_CUT
5879if test -n "$CUT"; then
5880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5881$as_echo "$CUT" >&6; }
5882else
5883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5884$as_echo "no" >&6; }
5885fi
5886
5887
5888  test -n "$CUT" && break
5889done
5890
5891  else
5892    # The variable is set, but is it from the command line or the environment?
5893
5894    # Try to remove the string !CUT! from our list.
5895    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5896    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5897      # If it failed, the variable was not from the command line. Ignore it,
5898      # but warn the user (except for BASH, which is always set by the calling BASH).
5899      if test "xCUT" != xBASH; then
5900        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5901$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5902      fi
5903      # Try to locate tool using the code snippet
5904      for ac_prog in cut
5905do
5906  # Extract the first word of "$ac_prog", so it can be a program name with args.
5907set dummy $ac_prog; ac_word=$2
5908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5909$as_echo_n "checking for $ac_word... " >&6; }
5910if ${ac_cv_path_CUT+:} false; then :
5911  $as_echo_n "(cached) " >&6
5912else
5913  case $CUT in
5914  [\\/]* | ?:[\\/]*)
5915  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5916  ;;
5917  *)
5918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5919for as_dir in $PATH
5920do
5921  IFS=$as_save_IFS
5922  test -z "$as_dir" && as_dir=.
5923    for ac_exec_ext in '' $ac_executable_extensions; do
5924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5925    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5927    break 2
5928  fi
5929done
5930  done
5931IFS=$as_save_IFS
5932
5933  ;;
5934esac
5935fi
5936CUT=$ac_cv_path_CUT
5937if test -n "$CUT"; then
5938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5939$as_echo "$CUT" >&6; }
5940else
5941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5942$as_echo "no" >&6; }
5943fi
5944
5945
5946  test -n "$CUT" && break
5947done
5948
5949    else
5950      # If it succeeded, then it was overridden by the user. We will use it
5951      # for the tool.
5952
5953      # First remove it from the list of overridden variables, so we can test
5954      # for unknown variables in the end.
5955      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5956
5957      # Check if the provided tool contains a complete path.
5958      tool_specified="$CUT"
5959      tool_basename="${tool_specified##*/}"
5960      if test "x$tool_basename" = "x$tool_specified"; then
5961        # A command without a complete path is provided, search $PATH.
5962        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5963$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5964        # Extract the first word of "$tool_basename", so it can be a program name with args.
5965set dummy $tool_basename; ac_word=$2
5966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5967$as_echo_n "checking for $ac_word... " >&6; }
5968if ${ac_cv_path_CUT+:} false; then :
5969  $as_echo_n "(cached) " >&6
5970else
5971  case $CUT in
5972  [\\/]* | ?:[\\/]*)
5973  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5974  ;;
5975  *)
5976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5977for as_dir in $PATH
5978do
5979  IFS=$as_save_IFS
5980  test -z "$as_dir" && as_dir=.
5981    for ac_exec_ext in '' $ac_executable_extensions; do
5982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5983    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5985    break 2
5986  fi
5987done
5988  done
5989IFS=$as_save_IFS
5990
5991  ;;
5992esac
5993fi
5994CUT=$ac_cv_path_CUT
5995if test -n "$CUT"; then
5996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5997$as_echo "$CUT" >&6; }
5998else
5999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6000$as_echo "no" >&6; }
6001fi
6002
6003
6004        if test "x$CUT" = x; then
6005          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6006        fi
6007      else
6008        # Otherwise we believe it is a complete path. Use it as it is.
6009        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6010$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6012$as_echo_n "checking for CUT... " >&6; }
6013        if test ! -x "$tool_specified"; then
6014          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6015$as_echo "not found" >&6; }
6016          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6017        fi
6018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6019$as_echo "$tool_specified" >&6; }
6020      fi
6021    fi
6022  fi
6023
6024
6025
6026  if test "x$CUT" = x; then
6027    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6028  fi
6029
6030
6031
6032
6033
6034  # Publish this variable in the help.
6035
6036
6037  if test "x$DATE" = x; then
6038    # The variable is not set by user, try to locate tool using the code snippet
6039    for ac_prog in date
6040do
6041  # Extract the first word of "$ac_prog", so it can be a program name with args.
6042set dummy $ac_prog; ac_word=$2
6043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6044$as_echo_n "checking for $ac_word... " >&6; }
6045if ${ac_cv_path_DATE+:} false; then :
6046  $as_echo_n "(cached) " >&6
6047else
6048  case $DATE in
6049  [\\/]* | ?:[\\/]*)
6050  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6051  ;;
6052  *)
6053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6054for as_dir in $PATH
6055do
6056  IFS=$as_save_IFS
6057  test -z "$as_dir" && as_dir=.
6058    for ac_exec_ext in '' $ac_executable_extensions; do
6059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6060    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6062    break 2
6063  fi
6064done
6065  done
6066IFS=$as_save_IFS
6067
6068  ;;
6069esac
6070fi
6071DATE=$ac_cv_path_DATE
6072if test -n "$DATE"; then
6073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6074$as_echo "$DATE" >&6; }
6075else
6076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6077$as_echo "no" >&6; }
6078fi
6079
6080
6081  test -n "$DATE" && break
6082done
6083
6084  else
6085    # The variable is set, but is it from the command line or the environment?
6086
6087    # Try to remove the string !DATE! from our list.
6088    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6089    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6090      # If it failed, the variable was not from the command line. Ignore it,
6091      # but warn the user (except for BASH, which is always set by the calling BASH).
6092      if test "xDATE" != xBASH; then
6093        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6094$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6095      fi
6096      # Try to locate tool using the code snippet
6097      for ac_prog in date
6098do
6099  # Extract the first word of "$ac_prog", so it can be a program name with args.
6100set dummy $ac_prog; ac_word=$2
6101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6102$as_echo_n "checking for $ac_word... " >&6; }
6103if ${ac_cv_path_DATE+:} false; then :
6104  $as_echo_n "(cached) " >&6
6105else
6106  case $DATE in
6107  [\\/]* | ?:[\\/]*)
6108  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6109  ;;
6110  *)
6111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6112for as_dir in $PATH
6113do
6114  IFS=$as_save_IFS
6115  test -z "$as_dir" && as_dir=.
6116    for ac_exec_ext in '' $ac_executable_extensions; do
6117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6118    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6120    break 2
6121  fi
6122done
6123  done
6124IFS=$as_save_IFS
6125
6126  ;;
6127esac
6128fi
6129DATE=$ac_cv_path_DATE
6130if test -n "$DATE"; then
6131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6132$as_echo "$DATE" >&6; }
6133else
6134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6135$as_echo "no" >&6; }
6136fi
6137
6138
6139  test -n "$DATE" && break
6140done
6141
6142    else
6143      # If it succeeded, then it was overridden by the user. We will use it
6144      # for the tool.
6145
6146      # First remove it from the list of overridden variables, so we can test
6147      # for unknown variables in the end.
6148      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6149
6150      # Check if the provided tool contains a complete path.
6151      tool_specified="$DATE"
6152      tool_basename="${tool_specified##*/}"
6153      if test "x$tool_basename" = "x$tool_specified"; then
6154        # A command without a complete path is provided, search $PATH.
6155        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6156$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6157        # Extract the first word of "$tool_basename", so it can be a program name with args.
6158set dummy $tool_basename; ac_word=$2
6159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6160$as_echo_n "checking for $ac_word... " >&6; }
6161if ${ac_cv_path_DATE+:} false; then :
6162  $as_echo_n "(cached) " >&6
6163else
6164  case $DATE in
6165  [\\/]* | ?:[\\/]*)
6166  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6167  ;;
6168  *)
6169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6170for as_dir in $PATH
6171do
6172  IFS=$as_save_IFS
6173  test -z "$as_dir" && as_dir=.
6174    for ac_exec_ext in '' $ac_executable_extensions; do
6175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6176    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6178    break 2
6179  fi
6180done
6181  done
6182IFS=$as_save_IFS
6183
6184  ;;
6185esac
6186fi
6187DATE=$ac_cv_path_DATE
6188if test -n "$DATE"; then
6189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6190$as_echo "$DATE" >&6; }
6191else
6192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6193$as_echo "no" >&6; }
6194fi
6195
6196
6197        if test "x$DATE" = x; then
6198          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6199        fi
6200      else
6201        # Otherwise we believe it is a complete path. Use it as it is.
6202        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6203$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6204        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6205$as_echo_n "checking for DATE... " >&6; }
6206        if test ! -x "$tool_specified"; then
6207          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6208$as_echo "not found" >&6; }
6209          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6210        fi
6211        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6212$as_echo "$tool_specified" >&6; }
6213      fi
6214    fi
6215  fi
6216
6217
6218
6219  if test "x$DATE" = x; then
6220    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6221  fi
6222
6223
6224
6225
6226
6227  # Publish this variable in the help.
6228
6229
6230  if test "x$DIFF" = x; then
6231    # The variable is not set by user, try to locate tool using the code snippet
6232    for ac_prog in gdiff diff
6233do
6234  # Extract the first word of "$ac_prog", so it can be a program name with args.
6235set dummy $ac_prog; ac_word=$2
6236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6237$as_echo_n "checking for $ac_word... " >&6; }
6238if ${ac_cv_path_DIFF+:} false; then :
6239  $as_echo_n "(cached) " >&6
6240else
6241  case $DIFF in
6242  [\\/]* | ?:[\\/]*)
6243  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6244  ;;
6245  *)
6246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6247for as_dir in $PATH
6248do
6249  IFS=$as_save_IFS
6250  test -z "$as_dir" && as_dir=.
6251    for ac_exec_ext in '' $ac_executable_extensions; do
6252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6253    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6255    break 2
6256  fi
6257done
6258  done
6259IFS=$as_save_IFS
6260
6261  ;;
6262esac
6263fi
6264DIFF=$ac_cv_path_DIFF
6265if test -n "$DIFF"; then
6266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6267$as_echo "$DIFF" >&6; }
6268else
6269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6270$as_echo "no" >&6; }
6271fi
6272
6273
6274  test -n "$DIFF" && break
6275done
6276
6277  else
6278    # The variable is set, but is it from the command line or the environment?
6279
6280    # Try to remove the string !DIFF! from our list.
6281    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6282    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6283      # If it failed, the variable was not from the command line. Ignore it,
6284      # but warn the user (except for BASH, which is always set by the calling BASH).
6285      if test "xDIFF" != xBASH; then
6286        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6287$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6288      fi
6289      # Try to locate tool using the code snippet
6290      for ac_prog in gdiff diff
6291do
6292  # Extract the first word of "$ac_prog", so it can be a program name with args.
6293set dummy $ac_prog; ac_word=$2
6294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6295$as_echo_n "checking for $ac_word... " >&6; }
6296if ${ac_cv_path_DIFF+:} false; then :
6297  $as_echo_n "(cached) " >&6
6298else
6299  case $DIFF in
6300  [\\/]* | ?:[\\/]*)
6301  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6302  ;;
6303  *)
6304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6305for as_dir in $PATH
6306do
6307  IFS=$as_save_IFS
6308  test -z "$as_dir" && as_dir=.
6309    for ac_exec_ext in '' $ac_executable_extensions; do
6310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6311    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6313    break 2
6314  fi
6315done
6316  done
6317IFS=$as_save_IFS
6318
6319  ;;
6320esac
6321fi
6322DIFF=$ac_cv_path_DIFF
6323if test -n "$DIFF"; then
6324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6325$as_echo "$DIFF" >&6; }
6326else
6327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6328$as_echo "no" >&6; }
6329fi
6330
6331
6332  test -n "$DIFF" && break
6333done
6334
6335    else
6336      # If it succeeded, then it was overridden by the user. We will use it
6337      # for the tool.
6338
6339      # First remove it from the list of overridden variables, so we can test
6340      # for unknown variables in the end.
6341      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6342
6343      # Check if the provided tool contains a complete path.
6344      tool_specified="$DIFF"
6345      tool_basename="${tool_specified##*/}"
6346      if test "x$tool_basename" = "x$tool_specified"; then
6347        # A command without a complete path is provided, search $PATH.
6348        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6349$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6350        # Extract the first word of "$tool_basename", so it can be a program name with args.
6351set dummy $tool_basename; ac_word=$2
6352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6353$as_echo_n "checking for $ac_word... " >&6; }
6354if ${ac_cv_path_DIFF+:} false; then :
6355  $as_echo_n "(cached) " >&6
6356else
6357  case $DIFF in
6358  [\\/]* | ?:[\\/]*)
6359  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6360  ;;
6361  *)
6362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6363for as_dir in $PATH
6364do
6365  IFS=$as_save_IFS
6366  test -z "$as_dir" && as_dir=.
6367    for ac_exec_ext in '' $ac_executable_extensions; do
6368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6369    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6371    break 2
6372  fi
6373done
6374  done
6375IFS=$as_save_IFS
6376
6377  ;;
6378esac
6379fi
6380DIFF=$ac_cv_path_DIFF
6381if test -n "$DIFF"; then
6382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6383$as_echo "$DIFF" >&6; }
6384else
6385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6386$as_echo "no" >&6; }
6387fi
6388
6389
6390        if test "x$DIFF" = x; then
6391          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6392        fi
6393      else
6394        # Otherwise we believe it is a complete path. Use it as it is.
6395        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6396$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6397        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6398$as_echo_n "checking for DIFF... " >&6; }
6399        if test ! -x "$tool_specified"; then
6400          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6401$as_echo "not found" >&6; }
6402          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6403        fi
6404        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6405$as_echo "$tool_specified" >&6; }
6406      fi
6407    fi
6408  fi
6409
6410
6411
6412  if test "x$DIFF" = x; then
6413    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6414  fi
6415
6416
6417
6418
6419
6420  # Publish this variable in the help.
6421
6422
6423  if test "x$DIRNAME" = x; then
6424    # The variable is not set by user, try to locate tool using the code snippet
6425    for ac_prog in dirname
6426do
6427  # Extract the first word of "$ac_prog", so it can be a program name with args.
6428set dummy $ac_prog; ac_word=$2
6429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6430$as_echo_n "checking for $ac_word... " >&6; }
6431if ${ac_cv_path_DIRNAME+:} false; then :
6432  $as_echo_n "(cached) " >&6
6433else
6434  case $DIRNAME in
6435  [\\/]* | ?:[\\/]*)
6436  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6437  ;;
6438  *)
6439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6440for as_dir in $PATH
6441do
6442  IFS=$as_save_IFS
6443  test -z "$as_dir" && as_dir=.
6444    for ac_exec_ext in '' $ac_executable_extensions; do
6445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6446    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6448    break 2
6449  fi
6450done
6451  done
6452IFS=$as_save_IFS
6453
6454  ;;
6455esac
6456fi
6457DIRNAME=$ac_cv_path_DIRNAME
6458if test -n "$DIRNAME"; then
6459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6460$as_echo "$DIRNAME" >&6; }
6461else
6462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6463$as_echo "no" >&6; }
6464fi
6465
6466
6467  test -n "$DIRNAME" && break
6468done
6469
6470  else
6471    # The variable is set, but is it from the command line or the environment?
6472
6473    # Try to remove the string !DIRNAME! from our list.
6474    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6475    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6476      # If it failed, the variable was not from the command line. Ignore it,
6477      # but warn the user (except for BASH, which is always set by the calling BASH).
6478      if test "xDIRNAME" != xBASH; then
6479        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6480$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6481      fi
6482      # Try to locate tool using the code snippet
6483      for ac_prog in dirname
6484do
6485  # Extract the first word of "$ac_prog", so it can be a program name with args.
6486set dummy $ac_prog; ac_word=$2
6487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6488$as_echo_n "checking for $ac_word... " >&6; }
6489if ${ac_cv_path_DIRNAME+:} false; then :
6490  $as_echo_n "(cached) " >&6
6491else
6492  case $DIRNAME in
6493  [\\/]* | ?:[\\/]*)
6494  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6495  ;;
6496  *)
6497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6498for as_dir in $PATH
6499do
6500  IFS=$as_save_IFS
6501  test -z "$as_dir" && as_dir=.
6502    for ac_exec_ext in '' $ac_executable_extensions; do
6503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6504    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6506    break 2
6507  fi
6508done
6509  done
6510IFS=$as_save_IFS
6511
6512  ;;
6513esac
6514fi
6515DIRNAME=$ac_cv_path_DIRNAME
6516if test -n "$DIRNAME"; then
6517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6518$as_echo "$DIRNAME" >&6; }
6519else
6520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6521$as_echo "no" >&6; }
6522fi
6523
6524
6525  test -n "$DIRNAME" && break
6526done
6527
6528    else
6529      # If it succeeded, then it was overridden by the user. We will use it
6530      # for the tool.
6531
6532      # First remove it from the list of overridden variables, so we can test
6533      # for unknown variables in the end.
6534      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6535
6536      # Check if the provided tool contains a complete path.
6537      tool_specified="$DIRNAME"
6538      tool_basename="${tool_specified##*/}"
6539      if test "x$tool_basename" = "x$tool_specified"; then
6540        # A command without a complete path is provided, search $PATH.
6541        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6542$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6543        # Extract the first word of "$tool_basename", so it can be a program name with args.
6544set dummy $tool_basename; ac_word=$2
6545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6546$as_echo_n "checking for $ac_word... " >&6; }
6547if ${ac_cv_path_DIRNAME+:} false; then :
6548  $as_echo_n "(cached) " >&6
6549else
6550  case $DIRNAME in
6551  [\\/]* | ?:[\\/]*)
6552  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6553  ;;
6554  *)
6555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6556for as_dir in $PATH
6557do
6558  IFS=$as_save_IFS
6559  test -z "$as_dir" && as_dir=.
6560    for ac_exec_ext in '' $ac_executable_extensions; do
6561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6562    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6564    break 2
6565  fi
6566done
6567  done
6568IFS=$as_save_IFS
6569
6570  ;;
6571esac
6572fi
6573DIRNAME=$ac_cv_path_DIRNAME
6574if test -n "$DIRNAME"; then
6575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6576$as_echo "$DIRNAME" >&6; }
6577else
6578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6579$as_echo "no" >&6; }
6580fi
6581
6582
6583        if test "x$DIRNAME" = x; then
6584          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6585        fi
6586      else
6587        # Otherwise we believe it is a complete path. Use it as it is.
6588        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6589$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6590        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6591$as_echo_n "checking for DIRNAME... " >&6; }
6592        if test ! -x "$tool_specified"; then
6593          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6594$as_echo "not found" >&6; }
6595          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6596        fi
6597        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6598$as_echo "$tool_specified" >&6; }
6599      fi
6600    fi
6601  fi
6602
6603
6604
6605  if test "x$DIRNAME" = x; then
6606    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6607  fi
6608
6609
6610
6611
6612
6613  # Publish this variable in the help.
6614
6615
6616  if test "x$ECHO" = x; then
6617    # The variable is not set by user, try to locate tool using the code snippet
6618    for ac_prog in echo
6619do
6620  # Extract the first word of "$ac_prog", so it can be a program name with args.
6621set dummy $ac_prog; ac_word=$2
6622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6623$as_echo_n "checking for $ac_word... " >&6; }
6624if ${ac_cv_path_ECHO+:} false; then :
6625  $as_echo_n "(cached) " >&6
6626else
6627  case $ECHO in
6628  [\\/]* | ?:[\\/]*)
6629  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6630  ;;
6631  *)
6632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6633for as_dir in $PATH
6634do
6635  IFS=$as_save_IFS
6636  test -z "$as_dir" && as_dir=.
6637    for ac_exec_ext in '' $ac_executable_extensions; do
6638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6639    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6641    break 2
6642  fi
6643done
6644  done
6645IFS=$as_save_IFS
6646
6647  ;;
6648esac
6649fi
6650ECHO=$ac_cv_path_ECHO
6651if test -n "$ECHO"; then
6652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6653$as_echo "$ECHO" >&6; }
6654else
6655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6656$as_echo "no" >&6; }
6657fi
6658
6659
6660  test -n "$ECHO" && break
6661done
6662
6663  else
6664    # The variable is set, but is it from the command line or the environment?
6665
6666    # Try to remove the string !ECHO! from our list.
6667    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6668    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6669      # If it failed, the variable was not from the command line. Ignore it,
6670      # but warn the user (except for BASH, which is always set by the calling BASH).
6671      if test "xECHO" != xBASH; then
6672        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6673$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6674      fi
6675      # Try to locate tool using the code snippet
6676      for ac_prog in echo
6677do
6678  # Extract the first word of "$ac_prog", so it can be a program name with args.
6679set dummy $ac_prog; ac_word=$2
6680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6681$as_echo_n "checking for $ac_word... " >&6; }
6682if ${ac_cv_path_ECHO+:} false; then :
6683  $as_echo_n "(cached) " >&6
6684else
6685  case $ECHO in
6686  [\\/]* | ?:[\\/]*)
6687  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6688  ;;
6689  *)
6690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6691for as_dir in $PATH
6692do
6693  IFS=$as_save_IFS
6694  test -z "$as_dir" && as_dir=.
6695    for ac_exec_ext in '' $ac_executable_extensions; do
6696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6697    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6699    break 2
6700  fi
6701done
6702  done
6703IFS=$as_save_IFS
6704
6705  ;;
6706esac
6707fi
6708ECHO=$ac_cv_path_ECHO
6709if test -n "$ECHO"; then
6710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6711$as_echo "$ECHO" >&6; }
6712else
6713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6714$as_echo "no" >&6; }
6715fi
6716
6717
6718  test -n "$ECHO" && break
6719done
6720
6721    else
6722      # If it succeeded, then it was overridden by the user. We will use it
6723      # for the tool.
6724
6725      # First remove it from the list of overridden variables, so we can test
6726      # for unknown variables in the end.
6727      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6728
6729      # Check if the provided tool contains a complete path.
6730      tool_specified="$ECHO"
6731      tool_basename="${tool_specified##*/}"
6732      if test "x$tool_basename" = "x$tool_specified"; then
6733        # A command without a complete path is provided, search $PATH.
6734        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6735$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6736        # Extract the first word of "$tool_basename", so it can be a program name with args.
6737set dummy $tool_basename; ac_word=$2
6738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6739$as_echo_n "checking for $ac_word... " >&6; }
6740if ${ac_cv_path_ECHO+:} false; then :
6741  $as_echo_n "(cached) " >&6
6742else
6743  case $ECHO in
6744  [\\/]* | ?:[\\/]*)
6745  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6746  ;;
6747  *)
6748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6749for as_dir in $PATH
6750do
6751  IFS=$as_save_IFS
6752  test -z "$as_dir" && as_dir=.
6753    for ac_exec_ext in '' $ac_executable_extensions; do
6754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6755    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6757    break 2
6758  fi
6759done
6760  done
6761IFS=$as_save_IFS
6762
6763  ;;
6764esac
6765fi
6766ECHO=$ac_cv_path_ECHO
6767if test -n "$ECHO"; then
6768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6769$as_echo "$ECHO" >&6; }
6770else
6771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6772$as_echo "no" >&6; }
6773fi
6774
6775
6776        if test "x$ECHO" = x; then
6777          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6778        fi
6779      else
6780        # Otherwise we believe it is a complete path. Use it as it is.
6781        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6782$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6783        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6784$as_echo_n "checking for ECHO... " >&6; }
6785        if test ! -x "$tool_specified"; then
6786          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6787$as_echo "not found" >&6; }
6788          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6789        fi
6790        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6791$as_echo "$tool_specified" >&6; }
6792      fi
6793    fi
6794  fi
6795
6796
6797
6798  if test "x$ECHO" = x; then
6799    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6800  fi
6801
6802
6803
6804
6805
6806  # Publish this variable in the help.
6807
6808
6809  if test "x$EXPR" = x; then
6810    # The variable is not set by user, try to locate tool using the code snippet
6811    for ac_prog in expr
6812do
6813  # Extract the first word of "$ac_prog", so it can be a program name with args.
6814set dummy $ac_prog; ac_word=$2
6815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6816$as_echo_n "checking for $ac_word... " >&6; }
6817if ${ac_cv_path_EXPR+:} false; then :
6818  $as_echo_n "(cached) " >&6
6819else
6820  case $EXPR in
6821  [\\/]* | ?:[\\/]*)
6822  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6823  ;;
6824  *)
6825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6826for as_dir in $PATH
6827do
6828  IFS=$as_save_IFS
6829  test -z "$as_dir" && as_dir=.
6830    for ac_exec_ext in '' $ac_executable_extensions; do
6831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6832    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6834    break 2
6835  fi
6836done
6837  done
6838IFS=$as_save_IFS
6839
6840  ;;
6841esac
6842fi
6843EXPR=$ac_cv_path_EXPR
6844if test -n "$EXPR"; then
6845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6846$as_echo "$EXPR" >&6; }
6847else
6848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6849$as_echo "no" >&6; }
6850fi
6851
6852
6853  test -n "$EXPR" && break
6854done
6855
6856  else
6857    # The variable is set, but is it from the command line or the environment?
6858
6859    # Try to remove the string !EXPR! from our list.
6860    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6861    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6862      # If it failed, the variable was not from the command line. Ignore it,
6863      # but warn the user (except for BASH, which is always set by the calling BASH).
6864      if test "xEXPR" != xBASH; then
6865        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6866$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6867      fi
6868      # Try to locate tool using the code snippet
6869      for ac_prog in expr
6870do
6871  # Extract the first word of "$ac_prog", so it can be a program name with args.
6872set dummy $ac_prog; ac_word=$2
6873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6874$as_echo_n "checking for $ac_word... " >&6; }
6875if ${ac_cv_path_EXPR+:} false; then :
6876  $as_echo_n "(cached) " >&6
6877else
6878  case $EXPR in
6879  [\\/]* | ?:[\\/]*)
6880  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6881  ;;
6882  *)
6883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6884for as_dir in $PATH
6885do
6886  IFS=$as_save_IFS
6887  test -z "$as_dir" && as_dir=.
6888    for ac_exec_ext in '' $ac_executable_extensions; do
6889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6890    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6892    break 2
6893  fi
6894done
6895  done
6896IFS=$as_save_IFS
6897
6898  ;;
6899esac
6900fi
6901EXPR=$ac_cv_path_EXPR
6902if test -n "$EXPR"; then
6903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6904$as_echo "$EXPR" >&6; }
6905else
6906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6907$as_echo "no" >&6; }
6908fi
6909
6910
6911  test -n "$EXPR" && break
6912done
6913
6914    else
6915      # If it succeeded, then it was overridden by the user. We will use it
6916      # for the tool.
6917
6918      # First remove it from the list of overridden variables, so we can test
6919      # for unknown variables in the end.
6920      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6921
6922      # Check if the provided tool contains a complete path.
6923      tool_specified="$EXPR"
6924      tool_basename="${tool_specified##*/}"
6925      if test "x$tool_basename" = "x$tool_specified"; then
6926        # A command without a complete path is provided, search $PATH.
6927        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6928$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6929        # Extract the first word of "$tool_basename", so it can be a program name with args.
6930set dummy $tool_basename; ac_word=$2
6931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6932$as_echo_n "checking for $ac_word... " >&6; }
6933if ${ac_cv_path_EXPR+:} false; then :
6934  $as_echo_n "(cached) " >&6
6935else
6936  case $EXPR in
6937  [\\/]* | ?:[\\/]*)
6938  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6939  ;;
6940  *)
6941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6942for as_dir in $PATH
6943do
6944  IFS=$as_save_IFS
6945  test -z "$as_dir" && as_dir=.
6946    for ac_exec_ext in '' $ac_executable_extensions; do
6947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6948    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6950    break 2
6951  fi
6952done
6953  done
6954IFS=$as_save_IFS
6955
6956  ;;
6957esac
6958fi
6959EXPR=$ac_cv_path_EXPR
6960if test -n "$EXPR"; then
6961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6962$as_echo "$EXPR" >&6; }
6963else
6964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6965$as_echo "no" >&6; }
6966fi
6967
6968
6969        if test "x$EXPR" = x; then
6970          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6971        fi
6972      else
6973        # Otherwise we believe it is a complete path. Use it as it is.
6974        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6975$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6976        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6977$as_echo_n "checking for EXPR... " >&6; }
6978        if test ! -x "$tool_specified"; then
6979          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6980$as_echo "not found" >&6; }
6981          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6982        fi
6983        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6984$as_echo "$tool_specified" >&6; }
6985      fi
6986    fi
6987  fi
6988
6989
6990
6991  if test "x$EXPR" = x; then
6992    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6993  fi
6994
6995
6996
6997
6998
6999  # Publish this variable in the help.
7000
7001
7002  if test "x$FILE" = x; then
7003    # The variable is not set by user, try to locate tool using the code snippet
7004    for ac_prog in file
7005do
7006  # Extract the first word of "$ac_prog", so it can be a program name with args.
7007set dummy $ac_prog; ac_word=$2
7008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7009$as_echo_n "checking for $ac_word... " >&6; }
7010if ${ac_cv_path_FILE+:} false; then :
7011  $as_echo_n "(cached) " >&6
7012else
7013  case $FILE in
7014  [\\/]* | ?:[\\/]*)
7015  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7016  ;;
7017  *)
7018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7019for as_dir in $PATH
7020do
7021  IFS=$as_save_IFS
7022  test -z "$as_dir" && as_dir=.
7023    for ac_exec_ext in '' $ac_executable_extensions; do
7024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7025    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7027    break 2
7028  fi
7029done
7030  done
7031IFS=$as_save_IFS
7032
7033  ;;
7034esac
7035fi
7036FILE=$ac_cv_path_FILE
7037if test -n "$FILE"; then
7038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7039$as_echo "$FILE" >&6; }
7040else
7041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7042$as_echo "no" >&6; }
7043fi
7044
7045
7046  test -n "$FILE" && break
7047done
7048
7049  else
7050    # The variable is set, but is it from the command line or the environment?
7051
7052    # Try to remove the string !FILE! from our list.
7053    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7054    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7055      # If it failed, the variable was not from the command line. Ignore it,
7056      # but warn the user (except for BASH, which is always set by the calling BASH).
7057      if test "xFILE" != xBASH; then
7058        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7059$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7060      fi
7061      # Try to locate tool using the code snippet
7062      for ac_prog in file
7063do
7064  # Extract the first word of "$ac_prog", so it can be a program name with args.
7065set dummy $ac_prog; ac_word=$2
7066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7067$as_echo_n "checking for $ac_word... " >&6; }
7068if ${ac_cv_path_FILE+:} false; then :
7069  $as_echo_n "(cached) " >&6
7070else
7071  case $FILE in
7072  [\\/]* | ?:[\\/]*)
7073  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7074  ;;
7075  *)
7076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7077for as_dir in $PATH
7078do
7079  IFS=$as_save_IFS
7080  test -z "$as_dir" && as_dir=.
7081    for ac_exec_ext in '' $ac_executable_extensions; do
7082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7083    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7085    break 2
7086  fi
7087done
7088  done
7089IFS=$as_save_IFS
7090
7091  ;;
7092esac
7093fi
7094FILE=$ac_cv_path_FILE
7095if test -n "$FILE"; then
7096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7097$as_echo "$FILE" >&6; }
7098else
7099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7100$as_echo "no" >&6; }
7101fi
7102
7103
7104  test -n "$FILE" && break
7105done
7106
7107    else
7108      # If it succeeded, then it was overridden by the user. We will use it
7109      # for the tool.
7110
7111      # First remove it from the list of overridden variables, so we can test
7112      # for unknown variables in the end.
7113      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7114
7115      # Check if the provided tool contains a complete path.
7116      tool_specified="$FILE"
7117      tool_basename="${tool_specified##*/}"
7118      if test "x$tool_basename" = "x$tool_specified"; then
7119        # A command without a complete path is provided, search $PATH.
7120        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7121$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7122        # Extract the first word of "$tool_basename", so it can be a program name with args.
7123set dummy $tool_basename; ac_word=$2
7124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7125$as_echo_n "checking for $ac_word... " >&6; }
7126if ${ac_cv_path_FILE+:} false; then :
7127  $as_echo_n "(cached) " >&6
7128else
7129  case $FILE in
7130  [\\/]* | ?:[\\/]*)
7131  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7132  ;;
7133  *)
7134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7135for as_dir in $PATH
7136do
7137  IFS=$as_save_IFS
7138  test -z "$as_dir" && as_dir=.
7139    for ac_exec_ext in '' $ac_executable_extensions; do
7140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7141    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7143    break 2
7144  fi
7145done
7146  done
7147IFS=$as_save_IFS
7148
7149  ;;
7150esac
7151fi
7152FILE=$ac_cv_path_FILE
7153if test -n "$FILE"; then
7154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7155$as_echo "$FILE" >&6; }
7156else
7157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7158$as_echo "no" >&6; }
7159fi
7160
7161
7162        if test "x$FILE" = x; then
7163          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7164        fi
7165      else
7166        # Otherwise we believe it is a complete path. Use it as it is.
7167        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7168$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7169        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7170$as_echo_n "checking for FILE... " >&6; }
7171        if test ! -x "$tool_specified"; then
7172          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7173$as_echo "not found" >&6; }
7174          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7175        fi
7176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7177$as_echo "$tool_specified" >&6; }
7178      fi
7179    fi
7180  fi
7181
7182
7183
7184  if test "x$FILE" = x; then
7185    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7186  fi
7187
7188
7189
7190
7191
7192  # Publish this variable in the help.
7193
7194
7195  if test "x$FIND" = x; then
7196    # The variable is not set by user, try to locate tool using the code snippet
7197    for ac_prog in find
7198do
7199  # Extract the first word of "$ac_prog", so it can be a program name with args.
7200set dummy $ac_prog; ac_word=$2
7201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7202$as_echo_n "checking for $ac_word... " >&6; }
7203if ${ac_cv_path_FIND+:} false; then :
7204  $as_echo_n "(cached) " >&6
7205else
7206  case $FIND in
7207  [\\/]* | ?:[\\/]*)
7208  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7209  ;;
7210  *)
7211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7212for as_dir in $PATH
7213do
7214  IFS=$as_save_IFS
7215  test -z "$as_dir" && as_dir=.
7216    for ac_exec_ext in '' $ac_executable_extensions; do
7217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7218    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7220    break 2
7221  fi
7222done
7223  done
7224IFS=$as_save_IFS
7225
7226  ;;
7227esac
7228fi
7229FIND=$ac_cv_path_FIND
7230if test -n "$FIND"; then
7231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7232$as_echo "$FIND" >&6; }
7233else
7234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7235$as_echo "no" >&6; }
7236fi
7237
7238
7239  test -n "$FIND" && break
7240done
7241
7242  else
7243    # The variable is set, but is it from the command line or the environment?
7244
7245    # Try to remove the string !FIND! from our list.
7246    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7247    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7248      # If it failed, the variable was not from the command line. Ignore it,
7249      # but warn the user (except for BASH, which is always set by the calling BASH).
7250      if test "xFIND" != xBASH; then
7251        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7252$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7253      fi
7254      # Try to locate tool using the code snippet
7255      for ac_prog in find
7256do
7257  # Extract the first word of "$ac_prog", so it can be a program name with args.
7258set dummy $ac_prog; ac_word=$2
7259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7260$as_echo_n "checking for $ac_word... " >&6; }
7261if ${ac_cv_path_FIND+:} false; then :
7262  $as_echo_n "(cached) " >&6
7263else
7264  case $FIND in
7265  [\\/]* | ?:[\\/]*)
7266  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7267  ;;
7268  *)
7269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7270for as_dir in $PATH
7271do
7272  IFS=$as_save_IFS
7273  test -z "$as_dir" && as_dir=.
7274    for ac_exec_ext in '' $ac_executable_extensions; do
7275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7276    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7278    break 2
7279  fi
7280done
7281  done
7282IFS=$as_save_IFS
7283
7284  ;;
7285esac
7286fi
7287FIND=$ac_cv_path_FIND
7288if test -n "$FIND"; then
7289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7290$as_echo "$FIND" >&6; }
7291else
7292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7293$as_echo "no" >&6; }
7294fi
7295
7296
7297  test -n "$FIND" && break
7298done
7299
7300    else
7301      # If it succeeded, then it was overridden by the user. We will use it
7302      # for the tool.
7303
7304      # First remove it from the list of overridden variables, so we can test
7305      # for unknown variables in the end.
7306      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7307
7308      # Check if the provided tool contains a complete path.
7309      tool_specified="$FIND"
7310      tool_basename="${tool_specified##*/}"
7311      if test "x$tool_basename" = "x$tool_specified"; then
7312        # A command without a complete path is provided, search $PATH.
7313        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7314$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7315        # Extract the first word of "$tool_basename", so it can be a program name with args.
7316set dummy $tool_basename; ac_word=$2
7317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7318$as_echo_n "checking for $ac_word... " >&6; }
7319if ${ac_cv_path_FIND+:} false; then :
7320  $as_echo_n "(cached) " >&6
7321else
7322  case $FIND in
7323  [\\/]* | ?:[\\/]*)
7324  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7325  ;;
7326  *)
7327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7328for as_dir in $PATH
7329do
7330  IFS=$as_save_IFS
7331  test -z "$as_dir" && as_dir=.
7332    for ac_exec_ext in '' $ac_executable_extensions; do
7333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7334    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7336    break 2
7337  fi
7338done
7339  done
7340IFS=$as_save_IFS
7341
7342  ;;
7343esac
7344fi
7345FIND=$ac_cv_path_FIND
7346if test -n "$FIND"; then
7347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7348$as_echo "$FIND" >&6; }
7349else
7350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7351$as_echo "no" >&6; }
7352fi
7353
7354
7355        if test "x$FIND" = x; then
7356          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7357        fi
7358      else
7359        # Otherwise we believe it is a complete path. Use it as it is.
7360        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7361$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7362        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7363$as_echo_n "checking for FIND... " >&6; }
7364        if test ! -x "$tool_specified"; then
7365          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7366$as_echo "not found" >&6; }
7367          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7368        fi
7369        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7370$as_echo "$tool_specified" >&6; }
7371      fi
7372    fi
7373  fi
7374
7375
7376
7377  if test "x$FIND" = x; then
7378    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7379  fi
7380
7381
7382
7383
7384
7385  # Publish this variable in the help.
7386
7387
7388  if test "x$HEAD" = x; then
7389    # The variable is not set by user, try to locate tool using the code snippet
7390    for ac_prog in head
7391do
7392  # Extract the first word of "$ac_prog", so it can be a program name with args.
7393set dummy $ac_prog; ac_word=$2
7394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7395$as_echo_n "checking for $ac_word... " >&6; }
7396if ${ac_cv_path_HEAD+:} false; then :
7397  $as_echo_n "(cached) " >&6
7398else
7399  case $HEAD in
7400  [\\/]* | ?:[\\/]*)
7401  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7402  ;;
7403  *)
7404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7405for as_dir in $PATH
7406do
7407  IFS=$as_save_IFS
7408  test -z "$as_dir" && as_dir=.
7409    for ac_exec_ext in '' $ac_executable_extensions; do
7410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7411    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7413    break 2
7414  fi
7415done
7416  done
7417IFS=$as_save_IFS
7418
7419  ;;
7420esac
7421fi
7422HEAD=$ac_cv_path_HEAD
7423if test -n "$HEAD"; then
7424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7425$as_echo "$HEAD" >&6; }
7426else
7427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7428$as_echo "no" >&6; }
7429fi
7430
7431
7432  test -n "$HEAD" && break
7433done
7434
7435  else
7436    # The variable is set, but is it from the command line or the environment?
7437
7438    # Try to remove the string !HEAD! from our list.
7439    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7440    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7441      # If it failed, the variable was not from the command line. Ignore it,
7442      # but warn the user (except for BASH, which is always set by the calling BASH).
7443      if test "xHEAD" != xBASH; then
7444        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7445$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7446      fi
7447      # Try to locate tool using the code snippet
7448      for ac_prog in head
7449do
7450  # Extract the first word of "$ac_prog", so it can be a program name with args.
7451set dummy $ac_prog; ac_word=$2
7452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7453$as_echo_n "checking for $ac_word... " >&6; }
7454if ${ac_cv_path_HEAD+:} false; then :
7455  $as_echo_n "(cached) " >&6
7456else
7457  case $HEAD in
7458  [\\/]* | ?:[\\/]*)
7459  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7460  ;;
7461  *)
7462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7463for as_dir in $PATH
7464do
7465  IFS=$as_save_IFS
7466  test -z "$as_dir" && as_dir=.
7467    for ac_exec_ext in '' $ac_executable_extensions; do
7468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7469    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7471    break 2
7472  fi
7473done
7474  done
7475IFS=$as_save_IFS
7476
7477  ;;
7478esac
7479fi
7480HEAD=$ac_cv_path_HEAD
7481if test -n "$HEAD"; then
7482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7483$as_echo "$HEAD" >&6; }
7484else
7485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7486$as_echo "no" >&6; }
7487fi
7488
7489
7490  test -n "$HEAD" && break
7491done
7492
7493    else
7494      # If it succeeded, then it was overridden by the user. We will use it
7495      # for the tool.
7496
7497      # First remove it from the list of overridden variables, so we can test
7498      # for unknown variables in the end.
7499      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7500
7501      # Check if the provided tool contains a complete path.
7502      tool_specified="$HEAD"
7503      tool_basename="${tool_specified##*/}"
7504      if test "x$tool_basename" = "x$tool_specified"; then
7505        # A command without a complete path is provided, search $PATH.
7506        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7507$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7508        # Extract the first word of "$tool_basename", so it can be a program name with args.
7509set dummy $tool_basename; ac_word=$2
7510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7511$as_echo_n "checking for $ac_word... " >&6; }
7512if ${ac_cv_path_HEAD+:} false; then :
7513  $as_echo_n "(cached) " >&6
7514else
7515  case $HEAD in
7516  [\\/]* | ?:[\\/]*)
7517  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7518  ;;
7519  *)
7520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7521for as_dir in $PATH
7522do
7523  IFS=$as_save_IFS
7524  test -z "$as_dir" && as_dir=.
7525    for ac_exec_ext in '' $ac_executable_extensions; do
7526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7527    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7529    break 2
7530  fi
7531done
7532  done
7533IFS=$as_save_IFS
7534
7535  ;;
7536esac
7537fi
7538HEAD=$ac_cv_path_HEAD
7539if test -n "$HEAD"; then
7540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7541$as_echo "$HEAD" >&6; }
7542else
7543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7544$as_echo "no" >&6; }
7545fi
7546
7547
7548        if test "x$HEAD" = x; then
7549          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7550        fi
7551      else
7552        # Otherwise we believe it is a complete path. Use it as it is.
7553        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7554$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7555        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7556$as_echo_n "checking for HEAD... " >&6; }
7557        if test ! -x "$tool_specified"; then
7558          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7559$as_echo "not found" >&6; }
7560          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7561        fi
7562        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7563$as_echo "$tool_specified" >&6; }
7564      fi
7565    fi
7566  fi
7567
7568
7569
7570  if test "x$HEAD" = x; then
7571    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7572  fi
7573
7574
7575
7576
7577
7578  # Publish this variable in the help.
7579
7580
7581  if test "x$LN" = x; then
7582    # The variable is not set by user, try to locate tool using the code snippet
7583    for ac_prog in ln
7584do
7585  # Extract the first word of "$ac_prog", so it can be a program name with args.
7586set dummy $ac_prog; ac_word=$2
7587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7588$as_echo_n "checking for $ac_word... " >&6; }
7589if ${ac_cv_path_LN+:} false; then :
7590  $as_echo_n "(cached) " >&6
7591else
7592  case $LN in
7593  [\\/]* | ?:[\\/]*)
7594  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7595  ;;
7596  *)
7597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7598for as_dir in $PATH
7599do
7600  IFS=$as_save_IFS
7601  test -z "$as_dir" && as_dir=.
7602    for ac_exec_ext in '' $ac_executable_extensions; do
7603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7604    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7606    break 2
7607  fi
7608done
7609  done
7610IFS=$as_save_IFS
7611
7612  ;;
7613esac
7614fi
7615LN=$ac_cv_path_LN
7616if test -n "$LN"; then
7617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7618$as_echo "$LN" >&6; }
7619else
7620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7621$as_echo "no" >&6; }
7622fi
7623
7624
7625  test -n "$LN" && break
7626done
7627
7628  else
7629    # The variable is set, but is it from the command line or the environment?
7630
7631    # Try to remove the string !LN! from our list.
7632    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7633    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7634      # If it failed, the variable was not from the command line. Ignore it,
7635      # but warn the user (except for BASH, which is always set by the calling BASH).
7636      if test "xLN" != xBASH; then
7637        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7638$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7639      fi
7640      # Try to locate tool using the code snippet
7641      for ac_prog in ln
7642do
7643  # Extract the first word of "$ac_prog", so it can be a program name with args.
7644set dummy $ac_prog; ac_word=$2
7645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7646$as_echo_n "checking for $ac_word... " >&6; }
7647if ${ac_cv_path_LN+:} false; then :
7648  $as_echo_n "(cached) " >&6
7649else
7650  case $LN in
7651  [\\/]* | ?:[\\/]*)
7652  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7653  ;;
7654  *)
7655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7656for as_dir in $PATH
7657do
7658  IFS=$as_save_IFS
7659  test -z "$as_dir" && as_dir=.
7660    for ac_exec_ext in '' $ac_executable_extensions; do
7661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7662    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7664    break 2
7665  fi
7666done
7667  done
7668IFS=$as_save_IFS
7669
7670  ;;
7671esac
7672fi
7673LN=$ac_cv_path_LN
7674if test -n "$LN"; then
7675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7676$as_echo "$LN" >&6; }
7677else
7678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7679$as_echo "no" >&6; }
7680fi
7681
7682
7683  test -n "$LN" && break
7684done
7685
7686    else
7687      # If it succeeded, then it was overridden by the user. We will use it
7688      # for the tool.
7689
7690      # First remove it from the list of overridden variables, so we can test
7691      # for unknown variables in the end.
7692      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7693
7694      # Check if the provided tool contains a complete path.
7695      tool_specified="$LN"
7696      tool_basename="${tool_specified##*/}"
7697      if test "x$tool_basename" = "x$tool_specified"; then
7698        # A command without a complete path is provided, search $PATH.
7699        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7700$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7701        # Extract the first word of "$tool_basename", so it can be a program name with args.
7702set dummy $tool_basename; ac_word=$2
7703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7704$as_echo_n "checking for $ac_word... " >&6; }
7705if ${ac_cv_path_LN+:} false; then :
7706  $as_echo_n "(cached) " >&6
7707else
7708  case $LN in
7709  [\\/]* | ?:[\\/]*)
7710  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7711  ;;
7712  *)
7713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7714for as_dir in $PATH
7715do
7716  IFS=$as_save_IFS
7717  test -z "$as_dir" && as_dir=.
7718    for ac_exec_ext in '' $ac_executable_extensions; do
7719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7720    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7722    break 2
7723  fi
7724done
7725  done
7726IFS=$as_save_IFS
7727
7728  ;;
7729esac
7730fi
7731LN=$ac_cv_path_LN
7732if test -n "$LN"; then
7733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7734$as_echo "$LN" >&6; }
7735else
7736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7737$as_echo "no" >&6; }
7738fi
7739
7740
7741        if test "x$LN" = x; then
7742          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7743        fi
7744      else
7745        # Otherwise we believe it is a complete path. Use it as it is.
7746        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7747$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7748        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7749$as_echo_n "checking for LN... " >&6; }
7750        if test ! -x "$tool_specified"; then
7751          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7752$as_echo "not found" >&6; }
7753          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7754        fi
7755        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7756$as_echo "$tool_specified" >&6; }
7757      fi
7758    fi
7759  fi
7760
7761
7762
7763  if test "x$LN" = x; then
7764    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7765  fi
7766
7767
7768
7769
7770
7771  # Publish this variable in the help.
7772
7773
7774  if test "x$LS" = x; then
7775    # The variable is not set by user, try to locate tool using the code snippet
7776    for ac_prog in ls
7777do
7778  # Extract the first word of "$ac_prog", so it can be a program name with args.
7779set dummy $ac_prog; ac_word=$2
7780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7781$as_echo_n "checking for $ac_word... " >&6; }
7782if ${ac_cv_path_LS+:} false; then :
7783  $as_echo_n "(cached) " >&6
7784else
7785  case $LS in
7786  [\\/]* | ?:[\\/]*)
7787  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7788  ;;
7789  *)
7790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7791for as_dir in $PATH
7792do
7793  IFS=$as_save_IFS
7794  test -z "$as_dir" && as_dir=.
7795    for ac_exec_ext in '' $ac_executable_extensions; do
7796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7797    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7799    break 2
7800  fi
7801done
7802  done
7803IFS=$as_save_IFS
7804
7805  ;;
7806esac
7807fi
7808LS=$ac_cv_path_LS
7809if test -n "$LS"; then
7810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7811$as_echo "$LS" >&6; }
7812else
7813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7814$as_echo "no" >&6; }
7815fi
7816
7817
7818  test -n "$LS" && break
7819done
7820
7821  else
7822    # The variable is set, but is it from the command line or the environment?
7823
7824    # Try to remove the string !LS! from our list.
7825    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7826    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7827      # If it failed, the variable was not from the command line. Ignore it,
7828      # but warn the user (except for BASH, which is always set by the calling BASH).
7829      if test "xLS" != xBASH; then
7830        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7831$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7832      fi
7833      # Try to locate tool using the code snippet
7834      for ac_prog in ls
7835do
7836  # Extract the first word of "$ac_prog", so it can be a program name with args.
7837set dummy $ac_prog; ac_word=$2
7838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7839$as_echo_n "checking for $ac_word... " >&6; }
7840if ${ac_cv_path_LS+:} false; then :
7841  $as_echo_n "(cached) " >&6
7842else
7843  case $LS in
7844  [\\/]* | ?:[\\/]*)
7845  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7846  ;;
7847  *)
7848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7849for as_dir in $PATH
7850do
7851  IFS=$as_save_IFS
7852  test -z "$as_dir" && as_dir=.
7853    for ac_exec_ext in '' $ac_executable_extensions; do
7854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7855    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7857    break 2
7858  fi
7859done
7860  done
7861IFS=$as_save_IFS
7862
7863  ;;
7864esac
7865fi
7866LS=$ac_cv_path_LS
7867if test -n "$LS"; then
7868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7869$as_echo "$LS" >&6; }
7870else
7871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7872$as_echo "no" >&6; }
7873fi
7874
7875
7876  test -n "$LS" && break
7877done
7878
7879    else
7880      # If it succeeded, then it was overridden by the user. We will use it
7881      # for the tool.
7882
7883      # First remove it from the list of overridden variables, so we can test
7884      # for unknown variables in the end.
7885      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7886
7887      # Check if the provided tool contains a complete path.
7888      tool_specified="$LS"
7889      tool_basename="${tool_specified##*/}"
7890      if test "x$tool_basename" = "x$tool_specified"; then
7891        # A command without a complete path is provided, search $PATH.
7892        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7893$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7894        # Extract the first word of "$tool_basename", so it can be a program name with args.
7895set dummy $tool_basename; ac_word=$2
7896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7897$as_echo_n "checking for $ac_word... " >&6; }
7898if ${ac_cv_path_LS+:} false; then :
7899  $as_echo_n "(cached) " >&6
7900else
7901  case $LS in
7902  [\\/]* | ?:[\\/]*)
7903  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7904  ;;
7905  *)
7906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7907for as_dir in $PATH
7908do
7909  IFS=$as_save_IFS
7910  test -z "$as_dir" && as_dir=.
7911    for ac_exec_ext in '' $ac_executable_extensions; do
7912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7913    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7915    break 2
7916  fi
7917done
7918  done
7919IFS=$as_save_IFS
7920
7921  ;;
7922esac
7923fi
7924LS=$ac_cv_path_LS
7925if test -n "$LS"; then
7926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7927$as_echo "$LS" >&6; }
7928else
7929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7930$as_echo "no" >&6; }
7931fi
7932
7933
7934        if test "x$LS" = x; then
7935          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7936        fi
7937      else
7938        # Otherwise we believe it is a complete path. Use it as it is.
7939        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7940$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7941        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7942$as_echo_n "checking for LS... " >&6; }
7943        if test ! -x "$tool_specified"; then
7944          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7945$as_echo "not found" >&6; }
7946          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7947        fi
7948        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7949$as_echo "$tool_specified" >&6; }
7950      fi
7951    fi
7952  fi
7953
7954
7955
7956  if test "x$LS" = x; then
7957    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7958  fi
7959
7960
7961
7962
7963
7964  # Publish this variable in the help.
7965
7966
7967  if test "x$MKDIR" = x; then
7968    # The variable is not set by user, try to locate tool using the code snippet
7969    for ac_prog in mkdir
7970do
7971  # Extract the first word of "$ac_prog", so it can be a program name with args.
7972set dummy $ac_prog; ac_word=$2
7973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7974$as_echo_n "checking for $ac_word... " >&6; }
7975if ${ac_cv_path_MKDIR+:} false; then :
7976  $as_echo_n "(cached) " >&6
7977else
7978  case $MKDIR in
7979  [\\/]* | ?:[\\/]*)
7980  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7981  ;;
7982  *)
7983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7984for as_dir in $PATH
7985do
7986  IFS=$as_save_IFS
7987  test -z "$as_dir" && as_dir=.
7988    for ac_exec_ext in '' $ac_executable_extensions; do
7989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7990    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7992    break 2
7993  fi
7994done
7995  done
7996IFS=$as_save_IFS
7997
7998  ;;
7999esac
8000fi
8001MKDIR=$ac_cv_path_MKDIR
8002if test -n "$MKDIR"; then
8003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8004$as_echo "$MKDIR" >&6; }
8005else
8006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8007$as_echo "no" >&6; }
8008fi
8009
8010
8011  test -n "$MKDIR" && break
8012done
8013
8014  else
8015    # The variable is set, but is it from the command line or the environment?
8016
8017    # Try to remove the string !MKDIR! from our list.
8018    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8019    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8020      # If it failed, the variable was not from the command line. Ignore it,
8021      # but warn the user (except for BASH, which is always set by the calling BASH).
8022      if test "xMKDIR" != xBASH; then
8023        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8024$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8025      fi
8026      # Try to locate tool using the code snippet
8027      for ac_prog in mkdir
8028do
8029  # Extract the first word of "$ac_prog", so it can be a program name with args.
8030set dummy $ac_prog; ac_word=$2
8031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8032$as_echo_n "checking for $ac_word... " >&6; }
8033if ${ac_cv_path_MKDIR+:} false; then :
8034  $as_echo_n "(cached) " >&6
8035else
8036  case $MKDIR in
8037  [\\/]* | ?:[\\/]*)
8038  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8039  ;;
8040  *)
8041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8042for as_dir in $PATH
8043do
8044  IFS=$as_save_IFS
8045  test -z "$as_dir" && as_dir=.
8046    for ac_exec_ext in '' $ac_executable_extensions; do
8047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8048    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8050    break 2
8051  fi
8052done
8053  done
8054IFS=$as_save_IFS
8055
8056  ;;
8057esac
8058fi
8059MKDIR=$ac_cv_path_MKDIR
8060if test -n "$MKDIR"; then
8061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8062$as_echo "$MKDIR" >&6; }
8063else
8064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8065$as_echo "no" >&6; }
8066fi
8067
8068
8069  test -n "$MKDIR" && break
8070done
8071
8072    else
8073      # If it succeeded, then it was overridden by the user. We will use it
8074      # for the tool.
8075
8076      # First remove it from the list of overridden variables, so we can test
8077      # for unknown variables in the end.
8078      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8079
8080      # Check if the provided tool contains a complete path.
8081      tool_specified="$MKDIR"
8082      tool_basename="${tool_specified##*/}"
8083      if test "x$tool_basename" = "x$tool_specified"; then
8084        # A command without a complete path is provided, search $PATH.
8085        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8086$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8087        # Extract the first word of "$tool_basename", so it can be a program name with args.
8088set dummy $tool_basename; ac_word=$2
8089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8090$as_echo_n "checking for $ac_word... " >&6; }
8091if ${ac_cv_path_MKDIR+:} false; then :
8092  $as_echo_n "(cached) " >&6
8093else
8094  case $MKDIR in
8095  [\\/]* | ?:[\\/]*)
8096  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8097  ;;
8098  *)
8099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8100for as_dir in $PATH
8101do
8102  IFS=$as_save_IFS
8103  test -z "$as_dir" && as_dir=.
8104    for ac_exec_ext in '' $ac_executable_extensions; do
8105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8106    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8108    break 2
8109  fi
8110done
8111  done
8112IFS=$as_save_IFS
8113
8114  ;;
8115esac
8116fi
8117MKDIR=$ac_cv_path_MKDIR
8118if test -n "$MKDIR"; then
8119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8120$as_echo "$MKDIR" >&6; }
8121else
8122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8123$as_echo "no" >&6; }
8124fi
8125
8126
8127        if test "x$MKDIR" = x; then
8128          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8129        fi
8130      else
8131        # Otherwise we believe it is a complete path. Use it as it is.
8132        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8133$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8134        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8135$as_echo_n "checking for MKDIR... " >&6; }
8136        if test ! -x "$tool_specified"; then
8137          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8138$as_echo "not found" >&6; }
8139          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8140        fi
8141        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8142$as_echo "$tool_specified" >&6; }
8143      fi
8144    fi
8145  fi
8146
8147
8148
8149  if test "x$MKDIR" = x; then
8150    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8151  fi
8152
8153
8154
8155
8156
8157  # Publish this variable in the help.
8158
8159
8160  if test "x$MKTEMP" = x; then
8161    # The variable is not set by user, try to locate tool using the code snippet
8162    for ac_prog in mktemp
8163do
8164  # Extract the first word of "$ac_prog", so it can be a program name with args.
8165set dummy $ac_prog; ac_word=$2
8166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8167$as_echo_n "checking for $ac_word... " >&6; }
8168if ${ac_cv_path_MKTEMP+:} false; then :
8169  $as_echo_n "(cached) " >&6
8170else
8171  case $MKTEMP in
8172  [\\/]* | ?:[\\/]*)
8173  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8174  ;;
8175  *)
8176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8177for as_dir in $PATH
8178do
8179  IFS=$as_save_IFS
8180  test -z "$as_dir" && as_dir=.
8181    for ac_exec_ext in '' $ac_executable_extensions; do
8182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8183    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8185    break 2
8186  fi
8187done
8188  done
8189IFS=$as_save_IFS
8190
8191  ;;
8192esac
8193fi
8194MKTEMP=$ac_cv_path_MKTEMP
8195if test -n "$MKTEMP"; then
8196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8197$as_echo "$MKTEMP" >&6; }
8198else
8199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8200$as_echo "no" >&6; }
8201fi
8202
8203
8204  test -n "$MKTEMP" && break
8205done
8206
8207  else
8208    # The variable is set, but is it from the command line or the environment?
8209
8210    # Try to remove the string !MKTEMP! from our list.
8211    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8212    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8213      # If it failed, the variable was not from the command line. Ignore it,
8214      # but warn the user (except for BASH, which is always set by the calling BASH).
8215      if test "xMKTEMP" != xBASH; then
8216        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8217$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8218      fi
8219      # Try to locate tool using the code snippet
8220      for ac_prog in mktemp
8221do
8222  # Extract the first word of "$ac_prog", so it can be a program name with args.
8223set dummy $ac_prog; ac_word=$2
8224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8225$as_echo_n "checking for $ac_word... " >&6; }
8226if ${ac_cv_path_MKTEMP+:} false; then :
8227  $as_echo_n "(cached) " >&6
8228else
8229  case $MKTEMP in
8230  [\\/]* | ?:[\\/]*)
8231  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8232  ;;
8233  *)
8234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8235for as_dir in $PATH
8236do
8237  IFS=$as_save_IFS
8238  test -z "$as_dir" && as_dir=.
8239    for ac_exec_ext in '' $ac_executable_extensions; do
8240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8241    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8243    break 2
8244  fi
8245done
8246  done
8247IFS=$as_save_IFS
8248
8249  ;;
8250esac
8251fi
8252MKTEMP=$ac_cv_path_MKTEMP
8253if test -n "$MKTEMP"; then
8254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8255$as_echo "$MKTEMP" >&6; }
8256else
8257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8258$as_echo "no" >&6; }
8259fi
8260
8261
8262  test -n "$MKTEMP" && break
8263done
8264
8265    else
8266      # If it succeeded, then it was overridden by the user. We will use it
8267      # for the tool.
8268
8269      # First remove it from the list of overridden variables, so we can test
8270      # for unknown variables in the end.
8271      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8272
8273      # Check if the provided tool contains a complete path.
8274      tool_specified="$MKTEMP"
8275      tool_basename="${tool_specified##*/}"
8276      if test "x$tool_basename" = "x$tool_specified"; then
8277        # A command without a complete path is provided, search $PATH.
8278        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8279$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8280        # Extract the first word of "$tool_basename", so it can be a program name with args.
8281set dummy $tool_basename; ac_word=$2
8282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8283$as_echo_n "checking for $ac_word... " >&6; }
8284if ${ac_cv_path_MKTEMP+:} false; then :
8285  $as_echo_n "(cached) " >&6
8286else
8287  case $MKTEMP in
8288  [\\/]* | ?:[\\/]*)
8289  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8290  ;;
8291  *)
8292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8293for as_dir in $PATH
8294do
8295  IFS=$as_save_IFS
8296  test -z "$as_dir" && as_dir=.
8297    for ac_exec_ext in '' $ac_executable_extensions; do
8298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8299    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8301    break 2
8302  fi
8303done
8304  done
8305IFS=$as_save_IFS
8306
8307  ;;
8308esac
8309fi
8310MKTEMP=$ac_cv_path_MKTEMP
8311if test -n "$MKTEMP"; then
8312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8313$as_echo "$MKTEMP" >&6; }
8314else
8315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8316$as_echo "no" >&6; }
8317fi
8318
8319
8320        if test "x$MKTEMP" = x; then
8321          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8322        fi
8323      else
8324        # Otherwise we believe it is a complete path. Use it as it is.
8325        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8326$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8327        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8328$as_echo_n "checking for MKTEMP... " >&6; }
8329        if test ! -x "$tool_specified"; then
8330          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8331$as_echo "not found" >&6; }
8332          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8333        fi
8334        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8335$as_echo "$tool_specified" >&6; }
8336      fi
8337    fi
8338  fi
8339
8340
8341
8342  if test "x$MKTEMP" = x; then
8343    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8344  fi
8345
8346
8347
8348
8349
8350  # Publish this variable in the help.
8351
8352
8353  if test "x$MV" = x; then
8354    # The variable is not set by user, try to locate tool using the code snippet
8355    for ac_prog in mv
8356do
8357  # Extract the first word of "$ac_prog", so it can be a program name with args.
8358set dummy $ac_prog; ac_word=$2
8359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8360$as_echo_n "checking for $ac_word... " >&6; }
8361if ${ac_cv_path_MV+:} false; then :
8362  $as_echo_n "(cached) " >&6
8363else
8364  case $MV in
8365  [\\/]* | ?:[\\/]*)
8366  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8367  ;;
8368  *)
8369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8370for as_dir in $PATH
8371do
8372  IFS=$as_save_IFS
8373  test -z "$as_dir" && as_dir=.
8374    for ac_exec_ext in '' $ac_executable_extensions; do
8375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8376    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8378    break 2
8379  fi
8380done
8381  done
8382IFS=$as_save_IFS
8383
8384  ;;
8385esac
8386fi
8387MV=$ac_cv_path_MV
8388if test -n "$MV"; then
8389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8390$as_echo "$MV" >&6; }
8391else
8392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8393$as_echo "no" >&6; }
8394fi
8395
8396
8397  test -n "$MV" && break
8398done
8399
8400  else
8401    # The variable is set, but is it from the command line or the environment?
8402
8403    # Try to remove the string !MV! from our list.
8404    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8405    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8406      # If it failed, the variable was not from the command line. Ignore it,
8407      # but warn the user (except for BASH, which is always set by the calling BASH).
8408      if test "xMV" != xBASH; then
8409        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8410$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8411      fi
8412      # Try to locate tool using the code snippet
8413      for ac_prog in mv
8414do
8415  # Extract the first word of "$ac_prog", so it can be a program name with args.
8416set dummy $ac_prog; ac_word=$2
8417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8418$as_echo_n "checking for $ac_word... " >&6; }
8419if ${ac_cv_path_MV+:} false; then :
8420  $as_echo_n "(cached) " >&6
8421else
8422  case $MV in
8423  [\\/]* | ?:[\\/]*)
8424  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8425  ;;
8426  *)
8427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8428for as_dir in $PATH
8429do
8430  IFS=$as_save_IFS
8431  test -z "$as_dir" && as_dir=.
8432    for ac_exec_ext in '' $ac_executable_extensions; do
8433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8434    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8436    break 2
8437  fi
8438done
8439  done
8440IFS=$as_save_IFS
8441
8442  ;;
8443esac
8444fi
8445MV=$ac_cv_path_MV
8446if test -n "$MV"; then
8447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8448$as_echo "$MV" >&6; }
8449else
8450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8451$as_echo "no" >&6; }
8452fi
8453
8454
8455  test -n "$MV" && break
8456done
8457
8458    else
8459      # If it succeeded, then it was overridden by the user. We will use it
8460      # for the tool.
8461
8462      # First remove it from the list of overridden variables, so we can test
8463      # for unknown variables in the end.
8464      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8465
8466      # Check if the provided tool contains a complete path.
8467      tool_specified="$MV"
8468      tool_basename="${tool_specified##*/}"
8469      if test "x$tool_basename" = "x$tool_specified"; then
8470        # A command without a complete path is provided, search $PATH.
8471        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8472$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8473        # Extract the first word of "$tool_basename", so it can be a program name with args.
8474set dummy $tool_basename; ac_word=$2
8475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8476$as_echo_n "checking for $ac_word... " >&6; }
8477if ${ac_cv_path_MV+:} false; then :
8478  $as_echo_n "(cached) " >&6
8479else
8480  case $MV in
8481  [\\/]* | ?:[\\/]*)
8482  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8483  ;;
8484  *)
8485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8486for as_dir in $PATH
8487do
8488  IFS=$as_save_IFS
8489  test -z "$as_dir" && as_dir=.
8490    for ac_exec_ext in '' $ac_executable_extensions; do
8491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8492    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8494    break 2
8495  fi
8496done
8497  done
8498IFS=$as_save_IFS
8499
8500  ;;
8501esac
8502fi
8503MV=$ac_cv_path_MV
8504if test -n "$MV"; then
8505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8506$as_echo "$MV" >&6; }
8507else
8508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8509$as_echo "no" >&6; }
8510fi
8511
8512
8513        if test "x$MV" = x; then
8514          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8515        fi
8516      else
8517        # Otherwise we believe it is a complete path. Use it as it is.
8518        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8519$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8520        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8521$as_echo_n "checking for MV... " >&6; }
8522        if test ! -x "$tool_specified"; then
8523          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8524$as_echo "not found" >&6; }
8525          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8526        fi
8527        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8528$as_echo "$tool_specified" >&6; }
8529      fi
8530    fi
8531  fi
8532
8533
8534
8535  if test "x$MV" = x; then
8536    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8537  fi
8538
8539
8540
8541
8542
8543  # Publish this variable in the help.
8544
8545
8546  if test "x$NAWK" = x; then
8547    # The variable is not set by user, try to locate tool using the code snippet
8548    for ac_prog in nawk gawk awk
8549do
8550  # Extract the first word of "$ac_prog", so it can be a program name with args.
8551set dummy $ac_prog; ac_word=$2
8552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8553$as_echo_n "checking for $ac_word... " >&6; }
8554if ${ac_cv_path_NAWK+:} false; then :
8555  $as_echo_n "(cached) " >&6
8556else
8557  case $NAWK in
8558  [\\/]* | ?:[\\/]*)
8559  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8560  ;;
8561  *)
8562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8563for as_dir in $PATH
8564do
8565  IFS=$as_save_IFS
8566  test -z "$as_dir" && as_dir=.
8567    for ac_exec_ext in '' $ac_executable_extensions; do
8568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8569    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8571    break 2
8572  fi
8573done
8574  done
8575IFS=$as_save_IFS
8576
8577  ;;
8578esac
8579fi
8580NAWK=$ac_cv_path_NAWK
8581if test -n "$NAWK"; then
8582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8583$as_echo "$NAWK" >&6; }
8584else
8585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8586$as_echo "no" >&6; }
8587fi
8588
8589
8590  test -n "$NAWK" && break
8591done
8592
8593  else
8594    # The variable is set, but is it from the command line or the environment?
8595
8596    # Try to remove the string !NAWK! from our list.
8597    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8598    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8599      # If it failed, the variable was not from the command line. Ignore it,
8600      # but warn the user (except for BASH, which is always set by the calling BASH).
8601      if test "xNAWK" != xBASH; then
8602        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8603$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8604      fi
8605      # Try to locate tool using the code snippet
8606      for ac_prog in nawk gawk awk
8607do
8608  # Extract the first word of "$ac_prog", so it can be a program name with args.
8609set dummy $ac_prog; ac_word=$2
8610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8611$as_echo_n "checking for $ac_word... " >&6; }
8612if ${ac_cv_path_NAWK+:} false; then :
8613  $as_echo_n "(cached) " >&6
8614else
8615  case $NAWK in
8616  [\\/]* | ?:[\\/]*)
8617  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8618  ;;
8619  *)
8620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8621for as_dir in $PATH
8622do
8623  IFS=$as_save_IFS
8624  test -z "$as_dir" && as_dir=.
8625    for ac_exec_ext in '' $ac_executable_extensions; do
8626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8627    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8629    break 2
8630  fi
8631done
8632  done
8633IFS=$as_save_IFS
8634
8635  ;;
8636esac
8637fi
8638NAWK=$ac_cv_path_NAWK
8639if test -n "$NAWK"; then
8640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8641$as_echo "$NAWK" >&6; }
8642else
8643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8644$as_echo "no" >&6; }
8645fi
8646
8647
8648  test -n "$NAWK" && break
8649done
8650
8651    else
8652      # If it succeeded, then it was overridden by the user. We will use it
8653      # for the tool.
8654
8655      # First remove it from the list of overridden variables, so we can test
8656      # for unknown variables in the end.
8657      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8658
8659      # Check if the provided tool contains a complete path.
8660      tool_specified="$NAWK"
8661      tool_basename="${tool_specified##*/}"
8662      if test "x$tool_basename" = "x$tool_specified"; then
8663        # A command without a complete path is provided, search $PATH.
8664        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8665$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8666        # Extract the first word of "$tool_basename", so it can be a program name with args.
8667set dummy $tool_basename; ac_word=$2
8668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8669$as_echo_n "checking for $ac_word... " >&6; }
8670if ${ac_cv_path_NAWK+:} false; then :
8671  $as_echo_n "(cached) " >&6
8672else
8673  case $NAWK in
8674  [\\/]* | ?:[\\/]*)
8675  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8676  ;;
8677  *)
8678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8679for as_dir in $PATH
8680do
8681  IFS=$as_save_IFS
8682  test -z "$as_dir" && as_dir=.
8683    for ac_exec_ext in '' $ac_executable_extensions; do
8684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8685    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8687    break 2
8688  fi
8689done
8690  done
8691IFS=$as_save_IFS
8692
8693  ;;
8694esac
8695fi
8696NAWK=$ac_cv_path_NAWK
8697if test -n "$NAWK"; then
8698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8699$as_echo "$NAWK" >&6; }
8700else
8701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8702$as_echo "no" >&6; }
8703fi
8704
8705
8706        if test "x$NAWK" = x; then
8707          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8708        fi
8709      else
8710        # Otherwise we believe it is a complete path. Use it as it is.
8711        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8712$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8713        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8714$as_echo_n "checking for NAWK... " >&6; }
8715        if test ! -x "$tool_specified"; then
8716          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8717$as_echo "not found" >&6; }
8718          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8719        fi
8720        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8721$as_echo "$tool_specified" >&6; }
8722      fi
8723    fi
8724  fi
8725
8726
8727
8728  if test "x$NAWK" = x; then
8729    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8730  fi
8731
8732
8733
8734
8735
8736  # Publish this variable in the help.
8737
8738
8739  if test "x$PRINTF" = x; then
8740    # The variable is not set by user, try to locate tool using the code snippet
8741    for ac_prog in printf
8742do
8743  # Extract the first word of "$ac_prog", so it can be a program name with args.
8744set dummy $ac_prog; ac_word=$2
8745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8746$as_echo_n "checking for $ac_word... " >&6; }
8747if ${ac_cv_path_PRINTF+:} false; then :
8748  $as_echo_n "(cached) " >&6
8749else
8750  case $PRINTF in
8751  [\\/]* | ?:[\\/]*)
8752  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8753  ;;
8754  *)
8755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8756for as_dir in $PATH
8757do
8758  IFS=$as_save_IFS
8759  test -z "$as_dir" && as_dir=.
8760    for ac_exec_ext in '' $ac_executable_extensions; do
8761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8762    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8764    break 2
8765  fi
8766done
8767  done
8768IFS=$as_save_IFS
8769
8770  ;;
8771esac
8772fi
8773PRINTF=$ac_cv_path_PRINTF
8774if test -n "$PRINTF"; then
8775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8776$as_echo "$PRINTF" >&6; }
8777else
8778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8779$as_echo "no" >&6; }
8780fi
8781
8782
8783  test -n "$PRINTF" && break
8784done
8785
8786  else
8787    # The variable is set, but is it from the command line or the environment?
8788
8789    # Try to remove the string !PRINTF! from our list.
8790    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8791    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8792      # If it failed, the variable was not from the command line. Ignore it,
8793      # but warn the user (except for BASH, which is always set by the calling BASH).
8794      if test "xPRINTF" != xBASH; then
8795        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8796$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8797      fi
8798      # Try to locate tool using the code snippet
8799      for ac_prog in printf
8800do
8801  # Extract the first word of "$ac_prog", so it can be a program name with args.
8802set dummy $ac_prog; ac_word=$2
8803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8804$as_echo_n "checking for $ac_word... " >&6; }
8805if ${ac_cv_path_PRINTF+:} false; then :
8806  $as_echo_n "(cached) " >&6
8807else
8808  case $PRINTF in
8809  [\\/]* | ?:[\\/]*)
8810  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8811  ;;
8812  *)
8813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8814for as_dir in $PATH
8815do
8816  IFS=$as_save_IFS
8817  test -z "$as_dir" && as_dir=.
8818    for ac_exec_ext in '' $ac_executable_extensions; do
8819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8820    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8822    break 2
8823  fi
8824done
8825  done
8826IFS=$as_save_IFS
8827
8828  ;;
8829esac
8830fi
8831PRINTF=$ac_cv_path_PRINTF
8832if test -n "$PRINTF"; then
8833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8834$as_echo "$PRINTF" >&6; }
8835else
8836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8837$as_echo "no" >&6; }
8838fi
8839
8840
8841  test -n "$PRINTF" && break
8842done
8843
8844    else
8845      # If it succeeded, then it was overridden by the user. We will use it
8846      # for the tool.
8847
8848      # First remove it from the list of overridden variables, so we can test
8849      # for unknown variables in the end.
8850      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8851
8852      # Check if the provided tool contains a complete path.
8853      tool_specified="$PRINTF"
8854      tool_basename="${tool_specified##*/}"
8855      if test "x$tool_basename" = "x$tool_specified"; then
8856        # A command without a complete path is provided, search $PATH.
8857        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8858$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8859        # Extract the first word of "$tool_basename", so it can be a program name with args.
8860set dummy $tool_basename; ac_word=$2
8861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8862$as_echo_n "checking for $ac_word... " >&6; }
8863if ${ac_cv_path_PRINTF+:} false; then :
8864  $as_echo_n "(cached) " >&6
8865else
8866  case $PRINTF in
8867  [\\/]* | ?:[\\/]*)
8868  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8869  ;;
8870  *)
8871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8872for as_dir in $PATH
8873do
8874  IFS=$as_save_IFS
8875  test -z "$as_dir" && as_dir=.
8876    for ac_exec_ext in '' $ac_executable_extensions; do
8877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8878    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8880    break 2
8881  fi
8882done
8883  done
8884IFS=$as_save_IFS
8885
8886  ;;
8887esac
8888fi
8889PRINTF=$ac_cv_path_PRINTF
8890if test -n "$PRINTF"; then
8891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8892$as_echo "$PRINTF" >&6; }
8893else
8894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8895$as_echo "no" >&6; }
8896fi
8897
8898
8899        if test "x$PRINTF" = x; then
8900          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8901        fi
8902      else
8903        # Otherwise we believe it is a complete path. Use it as it is.
8904        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8905$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8906        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8907$as_echo_n "checking for PRINTF... " >&6; }
8908        if test ! -x "$tool_specified"; then
8909          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8910$as_echo "not found" >&6; }
8911          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8912        fi
8913        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8914$as_echo "$tool_specified" >&6; }
8915      fi
8916    fi
8917  fi
8918
8919
8920
8921  if test "x$PRINTF" = x; then
8922    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8923  fi
8924
8925
8926
8927
8928
8929  # Publish this variable in the help.
8930
8931
8932  if test "x$RM" = x; then
8933    # The variable is not set by user, try to locate tool using the code snippet
8934    for ac_prog in rm
8935do
8936  # Extract the first word of "$ac_prog", so it can be a program name with args.
8937set dummy $ac_prog; ac_word=$2
8938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8939$as_echo_n "checking for $ac_word... " >&6; }
8940if ${ac_cv_path_RM+:} false; then :
8941  $as_echo_n "(cached) " >&6
8942else
8943  case $RM in
8944  [\\/]* | ?:[\\/]*)
8945  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8946  ;;
8947  *)
8948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8949for as_dir in $PATH
8950do
8951  IFS=$as_save_IFS
8952  test -z "$as_dir" && as_dir=.
8953    for ac_exec_ext in '' $ac_executable_extensions; do
8954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8955    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8957    break 2
8958  fi
8959done
8960  done
8961IFS=$as_save_IFS
8962
8963  ;;
8964esac
8965fi
8966RM=$ac_cv_path_RM
8967if test -n "$RM"; then
8968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8969$as_echo "$RM" >&6; }
8970else
8971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8972$as_echo "no" >&6; }
8973fi
8974
8975
8976  test -n "$RM" && break
8977done
8978
8979  else
8980    # The variable is set, but is it from the command line or the environment?
8981
8982    # Try to remove the string !RM! from our list.
8983    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8984    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8985      # If it failed, the variable was not from the command line. Ignore it,
8986      # but warn the user (except for BASH, which is always set by the calling BASH).
8987      if test "xRM" != xBASH; then
8988        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8989$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8990      fi
8991      # Try to locate tool using the code snippet
8992      for ac_prog in rm
8993do
8994  # Extract the first word of "$ac_prog", so it can be a program name with args.
8995set dummy $ac_prog; ac_word=$2
8996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8997$as_echo_n "checking for $ac_word... " >&6; }
8998if ${ac_cv_path_RM+:} false; then :
8999  $as_echo_n "(cached) " >&6
9000else
9001  case $RM in
9002  [\\/]* | ?:[\\/]*)
9003  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9004  ;;
9005  *)
9006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9007for as_dir in $PATH
9008do
9009  IFS=$as_save_IFS
9010  test -z "$as_dir" && as_dir=.
9011    for ac_exec_ext in '' $ac_executable_extensions; do
9012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9013    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9015    break 2
9016  fi
9017done
9018  done
9019IFS=$as_save_IFS
9020
9021  ;;
9022esac
9023fi
9024RM=$ac_cv_path_RM
9025if test -n "$RM"; then
9026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9027$as_echo "$RM" >&6; }
9028else
9029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9030$as_echo "no" >&6; }
9031fi
9032
9033
9034  test -n "$RM" && break
9035done
9036
9037    else
9038      # If it succeeded, then it was overridden by the user. We will use it
9039      # for the tool.
9040
9041      # First remove it from the list of overridden variables, so we can test
9042      # for unknown variables in the end.
9043      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9044
9045      # Check if the provided tool contains a complete path.
9046      tool_specified="$RM"
9047      tool_basename="${tool_specified##*/}"
9048      if test "x$tool_basename" = "x$tool_specified"; then
9049        # A command without a complete path is provided, search $PATH.
9050        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9051$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9052        # Extract the first word of "$tool_basename", so it can be a program name with args.
9053set dummy $tool_basename; ac_word=$2
9054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9055$as_echo_n "checking for $ac_word... " >&6; }
9056if ${ac_cv_path_RM+:} false; then :
9057  $as_echo_n "(cached) " >&6
9058else
9059  case $RM in
9060  [\\/]* | ?:[\\/]*)
9061  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9062  ;;
9063  *)
9064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9065for as_dir in $PATH
9066do
9067  IFS=$as_save_IFS
9068  test -z "$as_dir" && as_dir=.
9069    for ac_exec_ext in '' $ac_executable_extensions; do
9070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9071    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9073    break 2
9074  fi
9075done
9076  done
9077IFS=$as_save_IFS
9078
9079  ;;
9080esac
9081fi
9082RM=$ac_cv_path_RM
9083if test -n "$RM"; then
9084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9085$as_echo "$RM" >&6; }
9086else
9087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9088$as_echo "no" >&6; }
9089fi
9090
9091
9092        if test "x$RM" = x; then
9093          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9094        fi
9095      else
9096        # Otherwise we believe it is a complete path. Use it as it is.
9097        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9098$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9099        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9100$as_echo_n "checking for RM... " >&6; }
9101        if test ! -x "$tool_specified"; then
9102          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9103$as_echo "not found" >&6; }
9104          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9105        fi
9106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9107$as_echo "$tool_specified" >&6; }
9108      fi
9109    fi
9110  fi
9111
9112
9113
9114  if test "x$RM" = x; then
9115    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9116  fi
9117
9118
9119
9120
9121
9122  # Publish this variable in the help.
9123
9124
9125  if test "x$SH" = x; then
9126    # The variable is not set by user, try to locate tool using the code snippet
9127    for ac_prog in sh
9128do
9129  # Extract the first word of "$ac_prog", so it can be a program name with args.
9130set dummy $ac_prog; ac_word=$2
9131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9132$as_echo_n "checking for $ac_word... " >&6; }
9133if ${ac_cv_path_SH+:} false; then :
9134  $as_echo_n "(cached) " >&6
9135else
9136  case $SH in
9137  [\\/]* | ?:[\\/]*)
9138  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9139  ;;
9140  *)
9141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9142for as_dir in $PATH
9143do
9144  IFS=$as_save_IFS
9145  test -z "$as_dir" && as_dir=.
9146    for ac_exec_ext in '' $ac_executable_extensions; do
9147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9148    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9150    break 2
9151  fi
9152done
9153  done
9154IFS=$as_save_IFS
9155
9156  ;;
9157esac
9158fi
9159SH=$ac_cv_path_SH
9160if test -n "$SH"; then
9161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9162$as_echo "$SH" >&6; }
9163else
9164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9165$as_echo "no" >&6; }
9166fi
9167
9168
9169  test -n "$SH" && break
9170done
9171
9172  else
9173    # The variable is set, but is it from the command line or the environment?
9174
9175    # Try to remove the string !SH! from our list.
9176    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9177    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9178      # If it failed, the variable was not from the command line. Ignore it,
9179      # but warn the user (except for BASH, which is always set by the calling BASH).
9180      if test "xSH" != xBASH; then
9181        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9182$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9183      fi
9184      # Try to locate tool using the code snippet
9185      for ac_prog in sh
9186do
9187  # Extract the first word of "$ac_prog", so it can be a program name with args.
9188set dummy $ac_prog; ac_word=$2
9189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9190$as_echo_n "checking for $ac_word... " >&6; }
9191if ${ac_cv_path_SH+:} false; then :
9192  $as_echo_n "(cached) " >&6
9193else
9194  case $SH in
9195  [\\/]* | ?:[\\/]*)
9196  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9197  ;;
9198  *)
9199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9200for as_dir in $PATH
9201do
9202  IFS=$as_save_IFS
9203  test -z "$as_dir" && as_dir=.
9204    for ac_exec_ext in '' $ac_executable_extensions; do
9205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9206    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9208    break 2
9209  fi
9210done
9211  done
9212IFS=$as_save_IFS
9213
9214  ;;
9215esac
9216fi
9217SH=$ac_cv_path_SH
9218if test -n "$SH"; then
9219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9220$as_echo "$SH" >&6; }
9221else
9222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9223$as_echo "no" >&6; }
9224fi
9225
9226
9227  test -n "$SH" && break
9228done
9229
9230    else
9231      # If it succeeded, then it was overridden by the user. We will use it
9232      # for the tool.
9233
9234      # First remove it from the list of overridden variables, so we can test
9235      # for unknown variables in the end.
9236      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9237
9238      # Check if the provided tool contains a complete path.
9239      tool_specified="$SH"
9240      tool_basename="${tool_specified##*/}"
9241      if test "x$tool_basename" = "x$tool_specified"; then
9242        # A command without a complete path is provided, search $PATH.
9243        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9244$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9245        # Extract the first word of "$tool_basename", so it can be a program name with args.
9246set dummy $tool_basename; ac_word=$2
9247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9248$as_echo_n "checking for $ac_word... " >&6; }
9249if ${ac_cv_path_SH+:} false; then :
9250  $as_echo_n "(cached) " >&6
9251else
9252  case $SH in
9253  [\\/]* | ?:[\\/]*)
9254  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9255  ;;
9256  *)
9257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9258for as_dir in $PATH
9259do
9260  IFS=$as_save_IFS
9261  test -z "$as_dir" && as_dir=.
9262    for ac_exec_ext in '' $ac_executable_extensions; do
9263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9264    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9266    break 2
9267  fi
9268done
9269  done
9270IFS=$as_save_IFS
9271
9272  ;;
9273esac
9274fi
9275SH=$ac_cv_path_SH
9276if test -n "$SH"; then
9277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9278$as_echo "$SH" >&6; }
9279else
9280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9281$as_echo "no" >&6; }
9282fi
9283
9284
9285        if test "x$SH" = x; then
9286          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9287        fi
9288      else
9289        # Otherwise we believe it is a complete path. Use it as it is.
9290        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9291$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9292        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9293$as_echo_n "checking for SH... " >&6; }
9294        if test ! -x "$tool_specified"; then
9295          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9296$as_echo "not found" >&6; }
9297          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9298        fi
9299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9300$as_echo "$tool_specified" >&6; }
9301      fi
9302    fi
9303  fi
9304
9305
9306
9307  if test "x$SH" = x; then
9308    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9309  fi
9310
9311
9312
9313
9314
9315  # Publish this variable in the help.
9316
9317
9318  if test "x$SORT" = x; then
9319    # The variable is not set by user, try to locate tool using the code snippet
9320    for ac_prog in sort
9321do
9322  # Extract the first word of "$ac_prog", so it can be a program name with args.
9323set dummy $ac_prog; ac_word=$2
9324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9325$as_echo_n "checking for $ac_word... " >&6; }
9326if ${ac_cv_path_SORT+:} false; then :
9327  $as_echo_n "(cached) " >&6
9328else
9329  case $SORT in
9330  [\\/]* | ?:[\\/]*)
9331  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9332  ;;
9333  *)
9334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9335for as_dir in $PATH
9336do
9337  IFS=$as_save_IFS
9338  test -z "$as_dir" && as_dir=.
9339    for ac_exec_ext in '' $ac_executable_extensions; do
9340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9341    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9343    break 2
9344  fi
9345done
9346  done
9347IFS=$as_save_IFS
9348
9349  ;;
9350esac
9351fi
9352SORT=$ac_cv_path_SORT
9353if test -n "$SORT"; then
9354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9355$as_echo "$SORT" >&6; }
9356else
9357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9358$as_echo "no" >&6; }
9359fi
9360
9361
9362  test -n "$SORT" && break
9363done
9364
9365  else
9366    # The variable is set, but is it from the command line or the environment?
9367
9368    # Try to remove the string !SORT! from our list.
9369    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9370    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9371      # If it failed, the variable was not from the command line. Ignore it,
9372      # but warn the user (except for BASH, which is always set by the calling BASH).
9373      if test "xSORT" != xBASH; then
9374        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9375$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9376      fi
9377      # Try to locate tool using the code snippet
9378      for ac_prog in sort
9379do
9380  # Extract the first word of "$ac_prog", so it can be a program name with args.
9381set dummy $ac_prog; ac_word=$2
9382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9383$as_echo_n "checking for $ac_word... " >&6; }
9384if ${ac_cv_path_SORT+:} false; then :
9385  $as_echo_n "(cached) " >&6
9386else
9387  case $SORT in
9388  [\\/]* | ?:[\\/]*)
9389  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9390  ;;
9391  *)
9392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9393for as_dir in $PATH
9394do
9395  IFS=$as_save_IFS
9396  test -z "$as_dir" && as_dir=.
9397    for ac_exec_ext in '' $ac_executable_extensions; do
9398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9399    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9401    break 2
9402  fi
9403done
9404  done
9405IFS=$as_save_IFS
9406
9407  ;;
9408esac
9409fi
9410SORT=$ac_cv_path_SORT
9411if test -n "$SORT"; then
9412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9413$as_echo "$SORT" >&6; }
9414else
9415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9416$as_echo "no" >&6; }
9417fi
9418
9419
9420  test -n "$SORT" && break
9421done
9422
9423    else
9424      # If it succeeded, then it was overridden by the user. We will use it
9425      # for the tool.
9426
9427      # First remove it from the list of overridden variables, so we can test
9428      # for unknown variables in the end.
9429      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9430
9431      # Check if the provided tool contains a complete path.
9432      tool_specified="$SORT"
9433      tool_basename="${tool_specified##*/}"
9434      if test "x$tool_basename" = "x$tool_specified"; then
9435        # A command without a complete path is provided, search $PATH.
9436        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9437$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9438        # Extract the first word of "$tool_basename", so it can be a program name with args.
9439set dummy $tool_basename; ac_word=$2
9440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9441$as_echo_n "checking for $ac_word... " >&6; }
9442if ${ac_cv_path_SORT+:} false; then :
9443  $as_echo_n "(cached) " >&6
9444else
9445  case $SORT in
9446  [\\/]* | ?:[\\/]*)
9447  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9448  ;;
9449  *)
9450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9451for as_dir in $PATH
9452do
9453  IFS=$as_save_IFS
9454  test -z "$as_dir" && as_dir=.
9455    for ac_exec_ext in '' $ac_executable_extensions; do
9456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9457    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9459    break 2
9460  fi
9461done
9462  done
9463IFS=$as_save_IFS
9464
9465  ;;
9466esac
9467fi
9468SORT=$ac_cv_path_SORT
9469if test -n "$SORT"; then
9470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9471$as_echo "$SORT" >&6; }
9472else
9473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9474$as_echo "no" >&6; }
9475fi
9476
9477
9478        if test "x$SORT" = x; then
9479          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9480        fi
9481      else
9482        # Otherwise we believe it is a complete path. Use it as it is.
9483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9484$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9485        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9486$as_echo_n "checking for SORT... " >&6; }
9487        if test ! -x "$tool_specified"; then
9488          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9489$as_echo "not found" >&6; }
9490          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9491        fi
9492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9493$as_echo "$tool_specified" >&6; }
9494      fi
9495    fi
9496  fi
9497
9498
9499
9500  if test "x$SORT" = x; then
9501    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9502  fi
9503
9504
9505
9506
9507
9508  # Publish this variable in the help.
9509
9510
9511  if test "x$TAIL" = x; then
9512    # The variable is not set by user, try to locate tool using the code snippet
9513    for ac_prog in tail
9514do
9515  # Extract the first word of "$ac_prog", so it can be a program name with args.
9516set dummy $ac_prog; ac_word=$2
9517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9518$as_echo_n "checking for $ac_word... " >&6; }
9519if ${ac_cv_path_TAIL+:} false; then :
9520  $as_echo_n "(cached) " >&6
9521else
9522  case $TAIL in
9523  [\\/]* | ?:[\\/]*)
9524  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9525  ;;
9526  *)
9527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9528for as_dir in $PATH
9529do
9530  IFS=$as_save_IFS
9531  test -z "$as_dir" && as_dir=.
9532    for ac_exec_ext in '' $ac_executable_extensions; do
9533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9534    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9536    break 2
9537  fi
9538done
9539  done
9540IFS=$as_save_IFS
9541
9542  ;;
9543esac
9544fi
9545TAIL=$ac_cv_path_TAIL
9546if test -n "$TAIL"; then
9547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9548$as_echo "$TAIL" >&6; }
9549else
9550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9551$as_echo "no" >&6; }
9552fi
9553
9554
9555  test -n "$TAIL" && break
9556done
9557
9558  else
9559    # The variable is set, but is it from the command line or the environment?
9560
9561    # Try to remove the string !TAIL! from our list.
9562    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9563    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9564      # If it failed, the variable was not from the command line. Ignore it,
9565      # but warn the user (except for BASH, which is always set by the calling BASH).
9566      if test "xTAIL" != xBASH; then
9567        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9568$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9569      fi
9570      # Try to locate tool using the code snippet
9571      for ac_prog in tail
9572do
9573  # Extract the first word of "$ac_prog", so it can be a program name with args.
9574set dummy $ac_prog; ac_word=$2
9575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9576$as_echo_n "checking for $ac_word... " >&6; }
9577if ${ac_cv_path_TAIL+:} false; then :
9578  $as_echo_n "(cached) " >&6
9579else
9580  case $TAIL in
9581  [\\/]* | ?:[\\/]*)
9582  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9583  ;;
9584  *)
9585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9586for as_dir in $PATH
9587do
9588  IFS=$as_save_IFS
9589  test -z "$as_dir" && as_dir=.
9590    for ac_exec_ext in '' $ac_executable_extensions; do
9591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9592    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9594    break 2
9595  fi
9596done
9597  done
9598IFS=$as_save_IFS
9599
9600  ;;
9601esac
9602fi
9603TAIL=$ac_cv_path_TAIL
9604if test -n "$TAIL"; then
9605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9606$as_echo "$TAIL" >&6; }
9607else
9608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9609$as_echo "no" >&6; }
9610fi
9611
9612
9613  test -n "$TAIL" && break
9614done
9615
9616    else
9617      # If it succeeded, then it was overridden by the user. We will use it
9618      # for the tool.
9619
9620      # First remove it from the list of overridden variables, so we can test
9621      # for unknown variables in the end.
9622      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9623
9624      # Check if the provided tool contains a complete path.
9625      tool_specified="$TAIL"
9626      tool_basename="${tool_specified##*/}"
9627      if test "x$tool_basename" = "x$tool_specified"; then
9628        # A command without a complete path is provided, search $PATH.
9629        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9630$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9631        # Extract the first word of "$tool_basename", so it can be a program name with args.
9632set dummy $tool_basename; ac_word=$2
9633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9634$as_echo_n "checking for $ac_word... " >&6; }
9635if ${ac_cv_path_TAIL+:} false; then :
9636  $as_echo_n "(cached) " >&6
9637else
9638  case $TAIL in
9639  [\\/]* | ?:[\\/]*)
9640  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9641  ;;
9642  *)
9643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9644for as_dir in $PATH
9645do
9646  IFS=$as_save_IFS
9647  test -z "$as_dir" && as_dir=.
9648    for ac_exec_ext in '' $ac_executable_extensions; do
9649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9650    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9652    break 2
9653  fi
9654done
9655  done
9656IFS=$as_save_IFS
9657
9658  ;;
9659esac
9660fi
9661TAIL=$ac_cv_path_TAIL
9662if test -n "$TAIL"; then
9663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9664$as_echo "$TAIL" >&6; }
9665else
9666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9667$as_echo "no" >&6; }
9668fi
9669
9670
9671        if test "x$TAIL" = x; then
9672          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9673        fi
9674      else
9675        # Otherwise we believe it is a complete path. Use it as it is.
9676        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9677$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9678        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9679$as_echo_n "checking for TAIL... " >&6; }
9680        if test ! -x "$tool_specified"; then
9681          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9682$as_echo "not found" >&6; }
9683          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9684        fi
9685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9686$as_echo "$tool_specified" >&6; }
9687      fi
9688    fi
9689  fi
9690
9691
9692
9693  if test "x$TAIL" = x; then
9694    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9695  fi
9696
9697
9698
9699
9700
9701  # Publish this variable in the help.
9702
9703
9704  if test "x$TAR" = x; then
9705    # The variable is not set by user, try to locate tool using the code snippet
9706    for ac_prog in tar
9707do
9708  # Extract the first word of "$ac_prog", so it can be a program name with args.
9709set dummy $ac_prog; ac_word=$2
9710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9711$as_echo_n "checking for $ac_word... " >&6; }
9712if ${ac_cv_path_TAR+:} false; then :
9713  $as_echo_n "(cached) " >&6
9714else
9715  case $TAR in
9716  [\\/]* | ?:[\\/]*)
9717  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9718  ;;
9719  *)
9720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9721for as_dir in $PATH
9722do
9723  IFS=$as_save_IFS
9724  test -z "$as_dir" && as_dir=.
9725    for ac_exec_ext in '' $ac_executable_extensions; do
9726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9727    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9729    break 2
9730  fi
9731done
9732  done
9733IFS=$as_save_IFS
9734
9735  ;;
9736esac
9737fi
9738TAR=$ac_cv_path_TAR
9739if test -n "$TAR"; then
9740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9741$as_echo "$TAR" >&6; }
9742else
9743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9744$as_echo "no" >&6; }
9745fi
9746
9747
9748  test -n "$TAR" && break
9749done
9750
9751  else
9752    # The variable is set, but is it from the command line or the environment?
9753
9754    # Try to remove the string !TAR! from our list.
9755    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9756    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9757      # If it failed, the variable was not from the command line. Ignore it,
9758      # but warn the user (except for BASH, which is always set by the calling BASH).
9759      if test "xTAR" != xBASH; then
9760        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9761$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9762      fi
9763      # Try to locate tool using the code snippet
9764      for ac_prog in tar
9765do
9766  # Extract the first word of "$ac_prog", so it can be a program name with args.
9767set dummy $ac_prog; ac_word=$2
9768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9769$as_echo_n "checking for $ac_word... " >&6; }
9770if ${ac_cv_path_TAR+:} false; then :
9771  $as_echo_n "(cached) " >&6
9772else
9773  case $TAR in
9774  [\\/]* | ?:[\\/]*)
9775  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9776  ;;
9777  *)
9778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9779for as_dir in $PATH
9780do
9781  IFS=$as_save_IFS
9782  test -z "$as_dir" && as_dir=.
9783    for ac_exec_ext in '' $ac_executable_extensions; do
9784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9785    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9787    break 2
9788  fi
9789done
9790  done
9791IFS=$as_save_IFS
9792
9793  ;;
9794esac
9795fi
9796TAR=$ac_cv_path_TAR
9797if test -n "$TAR"; then
9798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9799$as_echo "$TAR" >&6; }
9800else
9801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9802$as_echo "no" >&6; }
9803fi
9804
9805
9806  test -n "$TAR" && break
9807done
9808
9809    else
9810      # If it succeeded, then it was overridden by the user. We will use it
9811      # for the tool.
9812
9813      # First remove it from the list of overridden variables, so we can test
9814      # for unknown variables in the end.
9815      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9816
9817      # Check if the provided tool contains a complete path.
9818      tool_specified="$TAR"
9819      tool_basename="${tool_specified##*/}"
9820      if test "x$tool_basename" = "x$tool_specified"; then
9821        # A command without a complete path is provided, search $PATH.
9822        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9823$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9824        # Extract the first word of "$tool_basename", so it can be a program name with args.
9825set dummy $tool_basename; ac_word=$2
9826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9827$as_echo_n "checking for $ac_word... " >&6; }
9828if ${ac_cv_path_TAR+:} false; then :
9829  $as_echo_n "(cached) " >&6
9830else
9831  case $TAR in
9832  [\\/]* | ?:[\\/]*)
9833  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9834  ;;
9835  *)
9836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9837for as_dir in $PATH
9838do
9839  IFS=$as_save_IFS
9840  test -z "$as_dir" && as_dir=.
9841    for ac_exec_ext in '' $ac_executable_extensions; do
9842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9843    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9845    break 2
9846  fi
9847done
9848  done
9849IFS=$as_save_IFS
9850
9851  ;;
9852esac
9853fi
9854TAR=$ac_cv_path_TAR
9855if test -n "$TAR"; then
9856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9857$as_echo "$TAR" >&6; }
9858else
9859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9860$as_echo "no" >&6; }
9861fi
9862
9863
9864        if test "x$TAR" = x; then
9865          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9866        fi
9867      else
9868        # Otherwise we believe it is a complete path. Use it as it is.
9869        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9870$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9871        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9872$as_echo_n "checking for TAR... " >&6; }
9873        if test ! -x "$tool_specified"; then
9874          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9875$as_echo "not found" >&6; }
9876          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9877        fi
9878        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9879$as_echo "$tool_specified" >&6; }
9880      fi
9881    fi
9882  fi
9883
9884
9885
9886  if test "x$TAR" = x; then
9887    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9888  fi
9889
9890
9891
9892
9893
9894  # Publish this variable in the help.
9895
9896
9897  if test "x$TEE" = x; then
9898    # The variable is not set by user, try to locate tool using the code snippet
9899    for ac_prog in tee
9900do
9901  # Extract the first word of "$ac_prog", so it can be a program name with args.
9902set dummy $ac_prog; ac_word=$2
9903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9904$as_echo_n "checking for $ac_word... " >&6; }
9905if ${ac_cv_path_TEE+:} false; then :
9906  $as_echo_n "(cached) " >&6
9907else
9908  case $TEE in
9909  [\\/]* | ?:[\\/]*)
9910  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9911  ;;
9912  *)
9913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9914for as_dir in $PATH
9915do
9916  IFS=$as_save_IFS
9917  test -z "$as_dir" && as_dir=.
9918    for ac_exec_ext in '' $ac_executable_extensions; do
9919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9920    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9922    break 2
9923  fi
9924done
9925  done
9926IFS=$as_save_IFS
9927
9928  ;;
9929esac
9930fi
9931TEE=$ac_cv_path_TEE
9932if test -n "$TEE"; then
9933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9934$as_echo "$TEE" >&6; }
9935else
9936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9937$as_echo "no" >&6; }
9938fi
9939
9940
9941  test -n "$TEE" && break
9942done
9943
9944  else
9945    # The variable is set, but is it from the command line or the environment?
9946
9947    # Try to remove the string !TEE! from our list.
9948    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9949    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9950      # If it failed, the variable was not from the command line. Ignore it,
9951      # but warn the user (except for BASH, which is always set by the calling BASH).
9952      if test "xTEE" != xBASH; then
9953        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9954$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9955      fi
9956      # Try to locate tool using the code snippet
9957      for ac_prog in tee
9958do
9959  # Extract the first word of "$ac_prog", so it can be a program name with args.
9960set dummy $ac_prog; ac_word=$2
9961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9962$as_echo_n "checking for $ac_word... " >&6; }
9963if ${ac_cv_path_TEE+:} false; then :
9964  $as_echo_n "(cached) " >&6
9965else
9966  case $TEE in
9967  [\\/]* | ?:[\\/]*)
9968  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9969  ;;
9970  *)
9971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9972for as_dir in $PATH
9973do
9974  IFS=$as_save_IFS
9975  test -z "$as_dir" && as_dir=.
9976    for ac_exec_ext in '' $ac_executable_extensions; do
9977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9978    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9980    break 2
9981  fi
9982done
9983  done
9984IFS=$as_save_IFS
9985
9986  ;;
9987esac
9988fi
9989TEE=$ac_cv_path_TEE
9990if test -n "$TEE"; then
9991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9992$as_echo "$TEE" >&6; }
9993else
9994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9995$as_echo "no" >&6; }
9996fi
9997
9998
9999  test -n "$TEE" && break
10000done
10001
10002    else
10003      # If it succeeded, then it was overridden by the user. We will use it
10004      # for the tool.
10005
10006      # First remove it from the list of overridden variables, so we can test
10007      # for unknown variables in the end.
10008      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10009
10010      # Check if the provided tool contains a complete path.
10011      tool_specified="$TEE"
10012      tool_basename="${tool_specified##*/}"
10013      if test "x$tool_basename" = "x$tool_specified"; then
10014        # A command without a complete path is provided, search $PATH.
10015        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10016$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10017        # Extract the first word of "$tool_basename", so it can be a program name with args.
10018set dummy $tool_basename; ac_word=$2
10019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10020$as_echo_n "checking for $ac_word... " >&6; }
10021if ${ac_cv_path_TEE+:} false; then :
10022  $as_echo_n "(cached) " >&6
10023else
10024  case $TEE in
10025  [\\/]* | ?:[\\/]*)
10026  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10027  ;;
10028  *)
10029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10030for as_dir in $PATH
10031do
10032  IFS=$as_save_IFS
10033  test -z "$as_dir" && as_dir=.
10034    for ac_exec_ext in '' $ac_executable_extensions; do
10035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10036    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10038    break 2
10039  fi
10040done
10041  done
10042IFS=$as_save_IFS
10043
10044  ;;
10045esac
10046fi
10047TEE=$ac_cv_path_TEE
10048if test -n "$TEE"; then
10049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10050$as_echo "$TEE" >&6; }
10051else
10052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10053$as_echo "no" >&6; }
10054fi
10055
10056
10057        if test "x$TEE" = x; then
10058          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10059        fi
10060      else
10061        # Otherwise we believe it is a complete path. Use it as it is.
10062        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10063$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10064        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10065$as_echo_n "checking for TEE... " >&6; }
10066        if test ! -x "$tool_specified"; then
10067          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10068$as_echo "not found" >&6; }
10069          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10070        fi
10071        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10072$as_echo "$tool_specified" >&6; }
10073      fi
10074    fi
10075  fi
10076
10077
10078
10079  if test "x$TEE" = x; then
10080    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10081  fi
10082
10083
10084
10085
10086
10087  # Publish this variable in the help.
10088
10089
10090  if test "x$TOUCH" = x; then
10091    # The variable is not set by user, try to locate tool using the code snippet
10092    for ac_prog in touch
10093do
10094  # Extract the first word of "$ac_prog", so it can be a program name with args.
10095set dummy $ac_prog; ac_word=$2
10096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10097$as_echo_n "checking for $ac_word... " >&6; }
10098if ${ac_cv_path_TOUCH+:} false; then :
10099  $as_echo_n "(cached) " >&6
10100else
10101  case $TOUCH in
10102  [\\/]* | ?:[\\/]*)
10103  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10104  ;;
10105  *)
10106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10107for as_dir in $PATH
10108do
10109  IFS=$as_save_IFS
10110  test -z "$as_dir" && as_dir=.
10111    for ac_exec_ext in '' $ac_executable_extensions; do
10112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10113    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10115    break 2
10116  fi
10117done
10118  done
10119IFS=$as_save_IFS
10120
10121  ;;
10122esac
10123fi
10124TOUCH=$ac_cv_path_TOUCH
10125if test -n "$TOUCH"; then
10126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10127$as_echo "$TOUCH" >&6; }
10128else
10129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10130$as_echo "no" >&6; }
10131fi
10132
10133
10134  test -n "$TOUCH" && break
10135done
10136
10137  else
10138    # The variable is set, but is it from the command line or the environment?
10139
10140    # Try to remove the string !TOUCH! from our list.
10141    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10142    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10143      # If it failed, the variable was not from the command line. Ignore it,
10144      # but warn the user (except for BASH, which is always set by the calling BASH).
10145      if test "xTOUCH" != xBASH; then
10146        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10147$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10148      fi
10149      # Try to locate tool using the code snippet
10150      for ac_prog in touch
10151do
10152  # Extract the first word of "$ac_prog", so it can be a program name with args.
10153set dummy $ac_prog; ac_word=$2
10154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10155$as_echo_n "checking for $ac_word... " >&6; }
10156if ${ac_cv_path_TOUCH+:} false; then :
10157  $as_echo_n "(cached) " >&6
10158else
10159  case $TOUCH in
10160  [\\/]* | ?:[\\/]*)
10161  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10162  ;;
10163  *)
10164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10165for as_dir in $PATH
10166do
10167  IFS=$as_save_IFS
10168  test -z "$as_dir" && as_dir=.
10169    for ac_exec_ext in '' $ac_executable_extensions; do
10170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10171    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10173    break 2
10174  fi
10175done
10176  done
10177IFS=$as_save_IFS
10178
10179  ;;
10180esac
10181fi
10182TOUCH=$ac_cv_path_TOUCH
10183if test -n "$TOUCH"; then
10184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10185$as_echo "$TOUCH" >&6; }
10186else
10187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10188$as_echo "no" >&6; }
10189fi
10190
10191
10192  test -n "$TOUCH" && break
10193done
10194
10195    else
10196      # If it succeeded, then it was overridden by the user. We will use it
10197      # for the tool.
10198
10199      # First remove it from the list of overridden variables, so we can test
10200      # for unknown variables in the end.
10201      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10202
10203      # Check if the provided tool contains a complete path.
10204      tool_specified="$TOUCH"
10205      tool_basename="${tool_specified##*/}"
10206      if test "x$tool_basename" = "x$tool_specified"; then
10207        # A command without a complete path is provided, search $PATH.
10208        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10209$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10210        # Extract the first word of "$tool_basename", so it can be a program name with args.
10211set dummy $tool_basename; ac_word=$2
10212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10213$as_echo_n "checking for $ac_word... " >&6; }
10214if ${ac_cv_path_TOUCH+:} false; then :
10215  $as_echo_n "(cached) " >&6
10216else
10217  case $TOUCH in
10218  [\\/]* | ?:[\\/]*)
10219  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10220  ;;
10221  *)
10222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10223for as_dir in $PATH
10224do
10225  IFS=$as_save_IFS
10226  test -z "$as_dir" && as_dir=.
10227    for ac_exec_ext in '' $ac_executable_extensions; do
10228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10229    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10231    break 2
10232  fi
10233done
10234  done
10235IFS=$as_save_IFS
10236
10237  ;;
10238esac
10239fi
10240TOUCH=$ac_cv_path_TOUCH
10241if test -n "$TOUCH"; then
10242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10243$as_echo "$TOUCH" >&6; }
10244else
10245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10246$as_echo "no" >&6; }
10247fi
10248
10249
10250        if test "x$TOUCH" = x; then
10251          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10252        fi
10253      else
10254        # Otherwise we believe it is a complete path. Use it as it is.
10255        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10256$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10257        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10258$as_echo_n "checking for TOUCH... " >&6; }
10259        if test ! -x "$tool_specified"; then
10260          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10261$as_echo "not found" >&6; }
10262          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10263        fi
10264        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10265$as_echo "$tool_specified" >&6; }
10266      fi
10267    fi
10268  fi
10269
10270
10271
10272  if test "x$TOUCH" = x; then
10273    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10274  fi
10275
10276
10277
10278
10279
10280  # Publish this variable in the help.
10281
10282
10283  if test "x$TR" = x; then
10284    # The variable is not set by user, try to locate tool using the code snippet
10285    for ac_prog in tr
10286do
10287  # Extract the first word of "$ac_prog", so it can be a program name with args.
10288set dummy $ac_prog; ac_word=$2
10289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10290$as_echo_n "checking for $ac_word... " >&6; }
10291if ${ac_cv_path_TR+:} false; then :
10292  $as_echo_n "(cached) " >&6
10293else
10294  case $TR in
10295  [\\/]* | ?:[\\/]*)
10296  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10297  ;;
10298  *)
10299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10300for as_dir in $PATH
10301do
10302  IFS=$as_save_IFS
10303  test -z "$as_dir" && as_dir=.
10304    for ac_exec_ext in '' $ac_executable_extensions; do
10305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10306    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10308    break 2
10309  fi
10310done
10311  done
10312IFS=$as_save_IFS
10313
10314  ;;
10315esac
10316fi
10317TR=$ac_cv_path_TR
10318if test -n "$TR"; then
10319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10320$as_echo "$TR" >&6; }
10321else
10322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10323$as_echo "no" >&6; }
10324fi
10325
10326
10327  test -n "$TR" && break
10328done
10329
10330  else
10331    # The variable is set, but is it from the command line or the environment?
10332
10333    # Try to remove the string !TR! from our list.
10334    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10335    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10336      # If it failed, the variable was not from the command line. Ignore it,
10337      # but warn the user (except for BASH, which is always set by the calling BASH).
10338      if test "xTR" != xBASH; then
10339        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10340$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10341      fi
10342      # Try to locate tool using the code snippet
10343      for ac_prog in tr
10344do
10345  # Extract the first word of "$ac_prog", so it can be a program name with args.
10346set dummy $ac_prog; ac_word=$2
10347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10348$as_echo_n "checking for $ac_word... " >&6; }
10349if ${ac_cv_path_TR+:} false; then :
10350  $as_echo_n "(cached) " >&6
10351else
10352  case $TR in
10353  [\\/]* | ?:[\\/]*)
10354  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10355  ;;
10356  *)
10357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10358for as_dir in $PATH
10359do
10360  IFS=$as_save_IFS
10361  test -z "$as_dir" && as_dir=.
10362    for ac_exec_ext in '' $ac_executable_extensions; do
10363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10364    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10366    break 2
10367  fi
10368done
10369  done
10370IFS=$as_save_IFS
10371
10372  ;;
10373esac
10374fi
10375TR=$ac_cv_path_TR
10376if test -n "$TR"; then
10377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10378$as_echo "$TR" >&6; }
10379else
10380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10381$as_echo "no" >&6; }
10382fi
10383
10384
10385  test -n "$TR" && break
10386done
10387
10388    else
10389      # If it succeeded, then it was overridden by the user. We will use it
10390      # for the tool.
10391
10392      # First remove it from the list of overridden variables, so we can test
10393      # for unknown variables in the end.
10394      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10395
10396      # Check if the provided tool contains a complete path.
10397      tool_specified="$TR"
10398      tool_basename="${tool_specified##*/}"
10399      if test "x$tool_basename" = "x$tool_specified"; then
10400        # A command without a complete path is provided, search $PATH.
10401        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10402$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10403        # Extract the first word of "$tool_basename", so it can be a program name with args.
10404set dummy $tool_basename; ac_word=$2
10405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10406$as_echo_n "checking for $ac_word... " >&6; }
10407if ${ac_cv_path_TR+:} false; then :
10408  $as_echo_n "(cached) " >&6
10409else
10410  case $TR in
10411  [\\/]* | ?:[\\/]*)
10412  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10413  ;;
10414  *)
10415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10416for as_dir in $PATH
10417do
10418  IFS=$as_save_IFS
10419  test -z "$as_dir" && as_dir=.
10420    for ac_exec_ext in '' $ac_executable_extensions; do
10421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10422    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10424    break 2
10425  fi
10426done
10427  done
10428IFS=$as_save_IFS
10429
10430  ;;
10431esac
10432fi
10433TR=$ac_cv_path_TR
10434if test -n "$TR"; then
10435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10436$as_echo "$TR" >&6; }
10437else
10438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10439$as_echo "no" >&6; }
10440fi
10441
10442
10443        if test "x$TR" = x; then
10444          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10445        fi
10446      else
10447        # Otherwise we believe it is a complete path. Use it as it is.
10448        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10449$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10450        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10451$as_echo_n "checking for TR... " >&6; }
10452        if test ! -x "$tool_specified"; then
10453          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10454$as_echo "not found" >&6; }
10455          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10456        fi
10457        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10458$as_echo "$tool_specified" >&6; }
10459      fi
10460    fi
10461  fi
10462
10463
10464
10465  if test "x$TR" = x; then
10466    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10467  fi
10468
10469
10470
10471
10472
10473  # Publish this variable in the help.
10474
10475
10476  if test "x$UNAME" = x; then
10477    # The variable is not set by user, try to locate tool using the code snippet
10478    for ac_prog in uname
10479do
10480  # Extract the first word of "$ac_prog", so it can be a program name with args.
10481set dummy $ac_prog; ac_word=$2
10482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10483$as_echo_n "checking for $ac_word... " >&6; }
10484if ${ac_cv_path_UNAME+:} false; then :
10485  $as_echo_n "(cached) " >&6
10486else
10487  case $UNAME in
10488  [\\/]* | ?:[\\/]*)
10489  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10490  ;;
10491  *)
10492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10493for as_dir in $PATH
10494do
10495  IFS=$as_save_IFS
10496  test -z "$as_dir" && as_dir=.
10497    for ac_exec_ext in '' $ac_executable_extensions; do
10498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10499    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10501    break 2
10502  fi
10503done
10504  done
10505IFS=$as_save_IFS
10506
10507  ;;
10508esac
10509fi
10510UNAME=$ac_cv_path_UNAME
10511if test -n "$UNAME"; then
10512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10513$as_echo "$UNAME" >&6; }
10514else
10515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10516$as_echo "no" >&6; }
10517fi
10518
10519
10520  test -n "$UNAME" && break
10521done
10522
10523  else
10524    # The variable is set, but is it from the command line or the environment?
10525
10526    # Try to remove the string !UNAME! from our list.
10527    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10528    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10529      # If it failed, the variable was not from the command line. Ignore it,
10530      # but warn the user (except for BASH, which is always set by the calling BASH).
10531      if test "xUNAME" != xBASH; then
10532        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10533$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10534      fi
10535      # Try to locate tool using the code snippet
10536      for ac_prog in uname
10537do
10538  # Extract the first word of "$ac_prog", so it can be a program name with args.
10539set dummy $ac_prog; ac_word=$2
10540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10541$as_echo_n "checking for $ac_word... " >&6; }
10542if ${ac_cv_path_UNAME+:} false; then :
10543  $as_echo_n "(cached) " >&6
10544else
10545  case $UNAME in
10546  [\\/]* | ?:[\\/]*)
10547  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10548  ;;
10549  *)
10550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10551for as_dir in $PATH
10552do
10553  IFS=$as_save_IFS
10554  test -z "$as_dir" && as_dir=.
10555    for ac_exec_ext in '' $ac_executable_extensions; do
10556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10557    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10559    break 2
10560  fi
10561done
10562  done
10563IFS=$as_save_IFS
10564
10565  ;;
10566esac
10567fi
10568UNAME=$ac_cv_path_UNAME
10569if test -n "$UNAME"; then
10570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10571$as_echo "$UNAME" >&6; }
10572else
10573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10574$as_echo "no" >&6; }
10575fi
10576
10577
10578  test -n "$UNAME" && break
10579done
10580
10581    else
10582      # If it succeeded, then it was overridden by the user. We will use it
10583      # for the tool.
10584
10585      # First remove it from the list of overridden variables, so we can test
10586      # for unknown variables in the end.
10587      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10588
10589      # Check if the provided tool contains a complete path.
10590      tool_specified="$UNAME"
10591      tool_basename="${tool_specified##*/}"
10592      if test "x$tool_basename" = "x$tool_specified"; then
10593        # A command without a complete path is provided, search $PATH.
10594        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10595$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10596        # Extract the first word of "$tool_basename", so it can be a program name with args.
10597set dummy $tool_basename; ac_word=$2
10598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10599$as_echo_n "checking for $ac_word... " >&6; }
10600if ${ac_cv_path_UNAME+:} false; then :
10601  $as_echo_n "(cached) " >&6
10602else
10603  case $UNAME in
10604  [\\/]* | ?:[\\/]*)
10605  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10606  ;;
10607  *)
10608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10609for as_dir in $PATH
10610do
10611  IFS=$as_save_IFS
10612  test -z "$as_dir" && as_dir=.
10613    for ac_exec_ext in '' $ac_executable_extensions; do
10614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10615    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10617    break 2
10618  fi
10619done
10620  done
10621IFS=$as_save_IFS
10622
10623  ;;
10624esac
10625fi
10626UNAME=$ac_cv_path_UNAME
10627if test -n "$UNAME"; then
10628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10629$as_echo "$UNAME" >&6; }
10630else
10631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10632$as_echo "no" >&6; }
10633fi
10634
10635
10636        if test "x$UNAME" = x; then
10637          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10638        fi
10639      else
10640        # Otherwise we believe it is a complete path. Use it as it is.
10641        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10642$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10643        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10644$as_echo_n "checking for UNAME... " >&6; }
10645        if test ! -x "$tool_specified"; then
10646          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10647$as_echo "not found" >&6; }
10648          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10649        fi
10650        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10651$as_echo "$tool_specified" >&6; }
10652      fi
10653    fi
10654  fi
10655
10656
10657
10658  if test "x$UNAME" = x; then
10659    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10660  fi
10661
10662
10663
10664
10665
10666  # Publish this variable in the help.
10667
10668
10669  if test "x$UNIQ" = x; then
10670    # The variable is not set by user, try to locate tool using the code snippet
10671    for ac_prog in uniq
10672do
10673  # Extract the first word of "$ac_prog", so it can be a program name with args.
10674set dummy $ac_prog; ac_word=$2
10675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10676$as_echo_n "checking for $ac_word... " >&6; }
10677if ${ac_cv_path_UNIQ+:} false; then :
10678  $as_echo_n "(cached) " >&6
10679else
10680  case $UNIQ in
10681  [\\/]* | ?:[\\/]*)
10682  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10683  ;;
10684  *)
10685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10686for as_dir in $PATH
10687do
10688  IFS=$as_save_IFS
10689  test -z "$as_dir" && as_dir=.
10690    for ac_exec_ext in '' $ac_executable_extensions; do
10691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10692    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10694    break 2
10695  fi
10696done
10697  done
10698IFS=$as_save_IFS
10699
10700  ;;
10701esac
10702fi
10703UNIQ=$ac_cv_path_UNIQ
10704if test -n "$UNIQ"; then
10705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10706$as_echo "$UNIQ" >&6; }
10707else
10708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10709$as_echo "no" >&6; }
10710fi
10711
10712
10713  test -n "$UNIQ" && break
10714done
10715
10716  else
10717    # The variable is set, but is it from the command line or the environment?
10718
10719    # Try to remove the string !UNIQ! from our list.
10720    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10721    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10722      # If it failed, the variable was not from the command line. Ignore it,
10723      # but warn the user (except for BASH, which is always set by the calling BASH).
10724      if test "xUNIQ" != xBASH; then
10725        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10726$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10727      fi
10728      # Try to locate tool using the code snippet
10729      for ac_prog in uniq
10730do
10731  # Extract the first word of "$ac_prog", so it can be a program name with args.
10732set dummy $ac_prog; ac_word=$2
10733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10734$as_echo_n "checking for $ac_word... " >&6; }
10735if ${ac_cv_path_UNIQ+:} false; then :
10736  $as_echo_n "(cached) " >&6
10737else
10738  case $UNIQ in
10739  [\\/]* | ?:[\\/]*)
10740  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10741  ;;
10742  *)
10743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10744for as_dir in $PATH
10745do
10746  IFS=$as_save_IFS
10747  test -z "$as_dir" && as_dir=.
10748    for ac_exec_ext in '' $ac_executable_extensions; do
10749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10750    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10752    break 2
10753  fi
10754done
10755  done
10756IFS=$as_save_IFS
10757
10758  ;;
10759esac
10760fi
10761UNIQ=$ac_cv_path_UNIQ
10762if test -n "$UNIQ"; then
10763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10764$as_echo "$UNIQ" >&6; }
10765else
10766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10767$as_echo "no" >&6; }
10768fi
10769
10770
10771  test -n "$UNIQ" && break
10772done
10773
10774    else
10775      # If it succeeded, then it was overridden by the user. We will use it
10776      # for the tool.
10777
10778      # First remove it from the list of overridden variables, so we can test
10779      # for unknown variables in the end.
10780      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10781
10782      # Check if the provided tool contains a complete path.
10783      tool_specified="$UNIQ"
10784      tool_basename="${tool_specified##*/}"
10785      if test "x$tool_basename" = "x$tool_specified"; then
10786        # A command without a complete path is provided, search $PATH.
10787        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10788$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10789        # Extract the first word of "$tool_basename", so it can be a program name with args.
10790set dummy $tool_basename; ac_word=$2
10791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10792$as_echo_n "checking for $ac_word... " >&6; }
10793if ${ac_cv_path_UNIQ+:} false; then :
10794  $as_echo_n "(cached) " >&6
10795else
10796  case $UNIQ in
10797  [\\/]* | ?:[\\/]*)
10798  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10799  ;;
10800  *)
10801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10802for as_dir in $PATH
10803do
10804  IFS=$as_save_IFS
10805  test -z "$as_dir" && as_dir=.
10806    for ac_exec_ext in '' $ac_executable_extensions; do
10807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10808    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10810    break 2
10811  fi
10812done
10813  done
10814IFS=$as_save_IFS
10815
10816  ;;
10817esac
10818fi
10819UNIQ=$ac_cv_path_UNIQ
10820if test -n "$UNIQ"; then
10821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10822$as_echo "$UNIQ" >&6; }
10823else
10824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10825$as_echo "no" >&6; }
10826fi
10827
10828
10829        if test "x$UNIQ" = x; then
10830          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10831        fi
10832      else
10833        # Otherwise we believe it is a complete path. Use it as it is.
10834        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10835$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10836        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10837$as_echo_n "checking for UNIQ... " >&6; }
10838        if test ! -x "$tool_specified"; then
10839          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10840$as_echo "not found" >&6; }
10841          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10842        fi
10843        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10844$as_echo "$tool_specified" >&6; }
10845      fi
10846    fi
10847  fi
10848
10849
10850
10851  if test "x$UNIQ" = x; then
10852    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10853  fi
10854
10855
10856
10857
10858
10859  # Publish this variable in the help.
10860
10861
10862  if test "x$WC" = x; then
10863    # The variable is not set by user, try to locate tool using the code snippet
10864    for ac_prog in wc
10865do
10866  # Extract the first word of "$ac_prog", so it can be a program name with args.
10867set dummy $ac_prog; ac_word=$2
10868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10869$as_echo_n "checking for $ac_word... " >&6; }
10870if ${ac_cv_path_WC+:} false; then :
10871  $as_echo_n "(cached) " >&6
10872else
10873  case $WC in
10874  [\\/]* | ?:[\\/]*)
10875  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10876  ;;
10877  *)
10878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10879for as_dir in $PATH
10880do
10881  IFS=$as_save_IFS
10882  test -z "$as_dir" && as_dir=.
10883    for ac_exec_ext in '' $ac_executable_extensions; do
10884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10885    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10887    break 2
10888  fi
10889done
10890  done
10891IFS=$as_save_IFS
10892
10893  ;;
10894esac
10895fi
10896WC=$ac_cv_path_WC
10897if test -n "$WC"; then
10898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10899$as_echo "$WC" >&6; }
10900else
10901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10902$as_echo "no" >&6; }
10903fi
10904
10905
10906  test -n "$WC" && break
10907done
10908
10909  else
10910    # The variable is set, but is it from the command line or the environment?
10911
10912    # Try to remove the string !WC! from our list.
10913    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10914    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10915      # If it failed, the variable was not from the command line. Ignore it,
10916      # but warn the user (except for BASH, which is always set by the calling BASH).
10917      if test "xWC" != xBASH; then
10918        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10919$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10920      fi
10921      # Try to locate tool using the code snippet
10922      for ac_prog in wc
10923do
10924  # Extract the first word of "$ac_prog", so it can be a program name with args.
10925set dummy $ac_prog; ac_word=$2
10926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10927$as_echo_n "checking for $ac_word... " >&6; }
10928if ${ac_cv_path_WC+:} false; then :
10929  $as_echo_n "(cached) " >&6
10930else
10931  case $WC in
10932  [\\/]* | ?:[\\/]*)
10933  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10934  ;;
10935  *)
10936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10937for as_dir in $PATH
10938do
10939  IFS=$as_save_IFS
10940  test -z "$as_dir" && as_dir=.
10941    for ac_exec_ext in '' $ac_executable_extensions; do
10942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10943    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10945    break 2
10946  fi
10947done
10948  done
10949IFS=$as_save_IFS
10950
10951  ;;
10952esac
10953fi
10954WC=$ac_cv_path_WC
10955if test -n "$WC"; then
10956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10957$as_echo "$WC" >&6; }
10958else
10959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10960$as_echo "no" >&6; }
10961fi
10962
10963
10964  test -n "$WC" && break
10965done
10966
10967    else
10968      # If it succeeded, then it was overridden by the user. We will use it
10969      # for the tool.
10970
10971      # First remove it from the list of overridden variables, so we can test
10972      # for unknown variables in the end.
10973      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10974
10975      # Check if the provided tool contains a complete path.
10976      tool_specified="$WC"
10977      tool_basename="${tool_specified##*/}"
10978      if test "x$tool_basename" = "x$tool_specified"; then
10979        # A command without a complete path is provided, search $PATH.
10980        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10981$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10982        # Extract the first word of "$tool_basename", so it can be a program name with args.
10983set dummy $tool_basename; ac_word=$2
10984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10985$as_echo_n "checking for $ac_word... " >&6; }
10986if ${ac_cv_path_WC+:} false; then :
10987  $as_echo_n "(cached) " >&6
10988else
10989  case $WC in
10990  [\\/]* | ?:[\\/]*)
10991  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10992  ;;
10993  *)
10994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10995for as_dir in $PATH
10996do
10997  IFS=$as_save_IFS
10998  test -z "$as_dir" && as_dir=.
10999    for ac_exec_ext in '' $ac_executable_extensions; do
11000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11001    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11003    break 2
11004  fi
11005done
11006  done
11007IFS=$as_save_IFS
11008
11009  ;;
11010esac
11011fi
11012WC=$ac_cv_path_WC
11013if test -n "$WC"; then
11014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11015$as_echo "$WC" >&6; }
11016else
11017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11018$as_echo "no" >&6; }
11019fi
11020
11021
11022        if test "x$WC" = x; then
11023          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11024        fi
11025      else
11026        # Otherwise we believe it is a complete path. Use it as it is.
11027        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11028$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11029        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11030$as_echo_n "checking for WC... " >&6; }
11031        if test ! -x "$tool_specified"; then
11032          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11033$as_echo "not found" >&6; }
11034          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11035        fi
11036        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11037$as_echo "$tool_specified" >&6; }
11038      fi
11039    fi
11040  fi
11041
11042
11043
11044  if test "x$WC" = x; then
11045    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11046  fi
11047
11048
11049
11050
11051
11052  # Publish this variable in the help.
11053
11054
11055  if test "x$WHICH" = x; then
11056    # The variable is not set by user, try to locate tool using the code snippet
11057    for ac_prog in which
11058do
11059  # Extract the first word of "$ac_prog", so it can be a program name with args.
11060set dummy $ac_prog; ac_word=$2
11061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11062$as_echo_n "checking for $ac_word... " >&6; }
11063if ${ac_cv_path_WHICH+:} false; then :
11064  $as_echo_n "(cached) " >&6
11065else
11066  case $WHICH in
11067  [\\/]* | ?:[\\/]*)
11068  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11069  ;;
11070  *)
11071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11072for as_dir in $PATH
11073do
11074  IFS=$as_save_IFS
11075  test -z "$as_dir" && as_dir=.
11076    for ac_exec_ext in '' $ac_executable_extensions; do
11077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11078    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11080    break 2
11081  fi
11082done
11083  done
11084IFS=$as_save_IFS
11085
11086  ;;
11087esac
11088fi
11089WHICH=$ac_cv_path_WHICH
11090if test -n "$WHICH"; then
11091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11092$as_echo "$WHICH" >&6; }
11093else
11094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11095$as_echo "no" >&6; }
11096fi
11097
11098
11099  test -n "$WHICH" && break
11100done
11101
11102  else
11103    # The variable is set, but is it from the command line or the environment?
11104
11105    # Try to remove the string !WHICH! from our list.
11106    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11107    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11108      # If it failed, the variable was not from the command line. Ignore it,
11109      # but warn the user (except for BASH, which is always set by the calling BASH).
11110      if test "xWHICH" != xBASH; then
11111        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11112$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11113      fi
11114      # Try to locate tool using the code snippet
11115      for ac_prog in which
11116do
11117  # Extract the first word of "$ac_prog", so it can be a program name with args.
11118set dummy $ac_prog; ac_word=$2
11119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11120$as_echo_n "checking for $ac_word... " >&6; }
11121if ${ac_cv_path_WHICH+:} false; then :
11122  $as_echo_n "(cached) " >&6
11123else
11124  case $WHICH in
11125  [\\/]* | ?:[\\/]*)
11126  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11127  ;;
11128  *)
11129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11130for as_dir in $PATH
11131do
11132  IFS=$as_save_IFS
11133  test -z "$as_dir" && as_dir=.
11134    for ac_exec_ext in '' $ac_executable_extensions; do
11135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11136    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11138    break 2
11139  fi
11140done
11141  done
11142IFS=$as_save_IFS
11143
11144  ;;
11145esac
11146fi
11147WHICH=$ac_cv_path_WHICH
11148if test -n "$WHICH"; then
11149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11150$as_echo "$WHICH" >&6; }
11151else
11152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11153$as_echo "no" >&6; }
11154fi
11155
11156
11157  test -n "$WHICH" && break
11158done
11159
11160    else
11161      # If it succeeded, then it was overridden by the user. We will use it
11162      # for the tool.
11163
11164      # First remove it from the list of overridden variables, so we can test
11165      # for unknown variables in the end.
11166      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11167
11168      # Check if the provided tool contains a complete path.
11169      tool_specified="$WHICH"
11170      tool_basename="${tool_specified##*/}"
11171      if test "x$tool_basename" = "x$tool_specified"; then
11172        # A command without a complete path is provided, search $PATH.
11173        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11174$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11175        # Extract the first word of "$tool_basename", so it can be a program name with args.
11176set dummy $tool_basename; ac_word=$2
11177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11178$as_echo_n "checking for $ac_word... " >&6; }
11179if ${ac_cv_path_WHICH+:} false; then :
11180  $as_echo_n "(cached) " >&6
11181else
11182  case $WHICH in
11183  [\\/]* | ?:[\\/]*)
11184  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11185  ;;
11186  *)
11187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11188for as_dir in $PATH
11189do
11190  IFS=$as_save_IFS
11191  test -z "$as_dir" && as_dir=.
11192    for ac_exec_ext in '' $ac_executable_extensions; do
11193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11194    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11196    break 2
11197  fi
11198done
11199  done
11200IFS=$as_save_IFS
11201
11202  ;;
11203esac
11204fi
11205WHICH=$ac_cv_path_WHICH
11206if test -n "$WHICH"; then
11207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11208$as_echo "$WHICH" >&6; }
11209else
11210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11211$as_echo "no" >&6; }
11212fi
11213
11214
11215        if test "x$WHICH" = x; then
11216          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11217        fi
11218      else
11219        # Otherwise we believe it is a complete path. Use it as it is.
11220        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11221$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11222        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11223$as_echo_n "checking for WHICH... " >&6; }
11224        if test ! -x "$tool_specified"; then
11225          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11226$as_echo "not found" >&6; }
11227          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11228        fi
11229        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11230$as_echo "$tool_specified" >&6; }
11231      fi
11232    fi
11233  fi
11234
11235
11236
11237  if test "x$WHICH" = x; then
11238    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11239  fi
11240
11241
11242
11243
11244
11245  # Publish this variable in the help.
11246
11247
11248  if test "x$XARGS" = x; then
11249    # The variable is not set by user, try to locate tool using the code snippet
11250    for ac_prog in xargs
11251do
11252  # Extract the first word of "$ac_prog", so it can be a program name with args.
11253set dummy $ac_prog; ac_word=$2
11254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11255$as_echo_n "checking for $ac_word... " >&6; }
11256if ${ac_cv_path_XARGS+:} false; then :
11257  $as_echo_n "(cached) " >&6
11258else
11259  case $XARGS in
11260  [\\/]* | ?:[\\/]*)
11261  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11262  ;;
11263  *)
11264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11265for as_dir in $PATH
11266do
11267  IFS=$as_save_IFS
11268  test -z "$as_dir" && as_dir=.
11269    for ac_exec_ext in '' $ac_executable_extensions; do
11270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11271    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11273    break 2
11274  fi
11275done
11276  done
11277IFS=$as_save_IFS
11278
11279  ;;
11280esac
11281fi
11282XARGS=$ac_cv_path_XARGS
11283if test -n "$XARGS"; then
11284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11285$as_echo "$XARGS" >&6; }
11286else
11287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11288$as_echo "no" >&6; }
11289fi
11290
11291
11292  test -n "$XARGS" && break
11293done
11294
11295  else
11296    # The variable is set, but is it from the command line or the environment?
11297
11298    # Try to remove the string !XARGS! from our list.
11299    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11300    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11301      # If it failed, the variable was not from the command line. Ignore it,
11302      # but warn the user (except for BASH, which is always set by the calling BASH).
11303      if test "xXARGS" != xBASH; then
11304        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11305$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11306      fi
11307      # Try to locate tool using the code snippet
11308      for ac_prog in xargs
11309do
11310  # Extract the first word of "$ac_prog", so it can be a program name with args.
11311set dummy $ac_prog; ac_word=$2
11312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11313$as_echo_n "checking for $ac_word... " >&6; }
11314if ${ac_cv_path_XARGS+:} false; then :
11315  $as_echo_n "(cached) " >&6
11316else
11317  case $XARGS in
11318  [\\/]* | ?:[\\/]*)
11319  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11320  ;;
11321  *)
11322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11323for as_dir in $PATH
11324do
11325  IFS=$as_save_IFS
11326  test -z "$as_dir" && as_dir=.
11327    for ac_exec_ext in '' $ac_executable_extensions; do
11328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11329    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11331    break 2
11332  fi
11333done
11334  done
11335IFS=$as_save_IFS
11336
11337  ;;
11338esac
11339fi
11340XARGS=$ac_cv_path_XARGS
11341if test -n "$XARGS"; then
11342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11343$as_echo "$XARGS" >&6; }
11344else
11345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11346$as_echo "no" >&6; }
11347fi
11348
11349
11350  test -n "$XARGS" && break
11351done
11352
11353    else
11354      # If it succeeded, then it was overridden by the user. We will use it
11355      # for the tool.
11356
11357      # First remove it from the list of overridden variables, so we can test
11358      # for unknown variables in the end.
11359      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11360
11361      # Check if the provided tool contains a complete path.
11362      tool_specified="$XARGS"
11363      tool_basename="${tool_specified##*/}"
11364      if test "x$tool_basename" = "x$tool_specified"; then
11365        # A command without a complete path is provided, search $PATH.
11366        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11367$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11368        # Extract the first word of "$tool_basename", so it can be a program name with args.
11369set dummy $tool_basename; ac_word=$2
11370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11371$as_echo_n "checking for $ac_word... " >&6; }
11372if ${ac_cv_path_XARGS+:} false; then :
11373  $as_echo_n "(cached) " >&6
11374else
11375  case $XARGS in
11376  [\\/]* | ?:[\\/]*)
11377  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11378  ;;
11379  *)
11380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11381for as_dir in $PATH
11382do
11383  IFS=$as_save_IFS
11384  test -z "$as_dir" && as_dir=.
11385    for ac_exec_ext in '' $ac_executable_extensions; do
11386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11387    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11389    break 2
11390  fi
11391done
11392  done
11393IFS=$as_save_IFS
11394
11395  ;;
11396esac
11397fi
11398XARGS=$ac_cv_path_XARGS
11399if test -n "$XARGS"; then
11400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11401$as_echo "$XARGS" >&6; }
11402else
11403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11404$as_echo "no" >&6; }
11405fi
11406
11407
11408        if test "x$XARGS" = x; then
11409          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11410        fi
11411      else
11412        # Otherwise we believe it is a complete path. Use it as it is.
11413        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11414$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11415        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11416$as_echo_n "checking for XARGS... " >&6; }
11417        if test ! -x "$tool_specified"; then
11418          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11419$as_echo "not found" >&6; }
11420          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11421        fi
11422        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11423$as_echo "$tool_specified" >&6; }
11424      fi
11425    fi
11426  fi
11427
11428
11429
11430  if test "x$XARGS" = x; then
11431    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11432  fi
11433
11434
11435
11436  # Then required tools that require some special treatment.
11437
11438
11439  # Publish this variable in the help.
11440
11441
11442  if test "x$AWK" = x; then
11443    # The variable is not set by user, try to locate tool using the code snippet
11444    for ac_prog in gawk mawk nawk awk
11445do
11446  # Extract the first word of "$ac_prog", so it can be a program name with args.
11447set dummy $ac_prog; ac_word=$2
11448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11449$as_echo_n "checking for $ac_word... " >&6; }
11450if ${ac_cv_prog_AWK+:} false; then :
11451  $as_echo_n "(cached) " >&6
11452else
11453  if test -n "$AWK"; then
11454  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11455else
11456as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11457for as_dir in $PATH
11458do
11459  IFS=$as_save_IFS
11460  test -z "$as_dir" && as_dir=.
11461    for ac_exec_ext in '' $ac_executable_extensions; do
11462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11463    ac_cv_prog_AWK="$ac_prog"
11464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11465    break 2
11466  fi
11467done
11468  done
11469IFS=$as_save_IFS
11470
11471fi
11472fi
11473AWK=$ac_cv_prog_AWK
11474if test -n "$AWK"; then
11475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11476$as_echo "$AWK" >&6; }
11477else
11478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11479$as_echo "no" >&6; }
11480fi
11481
11482
11483  test -n "$AWK" && break
11484done
11485
11486  else
11487    # The variable is set, but is it from the command line or the environment?
11488
11489    # Try to remove the string !AWK! from our list.
11490    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11491    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11492      # If it failed, the variable was not from the command line. Ignore it,
11493      # but warn the user (except for BASH, which is always set by the calling BASH).
11494      if test "xAWK" != xBASH; then
11495        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11496$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11497      fi
11498      # Try to locate tool using the code snippet
11499      for ac_prog in gawk mawk nawk awk
11500do
11501  # Extract the first word of "$ac_prog", so it can be a program name with args.
11502set dummy $ac_prog; ac_word=$2
11503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11504$as_echo_n "checking for $ac_word... " >&6; }
11505if ${ac_cv_prog_AWK+:} false; then :
11506  $as_echo_n "(cached) " >&6
11507else
11508  if test -n "$AWK"; then
11509  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11510else
11511as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11512for as_dir in $PATH
11513do
11514  IFS=$as_save_IFS
11515  test -z "$as_dir" && as_dir=.
11516    for ac_exec_ext in '' $ac_executable_extensions; do
11517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11518    ac_cv_prog_AWK="$ac_prog"
11519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11520    break 2
11521  fi
11522done
11523  done
11524IFS=$as_save_IFS
11525
11526fi
11527fi
11528AWK=$ac_cv_prog_AWK
11529if test -n "$AWK"; then
11530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11531$as_echo "$AWK" >&6; }
11532else
11533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11534$as_echo "no" >&6; }
11535fi
11536
11537
11538  test -n "$AWK" && break
11539done
11540
11541    else
11542      # If it succeeded, then it was overridden by the user. We will use it
11543      # for the tool.
11544
11545      # First remove it from the list of overridden variables, so we can test
11546      # for unknown variables in the end.
11547      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11548
11549      # Check if the provided tool contains a complete path.
11550      tool_specified="$AWK"
11551      tool_basename="${tool_specified##*/}"
11552      if test "x$tool_basename" = "x$tool_specified"; then
11553        # A command without a complete path is provided, search $PATH.
11554        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11555$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11556        # Extract the first word of "$tool_basename", so it can be a program name with args.
11557set dummy $tool_basename; ac_word=$2
11558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11559$as_echo_n "checking for $ac_word... " >&6; }
11560if ${ac_cv_path_AWK+:} false; then :
11561  $as_echo_n "(cached) " >&6
11562else
11563  case $AWK in
11564  [\\/]* | ?:[\\/]*)
11565  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11566  ;;
11567  *)
11568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11569for as_dir in $PATH
11570do
11571  IFS=$as_save_IFS
11572  test -z "$as_dir" && as_dir=.
11573    for ac_exec_ext in '' $ac_executable_extensions; do
11574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11575    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11577    break 2
11578  fi
11579done
11580  done
11581IFS=$as_save_IFS
11582
11583  ;;
11584esac
11585fi
11586AWK=$ac_cv_path_AWK
11587if test -n "$AWK"; then
11588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11589$as_echo "$AWK" >&6; }
11590else
11591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11592$as_echo "no" >&6; }
11593fi
11594
11595
11596        if test "x$AWK" = x; then
11597          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11598        fi
11599      else
11600        # Otherwise we believe it is a complete path. Use it as it is.
11601        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11602$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11603        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11604$as_echo_n "checking for AWK... " >&6; }
11605        if test ! -x "$tool_specified"; then
11606          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11607$as_echo "not found" >&6; }
11608          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11609        fi
11610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11611$as_echo "$tool_specified" >&6; }
11612      fi
11613    fi
11614  fi
11615
11616
11617  if test "x$AWK" = x; then
11618    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11619  fi
11620
11621
11622
11623
11624  # Publish this variable in the help.
11625
11626
11627  if test "x$GREP" = x; then
11628    # The variable is not set by user, try to locate tool using the code snippet
11629    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11630$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11631if ${ac_cv_path_GREP+:} false; then :
11632  $as_echo_n "(cached) " >&6
11633else
11634  if test -z "$GREP"; then
11635  ac_path_GREP_found=false
11636  # Loop through the user's path and test for each of PROGNAME-LIST
11637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11638for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11639do
11640  IFS=$as_save_IFS
11641  test -z "$as_dir" && as_dir=.
11642    for ac_prog in grep ggrep; do
11643    for ac_exec_ext in '' $ac_executable_extensions; do
11644      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11645      as_fn_executable_p "$ac_path_GREP" || continue
11646# Check for GNU ac_path_GREP and select it if it is found.
11647  # Check for GNU $ac_path_GREP
11648case `"$ac_path_GREP" --version 2>&1` in
11649*GNU*)
11650  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11651*)
11652  ac_count=0
11653  $as_echo_n 0123456789 >"conftest.in"
11654  while :
11655  do
11656    cat "conftest.in" "conftest.in" >"conftest.tmp"
11657    mv "conftest.tmp" "conftest.in"
11658    cp "conftest.in" "conftest.nl"
11659    $as_echo 'GREP' >> "conftest.nl"
11660    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11661    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11662    as_fn_arith $ac_count + 1 && ac_count=$as_val
11663    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11664      # Best one so far, save it but keep looking for a better one
11665      ac_cv_path_GREP="$ac_path_GREP"
11666      ac_path_GREP_max=$ac_count
11667    fi
11668    # 10*(2^10) chars as input seems more than enough
11669    test $ac_count -gt 10 && break
11670  done
11671  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11672esac
11673
11674      $ac_path_GREP_found && break 3
11675    done
11676  done
11677  done
11678IFS=$as_save_IFS
11679  if test -z "$ac_cv_path_GREP"; then
11680    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11681  fi
11682else
11683  ac_cv_path_GREP=$GREP
11684fi
11685
11686fi
11687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11688$as_echo "$ac_cv_path_GREP" >&6; }
11689 GREP="$ac_cv_path_GREP"
11690
11691
11692  else
11693    # The variable is set, but is it from the command line or the environment?
11694
11695    # Try to remove the string !GREP! from our list.
11696    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11697    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11698      # If it failed, the variable was not from the command line. Ignore it,
11699      # but warn the user (except for BASH, which is always set by the calling BASH).
11700      if test "xGREP" != xBASH; then
11701        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11702$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11703      fi
11704      # Try to locate tool using the code snippet
11705      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11706$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11707if ${ac_cv_path_GREP+:} false; then :
11708  $as_echo_n "(cached) " >&6
11709else
11710  if test -z "$GREP"; then
11711  ac_path_GREP_found=false
11712  # Loop through the user's path and test for each of PROGNAME-LIST
11713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11714for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11715do
11716  IFS=$as_save_IFS
11717  test -z "$as_dir" && as_dir=.
11718    for ac_prog in grep ggrep; do
11719    for ac_exec_ext in '' $ac_executable_extensions; do
11720      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11721      as_fn_executable_p "$ac_path_GREP" || continue
11722# Check for GNU ac_path_GREP and select it if it is found.
11723  # Check for GNU $ac_path_GREP
11724case `"$ac_path_GREP" --version 2>&1` in
11725*GNU*)
11726  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11727*)
11728  ac_count=0
11729  $as_echo_n 0123456789 >"conftest.in"
11730  while :
11731  do
11732    cat "conftest.in" "conftest.in" >"conftest.tmp"
11733    mv "conftest.tmp" "conftest.in"
11734    cp "conftest.in" "conftest.nl"
11735    $as_echo 'GREP' >> "conftest.nl"
11736    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11737    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11738    as_fn_arith $ac_count + 1 && ac_count=$as_val
11739    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11740      # Best one so far, save it but keep looking for a better one
11741      ac_cv_path_GREP="$ac_path_GREP"
11742      ac_path_GREP_max=$ac_count
11743    fi
11744    # 10*(2^10) chars as input seems more than enough
11745    test $ac_count -gt 10 && break
11746  done
11747  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11748esac
11749
11750      $ac_path_GREP_found && break 3
11751    done
11752  done
11753  done
11754IFS=$as_save_IFS
11755  if test -z "$ac_cv_path_GREP"; then
11756    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11757  fi
11758else
11759  ac_cv_path_GREP=$GREP
11760fi
11761
11762fi
11763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11764$as_echo "$ac_cv_path_GREP" >&6; }
11765 GREP="$ac_cv_path_GREP"
11766
11767
11768    else
11769      # If it succeeded, then it was overridden by the user. We will use it
11770      # for the tool.
11771
11772      # First remove it from the list of overridden variables, so we can test
11773      # for unknown variables in the end.
11774      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11775
11776      # Check if the provided tool contains a complete path.
11777      tool_specified="$GREP"
11778      tool_basename="${tool_specified##*/}"
11779      if test "x$tool_basename" = "x$tool_specified"; then
11780        # A command without a complete path is provided, search $PATH.
11781        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11782$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11783        # Extract the first word of "$tool_basename", so it can be a program name with args.
11784set dummy $tool_basename; ac_word=$2
11785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11786$as_echo_n "checking for $ac_word... " >&6; }
11787if ${ac_cv_path_GREP+:} false; then :
11788  $as_echo_n "(cached) " >&6
11789else
11790  case $GREP in
11791  [\\/]* | ?:[\\/]*)
11792  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11793  ;;
11794  *)
11795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11796for as_dir in $PATH
11797do
11798  IFS=$as_save_IFS
11799  test -z "$as_dir" && as_dir=.
11800    for ac_exec_ext in '' $ac_executable_extensions; do
11801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11802    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11804    break 2
11805  fi
11806done
11807  done
11808IFS=$as_save_IFS
11809
11810  ;;
11811esac
11812fi
11813GREP=$ac_cv_path_GREP
11814if test -n "$GREP"; then
11815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11816$as_echo "$GREP" >&6; }
11817else
11818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11819$as_echo "no" >&6; }
11820fi
11821
11822
11823        if test "x$GREP" = x; then
11824          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11825        fi
11826      else
11827        # Otherwise we believe it is a complete path. Use it as it is.
11828        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11829$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11830        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11831$as_echo_n "checking for GREP... " >&6; }
11832        if test ! -x "$tool_specified"; then
11833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11834$as_echo "not found" >&6; }
11835          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11836        fi
11837        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11838$as_echo "$tool_specified" >&6; }
11839      fi
11840    fi
11841  fi
11842
11843
11844  if test "x$GREP" = x; then
11845    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11846  fi
11847
11848
11849
11850
11851  # Publish this variable in the help.
11852
11853
11854  if test "x$EGREP" = x; then
11855    # The variable is not set by user, try to locate tool using the code snippet
11856    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11857$as_echo_n "checking for egrep... " >&6; }
11858if ${ac_cv_path_EGREP+:} false; then :
11859  $as_echo_n "(cached) " >&6
11860else
11861  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11862   then ac_cv_path_EGREP="$GREP -E"
11863   else
11864     if test -z "$EGREP"; then
11865  ac_path_EGREP_found=false
11866  # Loop through the user's path and test for each of PROGNAME-LIST
11867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11868for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11869do
11870  IFS=$as_save_IFS
11871  test -z "$as_dir" && as_dir=.
11872    for ac_prog in egrep; do
11873    for ac_exec_ext in '' $ac_executable_extensions; do
11874      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11875      as_fn_executable_p "$ac_path_EGREP" || continue
11876# Check for GNU ac_path_EGREP and select it if it is found.
11877  # Check for GNU $ac_path_EGREP
11878case `"$ac_path_EGREP" --version 2>&1` in
11879*GNU*)
11880  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11881*)
11882  ac_count=0
11883  $as_echo_n 0123456789 >"conftest.in"
11884  while :
11885  do
11886    cat "conftest.in" "conftest.in" >"conftest.tmp"
11887    mv "conftest.tmp" "conftest.in"
11888    cp "conftest.in" "conftest.nl"
11889    $as_echo 'EGREP' >> "conftest.nl"
11890    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11891    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11892    as_fn_arith $ac_count + 1 && ac_count=$as_val
11893    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11894      # Best one so far, save it but keep looking for a better one
11895      ac_cv_path_EGREP="$ac_path_EGREP"
11896      ac_path_EGREP_max=$ac_count
11897    fi
11898    # 10*(2^10) chars as input seems more than enough
11899    test $ac_count -gt 10 && break
11900  done
11901  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11902esac
11903
11904      $ac_path_EGREP_found && break 3
11905    done
11906  done
11907  done
11908IFS=$as_save_IFS
11909  if test -z "$ac_cv_path_EGREP"; then
11910    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11911  fi
11912else
11913  ac_cv_path_EGREP=$EGREP
11914fi
11915
11916   fi
11917fi
11918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11919$as_echo "$ac_cv_path_EGREP" >&6; }
11920 EGREP="$ac_cv_path_EGREP"
11921
11922
11923  else
11924    # The variable is set, but is it from the command line or the environment?
11925
11926    # Try to remove the string !EGREP! from our list.
11927    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11928    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11929      # If it failed, the variable was not from the command line. Ignore it,
11930      # but warn the user (except for BASH, which is always set by the calling BASH).
11931      if test "xEGREP" != xBASH; then
11932        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11933$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11934      fi
11935      # Try to locate tool using the code snippet
11936      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11937$as_echo_n "checking for egrep... " >&6; }
11938if ${ac_cv_path_EGREP+:} false; then :
11939  $as_echo_n "(cached) " >&6
11940else
11941  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11942   then ac_cv_path_EGREP="$GREP -E"
11943   else
11944     if test -z "$EGREP"; then
11945  ac_path_EGREP_found=false
11946  # Loop through the user's path and test for each of PROGNAME-LIST
11947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11948for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11949do
11950  IFS=$as_save_IFS
11951  test -z "$as_dir" && as_dir=.
11952    for ac_prog in egrep; do
11953    for ac_exec_ext in '' $ac_executable_extensions; do
11954      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11955      as_fn_executable_p "$ac_path_EGREP" || continue
11956# Check for GNU ac_path_EGREP and select it if it is found.
11957  # Check for GNU $ac_path_EGREP
11958case `"$ac_path_EGREP" --version 2>&1` in
11959*GNU*)
11960  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11961*)
11962  ac_count=0
11963  $as_echo_n 0123456789 >"conftest.in"
11964  while :
11965  do
11966    cat "conftest.in" "conftest.in" >"conftest.tmp"
11967    mv "conftest.tmp" "conftest.in"
11968    cp "conftest.in" "conftest.nl"
11969    $as_echo 'EGREP' >> "conftest.nl"
11970    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11971    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11972    as_fn_arith $ac_count + 1 && ac_count=$as_val
11973    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11974      # Best one so far, save it but keep looking for a better one
11975      ac_cv_path_EGREP="$ac_path_EGREP"
11976      ac_path_EGREP_max=$ac_count
11977    fi
11978    # 10*(2^10) chars as input seems more than enough
11979    test $ac_count -gt 10 && break
11980  done
11981  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11982esac
11983
11984      $ac_path_EGREP_found && break 3
11985    done
11986  done
11987  done
11988IFS=$as_save_IFS
11989  if test -z "$ac_cv_path_EGREP"; then
11990    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11991  fi
11992else
11993  ac_cv_path_EGREP=$EGREP
11994fi
11995
11996   fi
11997fi
11998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11999$as_echo "$ac_cv_path_EGREP" >&6; }
12000 EGREP="$ac_cv_path_EGREP"
12001
12002
12003    else
12004      # If it succeeded, then it was overridden by the user. We will use it
12005      # for the tool.
12006
12007      # First remove it from the list of overridden variables, so we can test
12008      # for unknown variables in the end.
12009      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12010
12011      # Check if the provided tool contains a complete path.
12012      tool_specified="$EGREP"
12013      tool_basename="${tool_specified##*/}"
12014      if test "x$tool_basename" = "x$tool_specified"; then
12015        # A command without a complete path is provided, search $PATH.
12016        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12017$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12018        # Extract the first word of "$tool_basename", so it can be a program name with args.
12019set dummy $tool_basename; ac_word=$2
12020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12021$as_echo_n "checking for $ac_word... " >&6; }
12022if ${ac_cv_path_EGREP+:} false; then :
12023  $as_echo_n "(cached) " >&6
12024else
12025  case $EGREP in
12026  [\\/]* | ?:[\\/]*)
12027  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12028  ;;
12029  *)
12030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12031for as_dir in $PATH
12032do
12033  IFS=$as_save_IFS
12034  test -z "$as_dir" && as_dir=.
12035    for ac_exec_ext in '' $ac_executable_extensions; do
12036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12037    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12039    break 2
12040  fi
12041done
12042  done
12043IFS=$as_save_IFS
12044
12045  ;;
12046esac
12047fi
12048EGREP=$ac_cv_path_EGREP
12049if test -n "$EGREP"; then
12050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12051$as_echo "$EGREP" >&6; }
12052else
12053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12054$as_echo "no" >&6; }
12055fi
12056
12057
12058        if test "x$EGREP" = x; then
12059          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12060        fi
12061      else
12062        # Otherwise we believe it is a complete path. Use it as it is.
12063        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12064$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12065        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12066$as_echo_n "checking for EGREP... " >&6; }
12067        if test ! -x "$tool_specified"; then
12068          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12069$as_echo "not found" >&6; }
12070          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12071        fi
12072        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12073$as_echo "$tool_specified" >&6; }
12074      fi
12075    fi
12076  fi
12077
12078
12079  if test "x$EGREP" = x; then
12080    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12081  fi
12082
12083
12084
12085
12086  # Publish this variable in the help.
12087
12088
12089  if test "x$FGREP" = x; then
12090    # The variable is not set by user, try to locate tool using the code snippet
12091    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12092$as_echo_n "checking for fgrep... " >&6; }
12093if ${ac_cv_path_FGREP+:} false; then :
12094  $as_echo_n "(cached) " >&6
12095else
12096  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12097   then ac_cv_path_FGREP="$GREP -F"
12098   else
12099     if test -z "$FGREP"; then
12100  ac_path_FGREP_found=false
12101  # Loop through the user's path and test for each of PROGNAME-LIST
12102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12103for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12104do
12105  IFS=$as_save_IFS
12106  test -z "$as_dir" && as_dir=.
12107    for ac_prog in fgrep; do
12108    for ac_exec_ext in '' $ac_executable_extensions; do
12109      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12110      as_fn_executable_p "$ac_path_FGREP" || continue
12111# Check for GNU ac_path_FGREP and select it if it is found.
12112  # Check for GNU $ac_path_FGREP
12113case `"$ac_path_FGREP" --version 2>&1` in
12114*GNU*)
12115  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12116*)
12117  ac_count=0
12118  $as_echo_n 0123456789 >"conftest.in"
12119  while :
12120  do
12121    cat "conftest.in" "conftest.in" >"conftest.tmp"
12122    mv "conftest.tmp" "conftest.in"
12123    cp "conftest.in" "conftest.nl"
12124    $as_echo 'FGREP' >> "conftest.nl"
12125    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12126    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12127    as_fn_arith $ac_count + 1 && ac_count=$as_val
12128    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12129      # Best one so far, save it but keep looking for a better one
12130      ac_cv_path_FGREP="$ac_path_FGREP"
12131      ac_path_FGREP_max=$ac_count
12132    fi
12133    # 10*(2^10) chars as input seems more than enough
12134    test $ac_count -gt 10 && break
12135  done
12136  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12137esac
12138
12139      $ac_path_FGREP_found && break 3
12140    done
12141  done
12142  done
12143IFS=$as_save_IFS
12144  if test -z "$ac_cv_path_FGREP"; then
12145    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12146  fi
12147else
12148  ac_cv_path_FGREP=$FGREP
12149fi
12150
12151   fi
12152fi
12153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12154$as_echo "$ac_cv_path_FGREP" >&6; }
12155 FGREP="$ac_cv_path_FGREP"
12156
12157
12158  else
12159    # The variable is set, but is it from the command line or the environment?
12160
12161    # Try to remove the string !FGREP! from our list.
12162    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12163    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12164      # If it failed, the variable was not from the command line. Ignore it,
12165      # but warn the user (except for BASH, which is always set by the calling BASH).
12166      if test "xFGREP" != xBASH; then
12167        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12168$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12169      fi
12170      # Try to locate tool using the code snippet
12171      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12172$as_echo_n "checking for fgrep... " >&6; }
12173if ${ac_cv_path_FGREP+:} false; then :
12174  $as_echo_n "(cached) " >&6
12175else
12176  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12177   then ac_cv_path_FGREP="$GREP -F"
12178   else
12179     if test -z "$FGREP"; then
12180  ac_path_FGREP_found=false
12181  # Loop through the user's path and test for each of PROGNAME-LIST
12182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12183for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12184do
12185  IFS=$as_save_IFS
12186  test -z "$as_dir" && as_dir=.
12187    for ac_prog in fgrep; do
12188    for ac_exec_ext in '' $ac_executable_extensions; do
12189      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12190      as_fn_executable_p "$ac_path_FGREP" || continue
12191# Check for GNU ac_path_FGREP and select it if it is found.
12192  # Check for GNU $ac_path_FGREP
12193case `"$ac_path_FGREP" --version 2>&1` in
12194*GNU*)
12195  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12196*)
12197  ac_count=0
12198  $as_echo_n 0123456789 >"conftest.in"
12199  while :
12200  do
12201    cat "conftest.in" "conftest.in" >"conftest.tmp"
12202    mv "conftest.tmp" "conftest.in"
12203    cp "conftest.in" "conftest.nl"
12204    $as_echo 'FGREP' >> "conftest.nl"
12205    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12206    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12207    as_fn_arith $ac_count + 1 && ac_count=$as_val
12208    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12209      # Best one so far, save it but keep looking for a better one
12210      ac_cv_path_FGREP="$ac_path_FGREP"
12211      ac_path_FGREP_max=$ac_count
12212    fi
12213    # 10*(2^10) chars as input seems more than enough
12214    test $ac_count -gt 10 && break
12215  done
12216  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12217esac
12218
12219      $ac_path_FGREP_found && break 3
12220    done
12221  done
12222  done
12223IFS=$as_save_IFS
12224  if test -z "$ac_cv_path_FGREP"; then
12225    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12226  fi
12227else
12228  ac_cv_path_FGREP=$FGREP
12229fi
12230
12231   fi
12232fi
12233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12234$as_echo "$ac_cv_path_FGREP" >&6; }
12235 FGREP="$ac_cv_path_FGREP"
12236
12237
12238    else
12239      # If it succeeded, then it was overridden by the user. We will use it
12240      # for the tool.
12241
12242      # First remove it from the list of overridden variables, so we can test
12243      # for unknown variables in the end.
12244      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12245
12246      # Check if the provided tool contains a complete path.
12247      tool_specified="$FGREP"
12248      tool_basename="${tool_specified##*/}"
12249      if test "x$tool_basename" = "x$tool_specified"; then
12250        # A command without a complete path is provided, search $PATH.
12251        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12252$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12253        # Extract the first word of "$tool_basename", so it can be a program name with args.
12254set dummy $tool_basename; ac_word=$2
12255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12256$as_echo_n "checking for $ac_word... " >&6; }
12257if ${ac_cv_path_FGREP+:} false; then :
12258  $as_echo_n "(cached) " >&6
12259else
12260  case $FGREP in
12261  [\\/]* | ?:[\\/]*)
12262  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12263  ;;
12264  *)
12265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12266for as_dir in $PATH
12267do
12268  IFS=$as_save_IFS
12269  test -z "$as_dir" && as_dir=.
12270    for ac_exec_ext in '' $ac_executable_extensions; do
12271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12272    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12274    break 2
12275  fi
12276done
12277  done
12278IFS=$as_save_IFS
12279
12280  ;;
12281esac
12282fi
12283FGREP=$ac_cv_path_FGREP
12284if test -n "$FGREP"; then
12285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12286$as_echo "$FGREP" >&6; }
12287else
12288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12289$as_echo "no" >&6; }
12290fi
12291
12292
12293        if test "x$FGREP" = x; then
12294          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12295        fi
12296      else
12297        # Otherwise we believe it is a complete path. Use it as it is.
12298        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12299$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12300        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12301$as_echo_n "checking for FGREP... " >&6; }
12302        if test ! -x "$tool_specified"; then
12303          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12304$as_echo "not found" >&6; }
12305          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12306        fi
12307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12308$as_echo "$tool_specified" >&6; }
12309      fi
12310    fi
12311  fi
12312
12313
12314  if test "x$FGREP" = x; then
12315    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12316  fi
12317
12318
12319
12320
12321  # Publish this variable in the help.
12322
12323
12324  if test "x$SED" = x; then
12325    # The variable is not set by user, try to locate tool using the code snippet
12326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12327$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12328if ${ac_cv_path_SED+:} false; then :
12329  $as_echo_n "(cached) " >&6
12330else
12331            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12332     for ac_i in 1 2 3 4 5 6 7; do
12333       ac_script="$ac_script$as_nl$ac_script"
12334     done
12335     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12336     { ac_script=; unset ac_script;}
12337     if test -z "$SED"; then
12338  ac_path_SED_found=false
12339  # Loop through the user's path and test for each of PROGNAME-LIST
12340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12341for as_dir in $PATH
12342do
12343  IFS=$as_save_IFS
12344  test -z "$as_dir" && as_dir=.
12345    for ac_prog in sed gsed; do
12346    for ac_exec_ext in '' $ac_executable_extensions; do
12347      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12348      as_fn_executable_p "$ac_path_SED" || continue
12349# Check for GNU ac_path_SED and select it if it is found.
12350  # Check for GNU $ac_path_SED
12351case `"$ac_path_SED" --version 2>&1` in
12352*GNU*)
12353  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12354*)
12355  ac_count=0
12356  $as_echo_n 0123456789 >"conftest.in"
12357  while :
12358  do
12359    cat "conftest.in" "conftest.in" >"conftest.tmp"
12360    mv "conftest.tmp" "conftest.in"
12361    cp "conftest.in" "conftest.nl"
12362    $as_echo '' >> "conftest.nl"
12363    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12364    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12365    as_fn_arith $ac_count + 1 && ac_count=$as_val
12366    if test $ac_count -gt ${ac_path_SED_max-0}; then
12367      # Best one so far, save it but keep looking for a better one
12368      ac_cv_path_SED="$ac_path_SED"
12369      ac_path_SED_max=$ac_count
12370    fi
12371    # 10*(2^10) chars as input seems more than enough
12372    test $ac_count -gt 10 && break
12373  done
12374  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12375esac
12376
12377      $ac_path_SED_found && break 3
12378    done
12379  done
12380  done
12381IFS=$as_save_IFS
12382  if test -z "$ac_cv_path_SED"; then
12383    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12384  fi
12385else
12386  ac_cv_path_SED=$SED
12387fi
12388
12389fi
12390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12391$as_echo "$ac_cv_path_SED" >&6; }
12392 SED="$ac_cv_path_SED"
12393  rm -f conftest.sed
12394
12395  else
12396    # The variable is set, but is it from the command line or the environment?
12397
12398    # Try to remove the string !SED! from our list.
12399    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12400    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12401      # If it failed, the variable was not from the command line. Ignore it,
12402      # but warn the user (except for BASH, which is always set by the calling BASH).
12403      if test "xSED" != xBASH; then
12404        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12405$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12406      fi
12407      # Try to locate tool using the code snippet
12408      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12409$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12410if ${ac_cv_path_SED+:} false; then :
12411  $as_echo_n "(cached) " >&6
12412else
12413            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12414     for ac_i in 1 2 3 4 5 6 7; do
12415       ac_script="$ac_script$as_nl$ac_script"
12416     done
12417     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12418     { ac_script=; unset ac_script;}
12419     if test -z "$SED"; then
12420  ac_path_SED_found=false
12421  # Loop through the user's path and test for each of PROGNAME-LIST
12422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12423for as_dir in $PATH
12424do
12425  IFS=$as_save_IFS
12426  test -z "$as_dir" && as_dir=.
12427    for ac_prog in sed gsed; do
12428    for ac_exec_ext in '' $ac_executable_extensions; do
12429      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12430      as_fn_executable_p "$ac_path_SED" || continue
12431# Check for GNU ac_path_SED and select it if it is found.
12432  # Check for GNU $ac_path_SED
12433case `"$ac_path_SED" --version 2>&1` in
12434*GNU*)
12435  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12436*)
12437  ac_count=0
12438  $as_echo_n 0123456789 >"conftest.in"
12439  while :
12440  do
12441    cat "conftest.in" "conftest.in" >"conftest.tmp"
12442    mv "conftest.tmp" "conftest.in"
12443    cp "conftest.in" "conftest.nl"
12444    $as_echo '' >> "conftest.nl"
12445    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12446    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12447    as_fn_arith $ac_count + 1 && ac_count=$as_val
12448    if test $ac_count -gt ${ac_path_SED_max-0}; then
12449      # Best one so far, save it but keep looking for a better one
12450      ac_cv_path_SED="$ac_path_SED"
12451      ac_path_SED_max=$ac_count
12452    fi
12453    # 10*(2^10) chars as input seems more than enough
12454    test $ac_count -gt 10 && break
12455  done
12456  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12457esac
12458
12459      $ac_path_SED_found && break 3
12460    done
12461  done
12462  done
12463IFS=$as_save_IFS
12464  if test -z "$ac_cv_path_SED"; then
12465    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12466  fi
12467else
12468  ac_cv_path_SED=$SED
12469fi
12470
12471fi
12472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12473$as_echo "$ac_cv_path_SED" >&6; }
12474 SED="$ac_cv_path_SED"
12475  rm -f conftest.sed
12476
12477    else
12478      # If it succeeded, then it was overridden by the user. We will use it
12479      # for the tool.
12480
12481      # First remove it from the list of overridden variables, so we can test
12482      # for unknown variables in the end.
12483      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12484
12485      # Check if the provided tool contains a complete path.
12486      tool_specified="$SED"
12487      tool_basename="${tool_specified##*/}"
12488      if test "x$tool_basename" = "x$tool_specified"; then
12489        # A command without a complete path is provided, search $PATH.
12490        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12491$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12492        # Extract the first word of "$tool_basename", so it can be a program name with args.
12493set dummy $tool_basename; ac_word=$2
12494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12495$as_echo_n "checking for $ac_word... " >&6; }
12496if ${ac_cv_path_SED+:} false; then :
12497  $as_echo_n "(cached) " >&6
12498else
12499  case $SED in
12500  [\\/]* | ?:[\\/]*)
12501  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12502  ;;
12503  *)
12504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12505for as_dir in $PATH
12506do
12507  IFS=$as_save_IFS
12508  test -z "$as_dir" && as_dir=.
12509    for ac_exec_ext in '' $ac_executable_extensions; do
12510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12511    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12513    break 2
12514  fi
12515done
12516  done
12517IFS=$as_save_IFS
12518
12519  ;;
12520esac
12521fi
12522SED=$ac_cv_path_SED
12523if test -n "$SED"; then
12524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12525$as_echo "$SED" >&6; }
12526else
12527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12528$as_echo "no" >&6; }
12529fi
12530
12531
12532        if test "x$SED" = x; then
12533          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12534        fi
12535      else
12536        # Otherwise we believe it is a complete path. Use it as it is.
12537        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12538$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12539        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12540$as_echo_n "checking for SED... " >&6; }
12541        if test ! -x "$tool_specified"; then
12542          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12543$as_echo "not found" >&6; }
12544          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12545        fi
12546        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12547$as_echo "$tool_specified" >&6; }
12548      fi
12549    fi
12550  fi
12551
12552
12553  if test "x$SED" = x; then
12554    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12555  fi
12556
12557
12558
12559  # Always force rm.
12560  RM="$RM -f"
12561
12562  # pwd behaves differently on various platforms and some don't support the -L flag.
12563  # Always use the bash builtin pwd to get uniform behavior.
12564  THEPWDCMD=pwd
12565
12566  # These are not required on all platforms
12567
12568
12569  # Publish this variable in the help.
12570
12571
12572  if test "x$CYGPATH" = x; then
12573    # The variable is not set by user, try to locate tool using the code snippet
12574    for ac_prog in cygpath
12575do
12576  # Extract the first word of "$ac_prog", so it can be a program name with args.
12577set dummy $ac_prog; ac_word=$2
12578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12579$as_echo_n "checking for $ac_word... " >&6; }
12580if ${ac_cv_path_CYGPATH+:} false; then :
12581  $as_echo_n "(cached) " >&6
12582else
12583  case $CYGPATH in
12584  [\\/]* | ?:[\\/]*)
12585  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12586  ;;
12587  *)
12588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12589for as_dir in $PATH
12590do
12591  IFS=$as_save_IFS
12592  test -z "$as_dir" && as_dir=.
12593    for ac_exec_ext in '' $ac_executable_extensions; do
12594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12595    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12597    break 2
12598  fi
12599done
12600  done
12601IFS=$as_save_IFS
12602
12603  ;;
12604esac
12605fi
12606CYGPATH=$ac_cv_path_CYGPATH
12607if test -n "$CYGPATH"; then
12608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12609$as_echo "$CYGPATH" >&6; }
12610else
12611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12612$as_echo "no" >&6; }
12613fi
12614
12615
12616  test -n "$CYGPATH" && break
12617done
12618
12619  else
12620    # The variable is set, but is it from the command line or the environment?
12621
12622    # Try to remove the string !CYGPATH! from our list.
12623    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12624    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12625      # If it failed, the variable was not from the command line. Ignore it,
12626      # but warn the user (except for BASH, which is always set by the calling BASH).
12627      if test "xCYGPATH" != xBASH; then
12628        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12629$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12630      fi
12631      # Try to locate tool using the code snippet
12632      for ac_prog in cygpath
12633do
12634  # Extract the first word of "$ac_prog", so it can be a program name with args.
12635set dummy $ac_prog; ac_word=$2
12636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12637$as_echo_n "checking for $ac_word... " >&6; }
12638if ${ac_cv_path_CYGPATH+:} false; then :
12639  $as_echo_n "(cached) " >&6
12640else
12641  case $CYGPATH in
12642  [\\/]* | ?:[\\/]*)
12643  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12644  ;;
12645  *)
12646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12647for as_dir in $PATH
12648do
12649  IFS=$as_save_IFS
12650  test -z "$as_dir" && as_dir=.
12651    for ac_exec_ext in '' $ac_executable_extensions; do
12652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12653    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12655    break 2
12656  fi
12657done
12658  done
12659IFS=$as_save_IFS
12660
12661  ;;
12662esac
12663fi
12664CYGPATH=$ac_cv_path_CYGPATH
12665if test -n "$CYGPATH"; then
12666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12667$as_echo "$CYGPATH" >&6; }
12668else
12669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12670$as_echo "no" >&6; }
12671fi
12672
12673
12674  test -n "$CYGPATH" && break
12675done
12676
12677    else
12678      # If it succeeded, then it was overridden by the user. We will use it
12679      # for the tool.
12680
12681      # First remove it from the list of overridden variables, so we can test
12682      # for unknown variables in the end.
12683      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12684
12685      # Check if the provided tool contains a complete path.
12686      tool_specified="$CYGPATH"
12687      tool_basename="${tool_specified##*/}"
12688      if test "x$tool_basename" = "x$tool_specified"; then
12689        # A command without a complete path is provided, search $PATH.
12690        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12691$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12692        # Extract the first word of "$tool_basename", so it can be a program name with args.
12693set dummy $tool_basename; ac_word=$2
12694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12695$as_echo_n "checking for $ac_word... " >&6; }
12696if ${ac_cv_path_CYGPATH+:} false; then :
12697  $as_echo_n "(cached) " >&6
12698else
12699  case $CYGPATH in
12700  [\\/]* | ?:[\\/]*)
12701  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12702  ;;
12703  *)
12704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12705for as_dir in $PATH
12706do
12707  IFS=$as_save_IFS
12708  test -z "$as_dir" && as_dir=.
12709    for ac_exec_ext in '' $ac_executable_extensions; do
12710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12711    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12713    break 2
12714  fi
12715done
12716  done
12717IFS=$as_save_IFS
12718
12719  ;;
12720esac
12721fi
12722CYGPATH=$ac_cv_path_CYGPATH
12723if test -n "$CYGPATH"; then
12724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12725$as_echo "$CYGPATH" >&6; }
12726else
12727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12728$as_echo "no" >&6; }
12729fi
12730
12731
12732        if test "x$CYGPATH" = x; then
12733          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12734        fi
12735      else
12736        # Otherwise we believe it is a complete path. Use it as it is.
12737        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12738$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12739        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12740$as_echo_n "checking for CYGPATH... " >&6; }
12741        if test ! -x "$tool_specified"; then
12742          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12743$as_echo "not found" >&6; }
12744          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12745        fi
12746        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12747$as_echo "$tool_specified" >&6; }
12748      fi
12749    fi
12750  fi
12751
12752
12753
12754
12755  # Publish this variable in the help.
12756
12757
12758  if test "x$READLINK" = x; then
12759    # The variable is not set by user, try to locate tool using the code snippet
12760    for ac_prog in greadlink readlink
12761do
12762  # Extract the first word of "$ac_prog", so it can be a program name with args.
12763set dummy $ac_prog; ac_word=$2
12764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12765$as_echo_n "checking for $ac_word... " >&6; }
12766if ${ac_cv_path_READLINK+:} false; then :
12767  $as_echo_n "(cached) " >&6
12768else
12769  case $READLINK in
12770  [\\/]* | ?:[\\/]*)
12771  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12772  ;;
12773  *)
12774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12775for as_dir in $PATH
12776do
12777  IFS=$as_save_IFS
12778  test -z "$as_dir" && as_dir=.
12779    for ac_exec_ext in '' $ac_executable_extensions; do
12780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12781    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12783    break 2
12784  fi
12785done
12786  done
12787IFS=$as_save_IFS
12788
12789  ;;
12790esac
12791fi
12792READLINK=$ac_cv_path_READLINK
12793if test -n "$READLINK"; then
12794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12795$as_echo "$READLINK" >&6; }
12796else
12797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12798$as_echo "no" >&6; }
12799fi
12800
12801
12802  test -n "$READLINK" && break
12803done
12804
12805  else
12806    # The variable is set, but is it from the command line or the environment?
12807
12808    # Try to remove the string !READLINK! from our list.
12809    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12810    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12811      # If it failed, the variable was not from the command line. Ignore it,
12812      # but warn the user (except for BASH, which is always set by the calling BASH).
12813      if test "xREADLINK" != xBASH; then
12814        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12815$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12816      fi
12817      # Try to locate tool using the code snippet
12818      for ac_prog in greadlink readlink
12819do
12820  # Extract the first word of "$ac_prog", so it can be a program name with args.
12821set dummy $ac_prog; ac_word=$2
12822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12823$as_echo_n "checking for $ac_word... " >&6; }
12824if ${ac_cv_path_READLINK+:} false; then :
12825  $as_echo_n "(cached) " >&6
12826else
12827  case $READLINK in
12828  [\\/]* | ?:[\\/]*)
12829  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12830  ;;
12831  *)
12832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12833for as_dir in $PATH
12834do
12835  IFS=$as_save_IFS
12836  test -z "$as_dir" && as_dir=.
12837    for ac_exec_ext in '' $ac_executable_extensions; do
12838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12839    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12841    break 2
12842  fi
12843done
12844  done
12845IFS=$as_save_IFS
12846
12847  ;;
12848esac
12849fi
12850READLINK=$ac_cv_path_READLINK
12851if test -n "$READLINK"; then
12852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12853$as_echo "$READLINK" >&6; }
12854else
12855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12856$as_echo "no" >&6; }
12857fi
12858
12859
12860  test -n "$READLINK" && break
12861done
12862
12863    else
12864      # If it succeeded, then it was overridden by the user. We will use it
12865      # for the tool.
12866
12867      # First remove it from the list of overridden variables, so we can test
12868      # for unknown variables in the end.
12869      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12870
12871      # Check if the provided tool contains a complete path.
12872      tool_specified="$READLINK"
12873      tool_basename="${tool_specified##*/}"
12874      if test "x$tool_basename" = "x$tool_specified"; then
12875        # A command without a complete path is provided, search $PATH.
12876        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12877$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12878        # Extract the first word of "$tool_basename", so it can be a program name with args.
12879set dummy $tool_basename; ac_word=$2
12880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12881$as_echo_n "checking for $ac_word... " >&6; }
12882if ${ac_cv_path_READLINK+:} false; then :
12883  $as_echo_n "(cached) " >&6
12884else
12885  case $READLINK in
12886  [\\/]* | ?:[\\/]*)
12887  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12888  ;;
12889  *)
12890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12891for as_dir in $PATH
12892do
12893  IFS=$as_save_IFS
12894  test -z "$as_dir" && as_dir=.
12895    for ac_exec_ext in '' $ac_executable_extensions; do
12896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12897    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12899    break 2
12900  fi
12901done
12902  done
12903IFS=$as_save_IFS
12904
12905  ;;
12906esac
12907fi
12908READLINK=$ac_cv_path_READLINK
12909if test -n "$READLINK"; then
12910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12911$as_echo "$READLINK" >&6; }
12912else
12913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12914$as_echo "no" >&6; }
12915fi
12916
12917
12918        if test "x$READLINK" = x; then
12919          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12920        fi
12921      else
12922        # Otherwise we believe it is a complete path. Use it as it is.
12923        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12924$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12925        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12926$as_echo_n "checking for READLINK... " >&6; }
12927        if test ! -x "$tool_specified"; then
12928          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12929$as_echo "not found" >&6; }
12930          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12931        fi
12932        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12933$as_echo "$tool_specified" >&6; }
12934      fi
12935    fi
12936  fi
12937
12938
12939
12940
12941  # Publish this variable in the help.
12942
12943
12944  if test "x$DF" = x; then
12945    # The variable is not set by user, try to locate tool using the code snippet
12946    for ac_prog in df
12947do
12948  # Extract the first word of "$ac_prog", so it can be a program name with args.
12949set dummy $ac_prog; ac_word=$2
12950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12951$as_echo_n "checking for $ac_word... " >&6; }
12952if ${ac_cv_path_DF+:} false; then :
12953  $as_echo_n "(cached) " >&6
12954else
12955  case $DF in
12956  [\\/]* | ?:[\\/]*)
12957  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12958  ;;
12959  *)
12960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12961for as_dir in $PATH
12962do
12963  IFS=$as_save_IFS
12964  test -z "$as_dir" && as_dir=.
12965    for ac_exec_ext in '' $ac_executable_extensions; do
12966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12967    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12969    break 2
12970  fi
12971done
12972  done
12973IFS=$as_save_IFS
12974
12975  ;;
12976esac
12977fi
12978DF=$ac_cv_path_DF
12979if test -n "$DF"; then
12980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12981$as_echo "$DF" >&6; }
12982else
12983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12984$as_echo "no" >&6; }
12985fi
12986
12987
12988  test -n "$DF" && break
12989done
12990
12991  else
12992    # The variable is set, but is it from the command line or the environment?
12993
12994    # Try to remove the string !DF! from our list.
12995    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12996    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12997      # If it failed, the variable was not from the command line. Ignore it,
12998      # but warn the user (except for BASH, which is always set by the calling BASH).
12999      if test "xDF" != xBASH; then
13000        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13001$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13002      fi
13003      # Try to locate tool using the code snippet
13004      for ac_prog in df
13005do
13006  # Extract the first word of "$ac_prog", so it can be a program name with args.
13007set dummy $ac_prog; ac_word=$2
13008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13009$as_echo_n "checking for $ac_word... " >&6; }
13010if ${ac_cv_path_DF+:} false; then :
13011  $as_echo_n "(cached) " >&6
13012else
13013  case $DF in
13014  [\\/]* | ?:[\\/]*)
13015  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13016  ;;
13017  *)
13018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13019for as_dir in $PATH
13020do
13021  IFS=$as_save_IFS
13022  test -z "$as_dir" && as_dir=.
13023    for ac_exec_ext in '' $ac_executable_extensions; do
13024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13025    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13027    break 2
13028  fi
13029done
13030  done
13031IFS=$as_save_IFS
13032
13033  ;;
13034esac
13035fi
13036DF=$ac_cv_path_DF
13037if test -n "$DF"; then
13038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13039$as_echo "$DF" >&6; }
13040else
13041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13042$as_echo "no" >&6; }
13043fi
13044
13045
13046  test -n "$DF" && break
13047done
13048
13049    else
13050      # If it succeeded, then it was overridden by the user. We will use it
13051      # for the tool.
13052
13053      # First remove it from the list of overridden variables, so we can test
13054      # for unknown variables in the end.
13055      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13056
13057      # Check if the provided tool contains a complete path.
13058      tool_specified="$DF"
13059      tool_basename="${tool_specified##*/}"
13060      if test "x$tool_basename" = "x$tool_specified"; then
13061        # A command without a complete path is provided, search $PATH.
13062        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13063$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13064        # Extract the first word of "$tool_basename", so it can be a program name with args.
13065set dummy $tool_basename; ac_word=$2
13066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13067$as_echo_n "checking for $ac_word... " >&6; }
13068if ${ac_cv_path_DF+:} false; then :
13069  $as_echo_n "(cached) " >&6
13070else
13071  case $DF in
13072  [\\/]* | ?:[\\/]*)
13073  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13074  ;;
13075  *)
13076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13077for as_dir in $PATH
13078do
13079  IFS=$as_save_IFS
13080  test -z "$as_dir" && as_dir=.
13081    for ac_exec_ext in '' $ac_executable_extensions; do
13082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13083    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13085    break 2
13086  fi
13087done
13088  done
13089IFS=$as_save_IFS
13090
13091  ;;
13092esac
13093fi
13094DF=$ac_cv_path_DF
13095if test -n "$DF"; then
13096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13097$as_echo "$DF" >&6; }
13098else
13099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13100$as_echo "no" >&6; }
13101fi
13102
13103
13104        if test "x$DF" = x; then
13105          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13106        fi
13107      else
13108        # Otherwise we believe it is a complete path. Use it as it is.
13109        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13110$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13111        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13112$as_echo_n "checking for DF... " >&6; }
13113        if test ! -x "$tool_specified"; then
13114          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13115$as_echo "not found" >&6; }
13116          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13117        fi
13118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13119$as_echo "$tool_specified" >&6; }
13120      fi
13121    fi
13122  fi
13123
13124
13125
13126
13127  # Publish this variable in the help.
13128
13129
13130  if test "x$SETFILE" = x; then
13131    # The variable is not set by user, try to locate tool using the code snippet
13132    for ac_prog in SetFile
13133do
13134  # Extract the first word of "$ac_prog", so it can be a program name with args.
13135set dummy $ac_prog; ac_word=$2
13136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13137$as_echo_n "checking for $ac_word... " >&6; }
13138if ${ac_cv_path_SETFILE+:} false; then :
13139  $as_echo_n "(cached) " >&6
13140else
13141  case $SETFILE in
13142  [\\/]* | ?:[\\/]*)
13143  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13144  ;;
13145  *)
13146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13147for as_dir in $PATH
13148do
13149  IFS=$as_save_IFS
13150  test -z "$as_dir" && as_dir=.
13151    for ac_exec_ext in '' $ac_executable_extensions; do
13152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13153    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13155    break 2
13156  fi
13157done
13158  done
13159IFS=$as_save_IFS
13160
13161  ;;
13162esac
13163fi
13164SETFILE=$ac_cv_path_SETFILE
13165if test -n "$SETFILE"; then
13166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13167$as_echo "$SETFILE" >&6; }
13168else
13169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13170$as_echo "no" >&6; }
13171fi
13172
13173
13174  test -n "$SETFILE" && break
13175done
13176
13177  else
13178    # The variable is set, but is it from the command line or the environment?
13179
13180    # Try to remove the string !SETFILE! from our list.
13181    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13182    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13183      # If it failed, the variable was not from the command line. Ignore it,
13184      # but warn the user (except for BASH, which is always set by the calling BASH).
13185      if test "xSETFILE" != xBASH; then
13186        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13187$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13188      fi
13189      # Try to locate tool using the code snippet
13190      for ac_prog in SetFile
13191do
13192  # Extract the first word of "$ac_prog", so it can be a program name with args.
13193set dummy $ac_prog; ac_word=$2
13194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13195$as_echo_n "checking for $ac_word... " >&6; }
13196if ${ac_cv_path_SETFILE+:} false; then :
13197  $as_echo_n "(cached) " >&6
13198else
13199  case $SETFILE in
13200  [\\/]* | ?:[\\/]*)
13201  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13202  ;;
13203  *)
13204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13205for as_dir in $PATH
13206do
13207  IFS=$as_save_IFS
13208  test -z "$as_dir" && as_dir=.
13209    for ac_exec_ext in '' $ac_executable_extensions; do
13210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13211    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13213    break 2
13214  fi
13215done
13216  done
13217IFS=$as_save_IFS
13218
13219  ;;
13220esac
13221fi
13222SETFILE=$ac_cv_path_SETFILE
13223if test -n "$SETFILE"; then
13224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13225$as_echo "$SETFILE" >&6; }
13226else
13227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13228$as_echo "no" >&6; }
13229fi
13230
13231
13232  test -n "$SETFILE" && break
13233done
13234
13235    else
13236      # If it succeeded, then it was overridden by the user. We will use it
13237      # for the tool.
13238
13239      # First remove it from the list of overridden variables, so we can test
13240      # for unknown variables in the end.
13241      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13242
13243      # Check if the provided tool contains a complete path.
13244      tool_specified="$SETFILE"
13245      tool_basename="${tool_specified##*/}"
13246      if test "x$tool_basename" = "x$tool_specified"; then
13247        # A command without a complete path is provided, search $PATH.
13248        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13249$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13250        # Extract the first word of "$tool_basename", so it can be a program name with args.
13251set dummy $tool_basename; ac_word=$2
13252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13253$as_echo_n "checking for $ac_word... " >&6; }
13254if ${ac_cv_path_SETFILE+:} false; then :
13255  $as_echo_n "(cached) " >&6
13256else
13257  case $SETFILE in
13258  [\\/]* | ?:[\\/]*)
13259  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13260  ;;
13261  *)
13262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13263for as_dir in $PATH
13264do
13265  IFS=$as_save_IFS
13266  test -z "$as_dir" && as_dir=.
13267    for ac_exec_ext in '' $ac_executable_extensions; do
13268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13269    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13271    break 2
13272  fi
13273done
13274  done
13275IFS=$as_save_IFS
13276
13277  ;;
13278esac
13279fi
13280SETFILE=$ac_cv_path_SETFILE
13281if test -n "$SETFILE"; then
13282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13283$as_echo "$SETFILE" >&6; }
13284else
13285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13286$as_echo "no" >&6; }
13287fi
13288
13289
13290        if test "x$SETFILE" = x; then
13291          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13292        fi
13293      else
13294        # Otherwise we believe it is a complete path. Use it as it is.
13295        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13296$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13298$as_echo_n "checking for SETFILE... " >&6; }
13299        if test ! -x "$tool_specified"; then
13300          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13301$as_echo "not found" >&6; }
13302          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13303        fi
13304        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13305$as_echo "$tool_specified" >&6; }
13306      fi
13307    fi
13308  fi
13309
13310
13311
13312
13313# Now we can determine OpenJDK build and target platforms. This is required to
13314# have early on.
13315# Make sure we can run config.sub.
13316$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13317  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13318
13319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13320$as_echo_n "checking build system type... " >&6; }
13321if ${ac_cv_build+:} false; then :
13322  $as_echo_n "(cached) " >&6
13323else
13324  ac_build_alias=$build_alias
13325test "x$ac_build_alias" = x &&
13326  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13327test "x$ac_build_alias" = x &&
13328  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13329ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13330  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13331
13332fi
13333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13334$as_echo "$ac_cv_build" >&6; }
13335case $ac_cv_build in
13336*-*-*) ;;
13337*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13338esac
13339build=$ac_cv_build
13340ac_save_IFS=$IFS; IFS='-'
13341set x $ac_cv_build
13342shift
13343build_cpu=$1
13344build_vendor=$2
13345shift; shift
13346# Remember, the first character of IFS is used to create $*,
13347# except with old shells:
13348build_os=$*
13349IFS=$ac_save_IFS
13350case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13351
13352
13353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13354$as_echo_n "checking host system type... " >&6; }
13355if ${ac_cv_host+:} false; then :
13356  $as_echo_n "(cached) " >&6
13357else
13358  if test "x$host_alias" = x; then
13359  ac_cv_host=$ac_cv_build
13360else
13361  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13362    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13363fi
13364
13365fi
13366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13367$as_echo "$ac_cv_host" >&6; }
13368case $ac_cv_host in
13369*-*-*) ;;
13370*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13371esac
13372host=$ac_cv_host
13373ac_save_IFS=$IFS; IFS='-'
13374set x $ac_cv_host
13375shift
13376host_cpu=$1
13377host_vendor=$2
13378shift; shift
13379# Remember, the first character of IFS is used to create $*,
13380# except with old shells:
13381host_os=$*
13382IFS=$ac_save_IFS
13383case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13384
13385
13386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13387$as_echo_n "checking target system type... " >&6; }
13388if ${ac_cv_target+:} false; then :
13389  $as_echo_n "(cached) " >&6
13390else
13391  if test "x$target_alias" = x; then
13392  ac_cv_target=$ac_cv_host
13393else
13394  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13395    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13396fi
13397
13398fi
13399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13400$as_echo "$ac_cv_target" >&6; }
13401case $ac_cv_target in
13402*-*-*) ;;
13403*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13404esac
13405target=$ac_cv_target
13406ac_save_IFS=$IFS; IFS='-'
13407set x $ac_cv_target
13408shift
13409target_cpu=$1
13410target_vendor=$2
13411shift; shift
13412# Remember, the first character of IFS is used to create $*,
13413# except with old shells:
13414target_os=$*
13415IFS=$ac_save_IFS
13416case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13417
13418
13419# The aliases save the names the user supplied, while $host etc.
13420# will get canonicalized.
13421test -n "$target_alias" &&
13422  test "$program_prefix$program_suffix$program_transform_name" = \
13423    NONENONEs,x,x, &&
13424  program_prefix=${target_alias}-
13425
13426  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13427  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13428  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13429  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13430  # to use the configure naming style.
13431
13432
13433
13434
13435
13436  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13437  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13438  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13439  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13440  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13441  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13442
13443
13444
13445  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13446
13447  case "$build_os" in
13448    *linux*)
13449      VAR_OS=linux
13450      VAR_OS_API=posix
13451      VAR_OS_ENV=linux
13452      ;;
13453    *solaris*)
13454      VAR_OS=solaris
13455      VAR_OS_API=posix
13456      VAR_OS_ENV=solaris
13457      ;;
13458    *darwin*)
13459      VAR_OS=macosx
13460      VAR_OS_API=posix
13461      VAR_OS_ENV=macosx
13462      ;;
13463    *bsd*)
13464      VAR_OS=bsd
13465      VAR_OS_API=posix
13466      VAR_OS_ENV=bsd
13467      ;;
13468    *cygwin*)
13469      VAR_OS=windows
13470      VAR_OS_API=winapi
13471      VAR_OS_ENV=windows.cygwin
13472      ;;
13473    *mingw*)
13474      VAR_OS=windows
13475      VAR_OS_API=winapi
13476      VAR_OS_ENV=windows.msys
13477      ;;
13478    *aix*)
13479      VAR_OS=aix
13480      VAR_OS_API=posix
13481      VAR_OS_ENV=aix
13482      ;;
13483    *)
13484      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13485      ;;
13486  esac
13487
13488
13489  # First argument is the cpu name from the trip/quad
13490  case "$build_cpu" in
13491    x86_64)
13492      VAR_CPU=x86_64
13493      VAR_CPU_ARCH=x86
13494      VAR_CPU_BITS=64
13495      VAR_CPU_ENDIAN=little
13496      ;;
13497    i?86)
13498      VAR_CPU=x86
13499      VAR_CPU_ARCH=x86
13500      VAR_CPU_BITS=32
13501      VAR_CPU_ENDIAN=little
13502      ;;
13503    arm*)
13504      VAR_CPU=arm
13505      VAR_CPU_ARCH=arm
13506      VAR_CPU_BITS=32
13507      VAR_CPU_ENDIAN=little
13508      ;;
13509    powerpc)
13510      VAR_CPU=ppc
13511      VAR_CPU_ARCH=ppc
13512      VAR_CPU_BITS=32
13513      VAR_CPU_ENDIAN=big
13514      ;;
13515    powerpc64)
13516      VAR_CPU=ppc64
13517      VAR_CPU_ARCH=ppc
13518      VAR_CPU_BITS=64
13519      VAR_CPU_ENDIAN=big
13520      ;;
13521    s390)
13522      VAR_CPU=s390
13523      VAR_CPU_ARCH=s390
13524      VAR_CPU_BITS=32
13525      VAR_CPU_ENDIAN=big
13526      ;;
13527    s390x)
13528      VAR_CPU=s390x
13529      VAR_CPU_ARCH=s390
13530      VAR_CPU_BITS=64
13531      VAR_CPU_ENDIAN=big
13532      ;;
13533    sparc)
13534      VAR_CPU=sparc
13535      VAR_CPU_ARCH=sparc
13536      VAR_CPU_BITS=32
13537      VAR_CPU_ENDIAN=big
13538      ;;
13539    sparcv9)
13540      VAR_CPU=sparcv9
13541      VAR_CPU_ARCH=sparc
13542      VAR_CPU_BITS=64
13543      VAR_CPU_ENDIAN=big
13544      ;;
13545    *)
13546      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13547      ;;
13548  esac
13549
13550  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13551  OPENJDK_BUILD_OS="$VAR_OS"
13552  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13553  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13554  OPENJDK_BUILD_CPU="$VAR_CPU"
13555  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13556  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13557  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13558
13559
13560
13561
13562
13563
13564
13565  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13566$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13568$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13569
13570  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13571
13572  case "$host_os" in
13573    *linux*)
13574      VAR_OS=linux
13575      VAR_OS_API=posix
13576      VAR_OS_ENV=linux
13577      ;;
13578    *solaris*)
13579      VAR_OS=solaris
13580      VAR_OS_API=posix
13581      VAR_OS_ENV=solaris
13582      ;;
13583    *darwin*)
13584      VAR_OS=macosx
13585      VAR_OS_API=posix
13586      VAR_OS_ENV=macosx
13587      ;;
13588    *bsd*)
13589      VAR_OS=bsd
13590      VAR_OS_API=posix
13591      VAR_OS_ENV=bsd
13592      ;;
13593    *cygwin*)
13594      VAR_OS=windows
13595      VAR_OS_API=winapi
13596      VAR_OS_ENV=windows.cygwin
13597      ;;
13598    *mingw*)
13599      VAR_OS=windows
13600      VAR_OS_API=winapi
13601      VAR_OS_ENV=windows.msys
13602      ;;
13603    *aix*)
13604      VAR_OS=aix
13605      VAR_OS_API=posix
13606      VAR_OS_ENV=aix
13607      ;;
13608    *)
13609      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13610      ;;
13611  esac
13612
13613
13614  # First argument is the cpu name from the trip/quad
13615  case "$host_cpu" in
13616    x86_64)
13617      VAR_CPU=x86_64
13618      VAR_CPU_ARCH=x86
13619      VAR_CPU_BITS=64
13620      VAR_CPU_ENDIAN=little
13621      ;;
13622    i?86)
13623      VAR_CPU=x86
13624      VAR_CPU_ARCH=x86
13625      VAR_CPU_BITS=32
13626      VAR_CPU_ENDIAN=little
13627      ;;
13628    arm*)
13629      VAR_CPU=arm
13630      VAR_CPU_ARCH=arm
13631      VAR_CPU_BITS=32
13632      VAR_CPU_ENDIAN=little
13633      ;;
13634    powerpc)
13635      VAR_CPU=ppc
13636      VAR_CPU_ARCH=ppc
13637      VAR_CPU_BITS=32
13638      VAR_CPU_ENDIAN=big
13639      ;;
13640    powerpc64)
13641      VAR_CPU=ppc64
13642      VAR_CPU_ARCH=ppc
13643      VAR_CPU_BITS=64
13644      VAR_CPU_ENDIAN=big
13645      ;;
13646    s390)
13647      VAR_CPU=s390
13648      VAR_CPU_ARCH=s390
13649      VAR_CPU_BITS=32
13650      VAR_CPU_ENDIAN=big
13651      ;;
13652    s390x)
13653      VAR_CPU=s390x
13654      VAR_CPU_ARCH=s390
13655      VAR_CPU_BITS=64
13656      VAR_CPU_ENDIAN=big
13657      ;;
13658    sparc)
13659      VAR_CPU=sparc
13660      VAR_CPU_ARCH=sparc
13661      VAR_CPU_BITS=32
13662      VAR_CPU_ENDIAN=big
13663      ;;
13664    sparcv9)
13665      VAR_CPU=sparcv9
13666      VAR_CPU_ARCH=sparc
13667      VAR_CPU_BITS=64
13668      VAR_CPU_ENDIAN=big
13669      ;;
13670    *)
13671      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13672      ;;
13673  esac
13674
13675  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13676  OPENJDK_TARGET_OS="$VAR_OS"
13677  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13678  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13679  OPENJDK_TARGET_CPU="$VAR_CPU"
13680  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13681  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13682  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13683
13684
13685
13686
13687
13688
13689
13690  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13691$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13693$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13694
13695
13696
13697# Check whether --with-target-bits was given.
13698if test "${with_target_bits+set}" = set; then :
13699  withval=$with_target_bits;
13700fi
13701
13702
13703  # We have three types of compiles:
13704  # native  == normal compilation, target system == build system
13705  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13706  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13707  #
13708  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13709    # We're doing a proper cross-compilation
13710    COMPILE_TYPE="cross"
13711  else
13712    COMPILE_TYPE="native"
13713  fi
13714
13715  if test "x$with_target_bits" != x; then
13716    if test "x$COMPILE_TYPE" = "xcross"; then
13717      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13718    fi
13719
13720    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13721      # A reduced build is requested
13722      COMPILE_TYPE="reduced"
13723      OPENJDK_TARGET_CPU_BITS=32
13724      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13725        OPENJDK_TARGET_CPU=x86
13726      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13727        OPENJDK_TARGET_CPU=sparc
13728      else
13729        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13730      fi
13731    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13732      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
13733    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13734      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13735$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13736    else
13737      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13738    fi
13739  fi
13740
13741
13742  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13743$as_echo_n "checking compilation type... " >&6; }
13744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13745$as_echo "$COMPILE_TYPE" >&6; }
13746
13747
13748  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13749    REQUIRED_OS_NAME=SunOS
13750    REQUIRED_OS_VERSION=5.10
13751  fi
13752  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13753    REQUIRED_OS_NAME=Linux
13754    REQUIRED_OS_VERSION=2.6
13755  fi
13756  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13757    REQUIRED_OS_NAME=Windows
13758    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13759      REQUIRED_OS_VERSION=5.2
13760    else
13761      REQUIRED_OS_VERSION=5.1
13762    fi
13763  fi
13764  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13765    REQUIRED_OS_NAME=Darwin
13766    REQUIRED_OS_VERSION=11.2
13767  fi
13768
13769
13770
13771
13772
13773  # Also store the legacy naming of the cpu.
13774  # Ie i586 and amd64 instead of x86 and x86_64
13775  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13776  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13777    OPENJDK_TARGET_CPU_LEGACY="i586"
13778  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13779    # On all platforms except MacOSX replace x86_64 with amd64.
13780    OPENJDK_TARGET_CPU_LEGACY="amd64"
13781  fi
13782
13783
13784  # And the second legacy naming of the cpu.
13785  # Ie i386 and amd64 instead of x86 and x86_64.
13786  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13787  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13788    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13789  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13790    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13791  fi
13792
13793
13794  # This is the name of the cpu (but using i386 and amd64 instead of
13795  # x86 and x86_64, respectively), preceeded by a /, to be used when
13796  # locating libraries. On macosx, it's empty, though.
13797  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13798  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13799    OPENJDK_TARGET_CPU_LIBDIR=""
13800  fi
13801
13802
13803  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13804  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13805  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13806  OPENJDK_TARGET_CPU_ISADIR=""
13807  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13808    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13809      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13810    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13811      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13812    fi
13813  fi
13814
13815
13816  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13817  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13818  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13819    # On linux only, we replace x86 with i386.
13820    OPENJDK_TARGET_CPU_OSARCH="i386"
13821  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13822    # On all platforms except macosx, we replace x86_64 with amd64.
13823    OPENJDK_TARGET_CPU_OSARCH="amd64"
13824  fi
13825
13826
13827  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13828  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13829    OPENJDK_TARGET_CPU_JLI="i386"
13830  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13831    # On all platforms except macosx, we replace x86_64 with amd64.
13832    OPENJDK_TARGET_CPU_JLI="amd64"
13833  fi
13834  # Now setup the -D flags for building libjli.
13835  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13836  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13837    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13838      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13839    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13840      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13841    fi
13842  fi
13843
13844
13845  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13846  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13847    OPENJDK_TARGET_OS_API_DIR="solaris"
13848  fi
13849  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13850    OPENJDK_TARGET_OS_API_DIR="windows"
13851  fi
13852
13853
13854  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13855      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13856  else
13857      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13858  fi
13859
13860
13861  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13862    A_LP64="LP64:="
13863    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13864    # unpack200.exe
13865    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13866      ADD_LP64="-D_LP64=1"
13867    fi
13868  fi
13869  LP64=$A_LP64
13870
13871
13872  if test "x$COMPILE_TYPE" = "xcross"; then
13873    # FIXME: ... or should this include reduced builds..?
13874    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13875  else
13876    DEFINE_CROSS_COMPILE_ARCH=""
13877  fi
13878
13879
13880  # ZERO_ARCHDEF is used to enable architecture-specific code
13881  case "${OPENJDK_TARGET_CPU}" in
13882    ppc*)    ZERO_ARCHDEF=PPC   ;;
13883    s390*)   ZERO_ARCHDEF=S390  ;;
13884    sparc*)  ZERO_ARCHDEF=SPARC ;;
13885    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13886    x86)     ZERO_ARCHDEF=IA32  ;;
13887    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13888  esac
13889
13890
13891
13892
13893# Continue setting up basic stuff. Most remaining code require fundamental tools.
13894
13895  # Save the current directory this script was started from
13896  CURDIR="$PWD"
13897
13898  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13899    PATH_SEP=";"
13900
13901  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13902  if test $SRC_ROOT_LENGTH -gt 100; then
13903    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13904  fi
13905
13906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13907    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13908$as_echo_n "checking cygwin release... " >&6; }
13909    CYGWIN_VERSION=`$UNAME -r`
13910    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13911$as_echo "$CYGWIN_VERSION" >&6; }
13912    WINDOWS_ENV_VENDOR='cygwin'
13913    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13914
13915    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
13916    if test "x$CYGWIN_VERSION_OK" = x; then
13917      { $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
13918$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;}
13919      as_fn_error $? "Cannot continue" "$LINENO" 5
13920    fi
13921    if test "x$CYGPATH" = x; then
13922      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13923    fi
13924    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13925$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13926    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13927    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13928    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13929    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13931$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13932    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13933    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13934    if test "x$test_cygdrive_prefix" = x; then
13935      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13936    fi
13937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13938    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13939$as_echo_n "checking msys release... " >&6; }
13940    MSYS_VERSION=`$UNAME -r`
13941    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13942$as_echo "$MSYS_VERSION" >&6; }
13943
13944    WINDOWS_ENV_VENDOR='msys'
13945    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13946
13947    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13948$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13949    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13950    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13951
13952  windows_path="$MSYS_ROOT_PATH"
13953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13954    unix_path=`$CYGPATH -u "$windows_path"`
13955    MSYS_ROOT_PATH="$unix_path"
13956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13958    MSYS_ROOT_PATH="$unix_path"
13959  fi
13960
13961    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13962$as_echo "$MSYS_ROOT_PATH" >&6; }
13963    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13964  else
13965    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13966  fi
13967
13968  # Test if windows or unix (cygwin/msys) find is first in path.
13969  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13970$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13971  FIND_BINARY_OUTPUT=`find --version 2>&1`
13972  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13974$as_echo "unix style" >&6; }
13975  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13977$as_echo "Windows" >&6; }
13978    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13979$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
13980    { $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
13981$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
13982    as_fn_error $? "Cannot continue" "$LINENO" 5
13983  else
13984    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
13985$as_echo "unknown" >&6; }
13986    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
13987$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
13988  fi
13989
13990  else
13991    PATH_SEP=":"
13992  fi
13993
13994
13995  # We get the top-level directory from the supporting wrappers.
13996  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
13997$as_echo_n "checking for top-level directory... " >&6; }
13998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
13999$as_echo "$TOPDIR" >&6; }
14000
14001
14002  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14003
14004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14005
14006  # Input might be given as Windows format, start by converting to
14007  # unix format.
14008  path="$CURDIR"
14009  new_path=`$CYGPATH -u "$path"`
14010
14011  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14012  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14013  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14014  # "foo.exe" is OK but "foo" is an error.
14015  #
14016  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14017  # It is also a way to make sure we got the proper file name for the real test later on.
14018  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14019  if test "x$test_shortpath" = x; then
14020    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14021$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14022    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14023  fi
14024
14025  # Call helper function which possibly converts this using DOS-style short mode.
14026  # If so, the updated path is stored in $new_path.
14027
14028  input_path="$new_path"
14029  # Check if we need to convert this using DOS-style short mode. If the path
14030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14031  # take no chances and rewrite it.
14032  # Note: m4 eats our [], so we need to use [ and ] instead.
14033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14034  if test "x$has_forbidden_chars" != x; then
14035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14036    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14037    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14038    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14039      # Going to short mode and back again did indeed matter. Since short mode is
14040      # case insensitive, let's make it lowercase to improve readability.
14041      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14042      # Now convert it back to Unix-stile (cygpath)
14043      input_path=`$CYGPATH -u "$shortmode_path"`
14044      new_path="$input_path"
14045    fi
14046  fi
14047
14048  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14049  if test "x$test_cygdrive_prefix" = x; then
14050    # As a simple fix, exclude /usr/bin since it's not a real path.
14051    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14052      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14053      # a path prefixed by /cygdrive for fixpath to work.
14054      new_path="$CYGWIN_ROOT_PATH$input_path"
14055    fi
14056  fi
14057
14058
14059  if test "x$path" != "x$new_path"; then
14060    CURDIR="$new_path"
14061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14062$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14063  fi
14064
14065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14066
14067  path="$CURDIR"
14068  has_colon=`$ECHO $path | $GREP ^.:`
14069  new_path="$path"
14070  if test "x$has_colon" = x; then
14071    # Not in mixed or Windows style, start by that.
14072    new_path=`cmd //c echo $path`
14073  fi
14074
14075
14076  input_path="$new_path"
14077  # Check if we need to convert this using DOS-style short mode. If the path
14078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14079  # take no chances and rewrite it.
14080  # Note: m4 eats our [], so we need to use [ and ] instead.
14081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14082  if test "x$has_forbidden_chars" != x; then
14083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14084    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14085  fi
14086
14087
14088  windows_path="$new_path"
14089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14090    unix_path=`$CYGPATH -u "$windows_path"`
14091    new_path="$unix_path"
14092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14094    new_path="$unix_path"
14095  fi
14096
14097  if test "x$path" != "x$new_path"; then
14098    CURDIR="$new_path"
14099    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14100$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14101  fi
14102
14103  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14104  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14105
14106  else
14107    # We're on a posix platform. Hooray! :)
14108    path="$CURDIR"
14109    has_space=`$ECHO "$path" | $GREP " "`
14110    if test "x$has_space" != x; then
14111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14112$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14113      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14114    fi
14115
14116    # Use eval to expand a potential ~
14117    eval path="$path"
14118    if test ! -f "$path" && test ! -d "$path"; then
14119      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14120    fi
14121
14122    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14123  fi
14124
14125
14126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14127
14128  # Input might be given as Windows format, start by converting to
14129  # unix format.
14130  path="$TOPDIR"
14131  new_path=`$CYGPATH -u "$path"`
14132
14133  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14134  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14135  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14136  # "foo.exe" is OK but "foo" is an error.
14137  #
14138  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14139  # It is also a way to make sure we got the proper file name for the real test later on.
14140  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14141  if test "x$test_shortpath" = x; then
14142    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14143$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14144    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14145  fi
14146
14147  # Call helper function which possibly converts this using DOS-style short mode.
14148  # If so, the updated path is stored in $new_path.
14149
14150  input_path="$new_path"
14151  # Check if we need to convert this using DOS-style short mode. If the path
14152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14153  # take no chances and rewrite it.
14154  # Note: m4 eats our [], so we need to use [ and ] instead.
14155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14156  if test "x$has_forbidden_chars" != x; then
14157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14158    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14159    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14160    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14161      # Going to short mode and back again did indeed matter. Since short mode is
14162      # case insensitive, let's make it lowercase to improve readability.
14163      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14164      # Now convert it back to Unix-stile (cygpath)
14165      input_path=`$CYGPATH -u "$shortmode_path"`
14166      new_path="$input_path"
14167    fi
14168  fi
14169
14170  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14171  if test "x$test_cygdrive_prefix" = x; then
14172    # As a simple fix, exclude /usr/bin since it's not a real path.
14173    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14174      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14175      # a path prefixed by /cygdrive for fixpath to work.
14176      new_path="$CYGWIN_ROOT_PATH$input_path"
14177    fi
14178  fi
14179
14180
14181  if test "x$path" != "x$new_path"; then
14182    TOPDIR="$new_path"
14183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14184$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14185  fi
14186
14187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14188
14189  path="$TOPDIR"
14190  has_colon=`$ECHO $path | $GREP ^.:`
14191  new_path="$path"
14192  if test "x$has_colon" = x; then
14193    # Not in mixed or Windows style, start by that.
14194    new_path=`cmd //c echo $path`
14195  fi
14196
14197
14198  input_path="$new_path"
14199  # Check if we need to convert this using DOS-style short mode. If the path
14200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14201  # take no chances and rewrite it.
14202  # Note: m4 eats our [], so we need to use [ and ] instead.
14203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14204  if test "x$has_forbidden_chars" != x; then
14205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14207  fi
14208
14209
14210  windows_path="$new_path"
14211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14212    unix_path=`$CYGPATH -u "$windows_path"`
14213    new_path="$unix_path"
14214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14216    new_path="$unix_path"
14217  fi
14218
14219  if test "x$path" != "x$new_path"; then
14220    TOPDIR="$new_path"
14221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14222$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14223  fi
14224
14225  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14226  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14227
14228  else
14229    # We're on a posix platform. Hooray! :)
14230    path="$TOPDIR"
14231    has_space=`$ECHO "$path" | $GREP " "`
14232    if test "x$has_space" != x; then
14233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14234$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14235      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14236    fi
14237
14238    # Use eval to expand a potential ~
14239    eval path="$path"
14240    if test ! -f "$path" && test ! -d "$path"; then
14241      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14242    fi
14243
14244    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14245  fi
14246
14247  # SRC_ROOT is a traditional alias for TOPDIR.
14248  SRC_ROOT=$TOPDIR
14249
14250  # Locate the directory of this script.
14251  AUTOCONF_DIR=$TOPDIR/common/autoconf
14252
14253
14254  # Setup default logging of stdout and stderr to build.log in the output root.
14255  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14256  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14257  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14258
14259
14260
14261
14262
14263# Check if it's a pure open build or if custom sources are to be used.
14264
14265  # Check whether --enable-openjdk-only was given.
14266if test "${enable_openjdk_only+set}" = set; then :
14267  enableval=$enable_openjdk_only;
14268else
14269  enable_openjdk_only="no"
14270fi
14271
14272
14273  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14274$as_echo_n "checking for presence of closed sources... " >&6; }
14275  if test -d "$SRC_ROOT/jdk/src/closed"; then
14276    CLOSED_SOURCE_PRESENT=yes
14277  else
14278    CLOSED_SOURCE_PRESENT=no
14279  fi
14280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14281$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14282
14283  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14284$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14285  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14287$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14288
14289  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14290    OPENJDK=true
14291    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14292      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14293$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14294    fi
14295  else
14296    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14297      OPENJDK=true
14298    else
14299      OPENJDK=false
14300    fi
14301  fi
14302
14303  if test "x$OPENJDK" = "xtrue"; then
14304    SET_OPENJDK="OPENJDK=true"
14305  fi
14306
14307
14308
14309  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14310  # the IncludeCustomExtension macro.
14311
14312
14313# Check whether --with-custom-make-dir was given.
14314if test "${with_custom_make_dir+set}" = set; then :
14315  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
14316$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14317fi
14318
14319
14320
14321
14322# These are needed to be able to create a configuration name (and thus the output directory)
14323
14324  ###############################################################################
14325  #
14326  # Check which variant of the JDK that we want to build.
14327  # Currently we have:
14328  #    normal:   standard edition
14329  # but the custom make system may add other variants
14330  #
14331  # Effectively the JDK variant gives a name to a specific set of
14332  # modules to compile into the JDK. In the future, these modules
14333  # might even be Jigsaw modules.
14334  #
14335  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14336$as_echo_n "checking which variant of the JDK to build... " >&6; }
14337
14338# Check whether --with-jdk-variant was given.
14339if test "${with_jdk_variant+set}" = set; then :
14340  withval=$with_jdk_variant;
14341fi
14342
14343
14344  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14345    JDK_VARIANT="normal"
14346  else
14347    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14348  fi
14349
14350
14351
14352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14353$as_echo "$JDK_VARIANT" >&6; }
14354
14355
14356###############################################################################
14357#
14358# Check which interpreter of the JVM we want to build.
14359# Currently we have:
14360#    template: Template interpreter (the default)
14361#    cpp     : C++ interpreter
14362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14363$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14364
14365# Check whether --with-jvm-interpreter was given.
14366if test "${with_jvm_interpreter+set}" = set; then :
14367  withval=$with_jvm_interpreter;
14368fi
14369
14370
14371if test "x$with_jvm_interpreter" = x; then
14372     with_jvm_interpreter="template"
14373fi
14374
14375JVM_INTERPRETER="$with_jvm_interpreter"
14376
14377if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14378   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14379fi
14380
14381
14382
14383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14384$as_echo "$with_jvm_interpreter" >&6; }
14385
14386
14387
14388  ###############################################################################
14389  #
14390  # Check which variants of the JVM that we want to build.
14391  # Currently we have:
14392  #    server: normal interpreter and a tiered C1/C2 compiler
14393  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14394  #    minimal1: reduced form of client with optional VM services and features stripped out
14395  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14396  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14397  #    zero: no machine code interpreter, no compiler
14398  #    zeroshark: zero interpreter and shark/llvm compiler backend
14399#    core: interpreter only, no compiler (only works on some platforms)
14400  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14401$as_echo_n "checking which variants of the JVM to build... " >&6; }
14402
14403# Check whether --with-jvm-variants was given.
14404if test "${with_jvm_variants+set}" = set; then :
14405  withval=$with_jvm_variants;
14406fi
14407
14408
14409  if test "x$with_jvm_variants" = x; then
14410    with_jvm_variants="server"
14411  fi
14412
14413  JVM_VARIANTS=",$with_jvm_variants,"
14414  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,//'`
14415
14416  if test "x$TEST_VARIANTS" != "x,"; then
14417     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14418  fi
14419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14420$as_echo "$with_jvm_variants" >&6; }
14421
14422  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14423  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14424  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14425  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14426  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14427  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14428  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14429
14430  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14431    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14432      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14433    fi
14434  fi
14435  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14436    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14437      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14438    fi
14439  fi
14440  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14441    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14442      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14443    fi
14444  fi
14445
14446  # Replace the commas with AND for use in the build directory name.
14447  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14448  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/'`
14449  if test "x$COUNT_VARIANTS" != "x,1"; then
14450    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14451  else
14452    BUILDING_MULTIPLE_JVM_VARIANTS=no
14453  fi
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464  INCLUDE_SA=true
14465  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14466    INCLUDE_SA=false
14467  fi
14468  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14469    INCLUDE_SA=false
14470  fi
14471  if test "x$VAR_CPU" = xppc64 ; then
14472    INCLUDE_SA=false
14473  fi
14474
14475
14476  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14477    MACOSX_UNIVERSAL="true"
14478  fi
14479
14480
14481
14482
14483  ###############################################################################
14484  #
14485  # Set the debug level
14486  #    release: no debug information, all optimizations, no asserts.
14487  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14488  #    fastdebug: debug information (-g), all optimizations, all asserts
14489  #    slowdebug: debug information (-g), no optimizations, all asserts
14490  #
14491  DEBUG_LEVEL="release"
14492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14493$as_echo_n "checking which debug level to use... " >&6; }
14494  # Check whether --enable-debug was given.
14495if test "${enable_debug+set}" = set; then :
14496  enableval=$enable_debug;
14497        ENABLE_DEBUG="${enableval}"
14498        DEBUG_LEVEL="fastdebug"
14499
14500else
14501  ENABLE_DEBUG="no"
14502fi
14503
14504
14505
14506# Check whether --with-debug-level was given.
14507if test "${with_debug_level+set}" = set; then :
14508  withval=$with_debug_level;
14509        DEBUG_LEVEL="${withval}"
14510        if test "x$ENABLE_DEBUG" = xyes; then
14511          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14512        fi
14513
14514fi
14515
14516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14517$as_echo "$DEBUG_LEVEL" >&6; }
14518
14519  if test "x$DEBUG_LEVEL" != xrelease && \
14520      test "x$DEBUG_LEVEL" != xoptimized && \
14521      test "x$DEBUG_LEVEL" != xfastdebug && \
14522      test "x$DEBUG_LEVEL" != xslowdebug; then
14523    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14524  fi
14525
14526
14527  ###############################################################################
14528  #
14529  # Setup legacy vars/targets and new vars to deal with different debug levels.
14530  #
14531
14532  case $DEBUG_LEVEL in
14533    release )
14534      VARIANT="OPT"
14535      FASTDEBUG="false"
14536      DEBUG_CLASSFILES="false"
14537      BUILD_VARIANT_RELEASE=""
14538      HOTSPOT_DEBUG_LEVEL="product"
14539      HOTSPOT_EXPORT="product"
14540      ;;
14541    fastdebug )
14542      VARIANT="DBG"
14543      FASTDEBUG="true"
14544      DEBUG_CLASSFILES="true"
14545      BUILD_VARIANT_RELEASE="-fastdebug"
14546      HOTSPOT_DEBUG_LEVEL="fastdebug"
14547      HOTSPOT_EXPORT="fastdebug"
14548      ;;
14549    slowdebug )
14550      VARIANT="DBG"
14551      FASTDEBUG="false"
14552      DEBUG_CLASSFILES="true"
14553      BUILD_VARIANT_RELEASE="-debug"
14554      HOTSPOT_DEBUG_LEVEL="jvmg"
14555      HOTSPOT_EXPORT="debug"
14556      ;;
14557    optimized )
14558      VARIANT="OPT"
14559      FASTDEBUG="false"
14560      DEBUG_CLASSFILES="false"
14561      BUILD_VARIANT_RELEASE="-optimized"
14562      HOTSPOT_DEBUG_LEVEL="optimized"
14563      HOTSPOT_EXPORT="optimized"
14564      ;;
14565  esac
14566
14567  # The debug level 'optimized' is a little special because it is currently only
14568  # applicable to the HotSpot build where it means to build a completely
14569  # optimized version of the VM without any debugging code (like for the
14570  # 'release' debug level which is called 'product' in the HotSpot build) but
14571  # with the exception that it can contain additional code which is otherwise
14572  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14573  # test new and/or experimental features which are not intended for customer
14574  # shipment. Because these new features need to be tested and benchmarked in
14575  # real world scenarios, we want to build the containing JDK at the 'release'
14576  # debug level.
14577  if test "x$DEBUG_LEVEL" = xoptimized; then
14578    DEBUG_LEVEL="release"
14579  fi
14580
14581  #####
14582  # Generate the legacy makefile targets for hotspot.
14583  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14584  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14585  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14586  # But until then ...
14587  HOTSPOT_TARGET=""
14588
14589  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14590    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14591  fi
14592
14593  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14594    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14595  fi
14596
14597  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14598    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14599  fi
14600
14601  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14602    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14603  fi
14604
14605  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14606    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14607  fi
14608
14609  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14610    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14611  fi
14612
14613  if test "x$JVM_VARIANT_CORE" = xtrue; then
14614    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14615  fi
14616
14617  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14618
14619  # On Macosx universal binaries are produced, but they only contain
14620  # 64 bit intel. This invalidates control of which jvms are built
14621  # from configure, but only server is valid anyway. Fix this
14622  # when hotspot makefiles are rewritten.
14623  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14624    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14625  fi
14626
14627  #####
14628
14629
14630
14631
14632
14633
14634
14635
14636# With basic setup done, call the custom early hook.
14637
14638
14639# Check if we have devkits, extra paths or sysroot set.
14640
14641
14642# Check whether --with-devkit was given.
14643if test "${with_devkit+set}" = set; then :
14644  withval=$with_devkit;
14645
14646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14647
14648  # Input might be given as Windows format, start by converting to
14649  # unix format.
14650  path="$with_devkit"
14651  new_path=`$CYGPATH -u "$path"`
14652
14653  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14654  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14655  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14656  # "foo.exe" is OK but "foo" is an error.
14657  #
14658  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14659  # It is also a way to make sure we got the proper file name for the real test later on.
14660  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14661  if test "x$test_shortpath" = x; then
14662    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14663$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14664    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14665  fi
14666
14667  # Call helper function which possibly converts this using DOS-style short mode.
14668  # If so, the updated path is stored in $new_path.
14669
14670  input_path="$new_path"
14671  # Check if we need to convert this using DOS-style short mode. If the path
14672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14673  # take no chances and rewrite it.
14674  # Note: m4 eats our [], so we need to use [ and ] instead.
14675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14676  if test "x$has_forbidden_chars" != x; then
14677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14678    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14679    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14680    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14681      # Going to short mode and back again did indeed matter. Since short mode is
14682      # case insensitive, let's make it lowercase to improve readability.
14683      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14684      # Now convert it back to Unix-stile (cygpath)
14685      input_path=`$CYGPATH -u "$shortmode_path"`
14686      new_path="$input_path"
14687    fi
14688  fi
14689
14690  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14691  if test "x$test_cygdrive_prefix" = x; then
14692    # As a simple fix, exclude /usr/bin since it's not a real path.
14693    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14694      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14695      # a path prefixed by /cygdrive for fixpath to work.
14696      new_path="$CYGWIN_ROOT_PATH$input_path"
14697    fi
14698  fi
14699
14700
14701  if test "x$path" != "x$new_path"; then
14702    with_devkit="$new_path"
14703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14704$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14705  fi
14706
14707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14708
14709  path="$with_devkit"
14710  has_colon=`$ECHO $path | $GREP ^.:`
14711  new_path="$path"
14712  if test "x$has_colon" = x; then
14713    # Not in mixed or Windows style, start by that.
14714    new_path=`cmd //c echo $path`
14715  fi
14716
14717
14718  input_path="$new_path"
14719  # Check if we need to convert this using DOS-style short mode. If the path
14720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14721  # take no chances and rewrite it.
14722  # Note: m4 eats our [], so we need to use [ and ] instead.
14723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14724  if test "x$has_forbidden_chars" != x; then
14725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14726    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14727  fi
14728
14729
14730  windows_path="$new_path"
14731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14732    unix_path=`$CYGPATH -u "$windows_path"`
14733    new_path="$unix_path"
14734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14736    new_path="$unix_path"
14737  fi
14738
14739  if test "x$path" != "x$new_path"; then
14740    with_devkit="$new_path"
14741    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14742$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14743  fi
14744
14745  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14746  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14747
14748  else
14749    # We're on a posix platform. Hooray! :)
14750    path="$with_devkit"
14751    has_space=`$ECHO "$path" | $GREP " "`
14752    if test "x$has_space" != x; then
14753      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14754$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14755      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14756    fi
14757
14758    # Use eval to expand a potential ~
14759    eval path="$path"
14760    if test ! -f "$path" && test ! -d "$path"; then
14761      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14762    fi
14763
14764    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14765  fi
14766
14767        DEVKIT_ROOT="$with_devkit"
14768        # Check for a meta data info file in the root of the devkit
14769        if test -f "$DEVKIT_ROOT/devkit.info"; then
14770          # This potentially sets the following:
14771          # DEVKIT_NAME: A descriptive name of the devkit
14772          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14773          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14774          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14775          . $DEVKIT_ROOT/devkit.info
14776        fi
14777
14778        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14779$as_echo_n "checking for devkit... " >&6; }
14780        if test "x$DEVKIT_NAME" != x; then
14781          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14782$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14783        else
14784          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14785$as_echo "$DEVKIT_ROOT" >&6; }
14786        fi
14787
14788        if test "x$DEVKIT_EXTRA_PATH" != x; then
14789
14790  if test "x$DEVKIT_EXTRA_PATH" != x; then
14791    if test "x$EXTRA_PATH" = x; then
14792      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14793    else
14794      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14795    fi
14796  fi
14797
14798        fi
14799
14800        # Fallback default of just /bin if DEVKIT_PATH is not defined
14801        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14802          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14803        fi
14804
14805  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14806    if test "x$TOOLCHAIN_PATH" = x; then
14807      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14808    else
14809      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14810    fi
14811  fi
14812
14813
14814        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14815        # places for backwards compatiblity.
14816        if test "x$DEVKIT_SYSROOT" != x; then
14817          SYSROOT="$DEVKIT_SYSROOT"
14818        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14819          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14820        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14821          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14822        fi
14823
14824
14825fi
14826
14827
14828  # You can force the sysroot if the sysroot encoded into the compiler tools
14829  # is not correct.
14830
14831# Check whether --with-sys-root was given.
14832if test "${with_sys_root+set}" = set; then :
14833  withval=$with_sys_root; SYSROOT=$with_sys_root
14834
14835fi
14836
14837
14838
14839# Check whether --with-sysroot was given.
14840if test "${with_sysroot+set}" = set; then :
14841  withval=$with_sysroot; SYSROOT=$with_sysroot
14842
14843fi
14844
14845
14846
14847# Check whether --with-tools-dir was given.
14848if test "${with_tools_dir+set}" = set; then :
14849  withval=$with_tools_dir;
14850  if test "x$with_tools_dir" != x; then
14851    if test "x$TOOLCHAIN_PATH" = x; then
14852      TOOLCHAIN_PATH="$with_tools_dir"
14853    else
14854      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14855    fi
14856  fi
14857
14858
14859fi
14860
14861
14862
14863# Check whether --with-toolchain-path was given.
14864if test "${with_toolchain_path+set}" = set; then :
14865  withval=$with_toolchain_path;
14866  if test "x$with_toolchain_path" != x; then
14867    if test "x$TOOLCHAIN_PATH" = x; then
14868      TOOLCHAIN_PATH="$with_toolchain_path"
14869    else
14870      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14871    fi
14872  fi
14873
14874
14875fi
14876
14877
14878
14879# Check whether --with-extra-path was given.
14880if test "${with_extra_path+set}" = set; then :
14881  withval=$with_extra_path;
14882  if test "x$with_extra_path" != x; then
14883    if test "x$EXTRA_PATH" = x; then
14884      EXTRA_PATH="$with_extra_path"
14885    else
14886      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14887    fi
14888  fi
14889
14890
14891fi
14892
14893
14894  # Prepend the extra path to the global path
14895
14896  if test "x$EXTRA_PATH" != x; then
14897    if test "x$PATH" = x; then
14898      PATH="$EXTRA_PATH"
14899    else
14900      PATH="$EXTRA_PATH:$PATH"
14901    fi
14902  fi
14903
14904
14905  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
14906    # Add extra search paths on solaris for utilities like ar and as etc...
14907    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
14908  fi
14909
14910  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
14911$as_echo_n "checking for sysroot... " >&6; }
14912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
14913$as_echo "$SYSROOT" >&6; }
14914  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
14915$as_echo_n "checking for toolchain path... " >&6; }
14916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
14917$as_echo "$TOOLCHAIN_PATH" >&6; }
14918  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
14919$as_echo_n "checking for extra path... " >&6; }
14920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
14921$as_echo "$EXTRA_PATH" >&6; }
14922
14923
14924# To properly create a configuration name, we need to have the OpenJDK target
14925# and options (variants and debug level) parsed.
14926
14927
14928
14929# Check whether --with-conf-name was given.
14930if test "${with_conf_name+set}" = set; then :
14931  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
14932fi
14933
14934
14935  # Test from where we are running configure, in or outside of src root.
14936  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
14937$as_echo_n "checking where to store configuration... " >&6; }
14938  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
14939      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
14940      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
14941    # We are running configure from the src root.
14942    # Create a default ./build/target-variant-debuglevel output root.
14943    if test "x${CONF_NAME}" = x; then
14944      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
14945$as_echo "in default location" >&6; }
14946      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
14947    else
14948      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
14949$as_echo "in build directory with custom name" >&6; }
14950    fi
14951    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
14952    $MKDIR -p "$OUTPUT_ROOT"
14953    if test ! -d "$OUTPUT_ROOT"; then
14954      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
14955    fi
14956  else
14957    # We are running configure from outside of the src dir.
14958    # Then use the current directory as output dir!
14959    # If configuration is situated in normal build directory, just use the build
14960    # directory name as configuration name, otherwise use the complete path.
14961    if test "x${CONF_NAME}" = x; then
14962      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
14963    fi
14964    OUTPUT_ROOT="$CURDIR"
14965    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
14966$as_echo "in current directory" >&6; }
14967
14968    # WARNING: This might be a bad thing to do. You need to be sure you want to
14969    # have a configuration in this directory. Do some sanity checks!
14970
14971    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
14972      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
14973      # other files
14974      files_present=`$LS $OUTPUT_ROOT`
14975      # Configure has already touched config.log and confdefs.h in the current dir when this check
14976      # is performed.
14977      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
14978      | $TR -d '\n'`
14979      if test "x$filtered_files" != x; then
14980        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
14981$as_echo "$as_me: Current directory is $CURDIR." >&6;}
14982        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
14983$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
14984        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
14985$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
14986        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
14987$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
14988        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
14989$as_echo "$as_me: seriously mess up just about everything." >&6;}
14990        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
14991$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
14992        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
14993$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
14994        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
14995      fi
14996    fi
14997  fi
14998  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
14999$as_echo_n "checking what configuration name to use... " >&6; }
15000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15001$as_echo "$CONF_NAME" >&6; }
15002
15003
15004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15005
15006  # Input might be given as Windows format, start by converting to
15007  # unix format.
15008  path="$OUTPUT_ROOT"
15009  new_path=`$CYGPATH -u "$path"`
15010
15011  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15012  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15013  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15014  # "foo.exe" is OK but "foo" is an error.
15015  #
15016  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15017  # It is also a way to make sure we got the proper file name for the real test later on.
15018  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15019  if test "x$test_shortpath" = x; then
15020    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15021$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15022    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15023  fi
15024
15025  # Call helper function which possibly converts this using DOS-style short mode.
15026  # If so, the updated path is stored in $new_path.
15027
15028  input_path="$new_path"
15029  # Check if we need to convert this using DOS-style short mode. If the path
15030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15031  # take no chances and rewrite it.
15032  # Note: m4 eats our [], so we need to use [ and ] instead.
15033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15034  if test "x$has_forbidden_chars" != x; then
15035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15036    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15037    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15038    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15039      # Going to short mode and back again did indeed matter. Since short mode is
15040      # case insensitive, let's make it lowercase to improve readability.
15041      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15042      # Now convert it back to Unix-stile (cygpath)
15043      input_path=`$CYGPATH -u "$shortmode_path"`
15044      new_path="$input_path"
15045    fi
15046  fi
15047
15048  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15049  if test "x$test_cygdrive_prefix" = x; then
15050    # As a simple fix, exclude /usr/bin since it's not a real path.
15051    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15052      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15053      # a path prefixed by /cygdrive for fixpath to work.
15054      new_path="$CYGWIN_ROOT_PATH$input_path"
15055    fi
15056  fi
15057
15058
15059  if test "x$path" != "x$new_path"; then
15060    OUTPUT_ROOT="$new_path"
15061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15062$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15063  fi
15064
15065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15066
15067  path="$OUTPUT_ROOT"
15068  has_colon=`$ECHO $path | $GREP ^.:`
15069  new_path="$path"
15070  if test "x$has_colon" = x; then
15071    # Not in mixed or Windows style, start by that.
15072    new_path=`cmd //c echo $path`
15073  fi
15074
15075
15076  input_path="$new_path"
15077  # Check if we need to convert this using DOS-style short mode. If the path
15078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15079  # take no chances and rewrite it.
15080  # Note: m4 eats our [], so we need to use [ and ] instead.
15081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15082  if test "x$has_forbidden_chars" != x; then
15083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15084    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15085  fi
15086
15087
15088  windows_path="$new_path"
15089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15090    unix_path=`$CYGPATH -u "$windows_path"`
15091    new_path="$unix_path"
15092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15094    new_path="$unix_path"
15095  fi
15096
15097  if test "x$path" != "x$new_path"; then
15098    OUTPUT_ROOT="$new_path"
15099    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15100$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15101  fi
15102
15103  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15104  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15105
15106  else
15107    # We're on a posix platform. Hooray! :)
15108    path="$OUTPUT_ROOT"
15109    has_space=`$ECHO "$path" | $GREP " "`
15110    if test "x$has_space" != x; then
15111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15112$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15113      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15114    fi
15115
15116    # Use eval to expand a potential ~
15117    eval path="$path"
15118    if test ! -f "$path" && test ! -d "$path"; then
15119      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15120    fi
15121
15122    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15123  fi
15124
15125
15126  SPEC=$OUTPUT_ROOT/spec.gmk
15127
15128  CONF_NAME=$CONF_NAME
15129
15130  OUTPUT_ROOT=$OUTPUT_ROOT
15131
15132
15133  # Most of the probed defines are put into config.h
15134  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
15135
15136  # The spec.gmk file contains all variables for the make system.
15137  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15138
15139  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15140  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15141
15142  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15143  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15144
15145  # The compare.sh is used to compare the build output to other builds.
15146  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15147
15148  # Spec.sh is currently used by compare-objects.sh
15149  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
15150
15151  # The generated Makefile knows where the spec.gmk is and where the source is.
15152  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15153  # which will look for generated configurations
15154  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15155
15156
15157
15158# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15159
15160  for ac_prog in apt-get yum port pkgutil pkgadd
15161do
15162  # Extract the first word of "$ac_prog", so it can be a program name with args.
15163set dummy $ac_prog; ac_word=$2
15164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15165$as_echo_n "checking for $ac_word... " >&6; }
15166if ${ac_cv_prog_PKGHANDLER+:} false; then :
15167  $as_echo_n "(cached) " >&6
15168else
15169  if test -n "$PKGHANDLER"; then
15170  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15171else
15172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15173for as_dir in $PATH
15174do
15175  IFS=$as_save_IFS
15176  test -z "$as_dir" && as_dir=.
15177    for ac_exec_ext in '' $ac_executable_extensions; do
15178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15179    ac_cv_prog_PKGHANDLER="$ac_prog"
15180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15181    break 2
15182  fi
15183done
15184  done
15185IFS=$as_save_IFS
15186
15187fi
15188fi
15189PKGHANDLER=$ac_cv_prog_PKGHANDLER
15190if test -n "$PKGHANDLER"; then
15191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15192$as_echo "$PKGHANDLER" >&6; }
15193else
15194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15195$as_echo "no" >&6; }
15196fi
15197
15198
15199  test -n "$PKGHANDLER" && break
15200done
15201
15202
15203
15204# Setup tools that requires more complex handling, or that is not needed by the configure script.
15205
15206
15207  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15208  if test "x$MAKE" != x; then
15209    # User has supplied a make, test it.
15210    if test ! -f "$MAKE"; then
15211      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15212    fi
15213
15214  MAKE_CANDIDATE=""$MAKE""
15215  DESCRIPTION="user supplied MAKE=$MAKE"
15216  if test "x$MAKE_CANDIDATE" != x; then
15217    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15218$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15219    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15220    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15221    if test "x$IS_GNU_MAKE" = x; then
15222      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15223$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15224    else
15225      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15226      if test "x$IS_MODERN_MAKE" = x; then
15227        { $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
15228$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;}
15229      else
15230        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15231          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15232            MAKE_EXPECTED_ENV='cygwin'
15233          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15234            MAKE_EXPECTED_ENV='msys'
15235          else
15236            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15237          fi
15238          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15239          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15240        else
15241          # Not relevant for non-Windows
15242          IS_MAKE_CORRECT_ENV=true
15243        fi
15244        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15245          { $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
15246$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;}
15247        else
15248          FOUND_MAKE=$MAKE_CANDIDATE
15249
15250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15251
15252  # First separate the path from the arguments. This will split at the first
15253  # space.
15254  complete="$FOUND_MAKE"
15255  path="${complete%% *}"
15256  tmp="$complete EOL"
15257  arguments="${tmp#* }"
15258
15259  # Input might be given as Windows format, start by converting to
15260  # unix format.
15261  new_path=`$CYGPATH -u "$path"`
15262
15263  # Now try to locate executable using which
15264  new_path=`$WHICH "$new_path" 2> /dev/null`
15265  # bat and cmd files are not always considered executable in cygwin causing which
15266  # to not find them
15267  if test "x$new_path" = x \
15268      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15269      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15270    new_path=`$CYGPATH -u "$path"`
15271  fi
15272  if test "x$new_path" = x; then
15273    # Oops. Which didn't find the executable.
15274    # The splitting of arguments from the executable at a space might have been incorrect,
15275    # since paths with space are more likely in Windows. Give it another try with the whole
15276    # argument.
15277    path="$complete"
15278    arguments="EOL"
15279    new_path=`$CYGPATH -u "$path"`
15280    new_path=`$WHICH "$new_path" 2> /dev/null`
15281    # bat and cmd files are not always considered executable in cygwin causing which
15282    # to not find them
15283    if test "x$new_path" = x \
15284        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15285        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15286      new_path=`$CYGPATH -u "$path"`
15287    fi
15288    if test "x$new_path" = x; then
15289      # It's still not found. Now this is an unrecoverable error.
15290      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15291$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15292      has_space=`$ECHO "$complete" | $GREP " "`
15293      if test "x$has_space" != x; then
15294        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15295$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15296      fi
15297      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15298    fi
15299  fi
15300
15301  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15302  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15303  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15304  # "foo.exe" is OK but "foo" is an error.
15305  #
15306  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15307  # It is also a way to make sure we got the proper file name for the real test later on.
15308  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15309  if test "x$test_shortpath" = x; then
15310    # Short path failed, file does not exist as specified.
15311    # Try adding .exe or .cmd
15312    if test -f "${new_path}.exe"; then
15313      input_to_shortpath="${new_path}.exe"
15314    elif test -f "${new_path}.cmd"; then
15315      input_to_shortpath="${new_path}.cmd"
15316    else
15317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15318$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15319      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15320$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15321      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15322    fi
15323  else
15324    input_to_shortpath="$new_path"
15325  fi
15326
15327  # Call helper function which possibly converts this using DOS-style short mode.
15328  # If so, the updated path is stored in $new_path.
15329  new_path="$input_to_shortpath"
15330
15331  input_path="$input_to_shortpath"
15332  # Check if we need to convert this using DOS-style short mode. If the path
15333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15334  # take no chances and rewrite it.
15335  # Note: m4 eats our [], so we need to use [ and ] instead.
15336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15337  if test "x$has_forbidden_chars" != x; then
15338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15339    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15340    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15341    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15342      # Going to short mode and back again did indeed matter. Since short mode is
15343      # case insensitive, let's make it lowercase to improve readability.
15344      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15345      # Now convert it back to Unix-stile (cygpath)
15346      input_path=`$CYGPATH -u "$shortmode_path"`
15347      new_path="$input_path"
15348    fi
15349  fi
15350
15351  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15352  if test "x$test_cygdrive_prefix" = x; then
15353    # As a simple fix, exclude /usr/bin since it's not a real path.
15354    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15355      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15356      # a path prefixed by /cygdrive for fixpath to work.
15357      new_path="$CYGWIN_ROOT_PATH$input_path"
15358    fi
15359  fi
15360
15361  # remove trailing .exe if any
15362  new_path="${new_path/%.exe/}"
15363
15364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15365
15366  # First separate the path from the arguments. This will split at the first
15367  # space.
15368  complete="$FOUND_MAKE"
15369  path="${complete%% *}"
15370  tmp="$complete EOL"
15371  arguments="${tmp#* }"
15372
15373  # Input might be given as Windows format, start by converting to
15374  # unix format.
15375  new_path="$path"
15376
15377  windows_path="$new_path"
15378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15379    unix_path=`$CYGPATH -u "$windows_path"`
15380    new_path="$unix_path"
15381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15383    new_path="$unix_path"
15384  fi
15385
15386
15387  # Now try to locate executable using which
15388  new_path=`$WHICH "$new_path" 2> /dev/null`
15389
15390  if test "x$new_path" = x; then
15391    # Oops. Which didn't find the executable.
15392    # The splitting of arguments from the executable at a space might have been incorrect,
15393    # since paths with space are more likely in Windows. Give it another try with the whole
15394    # argument.
15395    path="$complete"
15396    arguments="EOL"
15397    new_path="$path"
15398
15399  windows_path="$new_path"
15400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15401    unix_path=`$CYGPATH -u "$windows_path"`
15402    new_path="$unix_path"
15403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15405    new_path="$unix_path"
15406  fi
15407
15408
15409    new_path=`$WHICH "$new_path" 2> /dev/null`
15410
15411    if test "x$new_path" = x; then
15412      # It's still not found. Now this is an unrecoverable error.
15413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15414$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15415      has_space=`$ECHO "$complete" | $GREP " "`
15416      if test "x$has_space" != x; then
15417        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15418$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15419      fi
15420      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15421    fi
15422  fi
15423
15424  # Now new_path has a complete unix path to the binary
15425  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15426    # Keep paths in /bin as-is, but remove trailing .exe if any
15427    new_path="${new_path/%.exe/}"
15428    # Do not save /bin paths to all_fixpath_prefixes!
15429  else
15430    # Not in mixed or Windows style, start by that.
15431    new_path=`cmd //c echo $new_path`
15432
15433  input_path="$new_path"
15434  # Check if we need to convert this using DOS-style short mode. If the path
15435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15436  # take no chances and rewrite it.
15437  # Note: m4 eats our [], so we need to use [ and ] instead.
15438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15439  if test "x$has_forbidden_chars" != x; then
15440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15442  fi
15443
15444    # Output is in $new_path
15445
15446  windows_path="$new_path"
15447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15448    unix_path=`$CYGPATH -u "$windows_path"`
15449    new_path="$unix_path"
15450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15452    new_path="$unix_path"
15453  fi
15454
15455    # remove trailing .exe if any
15456    new_path="${new_path/%.exe/}"
15457
15458    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15459    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15460  fi
15461
15462  else
15463    # We're on a posix platform. Hooray! :)
15464    # First separate the path from the arguments. This will split at the first
15465    # space.
15466    complete="$FOUND_MAKE"
15467    path="${complete%% *}"
15468    tmp="$complete EOL"
15469    arguments="${tmp#* }"
15470
15471    # Cannot rely on the command "which" here since it doesn't always work.
15472    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15473    if test -z "$is_absolute_path"; then
15474      # Path to executable is not absolute. Find it.
15475      IFS_save="$IFS"
15476      IFS=:
15477      for p in $PATH; do
15478        if test -f "$p/$path" && test -x "$p/$path"; then
15479          new_path="$p/$path"
15480          break
15481        fi
15482      done
15483      IFS="$IFS_save"
15484    else
15485      # This is an absolute path, we can use it without further modifications.
15486      new_path="$path"
15487    fi
15488
15489    if test "x$new_path" = x; then
15490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15491$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15492      has_space=`$ECHO "$complete" | $GREP " "`
15493      if test "x$has_space" != x; then
15494        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15495$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15496      fi
15497      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15498    fi
15499  fi
15500
15501  # Now join together the path and the arguments once again
15502  if test "x$arguments" != xEOL; then
15503    new_complete="$new_path ${arguments% *}"
15504  else
15505    new_complete="$new_path"
15506  fi
15507
15508  if test "x$complete" != "x$new_complete"; then
15509    FOUND_MAKE="$new_complete"
15510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15511$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15512  fi
15513
15514        fi
15515      fi
15516    fi
15517  fi
15518
15519    if test "x$FOUND_MAKE" = x; then
15520      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15521    fi
15522  else
15523    # Try our hardest to locate a correct version of GNU make
15524    for ac_prog in gmake
15525do
15526  # Extract the first word of "$ac_prog", so it can be a program name with args.
15527set dummy $ac_prog; ac_word=$2
15528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15529$as_echo_n "checking for $ac_word... " >&6; }
15530if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15531  $as_echo_n "(cached) " >&6
15532else
15533  case $CHECK_GMAKE in
15534  [\\/]* | ?:[\\/]*)
15535  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15536  ;;
15537  *)
15538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15539for as_dir in $PATH
15540do
15541  IFS=$as_save_IFS
15542  test -z "$as_dir" && as_dir=.
15543    for ac_exec_ext in '' $ac_executable_extensions; do
15544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15545    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15547    break 2
15548  fi
15549done
15550  done
15551IFS=$as_save_IFS
15552
15553  ;;
15554esac
15555fi
15556CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15557if test -n "$CHECK_GMAKE"; then
15558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15559$as_echo "$CHECK_GMAKE" >&6; }
15560else
15561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15562$as_echo "no" >&6; }
15563fi
15564
15565
15566  test -n "$CHECK_GMAKE" && break
15567done
15568
15569
15570  MAKE_CANDIDATE=""$CHECK_GMAKE""
15571  DESCRIPTION="gmake in PATH"
15572  if test "x$MAKE_CANDIDATE" != x; then
15573    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15574$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15575    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15576    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15577    if test "x$IS_GNU_MAKE" = x; then
15578      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15579$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15580    else
15581      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15582      if test "x$IS_MODERN_MAKE" = x; then
15583        { $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
15584$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;}
15585      else
15586        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15587          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15588            MAKE_EXPECTED_ENV='cygwin'
15589          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15590            MAKE_EXPECTED_ENV='msys'
15591          else
15592            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15593          fi
15594          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15595          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15596        else
15597          # Not relevant for non-Windows
15598          IS_MAKE_CORRECT_ENV=true
15599        fi
15600        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15601          { $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
15602$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;}
15603        else
15604          FOUND_MAKE=$MAKE_CANDIDATE
15605
15606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15607
15608  # First separate the path from the arguments. This will split at the first
15609  # space.
15610  complete="$FOUND_MAKE"
15611  path="${complete%% *}"
15612  tmp="$complete EOL"
15613  arguments="${tmp#* }"
15614
15615  # Input might be given as Windows format, start by converting to
15616  # unix format.
15617  new_path=`$CYGPATH -u "$path"`
15618
15619  # Now try to locate executable using which
15620  new_path=`$WHICH "$new_path" 2> /dev/null`
15621  # bat and cmd files are not always considered executable in cygwin causing which
15622  # to not find them
15623  if test "x$new_path" = x \
15624      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15625      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15626    new_path=`$CYGPATH -u "$path"`
15627  fi
15628  if test "x$new_path" = x; then
15629    # Oops. Which didn't find the executable.
15630    # The splitting of arguments from the executable at a space might have been incorrect,
15631    # since paths with space are more likely in Windows. Give it another try with the whole
15632    # argument.
15633    path="$complete"
15634    arguments="EOL"
15635    new_path=`$CYGPATH -u "$path"`
15636    new_path=`$WHICH "$new_path" 2> /dev/null`
15637    # bat and cmd files are not always considered executable in cygwin causing which
15638    # to not find them
15639    if test "x$new_path" = x \
15640        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15641        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15642      new_path=`$CYGPATH -u "$path"`
15643    fi
15644    if test "x$new_path" = x; then
15645      # It's still not found. Now this is an unrecoverable error.
15646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15647$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15648      has_space=`$ECHO "$complete" | $GREP " "`
15649      if test "x$has_space" != x; then
15650        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15651$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15652      fi
15653      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15654    fi
15655  fi
15656
15657  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15658  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15659  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15660  # "foo.exe" is OK but "foo" is an error.
15661  #
15662  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15663  # It is also a way to make sure we got the proper file name for the real test later on.
15664  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15665  if test "x$test_shortpath" = x; then
15666    # Short path failed, file does not exist as specified.
15667    # Try adding .exe or .cmd
15668    if test -f "${new_path}.exe"; then
15669      input_to_shortpath="${new_path}.exe"
15670    elif test -f "${new_path}.cmd"; then
15671      input_to_shortpath="${new_path}.cmd"
15672    else
15673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15674$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15675      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15676$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15677      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15678    fi
15679  else
15680    input_to_shortpath="$new_path"
15681  fi
15682
15683  # Call helper function which possibly converts this using DOS-style short mode.
15684  # If so, the updated path is stored in $new_path.
15685  new_path="$input_to_shortpath"
15686
15687  input_path="$input_to_shortpath"
15688  # Check if we need to convert this using DOS-style short mode. If the path
15689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15690  # take no chances and rewrite it.
15691  # Note: m4 eats our [], so we need to use [ and ] instead.
15692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15693  if test "x$has_forbidden_chars" != x; then
15694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15695    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15696    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15697    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15698      # Going to short mode and back again did indeed matter. Since short mode is
15699      # case insensitive, let's make it lowercase to improve readability.
15700      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15701      # Now convert it back to Unix-stile (cygpath)
15702      input_path=`$CYGPATH -u "$shortmode_path"`
15703      new_path="$input_path"
15704    fi
15705  fi
15706
15707  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15708  if test "x$test_cygdrive_prefix" = x; then
15709    # As a simple fix, exclude /usr/bin since it's not a real path.
15710    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15711      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15712      # a path prefixed by /cygdrive for fixpath to work.
15713      new_path="$CYGWIN_ROOT_PATH$input_path"
15714    fi
15715  fi
15716
15717  # remove trailing .exe if any
15718  new_path="${new_path/%.exe/}"
15719
15720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15721
15722  # First separate the path from the arguments. This will split at the first
15723  # space.
15724  complete="$FOUND_MAKE"
15725  path="${complete%% *}"
15726  tmp="$complete EOL"
15727  arguments="${tmp#* }"
15728
15729  # Input might be given as Windows format, start by converting to
15730  # unix format.
15731  new_path="$path"
15732
15733  windows_path="$new_path"
15734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15735    unix_path=`$CYGPATH -u "$windows_path"`
15736    new_path="$unix_path"
15737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15739    new_path="$unix_path"
15740  fi
15741
15742
15743  # Now try to locate executable using which
15744  new_path=`$WHICH "$new_path" 2> /dev/null`
15745
15746  if test "x$new_path" = x; then
15747    # Oops. Which didn't find the executable.
15748    # The splitting of arguments from the executable at a space might have been incorrect,
15749    # since paths with space are more likely in Windows. Give it another try with the whole
15750    # argument.
15751    path="$complete"
15752    arguments="EOL"
15753    new_path="$path"
15754
15755  windows_path="$new_path"
15756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15757    unix_path=`$CYGPATH -u "$windows_path"`
15758    new_path="$unix_path"
15759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15761    new_path="$unix_path"
15762  fi
15763
15764
15765    new_path=`$WHICH "$new_path" 2> /dev/null`
15766
15767    if test "x$new_path" = x; then
15768      # It's still not found. Now this is an unrecoverable error.
15769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15770$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15771      has_space=`$ECHO "$complete" | $GREP " "`
15772      if test "x$has_space" != x; then
15773        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15774$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15775      fi
15776      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15777    fi
15778  fi
15779
15780  # Now new_path has a complete unix path to the binary
15781  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15782    # Keep paths in /bin as-is, but remove trailing .exe if any
15783    new_path="${new_path/%.exe/}"
15784    # Do not save /bin paths to all_fixpath_prefixes!
15785  else
15786    # Not in mixed or Windows style, start by that.
15787    new_path=`cmd //c echo $new_path`
15788
15789  input_path="$new_path"
15790  # Check if we need to convert this using DOS-style short mode. If the path
15791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15792  # take no chances and rewrite it.
15793  # Note: m4 eats our [], so we need to use [ and ] instead.
15794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15795  if test "x$has_forbidden_chars" != x; then
15796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15797    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15798  fi
15799
15800    # Output is in $new_path
15801
15802  windows_path="$new_path"
15803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15804    unix_path=`$CYGPATH -u "$windows_path"`
15805    new_path="$unix_path"
15806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15808    new_path="$unix_path"
15809  fi
15810
15811    # remove trailing .exe if any
15812    new_path="${new_path/%.exe/}"
15813
15814    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15815    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15816  fi
15817
15818  else
15819    # We're on a posix platform. Hooray! :)
15820    # First separate the path from the arguments. This will split at the first
15821    # space.
15822    complete="$FOUND_MAKE"
15823    path="${complete%% *}"
15824    tmp="$complete EOL"
15825    arguments="${tmp#* }"
15826
15827    # Cannot rely on the command "which" here since it doesn't always work.
15828    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15829    if test -z "$is_absolute_path"; then
15830      # Path to executable is not absolute. Find it.
15831      IFS_save="$IFS"
15832      IFS=:
15833      for p in $PATH; do
15834        if test -f "$p/$path" && test -x "$p/$path"; then
15835          new_path="$p/$path"
15836          break
15837        fi
15838      done
15839      IFS="$IFS_save"
15840    else
15841      # This is an absolute path, we can use it without further modifications.
15842      new_path="$path"
15843    fi
15844
15845    if test "x$new_path" = x; then
15846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15847$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15848      has_space=`$ECHO "$complete" | $GREP " "`
15849      if test "x$has_space" != x; then
15850        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15851$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15852      fi
15853      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15854    fi
15855  fi
15856
15857  # Now join together the path and the arguments once again
15858  if test "x$arguments" != xEOL; then
15859    new_complete="$new_path ${arguments% *}"
15860  else
15861    new_complete="$new_path"
15862  fi
15863
15864  if test "x$complete" != "x$new_complete"; then
15865    FOUND_MAKE="$new_complete"
15866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15867$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15868  fi
15869
15870        fi
15871      fi
15872    fi
15873  fi
15874
15875
15876    if test "x$FOUND_MAKE" = x; then
15877      for ac_prog in make
15878do
15879  # Extract the first word of "$ac_prog", so it can be a program name with args.
15880set dummy $ac_prog; ac_word=$2
15881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15882$as_echo_n "checking for $ac_word... " >&6; }
15883if ${ac_cv_path_CHECK_MAKE+:} false; then :
15884  $as_echo_n "(cached) " >&6
15885else
15886  case $CHECK_MAKE in
15887  [\\/]* | ?:[\\/]*)
15888  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
15889  ;;
15890  *)
15891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15892for as_dir in $PATH
15893do
15894  IFS=$as_save_IFS
15895  test -z "$as_dir" && as_dir=.
15896    for ac_exec_ext in '' $ac_executable_extensions; do
15897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15898    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
15899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15900    break 2
15901  fi
15902done
15903  done
15904IFS=$as_save_IFS
15905
15906  ;;
15907esac
15908fi
15909CHECK_MAKE=$ac_cv_path_CHECK_MAKE
15910if test -n "$CHECK_MAKE"; then
15911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
15912$as_echo "$CHECK_MAKE" >&6; }
15913else
15914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15915$as_echo "no" >&6; }
15916fi
15917
15918
15919  test -n "$CHECK_MAKE" && break
15920done
15921
15922
15923  MAKE_CANDIDATE=""$CHECK_MAKE""
15924  DESCRIPTION="make in PATH"
15925  if test "x$MAKE_CANDIDATE" != x; then
15926    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15927$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15928    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15929    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15930    if test "x$IS_GNU_MAKE" = x; then
15931      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15932$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15933    else
15934      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15935      if test "x$IS_MODERN_MAKE" = x; then
15936        { $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
15937$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;}
15938      else
15939        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15940          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15941            MAKE_EXPECTED_ENV='cygwin'
15942          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15943            MAKE_EXPECTED_ENV='msys'
15944          else
15945            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15946          fi
15947          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15948          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15949        else
15950          # Not relevant for non-Windows
15951          IS_MAKE_CORRECT_ENV=true
15952        fi
15953        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15954          { $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
15955$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;}
15956        else
15957          FOUND_MAKE=$MAKE_CANDIDATE
15958
15959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15960
15961  # First separate the path from the arguments. This will split at the first
15962  # space.
15963  complete="$FOUND_MAKE"
15964  path="${complete%% *}"
15965  tmp="$complete EOL"
15966  arguments="${tmp#* }"
15967
15968  # Input might be given as Windows format, start by converting to
15969  # unix format.
15970  new_path=`$CYGPATH -u "$path"`
15971
15972  # Now try to locate executable using which
15973  new_path=`$WHICH "$new_path" 2> /dev/null`
15974  # bat and cmd files are not always considered executable in cygwin causing which
15975  # to not find them
15976  if test "x$new_path" = x \
15977      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15978      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15979    new_path=`$CYGPATH -u "$path"`
15980  fi
15981  if test "x$new_path" = x; then
15982    # Oops. Which didn't find the executable.
15983    # The splitting of arguments from the executable at a space might have been incorrect,
15984    # since paths with space are more likely in Windows. Give it another try with the whole
15985    # argument.
15986    path="$complete"
15987    arguments="EOL"
15988    new_path=`$CYGPATH -u "$path"`
15989    new_path=`$WHICH "$new_path" 2> /dev/null`
15990    # bat and cmd files are not always considered executable in cygwin causing which
15991    # to not find them
15992    if test "x$new_path" = x \
15993        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15994        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15995      new_path=`$CYGPATH -u "$path"`
15996    fi
15997    if test "x$new_path" = x; then
15998      # It's still not found. Now this is an unrecoverable error.
15999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16000$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16001      has_space=`$ECHO "$complete" | $GREP " "`
16002      if test "x$has_space" != x; then
16003        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16004$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16005      fi
16006      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16007    fi
16008  fi
16009
16010  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16011  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16012  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16013  # "foo.exe" is OK but "foo" is an error.
16014  #
16015  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16016  # It is also a way to make sure we got the proper file name for the real test later on.
16017  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16018  if test "x$test_shortpath" = x; then
16019    # Short path failed, file does not exist as specified.
16020    # Try adding .exe or .cmd
16021    if test -f "${new_path}.exe"; then
16022      input_to_shortpath="${new_path}.exe"
16023    elif test -f "${new_path}.cmd"; then
16024      input_to_shortpath="${new_path}.cmd"
16025    else
16026      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16027$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16028      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16029$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16030      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16031    fi
16032  else
16033    input_to_shortpath="$new_path"
16034  fi
16035
16036  # Call helper function which possibly converts this using DOS-style short mode.
16037  # If so, the updated path is stored in $new_path.
16038  new_path="$input_to_shortpath"
16039
16040  input_path="$input_to_shortpath"
16041  # Check if we need to convert this using DOS-style short mode. If the path
16042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16043  # take no chances and rewrite it.
16044  # Note: m4 eats our [], so we need to use [ and ] instead.
16045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16046  if test "x$has_forbidden_chars" != x; then
16047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16048    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16049    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16050    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16051      # Going to short mode and back again did indeed matter. Since short mode is
16052      # case insensitive, let's make it lowercase to improve readability.
16053      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16054      # Now convert it back to Unix-stile (cygpath)
16055      input_path=`$CYGPATH -u "$shortmode_path"`
16056      new_path="$input_path"
16057    fi
16058  fi
16059
16060  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16061  if test "x$test_cygdrive_prefix" = x; then
16062    # As a simple fix, exclude /usr/bin since it's not a real path.
16063    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16064      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16065      # a path prefixed by /cygdrive for fixpath to work.
16066      new_path="$CYGWIN_ROOT_PATH$input_path"
16067    fi
16068  fi
16069
16070  # remove trailing .exe if any
16071  new_path="${new_path/%.exe/}"
16072
16073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16074
16075  # First separate the path from the arguments. This will split at the first
16076  # space.
16077  complete="$FOUND_MAKE"
16078  path="${complete%% *}"
16079  tmp="$complete EOL"
16080  arguments="${tmp#* }"
16081
16082  # Input might be given as Windows format, start by converting to
16083  # unix format.
16084  new_path="$path"
16085
16086  windows_path="$new_path"
16087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16088    unix_path=`$CYGPATH -u "$windows_path"`
16089    new_path="$unix_path"
16090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16092    new_path="$unix_path"
16093  fi
16094
16095
16096  # Now try to locate executable using which
16097  new_path=`$WHICH "$new_path" 2> /dev/null`
16098
16099  if test "x$new_path" = x; then
16100    # Oops. Which didn't find the executable.
16101    # The splitting of arguments from the executable at a space might have been incorrect,
16102    # since paths with space are more likely in Windows. Give it another try with the whole
16103    # argument.
16104    path="$complete"
16105    arguments="EOL"
16106    new_path="$path"
16107
16108  windows_path="$new_path"
16109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16110    unix_path=`$CYGPATH -u "$windows_path"`
16111    new_path="$unix_path"
16112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16114    new_path="$unix_path"
16115  fi
16116
16117
16118    new_path=`$WHICH "$new_path" 2> /dev/null`
16119
16120    if test "x$new_path" = x; then
16121      # It's still not found. Now this is an unrecoverable error.
16122      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16123$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16124      has_space=`$ECHO "$complete" | $GREP " "`
16125      if test "x$has_space" != x; then
16126        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16127$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16128      fi
16129      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16130    fi
16131  fi
16132
16133  # Now new_path has a complete unix path to the binary
16134  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16135    # Keep paths in /bin as-is, but remove trailing .exe if any
16136    new_path="${new_path/%.exe/}"
16137    # Do not save /bin paths to all_fixpath_prefixes!
16138  else
16139    # Not in mixed or Windows style, start by that.
16140    new_path=`cmd //c echo $new_path`
16141
16142  input_path="$new_path"
16143  # Check if we need to convert this using DOS-style short mode. If the path
16144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16145  # take no chances and rewrite it.
16146  # Note: m4 eats our [], so we need to use [ and ] instead.
16147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16148  if test "x$has_forbidden_chars" != x; then
16149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16150    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16151  fi
16152
16153    # Output is in $new_path
16154
16155  windows_path="$new_path"
16156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16157    unix_path=`$CYGPATH -u "$windows_path"`
16158    new_path="$unix_path"
16159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16161    new_path="$unix_path"
16162  fi
16163
16164    # remove trailing .exe if any
16165    new_path="${new_path/%.exe/}"
16166
16167    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16168    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16169  fi
16170
16171  else
16172    # We're on a posix platform. Hooray! :)
16173    # First separate the path from the arguments. This will split at the first
16174    # space.
16175    complete="$FOUND_MAKE"
16176    path="${complete%% *}"
16177    tmp="$complete EOL"
16178    arguments="${tmp#* }"
16179
16180    # Cannot rely on the command "which" here since it doesn't always work.
16181    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16182    if test -z "$is_absolute_path"; then
16183      # Path to executable is not absolute. Find it.
16184      IFS_save="$IFS"
16185      IFS=:
16186      for p in $PATH; do
16187        if test -f "$p/$path" && test -x "$p/$path"; then
16188          new_path="$p/$path"
16189          break
16190        fi
16191      done
16192      IFS="$IFS_save"
16193    else
16194      # This is an absolute path, we can use it without further modifications.
16195      new_path="$path"
16196    fi
16197
16198    if test "x$new_path" = x; then
16199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16200$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16201      has_space=`$ECHO "$complete" | $GREP " "`
16202      if test "x$has_space" != x; then
16203        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16204$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16205      fi
16206      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16207    fi
16208  fi
16209
16210  # Now join together the path and the arguments once again
16211  if test "x$arguments" != xEOL; then
16212    new_complete="$new_path ${arguments% *}"
16213  else
16214    new_complete="$new_path"
16215  fi
16216
16217  if test "x$complete" != "x$new_complete"; then
16218    FOUND_MAKE="$new_complete"
16219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16220$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16221  fi
16222
16223        fi
16224      fi
16225    fi
16226  fi
16227
16228    fi
16229
16230    if test "x$FOUND_MAKE" = x; then
16231      if test "x$TOOLCHAIN_PATH" != x; then
16232        # We have a toolchain path, check that as well before giving up.
16233        OLD_PATH=$PATH
16234        PATH=$TOOLCHAIN_PATH:$PATH
16235        for ac_prog in gmake
16236do
16237  # Extract the first word of "$ac_prog", so it can be a program name with args.
16238set dummy $ac_prog; ac_word=$2
16239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16240$as_echo_n "checking for $ac_word... " >&6; }
16241if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16242  $as_echo_n "(cached) " >&6
16243else
16244  case $CHECK_TOOLSDIR_GMAKE in
16245  [\\/]* | ?:[\\/]*)
16246  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16247  ;;
16248  *)
16249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16250for as_dir in $PATH
16251do
16252  IFS=$as_save_IFS
16253  test -z "$as_dir" && as_dir=.
16254    for ac_exec_ext in '' $ac_executable_extensions; do
16255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16256    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16258    break 2
16259  fi
16260done
16261  done
16262IFS=$as_save_IFS
16263
16264  ;;
16265esac
16266fi
16267CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16268if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16270$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16271else
16272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16273$as_echo "no" >&6; }
16274fi
16275
16276
16277  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16278done
16279
16280
16281  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16282  DESCRIPTION="gmake in tools-dir"
16283  if test "x$MAKE_CANDIDATE" != x; then
16284    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16285$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16286    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16287    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16288    if test "x$IS_GNU_MAKE" = x; then
16289      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16290$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16291    else
16292      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16293      if test "x$IS_MODERN_MAKE" = x; then
16294        { $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
16295$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;}
16296      else
16297        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16298          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16299            MAKE_EXPECTED_ENV='cygwin'
16300          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16301            MAKE_EXPECTED_ENV='msys'
16302          else
16303            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16304          fi
16305          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16306          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16307        else
16308          # Not relevant for non-Windows
16309          IS_MAKE_CORRECT_ENV=true
16310        fi
16311        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16312          { $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
16313$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;}
16314        else
16315          FOUND_MAKE=$MAKE_CANDIDATE
16316
16317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16318
16319  # First separate the path from the arguments. This will split at the first
16320  # space.
16321  complete="$FOUND_MAKE"
16322  path="${complete%% *}"
16323  tmp="$complete EOL"
16324  arguments="${tmp#* }"
16325
16326  # Input might be given as Windows format, start by converting to
16327  # unix format.
16328  new_path=`$CYGPATH -u "$path"`
16329
16330  # Now try to locate executable using which
16331  new_path=`$WHICH "$new_path" 2> /dev/null`
16332  # bat and cmd files are not always considered executable in cygwin causing which
16333  # to not find them
16334  if test "x$new_path" = x \
16335      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16336      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16337    new_path=`$CYGPATH -u "$path"`
16338  fi
16339  if test "x$new_path" = x; then
16340    # Oops. Which didn't find the executable.
16341    # The splitting of arguments from the executable at a space might have been incorrect,
16342    # since paths with space are more likely in Windows. Give it another try with the whole
16343    # argument.
16344    path="$complete"
16345    arguments="EOL"
16346    new_path=`$CYGPATH -u "$path"`
16347    new_path=`$WHICH "$new_path" 2> /dev/null`
16348    # bat and cmd files are not always considered executable in cygwin causing which
16349    # to not find them
16350    if test "x$new_path" = x \
16351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16353      new_path=`$CYGPATH -u "$path"`
16354    fi
16355    if test "x$new_path" = x; then
16356      # It's still not found. Now this is an unrecoverable error.
16357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16358$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16359      has_space=`$ECHO "$complete" | $GREP " "`
16360      if test "x$has_space" != x; then
16361        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16362$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16363      fi
16364      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16365    fi
16366  fi
16367
16368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16371  # "foo.exe" is OK but "foo" is an error.
16372  #
16373  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16374  # It is also a way to make sure we got the proper file name for the real test later on.
16375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16376  if test "x$test_shortpath" = x; then
16377    # Short path failed, file does not exist as specified.
16378    # Try adding .exe or .cmd
16379    if test -f "${new_path}.exe"; then
16380      input_to_shortpath="${new_path}.exe"
16381    elif test -f "${new_path}.cmd"; then
16382      input_to_shortpath="${new_path}.cmd"
16383    else
16384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16385$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16386      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16387$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16388      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16389    fi
16390  else
16391    input_to_shortpath="$new_path"
16392  fi
16393
16394  # Call helper function which possibly converts this using DOS-style short mode.
16395  # If so, the updated path is stored in $new_path.
16396  new_path="$input_to_shortpath"
16397
16398  input_path="$input_to_shortpath"
16399  # Check if we need to convert this using DOS-style short mode. If the path
16400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16401  # take no chances and rewrite it.
16402  # Note: m4 eats our [], so we need to use [ and ] instead.
16403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16404  if test "x$has_forbidden_chars" != x; then
16405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16409      # Going to short mode and back again did indeed matter. Since short mode is
16410      # case insensitive, let's make it lowercase to improve readability.
16411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16412      # Now convert it back to Unix-stile (cygpath)
16413      input_path=`$CYGPATH -u "$shortmode_path"`
16414      new_path="$input_path"
16415    fi
16416  fi
16417
16418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16419  if test "x$test_cygdrive_prefix" = x; then
16420    # As a simple fix, exclude /usr/bin since it's not a real path.
16421    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16423      # a path prefixed by /cygdrive for fixpath to work.
16424      new_path="$CYGWIN_ROOT_PATH$input_path"
16425    fi
16426  fi
16427
16428  # remove trailing .exe if any
16429  new_path="${new_path/%.exe/}"
16430
16431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16432
16433  # First separate the path from the arguments. This will split at the first
16434  # space.
16435  complete="$FOUND_MAKE"
16436  path="${complete%% *}"
16437  tmp="$complete EOL"
16438  arguments="${tmp#* }"
16439
16440  # Input might be given as Windows format, start by converting to
16441  # unix format.
16442  new_path="$path"
16443
16444  windows_path="$new_path"
16445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16446    unix_path=`$CYGPATH -u "$windows_path"`
16447    new_path="$unix_path"
16448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16450    new_path="$unix_path"
16451  fi
16452
16453
16454  # Now try to locate executable using which
16455  new_path=`$WHICH "$new_path" 2> /dev/null`
16456
16457  if test "x$new_path" = x; then
16458    # Oops. Which didn't find the executable.
16459    # The splitting of arguments from the executable at a space might have been incorrect,
16460    # since paths with space are more likely in Windows. Give it another try with the whole
16461    # argument.
16462    path="$complete"
16463    arguments="EOL"
16464    new_path="$path"
16465
16466  windows_path="$new_path"
16467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16468    unix_path=`$CYGPATH -u "$windows_path"`
16469    new_path="$unix_path"
16470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16472    new_path="$unix_path"
16473  fi
16474
16475
16476    new_path=`$WHICH "$new_path" 2> /dev/null`
16477
16478    if test "x$new_path" = x; then
16479      # It's still not found. Now this is an unrecoverable error.
16480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16481$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16482      has_space=`$ECHO "$complete" | $GREP " "`
16483      if test "x$has_space" != x; then
16484        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16485$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16486      fi
16487      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16488    fi
16489  fi
16490
16491  # Now new_path has a complete unix path to the binary
16492  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16493    # Keep paths in /bin as-is, but remove trailing .exe if any
16494    new_path="${new_path/%.exe/}"
16495    # Do not save /bin paths to all_fixpath_prefixes!
16496  else
16497    # Not in mixed or Windows style, start by that.
16498    new_path=`cmd //c echo $new_path`
16499
16500  input_path="$new_path"
16501  # Check if we need to convert this using DOS-style short mode. If the path
16502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16503  # take no chances and rewrite it.
16504  # Note: m4 eats our [], so we need to use [ and ] instead.
16505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16506  if test "x$has_forbidden_chars" != x; then
16507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16508    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16509  fi
16510
16511    # Output is in $new_path
16512
16513  windows_path="$new_path"
16514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16515    unix_path=`$CYGPATH -u "$windows_path"`
16516    new_path="$unix_path"
16517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16519    new_path="$unix_path"
16520  fi
16521
16522    # remove trailing .exe if any
16523    new_path="${new_path/%.exe/}"
16524
16525    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16526    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16527  fi
16528
16529  else
16530    # We're on a posix platform. Hooray! :)
16531    # First separate the path from the arguments. This will split at the first
16532    # space.
16533    complete="$FOUND_MAKE"
16534    path="${complete%% *}"
16535    tmp="$complete EOL"
16536    arguments="${tmp#* }"
16537
16538    # Cannot rely on the command "which" here since it doesn't always work.
16539    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16540    if test -z "$is_absolute_path"; then
16541      # Path to executable is not absolute. Find it.
16542      IFS_save="$IFS"
16543      IFS=:
16544      for p in $PATH; do
16545        if test -f "$p/$path" && test -x "$p/$path"; then
16546          new_path="$p/$path"
16547          break
16548        fi
16549      done
16550      IFS="$IFS_save"
16551    else
16552      # This is an absolute path, we can use it without further modifications.
16553      new_path="$path"
16554    fi
16555
16556    if test "x$new_path" = x; then
16557      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16558$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16559      has_space=`$ECHO "$complete" | $GREP " "`
16560      if test "x$has_space" != x; then
16561        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16562$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16563      fi
16564      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16565    fi
16566  fi
16567
16568  # Now join together the path and the arguments once again
16569  if test "x$arguments" != xEOL; then
16570    new_complete="$new_path ${arguments% *}"
16571  else
16572    new_complete="$new_path"
16573  fi
16574
16575  if test "x$complete" != "x$new_complete"; then
16576    FOUND_MAKE="$new_complete"
16577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16578$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16579  fi
16580
16581        fi
16582      fi
16583    fi
16584  fi
16585
16586        if test "x$FOUND_MAKE" = x; then
16587          for ac_prog in make
16588do
16589  # Extract the first word of "$ac_prog", so it can be a program name with args.
16590set dummy $ac_prog; ac_word=$2
16591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16592$as_echo_n "checking for $ac_word... " >&6; }
16593if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16594  $as_echo_n "(cached) " >&6
16595else
16596  case $CHECK_TOOLSDIR_MAKE in
16597  [\\/]* | ?:[\\/]*)
16598  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16599  ;;
16600  *)
16601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16602for as_dir in $PATH
16603do
16604  IFS=$as_save_IFS
16605  test -z "$as_dir" && as_dir=.
16606    for ac_exec_ext in '' $ac_executable_extensions; do
16607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16608    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16610    break 2
16611  fi
16612done
16613  done
16614IFS=$as_save_IFS
16615
16616  ;;
16617esac
16618fi
16619CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16620if test -n "$CHECK_TOOLSDIR_MAKE"; then
16621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16622$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16623else
16624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16625$as_echo "no" >&6; }
16626fi
16627
16628
16629  test -n "$CHECK_TOOLSDIR_MAKE" && break
16630done
16631
16632
16633  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16634  DESCRIPTION="make in tools-dir"
16635  if test "x$MAKE_CANDIDATE" != x; then
16636    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16637$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16638    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16639    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16640    if test "x$IS_GNU_MAKE" = x; then
16641      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16642$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16643    else
16644      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16645      if test "x$IS_MODERN_MAKE" = x; then
16646        { $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
16647$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;}
16648      else
16649        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16650          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16651            MAKE_EXPECTED_ENV='cygwin'
16652          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16653            MAKE_EXPECTED_ENV='msys'
16654          else
16655            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16656          fi
16657          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16658          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16659        else
16660          # Not relevant for non-Windows
16661          IS_MAKE_CORRECT_ENV=true
16662        fi
16663        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16664          { $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
16665$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;}
16666        else
16667          FOUND_MAKE=$MAKE_CANDIDATE
16668
16669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16670
16671  # First separate the path from the arguments. This will split at the first
16672  # space.
16673  complete="$FOUND_MAKE"
16674  path="${complete%% *}"
16675  tmp="$complete EOL"
16676  arguments="${tmp#* }"
16677
16678  # Input might be given as Windows format, start by converting to
16679  # unix format.
16680  new_path=`$CYGPATH -u "$path"`
16681
16682  # Now try to locate executable using which
16683  new_path=`$WHICH "$new_path" 2> /dev/null`
16684  # bat and cmd files are not always considered executable in cygwin causing which
16685  # to not find them
16686  if test "x$new_path" = x \
16687      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16688      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16689    new_path=`$CYGPATH -u "$path"`
16690  fi
16691  if test "x$new_path" = x; then
16692    # Oops. Which didn't find the executable.
16693    # The splitting of arguments from the executable at a space might have been incorrect,
16694    # since paths with space are more likely in Windows. Give it another try with the whole
16695    # argument.
16696    path="$complete"
16697    arguments="EOL"
16698    new_path=`$CYGPATH -u "$path"`
16699    new_path=`$WHICH "$new_path" 2> /dev/null`
16700    # bat and cmd files are not always considered executable in cygwin causing which
16701    # to not find them
16702    if test "x$new_path" = x \
16703        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16704        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16705      new_path=`$CYGPATH -u "$path"`
16706    fi
16707    if test "x$new_path" = x; then
16708      # It's still not found. Now this is an unrecoverable error.
16709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16710$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16711      has_space=`$ECHO "$complete" | $GREP " "`
16712      if test "x$has_space" != x; then
16713        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16714$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16715      fi
16716      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16717    fi
16718  fi
16719
16720  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16721  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16722  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16723  # "foo.exe" is OK but "foo" is an error.
16724  #
16725  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16726  # It is also a way to make sure we got the proper file name for the real test later on.
16727  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16728  if test "x$test_shortpath" = x; then
16729    # Short path failed, file does not exist as specified.
16730    # Try adding .exe or .cmd
16731    if test -f "${new_path}.exe"; then
16732      input_to_shortpath="${new_path}.exe"
16733    elif test -f "${new_path}.cmd"; then
16734      input_to_shortpath="${new_path}.cmd"
16735    else
16736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16737$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16738      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16739$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16740      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16741    fi
16742  else
16743    input_to_shortpath="$new_path"
16744  fi
16745
16746  # Call helper function which possibly converts this using DOS-style short mode.
16747  # If so, the updated path is stored in $new_path.
16748  new_path="$input_to_shortpath"
16749
16750  input_path="$input_to_shortpath"
16751  # Check if we need to convert this using DOS-style short mode. If the path
16752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16753  # take no chances and rewrite it.
16754  # Note: m4 eats our [], so we need to use [ and ] instead.
16755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16756  if test "x$has_forbidden_chars" != x; then
16757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16758    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16759    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16760    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16761      # Going to short mode and back again did indeed matter. Since short mode is
16762      # case insensitive, let's make it lowercase to improve readability.
16763      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16764      # Now convert it back to Unix-stile (cygpath)
16765      input_path=`$CYGPATH -u "$shortmode_path"`
16766      new_path="$input_path"
16767    fi
16768  fi
16769
16770  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16771  if test "x$test_cygdrive_prefix" = x; then
16772    # As a simple fix, exclude /usr/bin since it's not a real path.
16773    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16774      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16775      # a path prefixed by /cygdrive for fixpath to work.
16776      new_path="$CYGWIN_ROOT_PATH$input_path"
16777    fi
16778  fi
16779
16780  # remove trailing .exe if any
16781  new_path="${new_path/%.exe/}"
16782
16783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16784
16785  # First separate the path from the arguments. This will split at the first
16786  # space.
16787  complete="$FOUND_MAKE"
16788  path="${complete%% *}"
16789  tmp="$complete EOL"
16790  arguments="${tmp#* }"
16791
16792  # Input might be given as Windows format, start by converting to
16793  # unix format.
16794  new_path="$path"
16795
16796  windows_path="$new_path"
16797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16798    unix_path=`$CYGPATH -u "$windows_path"`
16799    new_path="$unix_path"
16800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16802    new_path="$unix_path"
16803  fi
16804
16805
16806  # Now try to locate executable using which
16807  new_path=`$WHICH "$new_path" 2> /dev/null`
16808
16809  if test "x$new_path" = x; then
16810    # Oops. Which didn't find the executable.
16811    # The splitting of arguments from the executable at a space might have been incorrect,
16812    # since paths with space are more likely in Windows. Give it another try with the whole
16813    # argument.
16814    path="$complete"
16815    arguments="EOL"
16816    new_path="$path"
16817
16818  windows_path="$new_path"
16819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16820    unix_path=`$CYGPATH -u "$windows_path"`
16821    new_path="$unix_path"
16822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16824    new_path="$unix_path"
16825  fi
16826
16827
16828    new_path=`$WHICH "$new_path" 2> /dev/null`
16829
16830    if test "x$new_path" = x; then
16831      # It's still not found. Now this is an unrecoverable error.
16832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16833$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16834      has_space=`$ECHO "$complete" | $GREP " "`
16835      if test "x$has_space" != x; then
16836        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16837$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16838      fi
16839      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16840    fi
16841  fi
16842
16843  # Now new_path has a complete unix path to the binary
16844  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16845    # Keep paths in /bin as-is, but remove trailing .exe if any
16846    new_path="${new_path/%.exe/}"
16847    # Do not save /bin paths to all_fixpath_prefixes!
16848  else
16849    # Not in mixed or Windows style, start by that.
16850    new_path=`cmd //c echo $new_path`
16851
16852  input_path="$new_path"
16853  # Check if we need to convert this using DOS-style short mode. If the path
16854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16855  # take no chances and rewrite it.
16856  # Note: m4 eats our [], so we need to use [ and ] instead.
16857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16858  if test "x$has_forbidden_chars" != x; then
16859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16861  fi
16862
16863    # Output is in $new_path
16864
16865  windows_path="$new_path"
16866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16867    unix_path=`$CYGPATH -u "$windows_path"`
16868    new_path="$unix_path"
16869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16871    new_path="$unix_path"
16872  fi
16873
16874    # remove trailing .exe if any
16875    new_path="${new_path/%.exe/}"
16876
16877    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16878    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16879  fi
16880
16881  else
16882    # We're on a posix platform. Hooray! :)
16883    # First separate the path from the arguments. This will split at the first
16884    # space.
16885    complete="$FOUND_MAKE"
16886    path="${complete%% *}"
16887    tmp="$complete EOL"
16888    arguments="${tmp#* }"
16889
16890    # Cannot rely on the command "which" here since it doesn't always work.
16891    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16892    if test -z "$is_absolute_path"; then
16893      # Path to executable is not absolute. Find it.
16894      IFS_save="$IFS"
16895      IFS=:
16896      for p in $PATH; do
16897        if test -f "$p/$path" && test -x "$p/$path"; then
16898          new_path="$p/$path"
16899          break
16900        fi
16901      done
16902      IFS="$IFS_save"
16903    else
16904      # This is an absolute path, we can use it without further modifications.
16905      new_path="$path"
16906    fi
16907
16908    if test "x$new_path" = x; then
16909      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16910$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16911      has_space=`$ECHO "$complete" | $GREP " "`
16912      if test "x$has_space" != x; then
16913        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16914$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16915      fi
16916      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16917    fi
16918  fi
16919
16920  # Now join together the path and the arguments once again
16921  if test "x$arguments" != xEOL; then
16922    new_complete="$new_path ${arguments% *}"
16923  else
16924    new_complete="$new_path"
16925  fi
16926
16927  if test "x$complete" != "x$new_complete"; then
16928    FOUND_MAKE="$new_complete"
16929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16930$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16931  fi
16932
16933        fi
16934      fi
16935    fi
16936  fi
16937
16938        fi
16939        PATH=$OLD_PATH
16940      fi
16941    fi
16942
16943    if test "x$FOUND_MAKE" = x; then
16944      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
16945    fi
16946  fi
16947
16948  MAKE=$FOUND_MAKE
16949
16950  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
16951$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
16952
16953
16954
16955  # Test if find supports -delete
16956  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
16957$as_echo_n "checking if find supports -delete... " >&6; }
16958  FIND_DELETE="-delete"
16959
16960  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
16961
16962  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
16963
16964  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
16965  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
16966    # No, it does not.
16967    rm $DELETEDIR/TestIfFindSupportsDelete
16968    FIND_DELETE="-exec rm \{\} \+"
16969    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16970$as_echo "no" >&6; }
16971  else
16972    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16973$as_echo "yes" >&6; }
16974  fi
16975  rmdir $DELETEDIR
16976
16977
16978
16979  # These tools might not be installed by default,
16980  # need hint on how to install them.
16981
16982
16983
16984  # Publish this variable in the help.
16985
16986
16987  if test "x$UNZIP" = x; then
16988    # The variable is not set by user, try to locate tool using the code snippet
16989    for ac_prog in unzip
16990do
16991  # Extract the first word of "$ac_prog", so it can be a program name with args.
16992set dummy $ac_prog; ac_word=$2
16993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16994$as_echo_n "checking for $ac_word... " >&6; }
16995if ${ac_cv_path_UNZIP+:} false; then :
16996  $as_echo_n "(cached) " >&6
16997else
16998  case $UNZIP in
16999  [\\/]* | ?:[\\/]*)
17000  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17001  ;;
17002  *)
17003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17004for as_dir in $PATH
17005do
17006  IFS=$as_save_IFS
17007  test -z "$as_dir" && as_dir=.
17008    for ac_exec_ext in '' $ac_executable_extensions; do
17009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17010    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17012    break 2
17013  fi
17014done
17015  done
17016IFS=$as_save_IFS
17017
17018  ;;
17019esac
17020fi
17021UNZIP=$ac_cv_path_UNZIP
17022if test -n "$UNZIP"; then
17023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17024$as_echo "$UNZIP" >&6; }
17025else
17026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17027$as_echo "no" >&6; }
17028fi
17029
17030
17031  test -n "$UNZIP" && break
17032done
17033
17034  else
17035    # The variable is set, but is it from the command line or the environment?
17036
17037    # Try to remove the string !UNZIP! from our list.
17038    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17039    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17040      # If it failed, the variable was not from the command line. Ignore it,
17041      # but warn the user (except for BASH, which is always set by the calling BASH).
17042      if test "xUNZIP" != xBASH; then
17043        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17044$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17045      fi
17046      # Try to locate tool using the code snippet
17047      for ac_prog in unzip
17048do
17049  # Extract the first word of "$ac_prog", so it can be a program name with args.
17050set dummy $ac_prog; ac_word=$2
17051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17052$as_echo_n "checking for $ac_word... " >&6; }
17053if ${ac_cv_path_UNZIP+:} false; then :
17054  $as_echo_n "(cached) " >&6
17055else
17056  case $UNZIP in
17057  [\\/]* | ?:[\\/]*)
17058  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17059  ;;
17060  *)
17061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17062for as_dir in $PATH
17063do
17064  IFS=$as_save_IFS
17065  test -z "$as_dir" && as_dir=.
17066    for ac_exec_ext in '' $ac_executable_extensions; do
17067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17068    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17070    break 2
17071  fi
17072done
17073  done
17074IFS=$as_save_IFS
17075
17076  ;;
17077esac
17078fi
17079UNZIP=$ac_cv_path_UNZIP
17080if test -n "$UNZIP"; then
17081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17082$as_echo "$UNZIP" >&6; }
17083else
17084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17085$as_echo "no" >&6; }
17086fi
17087
17088
17089  test -n "$UNZIP" && break
17090done
17091
17092    else
17093      # If it succeeded, then it was overridden by the user. We will use it
17094      # for the tool.
17095
17096      # First remove it from the list of overridden variables, so we can test
17097      # for unknown variables in the end.
17098      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17099
17100      # Check if the provided tool contains a complete path.
17101      tool_specified="$UNZIP"
17102      tool_basename="${tool_specified##*/}"
17103      if test "x$tool_basename" = "x$tool_specified"; then
17104        # A command without a complete path is provided, search $PATH.
17105        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17106$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17107        # Extract the first word of "$tool_basename", so it can be a program name with args.
17108set dummy $tool_basename; ac_word=$2
17109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17110$as_echo_n "checking for $ac_word... " >&6; }
17111if ${ac_cv_path_UNZIP+:} false; then :
17112  $as_echo_n "(cached) " >&6
17113else
17114  case $UNZIP in
17115  [\\/]* | ?:[\\/]*)
17116  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17117  ;;
17118  *)
17119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17120for as_dir in $PATH
17121do
17122  IFS=$as_save_IFS
17123  test -z "$as_dir" && as_dir=.
17124    for ac_exec_ext in '' $ac_executable_extensions; do
17125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17126    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17128    break 2
17129  fi
17130done
17131  done
17132IFS=$as_save_IFS
17133
17134  ;;
17135esac
17136fi
17137UNZIP=$ac_cv_path_UNZIP
17138if test -n "$UNZIP"; then
17139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17140$as_echo "$UNZIP" >&6; }
17141else
17142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17143$as_echo "no" >&6; }
17144fi
17145
17146
17147        if test "x$UNZIP" = x; then
17148          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17149        fi
17150      else
17151        # Otherwise we believe it is a complete path. Use it as it is.
17152        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17153$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17154        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17155$as_echo_n "checking for UNZIP... " >&6; }
17156        if test ! -x "$tool_specified"; then
17157          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17158$as_echo "not found" >&6; }
17159          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17160        fi
17161        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17162$as_echo "$tool_specified" >&6; }
17163      fi
17164    fi
17165  fi
17166
17167
17168
17169  if test "x$UNZIP" = x; then
17170    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17171  fi
17172
17173
17174
17175
17176
17177  # Publish this variable in the help.
17178
17179
17180  if test "x$ZIP" = x; then
17181    # The variable is not set by user, try to locate tool using the code snippet
17182    for ac_prog in zip
17183do
17184  # Extract the first word of "$ac_prog", so it can be a program name with args.
17185set dummy $ac_prog; ac_word=$2
17186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17187$as_echo_n "checking for $ac_word... " >&6; }
17188if ${ac_cv_path_ZIP+:} false; then :
17189  $as_echo_n "(cached) " >&6
17190else
17191  case $ZIP in
17192  [\\/]* | ?:[\\/]*)
17193  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17194  ;;
17195  *)
17196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17197for as_dir in $PATH
17198do
17199  IFS=$as_save_IFS
17200  test -z "$as_dir" && as_dir=.
17201    for ac_exec_ext in '' $ac_executable_extensions; do
17202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17203    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17205    break 2
17206  fi
17207done
17208  done
17209IFS=$as_save_IFS
17210
17211  ;;
17212esac
17213fi
17214ZIP=$ac_cv_path_ZIP
17215if test -n "$ZIP"; then
17216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17217$as_echo "$ZIP" >&6; }
17218else
17219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17220$as_echo "no" >&6; }
17221fi
17222
17223
17224  test -n "$ZIP" && break
17225done
17226
17227  else
17228    # The variable is set, but is it from the command line or the environment?
17229
17230    # Try to remove the string !ZIP! from our list.
17231    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17232    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17233      # If it failed, the variable was not from the command line. Ignore it,
17234      # but warn the user (except for BASH, which is always set by the calling BASH).
17235      if test "xZIP" != xBASH; then
17236        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17237$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17238      fi
17239      # Try to locate tool using the code snippet
17240      for ac_prog in zip
17241do
17242  # Extract the first word of "$ac_prog", so it can be a program name with args.
17243set dummy $ac_prog; ac_word=$2
17244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17245$as_echo_n "checking for $ac_word... " >&6; }
17246if ${ac_cv_path_ZIP+:} false; then :
17247  $as_echo_n "(cached) " >&6
17248else
17249  case $ZIP in
17250  [\\/]* | ?:[\\/]*)
17251  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17252  ;;
17253  *)
17254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17255for as_dir in $PATH
17256do
17257  IFS=$as_save_IFS
17258  test -z "$as_dir" && as_dir=.
17259    for ac_exec_ext in '' $ac_executable_extensions; do
17260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17261    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17263    break 2
17264  fi
17265done
17266  done
17267IFS=$as_save_IFS
17268
17269  ;;
17270esac
17271fi
17272ZIP=$ac_cv_path_ZIP
17273if test -n "$ZIP"; then
17274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17275$as_echo "$ZIP" >&6; }
17276else
17277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17278$as_echo "no" >&6; }
17279fi
17280
17281
17282  test -n "$ZIP" && break
17283done
17284
17285    else
17286      # If it succeeded, then it was overridden by the user. We will use it
17287      # for the tool.
17288
17289      # First remove it from the list of overridden variables, so we can test
17290      # for unknown variables in the end.
17291      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17292
17293      # Check if the provided tool contains a complete path.
17294      tool_specified="$ZIP"
17295      tool_basename="${tool_specified##*/}"
17296      if test "x$tool_basename" = "x$tool_specified"; then
17297        # A command without a complete path is provided, search $PATH.
17298        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17299$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17300        # Extract the first word of "$tool_basename", so it can be a program name with args.
17301set dummy $tool_basename; ac_word=$2
17302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17303$as_echo_n "checking for $ac_word... " >&6; }
17304if ${ac_cv_path_ZIP+:} false; then :
17305  $as_echo_n "(cached) " >&6
17306else
17307  case $ZIP in
17308  [\\/]* | ?:[\\/]*)
17309  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17310  ;;
17311  *)
17312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17313for as_dir in $PATH
17314do
17315  IFS=$as_save_IFS
17316  test -z "$as_dir" && as_dir=.
17317    for ac_exec_ext in '' $ac_executable_extensions; do
17318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17319    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17321    break 2
17322  fi
17323done
17324  done
17325IFS=$as_save_IFS
17326
17327  ;;
17328esac
17329fi
17330ZIP=$ac_cv_path_ZIP
17331if test -n "$ZIP"; then
17332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17333$as_echo "$ZIP" >&6; }
17334else
17335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17336$as_echo "no" >&6; }
17337fi
17338
17339
17340        if test "x$ZIP" = x; then
17341          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17342        fi
17343      else
17344        # Otherwise we believe it is a complete path. Use it as it is.
17345        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17346$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17347        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17348$as_echo_n "checking for ZIP... " >&6; }
17349        if test ! -x "$tool_specified"; then
17350          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17351$as_echo "not found" >&6; }
17352          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17353        fi
17354        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17355$as_echo "$tool_specified" >&6; }
17356      fi
17357    fi
17358  fi
17359
17360
17361
17362  if test "x$ZIP" = x; then
17363    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17364  fi
17365
17366
17367
17368  # Non-required basic tools
17369
17370
17371
17372  # Publish this variable in the help.
17373
17374
17375  if test "x$LDD" = x; then
17376    # The variable is not set by user, try to locate tool using the code snippet
17377    for ac_prog in ldd
17378do
17379  # Extract the first word of "$ac_prog", so it can be a program name with args.
17380set dummy $ac_prog; ac_word=$2
17381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17382$as_echo_n "checking for $ac_word... " >&6; }
17383if ${ac_cv_path_LDD+:} false; then :
17384  $as_echo_n "(cached) " >&6
17385else
17386  case $LDD in
17387  [\\/]* | ?:[\\/]*)
17388  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17389  ;;
17390  *)
17391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17392for as_dir in $PATH
17393do
17394  IFS=$as_save_IFS
17395  test -z "$as_dir" && as_dir=.
17396    for ac_exec_ext in '' $ac_executable_extensions; do
17397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17398    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17400    break 2
17401  fi
17402done
17403  done
17404IFS=$as_save_IFS
17405
17406  ;;
17407esac
17408fi
17409LDD=$ac_cv_path_LDD
17410if test -n "$LDD"; then
17411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17412$as_echo "$LDD" >&6; }
17413else
17414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17415$as_echo "no" >&6; }
17416fi
17417
17418
17419  test -n "$LDD" && break
17420done
17421
17422  else
17423    # The variable is set, but is it from the command line or the environment?
17424
17425    # Try to remove the string !LDD! from our list.
17426    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17427    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17428      # If it failed, the variable was not from the command line. Ignore it,
17429      # but warn the user (except for BASH, which is always set by the calling BASH).
17430      if test "xLDD" != xBASH; then
17431        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17432$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17433      fi
17434      # Try to locate tool using the code snippet
17435      for ac_prog in ldd
17436do
17437  # Extract the first word of "$ac_prog", so it can be a program name with args.
17438set dummy $ac_prog; ac_word=$2
17439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17440$as_echo_n "checking for $ac_word... " >&6; }
17441if ${ac_cv_path_LDD+:} false; then :
17442  $as_echo_n "(cached) " >&6
17443else
17444  case $LDD in
17445  [\\/]* | ?:[\\/]*)
17446  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17447  ;;
17448  *)
17449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17450for as_dir in $PATH
17451do
17452  IFS=$as_save_IFS
17453  test -z "$as_dir" && as_dir=.
17454    for ac_exec_ext in '' $ac_executable_extensions; do
17455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17456    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17458    break 2
17459  fi
17460done
17461  done
17462IFS=$as_save_IFS
17463
17464  ;;
17465esac
17466fi
17467LDD=$ac_cv_path_LDD
17468if test -n "$LDD"; then
17469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17470$as_echo "$LDD" >&6; }
17471else
17472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17473$as_echo "no" >&6; }
17474fi
17475
17476
17477  test -n "$LDD" && break
17478done
17479
17480    else
17481      # If it succeeded, then it was overridden by the user. We will use it
17482      # for the tool.
17483
17484      # First remove it from the list of overridden variables, so we can test
17485      # for unknown variables in the end.
17486      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17487
17488      # Check if the provided tool contains a complete path.
17489      tool_specified="$LDD"
17490      tool_basename="${tool_specified##*/}"
17491      if test "x$tool_basename" = "x$tool_specified"; then
17492        # A command without a complete path is provided, search $PATH.
17493        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17494$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17495        # Extract the first word of "$tool_basename", so it can be a program name with args.
17496set dummy $tool_basename; ac_word=$2
17497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17498$as_echo_n "checking for $ac_word... " >&6; }
17499if ${ac_cv_path_LDD+:} false; then :
17500  $as_echo_n "(cached) " >&6
17501else
17502  case $LDD in
17503  [\\/]* | ?:[\\/]*)
17504  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17505  ;;
17506  *)
17507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17508for as_dir in $PATH
17509do
17510  IFS=$as_save_IFS
17511  test -z "$as_dir" && as_dir=.
17512    for ac_exec_ext in '' $ac_executable_extensions; do
17513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17514    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17516    break 2
17517  fi
17518done
17519  done
17520IFS=$as_save_IFS
17521
17522  ;;
17523esac
17524fi
17525LDD=$ac_cv_path_LDD
17526if test -n "$LDD"; then
17527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17528$as_echo "$LDD" >&6; }
17529else
17530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17531$as_echo "no" >&6; }
17532fi
17533
17534
17535        if test "x$LDD" = x; then
17536          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17537        fi
17538      else
17539        # Otherwise we believe it is a complete path. Use it as it is.
17540        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17541$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17542        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17543$as_echo_n "checking for LDD... " >&6; }
17544        if test ! -x "$tool_specified"; then
17545          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17546$as_echo "not found" >&6; }
17547          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17548        fi
17549        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17550$as_echo "$tool_specified" >&6; }
17551      fi
17552    fi
17553  fi
17554
17555
17556  if test "x$LDD" = "x"; then
17557    # List shared lib dependencies is used for
17558    # debug output and checking for forbidden dependencies.
17559    # We can build without it.
17560    LDD="true"
17561  fi
17562
17563
17564  # Publish this variable in the help.
17565
17566
17567  if test "x$OTOOL" = x; then
17568    # The variable is not set by user, try to locate tool using the code snippet
17569    for ac_prog in otool
17570do
17571  # Extract the first word of "$ac_prog", so it can be a program name with args.
17572set dummy $ac_prog; ac_word=$2
17573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17574$as_echo_n "checking for $ac_word... " >&6; }
17575if ${ac_cv_path_OTOOL+:} false; then :
17576  $as_echo_n "(cached) " >&6
17577else
17578  case $OTOOL in
17579  [\\/]* | ?:[\\/]*)
17580  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17581  ;;
17582  *)
17583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17584for as_dir in $PATH
17585do
17586  IFS=$as_save_IFS
17587  test -z "$as_dir" && as_dir=.
17588    for ac_exec_ext in '' $ac_executable_extensions; do
17589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17590    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17592    break 2
17593  fi
17594done
17595  done
17596IFS=$as_save_IFS
17597
17598  ;;
17599esac
17600fi
17601OTOOL=$ac_cv_path_OTOOL
17602if test -n "$OTOOL"; then
17603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17604$as_echo "$OTOOL" >&6; }
17605else
17606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17607$as_echo "no" >&6; }
17608fi
17609
17610
17611  test -n "$OTOOL" && break
17612done
17613
17614  else
17615    # The variable is set, but is it from the command line or the environment?
17616
17617    # Try to remove the string !OTOOL! from our list.
17618    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17619    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17620      # If it failed, the variable was not from the command line. Ignore it,
17621      # but warn the user (except for BASH, which is always set by the calling BASH).
17622      if test "xOTOOL" != xBASH; then
17623        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17624$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17625      fi
17626      # Try to locate tool using the code snippet
17627      for ac_prog in otool
17628do
17629  # Extract the first word of "$ac_prog", so it can be a program name with args.
17630set dummy $ac_prog; ac_word=$2
17631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17632$as_echo_n "checking for $ac_word... " >&6; }
17633if ${ac_cv_path_OTOOL+:} false; then :
17634  $as_echo_n "(cached) " >&6
17635else
17636  case $OTOOL in
17637  [\\/]* | ?:[\\/]*)
17638  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17639  ;;
17640  *)
17641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17642for as_dir in $PATH
17643do
17644  IFS=$as_save_IFS
17645  test -z "$as_dir" && as_dir=.
17646    for ac_exec_ext in '' $ac_executable_extensions; do
17647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17648    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17650    break 2
17651  fi
17652done
17653  done
17654IFS=$as_save_IFS
17655
17656  ;;
17657esac
17658fi
17659OTOOL=$ac_cv_path_OTOOL
17660if test -n "$OTOOL"; then
17661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17662$as_echo "$OTOOL" >&6; }
17663else
17664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17665$as_echo "no" >&6; }
17666fi
17667
17668
17669  test -n "$OTOOL" && break
17670done
17671
17672    else
17673      # If it succeeded, then it was overridden by the user. We will use it
17674      # for the tool.
17675
17676      # First remove it from the list of overridden variables, so we can test
17677      # for unknown variables in the end.
17678      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17679
17680      # Check if the provided tool contains a complete path.
17681      tool_specified="$OTOOL"
17682      tool_basename="${tool_specified##*/}"
17683      if test "x$tool_basename" = "x$tool_specified"; then
17684        # A command without a complete path is provided, search $PATH.
17685        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17686$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17687        # Extract the first word of "$tool_basename", so it can be a program name with args.
17688set dummy $tool_basename; ac_word=$2
17689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17690$as_echo_n "checking for $ac_word... " >&6; }
17691if ${ac_cv_path_OTOOL+:} false; then :
17692  $as_echo_n "(cached) " >&6
17693else
17694  case $OTOOL in
17695  [\\/]* | ?:[\\/]*)
17696  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17697  ;;
17698  *)
17699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17700for as_dir in $PATH
17701do
17702  IFS=$as_save_IFS
17703  test -z "$as_dir" && as_dir=.
17704    for ac_exec_ext in '' $ac_executable_extensions; do
17705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17706    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17708    break 2
17709  fi
17710done
17711  done
17712IFS=$as_save_IFS
17713
17714  ;;
17715esac
17716fi
17717OTOOL=$ac_cv_path_OTOOL
17718if test -n "$OTOOL"; then
17719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17720$as_echo "$OTOOL" >&6; }
17721else
17722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17723$as_echo "no" >&6; }
17724fi
17725
17726
17727        if test "x$OTOOL" = x; then
17728          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17729        fi
17730      else
17731        # Otherwise we believe it is a complete path. Use it as it is.
17732        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
17733$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
17734        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
17735$as_echo_n "checking for OTOOL... " >&6; }
17736        if test ! -x "$tool_specified"; then
17737          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17738$as_echo "not found" >&6; }
17739          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
17740        fi
17741        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17742$as_echo "$tool_specified" >&6; }
17743      fi
17744    fi
17745  fi
17746
17747
17748  if test "x$OTOOL" = "x"; then
17749    OTOOL="true"
17750  fi
17751
17752
17753  # Publish this variable in the help.
17754
17755
17756  if test "x$READELF" = x; then
17757    # The variable is not set by user, try to locate tool using the code snippet
17758    for ac_prog in greadelf readelf
17759do
17760  # Extract the first word of "$ac_prog", so it can be a program name with args.
17761set dummy $ac_prog; ac_word=$2
17762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17763$as_echo_n "checking for $ac_word... " >&6; }
17764if ${ac_cv_path_READELF+:} false; then :
17765  $as_echo_n "(cached) " >&6
17766else
17767  case $READELF in
17768  [\\/]* | ?:[\\/]*)
17769  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17770  ;;
17771  *)
17772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17773for as_dir in $PATH
17774do
17775  IFS=$as_save_IFS
17776  test -z "$as_dir" && as_dir=.
17777    for ac_exec_ext in '' $ac_executable_extensions; do
17778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17779    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17781    break 2
17782  fi
17783done
17784  done
17785IFS=$as_save_IFS
17786
17787  ;;
17788esac
17789fi
17790READELF=$ac_cv_path_READELF
17791if test -n "$READELF"; then
17792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17793$as_echo "$READELF" >&6; }
17794else
17795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17796$as_echo "no" >&6; }
17797fi
17798
17799
17800  test -n "$READELF" && break
17801done
17802
17803  else
17804    # The variable is set, but is it from the command line or the environment?
17805
17806    # Try to remove the string !READELF! from our list.
17807    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17808    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17809      # If it failed, the variable was not from the command line. Ignore it,
17810      # but warn the user (except for BASH, which is always set by the calling BASH).
17811      if test "xREADELF" != xBASH; then
17812        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17813$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17814      fi
17815      # Try to locate tool using the code snippet
17816      for ac_prog in greadelf readelf
17817do
17818  # Extract the first word of "$ac_prog", so it can be a program name with args.
17819set dummy $ac_prog; ac_word=$2
17820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17821$as_echo_n "checking for $ac_word... " >&6; }
17822if ${ac_cv_path_READELF+:} false; then :
17823  $as_echo_n "(cached) " >&6
17824else
17825  case $READELF in
17826  [\\/]* | ?:[\\/]*)
17827  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17828  ;;
17829  *)
17830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17831for as_dir in $PATH
17832do
17833  IFS=$as_save_IFS
17834  test -z "$as_dir" && as_dir=.
17835    for ac_exec_ext in '' $ac_executable_extensions; do
17836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17837    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17839    break 2
17840  fi
17841done
17842  done
17843IFS=$as_save_IFS
17844
17845  ;;
17846esac
17847fi
17848READELF=$ac_cv_path_READELF
17849if test -n "$READELF"; then
17850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17851$as_echo "$READELF" >&6; }
17852else
17853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17854$as_echo "no" >&6; }
17855fi
17856
17857
17858  test -n "$READELF" && break
17859done
17860
17861    else
17862      # If it succeeded, then it was overridden by the user. We will use it
17863      # for the tool.
17864
17865      # First remove it from the list of overridden variables, so we can test
17866      # for unknown variables in the end.
17867      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17868
17869      # Check if the provided tool contains a complete path.
17870      tool_specified="$READELF"
17871      tool_basename="${tool_specified##*/}"
17872      if test "x$tool_basename" = "x$tool_specified"; then
17873        # A command without a complete path is provided, search $PATH.
17874        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17875$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17876        # Extract the first word of "$tool_basename", so it can be a program name with args.
17877set dummy $tool_basename; ac_word=$2
17878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17879$as_echo_n "checking for $ac_word... " >&6; }
17880if ${ac_cv_path_READELF+:} false; then :
17881  $as_echo_n "(cached) " >&6
17882else
17883  case $READELF in
17884  [\\/]* | ?:[\\/]*)
17885  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17886  ;;
17887  *)
17888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17889for as_dir in $PATH
17890do
17891  IFS=$as_save_IFS
17892  test -z "$as_dir" && as_dir=.
17893    for ac_exec_ext in '' $ac_executable_extensions; do
17894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17895    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17897    break 2
17898  fi
17899done
17900  done
17901IFS=$as_save_IFS
17902
17903  ;;
17904esac
17905fi
17906READELF=$ac_cv_path_READELF
17907if test -n "$READELF"; then
17908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17909$as_echo "$READELF" >&6; }
17910else
17911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17912$as_echo "no" >&6; }
17913fi
17914
17915
17916        if test "x$READELF" = x; then
17917          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17918        fi
17919      else
17920        # Otherwise we believe it is a complete path. Use it as it is.
17921        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
17922$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
17923        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
17924$as_echo_n "checking for READELF... " >&6; }
17925        if test ! -x "$tool_specified"; then
17926          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17927$as_echo "not found" >&6; }
17928          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
17929        fi
17930        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17931$as_echo "$tool_specified" >&6; }
17932      fi
17933    fi
17934  fi
17935
17936
17937
17938
17939  # Publish this variable in the help.
17940
17941
17942  if test "x$HG" = x; then
17943    # The variable is not set by user, try to locate tool using the code snippet
17944    for ac_prog in hg
17945do
17946  # Extract the first word of "$ac_prog", so it can be a program name with args.
17947set dummy $ac_prog; ac_word=$2
17948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17949$as_echo_n "checking for $ac_word... " >&6; }
17950if ${ac_cv_path_HG+:} false; then :
17951  $as_echo_n "(cached) " >&6
17952else
17953  case $HG in
17954  [\\/]* | ?:[\\/]*)
17955  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17956  ;;
17957  *)
17958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17959for as_dir in $PATH
17960do
17961  IFS=$as_save_IFS
17962  test -z "$as_dir" && as_dir=.
17963    for ac_exec_ext in '' $ac_executable_extensions; do
17964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17965    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17967    break 2
17968  fi
17969done
17970  done
17971IFS=$as_save_IFS
17972
17973  ;;
17974esac
17975fi
17976HG=$ac_cv_path_HG
17977if test -n "$HG"; then
17978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17979$as_echo "$HG" >&6; }
17980else
17981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17982$as_echo "no" >&6; }
17983fi
17984
17985
17986  test -n "$HG" && break
17987done
17988
17989  else
17990    # The variable is set, but is it from the command line or the environment?
17991
17992    # Try to remove the string !HG! from our list.
17993    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
17994    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17995      # If it failed, the variable was not from the command line. Ignore it,
17996      # but warn the user (except for BASH, which is always set by the calling BASH).
17997      if test "xHG" != xBASH; then
17998        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
17999$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18000      fi
18001      # Try to locate tool using the code snippet
18002      for ac_prog in hg
18003do
18004  # Extract the first word of "$ac_prog", so it can be a program name with args.
18005set dummy $ac_prog; ac_word=$2
18006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18007$as_echo_n "checking for $ac_word... " >&6; }
18008if ${ac_cv_path_HG+:} false; then :
18009  $as_echo_n "(cached) " >&6
18010else
18011  case $HG in
18012  [\\/]* | ?:[\\/]*)
18013  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18014  ;;
18015  *)
18016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18017for as_dir in $PATH
18018do
18019  IFS=$as_save_IFS
18020  test -z "$as_dir" && as_dir=.
18021    for ac_exec_ext in '' $ac_executable_extensions; do
18022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18023    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18025    break 2
18026  fi
18027done
18028  done
18029IFS=$as_save_IFS
18030
18031  ;;
18032esac
18033fi
18034HG=$ac_cv_path_HG
18035if test -n "$HG"; then
18036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18037$as_echo "$HG" >&6; }
18038else
18039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18040$as_echo "no" >&6; }
18041fi
18042
18043
18044  test -n "$HG" && break
18045done
18046
18047    else
18048      # If it succeeded, then it was overridden by the user. We will use it
18049      # for the tool.
18050
18051      # First remove it from the list of overridden variables, so we can test
18052      # for unknown variables in the end.
18053      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18054
18055      # Check if the provided tool contains a complete path.
18056      tool_specified="$HG"
18057      tool_basename="${tool_specified##*/}"
18058      if test "x$tool_basename" = "x$tool_specified"; then
18059        # A command without a complete path is provided, search $PATH.
18060        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18061$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18062        # Extract the first word of "$tool_basename", so it can be a program name with args.
18063set dummy $tool_basename; ac_word=$2
18064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18065$as_echo_n "checking for $ac_word... " >&6; }
18066if ${ac_cv_path_HG+:} false; then :
18067  $as_echo_n "(cached) " >&6
18068else
18069  case $HG in
18070  [\\/]* | ?:[\\/]*)
18071  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18072  ;;
18073  *)
18074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18075for as_dir in $PATH
18076do
18077  IFS=$as_save_IFS
18078  test -z "$as_dir" && as_dir=.
18079    for ac_exec_ext in '' $ac_executable_extensions; do
18080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18081    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18083    break 2
18084  fi
18085done
18086  done
18087IFS=$as_save_IFS
18088
18089  ;;
18090esac
18091fi
18092HG=$ac_cv_path_HG
18093if test -n "$HG"; then
18094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18095$as_echo "$HG" >&6; }
18096else
18097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18098$as_echo "no" >&6; }
18099fi
18100
18101
18102        if test "x$HG" = x; then
18103          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18104        fi
18105      else
18106        # Otherwise we believe it is a complete path. Use it as it is.
18107        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18108$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18109        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18110$as_echo_n "checking for HG... " >&6; }
18111        if test ! -x "$tool_specified"; then
18112          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18113$as_echo "not found" >&6; }
18114          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18115        fi
18116        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18117$as_echo "$tool_specified" >&6; }
18118      fi
18119    fi
18120  fi
18121
18122
18123
18124
18125  # Publish this variable in the help.
18126
18127
18128  if test "x$STAT" = x; then
18129    # The variable is not set by user, try to locate tool using the code snippet
18130    for ac_prog in stat
18131do
18132  # Extract the first word of "$ac_prog", so it can be a program name with args.
18133set dummy $ac_prog; ac_word=$2
18134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18135$as_echo_n "checking for $ac_word... " >&6; }
18136if ${ac_cv_path_STAT+:} false; then :
18137  $as_echo_n "(cached) " >&6
18138else
18139  case $STAT in
18140  [\\/]* | ?:[\\/]*)
18141  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18142  ;;
18143  *)
18144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18145for as_dir in $PATH
18146do
18147  IFS=$as_save_IFS
18148  test -z "$as_dir" && as_dir=.
18149    for ac_exec_ext in '' $ac_executable_extensions; do
18150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18151    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18153    break 2
18154  fi
18155done
18156  done
18157IFS=$as_save_IFS
18158
18159  ;;
18160esac
18161fi
18162STAT=$ac_cv_path_STAT
18163if test -n "$STAT"; then
18164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18165$as_echo "$STAT" >&6; }
18166else
18167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18168$as_echo "no" >&6; }
18169fi
18170
18171
18172  test -n "$STAT" && break
18173done
18174
18175  else
18176    # The variable is set, but is it from the command line or the environment?
18177
18178    # Try to remove the string !STAT! from our list.
18179    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18180    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18181      # If it failed, the variable was not from the command line. Ignore it,
18182      # but warn the user (except for BASH, which is always set by the calling BASH).
18183      if test "xSTAT" != xBASH; then
18184        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18185$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18186      fi
18187      # Try to locate tool using the code snippet
18188      for ac_prog in stat
18189do
18190  # Extract the first word of "$ac_prog", so it can be a program name with args.
18191set dummy $ac_prog; ac_word=$2
18192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18193$as_echo_n "checking for $ac_word... " >&6; }
18194if ${ac_cv_path_STAT+:} false; then :
18195  $as_echo_n "(cached) " >&6
18196else
18197  case $STAT in
18198  [\\/]* | ?:[\\/]*)
18199  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18200  ;;
18201  *)
18202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18203for as_dir in $PATH
18204do
18205  IFS=$as_save_IFS
18206  test -z "$as_dir" && as_dir=.
18207    for ac_exec_ext in '' $ac_executable_extensions; do
18208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18209    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18211    break 2
18212  fi
18213done
18214  done
18215IFS=$as_save_IFS
18216
18217  ;;
18218esac
18219fi
18220STAT=$ac_cv_path_STAT
18221if test -n "$STAT"; then
18222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18223$as_echo "$STAT" >&6; }
18224else
18225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18226$as_echo "no" >&6; }
18227fi
18228
18229
18230  test -n "$STAT" && break
18231done
18232
18233    else
18234      # If it succeeded, then it was overridden by the user. We will use it
18235      # for the tool.
18236
18237      # First remove it from the list of overridden variables, so we can test
18238      # for unknown variables in the end.
18239      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18240
18241      # Check if the provided tool contains a complete path.
18242      tool_specified="$STAT"
18243      tool_basename="${tool_specified##*/}"
18244      if test "x$tool_basename" = "x$tool_specified"; then
18245        # A command without a complete path is provided, search $PATH.
18246        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18247$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18248        # Extract the first word of "$tool_basename", so it can be a program name with args.
18249set dummy $tool_basename; ac_word=$2
18250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18251$as_echo_n "checking for $ac_word... " >&6; }
18252if ${ac_cv_path_STAT+:} false; then :
18253  $as_echo_n "(cached) " >&6
18254else
18255  case $STAT in
18256  [\\/]* | ?:[\\/]*)
18257  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18258  ;;
18259  *)
18260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18261for as_dir in $PATH
18262do
18263  IFS=$as_save_IFS
18264  test -z "$as_dir" && as_dir=.
18265    for ac_exec_ext in '' $ac_executable_extensions; do
18266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18267    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18269    break 2
18270  fi
18271done
18272  done
18273IFS=$as_save_IFS
18274
18275  ;;
18276esac
18277fi
18278STAT=$ac_cv_path_STAT
18279if test -n "$STAT"; then
18280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18281$as_echo "$STAT" >&6; }
18282else
18283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18284$as_echo "no" >&6; }
18285fi
18286
18287
18288        if test "x$STAT" = x; then
18289          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18290        fi
18291      else
18292        # Otherwise we believe it is a complete path. Use it as it is.
18293        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18294$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18296$as_echo_n "checking for STAT... " >&6; }
18297        if test ! -x "$tool_specified"; then
18298          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18299$as_echo "not found" >&6; }
18300          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18301        fi
18302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18303$as_echo "$tool_specified" >&6; }
18304      fi
18305    fi
18306  fi
18307
18308
18309
18310
18311  # Publish this variable in the help.
18312
18313
18314  if test "x$TIME" = x; then
18315    # The variable is not set by user, try to locate tool using the code snippet
18316    for ac_prog in time
18317do
18318  # Extract the first word of "$ac_prog", so it can be a program name with args.
18319set dummy $ac_prog; ac_word=$2
18320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18321$as_echo_n "checking for $ac_word... " >&6; }
18322if ${ac_cv_path_TIME+:} false; then :
18323  $as_echo_n "(cached) " >&6
18324else
18325  case $TIME in
18326  [\\/]* | ?:[\\/]*)
18327  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18328  ;;
18329  *)
18330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18331for as_dir in $PATH
18332do
18333  IFS=$as_save_IFS
18334  test -z "$as_dir" && as_dir=.
18335    for ac_exec_ext in '' $ac_executable_extensions; do
18336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18337    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18339    break 2
18340  fi
18341done
18342  done
18343IFS=$as_save_IFS
18344
18345  ;;
18346esac
18347fi
18348TIME=$ac_cv_path_TIME
18349if test -n "$TIME"; then
18350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18351$as_echo "$TIME" >&6; }
18352else
18353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18354$as_echo "no" >&6; }
18355fi
18356
18357
18358  test -n "$TIME" && break
18359done
18360
18361  else
18362    # The variable is set, but is it from the command line or the environment?
18363
18364    # Try to remove the string !TIME! from our list.
18365    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18366    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18367      # If it failed, the variable was not from the command line. Ignore it,
18368      # but warn the user (except for BASH, which is always set by the calling BASH).
18369      if test "xTIME" != xBASH; then
18370        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18371$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18372      fi
18373      # Try to locate tool using the code snippet
18374      for ac_prog in time
18375do
18376  # Extract the first word of "$ac_prog", so it can be a program name with args.
18377set dummy $ac_prog; ac_word=$2
18378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18379$as_echo_n "checking for $ac_word... " >&6; }
18380if ${ac_cv_path_TIME+:} false; then :
18381  $as_echo_n "(cached) " >&6
18382else
18383  case $TIME in
18384  [\\/]* | ?:[\\/]*)
18385  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18386  ;;
18387  *)
18388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18389for as_dir in $PATH
18390do
18391  IFS=$as_save_IFS
18392  test -z "$as_dir" && as_dir=.
18393    for ac_exec_ext in '' $ac_executable_extensions; do
18394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18395    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18397    break 2
18398  fi
18399done
18400  done
18401IFS=$as_save_IFS
18402
18403  ;;
18404esac
18405fi
18406TIME=$ac_cv_path_TIME
18407if test -n "$TIME"; then
18408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18409$as_echo "$TIME" >&6; }
18410else
18411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18412$as_echo "no" >&6; }
18413fi
18414
18415
18416  test -n "$TIME" && break
18417done
18418
18419    else
18420      # If it succeeded, then it was overridden by the user. We will use it
18421      # for the tool.
18422
18423      # First remove it from the list of overridden variables, so we can test
18424      # for unknown variables in the end.
18425      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18426
18427      # Check if the provided tool contains a complete path.
18428      tool_specified="$TIME"
18429      tool_basename="${tool_specified##*/}"
18430      if test "x$tool_basename" = "x$tool_specified"; then
18431        # A command without a complete path is provided, search $PATH.
18432        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18433$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18434        # Extract the first word of "$tool_basename", so it can be a program name with args.
18435set dummy $tool_basename; ac_word=$2
18436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18437$as_echo_n "checking for $ac_word... " >&6; }
18438if ${ac_cv_path_TIME+:} false; then :
18439  $as_echo_n "(cached) " >&6
18440else
18441  case $TIME in
18442  [\\/]* | ?:[\\/]*)
18443  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18444  ;;
18445  *)
18446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18447for as_dir in $PATH
18448do
18449  IFS=$as_save_IFS
18450  test -z "$as_dir" && as_dir=.
18451    for ac_exec_ext in '' $ac_executable_extensions; do
18452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18453    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18455    break 2
18456  fi
18457done
18458  done
18459IFS=$as_save_IFS
18460
18461  ;;
18462esac
18463fi
18464TIME=$ac_cv_path_TIME
18465if test -n "$TIME"; then
18466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18467$as_echo "$TIME" >&6; }
18468else
18469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18470$as_echo "no" >&6; }
18471fi
18472
18473
18474        if test "x$TIME" = x; then
18475          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18476        fi
18477      else
18478        # Otherwise we believe it is a complete path. Use it as it is.
18479        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18480$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18481        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18482$as_echo_n "checking for TIME... " >&6; }
18483        if test ! -x "$tool_specified"; then
18484          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18485$as_echo "not found" >&6; }
18486          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18487        fi
18488        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18489$as_echo "$tool_specified" >&6; }
18490      fi
18491    fi
18492  fi
18493
18494
18495  # Check if it's GNU time
18496  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18497  if test "x$IS_GNU_TIME" != x; then
18498    IS_GNU_TIME=yes
18499  else
18500    IS_GNU_TIME=no
18501  fi
18502
18503
18504  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18505
18506
18507
18508  # Publish this variable in the help.
18509
18510
18511  if test "x$COMM" = x; then
18512    # The variable is not set by user, try to locate tool using the code snippet
18513    for ac_prog in comm
18514do
18515  # Extract the first word of "$ac_prog", so it can be a program name with args.
18516set dummy $ac_prog; ac_word=$2
18517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18518$as_echo_n "checking for $ac_word... " >&6; }
18519if ${ac_cv_path_COMM+:} false; then :
18520  $as_echo_n "(cached) " >&6
18521else
18522  case $COMM in
18523  [\\/]* | ?:[\\/]*)
18524  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18525  ;;
18526  *)
18527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18528for as_dir in $PATH
18529do
18530  IFS=$as_save_IFS
18531  test -z "$as_dir" && as_dir=.
18532    for ac_exec_ext in '' $ac_executable_extensions; do
18533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18534    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18536    break 2
18537  fi
18538done
18539  done
18540IFS=$as_save_IFS
18541
18542  ;;
18543esac
18544fi
18545COMM=$ac_cv_path_COMM
18546if test -n "$COMM"; then
18547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18548$as_echo "$COMM" >&6; }
18549else
18550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18551$as_echo "no" >&6; }
18552fi
18553
18554
18555  test -n "$COMM" && break
18556done
18557
18558  else
18559    # The variable is set, but is it from the command line or the environment?
18560
18561    # Try to remove the string !COMM! from our list.
18562    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18563    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18564      # If it failed, the variable was not from the command line. Ignore it,
18565      # but warn the user (except for BASH, which is always set by the calling BASH).
18566      if test "xCOMM" != xBASH; then
18567        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18568$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18569      fi
18570      # Try to locate tool using the code snippet
18571      for ac_prog in comm
18572do
18573  # Extract the first word of "$ac_prog", so it can be a program name with args.
18574set dummy $ac_prog; ac_word=$2
18575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18576$as_echo_n "checking for $ac_word... " >&6; }
18577if ${ac_cv_path_COMM+:} false; then :
18578  $as_echo_n "(cached) " >&6
18579else
18580  case $COMM in
18581  [\\/]* | ?:[\\/]*)
18582  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18583  ;;
18584  *)
18585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18586for as_dir in $PATH
18587do
18588  IFS=$as_save_IFS
18589  test -z "$as_dir" && as_dir=.
18590    for ac_exec_ext in '' $ac_executable_extensions; do
18591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18592    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18594    break 2
18595  fi
18596done
18597  done
18598IFS=$as_save_IFS
18599
18600  ;;
18601esac
18602fi
18603COMM=$ac_cv_path_COMM
18604if test -n "$COMM"; then
18605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18606$as_echo "$COMM" >&6; }
18607else
18608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18609$as_echo "no" >&6; }
18610fi
18611
18612
18613  test -n "$COMM" && break
18614done
18615
18616    else
18617      # If it succeeded, then it was overridden by the user. We will use it
18618      # for the tool.
18619
18620      # First remove it from the list of overridden variables, so we can test
18621      # for unknown variables in the end.
18622      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18623
18624      # Check if the provided tool contains a complete path.
18625      tool_specified="$COMM"
18626      tool_basename="${tool_specified##*/}"
18627      if test "x$tool_basename" = "x$tool_specified"; then
18628        # A command without a complete path is provided, search $PATH.
18629        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18630$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18631        # Extract the first word of "$tool_basename", so it can be a program name with args.
18632set dummy $tool_basename; ac_word=$2
18633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18634$as_echo_n "checking for $ac_word... " >&6; }
18635if ${ac_cv_path_COMM+:} false; then :
18636  $as_echo_n "(cached) " >&6
18637else
18638  case $COMM in
18639  [\\/]* | ?:[\\/]*)
18640  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18641  ;;
18642  *)
18643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18644for as_dir in $PATH
18645do
18646  IFS=$as_save_IFS
18647  test -z "$as_dir" && as_dir=.
18648    for ac_exec_ext in '' $ac_executable_extensions; do
18649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18650    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18652    break 2
18653  fi
18654done
18655  done
18656IFS=$as_save_IFS
18657
18658  ;;
18659esac
18660fi
18661COMM=$ac_cv_path_COMM
18662if test -n "$COMM"; then
18663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18664$as_echo "$COMM" >&6; }
18665else
18666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18667$as_echo "no" >&6; }
18668fi
18669
18670
18671        if test "x$COMM" = x; then
18672          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18673        fi
18674      else
18675        # Otherwise we believe it is a complete path. Use it as it is.
18676        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18677$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18678        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18679$as_echo_n "checking for COMM... " >&6; }
18680        if test ! -x "$tool_specified"; then
18681          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18682$as_echo "not found" >&6; }
18683          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18684        fi
18685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18686$as_echo "$tool_specified" >&6; }
18687      fi
18688    fi
18689  fi
18690
18691
18692
18693  if test "x$COMM" = x; then
18694    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18695  fi
18696
18697
18698  fi
18699
18700  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18701
18702
18703
18704  # Publish this variable in the help.
18705
18706
18707  if test "x$DSYMUTIL" = x; then
18708    # The variable is not set by user, try to locate tool using the code snippet
18709    for ac_prog in dsymutil
18710do
18711  # Extract the first word of "$ac_prog", so it can be a program name with args.
18712set dummy $ac_prog; ac_word=$2
18713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18714$as_echo_n "checking for $ac_word... " >&6; }
18715if ${ac_cv_path_DSYMUTIL+:} false; then :
18716  $as_echo_n "(cached) " >&6
18717else
18718  case $DSYMUTIL in
18719  [\\/]* | ?:[\\/]*)
18720  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18721  ;;
18722  *)
18723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18724for as_dir in $PATH
18725do
18726  IFS=$as_save_IFS
18727  test -z "$as_dir" && as_dir=.
18728    for ac_exec_ext in '' $ac_executable_extensions; do
18729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18730    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18732    break 2
18733  fi
18734done
18735  done
18736IFS=$as_save_IFS
18737
18738  ;;
18739esac
18740fi
18741DSYMUTIL=$ac_cv_path_DSYMUTIL
18742if test -n "$DSYMUTIL"; then
18743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18744$as_echo "$DSYMUTIL" >&6; }
18745else
18746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18747$as_echo "no" >&6; }
18748fi
18749
18750
18751  test -n "$DSYMUTIL" && break
18752done
18753
18754  else
18755    # The variable is set, but is it from the command line or the environment?
18756
18757    # Try to remove the string !DSYMUTIL! from our list.
18758    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18759    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18760      # If it failed, the variable was not from the command line. Ignore it,
18761      # but warn the user (except for BASH, which is always set by the calling BASH).
18762      if test "xDSYMUTIL" != xBASH; then
18763        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18764$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18765      fi
18766      # Try to locate tool using the code snippet
18767      for ac_prog in dsymutil
18768do
18769  # Extract the first word of "$ac_prog", so it can be a program name with args.
18770set dummy $ac_prog; ac_word=$2
18771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18772$as_echo_n "checking for $ac_word... " >&6; }
18773if ${ac_cv_path_DSYMUTIL+:} false; then :
18774  $as_echo_n "(cached) " >&6
18775else
18776  case $DSYMUTIL in
18777  [\\/]* | ?:[\\/]*)
18778  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18779  ;;
18780  *)
18781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18782for as_dir in $PATH
18783do
18784  IFS=$as_save_IFS
18785  test -z "$as_dir" && as_dir=.
18786    for ac_exec_ext in '' $ac_executable_extensions; do
18787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18788    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18790    break 2
18791  fi
18792done
18793  done
18794IFS=$as_save_IFS
18795
18796  ;;
18797esac
18798fi
18799DSYMUTIL=$ac_cv_path_DSYMUTIL
18800if test -n "$DSYMUTIL"; then
18801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18802$as_echo "$DSYMUTIL" >&6; }
18803else
18804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18805$as_echo "no" >&6; }
18806fi
18807
18808
18809  test -n "$DSYMUTIL" && break
18810done
18811
18812    else
18813      # If it succeeded, then it was overridden by the user. We will use it
18814      # for the tool.
18815
18816      # First remove it from the list of overridden variables, so we can test
18817      # for unknown variables in the end.
18818      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18819
18820      # Check if the provided tool contains a complete path.
18821      tool_specified="$DSYMUTIL"
18822      tool_basename="${tool_specified##*/}"
18823      if test "x$tool_basename" = "x$tool_specified"; then
18824        # A command without a complete path is provided, search $PATH.
18825        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18826$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18827        # Extract the first word of "$tool_basename", so it can be a program name with args.
18828set dummy $tool_basename; ac_word=$2
18829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18830$as_echo_n "checking for $ac_word... " >&6; }
18831if ${ac_cv_path_DSYMUTIL+:} false; then :
18832  $as_echo_n "(cached) " >&6
18833else
18834  case $DSYMUTIL in
18835  [\\/]* | ?:[\\/]*)
18836  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18837  ;;
18838  *)
18839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18840for as_dir in $PATH
18841do
18842  IFS=$as_save_IFS
18843  test -z "$as_dir" && as_dir=.
18844    for ac_exec_ext in '' $ac_executable_extensions; do
18845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18846    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18848    break 2
18849  fi
18850done
18851  done
18852IFS=$as_save_IFS
18853
18854  ;;
18855esac
18856fi
18857DSYMUTIL=$ac_cv_path_DSYMUTIL
18858if test -n "$DSYMUTIL"; then
18859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18860$as_echo "$DSYMUTIL" >&6; }
18861else
18862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18863$as_echo "no" >&6; }
18864fi
18865
18866
18867        if test "x$DSYMUTIL" = x; then
18868          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18869        fi
18870      else
18871        # Otherwise we believe it is a complete path. Use it as it is.
18872        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18873$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18874        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18875$as_echo_n "checking for DSYMUTIL... " >&6; }
18876        if test ! -x "$tool_specified"; then
18877          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18878$as_echo "not found" >&6; }
18879          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18880        fi
18881        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18882$as_echo "$tool_specified" >&6; }
18883      fi
18884    fi
18885  fi
18886
18887
18888
18889  if test "x$DSYMUTIL" = x; then
18890    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
18891  fi
18892
18893
18894
18895
18896
18897  # Publish this variable in the help.
18898
18899
18900  if test "x$XATTR" = x; then
18901    # The variable is not set by user, try to locate tool using the code snippet
18902    for ac_prog in xattr
18903do
18904  # Extract the first word of "$ac_prog", so it can be a program name with args.
18905set dummy $ac_prog; ac_word=$2
18906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18907$as_echo_n "checking for $ac_word... " >&6; }
18908if ${ac_cv_path_XATTR+:} false; then :
18909  $as_echo_n "(cached) " >&6
18910else
18911  case $XATTR in
18912  [\\/]* | ?:[\\/]*)
18913  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18914  ;;
18915  *)
18916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18917for as_dir in $PATH
18918do
18919  IFS=$as_save_IFS
18920  test -z "$as_dir" && as_dir=.
18921    for ac_exec_ext in '' $ac_executable_extensions; do
18922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18923    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18925    break 2
18926  fi
18927done
18928  done
18929IFS=$as_save_IFS
18930
18931  ;;
18932esac
18933fi
18934XATTR=$ac_cv_path_XATTR
18935if test -n "$XATTR"; then
18936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18937$as_echo "$XATTR" >&6; }
18938else
18939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18940$as_echo "no" >&6; }
18941fi
18942
18943
18944  test -n "$XATTR" && break
18945done
18946
18947  else
18948    # The variable is set, but is it from the command line or the environment?
18949
18950    # Try to remove the string !XATTR! from our list.
18951    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
18952    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18953      # If it failed, the variable was not from the command line. Ignore it,
18954      # but warn the user (except for BASH, which is always set by the calling BASH).
18955      if test "xXATTR" != xBASH; then
18956        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
18957$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
18958      fi
18959      # Try to locate tool using the code snippet
18960      for ac_prog in xattr
18961do
18962  # Extract the first word of "$ac_prog", so it can be a program name with args.
18963set dummy $ac_prog; ac_word=$2
18964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18965$as_echo_n "checking for $ac_word... " >&6; }
18966if ${ac_cv_path_XATTR+:} false; then :
18967  $as_echo_n "(cached) " >&6
18968else
18969  case $XATTR in
18970  [\\/]* | ?:[\\/]*)
18971  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18972  ;;
18973  *)
18974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18975for as_dir in $PATH
18976do
18977  IFS=$as_save_IFS
18978  test -z "$as_dir" && as_dir=.
18979    for ac_exec_ext in '' $ac_executable_extensions; do
18980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18981    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18983    break 2
18984  fi
18985done
18986  done
18987IFS=$as_save_IFS
18988
18989  ;;
18990esac
18991fi
18992XATTR=$ac_cv_path_XATTR
18993if test -n "$XATTR"; then
18994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18995$as_echo "$XATTR" >&6; }
18996else
18997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18998$as_echo "no" >&6; }
18999fi
19000
19001
19002  test -n "$XATTR" && break
19003done
19004
19005    else
19006      # If it succeeded, then it was overridden by the user. We will use it
19007      # for the tool.
19008
19009      # First remove it from the list of overridden variables, so we can test
19010      # for unknown variables in the end.
19011      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19012
19013      # Check if the provided tool contains a complete path.
19014      tool_specified="$XATTR"
19015      tool_basename="${tool_specified##*/}"
19016      if test "x$tool_basename" = "x$tool_specified"; then
19017        # A command without a complete path is provided, search $PATH.
19018        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19019$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19020        # Extract the first word of "$tool_basename", so it can be a program name with args.
19021set dummy $tool_basename; ac_word=$2
19022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19023$as_echo_n "checking for $ac_word... " >&6; }
19024if ${ac_cv_path_XATTR+:} false; then :
19025  $as_echo_n "(cached) " >&6
19026else
19027  case $XATTR in
19028  [\\/]* | ?:[\\/]*)
19029  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19030  ;;
19031  *)
19032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19033for as_dir in $PATH
19034do
19035  IFS=$as_save_IFS
19036  test -z "$as_dir" && as_dir=.
19037    for ac_exec_ext in '' $ac_executable_extensions; do
19038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19039    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19041    break 2
19042  fi
19043done
19044  done
19045IFS=$as_save_IFS
19046
19047  ;;
19048esac
19049fi
19050XATTR=$ac_cv_path_XATTR
19051if test -n "$XATTR"; then
19052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19053$as_echo "$XATTR" >&6; }
19054else
19055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19056$as_echo "no" >&6; }
19057fi
19058
19059
19060        if test "x$XATTR" = x; then
19061          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19062        fi
19063      else
19064        # Otherwise we believe it is a complete path. Use it as it is.
19065        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19066$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19067        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19068$as_echo_n "checking for XATTR... " >&6; }
19069        if test ! -x "$tool_specified"; then
19070          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19071$as_echo "not found" >&6; }
19072          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19073        fi
19074        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19075$as_echo "$tool_specified" >&6; }
19076      fi
19077    fi
19078  fi
19079
19080
19081
19082  if test "x$XATTR" = x; then
19083    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19084  fi
19085
19086
19087
19088
19089  # Publish this variable in the help.
19090
19091
19092  if test "x$CODESIGN" = x; then
19093    # The variable is not set by user, try to locate tool using the code snippet
19094    for ac_prog in codesign
19095do
19096  # Extract the first word of "$ac_prog", so it can be a program name with args.
19097set dummy $ac_prog; ac_word=$2
19098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19099$as_echo_n "checking for $ac_word... " >&6; }
19100if ${ac_cv_path_CODESIGN+:} false; then :
19101  $as_echo_n "(cached) " >&6
19102else
19103  case $CODESIGN in
19104  [\\/]* | ?:[\\/]*)
19105  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19106  ;;
19107  *)
19108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19109for as_dir in $PATH
19110do
19111  IFS=$as_save_IFS
19112  test -z "$as_dir" && as_dir=.
19113    for ac_exec_ext in '' $ac_executable_extensions; do
19114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19115    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19117    break 2
19118  fi
19119done
19120  done
19121IFS=$as_save_IFS
19122
19123  ;;
19124esac
19125fi
19126CODESIGN=$ac_cv_path_CODESIGN
19127if test -n "$CODESIGN"; then
19128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19129$as_echo "$CODESIGN" >&6; }
19130else
19131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19132$as_echo "no" >&6; }
19133fi
19134
19135
19136  test -n "$CODESIGN" && break
19137done
19138
19139  else
19140    # The variable is set, but is it from the command line or the environment?
19141
19142    # Try to remove the string !CODESIGN! from our list.
19143    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19144    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19145      # If it failed, the variable was not from the command line. Ignore it,
19146      # but warn the user (except for BASH, which is always set by the calling BASH).
19147      if test "xCODESIGN" != xBASH; then
19148        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19149$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19150      fi
19151      # Try to locate tool using the code snippet
19152      for ac_prog in codesign
19153do
19154  # Extract the first word of "$ac_prog", so it can be a program name with args.
19155set dummy $ac_prog; ac_word=$2
19156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19157$as_echo_n "checking for $ac_word... " >&6; }
19158if ${ac_cv_path_CODESIGN+:} false; then :
19159  $as_echo_n "(cached) " >&6
19160else
19161  case $CODESIGN in
19162  [\\/]* | ?:[\\/]*)
19163  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19164  ;;
19165  *)
19166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19167for as_dir in $PATH
19168do
19169  IFS=$as_save_IFS
19170  test -z "$as_dir" && as_dir=.
19171    for ac_exec_ext in '' $ac_executable_extensions; do
19172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19173    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19175    break 2
19176  fi
19177done
19178  done
19179IFS=$as_save_IFS
19180
19181  ;;
19182esac
19183fi
19184CODESIGN=$ac_cv_path_CODESIGN
19185if test -n "$CODESIGN"; then
19186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19187$as_echo "$CODESIGN" >&6; }
19188else
19189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19190$as_echo "no" >&6; }
19191fi
19192
19193
19194  test -n "$CODESIGN" && break
19195done
19196
19197    else
19198      # If it succeeded, then it was overridden by the user. We will use it
19199      # for the tool.
19200
19201      # First remove it from the list of overridden variables, so we can test
19202      # for unknown variables in the end.
19203      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19204
19205      # Check if the provided tool contains a complete path.
19206      tool_specified="$CODESIGN"
19207      tool_basename="${tool_specified##*/}"
19208      if test "x$tool_basename" = "x$tool_specified"; then
19209        # A command without a complete path is provided, search $PATH.
19210        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19211$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19212        # Extract the first word of "$tool_basename", so it can be a program name with args.
19213set dummy $tool_basename; ac_word=$2
19214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19215$as_echo_n "checking for $ac_word... " >&6; }
19216if ${ac_cv_path_CODESIGN+:} false; then :
19217  $as_echo_n "(cached) " >&6
19218else
19219  case $CODESIGN in
19220  [\\/]* | ?:[\\/]*)
19221  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19222  ;;
19223  *)
19224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19225for as_dir in $PATH
19226do
19227  IFS=$as_save_IFS
19228  test -z "$as_dir" && as_dir=.
19229    for ac_exec_ext in '' $ac_executable_extensions; do
19230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19231    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19233    break 2
19234  fi
19235done
19236  done
19237IFS=$as_save_IFS
19238
19239  ;;
19240esac
19241fi
19242CODESIGN=$ac_cv_path_CODESIGN
19243if test -n "$CODESIGN"; then
19244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19245$as_echo "$CODESIGN" >&6; }
19246else
19247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19248$as_echo "no" >&6; }
19249fi
19250
19251
19252        if test "x$CODESIGN" = x; then
19253          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19254        fi
19255      else
19256        # Otherwise we believe it is a complete path. Use it as it is.
19257        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19258$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19259        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19260$as_echo_n "checking for CODESIGN... " >&6; }
19261        if test ! -x "$tool_specified"; then
19262          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19263$as_echo "not found" >&6; }
19264          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19265        fi
19266        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19267$as_echo "$tool_specified" >&6; }
19268      fi
19269    fi
19270  fi
19271
19272
19273    if test "x$CODESIGN" != "x"; then
19274      # Verify that the openjdk_codesign certificate is present
19275      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19276$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19277      rm -f codesign-testfile
19278      touch codesign-testfile
19279      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19280      rm -f codesign-testfile
19281      if test "x$CODESIGN" = x; then
19282        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19283$as_echo "no" >&6; }
19284      else
19285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19286$as_echo "yes" >&6; }
19287      fi
19288    fi
19289  fi
19290
19291
19292# Check if pkg-config is available.
19293
19294
19295if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19296	if test -n "$ac_tool_prefix"; then
19297  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19298set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19300$as_echo_n "checking for $ac_word... " >&6; }
19301if ${ac_cv_path_PKG_CONFIG+:} false; then :
19302  $as_echo_n "(cached) " >&6
19303else
19304  case $PKG_CONFIG in
19305  [\\/]* | ?:[\\/]*)
19306  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19307  ;;
19308  *)
19309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19310for as_dir in $PATH
19311do
19312  IFS=$as_save_IFS
19313  test -z "$as_dir" && as_dir=.
19314    for ac_exec_ext in '' $ac_executable_extensions; do
19315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19316    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19318    break 2
19319  fi
19320done
19321  done
19322IFS=$as_save_IFS
19323
19324  ;;
19325esac
19326fi
19327PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19328if test -n "$PKG_CONFIG"; then
19329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19330$as_echo "$PKG_CONFIG" >&6; }
19331else
19332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19333$as_echo "no" >&6; }
19334fi
19335
19336
19337fi
19338if test -z "$ac_cv_path_PKG_CONFIG"; then
19339  ac_pt_PKG_CONFIG=$PKG_CONFIG
19340  # Extract the first word of "pkg-config", so it can be a program name with args.
19341set dummy pkg-config; ac_word=$2
19342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19343$as_echo_n "checking for $ac_word... " >&6; }
19344if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19345  $as_echo_n "(cached) " >&6
19346else
19347  case $ac_pt_PKG_CONFIG in
19348  [\\/]* | ?:[\\/]*)
19349  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19350  ;;
19351  *)
19352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19353for as_dir in $PATH
19354do
19355  IFS=$as_save_IFS
19356  test -z "$as_dir" && as_dir=.
19357    for ac_exec_ext in '' $ac_executable_extensions; do
19358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19359    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19361    break 2
19362  fi
19363done
19364  done
19365IFS=$as_save_IFS
19366
19367  ;;
19368esac
19369fi
19370ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19371if test -n "$ac_pt_PKG_CONFIG"; then
19372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19373$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19374else
19375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19376$as_echo "no" >&6; }
19377fi
19378
19379  if test "x$ac_pt_PKG_CONFIG" = x; then
19380    PKG_CONFIG=""
19381  else
19382    case $cross_compiling:$ac_tool_warned in
19383yes:)
19384{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19385$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19386ac_tool_warned=yes ;;
19387esac
19388    PKG_CONFIG=$ac_pt_PKG_CONFIG
19389  fi
19390else
19391  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19392fi
19393
19394fi
19395if test -n "$PKG_CONFIG"; then
19396	_pkg_min_version=0.9.0
19397	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19398$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19399	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19400		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19401$as_echo "yes" >&6; }
19402	else
19403		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19404$as_echo "no" >&6; }
19405		PKG_CONFIG=""
19406	fi
19407
19408fi
19409
19410# After basic tools have been setup, we can check build os specific details.
19411
19412  ###############################################################################
19413
19414  # Note that this is the build platform OS version!
19415
19416  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19417  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19418  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19419  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19420
19421
19422
19423
19424
19425# Setup builddeps, for automatic downloading of tools we need.
19426# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19427# boot-jdk setup, but we need to have basic tools setup first.
19428
19429
19430# Check whether --with-builddeps-conf was given.
19431if test "${with_builddeps_conf+set}" = set; then :
19432  withval=$with_builddeps_conf;
19433fi
19434
19435
19436
19437# Check whether --with-builddeps-server was given.
19438if test "${with_builddeps_server+set}" = set; then :
19439  withval=$with_builddeps_server;
19440fi
19441
19442
19443
19444# Check whether --with-builddeps-dir was given.
19445if test "${with_builddeps_dir+set}" = set; then :
19446  withval=$with_builddeps_dir;
19447else
19448  with_builddeps_dir=/localhome/builddeps
19449fi
19450
19451
19452
19453# Check whether --with-builddeps-group was given.
19454if test "${with_builddeps_group+set}" = set; then :
19455  withval=$with_builddeps_group;
19456fi
19457
19458
19459
19460
19461  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19462    if test "x$with_builddeps_conf" != x; then
19463      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19464$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19465      builddepsfile=$with_builddeps_conf
19466      if test -s $builddepsfile; then
19467        . $builddepsfile
19468        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19469$as_echo "loaded!" >&6; }
19470      else
19471        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19472      fi
19473    else
19474      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19475$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19476      builddepsfile=`mktemp`
19477      touch $builddepsfile
19478      # Put all found confs into a single file.
19479      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19480      # Source the file to acquire the variables
19481      if test -s $builddepsfile; then
19482        . $builddepsfile
19483        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19484$as_echo "found at least one!" >&6; }
19485      else
19486        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19487      fi
19488    fi
19489    # Create build and target names that use _ instead of "-" and ".".
19490    # This is necessary to use them in variable names.
19491    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19492    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19493    # Extract rewrite information for build and target
19494    eval rewritten_build=\${REWRITE_${build_var}}
19495    if test "x$rewritten_build" = x; then
19496      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19497      echo Build stays the same $rewritten_build
19498    else
19499      echo Rewriting build for builddeps into $rewritten_build
19500    fi
19501    eval rewritten_target=\${REWRITE_${target_var}}
19502    if test "x$rewritten_target" = x; then
19503      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19504      echo Target stays the same $rewritten_target
19505    else
19506      echo Rewriting target for builddeps into $rewritten_target
19507    fi
19508    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19509    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19510  fi
19511  for ac_prog in 7z unzip
19512do
19513  # Extract the first word of "$ac_prog", so it can be a program name with args.
19514set dummy $ac_prog; ac_word=$2
19515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19516$as_echo_n "checking for $ac_word... " >&6; }
19517if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19518  $as_echo_n "(cached) " >&6
19519else
19520  if test -n "$BDEPS_UNZIP"; then
19521  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19522else
19523as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19524for as_dir in $PATH
19525do
19526  IFS=$as_save_IFS
19527  test -z "$as_dir" && as_dir=.
19528    for ac_exec_ext in '' $ac_executable_extensions; do
19529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19530    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19532    break 2
19533  fi
19534done
19535  done
19536IFS=$as_save_IFS
19537
19538fi
19539fi
19540BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19541if test -n "$BDEPS_UNZIP"; then
19542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19543$as_echo "$BDEPS_UNZIP" >&6; }
19544else
19545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19546$as_echo "no" >&6; }
19547fi
19548
19549
19550  test -n "$BDEPS_UNZIP" && break
19551done
19552
19553  if test "x$BDEPS_UNZIP" = x7z; then
19554    BDEPS_UNZIP="7z x"
19555  fi
19556
19557  for ac_prog in wget lftp ftp
19558do
19559  # Extract the first word of "$ac_prog", so it can be a program name with args.
19560set dummy $ac_prog; ac_word=$2
19561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19562$as_echo_n "checking for $ac_word... " >&6; }
19563if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19564  $as_echo_n "(cached) " >&6
19565else
19566  if test -n "$BDEPS_FTP"; then
19567  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19568else
19569as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19570for as_dir in $PATH
19571do
19572  IFS=$as_save_IFS
19573  test -z "$as_dir" && as_dir=.
19574    for ac_exec_ext in '' $ac_executable_extensions; do
19575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19576    ac_cv_prog_BDEPS_FTP="$ac_prog"
19577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19578    break 2
19579  fi
19580done
19581  done
19582IFS=$as_save_IFS
19583
19584fi
19585fi
19586BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19587if test -n "$BDEPS_FTP"; then
19588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19589$as_echo "$BDEPS_FTP" >&6; }
19590else
19591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19592$as_echo "no" >&6; }
19593fi
19594
19595
19596  test -n "$BDEPS_FTP" && break
19597done
19598
19599
19600
19601###############################################################################
19602#
19603# Determine OpenJDK variants, options and version numbers.
19604#
19605###############################################################################
19606
19607# We need build & target for this.
19608
19609
19610  ###############################################################################
19611  #
19612  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19613  # We always build headless support.
19614  #
19615  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19616$as_echo_n "checking headful support... " >&6; }
19617  # Check whether --enable-headful was given.
19618if test "${enable_headful+set}" = set; then :
19619  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19620else
19621  SUPPORT_HEADFUL=yes
19622fi
19623
19624
19625  SUPPORT_HEADLESS=yes
19626  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19627
19628  if test "x$SUPPORT_HEADFUL" = xyes; then
19629    # We are building both headful and headless.
19630    headful_msg="include support for both headful and headless"
19631  fi
19632
19633  if test "x$SUPPORT_HEADFUL" = xno; then
19634    # Thus we are building headless only.
19635    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19636    headful_msg="headless only"
19637  fi
19638
19639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19640$as_echo "$headful_msg" >&6; }
19641
19642
19643
19644
19645
19646  # Control wether Hotspot runs Queens test after build.
19647  # Check whether --enable-hotspot-test-in-build was given.
19648if test "${enable_hotspot_test_in_build+set}" = set; then :
19649  enableval=$enable_hotspot_test_in_build;
19650else
19651  enable_hotspot_test_in_build=no
19652fi
19653
19654  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19655    TEST_IN_BUILD=true
19656  else
19657    TEST_IN_BUILD=false
19658  fi
19659
19660
19661  ###############################################################################
19662  #
19663  # Choose cacerts source file
19664  #
19665
19666# Check whether --with-cacerts-file was given.
19667if test "${with_cacerts_file+set}" = set; then :
19668  withval=$with_cacerts_file;
19669fi
19670
19671  if test "x$with_cacerts_file" != x; then
19672    CACERTS_FILE=$with_cacerts_file
19673  else
19674    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19675  fi
19676
19677
19678  ###############################################################################
19679  #
19680  # Enable or disable unlimited crypto
19681  #
19682  # Check whether --enable-unlimited-crypto was given.
19683if test "${enable_unlimited_crypto+set}" = set; then :
19684  enableval=$enable_unlimited_crypto;
19685else
19686  enable_unlimited_crypto=no
19687fi
19688
19689  if test "x$enable_unlimited_crypto" = "xyes"; then
19690    UNLIMITED_CRYPTO=true
19691  else
19692    UNLIMITED_CRYPTO=false
19693  fi
19694
19695
19696  ###############################################################################
19697  #
19698  # Enable or disable the elliptic curve crypto implementation
19699  #
19700
19701
19702  ###############################################################################
19703  #
19704  # --enable-rmiconnector-iiop
19705  #
19706  # Check whether --enable-rmiconnector-iiop was given.
19707if test "${enable_rmiconnector_iiop+set}" = set; then :
19708  enableval=$enable_rmiconnector_iiop;
19709fi
19710
19711  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19712    RMICONNECTOR_IIOP=true
19713  else
19714    RMICONNECTOR_IIOP=false
19715  fi
19716
19717
19718  ###############################################################################
19719  #
19720  # Compress jars
19721  #
19722  COMPRESS_JARS=false
19723
19724
19725
19726
19727  # Source the version numbers
19728  . $AUTOCONF_DIR/version-numbers
19729
19730  # Get the settings from parameters
19731
19732# Check whether --with-milestone was given.
19733if test "${with_milestone+set}" = set; then :
19734  withval=$with_milestone;
19735fi
19736
19737  if test "x$with_milestone" = xyes; then
19738    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19739  elif test "x$with_milestone" != x; then
19740    MILESTONE="$with_milestone"
19741  fi
19742  if test "x$MILESTONE" = x; then
19743    MILESTONE=internal
19744  fi
19745
19746
19747# Check whether --with-update-version was given.
19748if test "${with_update_version+set}" = set; then :
19749  withval=$with_update_version;
19750fi
19751
19752  if test "x$with_update_version" = xyes; then
19753    as_fn_error $? "Update version must have a value" "$LINENO" 5
19754  elif test "x$with_update_version" != x; then
19755    JDK_UPDATE_VERSION="$with_update_version"
19756    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19757    # to a bug in expr (which reduces it to just X). To work around this, we
19758    # always add a 0 to one digit update versions.
19759    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19760      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19761    fi
19762  fi
19763
19764
19765# Check whether --with-user-release-suffix was given.
19766if test "${with_user_release_suffix+set}" = set; then :
19767  withval=$with_user_release_suffix;
19768fi
19769
19770  if test "x$with_user_release_suffix" = xyes; then
19771    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19772  elif test "x$with_user_release_suffix" != x; then
19773    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19774  fi
19775
19776
19777# Check whether --with-build-number was given.
19778if test "${with_build_number+set}" = set; then :
19779  withval=$with_build_number;
19780fi
19781
19782  if test "x$with_build_number" = xyes; then
19783    as_fn_error $? "Build number must have a value" "$LINENO" 5
19784  elif test "x$with_build_number" != x; then
19785    JDK_BUILD_NUMBER="$with_build_number"
19786  fi
19787  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19788  if test "x$JDK_BUILD_NUMBER" = x; then
19789    JDK_BUILD_NUMBER=b00
19790    if test "x$USER_RELEASE_SUFFIX" = x; then
19791      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19792      # Avoid [:alnum:] since it depends on the locale.
19793      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19794      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19795    fi
19796  fi
19797
19798  # Now set the JDK version, milestone, build number etc.
19799
19800
19801
19802
19803
19804
19805
19806
19807
19808
19809
19810
19811
19812
19813
19814  COPYRIGHT_YEAR=`date +'%Y'`
19815
19816
19817  if test "x$JDK_UPDATE_VERSION" != x; then
19818    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19819  else
19820    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19821  fi
19822
19823
19824  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19825
19826
19827
19828###############################################################################
19829#
19830# Setup BootJDK, used to bootstrap the build.
19831#
19832###############################################################################
19833
19834
19835  BOOT_JDK_FOUND=no
19836
19837# Check whether --with-boot-jdk was given.
19838if test "${with_boot_jdk+set}" = set; then :
19839  withval=$with_boot_jdk;
19840fi
19841
19842
19843  # We look for the Boot JDK through various means, going from more certain to
19844  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19845  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19846  # must check if this is indeed valid; otherwise we'll continue looking.
19847
19848  # Test: Is bootjdk explicitely set by command line arguments?
19849
19850  if test "x$BOOT_JDK_FOUND" = xno; then
19851    # Now execute the test
19852
19853  if test "x$with_boot_jdk" != x; then
19854    BOOT_JDK=$with_boot_jdk
19855    BOOT_JDK_FOUND=maybe
19856    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19857$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19858  fi
19859
19860
19861    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19862    if test "x$BOOT_JDK_FOUND" = xmaybe; then
19863      # Do we have a bin/java?
19864      if test ! -x "$BOOT_JDK/bin/java"; then
19865        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19867        BOOT_JDK_FOUND=no
19868      else
19869        # Do we have a bin/javac?
19870        if test ! -x "$BOOT_JDK/bin/javac"; then
19871          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19872$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19873          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19874$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19875          BOOT_JDK_FOUND=no
19876        else
19877          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19878          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19879            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19880$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19881            BOOT_JDK_FOUND=no
19882          else
19883            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19884            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19885
19886            # Extra M4 quote needed to protect [] in grep expression.
19887            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
19888            if test "x$FOUND_CORRECT_VERSION" = x; then
19889              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19890$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19891              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
19892$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
19893              BOOT_JDK_FOUND=no
19894            else
19895              # We're done! :-)
19896              BOOT_JDK_FOUND=yes
19897
19898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19899
19900  # Input might be given as Windows format, start by converting to
19901  # unix format.
19902  path="$BOOT_JDK"
19903  new_path=`$CYGPATH -u "$path"`
19904
19905  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19906  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19907  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19908  # "foo.exe" is OK but "foo" is an error.
19909  #
19910  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19911  # It is also a way to make sure we got the proper file name for the real test later on.
19912  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19913  if test "x$test_shortpath" = x; then
19914    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19915$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19916    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19917  fi
19918
19919  # Call helper function which possibly converts this using DOS-style short mode.
19920  # If so, the updated path is stored in $new_path.
19921
19922  input_path="$new_path"
19923  # Check if we need to convert this using DOS-style short mode. If the path
19924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19925  # take no chances and rewrite it.
19926  # Note: m4 eats our [], so we need to use [ and ] instead.
19927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19928  if test "x$has_forbidden_chars" != x; then
19929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19930    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19931    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19932    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19933      # Going to short mode and back again did indeed matter. Since short mode is
19934      # case insensitive, let's make it lowercase to improve readability.
19935      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19936      # Now convert it back to Unix-stile (cygpath)
19937      input_path=`$CYGPATH -u "$shortmode_path"`
19938      new_path="$input_path"
19939    fi
19940  fi
19941
19942  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19943  if test "x$test_cygdrive_prefix" = x; then
19944    # As a simple fix, exclude /usr/bin since it's not a real path.
19945    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19946      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19947      # a path prefixed by /cygdrive for fixpath to work.
19948      new_path="$CYGWIN_ROOT_PATH$input_path"
19949    fi
19950  fi
19951
19952
19953  if test "x$path" != "x$new_path"; then
19954    BOOT_JDK="$new_path"
19955    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19956$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19957  fi
19958
19959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19960
19961  path="$BOOT_JDK"
19962  has_colon=`$ECHO $path | $GREP ^.:`
19963  new_path="$path"
19964  if test "x$has_colon" = x; then
19965    # Not in mixed or Windows style, start by that.
19966    new_path=`cmd //c echo $path`
19967  fi
19968
19969
19970  input_path="$new_path"
19971  # Check if we need to convert this using DOS-style short mode. If the path
19972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19973  # take no chances and rewrite it.
19974  # Note: m4 eats our [], so we need to use [ and ] instead.
19975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19976  if test "x$has_forbidden_chars" != x; then
19977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19978    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19979  fi
19980
19981
19982  windows_path="$new_path"
19983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19984    unix_path=`$CYGPATH -u "$windows_path"`
19985    new_path="$unix_path"
19986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19988    new_path="$unix_path"
19989  fi
19990
19991  if test "x$path" != "x$new_path"; then
19992    BOOT_JDK="$new_path"
19993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19994$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19995  fi
19996
19997  # Save the first 10 bytes of this path to the storage, so fixpath can work.
19998  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19999
20000  else
20001    # We're on a posix platform. Hooray! :)
20002    path="$BOOT_JDK"
20003    has_space=`$ECHO "$path" | $GREP " "`
20004    if test "x$has_space" != x; then
20005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20006$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20007      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20008    fi
20009
20010    # Use eval to expand a potential ~
20011    eval path="$path"
20012    if test ! -f "$path" && test ! -d "$path"; then
20013      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20014    fi
20015
20016    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20017  fi
20018
20019              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20020$as_echo_n "checking for Boot JDK... " >&6; }
20021              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20022$as_echo "$BOOT_JDK" >&6; }
20023              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20024$as_echo_n "checking Boot JDK version... " >&6; }
20025              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20026              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20027$as_echo "$BOOT_JDK_VERSION" >&6; }
20028            fi # end check jdk version
20029          fi # end check rt.jar
20030        fi # end check javac
20031      fi # end check java
20032    fi # end check boot jdk found
20033  fi
20034
20035  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20036    # Having specified an argument which is incorrect will produce an instant failure;
20037    # we should not go on looking
20038    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20039  fi
20040
20041  # Test: Is bootjdk available from builddeps?
20042
20043  if test "x$BOOT_JDK_FOUND" = xno; then
20044    # Now execute the test
20045
20046
20047
20048  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20049    # Source the builddeps file again, to make sure it uses the latest variables!
20050    . $builddepsfile
20051    # Look for a target and build machine specific resource!
20052    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20053    if test "x$resource" = x; then
20054      # Ok, lets instead look for a target specific resource
20055      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20056    fi
20057    if test "x$resource" = x; then
20058      # Ok, lets instead look for a build specific resource
20059      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20060    fi
20061    if test "x$resource" = x; then
20062      # Ok, lets instead look for a generic resource
20063      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20064      resource=${builddep_bootjdk}
20065    fi
20066    if test "x$resource" != x; then
20067      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20068$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20069      # If the resource in the builddeps.conf file is an existing directory,
20070      # for example /java/linux/cups
20071      if test -d ${resource}; then
20072        depdir=${resource}
20073      else
20074
20075  # bootjdk is for example mymodule
20076  # $resource is for example libs/general/libmymod_1_2_3.zip
20077  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20078  # $with_builddeps_dir is for example /localhome/builddeps
20079  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20080  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20081  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20082  filename=`basename $resource`
20083  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20084  filebase=${filename%%.*}
20085  extension=${filename#*.}
20086  installdir=$with_builddeps_dir/$filebase
20087  if test ! -f $installdir/$filename.unpacked; then
20088    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20089$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20090    if test ! -d $installdir; then
20091      mkdir -p $installdir
20092    fi
20093    if test ! -d $installdir; then
20094      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20095    fi
20096    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20097    touch $tmpfile
20098    if test ! -f $tmpfile; then
20099      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20100    fi
20101
20102  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20103  # $tmpfile is the local file name for the downloaded file.
20104  VALID_TOOL=no
20105  if test "x$BDEPS_FTP" = xwget; then
20106    VALID_TOOL=yes
20107    wget -O $tmpfile $with_builddeps_server/$resource
20108  fi
20109  if test "x$BDEPS_FTP" = xlftp; then
20110    VALID_TOOL=yes
20111    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20112  fi
20113  if test "x$BDEPS_FTP" = xftp; then
20114    VALID_TOOL=yes
20115    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20116    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20117    FTPUSERPWD=${FTPSERVER%%@*}
20118    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20119      FTPUSER=${userpwd%%:*}
20120      FTPPWD=${userpwd#*@}
20121      FTPSERVER=${FTPSERVER#*@}
20122    else
20123      FTPUSER=ftp
20124      FTPPWD=ftp
20125    fi
20126    # the "pass" command does not work on some
20127    # ftp clients (read ftp.exe) but if it works,
20128    # passive mode is better!
20129    ( \
20130        echo "user $FTPUSER $FTPPWD"        ; \
20131        echo "pass"                         ; \
20132        echo "bin"                          ; \
20133        echo "get $FTPPATH $tmpfile"              ; \
20134    ) | ftp -in $FTPSERVER
20135  fi
20136  if test "x$VALID_TOOL" != xyes; then
20137    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20138  fi
20139
20140    mv $tmpfile $installdir/$filename
20141    if test ! -s $installdir/$filename; then
20142      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20143    fi
20144    case "$extension" in
20145      zip)  echo "Unzipping $installdir/$filename..."
20146        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20147        ;;
20148      tar.gz) echo "Untaring $installdir/$filename..."
20149        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20150        ;;
20151      tgz) echo "Untaring $installdir/$filename..."
20152        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20153        ;;
20154      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20155        ;;
20156    esac
20157  fi
20158  if test -f $installdir/$filename.unpacked; then
20159    depdir=$installdir
20160  fi
20161
20162      fi
20163      # Source the builddeps file again, because in the previous command, the depdir
20164      # was updated to point at the current build dependency install directory.
20165      . $builddepsfile
20166      # Now extract variables from the builddeps.conf files.
20167      theroot=${builddep_bootjdk_ROOT}
20168      thecflags=${builddep_bootjdk_CFLAGS}
20169      thelibs=${builddep_bootjdk_LIBS}
20170      if test "x$depdir" = x; then
20171        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20172      fi
20173      BOOT_JDK=$depdir
20174      if test "x$theroot" != x; then
20175        BOOT_JDK="$theroot"
20176      fi
20177      if test "x$thecflags" != x; then
20178        BOOT_JDK_CFLAGS="$thecflags"
20179      fi
20180      if test "x$thelibs" != x; then
20181        BOOT_JDK_LIBS="$thelibs"
20182      fi
20183      BOOT_JDK_FOUND=maybe
20184      else BOOT_JDK_FOUND=no
20185
20186    fi
20187    else BOOT_JDK_FOUND=no
20188
20189  fi
20190
20191
20192
20193    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20194    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20195      # Do we have a bin/java?
20196      if test ! -x "$BOOT_JDK/bin/java"; then
20197        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20198$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20199        BOOT_JDK_FOUND=no
20200      else
20201        # Do we have a bin/javac?
20202        if test ! -x "$BOOT_JDK/bin/javac"; then
20203          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20205          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20206$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20207          BOOT_JDK_FOUND=no
20208        else
20209          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20210          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20211            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20212$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20213            BOOT_JDK_FOUND=no
20214          else
20215            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20216            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20217
20218            # Extra M4 quote needed to protect [] in grep expression.
20219            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20220            if test "x$FOUND_CORRECT_VERSION" = x; then
20221              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20222$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20223              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20224$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20225              BOOT_JDK_FOUND=no
20226            else
20227              # We're done! :-)
20228              BOOT_JDK_FOUND=yes
20229
20230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20231
20232  # Input might be given as Windows format, start by converting to
20233  # unix format.
20234  path="$BOOT_JDK"
20235  new_path=`$CYGPATH -u "$path"`
20236
20237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20240  # "foo.exe" is OK but "foo" is an error.
20241  #
20242  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20243  # It is also a way to make sure we got the proper file name for the real test later on.
20244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20245  if test "x$test_shortpath" = x; then
20246    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20247$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20248    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20249  fi
20250
20251  # Call helper function which possibly converts this using DOS-style short mode.
20252  # If so, the updated path is stored in $new_path.
20253
20254  input_path="$new_path"
20255  # Check if we need to convert this using DOS-style short mode. If the path
20256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20257  # take no chances and rewrite it.
20258  # Note: m4 eats our [], so we need to use [ and ] instead.
20259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20260  if test "x$has_forbidden_chars" != x; then
20261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20262    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20263    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20264    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20265      # Going to short mode and back again did indeed matter. Since short mode is
20266      # case insensitive, let's make it lowercase to improve readability.
20267      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20268      # Now convert it back to Unix-stile (cygpath)
20269      input_path=`$CYGPATH -u "$shortmode_path"`
20270      new_path="$input_path"
20271    fi
20272  fi
20273
20274  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20275  if test "x$test_cygdrive_prefix" = x; then
20276    # As a simple fix, exclude /usr/bin since it's not a real path.
20277    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20278      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20279      # a path prefixed by /cygdrive for fixpath to work.
20280      new_path="$CYGWIN_ROOT_PATH$input_path"
20281    fi
20282  fi
20283
20284
20285  if test "x$path" != "x$new_path"; then
20286    BOOT_JDK="$new_path"
20287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20288$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20289  fi
20290
20291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20292
20293  path="$BOOT_JDK"
20294  has_colon=`$ECHO $path | $GREP ^.:`
20295  new_path="$path"
20296  if test "x$has_colon" = x; then
20297    # Not in mixed or Windows style, start by that.
20298    new_path=`cmd //c echo $path`
20299  fi
20300
20301
20302  input_path="$new_path"
20303  # Check if we need to convert this using DOS-style short mode. If the path
20304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20305  # take no chances and rewrite it.
20306  # Note: m4 eats our [], so we need to use [ and ] instead.
20307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20308  if test "x$has_forbidden_chars" != x; then
20309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20310    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20311  fi
20312
20313
20314  windows_path="$new_path"
20315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20316    unix_path=`$CYGPATH -u "$windows_path"`
20317    new_path="$unix_path"
20318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20320    new_path="$unix_path"
20321  fi
20322
20323  if test "x$path" != "x$new_path"; then
20324    BOOT_JDK="$new_path"
20325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20326$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20327  fi
20328
20329  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20330  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20331
20332  else
20333    # We're on a posix platform. Hooray! :)
20334    path="$BOOT_JDK"
20335    has_space=`$ECHO "$path" | $GREP " "`
20336    if test "x$has_space" != x; then
20337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20338$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20339      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20340    fi
20341
20342    # Use eval to expand a potential ~
20343    eval path="$path"
20344    if test ! -f "$path" && test ! -d "$path"; then
20345      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20346    fi
20347
20348    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20349  fi
20350
20351              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20352$as_echo_n "checking for Boot JDK... " >&6; }
20353              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20354$as_echo "$BOOT_JDK" >&6; }
20355              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20356$as_echo_n "checking Boot JDK version... " >&6; }
20357              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20358              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20359$as_echo "$BOOT_JDK_VERSION" >&6; }
20360            fi # end check jdk version
20361          fi # end check rt.jar
20362        fi # end check javac
20363      fi # end check java
20364    fi # end check boot jdk found
20365  fi
20366
20367
20368  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20369
20370  if test "x$BOOT_JDK_FOUND" = xno; then
20371    # Now execute the test
20372
20373  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20374    # First check at user selected default
20375
20376  if test "x$BOOT_JDK_FOUND" = xno; then
20377    # Now execute the test
20378
20379  if test -x /usr/libexec/java_home; then
20380    BOOT_JDK=`/usr/libexec/java_home `
20381    BOOT_JDK_FOUND=maybe
20382    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20383$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20384  fi
20385
20386
20387    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20388    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20389      # Do we have a bin/java?
20390      if test ! -x "$BOOT_JDK/bin/java"; then
20391        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20392$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20393        BOOT_JDK_FOUND=no
20394      else
20395        # Do we have a bin/javac?
20396        if test ! -x "$BOOT_JDK/bin/javac"; then
20397          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20398$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20399          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20400$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20401          BOOT_JDK_FOUND=no
20402        else
20403          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20404          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20405            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20406$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20407            BOOT_JDK_FOUND=no
20408          else
20409            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20410            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20411
20412            # Extra M4 quote needed to protect [] in grep expression.
20413            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20414            if test "x$FOUND_CORRECT_VERSION" = x; then
20415              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20416$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20417              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20418$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20419              BOOT_JDK_FOUND=no
20420            else
20421              # We're done! :-)
20422              BOOT_JDK_FOUND=yes
20423
20424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20425
20426  # Input might be given as Windows format, start by converting to
20427  # unix format.
20428  path="$BOOT_JDK"
20429  new_path=`$CYGPATH -u "$path"`
20430
20431  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20432  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20433  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20434  # "foo.exe" is OK but "foo" is an error.
20435  #
20436  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20437  # It is also a way to make sure we got the proper file name for the real test later on.
20438  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20439  if test "x$test_shortpath" = x; then
20440    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20441$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20442    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20443  fi
20444
20445  # Call helper function which possibly converts this using DOS-style short mode.
20446  # If so, the updated path is stored in $new_path.
20447
20448  input_path="$new_path"
20449  # Check if we need to convert this using DOS-style short mode. If the path
20450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20451  # take no chances and rewrite it.
20452  # Note: m4 eats our [], so we need to use [ and ] instead.
20453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20454  if test "x$has_forbidden_chars" != x; then
20455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20456    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20457    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20458    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20459      # Going to short mode and back again did indeed matter. Since short mode is
20460      # case insensitive, let's make it lowercase to improve readability.
20461      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20462      # Now convert it back to Unix-stile (cygpath)
20463      input_path=`$CYGPATH -u "$shortmode_path"`
20464      new_path="$input_path"
20465    fi
20466  fi
20467
20468  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20469  if test "x$test_cygdrive_prefix" = x; then
20470    # As a simple fix, exclude /usr/bin since it's not a real path.
20471    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20472      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20473      # a path prefixed by /cygdrive for fixpath to work.
20474      new_path="$CYGWIN_ROOT_PATH$input_path"
20475    fi
20476  fi
20477
20478
20479  if test "x$path" != "x$new_path"; then
20480    BOOT_JDK="$new_path"
20481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20482$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20483  fi
20484
20485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20486
20487  path="$BOOT_JDK"
20488  has_colon=`$ECHO $path | $GREP ^.:`
20489  new_path="$path"
20490  if test "x$has_colon" = x; then
20491    # Not in mixed or Windows style, start by that.
20492    new_path=`cmd //c echo $path`
20493  fi
20494
20495
20496  input_path="$new_path"
20497  # Check if we need to convert this using DOS-style short mode. If the path
20498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20499  # take no chances and rewrite it.
20500  # Note: m4 eats our [], so we need to use [ and ] instead.
20501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20502  if test "x$has_forbidden_chars" != x; then
20503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20504    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20505  fi
20506
20507
20508  windows_path="$new_path"
20509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20510    unix_path=`$CYGPATH -u "$windows_path"`
20511    new_path="$unix_path"
20512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20514    new_path="$unix_path"
20515  fi
20516
20517  if test "x$path" != "x$new_path"; then
20518    BOOT_JDK="$new_path"
20519    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20520$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20521  fi
20522
20523  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20524  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20525
20526  else
20527    # We're on a posix platform. Hooray! :)
20528    path="$BOOT_JDK"
20529    has_space=`$ECHO "$path" | $GREP " "`
20530    if test "x$has_space" != x; then
20531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20532$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20533      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20534    fi
20535
20536    # Use eval to expand a potential ~
20537    eval path="$path"
20538    if test ! -f "$path" && test ! -d "$path"; then
20539      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20540    fi
20541
20542    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20543  fi
20544
20545              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20546$as_echo_n "checking for Boot JDK... " >&6; }
20547              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20548$as_echo "$BOOT_JDK" >&6; }
20549              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20550$as_echo_n "checking Boot JDK version... " >&6; }
20551              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20552              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20553$as_echo "$BOOT_JDK_VERSION" >&6; }
20554            fi # end check jdk version
20555          fi # end check rt.jar
20556        fi # end check javac
20557      fi # end check java
20558    fi # end check boot jdk found
20559  fi
20560
20561    # If that did not work out (e.g. too old), try explicit versions instead
20562
20563  if test "x$BOOT_JDK_FOUND" = xno; then
20564    # Now execute the test
20565
20566  if test -x /usr/libexec/java_home; then
20567    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20568    BOOT_JDK_FOUND=maybe
20569    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20570$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20571  fi
20572
20573
20574    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20575    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20576      # Do we have a bin/java?
20577      if test ! -x "$BOOT_JDK/bin/java"; then
20578        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20579$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20580        BOOT_JDK_FOUND=no
20581      else
20582        # Do we have a bin/javac?
20583        if test ! -x "$BOOT_JDK/bin/javac"; then
20584          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20586          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20587$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20588          BOOT_JDK_FOUND=no
20589        else
20590          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20591          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20592            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20593$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20594            BOOT_JDK_FOUND=no
20595          else
20596            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20597            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20598
20599            # Extra M4 quote needed to protect [] in grep expression.
20600            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20601            if test "x$FOUND_CORRECT_VERSION" = x; then
20602              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20603$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20604              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20605$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20606              BOOT_JDK_FOUND=no
20607            else
20608              # We're done! :-)
20609              BOOT_JDK_FOUND=yes
20610
20611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20612
20613  # Input might be given as Windows format, start by converting to
20614  # unix format.
20615  path="$BOOT_JDK"
20616  new_path=`$CYGPATH -u "$path"`
20617
20618  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20619  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20620  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20621  # "foo.exe" is OK but "foo" is an error.
20622  #
20623  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20624  # It is also a way to make sure we got the proper file name for the real test later on.
20625  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20626  if test "x$test_shortpath" = x; then
20627    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20628$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20629    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20630  fi
20631
20632  # Call helper function which possibly converts this using DOS-style short mode.
20633  # If so, the updated path is stored in $new_path.
20634
20635  input_path="$new_path"
20636  # Check if we need to convert this using DOS-style short mode. If the path
20637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20638  # take no chances and rewrite it.
20639  # Note: m4 eats our [], so we need to use [ and ] instead.
20640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20641  if test "x$has_forbidden_chars" != x; then
20642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20643    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20644    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20645    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20646      # Going to short mode and back again did indeed matter. Since short mode is
20647      # case insensitive, let's make it lowercase to improve readability.
20648      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20649      # Now convert it back to Unix-stile (cygpath)
20650      input_path=`$CYGPATH -u "$shortmode_path"`
20651      new_path="$input_path"
20652    fi
20653  fi
20654
20655  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20656  if test "x$test_cygdrive_prefix" = x; then
20657    # As a simple fix, exclude /usr/bin since it's not a real path.
20658    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20659      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20660      # a path prefixed by /cygdrive for fixpath to work.
20661      new_path="$CYGWIN_ROOT_PATH$input_path"
20662    fi
20663  fi
20664
20665
20666  if test "x$path" != "x$new_path"; then
20667    BOOT_JDK="$new_path"
20668    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20669$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20670  fi
20671
20672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20673
20674  path="$BOOT_JDK"
20675  has_colon=`$ECHO $path | $GREP ^.:`
20676  new_path="$path"
20677  if test "x$has_colon" = x; then
20678    # Not in mixed or Windows style, start by that.
20679    new_path=`cmd //c echo $path`
20680  fi
20681
20682
20683  input_path="$new_path"
20684  # Check if we need to convert this using DOS-style short mode. If the path
20685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20686  # take no chances and rewrite it.
20687  # Note: m4 eats our [], so we need to use [ and ] instead.
20688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20689  if test "x$has_forbidden_chars" != x; then
20690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20691    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20692  fi
20693
20694
20695  windows_path="$new_path"
20696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20697    unix_path=`$CYGPATH -u "$windows_path"`
20698    new_path="$unix_path"
20699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20701    new_path="$unix_path"
20702  fi
20703
20704  if test "x$path" != "x$new_path"; then
20705    BOOT_JDK="$new_path"
20706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20707$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20708  fi
20709
20710  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20711  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20712
20713  else
20714    # We're on a posix platform. Hooray! :)
20715    path="$BOOT_JDK"
20716    has_space=`$ECHO "$path" | $GREP " "`
20717    if test "x$has_space" != x; then
20718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20719$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20720      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20721    fi
20722
20723    # Use eval to expand a potential ~
20724    eval path="$path"
20725    if test ! -f "$path" && test ! -d "$path"; then
20726      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20727    fi
20728
20729    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20730  fi
20731
20732              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20733$as_echo_n "checking for Boot JDK... " >&6; }
20734              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20735$as_echo "$BOOT_JDK" >&6; }
20736              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20737$as_echo_n "checking Boot JDK version... " >&6; }
20738              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20739              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20740$as_echo "$BOOT_JDK_VERSION" >&6; }
20741            fi # end check jdk version
20742          fi # end check rt.jar
20743        fi # end check javac
20744      fi # end check java
20745    fi # end check boot jdk found
20746  fi
20747
20748
20749  if test "x$BOOT_JDK_FOUND" = xno; then
20750    # Now execute the test
20751
20752  if test -x /usr/libexec/java_home; then
20753    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20754    BOOT_JDK_FOUND=maybe
20755    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20756$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20757  fi
20758
20759
20760    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20761    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20762      # Do we have a bin/java?
20763      if test ! -x "$BOOT_JDK/bin/java"; then
20764        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20766        BOOT_JDK_FOUND=no
20767      else
20768        # Do we have a bin/javac?
20769        if test ! -x "$BOOT_JDK/bin/javac"; then
20770          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20772          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20773$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20774          BOOT_JDK_FOUND=no
20775        else
20776          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20777          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20778            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20779$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20780            BOOT_JDK_FOUND=no
20781          else
20782            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20783            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20784
20785            # Extra M4 quote needed to protect [] in grep expression.
20786            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20787            if test "x$FOUND_CORRECT_VERSION" = x; then
20788              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20790              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20791$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20792              BOOT_JDK_FOUND=no
20793            else
20794              # We're done! :-)
20795              BOOT_JDK_FOUND=yes
20796
20797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20798
20799  # Input might be given as Windows format, start by converting to
20800  # unix format.
20801  path="$BOOT_JDK"
20802  new_path=`$CYGPATH -u "$path"`
20803
20804  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20805  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20806  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20807  # "foo.exe" is OK but "foo" is an error.
20808  #
20809  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20810  # It is also a way to make sure we got the proper file name for the real test later on.
20811  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20812  if test "x$test_shortpath" = x; then
20813    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20814$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20815    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20816  fi
20817
20818  # Call helper function which possibly converts this using DOS-style short mode.
20819  # If so, the updated path is stored in $new_path.
20820
20821  input_path="$new_path"
20822  # Check if we need to convert this using DOS-style short mode. If the path
20823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20824  # take no chances and rewrite it.
20825  # Note: m4 eats our [], so we need to use [ and ] instead.
20826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20827  if test "x$has_forbidden_chars" != x; then
20828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20829    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20830    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20831    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20832      # Going to short mode and back again did indeed matter. Since short mode is
20833      # case insensitive, let's make it lowercase to improve readability.
20834      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20835      # Now convert it back to Unix-stile (cygpath)
20836      input_path=`$CYGPATH -u "$shortmode_path"`
20837      new_path="$input_path"
20838    fi
20839  fi
20840
20841  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20842  if test "x$test_cygdrive_prefix" = x; then
20843    # As a simple fix, exclude /usr/bin since it's not a real path.
20844    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20845      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20846      # a path prefixed by /cygdrive for fixpath to work.
20847      new_path="$CYGWIN_ROOT_PATH$input_path"
20848    fi
20849  fi
20850
20851
20852  if test "x$path" != "x$new_path"; then
20853    BOOT_JDK="$new_path"
20854    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20855$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20856  fi
20857
20858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20859
20860  path="$BOOT_JDK"
20861  has_colon=`$ECHO $path | $GREP ^.:`
20862  new_path="$path"
20863  if test "x$has_colon" = x; then
20864    # Not in mixed or Windows style, start by that.
20865    new_path=`cmd //c echo $path`
20866  fi
20867
20868
20869  input_path="$new_path"
20870  # Check if we need to convert this using DOS-style short mode. If the path
20871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20872  # take no chances and rewrite it.
20873  # Note: m4 eats our [], so we need to use [ and ] instead.
20874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20875  if test "x$has_forbidden_chars" != x; then
20876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20877    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20878  fi
20879
20880
20881  windows_path="$new_path"
20882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20883    unix_path=`$CYGPATH -u "$windows_path"`
20884    new_path="$unix_path"
20885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20887    new_path="$unix_path"
20888  fi
20889
20890  if test "x$path" != "x$new_path"; then
20891    BOOT_JDK="$new_path"
20892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20893$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20894  fi
20895
20896  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20897  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20898
20899  else
20900    # We're on a posix platform. Hooray! :)
20901    path="$BOOT_JDK"
20902    has_space=`$ECHO "$path" | $GREP " "`
20903    if test "x$has_space" != x; then
20904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20905$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20906      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20907    fi
20908
20909    # Use eval to expand a potential ~
20910    eval path="$path"
20911    if test ! -f "$path" && test ! -d "$path"; then
20912      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20913    fi
20914
20915    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20916  fi
20917
20918              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20919$as_echo_n "checking for Boot JDK... " >&6; }
20920              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20921$as_echo "$BOOT_JDK" >&6; }
20922              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20923$as_echo_n "checking Boot JDK version... " >&6; }
20924              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20925              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20926$as_echo "$BOOT_JDK_VERSION" >&6; }
20927            fi # end check jdk version
20928          fi # end check rt.jar
20929        fi # end check javac
20930      fi # end check java
20931    fi # end check boot jdk found
20932  fi
20933
20934
20935  if test "x$BOOT_JDK_FOUND" = xno; then
20936    # Now execute the test
20937
20938  if test -x /usr/libexec/java_home; then
20939    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
20940    BOOT_JDK_FOUND=maybe
20941    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
20942$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
20943  fi
20944
20945
20946    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20947    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20948      # Do we have a bin/java?
20949      if test ! -x "$BOOT_JDK/bin/java"; then
20950        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20951$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20952        BOOT_JDK_FOUND=no
20953      else
20954        # Do we have a bin/javac?
20955        if test ! -x "$BOOT_JDK/bin/javac"; then
20956          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20957$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20958          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20959$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20960          BOOT_JDK_FOUND=no
20961        else
20962          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20963          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20964            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20965$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20966            BOOT_JDK_FOUND=no
20967          else
20968            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20969            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20970
20971            # Extra M4 quote needed to protect [] in grep expression.
20972            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20973            if test "x$FOUND_CORRECT_VERSION" = x; then
20974              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20975$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20976              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20977$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20978              BOOT_JDK_FOUND=no
20979            else
20980              # We're done! :-)
20981              BOOT_JDK_FOUND=yes
20982
20983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20984
20985  # Input might be given as Windows format, start by converting to
20986  # unix format.
20987  path="$BOOT_JDK"
20988  new_path=`$CYGPATH -u "$path"`
20989
20990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20993  # "foo.exe" is OK but "foo" is an error.
20994  #
20995  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20996  # It is also a way to make sure we got the proper file name for the real test later on.
20997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20998  if test "x$test_shortpath" = x; then
20999    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21000$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21001    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21002  fi
21003
21004  # Call helper function which possibly converts this using DOS-style short mode.
21005  # If so, the updated path is stored in $new_path.
21006
21007  input_path="$new_path"
21008  # Check if we need to convert this using DOS-style short mode. If the path
21009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21010  # take no chances and rewrite it.
21011  # Note: m4 eats our [], so we need to use [ and ] instead.
21012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21013  if test "x$has_forbidden_chars" != x; then
21014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21018      # Going to short mode and back again did indeed matter. Since short mode is
21019      # case insensitive, let's make it lowercase to improve readability.
21020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21021      # Now convert it back to Unix-stile (cygpath)
21022      input_path=`$CYGPATH -u "$shortmode_path"`
21023      new_path="$input_path"
21024    fi
21025  fi
21026
21027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21028  if test "x$test_cygdrive_prefix" = x; then
21029    # As a simple fix, exclude /usr/bin since it's not a real path.
21030    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21032      # a path prefixed by /cygdrive for fixpath to work.
21033      new_path="$CYGWIN_ROOT_PATH$input_path"
21034    fi
21035  fi
21036
21037
21038  if test "x$path" != "x$new_path"; then
21039    BOOT_JDK="$new_path"
21040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21041$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21042  fi
21043
21044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21045
21046  path="$BOOT_JDK"
21047  has_colon=`$ECHO $path | $GREP ^.:`
21048  new_path="$path"
21049  if test "x$has_colon" = x; then
21050    # Not in mixed or Windows style, start by that.
21051    new_path=`cmd //c echo $path`
21052  fi
21053
21054
21055  input_path="$new_path"
21056  # Check if we need to convert this using DOS-style short mode. If the path
21057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21058  # take no chances and rewrite it.
21059  # Note: m4 eats our [], so we need to use [ and ] instead.
21060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21061  if test "x$has_forbidden_chars" != x; then
21062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21064  fi
21065
21066
21067  windows_path="$new_path"
21068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21069    unix_path=`$CYGPATH -u "$windows_path"`
21070    new_path="$unix_path"
21071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21073    new_path="$unix_path"
21074  fi
21075
21076  if test "x$path" != "x$new_path"; then
21077    BOOT_JDK="$new_path"
21078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21079$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21080  fi
21081
21082  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21083  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21084
21085  else
21086    # We're on a posix platform. Hooray! :)
21087    path="$BOOT_JDK"
21088    has_space=`$ECHO "$path" | $GREP " "`
21089    if test "x$has_space" != x; then
21090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21091$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21092      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21093    fi
21094
21095    # Use eval to expand a potential ~
21096    eval path="$path"
21097    if test ! -f "$path" && test ! -d "$path"; then
21098      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21099    fi
21100
21101    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21102  fi
21103
21104              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21105$as_echo_n "checking for Boot JDK... " >&6; }
21106              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21107$as_echo "$BOOT_JDK" >&6; }
21108              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21109$as_echo_n "checking Boot JDK version... " >&6; }
21110              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21111              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21112$as_echo "$BOOT_JDK_VERSION" >&6; }
21113            fi # end check jdk version
21114          fi # end check rt.jar
21115        fi # end check javac
21116      fi # end check java
21117    fi # end check boot jdk found
21118  fi
21119
21120  fi
21121
21122
21123    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21124    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21125      # Do we have a bin/java?
21126      if test ! -x "$BOOT_JDK/bin/java"; then
21127        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21128$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21129        BOOT_JDK_FOUND=no
21130      else
21131        # Do we have a bin/javac?
21132        if test ! -x "$BOOT_JDK/bin/javac"; then
21133          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21134$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21135          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21136$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21137          BOOT_JDK_FOUND=no
21138        else
21139          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21140          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21141            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21142$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21143            BOOT_JDK_FOUND=no
21144          else
21145            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21146            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21147
21148            # Extra M4 quote needed to protect [] in grep expression.
21149            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21150            if test "x$FOUND_CORRECT_VERSION" = x; then
21151              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21153              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21154$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21155              BOOT_JDK_FOUND=no
21156            else
21157              # We're done! :-)
21158              BOOT_JDK_FOUND=yes
21159
21160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21161
21162  # Input might be given as Windows format, start by converting to
21163  # unix format.
21164  path="$BOOT_JDK"
21165  new_path=`$CYGPATH -u "$path"`
21166
21167  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21168  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21169  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21170  # "foo.exe" is OK but "foo" is an error.
21171  #
21172  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21173  # It is also a way to make sure we got the proper file name for the real test later on.
21174  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21175  if test "x$test_shortpath" = x; then
21176    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21177$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21178    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21179  fi
21180
21181  # Call helper function which possibly converts this using DOS-style short mode.
21182  # If so, the updated path is stored in $new_path.
21183
21184  input_path="$new_path"
21185  # Check if we need to convert this using DOS-style short mode. If the path
21186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21187  # take no chances and rewrite it.
21188  # Note: m4 eats our [], so we need to use [ and ] instead.
21189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21190  if test "x$has_forbidden_chars" != x; then
21191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21192    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21193    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21194    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21195      # Going to short mode and back again did indeed matter. Since short mode is
21196      # case insensitive, let's make it lowercase to improve readability.
21197      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21198      # Now convert it back to Unix-stile (cygpath)
21199      input_path=`$CYGPATH -u "$shortmode_path"`
21200      new_path="$input_path"
21201    fi
21202  fi
21203
21204  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21205  if test "x$test_cygdrive_prefix" = x; then
21206    # As a simple fix, exclude /usr/bin since it's not a real path.
21207    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21208      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21209      # a path prefixed by /cygdrive for fixpath to work.
21210      new_path="$CYGWIN_ROOT_PATH$input_path"
21211    fi
21212  fi
21213
21214
21215  if test "x$path" != "x$new_path"; then
21216    BOOT_JDK="$new_path"
21217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21218$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21219  fi
21220
21221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21222
21223  path="$BOOT_JDK"
21224  has_colon=`$ECHO $path | $GREP ^.:`
21225  new_path="$path"
21226  if test "x$has_colon" = x; then
21227    # Not in mixed or Windows style, start by that.
21228    new_path=`cmd //c echo $path`
21229  fi
21230
21231
21232  input_path="$new_path"
21233  # Check if we need to convert this using DOS-style short mode. If the path
21234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21235  # take no chances and rewrite it.
21236  # Note: m4 eats our [], so we need to use [ and ] instead.
21237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21238  if test "x$has_forbidden_chars" != x; then
21239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21240    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21241  fi
21242
21243
21244  windows_path="$new_path"
21245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21246    unix_path=`$CYGPATH -u "$windows_path"`
21247    new_path="$unix_path"
21248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21250    new_path="$unix_path"
21251  fi
21252
21253  if test "x$path" != "x$new_path"; then
21254    BOOT_JDK="$new_path"
21255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21256$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21257  fi
21258
21259  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21260  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21261
21262  else
21263    # We're on a posix platform. Hooray! :)
21264    path="$BOOT_JDK"
21265    has_space=`$ECHO "$path" | $GREP " "`
21266    if test "x$has_space" != x; then
21267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21268$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21269      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21270    fi
21271
21272    # Use eval to expand a potential ~
21273    eval path="$path"
21274    if test ! -f "$path" && test ! -d "$path"; then
21275      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21276    fi
21277
21278    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21279  fi
21280
21281              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21282$as_echo_n "checking for Boot JDK... " >&6; }
21283              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21284$as_echo "$BOOT_JDK" >&6; }
21285              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21286$as_echo_n "checking Boot JDK version... " >&6; }
21287              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21288              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21289$as_echo "$BOOT_JDK_VERSION" >&6; }
21290            fi # end check jdk version
21291          fi # end check rt.jar
21292        fi # end check javac
21293      fi # end check java
21294    fi # end check boot jdk found
21295  fi
21296
21297
21298  # Test: Is $JAVA_HOME set?
21299
21300  if test "x$BOOT_JDK_FOUND" = xno; then
21301    # Now execute the test
21302
21303  if test "x$JAVA_HOME" != x; then
21304    JAVA_HOME_PROCESSED="$JAVA_HOME"
21305
21306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21307
21308  # Input might be given as Windows format, start by converting to
21309  # unix format.
21310  path="$JAVA_HOME_PROCESSED"
21311  new_path=`$CYGPATH -u "$path"`
21312
21313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21316  # "foo.exe" is OK but "foo" is an error.
21317  #
21318  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21319  # It is also a way to make sure we got the proper file name for the real test later on.
21320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21321  if test "x$test_shortpath" = x; then
21322    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21323$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21324    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21325  fi
21326
21327  # Call helper function which possibly converts this using DOS-style short mode.
21328  # If so, the updated path is stored in $new_path.
21329
21330  input_path="$new_path"
21331  # Check if we need to convert this using DOS-style short mode. If the path
21332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21333  # take no chances and rewrite it.
21334  # Note: m4 eats our [], so we need to use [ and ] instead.
21335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21336  if test "x$has_forbidden_chars" != x; then
21337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21338    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21339    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21340    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21341      # Going to short mode and back again did indeed matter. Since short mode is
21342      # case insensitive, let's make it lowercase to improve readability.
21343      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21344      # Now convert it back to Unix-stile (cygpath)
21345      input_path=`$CYGPATH -u "$shortmode_path"`
21346      new_path="$input_path"
21347    fi
21348  fi
21349
21350  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21351  if test "x$test_cygdrive_prefix" = x; then
21352    # As a simple fix, exclude /usr/bin since it's not a real path.
21353    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21354      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21355      # a path prefixed by /cygdrive for fixpath to work.
21356      new_path="$CYGWIN_ROOT_PATH$input_path"
21357    fi
21358  fi
21359
21360
21361  if test "x$path" != "x$new_path"; then
21362    JAVA_HOME_PROCESSED="$new_path"
21363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21364$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21365  fi
21366
21367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21368
21369  path="$JAVA_HOME_PROCESSED"
21370  has_colon=`$ECHO $path | $GREP ^.:`
21371  new_path="$path"
21372  if test "x$has_colon" = x; then
21373    # Not in mixed or Windows style, start by that.
21374    new_path=`cmd //c echo $path`
21375  fi
21376
21377
21378  input_path="$new_path"
21379  # Check if we need to convert this using DOS-style short mode. If the path
21380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21381  # take no chances and rewrite it.
21382  # Note: m4 eats our [], so we need to use [ and ] instead.
21383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21384  if test "x$has_forbidden_chars" != x; then
21385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21387  fi
21388
21389
21390  windows_path="$new_path"
21391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21392    unix_path=`$CYGPATH -u "$windows_path"`
21393    new_path="$unix_path"
21394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21396    new_path="$unix_path"
21397  fi
21398
21399  if test "x$path" != "x$new_path"; then
21400    JAVA_HOME_PROCESSED="$new_path"
21401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21402$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21403  fi
21404
21405  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21406  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21407
21408  else
21409    # We're on a posix platform. Hooray! :)
21410    path="$JAVA_HOME_PROCESSED"
21411    has_space=`$ECHO "$path" | $GREP " "`
21412    if test "x$has_space" != x; then
21413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21414$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21415      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21416    fi
21417
21418    # Use eval to expand a potential ~
21419    eval path="$path"
21420    if test ! -f "$path" && test ! -d "$path"; then
21421      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21422    fi
21423
21424    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21425  fi
21426
21427    if test ! -d "$JAVA_HOME_PROCESSED"; then
21428      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21429$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21430    else
21431      # Aha, the user has set a JAVA_HOME
21432      # let us use that as the Boot JDK.
21433      BOOT_JDK="$JAVA_HOME_PROCESSED"
21434      BOOT_JDK_FOUND=maybe
21435      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21436$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21437    fi
21438  fi
21439
21440
21441    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21442    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21443      # Do we have a bin/java?
21444      if test ! -x "$BOOT_JDK/bin/java"; then
21445        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21447        BOOT_JDK_FOUND=no
21448      else
21449        # Do we have a bin/javac?
21450        if test ! -x "$BOOT_JDK/bin/javac"; then
21451          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21452$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21453          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21454$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21455          BOOT_JDK_FOUND=no
21456        else
21457          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21458          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21459            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21460$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21461            BOOT_JDK_FOUND=no
21462          else
21463            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21464            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21465
21466            # Extra M4 quote needed to protect [] in grep expression.
21467            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21468            if test "x$FOUND_CORRECT_VERSION" = x; then
21469              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21470$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21471              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21472$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21473              BOOT_JDK_FOUND=no
21474            else
21475              # We're done! :-)
21476              BOOT_JDK_FOUND=yes
21477
21478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21479
21480  # Input might be given as Windows format, start by converting to
21481  # unix format.
21482  path="$BOOT_JDK"
21483  new_path=`$CYGPATH -u "$path"`
21484
21485  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21486  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21487  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21488  # "foo.exe" is OK but "foo" is an error.
21489  #
21490  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21491  # It is also a way to make sure we got the proper file name for the real test later on.
21492  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21493  if test "x$test_shortpath" = x; then
21494    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21495$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21496    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21497  fi
21498
21499  # Call helper function which possibly converts this using DOS-style short mode.
21500  # If so, the updated path is stored in $new_path.
21501
21502  input_path="$new_path"
21503  # Check if we need to convert this using DOS-style short mode. If the path
21504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21505  # take no chances and rewrite it.
21506  # Note: m4 eats our [], so we need to use [ and ] instead.
21507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21508  if test "x$has_forbidden_chars" != x; then
21509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21510    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21511    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21512    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21513      # Going to short mode and back again did indeed matter. Since short mode is
21514      # case insensitive, let's make it lowercase to improve readability.
21515      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21516      # Now convert it back to Unix-stile (cygpath)
21517      input_path=`$CYGPATH -u "$shortmode_path"`
21518      new_path="$input_path"
21519    fi
21520  fi
21521
21522  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21523  if test "x$test_cygdrive_prefix" = x; then
21524    # As a simple fix, exclude /usr/bin since it's not a real path.
21525    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21526      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21527      # a path prefixed by /cygdrive for fixpath to work.
21528      new_path="$CYGWIN_ROOT_PATH$input_path"
21529    fi
21530  fi
21531
21532
21533  if test "x$path" != "x$new_path"; then
21534    BOOT_JDK="$new_path"
21535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21536$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21537  fi
21538
21539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21540
21541  path="$BOOT_JDK"
21542  has_colon=`$ECHO $path | $GREP ^.:`
21543  new_path="$path"
21544  if test "x$has_colon" = x; then
21545    # Not in mixed or Windows style, start by that.
21546    new_path=`cmd //c echo $path`
21547  fi
21548
21549
21550  input_path="$new_path"
21551  # Check if we need to convert this using DOS-style short mode. If the path
21552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21553  # take no chances and rewrite it.
21554  # Note: m4 eats our [], so we need to use [ and ] instead.
21555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21556  if test "x$has_forbidden_chars" != x; then
21557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21558    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21559  fi
21560
21561
21562  windows_path="$new_path"
21563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21564    unix_path=`$CYGPATH -u "$windows_path"`
21565    new_path="$unix_path"
21566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21568    new_path="$unix_path"
21569  fi
21570
21571  if test "x$path" != "x$new_path"; then
21572    BOOT_JDK="$new_path"
21573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21574$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21575  fi
21576
21577  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21578  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21579
21580  else
21581    # We're on a posix platform. Hooray! :)
21582    path="$BOOT_JDK"
21583    has_space=`$ECHO "$path" | $GREP " "`
21584    if test "x$has_space" != x; then
21585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21586$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21587      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21588    fi
21589
21590    # Use eval to expand a potential ~
21591    eval path="$path"
21592    if test ! -f "$path" && test ! -d "$path"; then
21593      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21594    fi
21595
21596    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21597  fi
21598
21599              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21600$as_echo_n "checking for Boot JDK... " >&6; }
21601              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21602$as_echo "$BOOT_JDK" >&6; }
21603              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21604$as_echo_n "checking Boot JDK version... " >&6; }
21605              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21606              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21607$as_echo "$BOOT_JDK_VERSION" >&6; }
21608            fi # end check jdk version
21609          fi # end check rt.jar
21610        fi # end check javac
21611      fi # end check java
21612    fi # end check boot jdk found
21613  fi
21614
21615
21616  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21617
21618  if test "x$BOOT_JDK_FOUND" = xno; then
21619    # Now execute the test
21620
21621  # Extract the first word of "javac", so it can be a program name with args.
21622set dummy javac; ac_word=$2
21623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21624$as_echo_n "checking for $ac_word... " >&6; }
21625if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21626  $as_echo_n "(cached) " >&6
21627else
21628  case $JAVAC_CHECK in
21629  [\\/]* | ?:[\\/]*)
21630  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21631  ;;
21632  *)
21633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21634for as_dir in $PATH
21635do
21636  IFS=$as_save_IFS
21637  test -z "$as_dir" && as_dir=.
21638    for ac_exec_ext in '' $ac_executable_extensions; do
21639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21640    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21642    break 2
21643  fi
21644done
21645  done
21646IFS=$as_save_IFS
21647
21648  ;;
21649esac
21650fi
21651JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21652if test -n "$JAVAC_CHECK"; then
21653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21654$as_echo "$JAVAC_CHECK" >&6; }
21655else
21656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21657$as_echo "no" >&6; }
21658fi
21659
21660
21661  # Extract the first word of "java", so it can be a program name with args.
21662set dummy java; ac_word=$2
21663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21664$as_echo_n "checking for $ac_word... " >&6; }
21665if ${ac_cv_path_JAVA_CHECK+:} false; then :
21666  $as_echo_n "(cached) " >&6
21667else
21668  case $JAVA_CHECK in
21669  [\\/]* | ?:[\\/]*)
21670  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21671  ;;
21672  *)
21673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21674for as_dir in $PATH
21675do
21676  IFS=$as_save_IFS
21677  test -z "$as_dir" && as_dir=.
21678    for ac_exec_ext in '' $ac_executable_extensions; do
21679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21680    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21682    break 2
21683  fi
21684done
21685  done
21686IFS=$as_save_IFS
21687
21688  ;;
21689esac
21690fi
21691JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21692if test -n "$JAVA_CHECK"; then
21693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21694$as_echo "$JAVA_CHECK" >&6; }
21695else
21696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21697$as_echo "no" >&6; }
21698fi
21699
21700
21701  BINARY="$JAVAC_CHECK"
21702  if test "x$JAVAC_CHECK" = x; then
21703    BINARY="$JAVA_CHECK"
21704  fi
21705  if test "x$BINARY" != x; then
21706    # So there is a java(c) binary, it might be part of a JDK.
21707    # Lets find the JDK/JRE directory by following symbolic links.
21708    # Linux/GNU systems often have links from /usr/bin/java to
21709    # /etc/alternatives/java to the real JDK binary.
21710
21711  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21712    # Follow a chain of symbolic links. Use readlink
21713    # where it exists, else fall back to horribly
21714    # complicated shell code.
21715    if test "x$READLINK_TESTED" != yes; then
21716      # On MacOSX there is a readlink tool with a different
21717      # purpose than the GNU readlink tool. Check the found readlink.
21718      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21719      if test "x$ISGNU" = x; then
21720        # A readlink that we do not know how to use.
21721        # Are there other non-GNU readlinks out there?
21722        READLINK_TESTED=yes
21723        READLINK=
21724      fi
21725    fi
21726
21727    if test "x$READLINK" != x; then
21728      BINARY=`$READLINK -f $BINARY`
21729    else
21730      # Save the current directory for restoring afterwards
21731      STARTDIR=$PWD
21732      COUNTER=0
21733      sym_link_dir=`$DIRNAME $BINARY`
21734      sym_link_file=`$BASENAME $BINARY`
21735      cd $sym_link_dir
21736      # Use -P flag to resolve symlinks in directories.
21737      cd `$THEPWDCMD -P`
21738      sym_link_dir=`$THEPWDCMD -P`
21739      # Resolve file symlinks
21740      while test $COUNTER -lt 20; do
21741        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21742        if test "x$ISLINK" == x; then
21743          # This is not a symbolic link! We are done!
21744          break
21745        fi
21746        # Again resolve directory symlinks since the target of the just found
21747        # link could be in a different directory
21748        cd `$DIRNAME $ISLINK`
21749        sym_link_dir=`$THEPWDCMD -P`
21750        sym_link_file=`$BASENAME $ISLINK`
21751        let COUNTER=COUNTER+1
21752      done
21753      cd $STARTDIR
21754      BINARY=$sym_link_dir/$sym_link_file
21755    fi
21756  fi
21757
21758    BOOT_JDK=`dirname "$BINARY"`
21759    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21760    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21761      # Looks like we found ourselves an JDK
21762      BOOT_JDK_FOUND=maybe
21763      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21764$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21765    fi
21766  fi
21767
21768
21769    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21770    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21771      # Do we have a bin/java?
21772      if test ! -x "$BOOT_JDK/bin/java"; then
21773        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21775        BOOT_JDK_FOUND=no
21776      else
21777        # Do we have a bin/javac?
21778        if test ! -x "$BOOT_JDK/bin/javac"; then
21779          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21780$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21781          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21782$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21783          BOOT_JDK_FOUND=no
21784        else
21785          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21786          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21787            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21789            BOOT_JDK_FOUND=no
21790          else
21791            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21792            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21793
21794            # Extra M4 quote needed to protect [] in grep expression.
21795            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21796            if test "x$FOUND_CORRECT_VERSION" = x; then
21797              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21799              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21800$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21801              BOOT_JDK_FOUND=no
21802            else
21803              # We're done! :-)
21804              BOOT_JDK_FOUND=yes
21805
21806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21807
21808  # Input might be given as Windows format, start by converting to
21809  # unix format.
21810  path="$BOOT_JDK"
21811  new_path=`$CYGPATH -u "$path"`
21812
21813  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21814  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21815  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21816  # "foo.exe" is OK but "foo" is an error.
21817  #
21818  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21819  # It is also a way to make sure we got the proper file name for the real test later on.
21820  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21821  if test "x$test_shortpath" = x; then
21822    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21823$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21824    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21825  fi
21826
21827  # Call helper function which possibly converts this using DOS-style short mode.
21828  # If so, the updated path is stored in $new_path.
21829
21830  input_path="$new_path"
21831  # Check if we need to convert this using DOS-style short mode. If the path
21832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21833  # take no chances and rewrite it.
21834  # Note: m4 eats our [], so we need to use [ and ] instead.
21835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21836  if test "x$has_forbidden_chars" != x; then
21837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21841      # Going to short mode and back again did indeed matter. Since short mode is
21842      # case insensitive, let's make it lowercase to improve readability.
21843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21844      # Now convert it back to Unix-stile (cygpath)
21845      input_path=`$CYGPATH -u "$shortmode_path"`
21846      new_path="$input_path"
21847    fi
21848  fi
21849
21850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21851  if test "x$test_cygdrive_prefix" = x; then
21852    # As a simple fix, exclude /usr/bin since it's not a real path.
21853    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21855      # a path prefixed by /cygdrive for fixpath to work.
21856      new_path="$CYGWIN_ROOT_PATH$input_path"
21857    fi
21858  fi
21859
21860
21861  if test "x$path" != "x$new_path"; then
21862    BOOT_JDK="$new_path"
21863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21864$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21865  fi
21866
21867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21868
21869  path="$BOOT_JDK"
21870  has_colon=`$ECHO $path | $GREP ^.:`
21871  new_path="$path"
21872  if test "x$has_colon" = x; then
21873    # Not in mixed or Windows style, start by that.
21874    new_path=`cmd //c echo $path`
21875  fi
21876
21877
21878  input_path="$new_path"
21879  # Check if we need to convert this using DOS-style short mode. If the path
21880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21881  # take no chances and rewrite it.
21882  # Note: m4 eats our [], so we need to use [ and ] instead.
21883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21884  if test "x$has_forbidden_chars" != x; then
21885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21887  fi
21888
21889
21890  windows_path="$new_path"
21891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21892    unix_path=`$CYGPATH -u "$windows_path"`
21893    new_path="$unix_path"
21894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21896    new_path="$unix_path"
21897  fi
21898
21899  if test "x$path" != "x$new_path"; then
21900    BOOT_JDK="$new_path"
21901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21902$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21903  fi
21904
21905  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21906  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21907
21908  else
21909    # We're on a posix platform. Hooray! :)
21910    path="$BOOT_JDK"
21911    has_space=`$ECHO "$path" | $GREP " "`
21912    if test "x$has_space" != x; then
21913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21914$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21915      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21916    fi
21917
21918    # Use eval to expand a potential ~
21919    eval path="$path"
21920    if test ! -f "$path" && test ! -d "$path"; then
21921      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21922    fi
21923
21924    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21925  fi
21926
21927              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21928$as_echo_n "checking for Boot JDK... " >&6; }
21929              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21930$as_echo "$BOOT_JDK" >&6; }
21931              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21932$as_echo_n "checking Boot JDK version... " >&6; }
21933              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21934              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21935$as_echo "$BOOT_JDK_VERSION" >&6; }
21936            fi # end check jdk version
21937          fi # end check rt.jar
21938        fi # end check javac
21939      fi # end check java
21940    fi # end check boot jdk found
21941  fi
21942
21943
21944  # Test: Is there a JDK installed in default, well-known locations?
21945
21946  if test "x$BOOT_JDK_FOUND" = xno; then
21947    # Now execute the test
21948
21949  if test "x$OPENJDK_TARGET_OS" = xwindows; then
21950
21951  if test "x$BOOT_JDK_FOUND" = xno; then
21952    # Now execute the test
21953
21954  if test "x$ProgramW6432" != x; then
21955    VIRTUAL_DIR="$ProgramW6432/Java"
21956
21957  windows_path="$VIRTUAL_DIR"
21958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21959    unix_path=`$CYGPATH -u "$windows_path"`
21960    VIRTUAL_DIR="$unix_path"
21961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21963    VIRTUAL_DIR="$unix_path"
21964  fi
21965
21966
21967  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21968  BOOT_JDK_SUFFIX=""
21969  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21970  if test "x$ALL_JDKS_FOUND" != x; then
21971    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21972
21973  if test "x$BOOT_JDK_FOUND" = xno; then
21974    # Now execute the test
21975
21976        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21977        if test -d "$BOOT_JDK"; then
21978          BOOT_JDK_FOUND=maybe
21979          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21980$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21981        fi
21982
21983
21984    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21985    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21986      # Do we have a bin/java?
21987      if test ! -x "$BOOT_JDK/bin/java"; then
21988        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21989$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21990        BOOT_JDK_FOUND=no
21991      else
21992        # Do we have a bin/javac?
21993        if test ! -x "$BOOT_JDK/bin/javac"; then
21994          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21996          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21997$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21998          BOOT_JDK_FOUND=no
21999        else
22000          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22001          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22002            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22003$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22004            BOOT_JDK_FOUND=no
22005          else
22006            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22007            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22008
22009            # Extra M4 quote needed to protect [] in grep expression.
22010            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22011            if test "x$FOUND_CORRECT_VERSION" = x; then
22012              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22013$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22014              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22015$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22016              BOOT_JDK_FOUND=no
22017            else
22018              # We're done! :-)
22019              BOOT_JDK_FOUND=yes
22020
22021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22022
22023  # Input might be given as Windows format, start by converting to
22024  # unix format.
22025  path="$BOOT_JDK"
22026  new_path=`$CYGPATH -u "$path"`
22027
22028  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22029  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22030  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22031  # "foo.exe" is OK but "foo" is an error.
22032  #
22033  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22034  # It is also a way to make sure we got the proper file name for the real test later on.
22035  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22036  if test "x$test_shortpath" = x; then
22037    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22038$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22039    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22040  fi
22041
22042  # Call helper function which possibly converts this using DOS-style short mode.
22043  # If so, the updated path is stored in $new_path.
22044
22045  input_path="$new_path"
22046  # Check if we need to convert this using DOS-style short mode. If the path
22047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22048  # take no chances and rewrite it.
22049  # Note: m4 eats our [], so we need to use [ and ] instead.
22050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22051  if test "x$has_forbidden_chars" != x; then
22052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22056      # Going to short mode and back again did indeed matter. Since short mode is
22057      # case insensitive, let's make it lowercase to improve readability.
22058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22059      # Now convert it back to Unix-stile (cygpath)
22060      input_path=`$CYGPATH -u "$shortmode_path"`
22061      new_path="$input_path"
22062    fi
22063  fi
22064
22065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22066  if test "x$test_cygdrive_prefix" = x; then
22067    # As a simple fix, exclude /usr/bin since it's not a real path.
22068    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22070      # a path prefixed by /cygdrive for fixpath to work.
22071      new_path="$CYGWIN_ROOT_PATH$input_path"
22072    fi
22073  fi
22074
22075
22076  if test "x$path" != "x$new_path"; then
22077    BOOT_JDK="$new_path"
22078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22079$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22080  fi
22081
22082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22083
22084  path="$BOOT_JDK"
22085  has_colon=`$ECHO $path | $GREP ^.:`
22086  new_path="$path"
22087  if test "x$has_colon" = x; then
22088    # Not in mixed or Windows style, start by that.
22089    new_path=`cmd //c echo $path`
22090  fi
22091
22092
22093  input_path="$new_path"
22094  # Check if we need to convert this using DOS-style short mode. If the path
22095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22096  # take no chances and rewrite it.
22097  # Note: m4 eats our [], so we need to use [ and ] instead.
22098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22099  if test "x$has_forbidden_chars" != x; then
22100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22101    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22102  fi
22103
22104
22105  windows_path="$new_path"
22106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22107    unix_path=`$CYGPATH -u "$windows_path"`
22108    new_path="$unix_path"
22109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22111    new_path="$unix_path"
22112  fi
22113
22114  if test "x$path" != "x$new_path"; then
22115    BOOT_JDK="$new_path"
22116    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22117$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22118  fi
22119
22120  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22121  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22122
22123  else
22124    # We're on a posix platform. Hooray! :)
22125    path="$BOOT_JDK"
22126    has_space=`$ECHO "$path" | $GREP " "`
22127    if test "x$has_space" != x; then
22128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22129$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22130      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22131    fi
22132
22133    # Use eval to expand a potential ~
22134    eval path="$path"
22135    if test ! -f "$path" && test ! -d "$path"; then
22136      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22137    fi
22138
22139    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22140  fi
22141
22142              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22143$as_echo_n "checking for Boot JDK... " >&6; }
22144              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22145$as_echo "$BOOT_JDK" >&6; }
22146              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22147$as_echo_n "checking Boot JDK version... " >&6; }
22148              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22149              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22150$as_echo "$BOOT_JDK_VERSION" >&6; }
22151            fi # end check jdk version
22152          fi # end check rt.jar
22153        fi # end check javac
22154      fi # end check java
22155    fi # end check boot jdk found
22156  fi
22157
22158    done
22159  fi
22160
22161  fi
22162
22163
22164    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22165    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22166      # Do we have a bin/java?
22167      if test ! -x "$BOOT_JDK/bin/java"; then
22168        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22169$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22170        BOOT_JDK_FOUND=no
22171      else
22172        # Do we have a bin/javac?
22173        if test ! -x "$BOOT_JDK/bin/javac"; then
22174          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22175$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22176          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22177$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22178          BOOT_JDK_FOUND=no
22179        else
22180          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22181          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22182            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22183$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22184            BOOT_JDK_FOUND=no
22185          else
22186            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22187            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22188
22189            # Extra M4 quote needed to protect [] in grep expression.
22190            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22191            if test "x$FOUND_CORRECT_VERSION" = x; then
22192              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22193$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22194              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22195$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22196              BOOT_JDK_FOUND=no
22197            else
22198              # We're done! :-)
22199              BOOT_JDK_FOUND=yes
22200
22201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22202
22203  # Input might be given as Windows format, start by converting to
22204  # unix format.
22205  path="$BOOT_JDK"
22206  new_path=`$CYGPATH -u "$path"`
22207
22208  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22209  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22210  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22211  # "foo.exe" is OK but "foo" is an error.
22212  #
22213  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22214  # It is also a way to make sure we got the proper file name for the real test later on.
22215  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22216  if test "x$test_shortpath" = x; then
22217    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22218$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22219    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22220  fi
22221
22222  # Call helper function which possibly converts this using DOS-style short mode.
22223  # If so, the updated path is stored in $new_path.
22224
22225  input_path="$new_path"
22226  # Check if we need to convert this using DOS-style short mode. If the path
22227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22228  # take no chances and rewrite it.
22229  # Note: m4 eats our [], so we need to use [ and ] instead.
22230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22231  if test "x$has_forbidden_chars" != x; then
22232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22233    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22234    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22235    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22236      # Going to short mode and back again did indeed matter. Since short mode is
22237      # case insensitive, let's make it lowercase to improve readability.
22238      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22239      # Now convert it back to Unix-stile (cygpath)
22240      input_path=`$CYGPATH -u "$shortmode_path"`
22241      new_path="$input_path"
22242    fi
22243  fi
22244
22245  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22246  if test "x$test_cygdrive_prefix" = x; then
22247    # As a simple fix, exclude /usr/bin since it's not a real path.
22248    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22249      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22250      # a path prefixed by /cygdrive for fixpath to work.
22251      new_path="$CYGWIN_ROOT_PATH$input_path"
22252    fi
22253  fi
22254
22255
22256  if test "x$path" != "x$new_path"; then
22257    BOOT_JDK="$new_path"
22258    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22259$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22260  fi
22261
22262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22263
22264  path="$BOOT_JDK"
22265  has_colon=`$ECHO $path | $GREP ^.:`
22266  new_path="$path"
22267  if test "x$has_colon" = x; then
22268    # Not in mixed or Windows style, start by that.
22269    new_path=`cmd //c echo $path`
22270  fi
22271
22272
22273  input_path="$new_path"
22274  # Check if we need to convert this using DOS-style short mode. If the path
22275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22276  # take no chances and rewrite it.
22277  # Note: m4 eats our [], so we need to use [ and ] instead.
22278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22279  if test "x$has_forbidden_chars" != x; then
22280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22281    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22282  fi
22283
22284
22285  windows_path="$new_path"
22286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22287    unix_path=`$CYGPATH -u "$windows_path"`
22288    new_path="$unix_path"
22289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22291    new_path="$unix_path"
22292  fi
22293
22294  if test "x$path" != "x$new_path"; then
22295    BOOT_JDK="$new_path"
22296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22297$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22298  fi
22299
22300  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22301  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22302
22303  else
22304    # We're on a posix platform. Hooray! :)
22305    path="$BOOT_JDK"
22306    has_space=`$ECHO "$path" | $GREP " "`
22307    if test "x$has_space" != x; then
22308      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22309$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22310      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22311    fi
22312
22313    # Use eval to expand a potential ~
22314    eval path="$path"
22315    if test ! -f "$path" && test ! -d "$path"; then
22316      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22317    fi
22318
22319    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22320  fi
22321
22322              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22323$as_echo_n "checking for Boot JDK... " >&6; }
22324              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22325$as_echo "$BOOT_JDK" >&6; }
22326              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22327$as_echo_n "checking Boot JDK version... " >&6; }
22328              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22329              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22330$as_echo "$BOOT_JDK_VERSION" >&6; }
22331            fi # end check jdk version
22332          fi # end check rt.jar
22333        fi # end check javac
22334      fi # end check java
22335    fi # end check boot jdk found
22336  fi
22337
22338
22339  if test "x$BOOT_JDK_FOUND" = xno; then
22340    # Now execute the test
22341
22342  if test "x$PROGRAMW6432" != x; then
22343    VIRTUAL_DIR="$PROGRAMW6432/Java"
22344
22345  windows_path="$VIRTUAL_DIR"
22346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22347    unix_path=`$CYGPATH -u "$windows_path"`
22348    VIRTUAL_DIR="$unix_path"
22349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22351    VIRTUAL_DIR="$unix_path"
22352  fi
22353
22354
22355  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22356  BOOT_JDK_SUFFIX=""
22357  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22358  if test "x$ALL_JDKS_FOUND" != x; then
22359    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22360
22361  if test "x$BOOT_JDK_FOUND" = xno; then
22362    # Now execute the test
22363
22364        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22365        if test -d "$BOOT_JDK"; then
22366          BOOT_JDK_FOUND=maybe
22367          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22368$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22369        fi
22370
22371
22372    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22373    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22374      # Do we have a bin/java?
22375      if test ! -x "$BOOT_JDK/bin/java"; then
22376        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22378        BOOT_JDK_FOUND=no
22379      else
22380        # Do we have a bin/javac?
22381        if test ! -x "$BOOT_JDK/bin/javac"; then
22382          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22383$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22384          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22385$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22386          BOOT_JDK_FOUND=no
22387        else
22388          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22389          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22390            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22391$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22392            BOOT_JDK_FOUND=no
22393          else
22394            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22395            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22396
22397            # Extra M4 quote needed to protect [] in grep expression.
22398            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22399            if test "x$FOUND_CORRECT_VERSION" = x; then
22400              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22401$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22402              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22403$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22404              BOOT_JDK_FOUND=no
22405            else
22406              # We're done! :-)
22407              BOOT_JDK_FOUND=yes
22408
22409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22410
22411  # Input might be given as Windows format, start by converting to
22412  # unix format.
22413  path="$BOOT_JDK"
22414  new_path=`$CYGPATH -u "$path"`
22415
22416  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22417  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22418  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22419  # "foo.exe" is OK but "foo" is an error.
22420  #
22421  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22422  # It is also a way to make sure we got the proper file name for the real test later on.
22423  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22424  if test "x$test_shortpath" = x; then
22425    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22426$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22427    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22428  fi
22429
22430  # Call helper function which possibly converts this using DOS-style short mode.
22431  # If so, the updated path is stored in $new_path.
22432
22433  input_path="$new_path"
22434  # Check if we need to convert this using DOS-style short mode. If the path
22435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22436  # take no chances and rewrite it.
22437  # Note: m4 eats our [], so we need to use [ and ] instead.
22438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22439  if test "x$has_forbidden_chars" != x; then
22440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22444      # Going to short mode and back again did indeed matter. Since short mode is
22445      # case insensitive, let's make it lowercase to improve readability.
22446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22447      # Now convert it back to Unix-stile (cygpath)
22448      input_path=`$CYGPATH -u "$shortmode_path"`
22449      new_path="$input_path"
22450    fi
22451  fi
22452
22453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22454  if test "x$test_cygdrive_prefix" = x; then
22455    # As a simple fix, exclude /usr/bin since it's not a real path.
22456    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22458      # a path prefixed by /cygdrive for fixpath to work.
22459      new_path="$CYGWIN_ROOT_PATH$input_path"
22460    fi
22461  fi
22462
22463
22464  if test "x$path" != "x$new_path"; then
22465    BOOT_JDK="$new_path"
22466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22467$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22468  fi
22469
22470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22471
22472  path="$BOOT_JDK"
22473  has_colon=`$ECHO $path | $GREP ^.:`
22474  new_path="$path"
22475  if test "x$has_colon" = x; then
22476    # Not in mixed or Windows style, start by that.
22477    new_path=`cmd //c echo $path`
22478  fi
22479
22480
22481  input_path="$new_path"
22482  # Check if we need to convert this using DOS-style short mode. If the path
22483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22484  # take no chances and rewrite it.
22485  # Note: m4 eats our [], so we need to use [ and ] instead.
22486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22487  if test "x$has_forbidden_chars" != x; then
22488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22490  fi
22491
22492
22493  windows_path="$new_path"
22494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22495    unix_path=`$CYGPATH -u "$windows_path"`
22496    new_path="$unix_path"
22497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22499    new_path="$unix_path"
22500  fi
22501
22502  if test "x$path" != "x$new_path"; then
22503    BOOT_JDK="$new_path"
22504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22505$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22506  fi
22507
22508  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22509  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22510
22511  else
22512    # We're on a posix platform. Hooray! :)
22513    path="$BOOT_JDK"
22514    has_space=`$ECHO "$path" | $GREP " "`
22515    if test "x$has_space" != x; then
22516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22517$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22518      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22519    fi
22520
22521    # Use eval to expand a potential ~
22522    eval path="$path"
22523    if test ! -f "$path" && test ! -d "$path"; then
22524      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22525    fi
22526
22527    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22528  fi
22529
22530              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22531$as_echo_n "checking for Boot JDK... " >&6; }
22532              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22533$as_echo "$BOOT_JDK" >&6; }
22534              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22535$as_echo_n "checking Boot JDK version... " >&6; }
22536              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22537              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22538$as_echo "$BOOT_JDK_VERSION" >&6; }
22539            fi # end check jdk version
22540          fi # end check rt.jar
22541        fi # end check javac
22542      fi # end check java
22543    fi # end check boot jdk found
22544  fi
22545
22546    done
22547  fi
22548
22549  fi
22550
22551
22552    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22553    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22554      # Do we have a bin/java?
22555      if test ! -x "$BOOT_JDK/bin/java"; then
22556        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22557$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22558        BOOT_JDK_FOUND=no
22559      else
22560        # Do we have a bin/javac?
22561        if test ! -x "$BOOT_JDK/bin/javac"; then
22562          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22563$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22564          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22565$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22566          BOOT_JDK_FOUND=no
22567        else
22568          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22569          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22570            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22571$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22572            BOOT_JDK_FOUND=no
22573          else
22574            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22575            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22576
22577            # Extra M4 quote needed to protect [] in grep expression.
22578            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22579            if test "x$FOUND_CORRECT_VERSION" = x; then
22580              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22581$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22582              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22583$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22584              BOOT_JDK_FOUND=no
22585            else
22586              # We're done! :-)
22587              BOOT_JDK_FOUND=yes
22588
22589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22590
22591  # Input might be given as Windows format, start by converting to
22592  # unix format.
22593  path="$BOOT_JDK"
22594  new_path=`$CYGPATH -u "$path"`
22595
22596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22599  # "foo.exe" is OK but "foo" is an error.
22600  #
22601  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22602  # It is also a way to make sure we got the proper file name for the real test later on.
22603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22604  if test "x$test_shortpath" = x; then
22605    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22606$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22607    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22608  fi
22609
22610  # Call helper function which possibly converts this using DOS-style short mode.
22611  # If so, the updated path is stored in $new_path.
22612
22613  input_path="$new_path"
22614  # Check if we need to convert this using DOS-style short mode. If the path
22615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22616  # take no chances and rewrite it.
22617  # Note: m4 eats our [], so we need to use [ and ] instead.
22618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22619  if test "x$has_forbidden_chars" != x; then
22620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22624      # Going to short mode and back again did indeed matter. Since short mode is
22625      # case insensitive, let's make it lowercase to improve readability.
22626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22627      # Now convert it back to Unix-stile (cygpath)
22628      input_path=`$CYGPATH -u "$shortmode_path"`
22629      new_path="$input_path"
22630    fi
22631  fi
22632
22633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22634  if test "x$test_cygdrive_prefix" = x; then
22635    # As a simple fix, exclude /usr/bin since it's not a real path.
22636    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22638      # a path prefixed by /cygdrive for fixpath to work.
22639      new_path="$CYGWIN_ROOT_PATH$input_path"
22640    fi
22641  fi
22642
22643
22644  if test "x$path" != "x$new_path"; then
22645    BOOT_JDK="$new_path"
22646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22647$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22648  fi
22649
22650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22651
22652  path="$BOOT_JDK"
22653  has_colon=`$ECHO $path | $GREP ^.:`
22654  new_path="$path"
22655  if test "x$has_colon" = x; then
22656    # Not in mixed or Windows style, start by that.
22657    new_path=`cmd //c echo $path`
22658  fi
22659
22660
22661  input_path="$new_path"
22662  # Check if we need to convert this using DOS-style short mode. If the path
22663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22664  # take no chances and rewrite it.
22665  # Note: m4 eats our [], so we need to use [ and ] instead.
22666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22667  if test "x$has_forbidden_chars" != x; then
22668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22669    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22670  fi
22671
22672
22673  windows_path="$new_path"
22674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22675    unix_path=`$CYGPATH -u "$windows_path"`
22676    new_path="$unix_path"
22677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22679    new_path="$unix_path"
22680  fi
22681
22682  if test "x$path" != "x$new_path"; then
22683    BOOT_JDK="$new_path"
22684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22685$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22686  fi
22687
22688  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22689  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22690
22691  else
22692    # We're on a posix platform. Hooray! :)
22693    path="$BOOT_JDK"
22694    has_space=`$ECHO "$path" | $GREP " "`
22695    if test "x$has_space" != x; then
22696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22697$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22698      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22699    fi
22700
22701    # Use eval to expand a potential ~
22702    eval path="$path"
22703    if test ! -f "$path" && test ! -d "$path"; then
22704      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22705    fi
22706
22707    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22708  fi
22709
22710              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22711$as_echo_n "checking for Boot JDK... " >&6; }
22712              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22713$as_echo "$BOOT_JDK" >&6; }
22714              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22715$as_echo_n "checking Boot JDK version... " >&6; }
22716              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22717              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22718$as_echo "$BOOT_JDK_VERSION" >&6; }
22719            fi # end check jdk version
22720          fi # end check rt.jar
22721        fi # end check javac
22722      fi # end check java
22723    fi # end check boot jdk found
22724  fi
22725
22726
22727  if test "x$BOOT_JDK_FOUND" = xno; then
22728    # Now execute the test
22729
22730  if test "x$PROGRAMFILES" != x; then
22731    VIRTUAL_DIR="$PROGRAMFILES/Java"
22732
22733  windows_path="$VIRTUAL_DIR"
22734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22735    unix_path=`$CYGPATH -u "$windows_path"`
22736    VIRTUAL_DIR="$unix_path"
22737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22739    VIRTUAL_DIR="$unix_path"
22740  fi
22741
22742
22743  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22744  BOOT_JDK_SUFFIX=""
22745  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22746  if test "x$ALL_JDKS_FOUND" != x; then
22747    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22748
22749  if test "x$BOOT_JDK_FOUND" = xno; then
22750    # Now execute the test
22751
22752        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22753        if test -d "$BOOT_JDK"; then
22754          BOOT_JDK_FOUND=maybe
22755          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22756$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22757        fi
22758
22759
22760    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22761    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22762      # Do we have a bin/java?
22763      if test ! -x "$BOOT_JDK/bin/java"; then
22764        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22766        BOOT_JDK_FOUND=no
22767      else
22768        # Do we have a bin/javac?
22769        if test ! -x "$BOOT_JDK/bin/javac"; then
22770          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22772          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22773$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22774          BOOT_JDK_FOUND=no
22775        else
22776          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22777          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22778            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22779$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22780            BOOT_JDK_FOUND=no
22781          else
22782            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22783            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22784
22785            # Extra M4 quote needed to protect [] in grep expression.
22786            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22787            if test "x$FOUND_CORRECT_VERSION" = x; then
22788              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22790              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22791$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22792              BOOT_JDK_FOUND=no
22793            else
22794              # We're done! :-)
22795              BOOT_JDK_FOUND=yes
22796
22797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22798
22799  # Input might be given as Windows format, start by converting to
22800  # unix format.
22801  path="$BOOT_JDK"
22802  new_path=`$CYGPATH -u "$path"`
22803
22804  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22805  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22806  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22807  # "foo.exe" is OK but "foo" is an error.
22808  #
22809  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22810  # It is also a way to make sure we got the proper file name for the real test later on.
22811  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22812  if test "x$test_shortpath" = x; then
22813    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22814$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22815    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22816  fi
22817
22818  # Call helper function which possibly converts this using DOS-style short mode.
22819  # If so, the updated path is stored in $new_path.
22820
22821  input_path="$new_path"
22822  # Check if we need to convert this using DOS-style short mode. If the path
22823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22824  # take no chances and rewrite it.
22825  # Note: m4 eats our [], so we need to use [ and ] instead.
22826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22827  if test "x$has_forbidden_chars" != x; then
22828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22829    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22830    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22831    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22832      # Going to short mode and back again did indeed matter. Since short mode is
22833      # case insensitive, let's make it lowercase to improve readability.
22834      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22835      # Now convert it back to Unix-stile (cygpath)
22836      input_path=`$CYGPATH -u "$shortmode_path"`
22837      new_path="$input_path"
22838    fi
22839  fi
22840
22841  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22842  if test "x$test_cygdrive_prefix" = x; then
22843    # As a simple fix, exclude /usr/bin since it's not a real path.
22844    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22845      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22846      # a path prefixed by /cygdrive for fixpath to work.
22847      new_path="$CYGWIN_ROOT_PATH$input_path"
22848    fi
22849  fi
22850
22851
22852  if test "x$path" != "x$new_path"; then
22853    BOOT_JDK="$new_path"
22854    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22855$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22856  fi
22857
22858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22859
22860  path="$BOOT_JDK"
22861  has_colon=`$ECHO $path | $GREP ^.:`
22862  new_path="$path"
22863  if test "x$has_colon" = x; then
22864    # Not in mixed or Windows style, start by that.
22865    new_path=`cmd //c echo $path`
22866  fi
22867
22868
22869  input_path="$new_path"
22870  # Check if we need to convert this using DOS-style short mode. If the path
22871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22872  # take no chances and rewrite it.
22873  # Note: m4 eats our [], so we need to use [ and ] instead.
22874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22875  if test "x$has_forbidden_chars" != x; then
22876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22877    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22878  fi
22879
22880
22881  windows_path="$new_path"
22882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22883    unix_path=`$CYGPATH -u "$windows_path"`
22884    new_path="$unix_path"
22885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22887    new_path="$unix_path"
22888  fi
22889
22890  if test "x$path" != "x$new_path"; then
22891    BOOT_JDK="$new_path"
22892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22893$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22894  fi
22895
22896  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22897  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22898
22899  else
22900    # We're on a posix platform. Hooray! :)
22901    path="$BOOT_JDK"
22902    has_space=`$ECHO "$path" | $GREP " "`
22903    if test "x$has_space" != x; then
22904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22905$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22906      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22907    fi
22908
22909    # Use eval to expand a potential ~
22910    eval path="$path"
22911    if test ! -f "$path" && test ! -d "$path"; then
22912      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22913    fi
22914
22915    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22916  fi
22917
22918              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22919$as_echo_n "checking for Boot JDK... " >&6; }
22920              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22921$as_echo "$BOOT_JDK" >&6; }
22922              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22923$as_echo_n "checking Boot JDK version... " >&6; }
22924              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22925              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22926$as_echo "$BOOT_JDK_VERSION" >&6; }
22927            fi # end check jdk version
22928          fi # end check rt.jar
22929        fi # end check javac
22930      fi # end check java
22931    fi # end check boot jdk found
22932  fi
22933
22934    done
22935  fi
22936
22937  fi
22938
22939
22940    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22941    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22942      # Do we have a bin/java?
22943      if test ! -x "$BOOT_JDK/bin/java"; then
22944        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22945$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22946        BOOT_JDK_FOUND=no
22947      else
22948        # Do we have a bin/javac?
22949        if test ! -x "$BOOT_JDK/bin/javac"; then
22950          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22951$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22952          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22953$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22954          BOOT_JDK_FOUND=no
22955        else
22956          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22957          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22958            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22959$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22960            BOOT_JDK_FOUND=no
22961          else
22962            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22963            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22964
22965            # Extra M4 quote needed to protect [] in grep expression.
22966            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22967            if test "x$FOUND_CORRECT_VERSION" = x; then
22968              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22969$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22970              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22971$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22972              BOOT_JDK_FOUND=no
22973            else
22974              # We're done! :-)
22975              BOOT_JDK_FOUND=yes
22976
22977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22978
22979  # Input might be given as Windows format, start by converting to
22980  # unix format.
22981  path="$BOOT_JDK"
22982  new_path=`$CYGPATH -u "$path"`
22983
22984  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22985  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22986  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22987  # "foo.exe" is OK but "foo" is an error.
22988  #
22989  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22990  # It is also a way to make sure we got the proper file name for the real test later on.
22991  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22992  if test "x$test_shortpath" = x; then
22993    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22994$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22995    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22996  fi
22997
22998  # Call helper function which possibly converts this using DOS-style short mode.
22999  # If so, the updated path is stored in $new_path.
23000
23001  input_path="$new_path"
23002  # Check if we need to convert this using DOS-style short mode. If the path
23003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23004  # take no chances and rewrite it.
23005  # Note: m4 eats our [], so we need to use [ and ] instead.
23006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23007  if test "x$has_forbidden_chars" != x; then
23008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23009    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23010    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23011    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23012      # Going to short mode and back again did indeed matter. Since short mode is
23013      # case insensitive, let's make it lowercase to improve readability.
23014      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23015      # Now convert it back to Unix-stile (cygpath)
23016      input_path=`$CYGPATH -u "$shortmode_path"`
23017      new_path="$input_path"
23018    fi
23019  fi
23020
23021  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23022  if test "x$test_cygdrive_prefix" = x; then
23023    # As a simple fix, exclude /usr/bin since it's not a real path.
23024    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23025      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23026      # a path prefixed by /cygdrive for fixpath to work.
23027      new_path="$CYGWIN_ROOT_PATH$input_path"
23028    fi
23029  fi
23030
23031
23032  if test "x$path" != "x$new_path"; then
23033    BOOT_JDK="$new_path"
23034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23035$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23036  fi
23037
23038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23039
23040  path="$BOOT_JDK"
23041  has_colon=`$ECHO $path | $GREP ^.:`
23042  new_path="$path"
23043  if test "x$has_colon" = x; then
23044    # Not in mixed or Windows style, start by that.
23045    new_path=`cmd //c echo $path`
23046  fi
23047
23048
23049  input_path="$new_path"
23050  # Check if we need to convert this using DOS-style short mode. If the path
23051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23052  # take no chances and rewrite it.
23053  # Note: m4 eats our [], so we need to use [ and ] instead.
23054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23055  if test "x$has_forbidden_chars" != x; then
23056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23057    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23058  fi
23059
23060
23061  windows_path="$new_path"
23062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23063    unix_path=`$CYGPATH -u "$windows_path"`
23064    new_path="$unix_path"
23065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23067    new_path="$unix_path"
23068  fi
23069
23070  if test "x$path" != "x$new_path"; then
23071    BOOT_JDK="$new_path"
23072    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23073$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23074  fi
23075
23076  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23077  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23078
23079  else
23080    # We're on a posix platform. Hooray! :)
23081    path="$BOOT_JDK"
23082    has_space=`$ECHO "$path" | $GREP " "`
23083    if test "x$has_space" != x; then
23084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23085$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23086      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23087    fi
23088
23089    # Use eval to expand a potential ~
23090    eval path="$path"
23091    if test ! -f "$path" && test ! -d "$path"; then
23092      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23093    fi
23094
23095    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23096  fi
23097
23098              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23099$as_echo_n "checking for Boot JDK... " >&6; }
23100              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23101$as_echo "$BOOT_JDK" >&6; }
23102              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23103$as_echo_n "checking Boot JDK version... " >&6; }
23104              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23105              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23106$as_echo "$BOOT_JDK_VERSION" >&6; }
23107            fi # end check jdk version
23108          fi # end check rt.jar
23109        fi # end check javac
23110      fi # end check java
23111    fi # end check boot jdk found
23112  fi
23113
23114
23115  if test "x$BOOT_JDK_FOUND" = xno; then
23116    # Now execute the test
23117
23118  if test "x$ProgramFiles" != x; then
23119    VIRTUAL_DIR="$ProgramFiles/Java"
23120
23121  windows_path="$VIRTUAL_DIR"
23122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23123    unix_path=`$CYGPATH -u "$windows_path"`
23124    VIRTUAL_DIR="$unix_path"
23125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23127    VIRTUAL_DIR="$unix_path"
23128  fi
23129
23130
23131  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23132  BOOT_JDK_SUFFIX=""
23133  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23134  if test "x$ALL_JDKS_FOUND" != x; then
23135    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23136
23137  if test "x$BOOT_JDK_FOUND" = xno; then
23138    # Now execute the test
23139
23140        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23141        if test -d "$BOOT_JDK"; then
23142          BOOT_JDK_FOUND=maybe
23143          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23144$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23145        fi
23146
23147
23148    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23149    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23150      # Do we have a bin/java?
23151      if test ! -x "$BOOT_JDK/bin/java"; then
23152        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23154        BOOT_JDK_FOUND=no
23155      else
23156        # Do we have a bin/javac?
23157        if test ! -x "$BOOT_JDK/bin/javac"; then
23158          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23159$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23160          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23161$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23162          BOOT_JDK_FOUND=no
23163        else
23164          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23165          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23166            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23167$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23168            BOOT_JDK_FOUND=no
23169          else
23170            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23171            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23172
23173            # Extra M4 quote needed to protect [] in grep expression.
23174            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23175            if test "x$FOUND_CORRECT_VERSION" = x; then
23176              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23177$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23178              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23179$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23180              BOOT_JDK_FOUND=no
23181            else
23182              # We're done! :-)
23183              BOOT_JDK_FOUND=yes
23184
23185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23186
23187  # Input might be given as Windows format, start by converting to
23188  # unix format.
23189  path="$BOOT_JDK"
23190  new_path=`$CYGPATH -u "$path"`
23191
23192  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23193  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23194  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23195  # "foo.exe" is OK but "foo" is an error.
23196  #
23197  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23198  # It is also a way to make sure we got the proper file name for the real test later on.
23199  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23200  if test "x$test_shortpath" = x; then
23201    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23202$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23203    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23204  fi
23205
23206  # Call helper function which possibly converts this using DOS-style short mode.
23207  # If so, the updated path is stored in $new_path.
23208
23209  input_path="$new_path"
23210  # Check if we need to convert this using DOS-style short mode. If the path
23211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23212  # take no chances and rewrite it.
23213  # Note: m4 eats our [], so we need to use [ and ] instead.
23214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23215  if test "x$has_forbidden_chars" != x; then
23216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23217    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23218    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23219    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23220      # Going to short mode and back again did indeed matter. Since short mode is
23221      # case insensitive, let's make it lowercase to improve readability.
23222      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23223      # Now convert it back to Unix-stile (cygpath)
23224      input_path=`$CYGPATH -u "$shortmode_path"`
23225      new_path="$input_path"
23226    fi
23227  fi
23228
23229  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23230  if test "x$test_cygdrive_prefix" = x; then
23231    # As a simple fix, exclude /usr/bin since it's not a real path.
23232    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23233      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23234      # a path prefixed by /cygdrive for fixpath to work.
23235      new_path="$CYGWIN_ROOT_PATH$input_path"
23236    fi
23237  fi
23238
23239
23240  if test "x$path" != "x$new_path"; then
23241    BOOT_JDK="$new_path"
23242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23243$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23244  fi
23245
23246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23247
23248  path="$BOOT_JDK"
23249  has_colon=`$ECHO $path | $GREP ^.:`
23250  new_path="$path"
23251  if test "x$has_colon" = x; then
23252    # Not in mixed or Windows style, start by that.
23253    new_path=`cmd //c echo $path`
23254  fi
23255
23256
23257  input_path="$new_path"
23258  # Check if we need to convert this using DOS-style short mode. If the path
23259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23260  # take no chances and rewrite it.
23261  # Note: m4 eats our [], so we need to use [ and ] instead.
23262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23263  if test "x$has_forbidden_chars" != x; then
23264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23265    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23266  fi
23267
23268
23269  windows_path="$new_path"
23270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23271    unix_path=`$CYGPATH -u "$windows_path"`
23272    new_path="$unix_path"
23273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23275    new_path="$unix_path"
23276  fi
23277
23278  if test "x$path" != "x$new_path"; then
23279    BOOT_JDK="$new_path"
23280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23281$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23282  fi
23283
23284  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23285  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23286
23287  else
23288    # We're on a posix platform. Hooray! :)
23289    path="$BOOT_JDK"
23290    has_space=`$ECHO "$path" | $GREP " "`
23291    if test "x$has_space" != x; then
23292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23293$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23294      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23295    fi
23296
23297    # Use eval to expand a potential ~
23298    eval path="$path"
23299    if test ! -f "$path" && test ! -d "$path"; then
23300      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23301    fi
23302
23303    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23304  fi
23305
23306              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23307$as_echo_n "checking for Boot JDK... " >&6; }
23308              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23309$as_echo "$BOOT_JDK" >&6; }
23310              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23311$as_echo_n "checking Boot JDK version... " >&6; }
23312              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23313              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23314$as_echo "$BOOT_JDK_VERSION" >&6; }
23315            fi # end check jdk version
23316          fi # end check rt.jar
23317        fi # end check javac
23318      fi # end check java
23319    fi # end check boot jdk found
23320  fi
23321
23322    done
23323  fi
23324
23325  fi
23326
23327
23328    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23329    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23330      # Do we have a bin/java?
23331      if test ! -x "$BOOT_JDK/bin/java"; then
23332        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23333$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23334        BOOT_JDK_FOUND=no
23335      else
23336        # Do we have a bin/javac?
23337        if test ! -x "$BOOT_JDK/bin/javac"; then
23338          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23339$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23340          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23341$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23342          BOOT_JDK_FOUND=no
23343        else
23344          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23345          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23346            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23347$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23348            BOOT_JDK_FOUND=no
23349          else
23350            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23351            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23352
23353            # Extra M4 quote needed to protect [] in grep expression.
23354            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23355            if test "x$FOUND_CORRECT_VERSION" = x; then
23356              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23357$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23358              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23359$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23360              BOOT_JDK_FOUND=no
23361            else
23362              # We're done! :-)
23363              BOOT_JDK_FOUND=yes
23364
23365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23366
23367  # Input might be given as Windows format, start by converting to
23368  # unix format.
23369  path="$BOOT_JDK"
23370  new_path=`$CYGPATH -u "$path"`
23371
23372  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23373  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23374  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23375  # "foo.exe" is OK but "foo" is an error.
23376  #
23377  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23378  # It is also a way to make sure we got the proper file name for the real test later on.
23379  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23380  if test "x$test_shortpath" = x; then
23381    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23382$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23383    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23384  fi
23385
23386  # Call helper function which possibly converts this using DOS-style short mode.
23387  # If so, the updated path is stored in $new_path.
23388
23389  input_path="$new_path"
23390  # Check if we need to convert this using DOS-style short mode. If the path
23391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23392  # take no chances and rewrite it.
23393  # Note: m4 eats our [], so we need to use [ and ] instead.
23394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23395  if test "x$has_forbidden_chars" != x; then
23396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23397    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23398    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23399    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23400      # Going to short mode and back again did indeed matter. Since short mode is
23401      # case insensitive, let's make it lowercase to improve readability.
23402      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23403      # Now convert it back to Unix-stile (cygpath)
23404      input_path=`$CYGPATH -u "$shortmode_path"`
23405      new_path="$input_path"
23406    fi
23407  fi
23408
23409  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23410  if test "x$test_cygdrive_prefix" = x; then
23411    # As a simple fix, exclude /usr/bin since it's not a real path.
23412    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23413      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23414      # a path prefixed by /cygdrive for fixpath to work.
23415      new_path="$CYGWIN_ROOT_PATH$input_path"
23416    fi
23417  fi
23418
23419
23420  if test "x$path" != "x$new_path"; then
23421    BOOT_JDK="$new_path"
23422    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23423$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23424  fi
23425
23426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23427
23428  path="$BOOT_JDK"
23429  has_colon=`$ECHO $path | $GREP ^.:`
23430  new_path="$path"
23431  if test "x$has_colon" = x; then
23432    # Not in mixed or Windows style, start by that.
23433    new_path=`cmd //c echo $path`
23434  fi
23435
23436
23437  input_path="$new_path"
23438  # Check if we need to convert this using DOS-style short mode. If the path
23439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23440  # take no chances and rewrite it.
23441  # Note: m4 eats our [], so we need to use [ and ] instead.
23442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23443  if test "x$has_forbidden_chars" != x; then
23444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23446  fi
23447
23448
23449  windows_path="$new_path"
23450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23451    unix_path=`$CYGPATH -u "$windows_path"`
23452    new_path="$unix_path"
23453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23455    new_path="$unix_path"
23456  fi
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  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23465  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23466
23467  else
23468    # We're on a posix platform. Hooray! :)
23469    path="$BOOT_JDK"
23470    has_space=`$ECHO "$path" | $GREP " "`
23471    if test "x$has_space" != x; then
23472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23473$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23474      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23475    fi
23476
23477    # Use eval to expand a potential ~
23478    eval path="$path"
23479    if test ! -f "$path" && test ! -d "$path"; then
23480      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23481    fi
23482
23483    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23484  fi
23485
23486              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23487$as_echo_n "checking for Boot JDK... " >&6; }
23488              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23489$as_echo "$BOOT_JDK" >&6; }
23490              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23491$as_echo_n "checking Boot JDK version... " >&6; }
23492              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23493              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23494$as_echo "$BOOT_JDK_VERSION" >&6; }
23495            fi # end check jdk version
23496          fi # end check rt.jar
23497        fi # end check javac
23498      fi # end check java
23499    fi # end check boot jdk found
23500  fi
23501
23502
23503  if test "x$BOOT_JDK_FOUND" = xno; then
23504    # Now execute the test
23505
23506  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23507  BOOT_JDK_SUFFIX=""
23508  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23509  if test "x$ALL_JDKS_FOUND" != x; then
23510    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23511
23512  if test "x$BOOT_JDK_FOUND" = xno; then
23513    # Now execute the test
23514
23515        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23516        if test -d "$BOOT_JDK"; then
23517          BOOT_JDK_FOUND=maybe
23518          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23519$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23520        fi
23521
23522
23523    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23524    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23525      # Do we have a bin/java?
23526      if test ! -x "$BOOT_JDK/bin/java"; then
23527        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23529        BOOT_JDK_FOUND=no
23530      else
23531        # Do we have a bin/javac?
23532        if test ! -x "$BOOT_JDK/bin/javac"; then
23533          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23534$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23535          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23536$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23537          BOOT_JDK_FOUND=no
23538        else
23539          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23540          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23541            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23542$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23543            BOOT_JDK_FOUND=no
23544          else
23545            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23546            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23547
23548            # Extra M4 quote needed to protect [] in grep expression.
23549            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23550            if test "x$FOUND_CORRECT_VERSION" = x; then
23551              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23552$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23553              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23554$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23555              BOOT_JDK_FOUND=no
23556            else
23557              # We're done! :-)
23558              BOOT_JDK_FOUND=yes
23559
23560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23561
23562  # Input might be given as Windows format, start by converting to
23563  # unix format.
23564  path="$BOOT_JDK"
23565  new_path=`$CYGPATH -u "$path"`
23566
23567  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23568  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23569  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23570  # "foo.exe" is OK but "foo" is an error.
23571  #
23572  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23573  # It is also a way to make sure we got the proper file name for the real test later on.
23574  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23575  if test "x$test_shortpath" = x; then
23576    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23577$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23578    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23579  fi
23580
23581  # Call helper function which possibly converts this using DOS-style short mode.
23582  # If so, the updated path is stored in $new_path.
23583
23584  input_path="$new_path"
23585  # Check if we need to convert this using DOS-style short mode. If the path
23586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23587  # take no chances and rewrite it.
23588  # Note: m4 eats our [], so we need to use [ and ] instead.
23589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23590  if test "x$has_forbidden_chars" != x; then
23591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23592    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23593    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23594    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23595      # Going to short mode and back again did indeed matter. Since short mode is
23596      # case insensitive, let's make it lowercase to improve readability.
23597      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23598      # Now convert it back to Unix-stile (cygpath)
23599      input_path=`$CYGPATH -u "$shortmode_path"`
23600      new_path="$input_path"
23601    fi
23602  fi
23603
23604  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23605  if test "x$test_cygdrive_prefix" = x; then
23606    # As a simple fix, exclude /usr/bin since it's not a real path.
23607    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23608      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23609      # a path prefixed by /cygdrive for fixpath to work.
23610      new_path="$CYGWIN_ROOT_PATH$input_path"
23611    fi
23612  fi
23613
23614
23615  if test "x$path" != "x$new_path"; then
23616    BOOT_JDK="$new_path"
23617    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23618$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23619  fi
23620
23621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23622
23623  path="$BOOT_JDK"
23624  has_colon=`$ECHO $path | $GREP ^.:`
23625  new_path="$path"
23626  if test "x$has_colon" = x; then
23627    # Not in mixed or Windows style, start by that.
23628    new_path=`cmd //c echo $path`
23629  fi
23630
23631
23632  input_path="$new_path"
23633  # Check if we need to convert this using DOS-style short mode. If the path
23634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23635  # take no chances and rewrite it.
23636  # Note: m4 eats our [], so we need to use [ and ] instead.
23637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23638  if test "x$has_forbidden_chars" != x; then
23639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23640    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23641  fi
23642
23643
23644  windows_path="$new_path"
23645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23646    unix_path=`$CYGPATH -u "$windows_path"`
23647    new_path="$unix_path"
23648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23650    new_path="$unix_path"
23651  fi
23652
23653  if test "x$path" != "x$new_path"; then
23654    BOOT_JDK="$new_path"
23655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23656$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23657  fi
23658
23659  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23660  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23661
23662  else
23663    # We're on a posix platform. Hooray! :)
23664    path="$BOOT_JDK"
23665    has_space=`$ECHO "$path" | $GREP " "`
23666    if test "x$has_space" != x; then
23667      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23668$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23669      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23670    fi
23671
23672    # Use eval to expand a potential ~
23673    eval path="$path"
23674    if test ! -f "$path" && test ! -d "$path"; then
23675      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23676    fi
23677
23678    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23679  fi
23680
23681              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23682$as_echo_n "checking for Boot JDK... " >&6; }
23683              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23684$as_echo "$BOOT_JDK" >&6; }
23685              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23686$as_echo_n "checking Boot JDK version... " >&6; }
23687              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23688              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23689$as_echo "$BOOT_JDK_VERSION" >&6; }
23690            fi # end check jdk version
23691          fi # end check rt.jar
23692        fi # end check javac
23693      fi # end check java
23694    fi # end check boot jdk found
23695  fi
23696
23697    done
23698  fi
23699
23700
23701    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23702    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23703      # Do we have a bin/java?
23704      if test ! -x "$BOOT_JDK/bin/java"; then
23705        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23706$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23707        BOOT_JDK_FOUND=no
23708      else
23709        # Do we have a bin/javac?
23710        if test ! -x "$BOOT_JDK/bin/javac"; then
23711          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23712$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23713          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23714$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23715          BOOT_JDK_FOUND=no
23716        else
23717          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23718          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23719            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23720$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23721            BOOT_JDK_FOUND=no
23722          else
23723            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23724            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23725
23726            # Extra M4 quote needed to protect [] in grep expression.
23727            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23728            if test "x$FOUND_CORRECT_VERSION" = x; then
23729              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23730$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23731              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23732$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23733              BOOT_JDK_FOUND=no
23734            else
23735              # We're done! :-)
23736              BOOT_JDK_FOUND=yes
23737
23738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23739
23740  # Input might be given as Windows format, start by converting to
23741  # unix format.
23742  path="$BOOT_JDK"
23743  new_path=`$CYGPATH -u "$path"`
23744
23745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23748  # "foo.exe" is OK but "foo" is an error.
23749  #
23750  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23751  # It is also a way to make sure we got the proper file name for the real test later on.
23752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23753  if test "x$test_shortpath" = x; then
23754    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23755$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23756    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23757  fi
23758
23759  # Call helper function which possibly converts this using DOS-style short mode.
23760  # If so, the updated path is stored in $new_path.
23761
23762  input_path="$new_path"
23763  # Check if we need to convert this using DOS-style short mode. If the path
23764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23765  # take no chances and rewrite it.
23766  # Note: m4 eats our [], so we need to use [ and ] instead.
23767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23768  if test "x$has_forbidden_chars" != x; then
23769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23773      # Going to short mode and back again did indeed matter. Since short mode is
23774      # case insensitive, let's make it lowercase to improve readability.
23775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23776      # Now convert it back to Unix-stile (cygpath)
23777      input_path=`$CYGPATH -u "$shortmode_path"`
23778      new_path="$input_path"
23779    fi
23780  fi
23781
23782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23783  if test "x$test_cygdrive_prefix" = x; then
23784    # As a simple fix, exclude /usr/bin since it's not a real path.
23785    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23787      # a path prefixed by /cygdrive for fixpath to work.
23788      new_path="$CYGWIN_ROOT_PATH$input_path"
23789    fi
23790  fi
23791
23792
23793  if test "x$path" != "x$new_path"; then
23794    BOOT_JDK="$new_path"
23795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23796$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23797  fi
23798
23799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23800
23801  path="$BOOT_JDK"
23802  has_colon=`$ECHO $path | $GREP ^.:`
23803  new_path="$path"
23804  if test "x$has_colon" = x; then
23805    # Not in mixed or Windows style, start by that.
23806    new_path=`cmd //c echo $path`
23807  fi
23808
23809
23810  input_path="$new_path"
23811  # Check if we need to convert this using DOS-style short mode. If the path
23812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23813  # take no chances and rewrite it.
23814  # Note: m4 eats our [], so we need to use [ and ] instead.
23815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23816  if test "x$has_forbidden_chars" != x; then
23817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23818    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23819  fi
23820
23821
23822  windows_path="$new_path"
23823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23824    unix_path=`$CYGPATH -u "$windows_path"`
23825    new_path="$unix_path"
23826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23828    new_path="$unix_path"
23829  fi
23830
23831  if test "x$path" != "x$new_path"; then
23832    BOOT_JDK="$new_path"
23833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23834$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23835  fi
23836
23837  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23838  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23839
23840  else
23841    # We're on a posix platform. Hooray! :)
23842    path="$BOOT_JDK"
23843    has_space=`$ECHO "$path" | $GREP " "`
23844    if test "x$has_space" != x; then
23845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23846$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23847      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23848    fi
23849
23850    # Use eval to expand a potential ~
23851    eval path="$path"
23852    if test ! -f "$path" && test ! -d "$path"; then
23853      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23854    fi
23855
23856    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23857  fi
23858
23859              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23860$as_echo_n "checking for Boot JDK... " >&6; }
23861              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23862$as_echo "$BOOT_JDK" >&6; }
23863              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23864$as_echo_n "checking Boot JDK version... " >&6; }
23865              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23866              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23867$as_echo "$BOOT_JDK_VERSION" >&6; }
23868            fi # end check jdk version
23869          fi # end check rt.jar
23870        fi # end check javac
23871      fi # end check java
23872    fi # end check boot jdk found
23873  fi
23874
23875  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23876
23877  if test "x$BOOT_JDK_FOUND" = xno; then
23878    # Now execute the test
23879
23880  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23881  BOOT_JDK_SUFFIX="/Contents/Home"
23882  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23883  if test "x$ALL_JDKS_FOUND" != x; then
23884    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23885
23886  if test "x$BOOT_JDK_FOUND" = xno; then
23887    # Now execute the test
23888
23889        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23890        if test -d "$BOOT_JDK"; then
23891          BOOT_JDK_FOUND=maybe
23892          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23893$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23894        fi
23895
23896
23897    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23898    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23899      # Do we have a bin/java?
23900      if test ! -x "$BOOT_JDK/bin/java"; then
23901        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23902$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23903        BOOT_JDK_FOUND=no
23904      else
23905        # Do we have a bin/javac?
23906        if test ! -x "$BOOT_JDK/bin/javac"; then
23907          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23908$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23909          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23910$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23911          BOOT_JDK_FOUND=no
23912        else
23913          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23914          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23915            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23916$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23917            BOOT_JDK_FOUND=no
23918          else
23919            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23920            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23921
23922            # Extra M4 quote needed to protect [] in grep expression.
23923            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23924            if test "x$FOUND_CORRECT_VERSION" = x; then
23925              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23926$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23927              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23928$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23929              BOOT_JDK_FOUND=no
23930            else
23931              # We're done! :-)
23932              BOOT_JDK_FOUND=yes
23933
23934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23935
23936  # Input might be given as Windows format, start by converting to
23937  # unix format.
23938  path="$BOOT_JDK"
23939  new_path=`$CYGPATH -u "$path"`
23940
23941  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23942  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23943  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23944  # "foo.exe" is OK but "foo" is an error.
23945  #
23946  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23947  # It is also a way to make sure we got the proper file name for the real test later on.
23948  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23949  if test "x$test_shortpath" = x; then
23950    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23951$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23952    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23953  fi
23954
23955  # Call helper function which possibly converts this using DOS-style short mode.
23956  # If so, the updated path is stored in $new_path.
23957
23958  input_path="$new_path"
23959  # Check if we need to convert this using DOS-style short mode. If the path
23960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23961  # take no chances and rewrite it.
23962  # Note: m4 eats our [], so we need to use [ and ] instead.
23963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23964  if test "x$has_forbidden_chars" != x; then
23965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23966    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23967    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23968    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23969      # Going to short mode and back again did indeed matter. Since short mode is
23970      # case insensitive, let's make it lowercase to improve readability.
23971      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23972      # Now convert it back to Unix-stile (cygpath)
23973      input_path=`$CYGPATH -u "$shortmode_path"`
23974      new_path="$input_path"
23975    fi
23976  fi
23977
23978  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23979  if test "x$test_cygdrive_prefix" = x; then
23980    # As a simple fix, exclude /usr/bin since it's not a real path.
23981    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23982      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23983      # a path prefixed by /cygdrive for fixpath to work.
23984      new_path="$CYGWIN_ROOT_PATH$input_path"
23985    fi
23986  fi
23987
23988
23989  if test "x$path" != "x$new_path"; then
23990    BOOT_JDK="$new_path"
23991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23992$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23993  fi
23994
23995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23996
23997  path="$BOOT_JDK"
23998  has_colon=`$ECHO $path | $GREP ^.:`
23999  new_path="$path"
24000  if test "x$has_colon" = x; then
24001    # Not in mixed or Windows style, start by that.
24002    new_path=`cmd //c echo $path`
24003  fi
24004
24005
24006  input_path="$new_path"
24007  # Check if we need to convert this using DOS-style short mode. If the path
24008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24009  # take no chances and rewrite it.
24010  # Note: m4 eats our [], so we need to use [ and ] instead.
24011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24012  if test "x$has_forbidden_chars" != x; then
24013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24014    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24015  fi
24016
24017
24018  windows_path="$new_path"
24019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24020    unix_path=`$CYGPATH -u "$windows_path"`
24021    new_path="$unix_path"
24022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24024    new_path="$unix_path"
24025  fi
24026
24027  if test "x$path" != "x$new_path"; then
24028    BOOT_JDK="$new_path"
24029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24030$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24031  fi
24032
24033  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24034  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24035
24036  else
24037    # We're on a posix platform. Hooray! :)
24038    path="$BOOT_JDK"
24039    has_space=`$ECHO "$path" | $GREP " "`
24040    if test "x$has_space" != x; then
24041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24042$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24043      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24044    fi
24045
24046    # Use eval to expand a potential ~
24047    eval path="$path"
24048    if test ! -f "$path" && test ! -d "$path"; then
24049      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24050    fi
24051
24052    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24053  fi
24054
24055              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24056$as_echo_n "checking for Boot JDK... " >&6; }
24057              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24058$as_echo "$BOOT_JDK" >&6; }
24059              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24060$as_echo_n "checking Boot JDK version... " >&6; }
24061              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24062              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24063$as_echo "$BOOT_JDK_VERSION" >&6; }
24064            fi # end check jdk version
24065          fi # end check rt.jar
24066        fi # end check javac
24067      fi # end check java
24068    fi # end check boot jdk found
24069  fi
24070
24071    done
24072  fi
24073
24074
24075    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24076    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24077      # Do we have a bin/java?
24078      if test ! -x "$BOOT_JDK/bin/java"; then
24079        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24080$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24081        BOOT_JDK_FOUND=no
24082      else
24083        # Do we have a bin/javac?
24084        if test ! -x "$BOOT_JDK/bin/javac"; then
24085          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24086$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24087          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24088$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24089          BOOT_JDK_FOUND=no
24090        else
24091          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24092          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24093            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24094$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24095            BOOT_JDK_FOUND=no
24096          else
24097            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24098            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24099
24100            # Extra M4 quote needed to protect [] in grep expression.
24101            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24102            if test "x$FOUND_CORRECT_VERSION" = x; then
24103              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24104$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24105              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24106$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24107              BOOT_JDK_FOUND=no
24108            else
24109              # We're done! :-)
24110              BOOT_JDK_FOUND=yes
24111
24112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24113
24114  # Input might be given as Windows format, start by converting to
24115  # unix format.
24116  path="$BOOT_JDK"
24117  new_path=`$CYGPATH -u "$path"`
24118
24119  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24120  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24121  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24122  # "foo.exe" is OK but "foo" is an error.
24123  #
24124  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24125  # It is also a way to make sure we got the proper file name for the real test later on.
24126  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24127  if test "x$test_shortpath" = x; then
24128    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24129$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24130    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24131  fi
24132
24133  # Call helper function which possibly converts this using DOS-style short mode.
24134  # If so, the updated path is stored in $new_path.
24135
24136  input_path="$new_path"
24137  # Check if we need to convert this using DOS-style short mode. If the path
24138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24139  # take no chances and rewrite it.
24140  # Note: m4 eats our [], so we need to use [ and ] instead.
24141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24142  if test "x$has_forbidden_chars" != x; then
24143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24144    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24145    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24146    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24147      # Going to short mode and back again did indeed matter. Since short mode is
24148      # case insensitive, let's make it lowercase to improve readability.
24149      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24150      # Now convert it back to Unix-stile (cygpath)
24151      input_path=`$CYGPATH -u "$shortmode_path"`
24152      new_path="$input_path"
24153    fi
24154  fi
24155
24156  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24157  if test "x$test_cygdrive_prefix" = x; then
24158    # As a simple fix, exclude /usr/bin since it's not a real path.
24159    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24160      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24161      # a path prefixed by /cygdrive for fixpath to work.
24162      new_path="$CYGWIN_ROOT_PATH$input_path"
24163    fi
24164  fi
24165
24166
24167  if test "x$path" != "x$new_path"; then
24168    BOOT_JDK="$new_path"
24169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24170$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24171  fi
24172
24173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24174
24175  path="$BOOT_JDK"
24176  has_colon=`$ECHO $path | $GREP ^.:`
24177  new_path="$path"
24178  if test "x$has_colon" = x; then
24179    # Not in mixed or Windows style, start by that.
24180    new_path=`cmd //c echo $path`
24181  fi
24182
24183
24184  input_path="$new_path"
24185  # Check if we need to convert this using DOS-style short mode. If the path
24186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24187  # take no chances and rewrite it.
24188  # Note: m4 eats our [], so we need to use [ and ] instead.
24189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24190  if test "x$has_forbidden_chars" != x; then
24191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24192    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24193  fi
24194
24195
24196  windows_path="$new_path"
24197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24198    unix_path=`$CYGPATH -u "$windows_path"`
24199    new_path="$unix_path"
24200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24202    new_path="$unix_path"
24203  fi
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  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24212  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24213
24214  else
24215    # We're on a posix platform. Hooray! :)
24216    path="$BOOT_JDK"
24217    has_space=`$ECHO "$path" | $GREP " "`
24218    if test "x$has_space" != x; then
24219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24220$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24221      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24222    fi
24223
24224    # Use eval to expand a potential ~
24225    eval path="$path"
24226    if test ! -f "$path" && test ! -d "$path"; then
24227      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24228    fi
24229
24230    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24231  fi
24232
24233              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24234$as_echo_n "checking for Boot JDK... " >&6; }
24235              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24236$as_echo "$BOOT_JDK" >&6; }
24237              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24238$as_echo_n "checking Boot JDK version... " >&6; }
24239              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24240              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24241$as_echo "$BOOT_JDK_VERSION" >&6; }
24242            fi # end check jdk version
24243          fi # end check rt.jar
24244        fi # end check javac
24245      fi # end check java
24246    fi # end check boot jdk found
24247  fi
24248
24249
24250  if test "x$BOOT_JDK_FOUND" = xno; then
24251    # Now execute the test
24252
24253  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24254  BOOT_JDK_SUFFIX="/Contents/Home"
24255  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24256  if test "x$ALL_JDKS_FOUND" != x; then
24257    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24258
24259  if test "x$BOOT_JDK_FOUND" = xno; then
24260    # Now execute the test
24261
24262        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24263        if test -d "$BOOT_JDK"; then
24264          BOOT_JDK_FOUND=maybe
24265          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24266$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24267        fi
24268
24269
24270    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24271    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24272      # Do we have a bin/java?
24273      if test ! -x "$BOOT_JDK/bin/java"; then
24274        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24275$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24276        BOOT_JDK_FOUND=no
24277      else
24278        # Do we have a bin/javac?
24279        if test ! -x "$BOOT_JDK/bin/javac"; then
24280          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24281$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24282          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24283$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24284          BOOT_JDK_FOUND=no
24285        else
24286          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24287          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24288            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24289$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24290            BOOT_JDK_FOUND=no
24291          else
24292            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24293            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24294
24295            # Extra M4 quote needed to protect [] in grep expression.
24296            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24297            if test "x$FOUND_CORRECT_VERSION" = x; then
24298              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24299$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24300              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24301$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24302              BOOT_JDK_FOUND=no
24303            else
24304              # We're done! :-)
24305              BOOT_JDK_FOUND=yes
24306
24307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24308
24309  # Input might be given as Windows format, start by converting to
24310  # unix format.
24311  path="$BOOT_JDK"
24312  new_path=`$CYGPATH -u "$path"`
24313
24314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24317  # "foo.exe" is OK but "foo" is an error.
24318  #
24319  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24320  # It is also a way to make sure we got the proper file name for the real test later on.
24321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24322  if test "x$test_shortpath" = x; then
24323    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24324$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24325    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24326  fi
24327
24328  # Call helper function which possibly converts this using DOS-style short mode.
24329  # If so, the updated path is stored in $new_path.
24330
24331  input_path="$new_path"
24332  # Check if we need to convert this using DOS-style short mode. If the path
24333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24334  # take no chances and rewrite it.
24335  # Note: m4 eats our [], so we need to use [ and ] instead.
24336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24337  if test "x$has_forbidden_chars" != x; then
24338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24339    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24340    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24341    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24342      # Going to short mode and back again did indeed matter. Since short mode is
24343      # case insensitive, let's make it lowercase to improve readability.
24344      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24345      # Now convert it back to Unix-stile (cygpath)
24346      input_path=`$CYGPATH -u "$shortmode_path"`
24347      new_path="$input_path"
24348    fi
24349  fi
24350
24351  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24352  if test "x$test_cygdrive_prefix" = x; then
24353    # As a simple fix, exclude /usr/bin since it's not a real path.
24354    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24355      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24356      # a path prefixed by /cygdrive for fixpath to work.
24357      new_path="$CYGWIN_ROOT_PATH$input_path"
24358    fi
24359  fi
24360
24361
24362  if test "x$path" != "x$new_path"; then
24363    BOOT_JDK="$new_path"
24364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24365$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24366  fi
24367
24368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24369
24370  path="$BOOT_JDK"
24371  has_colon=`$ECHO $path | $GREP ^.:`
24372  new_path="$path"
24373  if test "x$has_colon" = x; then
24374    # Not in mixed or Windows style, start by that.
24375    new_path=`cmd //c echo $path`
24376  fi
24377
24378
24379  input_path="$new_path"
24380  # Check if we need to convert this using DOS-style short mode. If the path
24381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24382  # take no chances and rewrite it.
24383  # Note: m4 eats our [], so we need to use [ and ] instead.
24384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24385  if test "x$has_forbidden_chars" != x; then
24386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24388  fi
24389
24390
24391  windows_path="$new_path"
24392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24393    unix_path=`$CYGPATH -u "$windows_path"`
24394    new_path="$unix_path"
24395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24397    new_path="$unix_path"
24398  fi
24399
24400  if test "x$path" != "x$new_path"; then
24401    BOOT_JDK="$new_path"
24402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24403$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24404  fi
24405
24406  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24407  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24408
24409  else
24410    # We're on a posix platform. Hooray! :)
24411    path="$BOOT_JDK"
24412    has_space=`$ECHO "$path" | $GREP " "`
24413    if test "x$has_space" != x; then
24414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24415$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24416      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24417    fi
24418
24419    # Use eval to expand a potential ~
24420    eval path="$path"
24421    if test ! -f "$path" && test ! -d "$path"; then
24422      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24423    fi
24424
24425    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24426  fi
24427
24428              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24429$as_echo_n "checking for Boot JDK... " >&6; }
24430              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24431$as_echo "$BOOT_JDK" >&6; }
24432              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24433$as_echo_n "checking Boot JDK version... " >&6; }
24434              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24435              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24436$as_echo "$BOOT_JDK_VERSION" >&6; }
24437            fi # end check jdk version
24438          fi # end check rt.jar
24439        fi # end check javac
24440      fi # end check java
24441    fi # end check boot jdk found
24442  fi
24443
24444    done
24445  fi
24446
24447
24448    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24449    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24450      # Do we have a bin/java?
24451      if test ! -x "$BOOT_JDK/bin/java"; then
24452        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24453$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24454        BOOT_JDK_FOUND=no
24455      else
24456        # Do we have a bin/javac?
24457        if test ! -x "$BOOT_JDK/bin/javac"; then
24458          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24459$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24460          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24461$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24462          BOOT_JDK_FOUND=no
24463        else
24464          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24465          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24466            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24467$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24468            BOOT_JDK_FOUND=no
24469          else
24470            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24471            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24472
24473            # Extra M4 quote needed to protect [] in grep expression.
24474            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24475            if test "x$FOUND_CORRECT_VERSION" = x; then
24476              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24477$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24478              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24479$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24480              BOOT_JDK_FOUND=no
24481            else
24482              # We're done! :-)
24483              BOOT_JDK_FOUND=yes
24484
24485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24486
24487  # Input might be given as Windows format, start by converting to
24488  # unix format.
24489  path="$BOOT_JDK"
24490  new_path=`$CYGPATH -u "$path"`
24491
24492  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24493  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24494  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24495  # "foo.exe" is OK but "foo" is an error.
24496  #
24497  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24498  # It is also a way to make sure we got the proper file name for the real test later on.
24499  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24500  if test "x$test_shortpath" = x; then
24501    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24502$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24503    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24504  fi
24505
24506  # Call helper function which possibly converts this using DOS-style short mode.
24507  # If so, the updated path is stored in $new_path.
24508
24509  input_path="$new_path"
24510  # Check if we need to convert this using DOS-style short mode. If the path
24511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24512  # take no chances and rewrite it.
24513  # Note: m4 eats our [], so we need to use [ and ] instead.
24514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24515  if test "x$has_forbidden_chars" != x; then
24516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24517    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24518    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24519    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24520      # Going to short mode and back again did indeed matter. Since short mode is
24521      # case insensitive, let's make it lowercase to improve readability.
24522      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24523      # Now convert it back to Unix-stile (cygpath)
24524      input_path=`$CYGPATH -u "$shortmode_path"`
24525      new_path="$input_path"
24526    fi
24527  fi
24528
24529  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24530  if test "x$test_cygdrive_prefix" = x; then
24531    # As a simple fix, exclude /usr/bin since it's not a real path.
24532    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24533      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24534      # a path prefixed by /cygdrive for fixpath to work.
24535      new_path="$CYGWIN_ROOT_PATH$input_path"
24536    fi
24537  fi
24538
24539
24540  if test "x$path" != "x$new_path"; then
24541    BOOT_JDK="$new_path"
24542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24543$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24544  fi
24545
24546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24547
24548  path="$BOOT_JDK"
24549  has_colon=`$ECHO $path | $GREP ^.:`
24550  new_path="$path"
24551  if test "x$has_colon" = x; then
24552    # Not in mixed or Windows style, start by that.
24553    new_path=`cmd //c echo $path`
24554  fi
24555
24556
24557  input_path="$new_path"
24558  # Check if we need to convert this using DOS-style short mode. If the path
24559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24560  # take no chances and rewrite it.
24561  # Note: m4 eats our [], so we need to use [ and ] instead.
24562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24563  if test "x$has_forbidden_chars" != x; then
24564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24565    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24566  fi
24567
24568
24569  windows_path="$new_path"
24570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24571    unix_path=`$CYGPATH -u "$windows_path"`
24572    new_path="$unix_path"
24573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24575    new_path="$unix_path"
24576  fi
24577
24578  if test "x$path" != "x$new_path"; then
24579    BOOT_JDK="$new_path"
24580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24581$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24582  fi
24583
24584  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24585  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24586
24587  else
24588    # We're on a posix platform. Hooray! :)
24589    path="$BOOT_JDK"
24590    has_space=`$ECHO "$path" | $GREP " "`
24591    if test "x$has_space" != x; then
24592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24593$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24594      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24595    fi
24596
24597    # Use eval to expand a potential ~
24598    eval path="$path"
24599    if test ! -f "$path" && test ! -d "$path"; then
24600      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24601    fi
24602
24603    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24604  fi
24605
24606              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24607$as_echo_n "checking for Boot JDK... " >&6; }
24608              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24609$as_echo "$BOOT_JDK" >&6; }
24610              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24611$as_echo_n "checking Boot JDK version... " >&6; }
24612              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24613              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24614$as_echo "$BOOT_JDK_VERSION" >&6; }
24615            fi # end check jdk version
24616          fi # end check rt.jar
24617        fi # end check javac
24618      fi # end check java
24619    fi # end check boot jdk found
24620  fi
24621
24622  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24623
24624  if test "x$BOOT_JDK_FOUND" = xno; then
24625    # Now execute the test
24626
24627  BOOT_JDK_PREFIX="/usr/lib/jvm"
24628  BOOT_JDK_SUFFIX=""
24629  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24630  if test "x$ALL_JDKS_FOUND" != x; then
24631    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24632
24633  if test "x$BOOT_JDK_FOUND" = xno; then
24634    # Now execute the test
24635
24636        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24637        if test -d "$BOOT_JDK"; then
24638          BOOT_JDK_FOUND=maybe
24639          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24640$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24641        fi
24642
24643
24644    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24645    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24646      # Do we have a bin/java?
24647      if test ! -x "$BOOT_JDK/bin/java"; then
24648        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24649$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24650        BOOT_JDK_FOUND=no
24651      else
24652        # Do we have a bin/javac?
24653        if test ! -x "$BOOT_JDK/bin/javac"; then
24654          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24655$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24656          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24657$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24658          BOOT_JDK_FOUND=no
24659        else
24660          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24661          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24662            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24663$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24664            BOOT_JDK_FOUND=no
24665          else
24666            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24667            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24668
24669            # Extra M4 quote needed to protect [] in grep expression.
24670            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24671            if test "x$FOUND_CORRECT_VERSION" = x; then
24672              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24673$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24674              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24675$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24676              BOOT_JDK_FOUND=no
24677            else
24678              # We're done! :-)
24679              BOOT_JDK_FOUND=yes
24680
24681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24682
24683  # Input might be given as Windows format, start by converting to
24684  # unix format.
24685  path="$BOOT_JDK"
24686  new_path=`$CYGPATH -u "$path"`
24687
24688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24691  # "foo.exe" is OK but "foo" is an error.
24692  #
24693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24694  # It is also a way to make sure we got the proper file name for the real test later on.
24695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24696  if test "x$test_shortpath" = x; then
24697    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24698$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24699    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24700  fi
24701
24702  # Call helper function which possibly converts this using DOS-style short mode.
24703  # If so, the updated path is stored in $new_path.
24704
24705  input_path="$new_path"
24706  # Check if we need to convert this using DOS-style short mode. If the path
24707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24708  # take no chances and rewrite it.
24709  # Note: m4 eats our [], so we need to use [ and ] instead.
24710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24711  if test "x$has_forbidden_chars" != x; then
24712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24713    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24714    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24715    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24716      # Going to short mode and back again did indeed matter. Since short mode is
24717      # case insensitive, let's make it lowercase to improve readability.
24718      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24719      # Now convert it back to Unix-stile (cygpath)
24720      input_path=`$CYGPATH -u "$shortmode_path"`
24721      new_path="$input_path"
24722    fi
24723  fi
24724
24725  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24726  if test "x$test_cygdrive_prefix" = x; then
24727    # As a simple fix, exclude /usr/bin since it's not a real path.
24728    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24729      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24730      # a path prefixed by /cygdrive for fixpath to work.
24731      new_path="$CYGWIN_ROOT_PATH$input_path"
24732    fi
24733  fi
24734
24735
24736  if test "x$path" != "x$new_path"; then
24737    BOOT_JDK="$new_path"
24738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24739$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24740  fi
24741
24742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24743
24744  path="$BOOT_JDK"
24745  has_colon=`$ECHO $path | $GREP ^.:`
24746  new_path="$path"
24747  if test "x$has_colon" = x; then
24748    # Not in mixed or Windows style, start by that.
24749    new_path=`cmd //c echo $path`
24750  fi
24751
24752
24753  input_path="$new_path"
24754  # Check if we need to convert this using DOS-style short mode. If the path
24755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24756  # take no chances and rewrite it.
24757  # Note: m4 eats our [], so we need to use [ and ] instead.
24758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24759  if test "x$has_forbidden_chars" != x; then
24760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24762  fi
24763
24764
24765  windows_path="$new_path"
24766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24767    unix_path=`$CYGPATH -u "$windows_path"`
24768    new_path="$unix_path"
24769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24771    new_path="$unix_path"
24772  fi
24773
24774  if test "x$path" != "x$new_path"; then
24775    BOOT_JDK="$new_path"
24776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24777$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24778  fi
24779
24780  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24781  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24782
24783  else
24784    # We're on a posix platform. Hooray! :)
24785    path="$BOOT_JDK"
24786    has_space=`$ECHO "$path" | $GREP " "`
24787    if test "x$has_space" != x; then
24788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24789$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24790      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24791    fi
24792
24793    # Use eval to expand a potential ~
24794    eval path="$path"
24795    if test ! -f "$path" && test ! -d "$path"; then
24796      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24797    fi
24798
24799    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24800  fi
24801
24802              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24803$as_echo_n "checking for Boot JDK... " >&6; }
24804              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24805$as_echo "$BOOT_JDK" >&6; }
24806              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24807$as_echo_n "checking Boot JDK version... " >&6; }
24808              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24809              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24810$as_echo "$BOOT_JDK_VERSION" >&6; }
24811            fi # end check jdk version
24812          fi # end check rt.jar
24813        fi # end check javac
24814      fi # end check java
24815    fi # end check boot jdk found
24816  fi
24817
24818    done
24819  fi
24820
24821
24822    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24823    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24824      # Do we have a bin/java?
24825      if test ! -x "$BOOT_JDK/bin/java"; then
24826        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24827$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24828        BOOT_JDK_FOUND=no
24829      else
24830        # Do we have a bin/javac?
24831        if test ! -x "$BOOT_JDK/bin/javac"; then
24832          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24833$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24834          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24835$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24836          BOOT_JDK_FOUND=no
24837        else
24838          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24839          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24840            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24841$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24842            BOOT_JDK_FOUND=no
24843          else
24844            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24845            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24846
24847            # Extra M4 quote needed to protect [] in grep expression.
24848            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24849            if test "x$FOUND_CORRECT_VERSION" = x; then
24850              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24851$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24852              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24853$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24854              BOOT_JDK_FOUND=no
24855            else
24856              # We're done! :-)
24857              BOOT_JDK_FOUND=yes
24858
24859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24860
24861  # Input might be given as Windows format, start by converting to
24862  # unix format.
24863  path="$BOOT_JDK"
24864  new_path=`$CYGPATH -u "$path"`
24865
24866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24869  # "foo.exe" is OK but "foo" is an error.
24870  #
24871  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24872  # It is also a way to make sure we got the proper file name for the real test later on.
24873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24874  if test "x$test_shortpath" = x; then
24875    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24876$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24877    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24878  fi
24879
24880  # Call helper function which possibly converts this using DOS-style short mode.
24881  # If so, the updated path is stored in $new_path.
24882
24883  input_path="$new_path"
24884  # Check if we need to convert this using DOS-style short mode. If the path
24885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24886  # take no chances and rewrite it.
24887  # Note: m4 eats our [], so we need to use [ and ] instead.
24888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24889  if test "x$has_forbidden_chars" != x; then
24890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24894      # Going to short mode and back again did indeed matter. Since short mode is
24895      # case insensitive, let's make it lowercase to improve readability.
24896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24897      # Now convert it back to Unix-stile (cygpath)
24898      input_path=`$CYGPATH -u "$shortmode_path"`
24899      new_path="$input_path"
24900    fi
24901  fi
24902
24903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24904  if test "x$test_cygdrive_prefix" = x; then
24905    # As a simple fix, exclude /usr/bin since it's not a real path.
24906    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24908      # a path prefixed by /cygdrive for fixpath to work.
24909      new_path="$CYGWIN_ROOT_PATH$input_path"
24910    fi
24911  fi
24912
24913
24914  if test "x$path" != "x$new_path"; then
24915    BOOT_JDK="$new_path"
24916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24917$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24918  fi
24919
24920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24921
24922  path="$BOOT_JDK"
24923  has_colon=`$ECHO $path | $GREP ^.:`
24924  new_path="$path"
24925  if test "x$has_colon" = x; then
24926    # Not in mixed or Windows style, start by that.
24927    new_path=`cmd //c echo $path`
24928  fi
24929
24930
24931  input_path="$new_path"
24932  # Check if we need to convert this using DOS-style short mode. If the path
24933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24934  # take no chances and rewrite it.
24935  # Note: m4 eats our [], so we need to use [ and ] instead.
24936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24937  if test "x$has_forbidden_chars" != x; then
24938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24940  fi
24941
24942
24943  windows_path="$new_path"
24944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24945    unix_path=`$CYGPATH -u "$windows_path"`
24946    new_path="$unix_path"
24947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24949    new_path="$unix_path"
24950  fi
24951
24952  if test "x$path" != "x$new_path"; then
24953    BOOT_JDK="$new_path"
24954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24955$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24956  fi
24957
24958  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24959  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24960
24961  else
24962    # We're on a posix platform. Hooray! :)
24963    path="$BOOT_JDK"
24964    has_space=`$ECHO "$path" | $GREP " "`
24965    if test "x$has_space" != x; then
24966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24967$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24968      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24969    fi
24970
24971    # Use eval to expand a potential ~
24972    eval path="$path"
24973    if test ! -f "$path" && test ! -d "$path"; then
24974      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24975    fi
24976
24977    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24978  fi
24979
24980              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24981$as_echo_n "checking for Boot JDK... " >&6; }
24982              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24983$as_echo "$BOOT_JDK" >&6; }
24984              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24985$as_echo_n "checking Boot JDK version... " >&6; }
24986              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24987              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24988$as_echo "$BOOT_JDK_VERSION" >&6; }
24989            fi # end check jdk version
24990          fi # end check rt.jar
24991        fi # end check javac
24992      fi # end check java
24993    fi # end check boot jdk found
24994  fi
24995
24996  fi
24997
24998
24999    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25000    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25001      # Do we have a bin/java?
25002      if test ! -x "$BOOT_JDK/bin/java"; then
25003        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25004$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25005        BOOT_JDK_FOUND=no
25006      else
25007        # Do we have a bin/javac?
25008        if test ! -x "$BOOT_JDK/bin/javac"; then
25009          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25010$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25011          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25012$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25013          BOOT_JDK_FOUND=no
25014        else
25015          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25016          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25017            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25019            BOOT_JDK_FOUND=no
25020          else
25021            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25022            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25023
25024            # Extra M4 quote needed to protect [] in grep expression.
25025            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
25026            if test "x$FOUND_CORRECT_VERSION" = x; then
25027              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25028$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25029              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
25030$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
25031              BOOT_JDK_FOUND=no
25032            else
25033              # We're done! :-)
25034              BOOT_JDK_FOUND=yes
25035
25036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25037
25038  # Input might be given as Windows format, start by converting to
25039  # unix format.
25040  path="$BOOT_JDK"
25041  new_path=`$CYGPATH -u "$path"`
25042
25043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25046  # "foo.exe" is OK but "foo" is an error.
25047  #
25048  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25049  # It is also a way to make sure we got the proper file name for the real test later on.
25050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25051  if test "x$test_shortpath" = x; then
25052    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25053$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25054    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25055  fi
25056
25057  # Call helper function which possibly converts this using DOS-style short mode.
25058  # If so, the updated path is stored in $new_path.
25059
25060  input_path="$new_path"
25061  # Check if we need to convert this using DOS-style short mode. If the path
25062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25063  # take no chances and rewrite it.
25064  # Note: m4 eats our [], so we need to use [ and ] instead.
25065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25066  if test "x$has_forbidden_chars" != x; then
25067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25071      # Going to short mode and back again did indeed matter. Since short mode is
25072      # case insensitive, let's make it lowercase to improve readability.
25073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25074      # Now convert it back to Unix-stile (cygpath)
25075      input_path=`$CYGPATH -u "$shortmode_path"`
25076      new_path="$input_path"
25077    fi
25078  fi
25079
25080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25081  if test "x$test_cygdrive_prefix" = x; then
25082    # As a simple fix, exclude /usr/bin since it's not a real path.
25083    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25085      # a path prefixed by /cygdrive for fixpath to work.
25086      new_path="$CYGWIN_ROOT_PATH$input_path"
25087    fi
25088  fi
25089
25090
25091  if test "x$path" != "x$new_path"; then
25092    BOOT_JDK="$new_path"
25093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25094$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25095  fi
25096
25097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25098
25099  path="$BOOT_JDK"
25100  has_colon=`$ECHO $path | $GREP ^.:`
25101  new_path="$path"
25102  if test "x$has_colon" = x; then
25103    # Not in mixed or Windows style, start by that.
25104    new_path=`cmd //c echo $path`
25105  fi
25106
25107
25108  input_path="$new_path"
25109  # Check if we need to convert this using DOS-style short mode. If the path
25110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25111  # take no chances and rewrite it.
25112  # Note: m4 eats our [], so we need to use [ and ] instead.
25113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25114  if test "x$has_forbidden_chars" != x; then
25115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25116    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25117  fi
25118
25119
25120  windows_path="$new_path"
25121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25122    unix_path=`$CYGPATH -u "$windows_path"`
25123    new_path="$unix_path"
25124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25126    new_path="$unix_path"
25127  fi
25128
25129  if test "x$path" != "x$new_path"; then
25130    BOOT_JDK="$new_path"
25131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25132$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25133  fi
25134
25135  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25136  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25137
25138  else
25139    # We're on a posix platform. Hooray! :)
25140    path="$BOOT_JDK"
25141    has_space=`$ECHO "$path" | $GREP " "`
25142    if test "x$has_space" != x; then
25143      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25144$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25145      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25146    fi
25147
25148    # Use eval to expand a potential ~
25149    eval path="$path"
25150    if test ! -f "$path" && test ! -d "$path"; then
25151      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25152    fi
25153
25154    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25155  fi
25156
25157              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25158$as_echo_n "checking for Boot JDK... " >&6; }
25159              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25160$as_echo "$BOOT_JDK" >&6; }
25161              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25162$as_echo_n "checking Boot JDK version... " >&6; }
25163              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25164              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25165$as_echo "$BOOT_JDK_VERSION" >&6; }
25166            fi # end check jdk version
25167          fi # end check rt.jar
25168        fi # end check javac
25169      fi # end check java
25170    fi # end check boot jdk found
25171  fi
25172
25173
25174  # If we haven't found anything yet, we've truly lost. Give up.
25175  if test "x$BOOT_JDK_FOUND" = xno; then
25176
25177  # Print a helpful message on how to acquire the necessary build dependency.
25178  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25179  MISSING_DEPENDENCY=openjdk
25180
25181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25182    cygwin_help $MISSING_DEPENDENCY
25183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25184    msys_help $MISSING_DEPENDENCY
25185  else
25186    PKGHANDLER_COMMAND=
25187
25188    case $PKGHANDLER in
25189      apt-get)
25190        apt_help     $MISSING_DEPENDENCY ;;
25191      yum)
25192        yum_help     $MISSING_DEPENDENCY ;;
25193      port)
25194        port_help    $MISSING_DEPENDENCY ;;
25195      pkgutil)
25196        pkgutil_help $MISSING_DEPENDENCY ;;
25197      pkgadd)
25198        pkgadd_help  $MISSING_DEPENDENCY ;;
25199    esac
25200
25201    if test "x$PKGHANDLER_COMMAND" != x; then
25202      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25203    fi
25204  fi
25205
25206    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25207$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25208    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25209$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25210    as_fn_error $? "Cannot continue" "$LINENO" 5
25211  fi
25212
25213  # Setup proper paths for what we found
25214  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
25215  if test ! -f "$BOOT_RTJAR"; then
25216    # On MacOSX it is called classes.jar
25217    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
25218    if test -f "$BOOT_RTJAR"; then
25219      # Remove the ..
25220      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
25221    fi
25222  fi
25223  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
25224  BOOT_JDK="$BOOT_JDK"
25225
25226
25227
25228
25229  # Setup tools from the Boot JDK.
25230
25231  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25232
25233  # Publish this variable in the help.
25234
25235
25236  if test "x$JAVA" = x; then
25237    # The variable is not set by user, try to locate tool using the code snippet
25238
25239      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25240$as_echo_n "checking for java in Boot JDK... " >&6; }
25241      JAVA=$BOOT_JDK/bin/java
25242      if test ! -x $JAVA; then
25243        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25244$as_echo "not found" >&6; }
25245        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25246$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25247        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25248      fi
25249      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25250$as_echo "ok" >&6; }
25251
25252
25253  else
25254    # The variable is set, but is it from the command line or the environment?
25255
25256    # Try to remove the string !JAVA! from our list.
25257    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25258    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25259      # If it failed, the variable was not from the command line. Ignore it,
25260      # but warn the user (except for BASH, which is always set by the calling BASH).
25261      if test "xJAVA" != xBASH; then
25262        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25263$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25264      fi
25265      # Try to locate tool using the code snippet
25266
25267      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25268$as_echo_n "checking for java in Boot JDK... " >&6; }
25269      JAVA=$BOOT_JDK/bin/java
25270      if test ! -x $JAVA; then
25271        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25272$as_echo "not found" >&6; }
25273        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25274$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25275        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25276      fi
25277      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25278$as_echo "ok" >&6; }
25279
25280
25281    else
25282      # If it succeeded, then it was overridden by the user. We will use it
25283      # for the tool.
25284
25285      # First remove it from the list of overridden variables, so we can test
25286      # for unknown variables in the end.
25287      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25288
25289      # Check if the provided tool contains a complete path.
25290      tool_specified="$JAVA"
25291      tool_basename="${tool_specified##*/}"
25292      if test "x$tool_basename" = "x$tool_specified"; then
25293        # A command without a complete path is provided, search $PATH.
25294        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25295$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25296        # Extract the first word of "$tool_basename", so it can be a program name with args.
25297set dummy $tool_basename; ac_word=$2
25298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25299$as_echo_n "checking for $ac_word... " >&6; }
25300if ${ac_cv_path_JAVA+:} false; then :
25301  $as_echo_n "(cached) " >&6
25302else
25303  case $JAVA in
25304  [\\/]* | ?:[\\/]*)
25305  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25306  ;;
25307  *)
25308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25309for as_dir in $PATH
25310do
25311  IFS=$as_save_IFS
25312  test -z "$as_dir" && as_dir=.
25313    for ac_exec_ext in '' $ac_executable_extensions; do
25314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25315    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25317    break 2
25318  fi
25319done
25320  done
25321IFS=$as_save_IFS
25322
25323  ;;
25324esac
25325fi
25326JAVA=$ac_cv_path_JAVA
25327if test -n "$JAVA"; then
25328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25329$as_echo "$JAVA" >&6; }
25330else
25331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25332$as_echo "no" >&6; }
25333fi
25334
25335
25336        if test "x$JAVA" = x; then
25337          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25338        fi
25339      else
25340        # Otherwise we believe it is a complete path. Use it as it is.
25341        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25342$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25343        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25344$as_echo_n "checking for JAVA... " >&6; }
25345        if test ! -x "$tool_specified"; then
25346          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25347$as_echo "not found" >&6; }
25348          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25349        fi
25350        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25351$as_echo "$tool_specified" >&6; }
25352      fi
25353    fi
25354  fi
25355
25356
25357
25358  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25359
25360  # Publish this variable in the help.
25361
25362
25363  if test "x$JAVAC" = x; then
25364    # The variable is not set by user, try to locate tool using the code snippet
25365
25366      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25367$as_echo_n "checking for javac in Boot JDK... " >&6; }
25368      JAVAC=$BOOT_JDK/bin/javac
25369      if test ! -x $JAVAC; then
25370        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25371$as_echo "not found" >&6; }
25372        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25373$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25374        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25375      fi
25376      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25377$as_echo "ok" >&6; }
25378
25379
25380  else
25381    # The variable is set, but is it from the command line or the environment?
25382
25383    # Try to remove the string !JAVAC! from our list.
25384    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25385    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25386      # If it failed, the variable was not from the command line. Ignore it,
25387      # but warn the user (except for BASH, which is always set by the calling BASH).
25388      if test "xJAVAC" != xBASH; then
25389        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25390$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25391      fi
25392      # Try to locate tool using the code snippet
25393
25394      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25395$as_echo_n "checking for javac in Boot JDK... " >&6; }
25396      JAVAC=$BOOT_JDK/bin/javac
25397      if test ! -x $JAVAC; then
25398        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25399$as_echo "not found" >&6; }
25400        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25401$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25402        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25403      fi
25404      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25405$as_echo "ok" >&6; }
25406
25407
25408    else
25409      # If it succeeded, then it was overridden by the user. We will use it
25410      # for the tool.
25411
25412      # First remove it from the list of overridden variables, so we can test
25413      # for unknown variables in the end.
25414      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25415
25416      # Check if the provided tool contains a complete path.
25417      tool_specified="$JAVAC"
25418      tool_basename="${tool_specified##*/}"
25419      if test "x$tool_basename" = "x$tool_specified"; then
25420        # A command without a complete path is provided, search $PATH.
25421        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25422$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25423        # Extract the first word of "$tool_basename", so it can be a program name with args.
25424set dummy $tool_basename; ac_word=$2
25425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25426$as_echo_n "checking for $ac_word... " >&6; }
25427if ${ac_cv_path_JAVAC+:} false; then :
25428  $as_echo_n "(cached) " >&6
25429else
25430  case $JAVAC in
25431  [\\/]* | ?:[\\/]*)
25432  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25433  ;;
25434  *)
25435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25436for as_dir in $PATH
25437do
25438  IFS=$as_save_IFS
25439  test -z "$as_dir" && as_dir=.
25440    for ac_exec_ext in '' $ac_executable_extensions; do
25441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25442    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25444    break 2
25445  fi
25446done
25447  done
25448IFS=$as_save_IFS
25449
25450  ;;
25451esac
25452fi
25453JAVAC=$ac_cv_path_JAVAC
25454if test -n "$JAVAC"; then
25455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25456$as_echo "$JAVAC" >&6; }
25457else
25458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25459$as_echo "no" >&6; }
25460fi
25461
25462
25463        if test "x$JAVAC" = x; then
25464          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25465        fi
25466      else
25467        # Otherwise we believe it is a complete path. Use it as it is.
25468        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25469$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25470        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25471$as_echo_n "checking for JAVAC... " >&6; }
25472        if test ! -x "$tool_specified"; then
25473          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25474$as_echo "not found" >&6; }
25475          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25476        fi
25477        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25478$as_echo "$tool_specified" >&6; }
25479      fi
25480    fi
25481  fi
25482
25483
25484
25485  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25486
25487  # Publish this variable in the help.
25488
25489
25490  if test "x$JAVAH" = x; then
25491    # The variable is not set by user, try to locate tool using the code snippet
25492
25493      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25494$as_echo_n "checking for javah in Boot JDK... " >&6; }
25495      JAVAH=$BOOT_JDK/bin/javah
25496      if test ! -x $JAVAH; then
25497        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25498$as_echo "not found" >&6; }
25499        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25500$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25501        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25502      fi
25503      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25504$as_echo "ok" >&6; }
25505
25506
25507  else
25508    # The variable is set, but is it from the command line or the environment?
25509
25510    # Try to remove the string !JAVAH! from our list.
25511    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25512    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25513      # If it failed, the variable was not from the command line. Ignore it,
25514      # but warn the user (except for BASH, which is always set by the calling BASH).
25515      if test "xJAVAH" != xBASH; then
25516        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25517$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25518      fi
25519      # Try to locate tool using the code snippet
25520
25521      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25522$as_echo_n "checking for javah in Boot JDK... " >&6; }
25523      JAVAH=$BOOT_JDK/bin/javah
25524      if test ! -x $JAVAH; then
25525        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25526$as_echo "not found" >&6; }
25527        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25528$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25529        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25530      fi
25531      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25532$as_echo "ok" >&6; }
25533
25534
25535    else
25536      # If it succeeded, then it was overridden by the user. We will use it
25537      # for the tool.
25538
25539      # First remove it from the list of overridden variables, so we can test
25540      # for unknown variables in the end.
25541      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25542
25543      # Check if the provided tool contains a complete path.
25544      tool_specified="$JAVAH"
25545      tool_basename="${tool_specified##*/}"
25546      if test "x$tool_basename" = "x$tool_specified"; then
25547        # A command without a complete path is provided, search $PATH.
25548        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25549$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25550        # Extract the first word of "$tool_basename", so it can be a program name with args.
25551set dummy $tool_basename; ac_word=$2
25552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25553$as_echo_n "checking for $ac_word... " >&6; }
25554if ${ac_cv_path_JAVAH+:} false; then :
25555  $as_echo_n "(cached) " >&6
25556else
25557  case $JAVAH in
25558  [\\/]* | ?:[\\/]*)
25559  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25560  ;;
25561  *)
25562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25563for as_dir in $PATH
25564do
25565  IFS=$as_save_IFS
25566  test -z "$as_dir" && as_dir=.
25567    for ac_exec_ext in '' $ac_executable_extensions; do
25568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25569    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25571    break 2
25572  fi
25573done
25574  done
25575IFS=$as_save_IFS
25576
25577  ;;
25578esac
25579fi
25580JAVAH=$ac_cv_path_JAVAH
25581if test -n "$JAVAH"; then
25582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25583$as_echo "$JAVAH" >&6; }
25584else
25585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25586$as_echo "no" >&6; }
25587fi
25588
25589
25590        if test "x$JAVAH" = x; then
25591          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25592        fi
25593      else
25594        # Otherwise we believe it is a complete path. Use it as it is.
25595        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25596$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25597        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25598$as_echo_n "checking for JAVAH... " >&6; }
25599        if test ! -x "$tool_specified"; then
25600          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25601$as_echo "not found" >&6; }
25602          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25603        fi
25604        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25605$as_echo "$tool_specified" >&6; }
25606      fi
25607    fi
25608  fi
25609
25610
25611
25612  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25613
25614  # Publish this variable in the help.
25615
25616
25617  if test "x$JAR" = x; then
25618    # The variable is not set by user, try to locate tool using the code snippet
25619
25620      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25621$as_echo_n "checking for jar in Boot JDK... " >&6; }
25622      JAR=$BOOT_JDK/bin/jar
25623      if test ! -x $JAR; then
25624        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25625$as_echo "not found" >&6; }
25626        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25627$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25628        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25629      fi
25630      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25631$as_echo "ok" >&6; }
25632
25633
25634  else
25635    # The variable is set, but is it from the command line or the environment?
25636
25637    # Try to remove the string !JAR! from our list.
25638    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25639    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25640      # If it failed, the variable was not from the command line. Ignore it,
25641      # but warn the user (except for BASH, which is always set by the calling BASH).
25642      if test "xJAR" != xBASH; then
25643        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25644$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25645      fi
25646      # Try to locate tool using the code snippet
25647
25648      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25649$as_echo_n "checking for jar in Boot JDK... " >&6; }
25650      JAR=$BOOT_JDK/bin/jar
25651      if test ! -x $JAR; then
25652        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25653$as_echo "not found" >&6; }
25654        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25655$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25656        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25657      fi
25658      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25659$as_echo "ok" >&6; }
25660
25661
25662    else
25663      # If it succeeded, then it was overridden by the user. We will use it
25664      # for the tool.
25665
25666      # First remove it from the list of overridden variables, so we can test
25667      # for unknown variables in the end.
25668      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25669
25670      # Check if the provided tool contains a complete path.
25671      tool_specified="$JAR"
25672      tool_basename="${tool_specified##*/}"
25673      if test "x$tool_basename" = "x$tool_specified"; then
25674        # A command without a complete path is provided, search $PATH.
25675        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25676$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25677        # Extract the first word of "$tool_basename", so it can be a program name with args.
25678set dummy $tool_basename; ac_word=$2
25679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25680$as_echo_n "checking for $ac_word... " >&6; }
25681if ${ac_cv_path_JAR+:} false; then :
25682  $as_echo_n "(cached) " >&6
25683else
25684  case $JAR in
25685  [\\/]* | ?:[\\/]*)
25686  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25687  ;;
25688  *)
25689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25690for as_dir in $PATH
25691do
25692  IFS=$as_save_IFS
25693  test -z "$as_dir" && as_dir=.
25694    for ac_exec_ext in '' $ac_executable_extensions; do
25695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25696    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25698    break 2
25699  fi
25700done
25701  done
25702IFS=$as_save_IFS
25703
25704  ;;
25705esac
25706fi
25707JAR=$ac_cv_path_JAR
25708if test -n "$JAR"; then
25709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25710$as_echo "$JAR" >&6; }
25711else
25712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25713$as_echo "no" >&6; }
25714fi
25715
25716
25717        if test "x$JAR" = x; then
25718          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25719        fi
25720      else
25721        # Otherwise we believe it is a complete path. Use it as it is.
25722        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25723$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25724        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25725$as_echo_n "checking for JAR... " >&6; }
25726        if test ! -x "$tool_specified"; then
25727          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25728$as_echo "not found" >&6; }
25729          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25730        fi
25731        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25732$as_echo "$tool_specified" >&6; }
25733      fi
25734    fi
25735  fi
25736
25737
25738
25739  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25740
25741  # Publish this variable in the help.
25742
25743
25744  if test "x$NATIVE2ASCII" = x; then
25745    # The variable is not set by user, try to locate tool using the code snippet
25746
25747      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25748$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25749      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25750      if test ! -x $NATIVE2ASCII; then
25751        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25752$as_echo "not found" >&6; }
25753        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25754$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25755        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25756      fi
25757      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25758$as_echo "ok" >&6; }
25759
25760
25761  else
25762    # The variable is set, but is it from the command line or the environment?
25763
25764    # Try to remove the string !NATIVE2ASCII! from our list.
25765    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25766    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25767      # If it failed, the variable was not from the command line. Ignore it,
25768      # but warn the user (except for BASH, which is always set by the calling BASH).
25769      if test "xNATIVE2ASCII" != xBASH; then
25770        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25771$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25772      fi
25773      # Try to locate tool using the code snippet
25774
25775      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25776$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25777      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25778      if test ! -x $NATIVE2ASCII; then
25779        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25780$as_echo "not found" >&6; }
25781        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25782$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25783        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25784      fi
25785      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25786$as_echo "ok" >&6; }
25787
25788
25789    else
25790      # If it succeeded, then it was overridden by the user. We will use it
25791      # for the tool.
25792
25793      # First remove it from the list of overridden variables, so we can test
25794      # for unknown variables in the end.
25795      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25796
25797      # Check if the provided tool contains a complete path.
25798      tool_specified="$NATIVE2ASCII"
25799      tool_basename="${tool_specified##*/}"
25800      if test "x$tool_basename" = "x$tool_specified"; then
25801        # A command without a complete path is provided, search $PATH.
25802        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25803$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25804        # Extract the first word of "$tool_basename", so it can be a program name with args.
25805set dummy $tool_basename; ac_word=$2
25806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25807$as_echo_n "checking for $ac_word... " >&6; }
25808if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25809  $as_echo_n "(cached) " >&6
25810else
25811  case $NATIVE2ASCII in
25812  [\\/]* | ?:[\\/]*)
25813  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25814  ;;
25815  *)
25816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25817for as_dir in $PATH
25818do
25819  IFS=$as_save_IFS
25820  test -z "$as_dir" && as_dir=.
25821    for ac_exec_ext in '' $ac_executable_extensions; do
25822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25823    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25825    break 2
25826  fi
25827done
25828  done
25829IFS=$as_save_IFS
25830
25831  ;;
25832esac
25833fi
25834NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25835if test -n "$NATIVE2ASCII"; then
25836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25837$as_echo "$NATIVE2ASCII" >&6; }
25838else
25839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25840$as_echo "no" >&6; }
25841fi
25842
25843
25844        if test "x$NATIVE2ASCII" = x; then
25845          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25846        fi
25847      else
25848        # Otherwise we believe it is a complete path. Use it as it is.
25849        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25850$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25851        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25852$as_echo_n "checking for NATIVE2ASCII... " >&6; }
25853        if test ! -x "$tool_specified"; then
25854          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25855$as_echo "not found" >&6; }
25856          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25857        fi
25858        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25859$as_echo "$tool_specified" >&6; }
25860      fi
25861    fi
25862  fi
25863
25864
25865
25866  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25867
25868  # Publish this variable in the help.
25869
25870
25871  if test "x$JARSIGNER" = x; then
25872    # The variable is not set by user, try to locate tool using the code snippet
25873
25874      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25875$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25876      JARSIGNER=$BOOT_JDK/bin/jarsigner
25877      if test ! -x $JARSIGNER; then
25878        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25879$as_echo "not found" >&6; }
25880        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25881$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25882        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25883      fi
25884      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25885$as_echo "ok" >&6; }
25886
25887
25888  else
25889    # The variable is set, but is it from the command line or the environment?
25890
25891    # Try to remove the string !JARSIGNER! from our list.
25892    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
25893    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25894      # If it failed, the variable was not from the command line. Ignore it,
25895      # but warn the user (except for BASH, which is always set by the calling BASH).
25896      if test "xJARSIGNER" != xBASH; then
25897        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
25898$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
25899      fi
25900      # Try to locate tool using the code snippet
25901
25902      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25903$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25904      JARSIGNER=$BOOT_JDK/bin/jarsigner
25905      if test ! -x $JARSIGNER; then
25906        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25907$as_echo "not found" >&6; }
25908        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25909$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25910        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25911      fi
25912      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25913$as_echo "ok" >&6; }
25914
25915
25916    else
25917      # If it succeeded, then it was overridden by the user. We will use it
25918      # for the tool.
25919
25920      # First remove it from the list of overridden variables, so we can test
25921      # for unknown variables in the end.
25922      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25923
25924      # Check if the provided tool contains a complete path.
25925      tool_specified="$JARSIGNER"
25926      tool_basename="${tool_specified##*/}"
25927      if test "x$tool_basename" = "x$tool_specified"; then
25928        # A command without a complete path is provided, search $PATH.
25929        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
25930$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
25931        # Extract the first word of "$tool_basename", so it can be a program name with args.
25932set dummy $tool_basename; ac_word=$2
25933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25934$as_echo_n "checking for $ac_word... " >&6; }
25935if ${ac_cv_path_JARSIGNER+:} false; then :
25936  $as_echo_n "(cached) " >&6
25937else
25938  case $JARSIGNER in
25939  [\\/]* | ?:[\\/]*)
25940  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
25941  ;;
25942  *)
25943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25944for as_dir in $PATH
25945do
25946  IFS=$as_save_IFS
25947  test -z "$as_dir" && as_dir=.
25948    for ac_exec_ext in '' $ac_executable_extensions; do
25949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25950    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
25951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25952    break 2
25953  fi
25954done
25955  done
25956IFS=$as_save_IFS
25957
25958  ;;
25959esac
25960fi
25961JARSIGNER=$ac_cv_path_JARSIGNER
25962if test -n "$JARSIGNER"; then
25963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
25964$as_echo "$JARSIGNER" >&6; }
25965else
25966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25967$as_echo "no" >&6; }
25968fi
25969
25970
25971        if test "x$JARSIGNER" = x; then
25972          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25973        fi
25974      else
25975        # Otherwise we believe it is a complete path. Use it as it is.
25976        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
25977$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
25978        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
25979$as_echo_n "checking for JARSIGNER... " >&6; }
25980        if test ! -x "$tool_specified"; then
25981          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25982$as_echo "not found" >&6; }
25983          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
25984        fi
25985        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25986$as_echo "$tool_specified" >&6; }
25987      fi
25988    fi
25989  fi
25990
25991
25992
25993  # Finally, set some other options...
25994
25995  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
25996  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
25997
25998
25999
26000
26001  ##############################################################################
26002  #
26003  # Specify jvm options for anything that is run with the Boot JDK.
26004  # Not all JVM:s accept the same arguments on the command line.
26005  #
26006
26007# Check whether --with-boot-jdk-jvmargs was given.
26008if test "${with_boot_jdk_jvmargs+set}" = set; then :
26009  withval=$with_boot_jdk_jvmargs;
26010fi
26011
26012
26013  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
26014$as_echo_n "checking flags for boot jdk java command ... " >&6; }
26015
26016  # Disable special log output when a debug build is used as Boot JDK...
26017
26018  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
26019  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
26020  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
26021  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26022  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26023  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26024    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
26025    JVM_ARG_OK=true
26026  else
26027    $ECHO "Arg failed:" >&5
26028    $ECHO "$OUTPUT" >&5
26029    JVM_ARG_OK=false
26030  fi
26031
26032
26033  # Apply user provided options.
26034
26035  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
26036  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
26037  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
26038  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26039  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26040  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26041    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
26042    JVM_ARG_OK=true
26043  else
26044    $ECHO "Arg failed:" >&5
26045    $ECHO "$OUTPUT" >&5
26046    JVM_ARG_OK=false
26047  fi
26048
26049
26050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
26051$as_echo "$boot_jdk_jvmargs" >&6; }
26052
26053  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
26054  JAVA_FLAGS=$boot_jdk_jvmargs
26055
26056
26057
26058  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
26059$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
26060
26061  # Starting amount of heap memory.
26062
26063  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
26064  $ECHO "Command: $JAVA -Xms64M -version" >&5
26065  OUTPUT=`$JAVA -Xms64M -version 2>&1`
26066  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26067  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26068  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26069    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
26070    JVM_ARG_OK=true
26071  else
26072    $ECHO "Arg failed:" >&5
26073    $ECHO "$OUTPUT" >&5
26074    JVM_ARG_OK=false
26075  fi
26076
26077
26078  # Maximum amount of heap memory.
26079  # Maximum stack size.
26080  if test "x$BUILD_NUM_BITS" = x32; then
26081    JVM_MAX_HEAP=1100M
26082    STACK_SIZE=768
26083  else
26084    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
26085    # pointers are used. Apparently, we need to increase the heap and stack
26086    # space for the jvm. More specifically, when running javac to build huge
26087    # jdk batch
26088    JVM_MAX_HEAP=1600M
26089    STACK_SIZE=1536
26090  fi
26091
26092  $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
26093  $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
26094  OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
26095  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26096  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26097  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26098    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
26099    JVM_ARG_OK=true
26100  else
26101    $ECHO "Arg failed:" >&5
26102    $ECHO "$OUTPUT" >&5
26103    JVM_ARG_OK=false
26104  fi
26105
26106
26107  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
26108  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
26109  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
26110  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26111  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26112  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26113    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
26114    JVM_ARG_OK=true
26115  else
26116    $ECHO "Arg failed:" >&5
26117    $ECHO "$OUTPUT" >&5
26118    JVM_ARG_OK=false
26119  fi
26120
26121
26122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
26123$as_echo "$boot_jdk_jvmargs_big" >&6; }
26124
26125  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
26126
26127
26128
26129  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
26130$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
26131
26132  # Use serial gc for small short lived tools if possible
26133
26134  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
26135  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
26136  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
26137  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26138  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26139  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26140    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
26141    JVM_ARG_OK=true
26142  else
26143    $ECHO "Arg failed:" >&5
26144    $ECHO "$OUTPUT" >&5
26145    JVM_ARG_OK=false
26146  fi
26147
26148
26149  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
26150  $ECHO "Command: $JAVA -Xms32M -version" >&5
26151  OUTPUT=`$JAVA -Xms32M -version 2>&1`
26152  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26153  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26154  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26155    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
26156    JVM_ARG_OK=true
26157  else
26158    $ECHO "Arg failed:" >&5
26159    $ECHO "$OUTPUT" >&5
26160    JVM_ARG_OK=false
26161  fi
26162
26163
26164  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
26165  $ECHO "Command: $JAVA -Xmx512M -version" >&5
26166  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
26167  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26168  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26169  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26170    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
26171    JVM_ARG_OK=true
26172  else
26173    $ECHO "Arg failed:" >&5
26174    $ECHO "$OUTPUT" >&5
26175    JVM_ARG_OK=false
26176  fi
26177
26178
26179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
26180$as_echo "$boot_jdk_jvmargs_small" >&6; }
26181
26182  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
26183
26184
26185
26186###############################################################################
26187#
26188# Configure the sources to use. We can add or override individual directories.
26189#
26190###############################################################################
26191
26192
26193  # Where are the sources. Any of these can be overridden
26194  # using --with-override-corba and the likes.
26195  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26196  CORBA_TOPDIR="$SRC_ROOT/corba"
26197  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26198  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26199  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26200  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26201  JDK_TOPDIR="$SRC_ROOT/jdk"
26202
26203
26204
26205
26206
26207
26208
26209
26210
26211
26212  ###############################################################################
26213  #
26214  # Pickup additional source for a component from outside of the source root
26215  # or override source for a component.
26216  #
26217
26218# Check whether --with-add-source-root was given.
26219if test "${with_add_source_root+set}" = set; then :
26220  withval=$with_add_source_root;
26221fi
26222
26223
26224
26225# Check whether --with-override-source-root was given.
26226if test "${with_override_source_root+set}" = set; then :
26227  withval=$with_override_source_root;
26228fi
26229
26230
26231
26232# Check whether --with-adds-and-overrides was given.
26233if test "${with_adds_and_overrides+set}" = set; then :
26234  withval=$with_adds_and_overrides;
26235fi
26236
26237
26238  if test "x$with_adds_and_overrides" != x; then
26239    with_add_source_root="$with_adds_and_overrides/adds"
26240    with_override_source_root="$with_adds_and_overrides/overrides"
26241  fi
26242
26243  if test "x$with_add_source_root" != x; then
26244    if ! test -d $with_add_source_root; then
26245      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26246    fi
26247    CURDIR="$PWD"
26248    cd "$with_add_source_root"
26249    ADD_SRC_ROOT="`pwd`"
26250    cd "$CURDIR"
26251    # Verify that the addon source root does not have any root makefiles.
26252    # If it does, then it is usually an error, prevent this.
26253    if test -f $with_add_source_root/langtools/make/Makefile; then
26254      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
26255    fi
26256    if test -f $with_add_source_root/corba/make/Makefile; then
26257      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
26258    fi
26259    if test -f $with_add_source_root/jaxp/make/Makefile; then
26260      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
26261    fi
26262    if test -f $with_add_source_root/jaxws/make/Makefile; then
26263      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
26264    fi
26265    if test -f $with_add_source_root/hotspot/make/Makefile; then
26266      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
26267    fi
26268    if test -f $with_add_source_root/nashorn/make/Makefile; then
26269      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
26270    fi
26271    if test -f $with_add_source_root/jdk/make/Makefile; then
26272      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
26273    fi
26274  fi
26275
26276
26277  if test "x$with_override_source_root" != x; then
26278    if ! test -d $with_override_source_root; then
26279      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26280    fi
26281    CURDIR="$PWD"
26282    cd "$with_override_source_root"
26283    OVERRIDE_SRC_ROOT="`pwd`"
26284    cd "$CURDIR"
26285    if test -f $with_override_source_root/langtools/make/Makefile; then
26286      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
26287    fi
26288    if test -f $with_override_source_root/corba/make/Makefile; then
26289      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
26290    fi
26291    if test -f $with_override_source_root/jaxp/make/Makefile; then
26292      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
26293    fi
26294    if test -f $with_override_source_root/jaxws/make/Makefile; then
26295      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
26296    fi
26297    if test -f $with_override_source_root/hotspot/make/Makefile; then
26298      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
26299    fi
26300    if test -f $with_override_source_root/nashorn/make/Makefile; then
26301      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
26302    fi
26303    if test -f $with_override_source_root/jdk/make/Makefile; then
26304      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
26305    fi
26306  fi
26307
26308
26309  ###############################################################################
26310  #
26311  # Override a repo completely, this is used for example when you have 3 small
26312  # development sandboxes of the langtools sources and want to avoid having 3 full
26313  # OpenJDK sources checked out on disk.
26314  #
26315  # Assuming that the 3 langtools sandboxes are located here:
26316  # /home/fredrik/sandbox1/langtools
26317  # /home/fredrik/sandbox2/langtools
26318  # /home/fredrik/sandbox3/langtools
26319  #
26320  # From the source root you create build subdirs manually:
26321  #     mkdir -p build1 build2 build3
26322  # in each build directory run:
26323  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26324  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26325  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26326  #
26327
26328
26329# Check whether --with-override-langtools was given.
26330if test "${with_override_langtools+set}" = set; then :
26331  withval=$with_override_langtools;
26332fi
26333
26334
26335
26336# Check whether --with-override-corba was given.
26337if test "${with_override_corba+set}" = set; then :
26338  withval=$with_override_corba;
26339fi
26340
26341
26342
26343# Check whether --with-override-jaxp was given.
26344if test "${with_override_jaxp+set}" = set; then :
26345  withval=$with_override_jaxp;
26346fi
26347
26348
26349
26350# Check whether --with-override-jaxws was given.
26351if test "${with_override_jaxws+set}" = set; then :
26352  withval=$with_override_jaxws;
26353fi
26354
26355
26356
26357# Check whether --with-override-hotspot was given.
26358if test "${with_override_hotspot+set}" = set; then :
26359  withval=$with_override_hotspot;
26360fi
26361
26362
26363
26364# Check whether --with-override-nashorn was given.
26365if test "${with_override_nashorn+set}" = set; then :
26366  withval=$with_override_nashorn;
26367fi
26368
26369
26370
26371# Check whether --with-override-jdk was given.
26372if test "${with_override_jdk+set}" = set; then :
26373  withval=$with_override_jdk;
26374fi
26375
26376
26377  if test "x$with_override_langtools" != x; then
26378    CURDIR="$PWD"
26379    cd "$with_override_langtools"
26380    LANGTOOLS_TOPDIR="`pwd`"
26381    cd "$CURDIR"
26382    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26383      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26384    fi
26385    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26386$as_echo_n "checking if langtools should be overridden... " >&6; }
26387    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26388$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26389  fi
26390  if test "x$with_override_corba" != x; then
26391    CURDIR="$PWD"
26392    cd "$with_override_corba"
26393    CORBA_TOPDIR="`pwd`"
26394    cd "$CURDIR"
26395    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26396      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26397    fi
26398    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26399$as_echo_n "checking if corba should be overridden... " >&6; }
26400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26401$as_echo "yes with $CORBA_TOPDIR" >&6; }
26402  fi
26403  if test "x$with_override_jaxp" != x; then
26404    CURDIR="$PWD"
26405    cd "$with_override_jaxp"
26406    JAXP_TOPDIR="`pwd`"
26407    cd "$CURDIR"
26408    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26409      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26410    fi
26411    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26412$as_echo_n "checking if jaxp should be overridden... " >&6; }
26413    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26414$as_echo "yes with $JAXP_TOPDIR" >&6; }
26415  fi
26416  if test "x$with_override_jaxws" != x; then
26417    CURDIR="$PWD"
26418    cd "$with_override_jaxws"
26419    JAXWS_TOPDIR="`pwd`"
26420    cd "$CURDIR"
26421    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26422      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26423    fi
26424    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26425$as_echo_n "checking if jaxws should be overridden... " >&6; }
26426    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26427$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26428  fi
26429  if test "x$with_override_hotspot" != x; then
26430    CURDIR="$PWD"
26431    cd "$with_override_hotspot"
26432    HOTSPOT_TOPDIR="`pwd`"
26433    cd "$CURDIR"
26434    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26435      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26436    fi
26437    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26438$as_echo_n "checking if hotspot should be overridden... " >&6; }
26439    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26440$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26441  fi
26442  if test "x$with_override_nashorn" != x; then
26443    CURDIR="$PWD"
26444    cd "$with_override_nashorn"
26445    NASHORN_TOPDIR="`pwd`"
26446    cd "$CURDIR"
26447    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26448      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26449    fi
26450    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26451$as_echo_n "checking if nashorn should be overridden... " >&6; }
26452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26453$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26454  fi
26455  if test "x$with_override_jdk" != x; then
26456    CURDIR="$PWD"
26457    cd "$with_override_jdk"
26458    JDK_TOPDIR="`pwd`"
26459    cd "$CURDIR"
26460    if ! test -f $JDK_TOPDIR/make/Makefile; then
26461      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26462    fi
26463    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26464$as_echo_n "checking if JDK should be overridden... " >&6; }
26465    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26466$as_echo "yes with $JDK_TOPDIR" >&6; }
26467  fi
26468
26469
26470  BUILD_OUTPUT="$OUTPUT_ROOT"
26471
26472
26473  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26474  BUILD_HOTSPOT=true
26475
26476
26477
26478# Check whether --with-import-hotspot was given.
26479if test "${with_import_hotspot+set}" = set; then :
26480  withval=$with_import_hotspot;
26481fi
26482
26483  if test "x$with_import_hotspot" != x; then
26484    CURDIR="$PWD"
26485    cd "$with_import_hotspot"
26486    HOTSPOT_DIST="`pwd`"
26487    cd "$CURDIR"
26488    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26489      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26490    fi
26491    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26492$as_echo_n "checking if hotspot should be imported... " >&6; }
26493    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26494$as_echo "yes from $HOTSPOT_DIST" >&6; }
26495    BUILD_HOTSPOT=false
26496  fi
26497
26498  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26499
26500
26501###############################################################################
26502#
26503# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26504# native code.
26505#
26506###############################################################################
26507
26508# First determine the toolchain type (compiler family)
26509
26510
26511# Check whether --with-toolchain-type was given.
26512if test "${with_toolchain_type+set}" = set; then :
26513  withval=$with_toolchain_type;
26514fi
26515
26516
26517  # Use indirect variable referencing
26518  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26519  VALID_TOOLCHAINS=${!toolchain_var_name}
26520
26521  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26522    # On Mac OS X, default toolchain to clang after Xcode 5
26523    XCODE_VERSION_OUTPUT=`xcodebuild -version 2>&1 | $HEAD -n 1`
26524    $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26525    if test $? -ne 0; then
26526      as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26527    fi
26528    XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26529        $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26530        $CUT -f 1 -d .`
26531    { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26532$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26533    if test $XCODE_MAJOR_VERSION -ge 5; then
26534        DEFAULT_TOOLCHAIN="clang"
26535    else
26536        DEFAULT_TOOLCHAIN="gcc"
26537    fi
26538  else
26539    # First toolchain type in the list is the default
26540    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26541  fi
26542
26543  if test "x$with_toolchain_type" = xlist; then
26544    # List all toolchains
26545    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26546$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26547    for toolchain in $VALID_TOOLCHAINS; do
26548      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26549      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26550      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26551    done
26552
26553    exit 0
26554  elif test "x$with_toolchain_type" != x; then
26555    # User override; check that it is valid
26556    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26557      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26558$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26559      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26560$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26561      as_fn_error $? "Cannot continue." "$LINENO" 5
26562    fi
26563    TOOLCHAIN_TYPE=$with_toolchain_type
26564  else
26565    # No flag given, use default
26566    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26567  fi
26568
26569
26570  TOOLCHAIN_CC_BINARY_clang="clang"
26571  TOOLCHAIN_CC_BINARY_gcc="gcc"
26572  TOOLCHAIN_CC_BINARY_microsoft="cl"
26573  TOOLCHAIN_CC_BINARY_solstudio="cc"
26574  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26575
26576  TOOLCHAIN_CXX_BINARY_clang="clang++"
26577  TOOLCHAIN_CXX_BINARY_gcc="g++"
26578  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26579  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26580  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26581
26582  # Use indirect variable referencing
26583  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26584  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26585  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26586  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26587  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26588  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26589
26590
26591  # Define filename patterns
26592  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26593    LIBRARY_PREFIX=
26594    SHARED_LIBRARY_SUFFIX='.dll'
26595    STATIC_LIBRARY_SUFFIX='.lib'
26596    SHARED_LIBRARY='$1.dll'
26597    STATIC_LIBRARY='$1.lib'
26598    OBJ_SUFFIX='.obj'
26599    EXE_SUFFIX='.exe'
26600  else
26601    LIBRARY_PREFIX=lib
26602    SHARED_LIBRARY_SUFFIX='.so'
26603    STATIC_LIBRARY_SUFFIX='.a'
26604    SHARED_LIBRARY='lib$1.so'
26605    STATIC_LIBRARY='lib$1.a'
26606    OBJ_SUFFIX='.o'
26607    EXE_SUFFIX=''
26608    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26609      SHARED_LIBRARY='lib$1.dylib'
26610      SHARED_LIBRARY_SUFFIX='.dylib'
26611    fi
26612  fi
26613
26614
26615
26616
26617
26618
26619
26620
26621
26622
26623  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26624    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26625$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26626  else
26627    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26628$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26629  fi
26630
26631
26632# Then detect the actual binaries needed
26633
26634  # FIXME: Is this needed?
26635  ac_ext=cpp
26636ac_cpp='$CXXCPP $CPPFLAGS'
26637ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26638ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26639ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26640
26641
26642  # Store the CFLAGS etc passed to the configure script.
26643  ORG_CFLAGS="$CFLAGS"
26644  ORG_CXXFLAGS="$CXXFLAGS"
26645  ORG_OBJCFLAGS="$OBJCFLAGS"
26646
26647  # On Windows, we need to detect the visual studio installation first.
26648  # This will change the PATH, but we need to keep that new PATH even
26649  # after toolchain detection is done, since the compiler (on x86) uses
26650  # it for DLL resolution in runtime.
26651  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26652
26653  # Store path to cygwin link.exe to help excluding it when searching for
26654  # VS linker. This must be done before changing the PATH when looking for VS.
26655  # Extract the first word of "link", so it can be a program name with args.
26656set dummy link; ac_word=$2
26657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26658$as_echo_n "checking for $ac_word... " >&6; }
26659if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26660  $as_echo_n "(cached) " >&6
26661else
26662  case $CYGWIN_LINK in
26663  [\\/]* | ?:[\\/]*)
26664  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26665  ;;
26666  *)
26667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26668for as_dir in $PATH
26669do
26670  IFS=$as_save_IFS
26671  test -z "$as_dir" && as_dir=.
26672    for ac_exec_ext in '' $ac_executable_extensions; do
26673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26674    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26676    break 2
26677  fi
26678done
26679  done
26680IFS=$as_save_IFS
26681
26682  ;;
26683esac
26684fi
26685CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26686if test -n "$CYGWIN_LINK"; then
26687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26688$as_echo "$CYGWIN_LINK" >&6; }
26689else
26690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26691$as_echo "no" >&6; }
26692fi
26693
26694
26695  if test "x$CYGWIN_LINK" != x; then
26696    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26697$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26698    "$CYGWIN_LINK" --version > /dev/null
26699    if test $? -eq 0 ; then
26700      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26701$as_echo "yes" >&6; }
26702    else
26703      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26704$as_echo "no" >&6; }
26705      # This might be the VS linker. Don't exclude it later on.
26706      CYGWIN_LINK=""
26707    fi
26708  fi
26709
26710  # First-hand choice is to locate and run the vsvars bat file.
26711
26712  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26713    VCVARSFILE="vc/bin/vcvars32.bat"
26714  else
26715    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26716  fi
26717
26718  VS_ENV_CMD=""
26719  VS_ENV_ARGS=""
26720  if test "x$with_toolsdir" != x; then
26721
26722  if test "x$VS_ENV_CMD" = x; then
26723    VS100BASE="$with_toolsdir/../.."
26724    METHOD="--with-tools-dir"
26725
26726  windows_path="$VS100BASE"
26727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26728    unix_path=`$CYGPATH -u "$windows_path"`
26729    VS100BASE="$unix_path"
26730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26732    VS100BASE="$unix_path"
26733  fi
26734
26735    if test -d "$VS100BASE"; then
26736      if test -f "$VS100BASE/$VCVARSFILE"; then
26737        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26738$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26739        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26740      else
26741        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26742$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26743        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26744$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26745      fi
26746    fi
26747  fi
26748
26749  fi
26750
26751  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26752    # Having specified an argument which is incorrect will produce an instant failure;
26753    # we should not go on looking
26754    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26755$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26756    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26757$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26758    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26759  fi
26760
26761  if test "x$VS100COMNTOOLS" != x; then
26762
26763  if test "x$VS_ENV_CMD" = x; then
26764    VS100BASE="$VS100COMNTOOLS/../.."
26765    METHOD="VS100COMNTOOLS variable"
26766
26767  windows_path="$VS100BASE"
26768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26769    unix_path=`$CYGPATH -u "$windows_path"`
26770    VS100BASE="$unix_path"
26771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26773    VS100BASE="$unix_path"
26774  fi
26775
26776    if test -d "$VS100BASE"; then
26777      if test -f "$VS100BASE/$VCVARSFILE"; then
26778        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26779$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26780        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26781      else
26782        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26783$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26784        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26785$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26786      fi
26787    fi
26788  fi
26789
26790  fi
26791  if test "x$PROGRAMFILES" != x; then
26792
26793  if test "x$VS_ENV_CMD" = x; then
26794    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26795    METHOD="well-known name"
26796
26797  windows_path="$VS100BASE"
26798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26799    unix_path=`$CYGPATH -u "$windows_path"`
26800    VS100BASE="$unix_path"
26801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26803    VS100BASE="$unix_path"
26804  fi
26805
26806    if test -d "$VS100BASE"; then
26807      if test -f "$VS100BASE/$VCVARSFILE"; then
26808        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26809$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26810        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26811      else
26812        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26813$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26814        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26815$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26816      fi
26817    fi
26818  fi
26819
26820  fi
26821
26822  if test "x$VS_ENV_CMD" = x; then
26823    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26824    METHOD="well-known name"
26825
26826  windows_path="$VS100BASE"
26827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26828    unix_path=`$CYGPATH -u "$windows_path"`
26829    VS100BASE="$unix_path"
26830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26832    VS100BASE="$unix_path"
26833  fi
26834
26835    if test -d "$VS100BASE"; then
26836      if test -f "$VS100BASE/$VCVARSFILE"; then
26837        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26838$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26839        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26840      else
26841        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26842$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26843        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26844$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26845      fi
26846    fi
26847  fi
26848
26849
26850  if test "x$VS_ENV_CMD" = x; then
26851    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26852    METHOD="well-known name"
26853
26854  windows_path="$VS100BASE"
26855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26856    unix_path=`$CYGPATH -u "$windows_path"`
26857    VS100BASE="$unix_path"
26858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26860    VS100BASE="$unix_path"
26861  fi
26862
26863    if test -d "$VS100BASE"; then
26864      if test -f "$VS100BASE/$VCVARSFILE"; then
26865        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26866$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26867        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26868      else
26869        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26870$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26871        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26872$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26873      fi
26874    fi
26875  fi
26876
26877
26878  if test "x$ProgramW6432" != x; then
26879
26880  if test "x$VS_ENV_CMD" = x; then
26881    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26882    METHOD="well-known name"
26883
26884  windows_path="$WIN_SDK_BASE"
26885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26886    unix_path=`$CYGPATH -u "$windows_path"`
26887    WIN_SDK_BASE="$unix_path"
26888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26890    WIN_SDK_BASE="$unix_path"
26891  fi
26892
26893    if test -d "$WIN_SDK_BASE"; then
26894      # There have been cases of partial or broken SDK installations. A missing
26895      # lib dir is not going to work.
26896      if test ! -d "$WIN_SDK_BASE/../lib"; then
26897        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26898$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26899        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26900$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26901      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26902        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26903$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26904        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26905        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26906          VS_ENV_ARGS="/x86"
26907        else
26908          VS_ENV_ARGS="/x64"
26909        fi
26910      else
26911        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26912$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26913        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26914$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26915      fi
26916    fi
26917  fi
26918
26919  fi
26920  if test "x$PROGRAMW6432" != x; then
26921
26922  if test "x$VS_ENV_CMD" = x; then
26923    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
26924    METHOD="well-known name"
26925
26926  windows_path="$WIN_SDK_BASE"
26927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26928    unix_path=`$CYGPATH -u "$windows_path"`
26929    WIN_SDK_BASE="$unix_path"
26930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26932    WIN_SDK_BASE="$unix_path"
26933  fi
26934
26935    if test -d "$WIN_SDK_BASE"; then
26936      # There have been cases of partial or broken SDK installations. A missing
26937      # lib dir is not going to work.
26938      if test ! -d "$WIN_SDK_BASE/../lib"; then
26939        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26940$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26941        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26942$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26943      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26944        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26945$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26946        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26947        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26948          VS_ENV_ARGS="/x86"
26949        else
26950          VS_ENV_ARGS="/x64"
26951        fi
26952      else
26953        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26954$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26955        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26956$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26957      fi
26958    fi
26959  fi
26960
26961  fi
26962  if test "x$PROGRAMFILES" != x; then
26963
26964  if test "x$VS_ENV_CMD" = x; then
26965    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
26966    METHOD="well-known name"
26967
26968  windows_path="$WIN_SDK_BASE"
26969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26970    unix_path=`$CYGPATH -u "$windows_path"`
26971    WIN_SDK_BASE="$unix_path"
26972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26974    WIN_SDK_BASE="$unix_path"
26975  fi
26976
26977    if test -d "$WIN_SDK_BASE"; then
26978      # There have been cases of partial or broken SDK installations. A missing
26979      # lib dir is not going to work.
26980      if test ! -d "$WIN_SDK_BASE/../lib"; then
26981        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26982$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26983        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26984$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26985      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26986        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26987$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26988        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26989        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26990          VS_ENV_ARGS="/x86"
26991        else
26992          VS_ENV_ARGS="/x64"
26993        fi
26994      else
26995        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26996$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26997        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26998$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26999      fi
27000    fi
27001  fi
27002
27003  fi
27004
27005  if test "x$VS_ENV_CMD" = x; then
27006    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
27007    METHOD="well-known name"
27008
27009  windows_path="$WIN_SDK_BASE"
27010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27011    unix_path=`$CYGPATH -u "$windows_path"`
27012    WIN_SDK_BASE="$unix_path"
27013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27015    WIN_SDK_BASE="$unix_path"
27016  fi
27017
27018    if test -d "$WIN_SDK_BASE"; then
27019      # There have been cases of partial or broken SDK installations. A missing
27020      # lib dir is not going to work.
27021      if test ! -d "$WIN_SDK_BASE/../lib"; then
27022        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27023$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27024        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27025$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27026      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27027        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27028$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27029        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27030        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27031          VS_ENV_ARGS="/x86"
27032        else
27033          VS_ENV_ARGS="/x64"
27034        fi
27035      else
27036        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27037$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27038        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27039$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27040      fi
27041    fi
27042  fi
27043
27044
27045  if test "x$VS_ENV_CMD" = x; then
27046    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
27047    METHOD="well-known name"
27048
27049  windows_path="$WIN_SDK_BASE"
27050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27051    unix_path=`$CYGPATH -u "$windows_path"`
27052    WIN_SDK_BASE="$unix_path"
27053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27055    WIN_SDK_BASE="$unix_path"
27056  fi
27057
27058    if test -d "$WIN_SDK_BASE"; then
27059      # There have been cases of partial or broken SDK installations. A missing
27060      # lib dir is not going to work.
27061      if test ! -d "$WIN_SDK_BASE/../lib"; then
27062        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27063$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27064        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27065$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27066      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27067        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27068$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27069        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27070        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27071          VS_ENV_ARGS="/x86"
27072        else
27073          VS_ENV_ARGS="/x64"
27074        fi
27075      else
27076        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27077$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27078        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27079$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27080      fi
27081    fi
27082  fi
27083
27084
27085  if test "x$VS_ENV_CMD" != x; then
27086    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27087
27088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27089
27090  # First separate the path from the arguments. This will split at the first
27091  # space.
27092  complete="$VS_ENV_CMD"
27093  path="${complete%% *}"
27094  tmp="$complete EOL"
27095  arguments="${tmp#* }"
27096
27097  # Input might be given as Windows format, start by converting to
27098  # unix format.
27099  new_path=`$CYGPATH -u "$path"`
27100
27101  # Now try to locate executable using which
27102  new_path=`$WHICH "$new_path" 2> /dev/null`
27103  # bat and cmd files are not always considered executable in cygwin causing which
27104  # to not find them
27105  if test "x$new_path" = x \
27106      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27107      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27108    new_path=`$CYGPATH -u "$path"`
27109  fi
27110  if test "x$new_path" = x; then
27111    # Oops. Which didn't find the executable.
27112    # The splitting of arguments from the executable at a space might have been incorrect,
27113    # since paths with space are more likely in Windows. Give it another try with the whole
27114    # argument.
27115    path="$complete"
27116    arguments="EOL"
27117    new_path=`$CYGPATH -u "$path"`
27118    new_path=`$WHICH "$new_path" 2> /dev/null`
27119    # bat and cmd files are not always considered executable in cygwin causing which
27120    # to not find them
27121    if test "x$new_path" = x \
27122        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27123        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27124      new_path=`$CYGPATH -u "$path"`
27125    fi
27126    if test "x$new_path" = x; then
27127      # It's still not found. Now this is an unrecoverable error.
27128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27129$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27130      has_space=`$ECHO "$complete" | $GREP " "`
27131      if test "x$has_space" != x; then
27132        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27133$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27134      fi
27135      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27136    fi
27137  fi
27138
27139  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27140  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27141  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27142  # "foo.exe" is OK but "foo" is an error.
27143  #
27144  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27145  # It is also a way to make sure we got the proper file name for the real test later on.
27146  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27147  if test "x$test_shortpath" = x; then
27148    # Short path failed, file does not exist as specified.
27149    # Try adding .exe or .cmd
27150    if test -f "${new_path}.exe"; then
27151      input_to_shortpath="${new_path}.exe"
27152    elif test -f "${new_path}.cmd"; then
27153      input_to_shortpath="${new_path}.cmd"
27154    else
27155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27156$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27157      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27158$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27159      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27160    fi
27161  else
27162    input_to_shortpath="$new_path"
27163  fi
27164
27165  # Call helper function which possibly converts this using DOS-style short mode.
27166  # If so, the updated path is stored in $new_path.
27167  new_path="$input_to_shortpath"
27168
27169  input_path="$input_to_shortpath"
27170  # Check if we need to convert this using DOS-style short mode. If the path
27171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27172  # take no chances and rewrite it.
27173  # Note: m4 eats our [], so we need to use [ and ] instead.
27174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27175  if test "x$has_forbidden_chars" != x; then
27176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27177    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27178    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27179    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27180      # Going to short mode and back again did indeed matter. Since short mode is
27181      # case insensitive, let's make it lowercase to improve readability.
27182      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27183      # Now convert it back to Unix-stile (cygpath)
27184      input_path=`$CYGPATH -u "$shortmode_path"`
27185      new_path="$input_path"
27186    fi
27187  fi
27188
27189  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27190  if test "x$test_cygdrive_prefix" = x; then
27191    # As a simple fix, exclude /usr/bin since it's not a real path.
27192    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27193      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27194      # a path prefixed by /cygdrive for fixpath to work.
27195      new_path="$CYGWIN_ROOT_PATH$input_path"
27196    fi
27197  fi
27198
27199  # remove trailing .exe if any
27200  new_path="${new_path/%.exe/}"
27201
27202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27203
27204  # First separate the path from the arguments. This will split at the first
27205  # space.
27206  complete="$VS_ENV_CMD"
27207  path="${complete%% *}"
27208  tmp="$complete EOL"
27209  arguments="${tmp#* }"
27210
27211  # Input might be given as Windows format, start by converting to
27212  # unix format.
27213  new_path="$path"
27214
27215  windows_path="$new_path"
27216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27217    unix_path=`$CYGPATH -u "$windows_path"`
27218    new_path="$unix_path"
27219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27221    new_path="$unix_path"
27222  fi
27223
27224
27225  # Now try to locate executable using which
27226  new_path=`$WHICH "$new_path" 2> /dev/null`
27227
27228  if test "x$new_path" = x; then
27229    # Oops. Which didn't find the executable.
27230    # The splitting of arguments from the executable at a space might have been incorrect,
27231    # since paths with space are more likely in Windows. Give it another try with the whole
27232    # argument.
27233    path="$complete"
27234    arguments="EOL"
27235    new_path="$path"
27236
27237  windows_path="$new_path"
27238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27239    unix_path=`$CYGPATH -u "$windows_path"`
27240    new_path="$unix_path"
27241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27243    new_path="$unix_path"
27244  fi
27245
27246
27247    new_path=`$WHICH "$new_path" 2> /dev/null`
27248
27249    if test "x$new_path" = x; then
27250      # It's still not found. Now this is an unrecoverable error.
27251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27252$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27253      has_space=`$ECHO "$complete" | $GREP " "`
27254      if test "x$has_space" != x; then
27255        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27256$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27257      fi
27258      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27259    fi
27260  fi
27261
27262  # Now new_path has a complete unix path to the binary
27263  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27264    # Keep paths in /bin as-is, but remove trailing .exe if any
27265    new_path="${new_path/%.exe/}"
27266    # Do not save /bin paths to all_fixpath_prefixes!
27267  else
27268    # Not in mixed or Windows style, start by that.
27269    new_path=`cmd //c echo $new_path`
27270
27271  input_path="$new_path"
27272  # Check if we need to convert this using DOS-style short mode. If the path
27273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27274  # take no chances and rewrite it.
27275  # Note: m4 eats our [], so we need to use [ and ] instead.
27276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27277  if test "x$has_forbidden_chars" != x; then
27278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27280  fi
27281
27282    # Output is in $new_path
27283
27284  windows_path="$new_path"
27285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27286    unix_path=`$CYGPATH -u "$windows_path"`
27287    new_path="$unix_path"
27288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27290    new_path="$unix_path"
27291  fi
27292
27293    # remove trailing .exe if any
27294    new_path="${new_path/%.exe/}"
27295
27296    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27297    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27298  fi
27299
27300  else
27301    # We're on a posix platform. Hooray! :)
27302    # First separate the path from the arguments. This will split at the first
27303    # space.
27304    complete="$VS_ENV_CMD"
27305    path="${complete%% *}"
27306    tmp="$complete EOL"
27307    arguments="${tmp#* }"
27308
27309    # Cannot rely on the command "which" here since it doesn't always work.
27310    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27311    if test -z "$is_absolute_path"; then
27312      # Path to executable is not absolute. Find it.
27313      IFS_save="$IFS"
27314      IFS=:
27315      for p in $PATH; do
27316        if test -f "$p/$path" && test -x "$p/$path"; then
27317          new_path="$p/$path"
27318          break
27319        fi
27320      done
27321      IFS="$IFS_save"
27322    else
27323      # This is an absolute path, we can use it without further modifications.
27324      new_path="$path"
27325    fi
27326
27327    if test "x$new_path" = x; then
27328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27329$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27330      has_space=`$ECHO "$complete" | $GREP " "`
27331      if test "x$has_space" != x; then
27332        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27333$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27334      fi
27335      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27336    fi
27337  fi
27338
27339  # Now join together the path and the arguments once again
27340  if test "x$arguments" != xEOL; then
27341    new_complete="$new_path ${arguments% *}"
27342  else
27343    new_complete="$new_path"
27344  fi
27345
27346  if test "x$complete" != "x$new_complete"; then
27347    VS_ENV_CMD="$new_complete"
27348    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27349$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27350  fi
27351
27352
27353    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27354    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27355$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27356    cd $OUTPUT_ROOT
27357    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
27358    # to autoconf standards.
27359
27360    #----
27361
27362    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
27363    # but calculate the difference in Cygwin environment before/after running it and then
27364    # apply the diff.
27365
27366    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
27367      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
27368      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
27369      _dosbash=`cygpath -a -w -s \`which bash\`.*`
27370    else
27371      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
27372      _dosbash=`cmd //c echo \`which bash\``
27373    fi
27374
27375    # generate the set of exported vars before/after the vs10 setup
27376    $ECHO "@echo off"                                           >  localdevenvtmp.bat
27377    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
27378    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
27379    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
27380
27381    # Now execute the newly created bat file.
27382    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
27383    cmd /c localdevenvtmp.bat | cat
27384
27385    # apply the diff (less some non-vs10 vars named by "!")
27386    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
27387    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
27388    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
27389
27390    # cleanup
27391    $RM localdevenvtmp*
27392    #----
27393    cd $CURDIR
27394    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
27395      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27396$as_echo "no" >&6; }
27397      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27398$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27399      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27400$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27401      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27402$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27403      as_fn_error $? "Cannot continue" "$LINENO" 5
27404    fi
27405
27406    # Now set all paths and other env variables. This will allow the rest of
27407    # the configure script to find and run the compiler in the proper way.
27408    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27409$as_echo "$as_me: Setting extracted environment variables" >&6;}
27410    . $OUTPUT_ROOT/localdevenv.sh
27411  else
27412    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27413    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27414$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27415  fi
27416
27417  # At this point, we should have corrent variables in the environment, or we can't continue.
27418  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27419$as_echo_n "checking for Visual Studio variables... " >&6; }
27420
27421  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27422    if test "x$INCLUDE" = x || test "x$LIB" = x; then
27423      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27424$as_echo "present but broken" >&6; }
27425      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27426    else
27427      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27428$as_echo "ok" >&6; }
27429      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
27430      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
27431      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
27432      # Remove any paths containing # (typically F#) as that messes up make
27433      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
27434      VS_PATH="$PATH"
27435
27436
27437
27438    fi
27439  else
27440    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27441$as_echo "not found" >&6; }
27442
27443    if test "x$VS_ENV_CMD" = x; then
27444      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27445$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27446      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27447$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27448    else
27449      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27450$as_echo "$as_me: Running the extraction script failed." >&6;}
27451    fi
27452    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27453$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27454    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27455$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27456    as_fn_error $? "Cannot continue" "$LINENO" 5
27457  fi
27458
27459  fi
27460
27461  # autoconf magic only relies on PATH, so update it if tools dir is specified
27462  OLD_PATH="$PATH"
27463
27464  # For solaris we really need solaris tools, and not the GNU equivalent.
27465  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27466  # so add that to path before starting to probe.
27467  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27468  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27469    PATH="/usr/ccs/bin:$PATH"
27470  fi
27471
27472  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27473  # override all other locations.
27474  if test "x$TOOLCHAIN_PATH" != x; then
27475    PATH=$TOOLCHAIN_PATH:$PATH
27476  fi
27477
27478
27479  #
27480  # Setup the compilers (CC and CXX)
27481  #
27482
27483  COMPILER_NAME=C
27484  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27485
27486  if test "x$CC" != x; then
27487    # User has supplied compiler name already, always let that override.
27488    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27489$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27490    if test "x`basename $CC`" = "x$CC"; then
27491      # A command without a complete path is provided, search $PATH.
27492
27493      for ac_prog in $CC
27494do
27495  # Extract the first word of "$ac_prog", so it can be a program name with args.
27496set dummy $ac_prog; ac_word=$2
27497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27498$as_echo_n "checking for $ac_word... " >&6; }
27499if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27500  $as_echo_n "(cached) " >&6
27501else
27502  case $POTENTIAL_CC in
27503  [\\/]* | ?:[\\/]*)
27504  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27505  ;;
27506  *)
27507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27508for as_dir in $PATH
27509do
27510  IFS=$as_save_IFS
27511  test -z "$as_dir" && as_dir=.
27512    for ac_exec_ext in '' $ac_executable_extensions; do
27513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27514    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27516    break 2
27517  fi
27518done
27519  done
27520IFS=$as_save_IFS
27521
27522  ;;
27523esac
27524fi
27525POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27526if test -n "$POTENTIAL_CC"; then
27527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27528$as_echo "$POTENTIAL_CC" >&6; }
27529else
27530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27531$as_echo "no" >&6; }
27532fi
27533
27534
27535  test -n "$POTENTIAL_CC" && break
27536done
27537
27538      if test "x$POTENTIAL_CC" != x; then
27539        CC=$POTENTIAL_CC
27540      else
27541        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27542      fi
27543    else
27544      # Otherwise it might already be a complete path
27545      if test ! -x "$CC"; then
27546        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27547      fi
27548    fi
27549  else
27550    # No user supplied value. Locate compiler ourselves.
27551
27552    # If we are cross compiling, assume cross compilation tools follows the
27553    # cross compilation standard where they are prefixed with the autoconf
27554    # standard name for the target. For example the binary
27555    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27556    # If we are not cross compiling, then the default compiler name will be
27557    # used.
27558
27559    CC=
27560    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27561    # before checking the rest of the PATH.
27562    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27563    # step, this should not be necessary.
27564    if test -n "$TOOLCHAIN_PATH"; then
27565      PATH_save="$PATH"
27566      PATH="$TOOLCHAIN_PATH"
27567      for ac_prog in $SEARCH_LIST
27568do
27569  # Extract the first word of "$ac_prog", so it can be a program name with args.
27570set dummy $ac_prog; ac_word=$2
27571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27572$as_echo_n "checking for $ac_word... " >&6; }
27573if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27574  $as_echo_n "(cached) " >&6
27575else
27576  case $TOOLCHAIN_PATH_CC in
27577  [\\/]* | ?:[\\/]*)
27578  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27579  ;;
27580  *)
27581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27582for as_dir in $PATH
27583do
27584  IFS=$as_save_IFS
27585  test -z "$as_dir" && as_dir=.
27586    for ac_exec_ext in '' $ac_executable_extensions; do
27587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27588    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27590    break 2
27591  fi
27592done
27593  done
27594IFS=$as_save_IFS
27595
27596  ;;
27597esac
27598fi
27599TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27600if test -n "$TOOLCHAIN_PATH_CC"; then
27601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27602$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27603else
27604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27605$as_echo "no" >&6; }
27606fi
27607
27608
27609  test -n "$TOOLCHAIN_PATH_CC" && break
27610done
27611
27612      CC=$TOOLCHAIN_PATH_CC
27613      PATH="$PATH_save"
27614    fi
27615
27616    # AC_PATH_PROGS can't be run multiple times with the same variable,
27617    # so create a new name for this run.
27618    if test "x$CC" = x; then
27619      for ac_prog in $SEARCH_LIST
27620do
27621  # Extract the first word of "$ac_prog", so it can be a program name with args.
27622set dummy $ac_prog; ac_word=$2
27623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27624$as_echo_n "checking for $ac_word... " >&6; }
27625if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27626  $as_echo_n "(cached) " >&6
27627else
27628  case $POTENTIAL_CC in
27629  [\\/]* | ?:[\\/]*)
27630  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27631  ;;
27632  *)
27633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27634for as_dir in $PATH
27635do
27636  IFS=$as_save_IFS
27637  test -z "$as_dir" && as_dir=.
27638    for ac_exec_ext in '' $ac_executable_extensions; do
27639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27640    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27642    break 2
27643  fi
27644done
27645  done
27646IFS=$as_save_IFS
27647
27648  ;;
27649esac
27650fi
27651POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27652if test -n "$POTENTIAL_CC"; then
27653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27654$as_echo "$POTENTIAL_CC" >&6; }
27655else
27656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27657$as_echo "no" >&6; }
27658fi
27659
27660
27661  test -n "$POTENTIAL_CC" && break
27662done
27663
27664      CC=$POTENTIAL_CC
27665    fi
27666
27667    if test "x$CC" = x; then
27668
27669  # Print a helpful message on how to acquire the necessary build dependency.
27670  # devkit is the help tag: freetype, cups, pulse, alsa etc
27671  MISSING_DEPENDENCY=devkit
27672
27673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27674    cygwin_help $MISSING_DEPENDENCY
27675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27676    msys_help $MISSING_DEPENDENCY
27677  else
27678    PKGHANDLER_COMMAND=
27679
27680    case $PKGHANDLER in
27681      apt-get)
27682        apt_help     $MISSING_DEPENDENCY ;;
27683      yum)
27684        yum_help     $MISSING_DEPENDENCY ;;
27685      port)
27686        port_help    $MISSING_DEPENDENCY ;;
27687      pkgutil)
27688        pkgutil_help $MISSING_DEPENDENCY ;;
27689      pkgadd)
27690        pkgadd_help  $MISSING_DEPENDENCY ;;
27691    esac
27692
27693    if test "x$PKGHANDLER_COMMAND" != x; then
27694      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27695    fi
27696  fi
27697
27698      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27699    fi
27700  fi
27701
27702  # Now we have a compiler binary in CC. Make sure it's okay.
27703
27704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27705
27706  # First separate the path from the arguments. This will split at the first
27707  # space.
27708  complete="$CC"
27709  path="${complete%% *}"
27710  tmp="$complete EOL"
27711  arguments="${tmp#* }"
27712
27713  # Input might be given as Windows format, start by converting to
27714  # unix format.
27715  new_path=`$CYGPATH -u "$path"`
27716
27717  # Now try to locate executable using which
27718  new_path=`$WHICH "$new_path" 2> /dev/null`
27719  # bat and cmd files are not always considered executable in cygwin causing which
27720  # to not find them
27721  if test "x$new_path" = x \
27722      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27723      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27724    new_path=`$CYGPATH -u "$path"`
27725  fi
27726  if test "x$new_path" = x; then
27727    # Oops. Which didn't find the executable.
27728    # The splitting of arguments from the executable at a space might have been incorrect,
27729    # since paths with space are more likely in Windows. Give it another try with the whole
27730    # argument.
27731    path="$complete"
27732    arguments="EOL"
27733    new_path=`$CYGPATH -u "$path"`
27734    new_path=`$WHICH "$new_path" 2> /dev/null`
27735    # bat and cmd files are not always considered executable in cygwin causing which
27736    # to not find them
27737    if test "x$new_path" = x \
27738        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27739        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27740      new_path=`$CYGPATH -u "$path"`
27741    fi
27742    if test "x$new_path" = x; then
27743      # It's still not found. Now this is an unrecoverable error.
27744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27745$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27746      has_space=`$ECHO "$complete" | $GREP " "`
27747      if test "x$has_space" != x; then
27748        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27749$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27750      fi
27751      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27752    fi
27753  fi
27754
27755  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27756  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27757  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27758  # "foo.exe" is OK but "foo" is an error.
27759  #
27760  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27761  # It is also a way to make sure we got the proper file name for the real test later on.
27762  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27763  if test "x$test_shortpath" = x; then
27764    # Short path failed, file does not exist as specified.
27765    # Try adding .exe or .cmd
27766    if test -f "${new_path}.exe"; then
27767      input_to_shortpath="${new_path}.exe"
27768    elif test -f "${new_path}.cmd"; then
27769      input_to_shortpath="${new_path}.cmd"
27770    else
27771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27772$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27773      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27774$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27775      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27776    fi
27777  else
27778    input_to_shortpath="$new_path"
27779  fi
27780
27781  # Call helper function which possibly converts this using DOS-style short mode.
27782  # If so, the updated path is stored in $new_path.
27783  new_path="$input_to_shortpath"
27784
27785  input_path="$input_to_shortpath"
27786  # Check if we need to convert this using DOS-style short mode. If the path
27787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27788  # take no chances and rewrite it.
27789  # Note: m4 eats our [], so we need to use [ and ] instead.
27790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27791  if test "x$has_forbidden_chars" != x; then
27792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27793    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27794    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27795    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27796      # Going to short mode and back again did indeed matter. Since short mode is
27797      # case insensitive, let's make it lowercase to improve readability.
27798      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27799      # Now convert it back to Unix-stile (cygpath)
27800      input_path=`$CYGPATH -u "$shortmode_path"`
27801      new_path="$input_path"
27802    fi
27803  fi
27804
27805  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27806  if test "x$test_cygdrive_prefix" = x; then
27807    # As a simple fix, exclude /usr/bin since it's not a real path.
27808    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27809      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27810      # a path prefixed by /cygdrive for fixpath to work.
27811      new_path="$CYGWIN_ROOT_PATH$input_path"
27812    fi
27813  fi
27814
27815  # remove trailing .exe if any
27816  new_path="${new_path/%.exe/}"
27817
27818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27819
27820  # First separate the path from the arguments. This will split at the first
27821  # space.
27822  complete="$CC"
27823  path="${complete%% *}"
27824  tmp="$complete EOL"
27825  arguments="${tmp#* }"
27826
27827  # Input might be given as Windows format, start by converting to
27828  # unix format.
27829  new_path="$path"
27830
27831  windows_path="$new_path"
27832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27833    unix_path=`$CYGPATH -u "$windows_path"`
27834    new_path="$unix_path"
27835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27837    new_path="$unix_path"
27838  fi
27839
27840
27841  # Now try to locate executable using which
27842  new_path=`$WHICH "$new_path" 2> /dev/null`
27843
27844  if test "x$new_path" = x; then
27845    # Oops. Which didn't find the executable.
27846    # The splitting of arguments from the executable at a space might have been incorrect,
27847    # since paths with space are more likely in Windows. Give it another try with the whole
27848    # argument.
27849    path="$complete"
27850    arguments="EOL"
27851    new_path="$path"
27852
27853  windows_path="$new_path"
27854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27855    unix_path=`$CYGPATH -u "$windows_path"`
27856    new_path="$unix_path"
27857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27859    new_path="$unix_path"
27860  fi
27861
27862
27863    new_path=`$WHICH "$new_path" 2> /dev/null`
27864
27865    if test "x$new_path" = x; then
27866      # It's still not found. Now this is an unrecoverable error.
27867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27868$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27869      has_space=`$ECHO "$complete" | $GREP " "`
27870      if test "x$has_space" != x; then
27871        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27872$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27873      fi
27874      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27875    fi
27876  fi
27877
27878  # Now new_path has a complete unix path to the binary
27879  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27880    # Keep paths in /bin as-is, but remove trailing .exe if any
27881    new_path="${new_path/%.exe/}"
27882    # Do not save /bin paths to all_fixpath_prefixes!
27883  else
27884    # Not in mixed or Windows style, start by that.
27885    new_path=`cmd //c echo $new_path`
27886
27887  input_path="$new_path"
27888  # Check if we need to convert this using DOS-style short mode. If the path
27889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27890  # take no chances and rewrite it.
27891  # Note: m4 eats our [], so we need to use [ and ] instead.
27892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27893  if test "x$has_forbidden_chars" != x; then
27894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27895    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27896  fi
27897
27898    # Output is in $new_path
27899
27900  windows_path="$new_path"
27901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27902    unix_path=`$CYGPATH -u "$windows_path"`
27903    new_path="$unix_path"
27904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27906    new_path="$unix_path"
27907  fi
27908
27909    # remove trailing .exe if any
27910    new_path="${new_path/%.exe/}"
27911
27912    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27913    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27914  fi
27915
27916  else
27917    # We're on a posix platform. Hooray! :)
27918    # First separate the path from the arguments. This will split at the first
27919    # space.
27920    complete="$CC"
27921    path="${complete%% *}"
27922    tmp="$complete EOL"
27923    arguments="${tmp#* }"
27924
27925    # Cannot rely on the command "which" here since it doesn't always work.
27926    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27927    if test -z "$is_absolute_path"; then
27928      # Path to executable is not absolute. Find it.
27929      IFS_save="$IFS"
27930      IFS=:
27931      for p in $PATH; do
27932        if test -f "$p/$path" && test -x "$p/$path"; then
27933          new_path="$p/$path"
27934          break
27935        fi
27936      done
27937      IFS="$IFS_save"
27938    else
27939      # This is an absolute path, we can use it without further modifications.
27940      new_path="$path"
27941    fi
27942
27943    if test "x$new_path" = x; then
27944      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27945$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27946      has_space=`$ECHO "$complete" | $GREP " "`
27947      if test "x$has_space" != x; then
27948        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27949$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27950      fi
27951      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27952    fi
27953  fi
27954
27955  # Now join together the path and the arguments once again
27956  if test "x$arguments" != xEOL; then
27957    new_complete="$new_path ${arguments% *}"
27958  else
27959    new_complete="$new_path"
27960  fi
27961
27962  if test "x$complete" != "x$new_complete"; then
27963    CC="$new_complete"
27964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
27965$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
27966  fi
27967
27968  TEST_COMPILER="$CC"
27969  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
27970  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
27971  if test "x$OPENJDK_BUILD_OS" != xaix; then
27972    # FIXME: This test should not be needed anymore; we don't do that for any platform.
27973    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
27974$as_echo_n "checking resolved symbolic links for CC... " >&6; }
27975
27976  if test "x$OPENJDK_BUILD_OS" != xwindows; then
27977    # Follow a chain of symbolic links. Use readlink
27978    # where it exists, else fall back to horribly
27979    # complicated shell code.
27980    if test "x$READLINK_TESTED" != yes; then
27981      # On MacOSX there is a readlink tool with a different
27982      # purpose than the GNU readlink tool. Check the found readlink.
27983      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27984      if test "x$ISGNU" = x; then
27985        # A readlink that we do not know how to use.
27986        # Are there other non-GNU readlinks out there?
27987        READLINK_TESTED=yes
27988        READLINK=
27989      fi
27990    fi
27991
27992    if test "x$READLINK" != x; then
27993      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
27994    else
27995      # Save the current directory for restoring afterwards
27996      STARTDIR=$PWD
27997      COUNTER=0
27998      sym_link_dir=`$DIRNAME $TEST_COMPILER`
27999      sym_link_file=`$BASENAME $TEST_COMPILER`
28000      cd $sym_link_dir
28001      # Use -P flag to resolve symlinks in directories.
28002      cd `$THEPWDCMD -P`
28003      sym_link_dir=`$THEPWDCMD -P`
28004      # Resolve file symlinks
28005      while test $COUNTER -lt 20; do
28006        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28007        if test "x$ISLINK" == x; then
28008          # This is not a symbolic link! We are done!
28009          break
28010        fi
28011        # Again resolve directory symlinks since the target of the just found
28012        # link could be in a different directory
28013        cd `$DIRNAME $ISLINK`
28014        sym_link_dir=`$THEPWDCMD -P`
28015        sym_link_file=`$BASENAME $ISLINK`
28016        let COUNTER=COUNTER+1
28017      done
28018      cd $STARTDIR
28019      TEST_COMPILER=$sym_link_dir/$sym_link_file
28020    fi
28021  fi
28022
28023    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28024$as_echo "$TEST_COMPILER" >&6; }
28025  fi
28026  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28027$as_echo_n "checking if CC is disguised ccache... " >&6; }
28028
28029  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28030  if test "x$COMPILER_BASENAME" = "xccache"; then
28031    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28032$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28033    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28034    # We want to control ccache invocation ourselves, so ignore this cc and try
28035    # searching again.
28036
28037    # Remove the path to the fake ccache cc from the PATH
28038    RETRY_COMPILER_SAVED_PATH="$PATH"
28039    COMPILER_DIRNAME=`$DIRNAME $CC`
28040    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28041
28042    # Try again looking for our compiler
28043    if test -n "$ac_tool_prefix"; then
28044  for ac_prog in $TOOLCHAIN_CC_BINARY
28045  do
28046    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28047set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28049$as_echo_n "checking for $ac_word... " >&6; }
28050if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28051  $as_echo_n "(cached) " >&6
28052else
28053  if test -n "$PROPER_COMPILER_CC"; then
28054  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28055else
28056as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28057for as_dir in $PATH
28058do
28059  IFS=$as_save_IFS
28060  test -z "$as_dir" && as_dir=.
28061    for ac_exec_ext in '' $ac_executable_extensions; do
28062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28063    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28065    break 2
28066  fi
28067done
28068  done
28069IFS=$as_save_IFS
28070
28071fi
28072fi
28073PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28074if test -n "$PROPER_COMPILER_CC"; then
28075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28076$as_echo "$PROPER_COMPILER_CC" >&6; }
28077else
28078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28079$as_echo "no" >&6; }
28080fi
28081
28082
28083    test -n "$PROPER_COMPILER_CC" && break
28084  done
28085fi
28086if test -z "$PROPER_COMPILER_CC"; then
28087  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28088  for ac_prog in $TOOLCHAIN_CC_BINARY
28089do
28090  # Extract the first word of "$ac_prog", so it can be a program name with args.
28091set dummy $ac_prog; ac_word=$2
28092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28093$as_echo_n "checking for $ac_word... " >&6; }
28094if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28095  $as_echo_n "(cached) " >&6
28096else
28097  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28098  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28099else
28100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28101for as_dir in $PATH
28102do
28103  IFS=$as_save_IFS
28104  test -z "$as_dir" && as_dir=.
28105    for ac_exec_ext in '' $ac_executable_extensions; do
28106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28107    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28109    break 2
28110  fi
28111done
28112  done
28113IFS=$as_save_IFS
28114
28115fi
28116fi
28117ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28118if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28120$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28121else
28122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28123$as_echo "no" >&6; }
28124fi
28125
28126
28127  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28128done
28129
28130  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28131    PROPER_COMPILER_CC=""
28132  else
28133    case $cross_compiling:$ac_tool_warned in
28134yes:)
28135{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28136$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28137ac_tool_warned=yes ;;
28138esac
28139    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28140  fi
28141fi
28142
28143
28144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28145
28146  # First separate the path from the arguments. This will split at the first
28147  # space.
28148  complete="$PROPER_COMPILER_CC"
28149  path="${complete%% *}"
28150  tmp="$complete EOL"
28151  arguments="${tmp#* }"
28152
28153  # Input might be given as Windows format, start by converting to
28154  # unix format.
28155  new_path=`$CYGPATH -u "$path"`
28156
28157  # Now try to locate executable using which
28158  new_path=`$WHICH "$new_path" 2> /dev/null`
28159  # bat and cmd files are not always considered executable in cygwin causing which
28160  # to not find them
28161  if test "x$new_path" = x \
28162      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28163      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28164    new_path=`$CYGPATH -u "$path"`
28165  fi
28166  if test "x$new_path" = x; then
28167    # Oops. Which didn't find the executable.
28168    # The splitting of arguments from the executable at a space might have been incorrect,
28169    # since paths with space are more likely in Windows. Give it another try with the whole
28170    # argument.
28171    path="$complete"
28172    arguments="EOL"
28173    new_path=`$CYGPATH -u "$path"`
28174    new_path=`$WHICH "$new_path" 2> /dev/null`
28175    # bat and cmd files are not always considered executable in cygwin causing which
28176    # to not find them
28177    if test "x$new_path" = x \
28178        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28179        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28180      new_path=`$CYGPATH -u "$path"`
28181    fi
28182    if test "x$new_path" = x; then
28183      # It's still not found. Now this is an unrecoverable error.
28184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28185$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28186      has_space=`$ECHO "$complete" | $GREP " "`
28187      if test "x$has_space" != x; then
28188        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28189$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28190      fi
28191      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28192    fi
28193  fi
28194
28195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28198  # "foo.exe" is OK but "foo" is an error.
28199  #
28200  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28201  # It is also a way to make sure we got the proper file name for the real test later on.
28202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28203  if test "x$test_shortpath" = x; then
28204    # Short path failed, file does not exist as specified.
28205    # Try adding .exe or .cmd
28206    if test -f "${new_path}.exe"; then
28207      input_to_shortpath="${new_path}.exe"
28208    elif test -f "${new_path}.cmd"; then
28209      input_to_shortpath="${new_path}.cmd"
28210    else
28211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28212$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28213      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28214$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28215      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28216    fi
28217  else
28218    input_to_shortpath="$new_path"
28219  fi
28220
28221  # Call helper function which possibly converts this using DOS-style short mode.
28222  # If so, the updated path is stored in $new_path.
28223  new_path="$input_to_shortpath"
28224
28225  input_path="$input_to_shortpath"
28226  # Check if we need to convert this using DOS-style short mode. If the path
28227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28228  # take no chances and rewrite it.
28229  # Note: m4 eats our [], so we need to use [ and ] instead.
28230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28231  if test "x$has_forbidden_chars" != x; then
28232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28233    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28234    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28235    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28236      # Going to short mode and back again did indeed matter. Since short mode is
28237      # case insensitive, let's make it lowercase to improve readability.
28238      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28239      # Now convert it back to Unix-stile (cygpath)
28240      input_path=`$CYGPATH -u "$shortmode_path"`
28241      new_path="$input_path"
28242    fi
28243  fi
28244
28245  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28246  if test "x$test_cygdrive_prefix" = x; then
28247    # As a simple fix, exclude /usr/bin since it's not a real path.
28248    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28249      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28250      # a path prefixed by /cygdrive for fixpath to work.
28251      new_path="$CYGWIN_ROOT_PATH$input_path"
28252    fi
28253  fi
28254
28255  # remove trailing .exe if any
28256  new_path="${new_path/%.exe/}"
28257
28258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28259
28260  # First separate the path from the arguments. This will split at the first
28261  # space.
28262  complete="$PROPER_COMPILER_CC"
28263  path="${complete%% *}"
28264  tmp="$complete EOL"
28265  arguments="${tmp#* }"
28266
28267  # Input might be given as Windows format, start by converting to
28268  # unix format.
28269  new_path="$path"
28270
28271  windows_path="$new_path"
28272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28273    unix_path=`$CYGPATH -u "$windows_path"`
28274    new_path="$unix_path"
28275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28277    new_path="$unix_path"
28278  fi
28279
28280
28281  # Now try to locate executable using which
28282  new_path=`$WHICH "$new_path" 2> /dev/null`
28283
28284  if test "x$new_path" = x; then
28285    # Oops. Which didn't find the executable.
28286    # The splitting of arguments from the executable at a space might have been incorrect,
28287    # since paths with space are more likely in Windows. Give it another try with the whole
28288    # argument.
28289    path="$complete"
28290    arguments="EOL"
28291    new_path="$path"
28292
28293  windows_path="$new_path"
28294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28295    unix_path=`$CYGPATH -u "$windows_path"`
28296    new_path="$unix_path"
28297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28299    new_path="$unix_path"
28300  fi
28301
28302
28303    new_path=`$WHICH "$new_path" 2> /dev/null`
28304
28305    if test "x$new_path" = x; then
28306      # It's still not found. Now this is an unrecoverable error.
28307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28308$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28309      has_space=`$ECHO "$complete" | $GREP " "`
28310      if test "x$has_space" != x; then
28311        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28312$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28313      fi
28314      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28315    fi
28316  fi
28317
28318  # Now new_path has a complete unix path to the binary
28319  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28320    # Keep paths in /bin as-is, but remove trailing .exe if any
28321    new_path="${new_path/%.exe/}"
28322    # Do not save /bin paths to all_fixpath_prefixes!
28323  else
28324    # Not in mixed or Windows style, start by that.
28325    new_path=`cmd //c echo $new_path`
28326
28327  input_path="$new_path"
28328  # Check if we need to convert this using DOS-style short mode. If the path
28329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28330  # take no chances and rewrite it.
28331  # Note: m4 eats our [], so we need to use [ and ] instead.
28332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28333  if test "x$has_forbidden_chars" != x; then
28334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28335    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28336  fi
28337
28338    # Output is in $new_path
28339
28340  windows_path="$new_path"
28341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28342    unix_path=`$CYGPATH -u "$windows_path"`
28343    new_path="$unix_path"
28344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28346    new_path="$unix_path"
28347  fi
28348
28349    # remove trailing .exe if any
28350    new_path="${new_path/%.exe/}"
28351
28352    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28353    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28354  fi
28355
28356  else
28357    # We're on a posix platform. Hooray! :)
28358    # First separate the path from the arguments. This will split at the first
28359    # space.
28360    complete="$PROPER_COMPILER_CC"
28361    path="${complete%% *}"
28362    tmp="$complete EOL"
28363    arguments="${tmp#* }"
28364
28365    # Cannot rely on the command "which" here since it doesn't always work.
28366    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28367    if test -z "$is_absolute_path"; then
28368      # Path to executable is not absolute. Find it.
28369      IFS_save="$IFS"
28370      IFS=:
28371      for p in $PATH; do
28372        if test -f "$p/$path" && test -x "$p/$path"; then
28373          new_path="$p/$path"
28374          break
28375        fi
28376      done
28377      IFS="$IFS_save"
28378    else
28379      # This is an absolute path, we can use it without further modifications.
28380      new_path="$path"
28381    fi
28382
28383    if test "x$new_path" = x; then
28384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28385$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28386      has_space=`$ECHO "$complete" | $GREP " "`
28387      if test "x$has_space" != x; then
28388        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28389$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28390      fi
28391      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28392    fi
28393  fi
28394
28395  # Now join together the path and the arguments once again
28396  if test "x$arguments" != xEOL; then
28397    new_complete="$new_path ${arguments% *}"
28398  else
28399    new_complete="$new_path"
28400  fi
28401
28402  if test "x$complete" != "x$new_complete"; then
28403    PROPER_COMPILER_CC="$new_complete"
28404    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28405$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28406  fi
28407
28408    PATH="$RETRY_COMPILER_SAVED_PATH"
28409
28410    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28411$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28412
28413  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28414    # Follow a chain of symbolic links. Use readlink
28415    # where it exists, else fall back to horribly
28416    # complicated shell code.
28417    if test "x$READLINK_TESTED" != yes; then
28418      # On MacOSX there is a readlink tool with a different
28419      # purpose than the GNU readlink tool. Check the found readlink.
28420      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28421      if test "x$ISGNU" = x; then
28422        # A readlink that we do not know how to use.
28423        # Are there other non-GNU readlinks out there?
28424        READLINK_TESTED=yes
28425        READLINK=
28426      fi
28427    fi
28428
28429    if test "x$READLINK" != x; then
28430      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28431    else
28432      # Save the current directory for restoring afterwards
28433      STARTDIR=$PWD
28434      COUNTER=0
28435      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28436      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28437      cd $sym_link_dir
28438      # Use -P flag to resolve symlinks in directories.
28439      cd `$THEPWDCMD -P`
28440      sym_link_dir=`$THEPWDCMD -P`
28441      # Resolve file symlinks
28442      while test $COUNTER -lt 20; do
28443        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28444        if test "x$ISLINK" == x; then
28445          # This is not a symbolic link! We are done!
28446          break
28447        fi
28448        # Again resolve directory symlinks since the target of the just found
28449        # link could be in a different directory
28450        cd `$DIRNAME $ISLINK`
28451        sym_link_dir=`$THEPWDCMD -P`
28452        sym_link_file=`$BASENAME $ISLINK`
28453        let COUNTER=COUNTER+1
28454      done
28455      cd $STARTDIR
28456      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28457    fi
28458  fi
28459
28460    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28461$as_echo "$PROPER_COMPILER_CC" >&6; }
28462    CC="$PROPER_COMPILER_CC"
28463  else
28464    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28465$as_echo "no, keeping CC" >&6; }
28466  fi
28467
28468
28469  COMPILER=$CC
28470  COMPILER_NAME=$COMPILER_NAME
28471
28472  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28473    # cc -V output typically looks like
28474    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28475    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28476    # Check that this is likely to be the Solaris Studio cc.
28477    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28478    if test $? -ne 0; then
28479      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28480      { $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
28481$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28482      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28483$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28484      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28485$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28486      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28487    fi
28488    # Remove usage instructions (if present), and
28489    # collapse compiler output into a single line
28490    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28491        $SED -e 's/ *[Uu]sage:.*//'`
28492    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28493        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28494  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28495    # xlc -qversion output typically looks like
28496    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28497    #     Version: 11.01.0000.0015
28498    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28499    # Check that this is likely to be the IBM XL C compiler.
28500    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28501    if test $? -ne 0; then
28502      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28503      { $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
28504$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28505      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28506$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28507      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28508$as_echo "$as_me: The result from running with --version was: \"$ALT_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/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28515  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28516    # There is no specific version flag, but all output starts with a version string.
28517    # First line typically looks something like:
28518    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28519    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28520    # Check that this is likely to be Microsoft CL.EXE.
28521    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28522    if test $? -ne 0; then
28523      { $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
28524$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28525      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28526$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28527      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28528    fi
28529    # Collapse compiler output into a single line
28530    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28531    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28532        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28533  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28534    # gcc --version output typically looks like
28535    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28536    #     Copyright (C) 2013 Free Software Foundation, Inc.
28537    #     This is free software; see the source for copying conditions.  There is NO
28538    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28539    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28540    # Check that this is likely to be GCC.
28541    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28542    if test $? -ne 0; then
28543      { $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
28544$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28545      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28546$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28547      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28548    fi
28549    # Remove Copyright and legalese from version string, and
28550    # collapse into a single line
28551    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28552        $SED -e 's/ *Copyright .*//'`
28553    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28554        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28555  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28556    # clang --version output typically looks like
28557    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28558    #    clang version 3.3 (tags/RELEASE_33/final)
28559    # or
28560    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28561    #    Target: x86_64-pc-linux-gnu
28562    #    Thread model: posix
28563    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28564    # Check that this is likely to be clang
28565    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28566    if test $? -ne 0; then
28567      { $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
28568$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28569      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28570$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28571      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28572    fi
28573    # Collapse compiler output into a single line
28574    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28575    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28576        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28577  else
28578      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28579  fi
28580  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28581  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28582  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28583  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28584
28585  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28586$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28587
28588
28589  # Now that we have resolved CC ourself, let autoconf have its go at it
28590  ac_ext=c
28591ac_cpp='$CPP $CPPFLAGS'
28592ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28593ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28594ac_compiler_gnu=$ac_cv_c_compiler_gnu
28595if test -n "$ac_tool_prefix"; then
28596  for ac_prog in $CC
28597  do
28598    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28599set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28601$as_echo_n "checking for $ac_word... " >&6; }
28602if ${ac_cv_prog_CC+:} false; then :
28603  $as_echo_n "(cached) " >&6
28604else
28605  if test -n "$CC"; then
28606  ac_cv_prog_CC="$CC" # Let the user override the test.
28607else
28608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28609for as_dir in $PATH
28610do
28611  IFS=$as_save_IFS
28612  test -z "$as_dir" && as_dir=.
28613    for ac_exec_ext in '' $ac_executable_extensions; do
28614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28615    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28617    break 2
28618  fi
28619done
28620  done
28621IFS=$as_save_IFS
28622
28623fi
28624fi
28625CC=$ac_cv_prog_CC
28626if test -n "$CC"; then
28627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28628$as_echo "$CC" >&6; }
28629else
28630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28631$as_echo "no" >&6; }
28632fi
28633
28634
28635    test -n "$CC" && break
28636  done
28637fi
28638if test -z "$CC"; then
28639  ac_ct_CC=$CC
28640  for ac_prog in $CC
28641do
28642  # Extract the first word of "$ac_prog", so it can be a program name with args.
28643set dummy $ac_prog; ac_word=$2
28644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28645$as_echo_n "checking for $ac_word... " >&6; }
28646if ${ac_cv_prog_ac_ct_CC+:} false; then :
28647  $as_echo_n "(cached) " >&6
28648else
28649  if test -n "$ac_ct_CC"; then
28650  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28651else
28652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28653for as_dir in $PATH
28654do
28655  IFS=$as_save_IFS
28656  test -z "$as_dir" && as_dir=.
28657    for ac_exec_ext in '' $ac_executable_extensions; do
28658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28659    ac_cv_prog_ac_ct_CC="$ac_prog"
28660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28661    break 2
28662  fi
28663done
28664  done
28665IFS=$as_save_IFS
28666
28667fi
28668fi
28669ac_ct_CC=$ac_cv_prog_ac_ct_CC
28670if test -n "$ac_ct_CC"; then
28671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28672$as_echo "$ac_ct_CC" >&6; }
28673else
28674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28675$as_echo "no" >&6; }
28676fi
28677
28678
28679  test -n "$ac_ct_CC" && break
28680done
28681
28682  if test "x$ac_ct_CC" = x; then
28683    CC=""
28684  else
28685    case $cross_compiling:$ac_tool_warned in
28686yes:)
28687{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28688$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28689ac_tool_warned=yes ;;
28690esac
28691    CC=$ac_ct_CC
28692  fi
28693fi
28694
28695
28696test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28697$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28698as_fn_error $? "no acceptable C compiler found in \$PATH
28699See \`config.log' for more details" "$LINENO" 5; }
28700
28701# Provide some information about the compiler.
28702$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28703set X $ac_compile
28704ac_compiler=$2
28705for ac_option in --version -v -V -qversion; do
28706  { { ac_try="$ac_compiler $ac_option >&5"
28707case "(($ac_try" in
28708  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28709  *) ac_try_echo=$ac_try;;
28710esac
28711eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28712$as_echo "$ac_try_echo"; } >&5
28713  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28714  ac_status=$?
28715  if test -s conftest.err; then
28716    sed '10a\
28717... rest of stderr output deleted ...
28718         10q' conftest.err >conftest.er1
28719    cat conftest.er1 >&5
28720  fi
28721  rm -f conftest.er1 conftest.err
28722  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28723  test $ac_status = 0; }
28724done
28725
28726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28727/* end confdefs.h.  */
28728
28729int
28730main ()
28731{
28732
28733  ;
28734  return 0;
28735}
28736_ACEOF
28737ac_clean_files_save=$ac_clean_files
28738ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28739# Try to create an executable without -o first, disregard a.out.
28740# It will help us diagnose broken compilers, and finding out an intuition
28741# of exeext.
28742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28743$as_echo_n "checking whether the C compiler works... " >&6; }
28744ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28745
28746# The possible output files:
28747ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28748
28749ac_rmfiles=
28750for ac_file in $ac_files
28751do
28752  case $ac_file in
28753    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28754    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28755  esac
28756done
28757rm -f $ac_rmfiles
28758
28759if { { ac_try="$ac_link_default"
28760case "(($ac_try" in
28761  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28762  *) ac_try_echo=$ac_try;;
28763esac
28764eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28765$as_echo "$ac_try_echo"; } >&5
28766  (eval "$ac_link_default") 2>&5
28767  ac_status=$?
28768  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28769  test $ac_status = 0; }; then :
28770  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28771# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28772# in a Makefile.  We should not override ac_cv_exeext if it was cached,
28773# so that the user can short-circuit this test for compilers unknown to
28774# Autoconf.
28775for ac_file in $ac_files ''
28776do
28777  test -f "$ac_file" || continue
28778  case $ac_file in
28779    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28780	;;
28781    [ab].out )
28782	# We found the default executable, but exeext='' is most
28783	# certainly right.
28784	break;;
28785    *.* )
28786	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28787	then :; else
28788	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28789	fi
28790	# We set ac_cv_exeext here because the later test for it is not
28791	# safe: cross compilers may not add the suffix if given an `-o'
28792	# argument, so we may need to know it at that point already.
28793	# Even if this section looks crufty: it has the advantage of
28794	# actually working.
28795	break;;
28796    * )
28797	break;;
28798  esac
28799done
28800test "$ac_cv_exeext" = no && ac_cv_exeext=
28801
28802else
28803  ac_file=''
28804fi
28805if test -z "$ac_file"; then :
28806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28807$as_echo "no" >&6; }
28808$as_echo "$as_me: failed program was:" >&5
28809sed 's/^/| /' conftest.$ac_ext >&5
28810
28811{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28812$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28813as_fn_error 77 "C compiler cannot create executables
28814See \`config.log' for more details" "$LINENO" 5; }
28815else
28816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28817$as_echo "yes" >&6; }
28818fi
28819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28820$as_echo_n "checking for C compiler default output file name... " >&6; }
28821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28822$as_echo "$ac_file" >&6; }
28823ac_exeext=$ac_cv_exeext
28824
28825rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28826ac_clean_files=$ac_clean_files_save
28827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28828$as_echo_n "checking for suffix of executables... " >&6; }
28829if { { ac_try="$ac_link"
28830case "(($ac_try" in
28831  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28832  *) ac_try_echo=$ac_try;;
28833esac
28834eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28835$as_echo "$ac_try_echo"; } >&5
28836  (eval "$ac_link") 2>&5
28837  ac_status=$?
28838  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28839  test $ac_status = 0; }; then :
28840  # If both `conftest.exe' and `conftest' are `present' (well, observable)
28841# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28842# work properly (i.e., refer to `conftest.exe'), while it won't with
28843# `rm'.
28844for ac_file in conftest.exe conftest conftest.*; do
28845  test -f "$ac_file" || continue
28846  case $ac_file in
28847    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28848    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28849	  break;;
28850    * ) break;;
28851  esac
28852done
28853else
28854  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28855$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28856as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28857See \`config.log' for more details" "$LINENO" 5; }
28858fi
28859rm -f conftest conftest$ac_cv_exeext
28860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28861$as_echo "$ac_cv_exeext" >&6; }
28862
28863rm -f conftest.$ac_ext
28864EXEEXT=$ac_cv_exeext
28865ac_exeext=$EXEEXT
28866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28867/* end confdefs.h.  */
28868#include <stdio.h>
28869int
28870main ()
28871{
28872FILE *f = fopen ("conftest.out", "w");
28873 return ferror (f) || fclose (f) != 0;
28874
28875  ;
28876  return 0;
28877}
28878_ACEOF
28879ac_clean_files="$ac_clean_files conftest.out"
28880# Check that the compiler produces executables we can run.  If not, either
28881# the compiler is broken, or we cross compile.
28882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28883$as_echo_n "checking whether we are cross compiling... " >&6; }
28884if test "$cross_compiling" != yes; then
28885  { { ac_try="$ac_link"
28886case "(($ac_try" in
28887  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28888  *) ac_try_echo=$ac_try;;
28889esac
28890eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28891$as_echo "$ac_try_echo"; } >&5
28892  (eval "$ac_link") 2>&5
28893  ac_status=$?
28894  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28895  test $ac_status = 0; }
28896  if { ac_try='./conftest$ac_cv_exeext'
28897  { { case "(($ac_try" in
28898  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28899  *) ac_try_echo=$ac_try;;
28900esac
28901eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28902$as_echo "$ac_try_echo"; } >&5
28903  (eval "$ac_try") 2>&5
28904  ac_status=$?
28905  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28906  test $ac_status = 0; }; }; then
28907    cross_compiling=no
28908  else
28909    if test "$cross_compiling" = maybe; then
28910	cross_compiling=yes
28911    else
28912	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28913$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28914as_fn_error $? "cannot run C compiled programs.
28915If you meant to cross compile, use \`--host'.
28916See \`config.log' for more details" "$LINENO" 5; }
28917    fi
28918  fi
28919fi
28920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
28921$as_echo "$cross_compiling" >&6; }
28922
28923rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
28924ac_clean_files=$ac_clean_files_save
28925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
28926$as_echo_n "checking for suffix of object files... " >&6; }
28927if ${ac_cv_objext+:} false; then :
28928  $as_echo_n "(cached) " >&6
28929else
28930  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28931/* end confdefs.h.  */
28932
28933int
28934main ()
28935{
28936
28937  ;
28938  return 0;
28939}
28940_ACEOF
28941rm -f conftest.o conftest.obj
28942if { { ac_try="$ac_compile"
28943case "(($ac_try" in
28944  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28945  *) ac_try_echo=$ac_try;;
28946esac
28947eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28948$as_echo "$ac_try_echo"; } >&5
28949  (eval "$ac_compile") 2>&5
28950  ac_status=$?
28951  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28952  test $ac_status = 0; }; then :
28953  for ac_file in conftest.o conftest.obj conftest.*; do
28954  test -f "$ac_file" || continue;
28955  case $ac_file in
28956    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
28957    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
28958       break;;
28959  esac
28960done
28961else
28962  $as_echo "$as_me: failed program was:" >&5
28963sed 's/^/| /' conftest.$ac_ext >&5
28964
28965{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28966$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28967as_fn_error $? "cannot compute suffix of object files: cannot compile
28968See \`config.log' for more details" "$LINENO" 5; }
28969fi
28970rm -f conftest.$ac_cv_objext conftest.$ac_ext
28971fi
28972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
28973$as_echo "$ac_cv_objext" >&6; }
28974OBJEXT=$ac_cv_objext
28975ac_objext=$OBJEXT
28976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
28977$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
28978if ${ac_cv_c_compiler_gnu+:} false; then :
28979  $as_echo_n "(cached) " >&6
28980else
28981  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28982/* end confdefs.h.  */
28983
28984int
28985main ()
28986{
28987#ifndef __GNUC__
28988       choke me
28989#endif
28990
28991  ;
28992  return 0;
28993}
28994_ACEOF
28995if ac_fn_c_try_compile "$LINENO"; then :
28996  ac_compiler_gnu=yes
28997else
28998  ac_compiler_gnu=no
28999fi
29000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29001ac_cv_c_compiler_gnu=$ac_compiler_gnu
29002
29003fi
29004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29005$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29006if test $ac_compiler_gnu = yes; then
29007  GCC=yes
29008else
29009  GCC=
29010fi
29011ac_test_CFLAGS=${CFLAGS+set}
29012ac_save_CFLAGS=$CFLAGS
29013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29014$as_echo_n "checking whether $CC accepts -g... " >&6; }
29015if ${ac_cv_prog_cc_g+:} false; then :
29016  $as_echo_n "(cached) " >&6
29017else
29018  ac_save_c_werror_flag=$ac_c_werror_flag
29019   ac_c_werror_flag=yes
29020   ac_cv_prog_cc_g=no
29021   CFLAGS="-g"
29022   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29023/* end confdefs.h.  */
29024
29025int
29026main ()
29027{
29028
29029  ;
29030  return 0;
29031}
29032_ACEOF
29033if ac_fn_c_try_compile "$LINENO"; then :
29034  ac_cv_prog_cc_g=yes
29035else
29036  CFLAGS=""
29037      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29038/* end confdefs.h.  */
29039
29040int
29041main ()
29042{
29043
29044  ;
29045  return 0;
29046}
29047_ACEOF
29048if ac_fn_c_try_compile "$LINENO"; then :
29049
29050else
29051  ac_c_werror_flag=$ac_save_c_werror_flag
29052	 CFLAGS="-g"
29053	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29054/* end confdefs.h.  */
29055
29056int
29057main ()
29058{
29059
29060  ;
29061  return 0;
29062}
29063_ACEOF
29064if ac_fn_c_try_compile "$LINENO"; then :
29065  ac_cv_prog_cc_g=yes
29066fi
29067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29068fi
29069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29070fi
29071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29072   ac_c_werror_flag=$ac_save_c_werror_flag
29073fi
29074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29075$as_echo "$ac_cv_prog_cc_g" >&6; }
29076if test "$ac_test_CFLAGS" = set; then
29077  CFLAGS=$ac_save_CFLAGS
29078elif test $ac_cv_prog_cc_g = yes; then
29079  if test "$GCC" = yes; then
29080    CFLAGS="-g -O2"
29081  else
29082    CFLAGS="-g"
29083  fi
29084else
29085  if test "$GCC" = yes; then
29086    CFLAGS="-O2"
29087  else
29088    CFLAGS=
29089  fi
29090fi
29091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29092$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29093if ${ac_cv_prog_cc_c89+:} false; then :
29094  $as_echo_n "(cached) " >&6
29095else
29096  ac_cv_prog_cc_c89=no
29097ac_save_CC=$CC
29098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29099/* end confdefs.h.  */
29100#include <stdarg.h>
29101#include <stdio.h>
29102struct stat;
29103/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29104struct buf { int x; };
29105FILE * (*rcsopen) (struct buf *, struct stat *, int);
29106static char *e (p, i)
29107     char **p;
29108     int i;
29109{
29110  return p[i];
29111}
29112static char *f (char * (*g) (char **, int), char **p, ...)
29113{
29114  char *s;
29115  va_list v;
29116  va_start (v,p);
29117  s = g (p, va_arg (v,int));
29118  va_end (v);
29119  return s;
29120}
29121
29122/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29123   function prototypes and stuff, but not '\xHH' hex character constants.
29124   These don't provoke an error unfortunately, instead are silently treated
29125   as 'x'.  The following induces an error, until -std is added to get
29126   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29127   array size at least.  It's necessary to write '\x00'==0 to get something
29128   that's true only with -std.  */
29129int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29130
29131/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29132   inside strings and character constants.  */
29133#define FOO(x) 'x'
29134int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29135
29136int test (int i, double x);
29137struct s1 {int (*f) (int a);};
29138struct s2 {int (*f) (double a);};
29139int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29140int argc;
29141char **argv;
29142int
29143main ()
29144{
29145return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29146  ;
29147  return 0;
29148}
29149_ACEOF
29150for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29151	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29152do
29153  CC="$ac_save_CC $ac_arg"
29154  if ac_fn_c_try_compile "$LINENO"; then :
29155  ac_cv_prog_cc_c89=$ac_arg
29156fi
29157rm -f core conftest.err conftest.$ac_objext
29158  test "x$ac_cv_prog_cc_c89" != "xno" && break
29159done
29160rm -f conftest.$ac_ext
29161CC=$ac_save_CC
29162
29163fi
29164# AC_CACHE_VAL
29165case "x$ac_cv_prog_cc_c89" in
29166  x)
29167    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29168$as_echo "none needed" >&6; } ;;
29169  xno)
29170    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29171$as_echo "unsupported" >&6; } ;;
29172  *)
29173    CC="$CC $ac_cv_prog_cc_c89"
29174    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29175$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29176esac
29177if test "x$ac_cv_prog_cc_c89" != xno; then :
29178
29179fi
29180
29181ac_ext=cpp
29182ac_cpp='$CXXCPP $CPPFLAGS'
29183ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29184ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29185ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29186
29187
29188
29189  COMPILER_NAME=C++
29190  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29191
29192  if test "x$CXX" != x; then
29193    # User has supplied compiler name already, always let that override.
29194    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29195$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29196    if test "x`basename $CXX`" = "x$CXX"; then
29197      # A command without a complete path is provided, search $PATH.
29198
29199      for ac_prog in $CXX
29200do
29201  # Extract the first word of "$ac_prog", so it can be a program name with args.
29202set dummy $ac_prog; ac_word=$2
29203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29204$as_echo_n "checking for $ac_word... " >&6; }
29205if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29206  $as_echo_n "(cached) " >&6
29207else
29208  case $POTENTIAL_CXX in
29209  [\\/]* | ?:[\\/]*)
29210  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29211  ;;
29212  *)
29213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29214for as_dir in $PATH
29215do
29216  IFS=$as_save_IFS
29217  test -z "$as_dir" && as_dir=.
29218    for ac_exec_ext in '' $ac_executable_extensions; do
29219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29220    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29222    break 2
29223  fi
29224done
29225  done
29226IFS=$as_save_IFS
29227
29228  ;;
29229esac
29230fi
29231POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29232if test -n "$POTENTIAL_CXX"; then
29233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29234$as_echo "$POTENTIAL_CXX" >&6; }
29235else
29236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29237$as_echo "no" >&6; }
29238fi
29239
29240
29241  test -n "$POTENTIAL_CXX" && break
29242done
29243
29244      if test "x$POTENTIAL_CXX" != x; then
29245        CXX=$POTENTIAL_CXX
29246      else
29247        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29248      fi
29249    else
29250      # Otherwise it might already be a complete path
29251      if test ! -x "$CXX"; then
29252        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29253      fi
29254    fi
29255  else
29256    # No user supplied value. Locate compiler ourselves.
29257
29258    # If we are cross compiling, assume cross compilation tools follows the
29259    # cross compilation standard where they are prefixed with the autoconf
29260    # standard name for the target. For example the binary
29261    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29262    # If we are not cross compiling, then the default compiler name will be
29263    # used.
29264
29265    CXX=
29266    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29267    # before checking the rest of the PATH.
29268    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29269    # step, this should not be necessary.
29270    if test -n "$TOOLCHAIN_PATH"; then
29271      PATH_save="$PATH"
29272      PATH="$TOOLCHAIN_PATH"
29273      for ac_prog in $SEARCH_LIST
29274do
29275  # Extract the first word of "$ac_prog", so it can be a program name with args.
29276set dummy $ac_prog; ac_word=$2
29277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29278$as_echo_n "checking for $ac_word... " >&6; }
29279if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29280  $as_echo_n "(cached) " >&6
29281else
29282  case $TOOLCHAIN_PATH_CXX in
29283  [\\/]* | ?:[\\/]*)
29284  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29285  ;;
29286  *)
29287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29288for as_dir in $PATH
29289do
29290  IFS=$as_save_IFS
29291  test -z "$as_dir" && as_dir=.
29292    for ac_exec_ext in '' $ac_executable_extensions; do
29293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29294    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29296    break 2
29297  fi
29298done
29299  done
29300IFS=$as_save_IFS
29301
29302  ;;
29303esac
29304fi
29305TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29306if test -n "$TOOLCHAIN_PATH_CXX"; then
29307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29308$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29309else
29310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29311$as_echo "no" >&6; }
29312fi
29313
29314
29315  test -n "$TOOLCHAIN_PATH_CXX" && break
29316done
29317
29318      CXX=$TOOLCHAIN_PATH_CXX
29319      PATH="$PATH_save"
29320    fi
29321
29322    # AC_PATH_PROGS can't be run multiple times with the same variable,
29323    # so create a new name for this run.
29324    if test "x$CXX" = x; then
29325      for ac_prog in $SEARCH_LIST
29326do
29327  # Extract the first word of "$ac_prog", so it can be a program name with args.
29328set dummy $ac_prog; ac_word=$2
29329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29330$as_echo_n "checking for $ac_word... " >&6; }
29331if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29332  $as_echo_n "(cached) " >&6
29333else
29334  case $POTENTIAL_CXX in
29335  [\\/]* | ?:[\\/]*)
29336  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29337  ;;
29338  *)
29339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29340for as_dir in $PATH
29341do
29342  IFS=$as_save_IFS
29343  test -z "$as_dir" && as_dir=.
29344    for ac_exec_ext in '' $ac_executable_extensions; do
29345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29346    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29348    break 2
29349  fi
29350done
29351  done
29352IFS=$as_save_IFS
29353
29354  ;;
29355esac
29356fi
29357POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29358if test -n "$POTENTIAL_CXX"; then
29359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29360$as_echo "$POTENTIAL_CXX" >&6; }
29361else
29362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29363$as_echo "no" >&6; }
29364fi
29365
29366
29367  test -n "$POTENTIAL_CXX" && break
29368done
29369
29370      CXX=$POTENTIAL_CXX
29371    fi
29372
29373    if test "x$CXX" = x; then
29374
29375  # Print a helpful message on how to acquire the necessary build dependency.
29376  # devkit is the help tag: freetype, cups, pulse, alsa etc
29377  MISSING_DEPENDENCY=devkit
29378
29379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29380    cygwin_help $MISSING_DEPENDENCY
29381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29382    msys_help $MISSING_DEPENDENCY
29383  else
29384    PKGHANDLER_COMMAND=
29385
29386    case $PKGHANDLER in
29387      apt-get)
29388        apt_help     $MISSING_DEPENDENCY ;;
29389      yum)
29390        yum_help     $MISSING_DEPENDENCY ;;
29391      port)
29392        port_help    $MISSING_DEPENDENCY ;;
29393      pkgutil)
29394        pkgutil_help $MISSING_DEPENDENCY ;;
29395      pkgadd)
29396        pkgadd_help  $MISSING_DEPENDENCY ;;
29397    esac
29398
29399    if test "x$PKGHANDLER_COMMAND" != x; then
29400      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29401    fi
29402  fi
29403
29404      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29405    fi
29406  fi
29407
29408  # Now we have a compiler binary in CXX. Make sure it's okay.
29409
29410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29411
29412  # First separate the path from the arguments. This will split at the first
29413  # space.
29414  complete="$CXX"
29415  path="${complete%% *}"
29416  tmp="$complete EOL"
29417  arguments="${tmp#* }"
29418
29419  # Input might be given as Windows format, start by converting to
29420  # unix format.
29421  new_path=`$CYGPATH -u "$path"`
29422
29423  # Now try to locate executable using which
29424  new_path=`$WHICH "$new_path" 2> /dev/null`
29425  # bat and cmd files are not always considered executable in cygwin causing which
29426  # to not find them
29427  if test "x$new_path" = x \
29428      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29429      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29430    new_path=`$CYGPATH -u "$path"`
29431  fi
29432  if test "x$new_path" = x; then
29433    # Oops. Which didn't find the executable.
29434    # The splitting of arguments from the executable at a space might have been incorrect,
29435    # since paths with space are more likely in Windows. Give it another try with the whole
29436    # argument.
29437    path="$complete"
29438    arguments="EOL"
29439    new_path=`$CYGPATH -u "$path"`
29440    new_path=`$WHICH "$new_path" 2> /dev/null`
29441    # bat and cmd files are not always considered executable in cygwin causing which
29442    # to not find them
29443    if test "x$new_path" = x \
29444        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29445        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29446      new_path=`$CYGPATH -u "$path"`
29447    fi
29448    if test "x$new_path" = x; then
29449      # It's still not found. Now this is an unrecoverable error.
29450      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29451$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29452      has_space=`$ECHO "$complete" | $GREP " "`
29453      if test "x$has_space" != x; then
29454        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29455$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29456      fi
29457      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29458    fi
29459  fi
29460
29461  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29462  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29463  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29464  # "foo.exe" is OK but "foo" is an error.
29465  #
29466  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29467  # It is also a way to make sure we got the proper file name for the real test later on.
29468  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29469  if test "x$test_shortpath" = x; then
29470    # Short path failed, file does not exist as specified.
29471    # Try adding .exe or .cmd
29472    if test -f "${new_path}.exe"; then
29473      input_to_shortpath="${new_path}.exe"
29474    elif test -f "${new_path}.cmd"; then
29475      input_to_shortpath="${new_path}.cmd"
29476    else
29477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29478$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29479      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29480$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29481      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29482    fi
29483  else
29484    input_to_shortpath="$new_path"
29485  fi
29486
29487  # Call helper function which possibly converts this using DOS-style short mode.
29488  # If so, the updated path is stored in $new_path.
29489  new_path="$input_to_shortpath"
29490
29491  input_path="$input_to_shortpath"
29492  # Check if we need to convert this using DOS-style short mode. If the path
29493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29494  # take no chances and rewrite it.
29495  # Note: m4 eats our [], so we need to use [ and ] instead.
29496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29497  if test "x$has_forbidden_chars" != x; then
29498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29499    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29500    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29501    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29502      # Going to short mode and back again did indeed matter. Since short mode is
29503      # case insensitive, let's make it lowercase to improve readability.
29504      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29505      # Now convert it back to Unix-stile (cygpath)
29506      input_path=`$CYGPATH -u "$shortmode_path"`
29507      new_path="$input_path"
29508    fi
29509  fi
29510
29511  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29512  if test "x$test_cygdrive_prefix" = x; then
29513    # As a simple fix, exclude /usr/bin since it's not a real path.
29514    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29515      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29516      # a path prefixed by /cygdrive for fixpath to work.
29517      new_path="$CYGWIN_ROOT_PATH$input_path"
29518    fi
29519  fi
29520
29521  # remove trailing .exe if any
29522  new_path="${new_path/%.exe/}"
29523
29524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29525
29526  # First separate the path from the arguments. This will split at the first
29527  # space.
29528  complete="$CXX"
29529  path="${complete%% *}"
29530  tmp="$complete EOL"
29531  arguments="${tmp#* }"
29532
29533  # Input might be given as Windows format, start by converting to
29534  # unix format.
29535  new_path="$path"
29536
29537  windows_path="$new_path"
29538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29539    unix_path=`$CYGPATH -u "$windows_path"`
29540    new_path="$unix_path"
29541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29543    new_path="$unix_path"
29544  fi
29545
29546
29547  # Now try to locate executable using which
29548  new_path=`$WHICH "$new_path" 2> /dev/null`
29549
29550  if test "x$new_path" = x; then
29551    # Oops. Which didn't find the executable.
29552    # The splitting of arguments from the executable at a space might have been incorrect,
29553    # since paths with space are more likely in Windows. Give it another try with the whole
29554    # argument.
29555    path="$complete"
29556    arguments="EOL"
29557    new_path="$path"
29558
29559  windows_path="$new_path"
29560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29561    unix_path=`$CYGPATH -u "$windows_path"`
29562    new_path="$unix_path"
29563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29565    new_path="$unix_path"
29566  fi
29567
29568
29569    new_path=`$WHICH "$new_path" 2> /dev/null`
29570
29571    if test "x$new_path" = x; then
29572      # It's still not found. Now this is an unrecoverable error.
29573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29574$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29575      has_space=`$ECHO "$complete" | $GREP " "`
29576      if test "x$has_space" != x; then
29577        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29578$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29579      fi
29580      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29581    fi
29582  fi
29583
29584  # Now new_path has a complete unix path to the binary
29585  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29586    # Keep paths in /bin as-is, but remove trailing .exe if any
29587    new_path="${new_path/%.exe/}"
29588    # Do not save /bin paths to all_fixpath_prefixes!
29589  else
29590    # Not in mixed or Windows style, start by that.
29591    new_path=`cmd //c echo $new_path`
29592
29593  input_path="$new_path"
29594  # Check if we need to convert this using DOS-style short mode. If the path
29595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29596  # take no chances and rewrite it.
29597  # Note: m4 eats our [], so we need to use [ and ] instead.
29598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29599  if test "x$has_forbidden_chars" != x; then
29600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29601    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29602  fi
29603
29604    # Output is in $new_path
29605
29606  windows_path="$new_path"
29607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29608    unix_path=`$CYGPATH -u "$windows_path"`
29609    new_path="$unix_path"
29610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29612    new_path="$unix_path"
29613  fi
29614
29615    # remove trailing .exe if any
29616    new_path="${new_path/%.exe/}"
29617
29618    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29619    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29620  fi
29621
29622  else
29623    # We're on a posix platform. Hooray! :)
29624    # First separate the path from the arguments. This will split at the first
29625    # space.
29626    complete="$CXX"
29627    path="${complete%% *}"
29628    tmp="$complete EOL"
29629    arguments="${tmp#* }"
29630
29631    # Cannot rely on the command "which" here since it doesn't always work.
29632    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29633    if test -z "$is_absolute_path"; then
29634      # Path to executable is not absolute. Find it.
29635      IFS_save="$IFS"
29636      IFS=:
29637      for p in $PATH; do
29638        if test -f "$p/$path" && test -x "$p/$path"; then
29639          new_path="$p/$path"
29640          break
29641        fi
29642      done
29643      IFS="$IFS_save"
29644    else
29645      # This is an absolute path, we can use it without further modifications.
29646      new_path="$path"
29647    fi
29648
29649    if test "x$new_path" = x; then
29650      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29651$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29652      has_space=`$ECHO "$complete" | $GREP " "`
29653      if test "x$has_space" != x; then
29654        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29655$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29656      fi
29657      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29658    fi
29659  fi
29660
29661  # Now join together the path and the arguments once again
29662  if test "x$arguments" != xEOL; then
29663    new_complete="$new_path ${arguments% *}"
29664  else
29665    new_complete="$new_path"
29666  fi
29667
29668  if test "x$complete" != "x$new_complete"; then
29669    CXX="$new_complete"
29670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29671$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29672  fi
29673
29674  TEST_COMPILER="$CXX"
29675  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29676  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29677  if test "x$OPENJDK_BUILD_OS" != xaix; then
29678    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29679    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29680$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29681
29682  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29683    # Follow a chain of symbolic links. Use readlink
29684    # where it exists, else fall back to horribly
29685    # complicated shell code.
29686    if test "x$READLINK_TESTED" != yes; then
29687      # On MacOSX there is a readlink tool with a different
29688      # purpose than the GNU readlink tool. Check the found readlink.
29689      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29690      if test "x$ISGNU" = x; then
29691        # A readlink that we do not know how to use.
29692        # Are there other non-GNU readlinks out there?
29693        READLINK_TESTED=yes
29694        READLINK=
29695      fi
29696    fi
29697
29698    if test "x$READLINK" != x; then
29699      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29700    else
29701      # Save the current directory for restoring afterwards
29702      STARTDIR=$PWD
29703      COUNTER=0
29704      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29705      sym_link_file=`$BASENAME $TEST_COMPILER`
29706      cd $sym_link_dir
29707      # Use -P flag to resolve symlinks in directories.
29708      cd `$THEPWDCMD -P`
29709      sym_link_dir=`$THEPWDCMD -P`
29710      # Resolve file symlinks
29711      while test $COUNTER -lt 20; do
29712        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29713        if test "x$ISLINK" == x; then
29714          # This is not a symbolic link! We are done!
29715          break
29716        fi
29717        # Again resolve directory symlinks since the target of the just found
29718        # link could be in a different directory
29719        cd `$DIRNAME $ISLINK`
29720        sym_link_dir=`$THEPWDCMD -P`
29721        sym_link_file=`$BASENAME $ISLINK`
29722        let COUNTER=COUNTER+1
29723      done
29724      cd $STARTDIR
29725      TEST_COMPILER=$sym_link_dir/$sym_link_file
29726    fi
29727  fi
29728
29729    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29730$as_echo "$TEST_COMPILER" >&6; }
29731  fi
29732  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29733$as_echo_n "checking if CXX is disguised ccache... " >&6; }
29734
29735  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29736  if test "x$COMPILER_BASENAME" = "xccache"; then
29737    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29738$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29739    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29740    # We want to control ccache invocation ourselves, so ignore this cc and try
29741    # searching again.
29742
29743    # Remove the path to the fake ccache cc from the PATH
29744    RETRY_COMPILER_SAVED_PATH="$PATH"
29745    COMPILER_DIRNAME=`$DIRNAME $CXX`
29746    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29747
29748    # Try again looking for our compiler
29749    if test -n "$ac_tool_prefix"; then
29750  for ac_prog in $TOOLCHAIN_CXX_BINARY
29751  do
29752    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29753set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29755$as_echo_n "checking for $ac_word... " >&6; }
29756if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29757  $as_echo_n "(cached) " >&6
29758else
29759  if test -n "$PROPER_COMPILER_CXX"; then
29760  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29761else
29762as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29763for as_dir in $PATH
29764do
29765  IFS=$as_save_IFS
29766  test -z "$as_dir" && as_dir=.
29767    for ac_exec_ext in '' $ac_executable_extensions; do
29768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29769    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29771    break 2
29772  fi
29773done
29774  done
29775IFS=$as_save_IFS
29776
29777fi
29778fi
29779PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29780if test -n "$PROPER_COMPILER_CXX"; then
29781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29782$as_echo "$PROPER_COMPILER_CXX" >&6; }
29783else
29784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29785$as_echo "no" >&6; }
29786fi
29787
29788
29789    test -n "$PROPER_COMPILER_CXX" && break
29790  done
29791fi
29792if test -z "$PROPER_COMPILER_CXX"; then
29793  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29794  for ac_prog in $TOOLCHAIN_CXX_BINARY
29795do
29796  # Extract the first word of "$ac_prog", so it can be a program name with args.
29797set dummy $ac_prog; ac_word=$2
29798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29799$as_echo_n "checking for $ac_word... " >&6; }
29800if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29801  $as_echo_n "(cached) " >&6
29802else
29803  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29804  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29805else
29806as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29807for as_dir in $PATH
29808do
29809  IFS=$as_save_IFS
29810  test -z "$as_dir" && as_dir=.
29811    for ac_exec_ext in '' $ac_executable_extensions; do
29812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29813    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29815    break 2
29816  fi
29817done
29818  done
29819IFS=$as_save_IFS
29820
29821fi
29822fi
29823ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29824if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29826$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29827else
29828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29829$as_echo "no" >&6; }
29830fi
29831
29832
29833  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29834done
29835
29836  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29837    PROPER_COMPILER_CXX=""
29838  else
29839    case $cross_compiling:$ac_tool_warned in
29840yes:)
29841{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29842$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29843ac_tool_warned=yes ;;
29844esac
29845    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29846  fi
29847fi
29848
29849
29850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29851
29852  # First separate the path from the arguments. This will split at the first
29853  # space.
29854  complete="$PROPER_COMPILER_CXX"
29855  path="${complete%% *}"
29856  tmp="$complete EOL"
29857  arguments="${tmp#* }"
29858
29859  # Input might be given as Windows format, start by converting to
29860  # unix format.
29861  new_path=`$CYGPATH -u "$path"`
29862
29863  # Now try to locate executable using which
29864  new_path=`$WHICH "$new_path" 2> /dev/null`
29865  # bat and cmd files are not always considered executable in cygwin causing which
29866  # to not find them
29867  if test "x$new_path" = x \
29868      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29869      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29870    new_path=`$CYGPATH -u "$path"`
29871  fi
29872  if test "x$new_path" = x; then
29873    # Oops. Which didn't find the executable.
29874    # The splitting of arguments from the executable at a space might have been incorrect,
29875    # since paths with space are more likely in Windows. Give it another try with the whole
29876    # argument.
29877    path="$complete"
29878    arguments="EOL"
29879    new_path=`$CYGPATH -u "$path"`
29880    new_path=`$WHICH "$new_path" 2> /dev/null`
29881    # bat and cmd files are not always considered executable in cygwin causing which
29882    # to not find them
29883    if test "x$new_path" = x \
29884        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29885        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29886      new_path=`$CYGPATH -u "$path"`
29887    fi
29888    if test "x$new_path" = x; then
29889      # It's still not found. Now this is an unrecoverable error.
29890      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29891$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29892      has_space=`$ECHO "$complete" | $GREP " "`
29893      if test "x$has_space" != x; then
29894        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29895$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29896      fi
29897      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29898    fi
29899  fi
29900
29901  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29902  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29903  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29904  # "foo.exe" is OK but "foo" is an error.
29905  #
29906  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29907  # It is also a way to make sure we got the proper file name for the real test later on.
29908  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29909  if test "x$test_shortpath" = x; then
29910    # Short path failed, file does not exist as specified.
29911    # Try adding .exe or .cmd
29912    if test -f "${new_path}.exe"; then
29913      input_to_shortpath="${new_path}.exe"
29914    elif test -f "${new_path}.cmd"; then
29915      input_to_shortpath="${new_path}.cmd"
29916    else
29917      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
29918$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
29919      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29920$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29921      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29922    fi
29923  else
29924    input_to_shortpath="$new_path"
29925  fi
29926
29927  # Call helper function which possibly converts this using DOS-style short mode.
29928  # If so, the updated path is stored in $new_path.
29929  new_path="$input_to_shortpath"
29930
29931  input_path="$input_to_shortpath"
29932  # Check if we need to convert this using DOS-style short mode. If the path
29933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29934  # take no chances and rewrite it.
29935  # Note: m4 eats our [], so we need to use [ and ] instead.
29936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29937  if test "x$has_forbidden_chars" != x; then
29938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29939    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29940    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29941    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29942      # Going to short mode and back again did indeed matter. Since short mode is
29943      # case insensitive, let's make it lowercase to improve readability.
29944      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29945      # Now convert it back to Unix-stile (cygpath)
29946      input_path=`$CYGPATH -u "$shortmode_path"`
29947      new_path="$input_path"
29948    fi
29949  fi
29950
29951  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29952  if test "x$test_cygdrive_prefix" = x; then
29953    # As a simple fix, exclude /usr/bin since it's not a real path.
29954    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29955      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29956      # a path prefixed by /cygdrive for fixpath to work.
29957      new_path="$CYGWIN_ROOT_PATH$input_path"
29958    fi
29959  fi
29960
29961  # remove trailing .exe if any
29962  new_path="${new_path/%.exe/}"
29963
29964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29965
29966  # First separate the path from the arguments. This will split at the first
29967  # space.
29968  complete="$PROPER_COMPILER_CXX"
29969  path="${complete%% *}"
29970  tmp="$complete EOL"
29971  arguments="${tmp#* }"
29972
29973  # Input might be given as Windows format, start by converting to
29974  # unix format.
29975  new_path="$path"
29976
29977  windows_path="$new_path"
29978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29979    unix_path=`$CYGPATH -u "$windows_path"`
29980    new_path="$unix_path"
29981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29983    new_path="$unix_path"
29984  fi
29985
29986
29987  # Now try to locate executable using which
29988  new_path=`$WHICH "$new_path" 2> /dev/null`
29989
29990  if test "x$new_path" = x; then
29991    # Oops. Which didn't find the executable.
29992    # The splitting of arguments from the executable at a space might have been incorrect,
29993    # since paths with space are more likely in Windows. Give it another try with the whole
29994    # argument.
29995    path="$complete"
29996    arguments="EOL"
29997    new_path="$path"
29998
29999  windows_path="$new_path"
30000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30001    unix_path=`$CYGPATH -u "$windows_path"`
30002    new_path="$unix_path"
30003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30005    new_path="$unix_path"
30006  fi
30007
30008
30009    new_path=`$WHICH "$new_path" 2> /dev/null`
30010
30011    if test "x$new_path" = x; then
30012      # It's still not found. Now this is an unrecoverable error.
30013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30014$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30015      has_space=`$ECHO "$complete" | $GREP " "`
30016      if test "x$has_space" != x; then
30017        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30018$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30019      fi
30020      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30021    fi
30022  fi
30023
30024  # Now new_path has a complete unix path to the binary
30025  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30026    # Keep paths in /bin as-is, but remove trailing .exe if any
30027    new_path="${new_path/%.exe/}"
30028    # Do not save /bin paths to all_fixpath_prefixes!
30029  else
30030    # Not in mixed or Windows style, start by that.
30031    new_path=`cmd //c echo $new_path`
30032
30033  input_path="$new_path"
30034  # Check if we need to convert this using DOS-style short mode. If the path
30035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30036  # take no chances and rewrite it.
30037  # Note: m4 eats our [], so we need to use [ and ] instead.
30038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30039  if test "x$has_forbidden_chars" != x; then
30040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30041    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30042  fi
30043
30044    # Output is in $new_path
30045
30046  windows_path="$new_path"
30047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30048    unix_path=`$CYGPATH -u "$windows_path"`
30049    new_path="$unix_path"
30050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30052    new_path="$unix_path"
30053  fi
30054
30055    # remove trailing .exe if any
30056    new_path="${new_path/%.exe/}"
30057
30058    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30059    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30060  fi
30061
30062  else
30063    # We're on a posix platform. Hooray! :)
30064    # First separate the path from the arguments. This will split at the first
30065    # space.
30066    complete="$PROPER_COMPILER_CXX"
30067    path="${complete%% *}"
30068    tmp="$complete EOL"
30069    arguments="${tmp#* }"
30070
30071    # Cannot rely on the command "which" here since it doesn't always work.
30072    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30073    if test -z "$is_absolute_path"; then
30074      # Path to executable is not absolute. Find it.
30075      IFS_save="$IFS"
30076      IFS=:
30077      for p in $PATH; do
30078        if test -f "$p/$path" && test -x "$p/$path"; then
30079          new_path="$p/$path"
30080          break
30081        fi
30082      done
30083      IFS="$IFS_save"
30084    else
30085      # This is an absolute path, we can use it without further modifications.
30086      new_path="$path"
30087    fi
30088
30089    if test "x$new_path" = x; then
30090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30091$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30092      has_space=`$ECHO "$complete" | $GREP " "`
30093      if test "x$has_space" != x; then
30094        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30095$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30096      fi
30097      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30098    fi
30099  fi
30100
30101  # Now join together the path and the arguments once again
30102  if test "x$arguments" != xEOL; then
30103    new_complete="$new_path ${arguments% *}"
30104  else
30105    new_complete="$new_path"
30106  fi
30107
30108  if test "x$complete" != "x$new_complete"; then
30109    PROPER_COMPILER_CXX="$new_complete"
30110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30111$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30112  fi
30113
30114    PATH="$RETRY_COMPILER_SAVED_PATH"
30115
30116    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30117$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30118
30119  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30120    # Follow a chain of symbolic links. Use readlink
30121    # where it exists, else fall back to horribly
30122    # complicated shell code.
30123    if test "x$READLINK_TESTED" != yes; then
30124      # On MacOSX there is a readlink tool with a different
30125      # purpose than the GNU readlink tool. Check the found readlink.
30126      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30127      if test "x$ISGNU" = x; then
30128        # A readlink that we do not know how to use.
30129        # Are there other non-GNU readlinks out there?
30130        READLINK_TESTED=yes
30131        READLINK=
30132      fi
30133    fi
30134
30135    if test "x$READLINK" != x; then
30136      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30137    else
30138      # Save the current directory for restoring afterwards
30139      STARTDIR=$PWD
30140      COUNTER=0
30141      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30142      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30143      cd $sym_link_dir
30144      # Use -P flag to resolve symlinks in directories.
30145      cd `$THEPWDCMD -P`
30146      sym_link_dir=`$THEPWDCMD -P`
30147      # Resolve file symlinks
30148      while test $COUNTER -lt 20; do
30149        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30150        if test "x$ISLINK" == x; then
30151          # This is not a symbolic link! We are done!
30152          break
30153        fi
30154        # Again resolve directory symlinks since the target of the just found
30155        # link could be in a different directory
30156        cd `$DIRNAME $ISLINK`
30157        sym_link_dir=`$THEPWDCMD -P`
30158        sym_link_file=`$BASENAME $ISLINK`
30159        let COUNTER=COUNTER+1
30160      done
30161      cd $STARTDIR
30162      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30163    fi
30164  fi
30165
30166    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30167$as_echo "$PROPER_COMPILER_CXX" >&6; }
30168    CXX="$PROPER_COMPILER_CXX"
30169  else
30170    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30171$as_echo "no, keeping CXX" >&6; }
30172  fi
30173
30174
30175  COMPILER=$CXX
30176  COMPILER_NAME=$COMPILER_NAME
30177
30178  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30179    # cc -V output typically looks like
30180    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30181    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30182    # Check that this is likely to be the Solaris Studio cc.
30183    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30184    if test $? -ne 0; then
30185      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30186      { $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
30187$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30188      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30189$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30190      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30191$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30192      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30193    fi
30194    # Remove usage instructions (if present), and
30195    # collapse compiler output into a single line
30196    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30197        $SED -e 's/ *[Uu]sage:.*//'`
30198    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30199        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30200  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30201    # xlc -qversion output typically looks like
30202    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30203    #     Version: 11.01.0000.0015
30204    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30205    # Check that this is likely to be the IBM XL C compiler.
30206    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30207    if test $? -ne 0; then
30208      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30209      { $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
30210$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30211      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30212$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30213      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30214$as_echo "$as_me: The result from running with --version was: \"$ALT_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/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30221  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30222    # There is no specific version flag, but all output starts with a version string.
30223    # First line typically looks something like:
30224    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30225    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30226    # Check that this is likely to be Microsoft CL.EXE.
30227    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30228    if test $? -ne 0; then
30229      { $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
30230$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30231      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30232$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30233      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30234    fi
30235    # Collapse compiler output into a single line
30236    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30237    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30238        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30239  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30240    # gcc --version output typically looks like
30241    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30242    #     Copyright (C) 2013 Free Software Foundation, Inc.
30243    #     This is free software; see the source for copying conditions.  There is NO
30244    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30245    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30246    # Check that this is likely to be GCC.
30247    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30248    if test $? -ne 0; then
30249      { $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
30250$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30251      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30252$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30253      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30254    fi
30255    # Remove Copyright and legalese from version string, and
30256    # collapse into a single line
30257    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30258        $SED -e 's/ *Copyright .*//'`
30259    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30260        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30261  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30262    # clang --version output typically looks like
30263    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30264    #    clang version 3.3 (tags/RELEASE_33/final)
30265    # or
30266    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30267    #    Target: x86_64-pc-linux-gnu
30268    #    Thread model: posix
30269    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30270    # Check that this is likely to be clang
30271    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30272    if test $? -ne 0; then
30273      { $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
30274$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30275      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30276$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30277      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30278    fi
30279    # Collapse compiler output into a single line
30280    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30281    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30282        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30283  else
30284      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30285  fi
30286  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30287  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30288  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30289  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30290
30291  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30292$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30293
30294
30295  # Now that we have resolved CXX ourself, let autoconf have its go at it
30296  ac_ext=cpp
30297ac_cpp='$CXXCPP $CPPFLAGS'
30298ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30299ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30300ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30301if test -z "$CXX"; then
30302  if test -n "$CCC"; then
30303    CXX=$CCC
30304  else
30305    if test -n "$ac_tool_prefix"; then
30306  for ac_prog in $CXX
30307  do
30308    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30309set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30311$as_echo_n "checking for $ac_word... " >&6; }
30312if ${ac_cv_prog_CXX+:} false; then :
30313  $as_echo_n "(cached) " >&6
30314else
30315  if test -n "$CXX"; then
30316  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30317else
30318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30319for as_dir in $PATH
30320do
30321  IFS=$as_save_IFS
30322  test -z "$as_dir" && as_dir=.
30323    for ac_exec_ext in '' $ac_executable_extensions; do
30324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30325    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30327    break 2
30328  fi
30329done
30330  done
30331IFS=$as_save_IFS
30332
30333fi
30334fi
30335CXX=$ac_cv_prog_CXX
30336if test -n "$CXX"; then
30337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30338$as_echo "$CXX" >&6; }
30339else
30340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30341$as_echo "no" >&6; }
30342fi
30343
30344
30345    test -n "$CXX" && break
30346  done
30347fi
30348if test -z "$CXX"; then
30349  ac_ct_CXX=$CXX
30350  for ac_prog in $CXX
30351do
30352  # Extract the first word of "$ac_prog", so it can be a program name with args.
30353set dummy $ac_prog; ac_word=$2
30354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30355$as_echo_n "checking for $ac_word... " >&6; }
30356if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30357  $as_echo_n "(cached) " >&6
30358else
30359  if test -n "$ac_ct_CXX"; then
30360  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30361else
30362as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30363for as_dir in $PATH
30364do
30365  IFS=$as_save_IFS
30366  test -z "$as_dir" && as_dir=.
30367    for ac_exec_ext in '' $ac_executable_extensions; do
30368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30369    ac_cv_prog_ac_ct_CXX="$ac_prog"
30370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30371    break 2
30372  fi
30373done
30374  done
30375IFS=$as_save_IFS
30376
30377fi
30378fi
30379ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30380if test -n "$ac_ct_CXX"; then
30381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30382$as_echo "$ac_ct_CXX" >&6; }
30383else
30384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30385$as_echo "no" >&6; }
30386fi
30387
30388
30389  test -n "$ac_ct_CXX" && break
30390done
30391
30392  if test "x$ac_ct_CXX" = x; then
30393    CXX="g++"
30394  else
30395    case $cross_compiling:$ac_tool_warned in
30396yes:)
30397{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30398$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30399ac_tool_warned=yes ;;
30400esac
30401    CXX=$ac_ct_CXX
30402  fi
30403fi
30404
30405  fi
30406fi
30407# Provide some information about the compiler.
30408$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30409set X $ac_compile
30410ac_compiler=$2
30411for ac_option in --version -v -V -qversion; do
30412  { { ac_try="$ac_compiler $ac_option >&5"
30413case "(($ac_try" in
30414  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30415  *) ac_try_echo=$ac_try;;
30416esac
30417eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30418$as_echo "$ac_try_echo"; } >&5
30419  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30420  ac_status=$?
30421  if test -s conftest.err; then
30422    sed '10a\
30423... rest of stderr output deleted ...
30424         10q' conftest.err >conftest.er1
30425    cat conftest.er1 >&5
30426  fi
30427  rm -f conftest.er1 conftest.err
30428  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30429  test $ac_status = 0; }
30430done
30431
30432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30433$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30434if ${ac_cv_cxx_compiler_gnu+:} false; then :
30435  $as_echo_n "(cached) " >&6
30436else
30437  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30438/* end confdefs.h.  */
30439
30440int
30441main ()
30442{
30443#ifndef __GNUC__
30444       choke me
30445#endif
30446
30447  ;
30448  return 0;
30449}
30450_ACEOF
30451if ac_fn_cxx_try_compile "$LINENO"; then :
30452  ac_compiler_gnu=yes
30453else
30454  ac_compiler_gnu=no
30455fi
30456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30457ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30458
30459fi
30460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30461$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30462if test $ac_compiler_gnu = yes; then
30463  GXX=yes
30464else
30465  GXX=
30466fi
30467ac_test_CXXFLAGS=${CXXFLAGS+set}
30468ac_save_CXXFLAGS=$CXXFLAGS
30469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30470$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30471if ${ac_cv_prog_cxx_g+:} false; then :
30472  $as_echo_n "(cached) " >&6
30473else
30474  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30475   ac_cxx_werror_flag=yes
30476   ac_cv_prog_cxx_g=no
30477   CXXFLAGS="-g"
30478   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30479/* end confdefs.h.  */
30480
30481int
30482main ()
30483{
30484
30485  ;
30486  return 0;
30487}
30488_ACEOF
30489if ac_fn_cxx_try_compile "$LINENO"; then :
30490  ac_cv_prog_cxx_g=yes
30491else
30492  CXXFLAGS=""
30493      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30494/* end confdefs.h.  */
30495
30496int
30497main ()
30498{
30499
30500  ;
30501  return 0;
30502}
30503_ACEOF
30504if ac_fn_cxx_try_compile "$LINENO"; then :
30505
30506else
30507  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30508	 CXXFLAGS="-g"
30509	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30510/* end confdefs.h.  */
30511
30512int
30513main ()
30514{
30515
30516  ;
30517  return 0;
30518}
30519_ACEOF
30520if ac_fn_cxx_try_compile "$LINENO"; then :
30521  ac_cv_prog_cxx_g=yes
30522fi
30523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30524fi
30525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30526fi
30527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30528   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30529fi
30530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30531$as_echo "$ac_cv_prog_cxx_g" >&6; }
30532if test "$ac_test_CXXFLAGS" = set; then
30533  CXXFLAGS=$ac_save_CXXFLAGS
30534elif test $ac_cv_prog_cxx_g = yes; then
30535  if test "$GXX" = yes; then
30536    CXXFLAGS="-g -O2"
30537  else
30538    CXXFLAGS="-g"
30539  fi
30540else
30541  if test "$GXX" = yes; then
30542    CXXFLAGS="-O2"
30543  else
30544    CXXFLAGS=
30545  fi
30546fi
30547ac_ext=cpp
30548ac_cpp='$CXXCPP $CPPFLAGS'
30549ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30550ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30551ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30552
30553
30554  #
30555  # Setup the preprocessor (CPP and CXXCPP)
30556  #
30557  ac_ext=c
30558ac_cpp='$CPP $CPPFLAGS'
30559ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30560ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30561ac_compiler_gnu=$ac_cv_c_compiler_gnu
30562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30563$as_echo_n "checking how to run the C preprocessor... " >&6; }
30564# On Suns, sometimes $CPP names a directory.
30565if test -n "$CPP" && test -d "$CPP"; then
30566  CPP=
30567fi
30568if test -z "$CPP"; then
30569  if ${ac_cv_prog_CPP+:} false; then :
30570  $as_echo_n "(cached) " >&6
30571else
30572      # Double quotes because CPP needs to be expanded
30573    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30574    do
30575      ac_preproc_ok=false
30576for ac_c_preproc_warn_flag in '' yes
30577do
30578  # Use a header file that comes with gcc, so configuring glibc
30579  # with a fresh cross-compiler works.
30580  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30581  # <limits.h> exists even on freestanding compilers.
30582  # On the NeXT, cc -E runs the code through the compiler's parser,
30583  # not just through cpp. "Syntax error" is here to catch this case.
30584  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30585/* end confdefs.h.  */
30586#ifdef __STDC__
30587# include <limits.h>
30588#else
30589# include <assert.h>
30590#endif
30591		     Syntax error
30592_ACEOF
30593if ac_fn_c_try_cpp "$LINENO"; then :
30594
30595else
30596  # Broken: fails on valid input.
30597continue
30598fi
30599rm -f conftest.err conftest.i conftest.$ac_ext
30600
30601  # OK, works on sane cases.  Now check whether nonexistent headers
30602  # can be detected and how.
30603  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30604/* end confdefs.h.  */
30605#include <ac_nonexistent.h>
30606_ACEOF
30607if ac_fn_c_try_cpp "$LINENO"; then :
30608  # Broken: success on invalid input.
30609continue
30610else
30611  # Passes both tests.
30612ac_preproc_ok=:
30613break
30614fi
30615rm -f conftest.err conftest.i conftest.$ac_ext
30616
30617done
30618# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30619rm -f conftest.i conftest.err conftest.$ac_ext
30620if $ac_preproc_ok; then :
30621  break
30622fi
30623
30624    done
30625    ac_cv_prog_CPP=$CPP
30626
30627fi
30628  CPP=$ac_cv_prog_CPP
30629else
30630  ac_cv_prog_CPP=$CPP
30631fi
30632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30633$as_echo "$CPP" >&6; }
30634ac_preproc_ok=false
30635for ac_c_preproc_warn_flag in '' yes
30636do
30637  # Use a header file that comes with gcc, so configuring glibc
30638  # with a fresh cross-compiler works.
30639  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30640  # <limits.h> exists even on freestanding compilers.
30641  # On the NeXT, cc -E runs the code through the compiler's parser,
30642  # not just through cpp. "Syntax error" is here to catch this case.
30643  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30644/* end confdefs.h.  */
30645#ifdef __STDC__
30646# include <limits.h>
30647#else
30648# include <assert.h>
30649#endif
30650		     Syntax error
30651_ACEOF
30652if ac_fn_c_try_cpp "$LINENO"; then :
30653
30654else
30655  # Broken: fails on valid input.
30656continue
30657fi
30658rm -f conftest.err conftest.i conftest.$ac_ext
30659
30660  # OK, works on sane cases.  Now check whether nonexistent headers
30661  # can be detected and how.
30662  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30663/* end confdefs.h.  */
30664#include <ac_nonexistent.h>
30665_ACEOF
30666if ac_fn_c_try_cpp "$LINENO"; then :
30667  # Broken: success on invalid input.
30668continue
30669else
30670  # Passes both tests.
30671ac_preproc_ok=:
30672break
30673fi
30674rm -f conftest.err conftest.i conftest.$ac_ext
30675
30676done
30677# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30678rm -f conftest.i conftest.err conftest.$ac_ext
30679if $ac_preproc_ok; then :
30680
30681else
30682  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30683$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30684as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30685See \`config.log' for more details" "$LINENO" 5; }
30686fi
30687
30688ac_ext=cpp
30689ac_cpp='$CXXCPP $CPPFLAGS'
30690ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30691ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30692ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30693
30694
30695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30696
30697  # First separate the path from the arguments. This will split at the first
30698  # space.
30699  complete="$CPP"
30700  path="${complete%% *}"
30701  tmp="$complete EOL"
30702  arguments="${tmp#* }"
30703
30704  # Input might be given as Windows format, start by converting to
30705  # unix format.
30706  new_path=`$CYGPATH -u "$path"`
30707
30708  # Now try to locate executable using which
30709  new_path=`$WHICH "$new_path" 2> /dev/null`
30710  # bat and cmd files are not always considered executable in cygwin causing which
30711  # to not find them
30712  if test "x$new_path" = x \
30713      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30714      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30715    new_path=`$CYGPATH -u "$path"`
30716  fi
30717  if test "x$new_path" = x; then
30718    # Oops. Which didn't find the executable.
30719    # The splitting of arguments from the executable at a space might have been incorrect,
30720    # since paths with space are more likely in Windows. Give it another try with the whole
30721    # argument.
30722    path="$complete"
30723    arguments="EOL"
30724    new_path=`$CYGPATH -u "$path"`
30725    new_path=`$WHICH "$new_path" 2> /dev/null`
30726    # bat and cmd files are not always considered executable in cygwin causing which
30727    # to not find them
30728    if test "x$new_path" = x \
30729        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30730        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30731      new_path=`$CYGPATH -u "$path"`
30732    fi
30733    if test "x$new_path" = x; then
30734      # It's still not found. Now this is an unrecoverable error.
30735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30736$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30737      has_space=`$ECHO "$complete" | $GREP " "`
30738      if test "x$has_space" != x; then
30739        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30740$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30741      fi
30742      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30743    fi
30744  fi
30745
30746  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30747  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30748  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30749  # "foo.exe" is OK but "foo" is an error.
30750  #
30751  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30752  # It is also a way to make sure we got the proper file name for the real test later on.
30753  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30754  if test "x$test_shortpath" = x; then
30755    # Short path failed, file does not exist as specified.
30756    # Try adding .exe or .cmd
30757    if test -f "${new_path}.exe"; then
30758      input_to_shortpath="${new_path}.exe"
30759    elif test -f "${new_path}.cmd"; then
30760      input_to_shortpath="${new_path}.cmd"
30761    else
30762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30763$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30764      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30765$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30766      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30767    fi
30768  else
30769    input_to_shortpath="$new_path"
30770  fi
30771
30772  # Call helper function which possibly converts this using DOS-style short mode.
30773  # If so, the updated path is stored in $new_path.
30774  new_path="$input_to_shortpath"
30775
30776  input_path="$input_to_shortpath"
30777  # Check if we need to convert this using DOS-style short mode. If the path
30778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30779  # take no chances and rewrite it.
30780  # Note: m4 eats our [], so we need to use [ and ] instead.
30781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30782  if test "x$has_forbidden_chars" != x; then
30783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30787      # Going to short mode and back again did indeed matter. Since short mode is
30788      # case insensitive, let's make it lowercase to improve readability.
30789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30790      # Now convert it back to Unix-stile (cygpath)
30791      input_path=`$CYGPATH -u "$shortmode_path"`
30792      new_path="$input_path"
30793    fi
30794  fi
30795
30796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30797  if test "x$test_cygdrive_prefix" = x; then
30798    # As a simple fix, exclude /usr/bin since it's not a real path.
30799    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30801      # a path prefixed by /cygdrive for fixpath to work.
30802      new_path="$CYGWIN_ROOT_PATH$input_path"
30803    fi
30804  fi
30805
30806  # remove trailing .exe if any
30807  new_path="${new_path/%.exe/}"
30808
30809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30810
30811  # First separate the path from the arguments. This will split at the first
30812  # space.
30813  complete="$CPP"
30814  path="${complete%% *}"
30815  tmp="$complete EOL"
30816  arguments="${tmp#* }"
30817
30818  # Input might be given as Windows format, start by converting to
30819  # unix format.
30820  new_path="$path"
30821
30822  windows_path="$new_path"
30823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30824    unix_path=`$CYGPATH -u "$windows_path"`
30825    new_path="$unix_path"
30826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30828    new_path="$unix_path"
30829  fi
30830
30831
30832  # Now try to locate executable using which
30833  new_path=`$WHICH "$new_path" 2> /dev/null`
30834
30835  if test "x$new_path" = x; then
30836    # Oops. Which didn't find the executable.
30837    # The splitting of arguments from the executable at a space might have been incorrect,
30838    # since paths with space are more likely in Windows. Give it another try with the whole
30839    # argument.
30840    path="$complete"
30841    arguments="EOL"
30842    new_path="$path"
30843
30844  windows_path="$new_path"
30845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30846    unix_path=`$CYGPATH -u "$windows_path"`
30847    new_path="$unix_path"
30848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30850    new_path="$unix_path"
30851  fi
30852
30853
30854    new_path=`$WHICH "$new_path" 2> /dev/null`
30855
30856    if test "x$new_path" = x; then
30857      # It's still not found. Now this is an unrecoverable error.
30858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30859$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30860      has_space=`$ECHO "$complete" | $GREP " "`
30861      if test "x$has_space" != x; then
30862        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30863$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30864      fi
30865      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30866    fi
30867  fi
30868
30869  # Now new_path has a complete unix path to the binary
30870  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30871    # Keep paths in /bin as-is, but remove trailing .exe if any
30872    new_path="${new_path/%.exe/}"
30873    # Do not save /bin paths to all_fixpath_prefixes!
30874  else
30875    # Not in mixed or Windows style, start by that.
30876    new_path=`cmd //c echo $new_path`
30877
30878  input_path="$new_path"
30879  # Check if we need to convert this using DOS-style short mode. If the path
30880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30881  # take no chances and rewrite it.
30882  # Note: m4 eats our [], so we need to use [ and ] instead.
30883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30884  if test "x$has_forbidden_chars" != x; then
30885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30887  fi
30888
30889    # Output is in $new_path
30890
30891  windows_path="$new_path"
30892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30893    unix_path=`$CYGPATH -u "$windows_path"`
30894    new_path="$unix_path"
30895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30897    new_path="$unix_path"
30898  fi
30899
30900    # remove trailing .exe if any
30901    new_path="${new_path/%.exe/}"
30902
30903    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30904    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30905  fi
30906
30907  else
30908    # We're on a posix platform. Hooray! :)
30909    # First separate the path from the arguments. This will split at the first
30910    # space.
30911    complete="$CPP"
30912    path="${complete%% *}"
30913    tmp="$complete EOL"
30914    arguments="${tmp#* }"
30915
30916    # Cannot rely on the command "which" here since it doesn't always work.
30917    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30918    if test -z "$is_absolute_path"; then
30919      # Path to executable is not absolute. Find it.
30920      IFS_save="$IFS"
30921      IFS=:
30922      for p in $PATH; do
30923        if test -f "$p/$path" && test -x "$p/$path"; then
30924          new_path="$p/$path"
30925          break
30926        fi
30927      done
30928      IFS="$IFS_save"
30929    else
30930      # This is an absolute path, we can use it without further modifications.
30931      new_path="$path"
30932    fi
30933
30934    if test "x$new_path" = x; then
30935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30936$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30937      has_space=`$ECHO "$complete" | $GREP " "`
30938      if test "x$has_space" != x; then
30939        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30940$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30941      fi
30942      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30943    fi
30944  fi
30945
30946  # Now join together the path and the arguments once again
30947  if test "x$arguments" != xEOL; then
30948    new_complete="$new_path ${arguments% *}"
30949  else
30950    new_complete="$new_path"
30951  fi
30952
30953  if test "x$complete" != "x$new_complete"; then
30954    CPP="$new_complete"
30955    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
30956$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
30957  fi
30958
30959  ac_ext=cpp
30960ac_cpp='$CXXCPP $CPPFLAGS'
30961ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30962ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30963ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
30965$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
30966if test -z "$CXXCPP"; then
30967  if ${ac_cv_prog_CXXCPP+:} false; then :
30968  $as_echo_n "(cached) " >&6
30969else
30970      # Double quotes because CXXCPP needs to be expanded
30971    for CXXCPP in "$CXX -E" "/lib/cpp"
30972    do
30973      ac_preproc_ok=false
30974for ac_cxx_preproc_warn_flag in '' yes
30975do
30976  # Use a header file that comes with gcc, so configuring glibc
30977  # with a fresh cross-compiler works.
30978  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30979  # <limits.h> exists even on freestanding compilers.
30980  # On the NeXT, cc -E runs the code through the compiler's parser,
30981  # not just through cpp. "Syntax error" is here to catch this case.
30982  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30983/* end confdefs.h.  */
30984#ifdef __STDC__
30985# include <limits.h>
30986#else
30987# include <assert.h>
30988#endif
30989		     Syntax error
30990_ACEOF
30991if ac_fn_cxx_try_cpp "$LINENO"; then :
30992
30993else
30994  # Broken: fails on valid input.
30995continue
30996fi
30997rm -f conftest.err conftest.i conftest.$ac_ext
30998
30999  # OK, works on sane cases.  Now check whether nonexistent headers
31000  # can be detected and how.
31001  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31002/* end confdefs.h.  */
31003#include <ac_nonexistent.h>
31004_ACEOF
31005if ac_fn_cxx_try_cpp "$LINENO"; then :
31006  # Broken: success on invalid input.
31007continue
31008else
31009  # Passes both tests.
31010ac_preproc_ok=:
31011break
31012fi
31013rm -f conftest.err conftest.i conftest.$ac_ext
31014
31015done
31016# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31017rm -f conftest.i conftest.err conftest.$ac_ext
31018if $ac_preproc_ok; then :
31019  break
31020fi
31021
31022    done
31023    ac_cv_prog_CXXCPP=$CXXCPP
31024
31025fi
31026  CXXCPP=$ac_cv_prog_CXXCPP
31027else
31028  ac_cv_prog_CXXCPP=$CXXCPP
31029fi
31030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31031$as_echo "$CXXCPP" >&6; }
31032ac_preproc_ok=false
31033for ac_cxx_preproc_warn_flag in '' yes
31034do
31035  # Use a header file that comes with gcc, so configuring glibc
31036  # with a fresh cross-compiler works.
31037  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31038  # <limits.h> exists even on freestanding compilers.
31039  # On the NeXT, cc -E runs the code through the compiler's parser,
31040  # not just through cpp. "Syntax error" is here to catch this case.
31041  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31042/* end confdefs.h.  */
31043#ifdef __STDC__
31044# include <limits.h>
31045#else
31046# include <assert.h>
31047#endif
31048		     Syntax error
31049_ACEOF
31050if ac_fn_cxx_try_cpp "$LINENO"; then :
31051
31052else
31053  # Broken: fails on valid input.
31054continue
31055fi
31056rm -f conftest.err conftest.i conftest.$ac_ext
31057
31058  # OK, works on sane cases.  Now check whether nonexistent headers
31059  # can be detected and how.
31060  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31061/* end confdefs.h.  */
31062#include <ac_nonexistent.h>
31063_ACEOF
31064if ac_fn_cxx_try_cpp "$LINENO"; then :
31065  # Broken: success on invalid input.
31066continue
31067else
31068  # Passes both tests.
31069ac_preproc_ok=:
31070break
31071fi
31072rm -f conftest.err conftest.i conftest.$ac_ext
31073
31074done
31075# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31076rm -f conftest.i conftest.err conftest.$ac_ext
31077if $ac_preproc_ok; then :
31078
31079else
31080  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31081$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31082as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31083See \`config.log' for more details" "$LINENO" 5; }
31084fi
31085
31086ac_ext=cpp
31087ac_cpp='$CXXCPP $CPPFLAGS'
31088ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31089ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31090ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31091
31092
31093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31094
31095  # First separate the path from the arguments. This will split at the first
31096  # space.
31097  complete="$CXXCPP"
31098  path="${complete%% *}"
31099  tmp="$complete EOL"
31100  arguments="${tmp#* }"
31101
31102  # Input might be given as Windows format, start by converting to
31103  # unix format.
31104  new_path=`$CYGPATH -u "$path"`
31105
31106  # Now try to locate executable using which
31107  new_path=`$WHICH "$new_path" 2> /dev/null`
31108  # bat and cmd files are not always considered executable in cygwin causing which
31109  # to not find them
31110  if test "x$new_path" = x \
31111      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31112      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31113    new_path=`$CYGPATH -u "$path"`
31114  fi
31115  if test "x$new_path" = x; then
31116    # Oops. Which didn't find the executable.
31117    # The splitting of arguments from the executable at a space might have been incorrect,
31118    # since paths with space are more likely in Windows. Give it another try with the whole
31119    # argument.
31120    path="$complete"
31121    arguments="EOL"
31122    new_path=`$CYGPATH -u "$path"`
31123    new_path=`$WHICH "$new_path" 2> /dev/null`
31124    # bat and cmd files are not always considered executable in cygwin causing which
31125    # to not find them
31126    if test "x$new_path" = x \
31127        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31128        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31129      new_path=`$CYGPATH -u "$path"`
31130    fi
31131    if test "x$new_path" = x; then
31132      # It's still not found. Now this is an unrecoverable error.
31133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31134$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31135      has_space=`$ECHO "$complete" | $GREP " "`
31136      if test "x$has_space" != x; then
31137        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31138$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31139      fi
31140      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31141    fi
31142  fi
31143
31144  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31145  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31146  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31147  # "foo.exe" is OK but "foo" is an error.
31148  #
31149  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31150  # It is also a way to make sure we got the proper file name for the real test later on.
31151  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31152  if test "x$test_shortpath" = x; then
31153    # Short path failed, file does not exist as specified.
31154    # Try adding .exe or .cmd
31155    if test -f "${new_path}.exe"; then
31156      input_to_shortpath="${new_path}.exe"
31157    elif test -f "${new_path}.cmd"; then
31158      input_to_shortpath="${new_path}.cmd"
31159    else
31160      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31161$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31162      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31163$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31164      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31165    fi
31166  else
31167    input_to_shortpath="$new_path"
31168  fi
31169
31170  # Call helper function which possibly converts this using DOS-style short mode.
31171  # If so, the updated path is stored in $new_path.
31172  new_path="$input_to_shortpath"
31173
31174  input_path="$input_to_shortpath"
31175  # Check if we need to convert this using DOS-style short mode. If the path
31176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31177  # take no chances and rewrite it.
31178  # Note: m4 eats our [], so we need to use [ and ] instead.
31179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31180  if test "x$has_forbidden_chars" != x; then
31181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31185      # Going to short mode and back again did indeed matter. Since short mode is
31186      # case insensitive, let's make it lowercase to improve readability.
31187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31188      # Now convert it back to Unix-stile (cygpath)
31189      input_path=`$CYGPATH -u "$shortmode_path"`
31190      new_path="$input_path"
31191    fi
31192  fi
31193
31194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31195  if test "x$test_cygdrive_prefix" = x; then
31196    # As a simple fix, exclude /usr/bin since it's not a real path.
31197    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31199      # a path prefixed by /cygdrive for fixpath to work.
31200      new_path="$CYGWIN_ROOT_PATH$input_path"
31201    fi
31202  fi
31203
31204  # remove trailing .exe if any
31205  new_path="${new_path/%.exe/}"
31206
31207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31208
31209  # First separate the path from the arguments. This will split at the first
31210  # space.
31211  complete="$CXXCPP"
31212  path="${complete%% *}"
31213  tmp="$complete EOL"
31214  arguments="${tmp#* }"
31215
31216  # Input might be given as Windows format, start by converting to
31217  # unix format.
31218  new_path="$path"
31219
31220  windows_path="$new_path"
31221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31222    unix_path=`$CYGPATH -u "$windows_path"`
31223    new_path="$unix_path"
31224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31226    new_path="$unix_path"
31227  fi
31228
31229
31230  # Now try to locate executable using which
31231  new_path=`$WHICH "$new_path" 2> /dev/null`
31232
31233  if test "x$new_path" = x; then
31234    # Oops. Which didn't find the executable.
31235    # The splitting of arguments from the executable at a space might have been incorrect,
31236    # since paths with space are more likely in Windows. Give it another try with the whole
31237    # argument.
31238    path="$complete"
31239    arguments="EOL"
31240    new_path="$path"
31241
31242  windows_path="$new_path"
31243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31244    unix_path=`$CYGPATH -u "$windows_path"`
31245    new_path="$unix_path"
31246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31248    new_path="$unix_path"
31249  fi
31250
31251
31252    new_path=`$WHICH "$new_path" 2> /dev/null`
31253
31254    if test "x$new_path" = x; then
31255      # It's still not found. Now this is an unrecoverable error.
31256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31257$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31258      has_space=`$ECHO "$complete" | $GREP " "`
31259      if test "x$has_space" != x; then
31260        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31261$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31262      fi
31263      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31264    fi
31265  fi
31266
31267  # Now new_path has a complete unix path to the binary
31268  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31269    # Keep paths in /bin as-is, but remove trailing .exe if any
31270    new_path="${new_path/%.exe/}"
31271    # Do not save /bin paths to all_fixpath_prefixes!
31272  else
31273    # Not in mixed or Windows style, start by that.
31274    new_path=`cmd //c echo $new_path`
31275
31276  input_path="$new_path"
31277  # Check if we need to convert this using DOS-style short mode. If the path
31278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31279  # take no chances and rewrite it.
31280  # Note: m4 eats our [], so we need to use [ and ] instead.
31281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31282  if test "x$has_forbidden_chars" != x; then
31283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31284    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31285  fi
31286
31287    # Output is in $new_path
31288
31289  windows_path="$new_path"
31290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31291    unix_path=`$CYGPATH -u "$windows_path"`
31292    new_path="$unix_path"
31293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31295    new_path="$unix_path"
31296  fi
31297
31298    # remove trailing .exe if any
31299    new_path="${new_path/%.exe/}"
31300
31301    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31302    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31303  fi
31304
31305  else
31306    # We're on a posix platform. Hooray! :)
31307    # First separate the path from the arguments. This will split at the first
31308    # space.
31309    complete="$CXXCPP"
31310    path="${complete%% *}"
31311    tmp="$complete EOL"
31312    arguments="${tmp#* }"
31313
31314    # Cannot rely on the command "which" here since it doesn't always work.
31315    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31316    if test -z "$is_absolute_path"; then
31317      # Path to executable is not absolute. Find it.
31318      IFS_save="$IFS"
31319      IFS=:
31320      for p in $PATH; do
31321        if test -f "$p/$path" && test -x "$p/$path"; then
31322          new_path="$p/$path"
31323          break
31324        fi
31325      done
31326      IFS="$IFS_save"
31327    else
31328      # This is an absolute path, we can use it without further modifications.
31329      new_path="$path"
31330    fi
31331
31332    if test "x$new_path" = x; then
31333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31334$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31335      has_space=`$ECHO "$complete" | $GREP " "`
31336      if test "x$has_space" != x; then
31337        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31338$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31339      fi
31340      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31341    fi
31342  fi
31343
31344  # Now join together the path and the arguments once again
31345  if test "x$arguments" != xEOL; then
31346    new_complete="$new_path ${arguments% *}"
31347  else
31348    new_complete="$new_path"
31349  fi
31350
31351  if test "x$complete" != "x$new_complete"; then
31352    CXXCPP="$new_complete"
31353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31354$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31355  fi
31356
31357
31358  #
31359  # Setup the linker (LD)
31360  #
31361  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31362    # In the Microsoft toolchain we have a separate LD command "link".
31363    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31364    # a cygwin program for something completely different.
31365    # Extract the first word of "link", so it can be a program name with args.
31366set dummy link; ac_word=$2
31367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31368$as_echo_n "checking for $ac_word... " >&6; }
31369if ${ac_cv_prog_LD+:} false; then :
31370  $as_echo_n "(cached) " >&6
31371else
31372  if test -n "$LD"; then
31373  ac_cv_prog_LD="$LD" # Let the user override the test.
31374else
31375  ac_prog_rejected=no
31376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31377for as_dir in $PATH
31378do
31379  IFS=$as_save_IFS
31380  test -z "$as_dir" && as_dir=.
31381    for ac_exec_ext in '' $ac_executable_extensions; do
31382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31383    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31384       ac_prog_rejected=yes
31385       continue
31386     fi
31387    ac_cv_prog_LD="link"
31388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31389    break 2
31390  fi
31391done
31392  done
31393IFS=$as_save_IFS
31394
31395if test $ac_prog_rejected = yes; then
31396  # We found a bogon in the path, so make sure we never use it.
31397  set dummy $ac_cv_prog_LD
31398  shift
31399  if test $# != 0; then
31400    # We chose a different compiler from the bogus one.
31401    # However, it has the same basename, so the bogon will be chosen
31402    # first if we set LD to just the basename; use the full file name.
31403    shift
31404    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31405  fi
31406fi
31407fi
31408fi
31409LD=$ac_cv_prog_LD
31410if test -n "$LD"; then
31411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31412$as_echo "$LD" >&6; }
31413else
31414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31415$as_echo "no" >&6; }
31416fi
31417
31418
31419
31420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31421
31422  # First separate the path from the arguments. This will split at the first
31423  # space.
31424  complete="$LD"
31425  path="${complete%% *}"
31426  tmp="$complete EOL"
31427  arguments="${tmp#* }"
31428
31429  # Input might be given as Windows format, start by converting to
31430  # unix format.
31431  new_path=`$CYGPATH -u "$path"`
31432
31433  # Now try to locate executable using which
31434  new_path=`$WHICH "$new_path" 2> /dev/null`
31435  # bat and cmd files are not always considered executable in cygwin causing which
31436  # to not find them
31437  if test "x$new_path" = x \
31438      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31439      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31440    new_path=`$CYGPATH -u "$path"`
31441  fi
31442  if test "x$new_path" = x; then
31443    # Oops. Which didn't find the executable.
31444    # The splitting of arguments from the executable at a space might have been incorrect,
31445    # since paths with space are more likely in Windows. Give it another try with the whole
31446    # argument.
31447    path="$complete"
31448    arguments="EOL"
31449    new_path=`$CYGPATH -u "$path"`
31450    new_path=`$WHICH "$new_path" 2> /dev/null`
31451    # bat and cmd files are not always considered executable in cygwin causing which
31452    # to not find them
31453    if test "x$new_path" = x \
31454        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31455        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31456      new_path=`$CYGPATH -u "$path"`
31457    fi
31458    if test "x$new_path" = x; then
31459      # It's still not found. Now this is an unrecoverable error.
31460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31461$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31462      has_space=`$ECHO "$complete" | $GREP " "`
31463      if test "x$has_space" != x; then
31464        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31465$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31466      fi
31467      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31468    fi
31469  fi
31470
31471  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31472  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31473  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31474  # "foo.exe" is OK but "foo" is an error.
31475  #
31476  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31477  # It is also a way to make sure we got the proper file name for the real test later on.
31478  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31479  if test "x$test_shortpath" = x; then
31480    # Short path failed, file does not exist as specified.
31481    # Try adding .exe or .cmd
31482    if test -f "${new_path}.exe"; then
31483      input_to_shortpath="${new_path}.exe"
31484    elif test -f "${new_path}.cmd"; then
31485      input_to_shortpath="${new_path}.cmd"
31486    else
31487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31488$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31489      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31490$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31491      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31492    fi
31493  else
31494    input_to_shortpath="$new_path"
31495  fi
31496
31497  # Call helper function which possibly converts this using DOS-style short mode.
31498  # If so, the updated path is stored in $new_path.
31499  new_path="$input_to_shortpath"
31500
31501  input_path="$input_to_shortpath"
31502  # Check if we need to convert this using DOS-style short mode. If the path
31503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31504  # take no chances and rewrite it.
31505  # Note: m4 eats our [], so we need to use [ and ] instead.
31506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31507  if test "x$has_forbidden_chars" != x; then
31508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31509    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31510    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31511    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31512      # Going to short mode and back again did indeed matter. Since short mode is
31513      # case insensitive, let's make it lowercase to improve readability.
31514      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31515      # Now convert it back to Unix-stile (cygpath)
31516      input_path=`$CYGPATH -u "$shortmode_path"`
31517      new_path="$input_path"
31518    fi
31519  fi
31520
31521  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31522  if test "x$test_cygdrive_prefix" = x; then
31523    # As a simple fix, exclude /usr/bin since it's not a real path.
31524    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31525      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31526      # a path prefixed by /cygdrive for fixpath to work.
31527      new_path="$CYGWIN_ROOT_PATH$input_path"
31528    fi
31529  fi
31530
31531  # remove trailing .exe if any
31532  new_path="${new_path/%.exe/}"
31533
31534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31535
31536  # First separate the path from the arguments. This will split at the first
31537  # space.
31538  complete="$LD"
31539  path="${complete%% *}"
31540  tmp="$complete EOL"
31541  arguments="${tmp#* }"
31542
31543  # Input might be given as Windows format, start by converting to
31544  # unix format.
31545  new_path="$path"
31546
31547  windows_path="$new_path"
31548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31549    unix_path=`$CYGPATH -u "$windows_path"`
31550    new_path="$unix_path"
31551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31553    new_path="$unix_path"
31554  fi
31555
31556
31557  # Now try to locate executable using which
31558  new_path=`$WHICH "$new_path" 2> /dev/null`
31559
31560  if test "x$new_path" = x; then
31561    # Oops. Which didn't find the executable.
31562    # The splitting of arguments from the executable at a space might have been incorrect,
31563    # since paths with space are more likely in Windows. Give it another try with the whole
31564    # argument.
31565    path="$complete"
31566    arguments="EOL"
31567    new_path="$path"
31568
31569  windows_path="$new_path"
31570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31571    unix_path=`$CYGPATH -u "$windows_path"`
31572    new_path="$unix_path"
31573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31575    new_path="$unix_path"
31576  fi
31577
31578
31579    new_path=`$WHICH "$new_path" 2> /dev/null`
31580
31581    if test "x$new_path" = x; then
31582      # It's still not found. Now this is an unrecoverable error.
31583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31584$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31585      has_space=`$ECHO "$complete" | $GREP " "`
31586      if test "x$has_space" != x; then
31587        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31588$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31589      fi
31590      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31591    fi
31592  fi
31593
31594  # Now new_path has a complete unix path to the binary
31595  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31596    # Keep paths in /bin as-is, but remove trailing .exe if any
31597    new_path="${new_path/%.exe/}"
31598    # Do not save /bin paths to all_fixpath_prefixes!
31599  else
31600    # Not in mixed or Windows style, start by that.
31601    new_path=`cmd //c echo $new_path`
31602
31603  input_path="$new_path"
31604  # Check if we need to convert this using DOS-style short mode. If the path
31605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31606  # take no chances and rewrite it.
31607  # Note: m4 eats our [], so we need to use [ and ] instead.
31608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31609  if test "x$has_forbidden_chars" != x; then
31610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31611    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31612  fi
31613
31614    # Output is in $new_path
31615
31616  windows_path="$new_path"
31617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31618    unix_path=`$CYGPATH -u "$windows_path"`
31619    new_path="$unix_path"
31620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31622    new_path="$unix_path"
31623  fi
31624
31625    # remove trailing .exe if any
31626    new_path="${new_path/%.exe/}"
31627
31628    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31629    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31630  fi
31631
31632  else
31633    # We're on a posix platform. Hooray! :)
31634    # First separate the path from the arguments. This will split at the first
31635    # space.
31636    complete="$LD"
31637    path="${complete%% *}"
31638    tmp="$complete EOL"
31639    arguments="${tmp#* }"
31640
31641    # Cannot rely on the command "which" here since it doesn't always work.
31642    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31643    if test -z "$is_absolute_path"; then
31644      # Path to executable is not absolute. Find it.
31645      IFS_save="$IFS"
31646      IFS=:
31647      for p in $PATH; do
31648        if test -f "$p/$path" && test -x "$p/$path"; then
31649          new_path="$p/$path"
31650          break
31651        fi
31652      done
31653      IFS="$IFS_save"
31654    else
31655      # This is an absolute path, we can use it without further modifications.
31656      new_path="$path"
31657    fi
31658
31659    if test "x$new_path" = x; then
31660      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31661$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31662      has_space=`$ECHO "$complete" | $GREP " "`
31663      if test "x$has_space" != x; then
31664        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31665$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31666      fi
31667      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31668    fi
31669  fi
31670
31671  # Now join together the path and the arguments once again
31672  if test "x$arguments" != xEOL; then
31673    new_complete="$new_path ${arguments% *}"
31674  else
31675    new_complete="$new_path"
31676  fi
31677
31678  if test "x$complete" != "x$new_complete"; then
31679    LD="$new_complete"
31680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31681$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31682  fi
31683
31684    # Verify that we indeed succeeded with this trick.
31685    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31686$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31687    "$LD" --version > /dev/null
31688    if test $? -eq 0 ; then
31689      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31690$as_echo "no" >&6; }
31691      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31692    else
31693      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31694$as_echo "yes" >&6; }
31695    fi
31696    LDCXX="$LD"
31697  else
31698    # All other toolchains use the compiler to link.
31699    LD="$CC"
31700    LDCXX="$CXX"
31701  fi
31702
31703  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31704
31705
31706  #
31707  # Setup the assembler (AS)
31708  #
31709  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31710    # FIXME: should this really be solaris, or solstudio?
31711
31712
31713  # Publish this variable in the help.
31714
31715
31716  if test "x$AS" = x; then
31717    # The variable is not set by user, try to locate tool using the code snippet
31718    for ac_prog in as
31719do
31720  # Extract the first word of "$ac_prog", so it can be a program name with args.
31721set dummy $ac_prog; ac_word=$2
31722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31723$as_echo_n "checking for $ac_word... " >&6; }
31724if ${ac_cv_path_AS+:} false; then :
31725  $as_echo_n "(cached) " >&6
31726else
31727  case $AS in
31728  [\\/]* | ?:[\\/]*)
31729  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31730  ;;
31731  *)
31732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31733for as_dir in $PATH
31734do
31735  IFS=$as_save_IFS
31736  test -z "$as_dir" && as_dir=.
31737    for ac_exec_ext in '' $ac_executable_extensions; do
31738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31739    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31741    break 2
31742  fi
31743done
31744  done
31745IFS=$as_save_IFS
31746
31747  ;;
31748esac
31749fi
31750AS=$ac_cv_path_AS
31751if test -n "$AS"; then
31752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31753$as_echo "$AS" >&6; }
31754else
31755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31756$as_echo "no" >&6; }
31757fi
31758
31759
31760  test -n "$AS" && break
31761done
31762
31763  else
31764    # The variable is set, but is it from the command line or the environment?
31765
31766    # Try to remove the string !AS! from our list.
31767    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31768    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31769      # If it failed, the variable was not from the command line. Ignore it,
31770      # but warn the user (except for BASH, which is always set by the calling BASH).
31771      if test "xAS" != xBASH; then
31772        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31773$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31774      fi
31775      # Try to locate tool using the code snippet
31776      for ac_prog in as
31777do
31778  # Extract the first word of "$ac_prog", so it can be a program name with args.
31779set dummy $ac_prog; ac_word=$2
31780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31781$as_echo_n "checking for $ac_word... " >&6; }
31782if ${ac_cv_path_AS+:} false; then :
31783  $as_echo_n "(cached) " >&6
31784else
31785  case $AS in
31786  [\\/]* | ?:[\\/]*)
31787  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31788  ;;
31789  *)
31790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31791for as_dir in $PATH
31792do
31793  IFS=$as_save_IFS
31794  test -z "$as_dir" && as_dir=.
31795    for ac_exec_ext in '' $ac_executable_extensions; do
31796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31797    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31799    break 2
31800  fi
31801done
31802  done
31803IFS=$as_save_IFS
31804
31805  ;;
31806esac
31807fi
31808AS=$ac_cv_path_AS
31809if test -n "$AS"; then
31810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31811$as_echo "$AS" >&6; }
31812else
31813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31814$as_echo "no" >&6; }
31815fi
31816
31817
31818  test -n "$AS" && break
31819done
31820
31821    else
31822      # If it succeeded, then it was overridden by the user. We will use it
31823      # for the tool.
31824
31825      # First remove it from the list of overridden variables, so we can test
31826      # for unknown variables in the end.
31827      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31828
31829      # Check if the provided tool contains a complete path.
31830      tool_specified="$AS"
31831      tool_basename="${tool_specified##*/}"
31832      if test "x$tool_basename" = "x$tool_specified"; then
31833        # A command without a complete path is provided, search $PATH.
31834        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
31835$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
31836        # Extract the first word of "$tool_basename", so it can be a program name with args.
31837set dummy $tool_basename; ac_word=$2
31838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31839$as_echo_n "checking for $ac_word... " >&6; }
31840if ${ac_cv_path_AS+:} false; then :
31841  $as_echo_n "(cached) " >&6
31842else
31843  case $AS in
31844  [\\/]* | ?:[\\/]*)
31845  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31846  ;;
31847  *)
31848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31849for as_dir in $PATH
31850do
31851  IFS=$as_save_IFS
31852  test -z "$as_dir" && as_dir=.
31853    for ac_exec_ext in '' $ac_executable_extensions; do
31854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31855    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31857    break 2
31858  fi
31859done
31860  done
31861IFS=$as_save_IFS
31862
31863  ;;
31864esac
31865fi
31866AS=$ac_cv_path_AS
31867if test -n "$AS"; then
31868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31869$as_echo "$AS" >&6; }
31870else
31871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31872$as_echo "no" >&6; }
31873fi
31874
31875
31876        if test "x$AS" = x; then
31877          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31878        fi
31879      else
31880        # Otherwise we believe it is a complete path. Use it as it is.
31881        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
31882$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
31883        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
31884$as_echo_n "checking for AS... " >&6; }
31885        if test ! -x "$tool_specified"; then
31886          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31887$as_echo "not found" >&6; }
31888          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
31889        fi
31890        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31891$as_echo "$tool_specified" >&6; }
31892      fi
31893    fi
31894  fi
31895
31896
31897
31898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31899
31900  # First separate the path from the arguments. This will split at the first
31901  # space.
31902  complete="$AS"
31903  path="${complete%% *}"
31904  tmp="$complete EOL"
31905  arguments="${tmp#* }"
31906
31907  # Input might be given as Windows format, start by converting to
31908  # unix format.
31909  new_path=`$CYGPATH -u "$path"`
31910
31911  # Now try to locate executable using which
31912  new_path=`$WHICH "$new_path" 2> /dev/null`
31913  # bat and cmd files are not always considered executable in cygwin causing which
31914  # to not find them
31915  if test "x$new_path" = x \
31916      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31917      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31918    new_path=`$CYGPATH -u "$path"`
31919  fi
31920  if test "x$new_path" = x; then
31921    # Oops. Which didn't find the executable.
31922    # The splitting of arguments from the executable at a space might have been incorrect,
31923    # since paths with space are more likely in Windows. Give it another try with the whole
31924    # argument.
31925    path="$complete"
31926    arguments="EOL"
31927    new_path=`$CYGPATH -u "$path"`
31928    new_path=`$WHICH "$new_path" 2> /dev/null`
31929    # bat and cmd files are not always considered executable in cygwin causing which
31930    # to not find them
31931    if test "x$new_path" = x \
31932        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31933        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31934      new_path=`$CYGPATH -u "$path"`
31935    fi
31936    if test "x$new_path" = x; then
31937      # It's still not found. Now this is an unrecoverable error.
31938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31939$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31940      has_space=`$ECHO "$complete" | $GREP " "`
31941      if test "x$has_space" != x; then
31942        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31943$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31944      fi
31945      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31946    fi
31947  fi
31948
31949  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31950  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31951  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31952  # "foo.exe" is OK but "foo" is an error.
31953  #
31954  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31955  # It is also a way to make sure we got the proper file name for the real test later on.
31956  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31957  if test "x$test_shortpath" = x; then
31958    # Short path failed, file does not exist as specified.
31959    # Try adding .exe or .cmd
31960    if test -f "${new_path}.exe"; then
31961      input_to_shortpath="${new_path}.exe"
31962    elif test -f "${new_path}.cmd"; then
31963      input_to_shortpath="${new_path}.cmd"
31964    else
31965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
31966$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
31967      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31968$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31969      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31970    fi
31971  else
31972    input_to_shortpath="$new_path"
31973  fi
31974
31975  # Call helper function which possibly converts this using DOS-style short mode.
31976  # If so, the updated path is stored in $new_path.
31977  new_path="$input_to_shortpath"
31978
31979  input_path="$input_to_shortpath"
31980  # Check if we need to convert this using DOS-style short mode. If the path
31981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31982  # take no chances and rewrite it.
31983  # Note: m4 eats our [], so we need to use [ and ] instead.
31984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31985  if test "x$has_forbidden_chars" != x; then
31986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31987    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31988    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31989    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31990      # Going to short mode and back again did indeed matter. Since short mode is
31991      # case insensitive, let's make it lowercase to improve readability.
31992      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31993      # Now convert it back to Unix-stile (cygpath)
31994      input_path=`$CYGPATH -u "$shortmode_path"`
31995      new_path="$input_path"
31996    fi
31997  fi
31998
31999  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32000  if test "x$test_cygdrive_prefix" = x; then
32001    # As a simple fix, exclude /usr/bin since it's not a real path.
32002    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32003      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32004      # a path prefixed by /cygdrive for fixpath to work.
32005      new_path="$CYGWIN_ROOT_PATH$input_path"
32006    fi
32007  fi
32008
32009  # remove trailing .exe if any
32010  new_path="${new_path/%.exe/}"
32011
32012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32013
32014  # First separate the path from the arguments. This will split at the first
32015  # space.
32016  complete="$AS"
32017  path="${complete%% *}"
32018  tmp="$complete EOL"
32019  arguments="${tmp#* }"
32020
32021  # Input might be given as Windows format, start by converting to
32022  # unix format.
32023  new_path="$path"
32024
32025  windows_path="$new_path"
32026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32027    unix_path=`$CYGPATH -u "$windows_path"`
32028    new_path="$unix_path"
32029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32031    new_path="$unix_path"
32032  fi
32033
32034
32035  # Now try to locate executable using which
32036  new_path=`$WHICH "$new_path" 2> /dev/null`
32037
32038  if test "x$new_path" = x; then
32039    # Oops. Which didn't find the executable.
32040    # The splitting of arguments from the executable at a space might have been incorrect,
32041    # since paths with space are more likely in Windows. Give it another try with the whole
32042    # argument.
32043    path="$complete"
32044    arguments="EOL"
32045    new_path="$path"
32046
32047  windows_path="$new_path"
32048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32049    unix_path=`$CYGPATH -u "$windows_path"`
32050    new_path="$unix_path"
32051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32053    new_path="$unix_path"
32054  fi
32055
32056
32057    new_path=`$WHICH "$new_path" 2> /dev/null`
32058
32059    if test "x$new_path" = x; then
32060      # It's still not found. Now this is an unrecoverable error.
32061      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32062$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32063      has_space=`$ECHO "$complete" | $GREP " "`
32064      if test "x$has_space" != x; then
32065        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32066$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32067      fi
32068      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32069    fi
32070  fi
32071
32072  # Now new_path has a complete unix path to the binary
32073  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32074    # Keep paths in /bin as-is, but remove trailing .exe if any
32075    new_path="${new_path/%.exe/}"
32076    # Do not save /bin paths to all_fixpath_prefixes!
32077  else
32078    # Not in mixed or Windows style, start by that.
32079    new_path=`cmd //c echo $new_path`
32080
32081  input_path="$new_path"
32082  # Check if we need to convert this using DOS-style short mode. If the path
32083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32084  # take no chances and rewrite it.
32085  # Note: m4 eats our [], so we need to use [ and ] instead.
32086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32087  if test "x$has_forbidden_chars" != x; then
32088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32089    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32090  fi
32091
32092    # Output is in $new_path
32093
32094  windows_path="$new_path"
32095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32096    unix_path=`$CYGPATH -u "$windows_path"`
32097    new_path="$unix_path"
32098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32100    new_path="$unix_path"
32101  fi
32102
32103    # remove trailing .exe if any
32104    new_path="${new_path/%.exe/}"
32105
32106    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32107    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32108  fi
32109
32110  else
32111    # We're on a posix platform. Hooray! :)
32112    # First separate the path from the arguments. This will split at the first
32113    # space.
32114    complete="$AS"
32115    path="${complete%% *}"
32116    tmp="$complete EOL"
32117    arguments="${tmp#* }"
32118
32119    # Cannot rely on the command "which" here since it doesn't always work.
32120    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32121    if test -z "$is_absolute_path"; then
32122      # Path to executable is not absolute. Find it.
32123      IFS_save="$IFS"
32124      IFS=:
32125      for p in $PATH; do
32126        if test -f "$p/$path" && test -x "$p/$path"; then
32127          new_path="$p/$path"
32128          break
32129        fi
32130      done
32131      IFS="$IFS_save"
32132    else
32133      # This is an absolute path, we can use it without further modifications.
32134      new_path="$path"
32135    fi
32136
32137    if test "x$new_path" = x; then
32138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32139$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32140      has_space=`$ECHO "$complete" | $GREP " "`
32141      if test "x$has_space" != x; then
32142        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32143$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32144      fi
32145      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32146    fi
32147  fi
32148
32149  # Now join together the path and the arguments once again
32150  if test "x$arguments" != xEOL; then
32151    new_complete="$new_path ${arguments% *}"
32152  else
32153    new_complete="$new_path"
32154  fi
32155
32156  if test "x$complete" != "x$new_complete"; then
32157    AS="$new_complete"
32158    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32159$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32160  fi
32161
32162  else
32163    # FIXME: is this correct for microsoft?
32164    AS="$CC -c"
32165  fi
32166
32167
32168  #
32169  # Setup the archiver (AR)
32170  #
32171  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32172    # The corresponding ar tool is lib.exe (used to create static libraries)
32173    # Extract the first word of "lib", so it can be a program name with args.
32174set dummy lib; ac_word=$2
32175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32176$as_echo_n "checking for $ac_word... " >&6; }
32177if ${ac_cv_prog_AR+:} false; then :
32178  $as_echo_n "(cached) " >&6
32179else
32180  if test -n "$AR"; then
32181  ac_cv_prog_AR="$AR" # Let the user override the test.
32182else
32183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32184for as_dir in $PATH
32185do
32186  IFS=$as_save_IFS
32187  test -z "$as_dir" && as_dir=.
32188    for ac_exec_ext in '' $ac_executable_extensions; do
32189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32190    ac_cv_prog_AR="lib"
32191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32192    break 2
32193  fi
32194done
32195  done
32196IFS=$as_save_IFS
32197
32198fi
32199fi
32200AR=$ac_cv_prog_AR
32201if test -n "$AR"; then
32202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32203$as_echo "$AR" >&6; }
32204else
32205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32206$as_echo "no" >&6; }
32207fi
32208
32209
32210  else
32211
32212
32213  # Publish this variable in the help.
32214
32215
32216  if test "x$AR" = x; then
32217    # The variable is not set by user, try to locate tool using the code snippet
32218    if test -n "$ac_tool_prefix"; then
32219  for ac_prog in ar
32220  do
32221    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32222set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32224$as_echo_n "checking for $ac_word... " >&6; }
32225if ${ac_cv_prog_AR+:} false; then :
32226  $as_echo_n "(cached) " >&6
32227else
32228  if test -n "$AR"; then
32229  ac_cv_prog_AR="$AR" # Let the user override the test.
32230else
32231as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32232for as_dir in $PATH
32233do
32234  IFS=$as_save_IFS
32235  test -z "$as_dir" && as_dir=.
32236    for ac_exec_ext in '' $ac_executable_extensions; do
32237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32238    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32240    break 2
32241  fi
32242done
32243  done
32244IFS=$as_save_IFS
32245
32246fi
32247fi
32248AR=$ac_cv_prog_AR
32249if test -n "$AR"; then
32250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32251$as_echo "$AR" >&6; }
32252else
32253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32254$as_echo "no" >&6; }
32255fi
32256
32257
32258    test -n "$AR" && break
32259  done
32260fi
32261if test -z "$AR"; then
32262  ac_ct_AR=$AR
32263  for ac_prog in ar
32264do
32265  # Extract the first word of "$ac_prog", so it can be a program name with args.
32266set dummy $ac_prog; ac_word=$2
32267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32268$as_echo_n "checking for $ac_word... " >&6; }
32269if ${ac_cv_prog_ac_ct_AR+:} false; then :
32270  $as_echo_n "(cached) " >&6
32271else
32272  if test -n "$ac_ct_AR"; then
32273  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32274else
32275as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32276for as_dir in $PATH
32277do
32278  IFS=$as_save_IFS
32279  test -z "$as_dir" && as_dir=.
32280    for ac_exec_ext in '' $ac_executable_extensions; do
32281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32282    ac_cv_prog_ac_ct_AR="$ac_prog"
32283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32284    break 2
32285  fi
32286done
32287  done
32288IFS=$as_save_IFS
32289
32290fi
32291fi
32292ac_ct_AR=$ac_cv_prog_ac_ct_AR
32293if test -n "$ac_ct_AR"; then
32294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32295$as_echo "$ac_ct_AR" >&6; }
32296else
32297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32298$as_echo "no" >&6; }
32299fi
32300
32301
32302  test -n "$ac_ct_AR" && break
32303done
32304
32305  if test "x$ac_ct_AR" = x; then
32306    AR=""
32307  else
32308    case $cross_compiling:$ac_tool_warned in
32309yes:)
32310{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32311$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32312ac_tool_warned=yes ;;
32313esac
32314    AR=$ac_ct_AR
32315  fi
32316fi
32317
32318  else
32319    # The variable is set, but is it from the command line or the environment?
32320
32321    # Try to remove the string !AR! from our list.
32322    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32323    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32324      # If it failed, the variable was not from the command line. Ignore it,
32325      # but warn the user (except for BASH, which is always set by the calling BASH).
32326      if test "xAR" != xBASH; then
32327        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32328$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32329      fi
32330      # Try to locate tool using the code snippet
32331      if test -n "$ac_tool_prefix"; then
32332  for ac_prog in ar
32333  do
32334    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32335set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32337$as_echo_n "checking for $ac_word... " >&6; }
32338if ${ac_cv_prog_AR+:} false; then :
32339  $as_echo_n "(cached) " >&6
32340else
32341  if test -n "$AR"; then
32342  ac_cv_prog_AR="$AR" # Let the user override the test.
32343else
32344as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32345for as_dir in $PATH
32346do
32347  IFS=$as_save_IFS
32348  test -z "$as_dir" && as_dir=.
32349    for ac_exec_ext in '' $ac_executable_extensions; do
32350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32351    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32353    break 2
32354  fi
32355done
32356  done
32357IFS=$as_save_IFS
32358
32359fi
32360fi
32361AR=$ac_cv_prog_AR
32362if test -n "$AR"; then
32363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32364$as_echo "$AR" >&6; }
32365else
32366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32367$as_echo "no" >&6; }
32368fi
32369
32370
32371    test -n "$AR" && break
32372  done
32373fi
32374if test -z "$AR"; then
32375  ac_ct_AR=$AR
32376  for ac_prog in ar
32377do
32378  # Extract the first word of "$ac_prog", so it can be a program name with args.
32379set dummy $ac_prog; ac_word=$2
32380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32381$as_echo_n "checking for $ac_word... " >&6; }
32382if ${ac_cv_prog_ac_ct_AR+:} false; then :
32383  $as_echo_n "(cached) " >&6
32384else
32385  if test -n "$ac_ct_AR"; then
32386  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32387else
32388as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32389for as_dir in $PATH
32390do
32391  IFS=$as_save_IFS
32392  test -z "$as_dir" && as_dir=.
32393    for ac_exec_ext in '' $ac_executable_extensions; do
32394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32395    ac_cv_prog_ac_ct_AR="$ac_prog"
32396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32397    break 2
32398  fi
32399done
32400  done
32401IFS=$as_save_IFS
32402
32403fi
32404fi
32405ac_ct_AR=$ac_cv_prog_ac_ct_AR
32406if test -n "$ac_ct_AR"; then
32407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32408$as_echo "$ac_ct_AR" >&6; }
32409else
32410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32411$as_echo "no" >&6; }
32412fi
32413
32414
32415  test -n "$ac_ct_AR" && break
32416done
32417
32418  if test "x$ac_ct_AR" = x; then
32419    AR=""
32420  else
32421    case $cross_compiling:$ac_tool_warned in
32422yes:)
32423{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32424$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32425ac_tool_warned=yes ;;
32426esac
32427    AR=$ac_ct_AR
32428  fi
32429fi
32430
32431    else
32432      # If it succeeded, then it was overridden by the user. We will use it
32433      # for the tool.
32434
32435      # First remove it from the list of overridden variables, so we can test
32436      # for unknown variables in the end.
32437      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32438
32439      # Check if the provided tool contains a complete path.
32440      tool_specified="$AR"
32441      tool_basename="${tool_specified##*/}"
32442      if test "x$tool_basename" = "x$tool_specified"; then
32443        # A command without a complete path is provided, search $PATH.
32444        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32445$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32446        # Extract the first word of "$tool_basename", so it can be a program name with args.
32447set dummy $tool_basename; ac_word=$2
32448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32449$as_echo_n "checking for $ac_word... " >&6; }
32450if ${ac_cv_path_AR+:} false; then :
32451  $as_echo_n "(cached) " >&6
32452else
32453  case $AR in
32454  [\\/]* | ?:[\\/]*)
32455  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32456  ;;
32457  *)
32458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32459for as_dir in $PATH
32460do
32461  IFS=$as_save_IFS
32462  test -z "$as_dir" && as_dir=.
32463    for ac_exec_ext in '' $ac_executable_extensions; do
32464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32465    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32467    break 2
32468  fi
32469done
32470  done
32471IFS=$as_save_IFS
32472
32473  ;;
32474esac
32475fi
32476AR=$ac_cv_path_AR
32477if test -n "$AR"; then
32478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32479$as_echo "$AR" >&6; }
32480else
32481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32482$as_echo "no" >&6; }
32483fi
32484
32485
32486        if test "x$AR" = x; then
32487          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32488        fi
32489      else
32490        # Otherwise we believe it is a complete path. Use it as it is.
32491        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32492$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32493        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32494$as_echo_n "checking for AR... " >&6; }
32495        if test ! -x "$tool_specified"; then
32496          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32497$as_echo "not found" >&6; }
32498          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32499        fi
32500        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32501$as_echo "$tool_specified" >&6; }
32502      fi
32503    fi
32504  fi
32505
32506
32507  fi
32508
32509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32510
32511  # First separate the path from the arguments. This will split at the first
32512  # space.
32513  complete="$AR"
32514  path="${complete%% *}"
32515  tmp="$complete EOL"
32516  arguments="${tmp#* }"
32517
32518  # Input might be given as Windows format, start by converting to
32519  # unix format.
32520  new_path=`$CYGPATH -u "$path"`
32521
32522  # Now try to locate executable using which
32523  new_path=`$WHICH "$new_path" 2> /dev/null`
32524  # bat and cmd files are not always considered executable in cygwin causing which
32525  # to not find them
32526  if test "x$new_path" = x \
32527      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32528      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32529    new_path=`$CYGPATH -u "$path"`
32530  fi
32531  if test "x$new_path" = x; then
32532    # Oops. Which didn't find the executable.
32533    # The splitting of arguments from the executable at a space might have been incorrect,
32534    # since paths with space are more likely in Windows. Give it another try with the whole
32535    # argument.
32536    path="$complete"
32537    arguments="EOL"
32538    new_path=`$CYGPATH -u "$path"`
32539    new_path=`$WHICH "$new_path" 2> /dev/null`
32540    # bat and cmd files are not always considered executable in cygwin causing which
32541    # to not find them
32542    if test "x$new_path" = x \
32543        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32544        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32545      new_path=`$CYGPATH -u "$path"`
32546    fi
32547    if test "x$new_path" = x; then
32548      # It's still not found. Now this is an unrecoverable error.
32549      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32550$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32551      has_space=`$ECHO "$complete" | $GREP " "`
32552      if test "x$has_space" != x; then
32553        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32554$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32555      fi
32556      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32557    fi
32558  fi
32559
32560  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32561  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32562  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32563  # "foo.exe" is OK but "foo" is an error.
32564  #
32565  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32566  # It is also a way to make sure we got the proper file name for the real test later on.
32567  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32568  if test "x$test_shortpath" = x; then
32569    # Short path failed, file does not exist as specified.
32570    # Try adding .exe or .cmd
32571    if test -f "${new_path}.exe"; then
32572      input_to_shortpath="${new_path}.exe"
32573    elif test -f "${new_path}.cmd"; then
32574      input_to_shortpath="${new_path}.cmd"
32575    else
32576      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32577$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32578      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32579$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32580      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32581    fi
32582  else
32583    input_to_shortpath="$new_path"
32584  fi
32585
32586  # Call helper function which possibly converts this using DOS-style short mode.
32587  # If so, the updated path is stored in $new_path.
32588  new_path="$input_to_shortpath"
32589
32590  input_path="$input_to_shortpath"
32591  # Check if we need to convert this using DOS-style short mode. If the path
32592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32593  # take no chances and rewrite it.
32594  # Note: m4 eats our [], so we need to use [ and ] instead.
32595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32596  if test "x$has_forbidden_chars" != x; then
32597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32598    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32599    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32600    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32601      # Going to short mode and back again did indeed matter. Since short mode is
32602      # case insensitive, let's make it lowercase to improve readability.
32603      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32604      # Now convert it back to Unix-stile (cygpath)
32605      input_path=`$CYGPATH -u "$shortmode_path"`
32606      new_path="$input_path"
32607    fi
32608  fi
32609
32610  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32611  if test "x$test_cygdrive_prefix" = x; then
32612    # As a simple fix, exclude /usr/bin since it's not a real path.
32613    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32614      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32615      # a path prefixed by /cygdrive for fixpath to work.
32616      new_path="$CYGWIN_ROOT_PATH$input_path"
32617    fi
32618  fi
32619
32620  # remove trailing .exe if any
32621  new_path="${new_path/%.exe/}"
32622
32623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32624
32625  # First separate the path from the arguments. This will split at the first
32626  # space.
32627  complete="$AR"
32628  path="${complete%% *}"
32629  tmp="$complete EOL"
32630  arguments="${tmp#* }"
32631
32632  # Input might be given as Windows format, start by converting to
32633  # unix format.
32634  new_path="$path"
32635
32636  windows_path="$new_path"
32637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32638    unix_path=`$CYGPATH -u "$windows_path"`
32639    new_path="$unix_path"
32640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32642    new_path="$unix_path"
32643  fi
32644
32645
32646  # Now try to locate executable using which
32647  new_path=`$WHICH "$new_path" 2> /dev/null`
32648
32649  if test "x$new_path" = x; then
32650    # Oops. Which didn't find the executable.
32651    # The splitting of arguments from the executable at a space might have been incorrect,
32652    # since paths with space are more likely in Windows. Give it another try with the whole
32653    # argument.
32654    path="$complete"
32655    arguments="EOL"
32656    new_path="$path"
32657
32658  windows_path="$new_path"
32659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32660    unix_path=`$CYGPATH -u "$windows_path"`
32661    new_path="$unix_path"
32662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32664    new_path="$unix_path"
32665  fi
32666
32667
32668    new_path=`$WHICH "$new_path" 2> /dev/null`
32669
32670    if test "x$new_path" = x; then
32671      # It's still not found. Now this is an unrecoverable error.
32672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32673$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32674      has_space=`$ECHO "$complete" | $GREP " "`
32675      if test "x$has_space" != x; then
32676        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32677$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32678      fi
32679      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32680    fi
32681  fi
32682
32683  # Now new_path has a complete unix path to the binary
32684  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32685    # Keep paths in /bin as-is, but remove trailing .exe if any
32686    new_path="${new_path/%.exe/}"
32687    # Do not save /bin paths to all_fixpath_prefixes!
32688  else
32689    # Not in mixed or Windows style, start by that.
32690    new_path=`cmd //c echo $new_path`
32691
32692  input_path="$new_path"
32693  # Check if we need to convert this using DOS-style short mode. If the path
32694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32695  # take no chances and rewrite it.
32696  # Note: m4 eats our [], so we need to use [ and ] instead.
32697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32698  if test "x$has_forbidden_chars" != x; then
32699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32700    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32701  fi
32702
32703    # Output is in $new_path
32704
32705  windows_path="$new_path"
32706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32707    unix_path=`$CYGPATH -u "$windows_path"`
32708    new_path="$unix_path"
32709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32711    new_path="$unix_path"
32712  fi
32713
32714    # remove trailing .exe if any
32715    new_path="${new_path/%.exe/}"
32716
32717    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32718    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32719  fi
32720
32721  else
32722    # We're on a posix platform. Hooray! :)
32723    # First separate the path from the arguments. This will split at the first
32724    # space.
32725    complete="$AR"
32726    path="${complete%% *}"
32727    tmp="$complete EOL"
32728    arguments="${tmp#* }"
32729
32730    # Cannot rely on the command "which" here since it doesn't always work.
32731    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32732    if test -z "$is_absolute_path"; then
32733      # Path to executable is not absolute. Find it.
32734      IFS_save="$IFS"
32735      IFS=:
32736      for p in $PATH; do
32737        if test -f "$p/$path" && test -x "$p/$path"; then
32738          new_path="$p/$path"
32739          break
32740        fi
32741      done
32742      IFS="$IFS_save"
32743    else
32744      # This is an absolute path, we can use it without further modifications.
32745      new_path="$path"
32746    fi
32747
32748    if test "x$new_path" = x; then
32749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32750$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32751      has_space=`$ECHO "$complete" | $GREP " "`
32752      if test "x$has_space" != x; then
32753        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32754$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32755      fi
32756      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32757    fi
32758  fi
32759
32760  # Now join together the path and the arguments once again
32761  if test "x$arguments" != xEOL; then
32762    new_complete="$new_path ${arguments% *}"
32763  else
32764    new_complete="$new_path"
32765  fi
32766
32767  if test "x$complete" != "x$new_complete"; then
32768    AR="$new_complete"
32769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32770$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32771  fi
32772
32773
32774
32775  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32776    ac_ext=m
32777ac_cpp='$OBJCPP $CPPFLAGS'
32778ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32779ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32780ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32781if test -n "$ac_tool_prefix"; then
32782  for ac_prog in gcc objcc objc cc CC
32783  do
32784    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32785set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32787$as_echo_n "checking for $ac_word... " >&6; }
32788if ${ac_cv_prog_OBJC+:} false; then :
32789  $as_echo_n "(cached) " >&6
32790else
32791  if test -n "$OBJC"; then
32792  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32793else
32794as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32795for as_dir in $PATH
32796do
32797  IFS=$as_save_IFS
32798  test -z "$as_dir" && as_dir=.
32799    for ac_exec_ext in '' $ac_executable_extensions; do
32800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32801    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32803    break 2
32804  fi
32805done
32806  done
32807IFS=$as_save_IFS
32808
32809fi
32810fi
32811OBJC=$ac_cv_prog_OBJC
32812if test -n "$OBJC"; then
32813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32814$as_echo "$OBJC" >&6; }
32815else
32816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32817$as_echo "no" >&6; }
32818fi
32819
32820
32821    test -n "$OBJC" && break
32822  done
32823fi
32824if test -z "$OBJC"; then
32825  ac_ct_OBJC=$OBJC
32826  for ac_prog in gcc objcc objc cc CC
32827do
32828  # Extract the first word of "$ac_prog", so it can be a program name with args.
32829set dummy $ac_prog; ac_word=$2
32830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32831$as_echo_n "checking for $ac_word... " >&6; }
32832if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32833  $as_echo_n "(cached) " >&6
32834else
32835  if test -n "$ac_ct_OBJC"; then
32836  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32837else
32838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32839for as_dir in $PATH
32840do
32841  IFS=$as_save_IFS
32842  test -z "$as_dir" && as_dir=.
32843    for ac_exec_ext in '' $ac_executable_extensions; do
32844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32845    ac_cv_prog_ac_ct_OBJC="$ac_prog"
32846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32847    break 2
32848  fi
32849done
32850  done
32851IFS=$as_save_IFS
32852
32853fi
32854fi
32855ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32856if test -n "$ac_ct_OBJC"; then
32857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32858$as_echo "$ac_ct_OBJC" >&6; }
32859else
32860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32861$as_echo "no" >&6; }
32862fi
32863
32864
32865  test -n "$ac_ct_OBJC" && break
32866done
32867
32868  if test "x$ac_ct_OBJC" = x; then
32869    OBJC="gcc"
32870  else
32871    case $cross_compiling:$ac_tool_warned in
32872yes:)
32873{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32874$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32875ac_tool_warned=yes ;;
32876esac
32877    OBJC=$ac_ct_OBJC
32878  fi
32879fi
32880
32881# Provide some information about the compiler.
32882$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32883set X $ac_compile
32884ac_compiler=$2
32885for ac_option in --version -v -V -qversion; do
32886  { { ac_try="$ac_compiler $ac_option >&5"
32887case "(($ac_try" in
32888  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32889  *) ac_try_echo=$ac_try;;
32890esac
32891eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32892$as_echo "$ac_try_echo"; } >&5
32893  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32894  ac_status=$?
32895  if test -s conftest.err; then
32896    sed '10a\
32897... rest of stderr output deleted ...
32898         10q' conftest.err >conftest.er1
32899    cat conftest.er1 >&5
32900  fi
32901  rm -f conftest.er1 conftest.err
32902  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32903  test $ac_status = 0; }
32904done
32905
32906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
32907$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
32908if ${ac_cv_objc_compiler_gnu+:} false; then :
32909  $as_echo_n "(cached) " >&6
32910else
32911  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32912/* end confdefs.h.  */
32913
32914int
32915main ()
32916{
32917#ifndef __GNUC__
32918       choke me
32919#endif
32920
32921  ;
32922  return 0;
32923}
32924_ACEOF
32925if ac_fn_objc_try_compile "$LINENO"; then :
32926  ac_compiler_gnu=yes
32927else
32928  ac_compiler_gnu=no
32929fi
32930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32931ac_cv_objc_compiler_gnu=$ac_compiler_gnu
32932
32933fi
32934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
32935$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
32936if test $ac_compiler_gnu = yes; then
32937  GOBJC=yes
32938else
32939  GOBJC=
32940fi
32941ac_test_OBJCFLAGS=${OBJCFLAGS+set}
32942ac_save_OBJCFLAGS=$OBJCFLAGS
32943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
32944$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
32945if ${ac_cv_prog_objc_g+:} false; then :
32946  $as_echo_n "(cached) " >&6
32947else
32948  ac_save_objc_werror_flag=$ac_objc_werror_flag
32949   ac_objc_werror_flag=yes
32950   ac_cv_prog_objc_g=no
32951   OBJCFLAGS="-g"
32952   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32953/* end confdefs.h.  */
32954
32955int
32956main ()
32957{
32958
32959  ;
32960  return 0;
32961}
32962_ACEOF
32963if ac_fn_objc_try_compile "$LINENO"; then :
32964  ac_cv_prog_objc_g=yes
32965else
32966  OBJCFLAGS=""
32967      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32968/* end confdefs.h.  */
32969
32970int
32971main ()
32972{
32973
32974  ;
32975  return 0;
32976}
32977_ACEOF
32978if ac_fn_objc_try_compile "$LINENO"; then :
32979
32980else
32981  ac_objc_werror_flag=$ac_save_objc_werror_flag
32982	 OBJCFLAGS="-g"
32983	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32984/* end confdefs.h.  */
32985
32986int
32987main ()
32988{
32989
32990  ;
32991  return 0;
32992}
32993_ACEOF
32994if ac_fn_objc_try_compile "$LINENO"; then :
32995  ac_cv_prog_objc_g=yes
32996fi
32997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32998fi
32999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33000fi
33001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33002   ac_objc_werror_flag=$ac_save_objc_werror_flag
33003fi
33004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33005$as_echo "$ac_cv_prog_objc_g" >&6; }
33006if test "$ac_test_OBJCFLAGS" = set; then
33007  OBJCFLAGS=$ac_save_OBJCFLAGS
33008elif test $ac_cv_prog_objc_g = yes; then
33009  if test "$GOBJC" = yes; then
33010    OBJCFLAGS="-g -O2"
33011  else
33012    OBJCFLAGS="-g"
33013  fi
33014else
33015  if test "$GOBJC" = yes; then
33016    OBJCFLAGS="-O2"
33017  else
33018    OBJCFLAGS=
33019  fi
33020fi
33021ac_ext=cpp
33022ac_cpp='$CXXCPP $CPPFLAGS'
33023ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33024ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33025ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33026
33027
33028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33029
33030  # First separate the path from the arguments. This will split at the first
33031  # space.
33032  complete="$OBJC"
33033  path="${complete%% *}"
33034  tmp="$complete EOL"
33035  arguments="${tmp#* }"
33036
33037  # Input might be given as Windows format, start by converting to
33038  # unix format.
33039  new_path=`$CYGPATH -u "$path"`
33040
33041  # Now try to locate executable using which
33042  new_path=`$WHICH "$new_path" 2> /dev/null`
33043  # bat and cmd files are not always considered executable in cygwin causing which
33044  # to not find them
33045  if test "x$new_path" = x \
33046      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33047      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33048    new_path=`$CYGPATH -u "$path"`
33049  fi
33050  if test "x$new_path" = x; then
33051    # Oops. Which didn't find the executable.
33052    # The splitting of arguments from the executable at a space might have been incorrect,
33053    # since paths with space are more likely in Windows. Give it another try with the whole
33054    # argument.
33055    path="$complete"
33056    arguments="EOL"
33057    new_path=`$CYGPATH -u "$path"`
33058    new_path=`$WHICH "$new_path" 2> /dev/null`
33059    # bat and cmd files are not always considered executable in cygwin causing which
33060    # to not find them
33061    if test "x$new_path" = x \
33062        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33063        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33064      new_path=`$CYGPATH -u "$path"`
33065    fi
33066    if test "x$new_path" = x; then
33067      # It's still not found. Now this is an unrecoverable error.
33068      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33069$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33070      has_space=`$ECHO "$complete" | $GREP " "`
33071      if test "x$has_space" != x; then
33072        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33073$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33074      fi
33075      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33076    fi
33077  fi
33078
33079  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33080  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33081  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33082  # "foo.exe" is OK but "foo" is an error.
33083  #
33084  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33085  # It is also a way to make sure we got the proper file name for the real test later on.
33086  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33087  if test "x$test_shortpath" = x; then
33088    # Short path failed, file does not exist as specified.
33089    # Try adding .exe or .cmd
33090    if test -f "${new_path}.exe"; then
33091      input_to_shortpath="${new_path}.exe"
33092    elif test -f "${new_path}.cmd"; then
33093      input_to_shortpath="${new_path}.cmd"
33094    else
33095      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33096$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33097      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33098$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33099      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33100    fi
33101  else
33102    input_to_shortpath="$new_path"
33103  fi
33104
33105  # Call helper function which possibly converts this using DOS-style short mode.
33106  # If so, the updated path is stored in $new_path.
33107  new_path="$input_to_shortpath"
33108
33109  input_path="$input_to_shortpath"
33110  # Check if we need to convert this using DOS-style short mode. If the path
33111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33112  # take no chances and rewrite it.
33113  # Note: m4 eats our [], so we need to use [ and ] instead.
33114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33115  if test "x$has_forbidden_chars" != x; then
33116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33117    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33118    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33119    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33120      # Going to short mode and back again did indeed matter. Since short mode is
33121      # case insensitive, let's make it lowercase to improve readability.
33122      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33123      # Now convert it back to Unix-stile (cygpath)
33124      input_path=`$CYGPATH -u "$shortmode_path"`
33125      new_path="$input_path"
33126    fi
33127  fi
33128
33129  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33130  if test "x$test_cygdrive_prefix" = x; then
33131    # As a simple fix, exclude /usr/bin since it's not a real path.
33132    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33133      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33134      # a path prefixed by /cygdrive for fixpath to work.
33135      new_path="$CYGWIN_ROOT_PATH$input_path"
33136    fi
33137  fi
33138
33139  # remove trailing .exe if any
33140  new_path="${new_path/%.exe/}"
33141
33142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33143
33144  # First separate the path from the arguments. This will split at the first
33145  # space.
33146  complete="$OBJC"
33147  path="${complete%% *}"
33148  tmp="$complete EOL"
33149  arguments="${tmp#* }"
33150
33151  # Input might be given as Windows format, start by converting to
33152  # unix format.
33153  new_path="$path"
33154
33155  windows_path="$new_path"
33156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33157    unix_path=`$CYGPATH -u "$windows_path"`
33158    new_path="$unix_path"
33159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33161    new_path="$unix_path"
33162  fi
33163
33164
33165  # Now try to locate executable using which
33166  new_path=`$WHICH "$new_path" 2> /dev/null`
33167
33168  if test "x$new_path" = x; then
33169    # Oops. Which didn't find the executable.
33170    # The splitting of arguments from the executable at a space might have been incorrect,
33171    # since paths with space are more likely in Windows. Give it another try with the whole
33172    # argument.
33173    path="$complete"
33174    arguments="EOL"
33175    new_path="$path"
33176
33177  windows_path="$new_path"
33178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33179    unix_path=`$CYGPATH -u "$windows_path"`
33180    new_path="$unix_path"
33181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33183    new_path="$unix_path"
33184  fi
33185
33186
33187    new_path=`$WHICH "$new_path" 2> /dev/null`
33188
33189    if test "x$new_path" = x; then
33190      # It's still not found. Now this is an unrecoverable error.
33191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33192$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33193      has_space=`$ECHO "$complete" | $GREP " "`
33194      if test "x$has_space" != x; then
33195        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33196$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33197      fi
33198      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33199    fi
33200  fi
33201
33202  # Now new_path has a complete unix path to the binary
33203  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33204    # Keep paths in /bin as-is, but remove trailing .exe if any
33205    new_path="${new_path/%.exe/}"
33206    # Do not save /bin paths to all_fixpath_prefixes!
33207  else
33208    # Not in mixed or Windows style, start by that.
33209    new_path=`cmd //c echo $new_path`
33210
33211  input_path="$new_path"
33212  # Check if we need to convert this using DOS-style short mode. If the path
33213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33214  # take no chances and rewrite it.
33215  # Note: m4 eats our [], so we need to use [ and ] instead.
33216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33217  if test "x$has_forbidden_chars" != x; then
33218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33219    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33220  fi
33221
33222    # Output is in $new_path
33223
33224  windows_path="$new_path"
33225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33226    unix_path=`$CYGPATH -u "$windows_path"`
33227    new_path="$unix_path"
33228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33230    new_path="$unix_path"
33231  fi
33232
33233    # remove trailing .exe if any
33234    new_path="${new_path/%.exe/}"
33235
33236    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33237    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33238  fi
33239
33240  else
33241    # We're on a posix platform. Hooray! :)
33242    # First separate the path from the arguments. This will split at the first
33243    # space.
33244    complete="$OBJC"
33245    path="${complete%% *}"
33246    tmp="$complete EOL"
33247    arguments="${tmp#* }"
33248
33249    # Cannot rely on the command "which" here since it doesn't always work.
33250    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33251    if test -z "$is_absolute_path"; then
33252      # Path to executable is not absolute. Find it.
33253      IFS_save="$IFS"
33254      IFS=:
33255      for p in $PATH; do
33256        if test -f "$p/$path" && test -x "$p/$path"; then
33257          new_path="$p/$path"
33258          break
33259        fi
33260      done
33261      IFS="$IFS_save"
33262    else
33263      # This is an absolute path, we can use it without further modifications.
33264      new_path="$path"
33265    fi
33266
33267    if test "x$new_path" = x; then
33268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33269$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33270      has_space=`$ECHO "$complete" | $GREP " "`
33271      if test "x$has_space" != x; then
33272        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33273$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33274      fi
33275      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33276    fi
33277  fi
33278
33279  # Now join together the path and the arguments once again
33280  if test "x$arguments" != xEOL; then
33281    new_complete="$new_path ${arguments% *}"
33282  else
33283    new_complete="$new_path"
33284  fi
33285
33286  if test "x$complete" != "x$new_complete"; then
33287    OBJC="$new_complete"
33288    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33289$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33290  fi
33291
33292
33293
33294  # Publish this variable in the help.
33295
33296
33297  if test "x$LIPO" = x; then
33298    # The variable is not set by user, try to locate tool using the code snippet
33299    for ac_prog in lipo
33300do
33301  # Extract the first word of "$ac_prog", so it can be a program name with args.
33302set dummy $ac_prog; ac_word=$2
33303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33304$as_echo_n "checking for $ac_word... " >&6; }
33305if ${ac_cv_path_LIPO+:} false; then :
33306  $as_echo_n "(cached) " >&6
33307else
33308  case $LIPO in
33309  [\\/]* | ?:[\\/]*)
33310  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33311  ;;
33312  *)
33313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33314for as_dir in $PATH
33315do
33316  IFS=$as_save_IFS
33317  test -z "$as_dir" && as_dir=.
33318    for ac_exec_ext in '' $ac_executable_extensions; do
33319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33320    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33322    break 2
33323  fi
33324done
33325  done
33326IFS=$as_save_IFS
33327
33328  ;;
33329esac
33330fi
33331LIPO=$ac_cv_path_LIPO
33332if test -n "$LIPO"; then
33333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33334$as_echo "$LIPO" >&6; }
33335else
33336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33337$as_echo "no" >&6; }
33338fi
33339
33340
33341  test -n "$LIPO" && break
33342done
33343
33344  else
33345    # The variable is set, but is it from the command line or the environment?
33346
33347    # Try to remove the string !LIPO! from our list.
33348    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33349    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33350      # If it failed, the variable was not from the command line. Ignore it,
33351      # but warn the user (except for BASH, which is always set by the calling BASH).
33352      if test "xLIPO" != xBASH; then
33353        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33354$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33355      fi
33356      # Try to locate tool using the code snippet
33357      for ac_prog in lipo
33358do
33359  # Extract the first word of "$ac_prog", so it can be a program name with args.
33360set dummy $ac_prog; ac_word=$2
33361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33362$as_echo_n "checking for $ac_word... " >&6; }
33363if ${ac_cv_path_LIPO+:} false; then :
33364  $as_echo_n "(cached) " >&6
33365else
33366  case $LIPO in
33367  [\\/]* | ?:[\\/]*)
33368  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33369  ;;
33370  *)
33371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33372for as_dir in $PATH
33373do
33374  IFS=$as_save_IFS
33375  test -z "$as_dir" && as_dir=.
33376    for ac_exec_ext in '' $ac_executable_extensions; do
33377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33378    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33380    break 2
33381  fi
33382done
33383  done
33384IFS=$as_save_IFS
33385
33386  ;;
33387esac
33388fi
33389LIPO=$ac_cv_path_LIPO
33390if test -n "$LIPO"; then
33391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33392$as_echo "$LIPO" >&6; }
33393else
33394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33395$as_echo "no" >&6; }
33396fi
33397
33398
33399  test -n "$LIPO" && break
33400done
33401
33402    else
33403      # If it succeeded, then it was overridden by the user. We will use it
33404      # for the tool.
33405
33406      # First remove it from the list of overridden variables, so we can test
33407      # for unknown variables in the end.
33408      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33409
33410      # Check if the provided tool contains a complete path.
33411      tool_specified="$LIPO"
33412      tool_basename="${tool_specified##*/}"
33413      if test "x$tool_basename" = "x$tool_specified"; then
33414        # A command without a complete path is provided, search $PATH.
33415        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33416$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33417        # Extract the first word of "$tool_basename", so it can be a program name with args.
33418set dummy $tool_basename; ac_word=$2
33419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33420$as_echo_n "checking for $ac_word... " >&6; }
33421if ${ac_cv_path_LIPO+:} false; then :
33422  $as_echo_n "(cached) " >&6
33423else
33424  case $LIPO in
33425  [\\/]* | ?:[\\/]*)
33426  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33427  ;;
33428  *)
33429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33430for as_dir in $PATH
33431do
33432  IFS=$as_save_IFS
33433  test -z "$as_dir" && as_dir=.
33434    for ac_exec_ext in '' $ac_executable_extensions; do
33435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33436    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33438    break 2
33439  fi
33440done
33441  done
33442IFS=$as_save_IFS
33443
33444  ;;
33445esac
33446fi
33447LIPO=$ac_cv_path_LIPO
33448if test -n "$LIPO"; then
33449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33450$as_echo "$LIPO" >&6; }
33451else
33452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33453$as_echo "no" >&6; }
33454fi
33455
33456
33457        if test "x$LIPO" = x; then
33458          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33459        fi
33460      else
33461        # Otherwise we believe it is a complete path. Use it as it is.
33462        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33463$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33464        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33465$as_echo_n "checking for LIPO... " >&6; }
33466        if test ! -x "$tool_specified"; then
33467          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33468$as_echo "not found" >&6; }
33469          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33470        fi
33471        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33472$as_echo "$tool_specified" >&6; }
33473      fi
33474    fi
33475  fi
33476
33477
33478
33479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33480
33481  # First separate the path from the arguments. This will split at the first
33482  # space.
33483  complete="$LIPO"
33484  path="${complete%% *}"
33485  tmp="$complete EOL"
33486  arguments="${tmp#* }"
33487
33488  # Input might be given as Windows format, start by converting to
33489  # unix format.
33490  new_path=`$CYGPATH -u "$path"`
33491
33492  # Now try to locate executable using which
33493  new_path=`$WHICH "$new_path" 2> /dev/null`
33494  # bat and cmd files are not always considered executable in cygwin causing which
33495  # to not find them
33496  if test "x$new_path" = x \
33497      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33498      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33499    new_path=`$CYGPATH -u "$path"`
33500  fi
33501  if test "x$new_path" = x; then
33502    # Oops. Which didn't find the executable.
33503    # The splitting of arguments from the executable at a space might have been incorrect,
33504    # since paths with space are more likely in Windows. Give it another try with the whole
33505    # argument.
33506    path="$complete"
33507    arguments="EOL"
33508    new_path=`$CYGPATH -u "$path"`
33509    new_path=`$WHICH "$new_path" 2> /dev/null`
33510    # bat and cmd files are not always considered executable in cygwin causing which
33511    # to not find them
33512    if test "x$new_path" = x \
33513        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33514        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33515      new_path=`$CYGPATH -u "$path"`
33516    fi
33517    if test "x$new_path" = x; then
33518      # It's still not found. Now this is an unrecoverable error.
33519      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33520$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33521      has_space=`$ECHO "$complete" | $GREP " "`
33522      if test "x$has_space" != x; then
33523        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33524$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33525      fi
33526      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33527    fi
33528  fi
33529
33530  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33531  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33532  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33533  # "foo.exe" is OK but "foo" is an error.
33534  #
33535  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33536  # It is also a way to make sure we got the proper file name for the real test later on.
33537  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33538  if test "x$test_shortpath" = x; then
33539    # Short path failed, file does not exist as specified.
33540    # Try adding .exe or .cmd
33541    if test -f "${new_path}.exe"; then
33542      input_to_shortpath="${new_path}.exe"
33543    elif test -f "${new_path}.cmd"; then
33544      input_to_shortpath="${new_path}.cmd"
33545    else
33546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33547$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33548      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33549$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33550      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33551    fi
33552  else
33553    input_to_shortpath="$new_path"
33554  fi
33555
33556  # Call helper function which possibly converts this using DOS-style short mode.
33557  # If so, the updated path is stored in $new_path.
33558  new_path="$input_to_shortpath"
33559
33560  input_path="$input_to_shortpath"
33561  # Check if we need to convert this using DOS-style short mode. If the path
33562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33563  # take no chances and rewrite it.
33564  # Note: m4 eats our [], so we need to use [ and ] instead.
33565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33566  if test "x$has_forbidden_chars" != x; then
33567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33568    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33569    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33570    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33571      # Going to short mode and back again did indeed matter. Since short mode is
33572      # case insensitive, let's make it lowercase to improve readability.
33573      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33574      # Now convert it back to Unix-stile (cygpath)
33575      input_path=`$CYGPATH -u "$shortmode_path"`
33576      new_path="$input_path"
33577    fi
33578  fi
33579
33580  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33581  if test "x$test_cygdrive_prefix" = x; then
33582    # As a simple fix, exclude /usr/bin since it's not a real path.
33583    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33584      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33585      # a path prefixed by /cygdrive for fixpath to work.
33586      new_path="$CYGWIN_ROOT_PATH$input_path"
33587    fi
33588  fi
33589
33590  # remove trailing .exe if any
33591  new_path="${new_path/%.exe/}"
33592
33593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33594
33595  # First separate the path from the arguments. This will split at the first
33596  # space.
33597  complete="$LIPO"
33598  path="${complete%% *}"
33599  tmp="$complete EOL"
33600  arguments="${tmp#* }"
33601
33602  # Input might be given as Windows format, start by converting to
33603  # unix format.
33604  new_path="$path"
33605
33606  windows_path="$new_path"
33607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33608    unix_path=`$CYGPATH -u "$windows_path"`
33609    new_path="$unix_path"
33610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33612    new_path="$unix_path"
33613  fi
33614
33615
33616  # Now try to locate executable using which
33617  new_path=`$WHICH "$new_path" 2> /dev/null`
33618
33619  if test "x$new_path" = x; then
33620    # Oops. Which didn't find the executable.
33621    # The splitting of arguments from the executable at a space might have been incorrect,
33622    # since paths with space are more likely in Windows. Give it another try with the whole
33623    # argument.
33624    path="$complete"
33625    arguments="EOL"
33626    new_path="$path"
33627
33628  windows_path="$new_path"
33629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33630    unix_path=`$CYGPATH -u "$windows_path"`
33631    new_path="$unix_path"
33632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33634    new_path="$unix_path"
33635  fi
33636
33637
33638    new_path=`$WHICH "$new_path" 2> /dev/null`
33639
33640    if test "x$new_path" = x; then
33641      # It's still not found. Now this is an unrecoverable error.
33642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33643$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33644      has_space=`$ECHO "$complete" | $GREP " "`
33645      if test "x$has_space" != x; then
33646        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33647$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33648      fi
33649      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33650    fi
33651  fi
33652
33653  # Now new_path has a complete unix path to the binary
33654  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33655    # Keep paths in /bin as-is, but remove trailing .exe if any
33656    new_path="${new_path/%.exe/}"
33657    # Do not save /bin paths to all_fixpath_prefixes!
33658  else
33659    # Not in mixed or Windows style, start by that.
33660    new_path=`cmd //c echo $new_path`
33661
33662  input_path="$new_path"
33663  # Check if we need to convert this using DOS-style short mode. If the path
33664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33665  # take no chances and rewrite it.
33666  # Note: m4 eats our [], so we need to use [ and ] instead.
33667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33668  if test "x$has_forbidden_chars" != x; then
33669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33670    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33671  fi
33672
33673    # Output is in $new_path
33674
33675  windows_path="$new_path"
33676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33677    unix_path=`$CYGPATH -u "$windows_path"`
33678    new_path="$unix_path"
33679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33681    new_path="$unix_path"
33682  fi
33683
33684    # remove trailing .exe if any
33685    new_path="${new_path/%.exe/}"
33686
33687    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33688    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33689  fi
33690
33691  else
33692    # We're on a posix platform. Hooray! :)
33693    # First separate the path from the arguments. This will split at the first
33694    # space.
33695    complete="$LIPO"
33696    path="${complete%% *}"
33697    tmp="$complete EOL"
33698    arguments="${tmp#* }"
33699
33700    # Cannot rely on the command "which" here since it doesn't always work.
33701    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33702    if test -z "$is_absolute_path"; then
33703      # Path to executable is not absolute. Find it.
33704      IFS_save="$IFS"
33705      IFS=:
33706      for p in $PATH; do
33707        if test -f "$p/$path" && test -x "$p/$path"; then
33708          new_path="$p/$path"
33709          break
33710        fi
33711      done
33712      IFS="$IFS_save"
33713    else
33714      # This is an absolute path, we can use it without further modifications.
33715      new_path="$path"
33716    fi
33717
33718    if test "x$new_path" = x; then
33719      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33720$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33721      has_space=`$ECHO "$complete" | $GREP " "`
33722      if test "x$has_space" != x; then
33723        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33724$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33725      fi
33726      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33727    fi
33728  fi
33729
33730  # Now join together the path and the arguments once again
33731  if test "x$arguments" != xEOL; then
33732    new_complete="$new_path ${arguments% *}"
33733  else
33734    new_complete="$new_path"
33735  fi
33736
33737  if test "x$complete" != "x$new_complete"; then
33738    LIPO="$new_complete"
33739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33740$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33741  fi
33742
33743  else
33744    OBJC=
33745  fi
33746
33747  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33748    # Extract the first word of "mt", so it can be a program name with args.
33749set dummy mt; ac_word=$2
33750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33751$as_echo_n "checking for $ac_word... " >&6; }
33752if ${ac_cv_prog_MT+:} false; then :
33753  $as_echo_n "(cached) " >&6
33754else
33755  if test -n "$MT"; then
33756  ac_cv_prog_MT="$MT" # Let the user override the test.
33757else
33758  ac_prog_rejected=no
33759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33760for as_dir in $PATH
33761do
33762  IFS=$as_save_IFS
33763  test -z "$as_dir" && as_dir=.
33764    for ac_exec_ext in '' $ac_executable_extensions; do
33765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33766    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33767       ac_prog_rejected=yes
33768       continue
33769     fi
33770    ac_cv_prog_MT="mt"
33771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33772    break 2
33773  fi
33774done
33775  done
33776IFS=$as_save_IFS
33777
33778if test $ac_prog_rejected = yes; then
33779  # We found a bogon in the path, so make sure we never use it.
33780  set dummy $ac_cv_prog_MT
33781  shift
33782  if test $# != 0; then
33783    # We chose a different compiler from the bogus one.
33784    # However, it has the same basename, so the bogon will be chosen
33785    # first if we set MT to just the basename; use the full file name.
33786    shift
33787    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33788  fi
33789fi
33790fi
33791fi
33792MT=$ac_cv_prog_MT
33793if test -n "$MT"; then
33794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33795$as_echo "$MT" >&6; }
33796else
33797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33798$as_echo "no" >&6; }
33799fi
33800
33801
33802
33803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33804
33805  # First separate the path from the arguments. This will split at the first
33806  # space.
33807  complete="$MT"
33808  path="${complete%% *}"
33809  tmp="$complete EOL"
33810  arguments="${tmp#* }"
33811
33812  # Input might be given as Windows format, start by converting to
33813  # unix format.
33814  new_path=`$CYGPATH -u "$path"`
33815
33816  # Now try to locate executable using which
33817  new_path=`$WHICH "$new_path" 2> /dev/null`
33818  # bat and cmd files are not always considered executable in cygwin causing which
33819  # to not find them
33820  if test "x$new_path" = x \
33821      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33822      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33823    new_path=`$CYGPATH -u "$path"`
33824  fi
33825  if test "x$new_path" = x; then
33826    # Oops. Which didn't find the executable.
33827    # The splitting of arguments from the executable at a space might have been incorrect,
33828    # since paths with space are more likely in Windows. Give it another try with the whole
33829    # argument.
33830    path="$complete"
33831    arguments="EOL"
33832    new_path=`$CYGPATH -u "$path"`
33833    new_path=`$WHICH "$new_path" 2> /dev/null`
33834    # bat and cmd files are not always considered executable in cygwin causing which
33835    # to not find them
33836    if test "x$new_path" = x \
33837        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33838        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33839      new_path=`$CYGPATH -u "$path"`
33840    fi
33841    if test "x$new_path" = x; then
33842      # It's still not found. Now this is an unrecoverable error.
33843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33844$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33845      has_space=`$ECHO "$complete" | $GREP " "`
33846      if test "x$has_space" != x; then
33847        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33848$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33849      fi
33850      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33851    fi
33852  fi
33853
33854  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33855  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33856  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33857  # "foo.exe" is OK but "foo" is an error.
33858  #
33859  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33860  # It is also a way to make sure we got the proper file name for the real test later on.
33861  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33862  if test "x$test_shortpath" = x; then
33863    # Short path failed, file does not exist as specified.
33864    # Try adding .exe or .cmd
33865    if test -f "${new_path}.exe"; then
33866      input_to_shortpath="${new_path}.exe"
33867    elif test -f "${new_path}.cmd"; then
33868      input_to_shortpath="${new_path}.cmd"
33869    else
33870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33871$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33872      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33873$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33874      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33875    fi
33876  else
33877    input_to_shortpath="$new_path"
33878  fi
33879
33880  # Call helper function which possibly converts this using DOS-style short mode.
33881  # If so, the updated path is stored in $new_path.
33882  new_path="$input_to_shortpath"
33883
33884  input_path="$input_to_shortpath"
33885  # Check if we need to convert this using DOS-style short mode. If the path
33886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33887  # take no chances and rewrite it.
33888  # Note: m4 eats our [], so we need to use [ and ] instead.
33889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33890  if test "x$has_forbidden_chars" != x; then
33891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33892    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33893    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33894    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33895      # Going to short mode and back again did indeed matter. Since short mode is
33896      # case insensitive, let's make it lowercase to improve readability.
33897      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33898      # Now convert it back to Unix-stile (cygpath)
33899      input_path=`$CYGPATH -u "$shortmode_path"`
33900      new_path="$input_path"
33901    fi
33902  fi
33903
33904  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33905  if test "x$test_cygdrive_prefix" = x; then
33906    # As a simple fix, exclude /usr/bin since it's not a real path.
33907    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33908      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33909      # a path prefixed by /cygdrive for fixpath to work.
33910      new_path="$CYGWIN_ROOT_PATH$input_path"
33911    fi
33912  fi
33913
33914  # remove trailing .exe if any
33915  new_path="${new_path/%.exe/}"
33916
33917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33918
33919  # First separate the path from the arguments. This will split at the first
33920  # space.
33921  complete="$MT"
33922  path="${complete%% *}"
33923  tmp="$complete EOL"
33924  arguments="${tmp#* }"
33925
33926  # Input might be given as Windows format, start by converting to
33927  # unix format.
33928  new_path="$path"
33929
33930  windows_path="$new_path"
33931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33932    unix_path=`$CYGPATH -u "$windows_path"`
33933    new_path="$unix_path"
33934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33936    new_path="$unix_path"
33937  fi
33938
33939
33940  # Now try to locate executable using which
33941  new_path=`$WHICH "$new_path" 2> /dev/null`
33942
33943  if test "x$new_path" = x; then
33944    # Oops. Which didn't find the executable.
33945    # The splitting of arguments from the executable at a space might have been incorrect,
33946    # since paths with space are more likely in Windows. Give it another try with the whole
33947    # argument.
33948    path="$complete"
33949    arguments="EOL"
33950    new_path="$path"
33951
33952  windows_path="$new_path"
33953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33954    unix_path=`$CYGPATH -u "$windows_path"`
33955    new_path="$unix_path"
33956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33958    new_path="$unix_path"
33959  fi
33960
33961
33962    new_path=`$WHICH "$new_path" 2> /dev/null`
33963
33964    if test "x$new_path" = x; then
33965      # It's still not found. Now this is an unrecoverable error.
33966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33967$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33968      has_space=`$ECHO "$complete" | $GREP " "`
33969      if test "x$has_space" != x; then
33970        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33971$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33972      fi
33973      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33974    fi
33975  fi
33976
33977  # Now new_path has a complete unix path to the binary
33978  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33979    # Keep paths in /bin as-is, but remove trailing .exe if any
33980    new_path="${new_path/%.exe/}"
33981    # Do not save /bin paths to all_fixpath_prefixes!
33982  else
33983    # Not in mixed or Windows style, start by that.
33984    new_path=`cmd //c echo $new_path`
33985
33986  input_path="$new_path"
33987  # Check if we need to convert this using DOS-style short mode. If the path
33988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33989  # take no chances and rewrite it.
33990  # Note: m4 eats our [], so we need to use [ and ] instead.
33991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33992  if test "x$has_forbidden_chars" != x; then
33993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33995  fi
33996
33997    # Output is in $new_path
33998
33999  windows_path="$new_path"
34000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34001    unix_path=`$CYGPATH -u "$windows_path"`
34002    new_path="$unix_path"
34003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34005    new_path="$unix_path"
34006  fi
34007
34008    # remove trailing .exe if any
34009    new_path="${new_path/%.exe/}"
34010
34011    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34012    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34013  fi
34014
34015  else
34016    # We're on a posix platform. Hooray! :)
34017    # First separate the path from the arguments. This will split at the first
34018    # space.
34019    complete="$MT"
34020    path="${complete%% *}"
34021    tmp="$complete EOL"
34022    arguments="${tmp#* }"
34023
34024    # Cannot rely on the command "which" here since it doesn't always work.
34025    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34026    if test -z "$is_absolute_path"; then
34027      # Path to executable is not absolute. Find it.
34028      IFS_save="$IFS"
34029      IFS=:
34030      for p in $PATH; do
34031        if test -f "$p/$path" && test -x "$p/$path"; then
34032          new_path="$p/$path"
34033          break
34034        fi
34035      done
34036      IFS="$IFS_save"
34037    else
34038      # This is an absolute path, we can use it without further modifications.
34039      new_path="$path"
34040    fi
34041
34042    if test "x$new_path" = x; then
34043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34044$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34045      has_space=`$ECHO "$complete" | $GREP " "`
34046      if test "x$has_space" != x; then
34047        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34048$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34049      fi
34050      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34051    fi
34052  fi
34053
34054  # Now join together the path and the arguments once again
34055  if test "x$arguments" != xEOL; then
34056    new_complete="$new_path ${arguments% *}"
34057  else
34058    new_complete="$new_path"
34059  fi
34060
34061  if test "x$complete" != "x$new_complete"; then
34062    MT="$new_complete"
34063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34064$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34065  fi
34066
34067    # Setup the resource compiler (RC)
34068    # Extract the first word of "rc", so it can be a program name with args.
34069set dummy rc; ac_word=$2
34070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34071$as_echo_n "checking for $ac_word... " >&6; }
34072if ${ac_cv_prog_RC+:} false; then :
34073  $as_echo_n "(cached) " >&6
34074else
34075  if test -n "$RC"; then
34076  ac_cv_prog_RC="$RC" # Let the user override the test.
34077else
34078  ac_prog_rejected=no
34079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34080for as_dir in $PATH
34081do
34082  IFS=$as_save_IFS
34083  test -z "$as_dir" && as_dir=.
34084    for ac_exec_ext in '' $ac_executable_extensions; do
34085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34086    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34087       ac_prog_rejected=yes
34088       continue
34089     fi
34090    ac_cv_prog_RC="rc"
34091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34092    break 2
34093  fi
34094done
34095  done
34096IFS=$as_save_IFS
34097
34098if test $ac_prog_rejected = yes; then
34099  # We found a bogon in the path, so make sure we never use it.
34100  set dummy $ac_cv_prog_RC
34101  shift
34102  if test $# != 0; then
34103    # We chose a different compiler from the bogus one.
34104    # However, it has the same basename, so the bogon will be chosen
34105    # first if we set RC to just the basename; use the full file name.
34106    shift
34107    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34108  fi
34109fi
34110fi
34111fi
34112RC=$ac_cv_prog_RC
34113if test -n "$RC"; then
34114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34115$as_echo "$RC" >&6; }
34116else
34117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34118$as_echo "no" >&6; }
34119fi
34120
34121
34122
34123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34124
34125  # First separate the path from the arguments. This will split at the first
34126  # space.
34127  complete="$RC"
34128  path="${complete%% *}"
34129  tmp="$complete EOL"
34130  arguments="${tmp#* }"
34131
34132  # Input might be given as Windows format, start by converting to
34133  # unix format.
34134  new_path=`$CYGPATH -u "$path"`
34135
34136  # Now try to locate executable using which
34137  new_path=`$WHICH "$new_path" 2> /dev/null`
34138  # bat and cmd files are not always considered executable in cygwin causing which
34139  # to not find them
34140  if test "x$new_path" = x \
34141      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34142      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34143    new_path=`$CYGPATH -u "$path"`
34144  fi
34145  if test "x$new_path" = x; then
34146    # Oops. Which didn't find the executable.
34147    # The splitting of arguments from the executable at a space might have been incorrect,
34148    # since paths with space are more likely in Windows. Give it another try with the whole
34149    # argument.
34150    path="$complete"
34151    arguments="EOL"
34152    new_path=`$CYGPATH -u "$path"`
34153    new_path=`$WHICH "$new_path" 2> /dev/null`
34154    # bat and cmd files are not always considered executable in cygwin causing which
34155    # to not find them
34156    if test "x$new_path" = x \
34157        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34158        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34159      new_path=`$CYGPATH -u "$path"`
34160    fi
34161    if test "x$new_path" = x; then
34162      # It's still not found. Now this is an unrecoverable error.
34163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34164$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34165      has_space=`$ECHO "$complete" | $GREP " "`
34166      if test "x$has_space" != x; then
34167        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34168$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34169      fi
34170      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34171    fi
34172  fi
34173
34174  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34175  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34176  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34177  # "foo.exe" is OK but "foo" is an error.
34178  #
34179  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34180  # It is also a way to make sure we got the proper file name for the real test later on.
34181  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34182  if test "x$test_shortpath" = x; then
34183    # Short path failed, file does not exist as specified.
34184    # Try adding .exe or .cmd
34185    if test -f "${new_path}.exe"; then
34186      input_to_shortpath="${new_path}.exe"
34187    elif test -f "${new_path}.cmd"; then
34188      input_to_shortpath="${new_path}.cmd"
34189    else
34190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34191$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34192      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34193$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34194      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34195    fi
34196  else
34197    input_to_shortpath="$new_path"
34198  fi
34199
34200  # Call helper function which possibly converts this using DOS-style short mode.
34201  # If so, the updated path is stored in $new_path.
34202  new_path="$input_to_shortpath"
34203
34204  input_path="$input_to_shortpath"
34205  # Check if we need to convert this using DOS-style short mode. If the path
34206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34207  # take no chances and rewrite it.
34208  # Note: m4 eats our [], so we need to use [ and ] instead.
34209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34210  if test "x$has_forbidden_chars" != x; then
34211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34212    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34213    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34214    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34215      # Going to short mode and back again did indeed matter. Since short mode is
34216      # case insensitive, let's make it lowercase to improve readability.
34217      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34218      # Now convert it back to Unix-stile (cygpath)
34219      input_path=`$CYGPATH -u "$shortmode_path"`
34220      new_path="$input_path"
34221    fi
34222  fi
34223
34224  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34225  if test "x$test_cygdrive_prefix" = x; then
34226    # As a simple fix, exclude /usr/bin since it's not a real path.
34227    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34228      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34229      # a path prefixed by /cygdrive for fixpath to work.
34230      new_path="$CYGWIN_ROOT_PATH$input_path"
34231    fi
34232  fi
34233
34234  # remove trailing .exe if any
34235  new_path="${new_path/%.exe/}"
34236
34237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34238
34239  # First separate the path from the arguments. This will split at the first
34240  # space.
34241  complete="$RC"
34242  path="${complete%% *}"
34243  tmp="$complete EOL"
34244  arguments="${tmp#* }"
34245
34246  # Input might be given as Windows format, start by converting to
34247  # unix format.
34248  new_path="$path"
34249
34250  windows_path="$new_path"
34251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34252    unix_path=`$CYGPATH -u "$windows_path"`
34253    new_path="$unix_path"
34254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34256    new_path="$unix_path"
34257  fi
34258
34259
34260  # Now try to locate executable using which
34261  new_path=`$WHICH "$new_path" 2> /dev/null`
34262
34263  if test "x$new_path" = x; then
34264    # Oops. Which didn't find the executable.
34265    # The splitting of arguments from the executable at a space might have been incorrect,
34266    # since paths with space are more likely in Windows. Give it another try with the whole
34267    # argument.
34268    path="$complete"
34269    arguments="EOL"
34270    new_path="$path"
34271
34272  windows_path="$new_path"
34273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34274    unix_path=`$CYGPATH -u "$windows_path"`
34275    new_path="$unix_path"
34276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34278    new_path="$unix_path"
34279  fi
34280
34281
34282    new_path=`$WHICH "$new_path" 2> /dev/null`
34283
34284    if test "x$new_path" = x; then
34285      # It's still not found. Now this is an unrecoverable error.
34286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34287$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34288      has_space=`$ECHO "$complete" | $GREP " "`
34289      if test "x$has_space" != x; then
34290        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34291$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34292      fi
34293      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34294    fi
34295  fi
34296
34297  # Now new_path has a complete unix path to the binary
34298  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34299    # Keep paths in /bin as-is, but remove trailing .exe if any
34300    new_path="${new_path/%.exe/}"
34301    # Do not save /bin paths to all_fixpath_prefixes!
34302  else
34303    # Not in mixed or Windows style, start by that.
34304    new_path=`cmd //c echo $new_path`
34305
34306  input_path="$new_path"
34307  # Check if we need to convert this using DOS-style short mode. If the path
34308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34309  # take no chances and rewrite it.
34310  # Note: m4 eats our [], so we need to use [ and ] instead.
34311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34312  if test "x$has_forbidden_chars" != x; then
34313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34314    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34315  fi
34316
34317    # Output is in $new_path
34318
34319  windows_path="$new_path"
34320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34321    unix_path=`$CYGPATH -u "$windows_path"`
34322    new_path="$unix_path"
34323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34325    new_path="$unix_path"
34326  fi
34327
34328    # remove trailing .exe if any
34329    new_path="${new_path/%.exe/}"
34330
34331    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34332    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34333  fi
34334
34335  else
34336    # We're on a posix platform. Hooray! :)
34337    # First separate the path from the arguments. This will split at the first
34338    # space.
34339    complete="$RC"
34340    path="${complete%% *}"
34341    tmp="$complete EOL"
34342    arguments="${tmp#* }"
34343
34344    # Cannot rely on the command "which" here since it doesn't always work.
34345    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34346    if test -z "$is_absolute_path"; then
34347      # Path to executable is not absolute. Find it.
34348      IFS_save="$IFS"
34349      IFS=:
34350      for p in $PATH; do
34351        if test -f "$p/$path" && test -x "$p/$path"; then
34352          new_path="$p/$path"
34353          break
34354        fi
34355      done
34356      IFS="$IFS_save"
34357    else
34358      # This is an absolute path, we can use it without further modifications.
34359      new_path="$path"
34360    fi
34361
34362    if test "x$new_path" = x; then
34363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34364$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34365      has_space=`$ECHO "$complete" | $GREP " "`
34366      if test "x$has_space" != x; then
34367        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34368$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34369      fi
34370      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34371    fi
34372  fi
34373
34374  # Now join together the path and the arguments once again
34375  if test "x$arguments" != xEOL; then
34376    new_complete="$new_path ${arguments% *}"
34377  else
34378    new_complete="$new_path"
34379  fi
34380
34381  if test "x$complete" != "x$new_complete"; then
34382    RC="$new_complete"
34383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34384$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34385  fi
34386
34387    # Extract the first word of "dumpbin", so it can be a program name with args.
34388set dummy dumpbin; ac_word=$2
34389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34390$as_echo_n "checking for $ac_word... " >&6; }
34391if ${ac_cv_prog_DUMPBIN+:} false; then :
34392  $as_echo_n "(cached) " >&6
34393else
34394  if test -n "$DUMPBIN"; then
34395  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34396else
34397as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34398for as_dir in $PATH
34399do
34400  IFS=$as_save_IFS
34401  test -z "$as_dir" && as_dir=.
34402    for ac_exec_ext in '' $ac_executable_extensions; do
34403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34404    ac_cv_prog_DUMPBIN="dumpbin"
34405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34406    break 2
34407  fi
34408done
34409  done
34410IFS=$as_save_IFS
34411
34412fi
34413fi
34414DUMPBIN=$ac_cv_prog_DUMPBIN
34415if test -n "$DUMPBIN"; then
34416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34417$as_echo "$DUMPBIN" >&6; }
34418else
34419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34420$as_echo "no" >&6; }
34421fi
34422
34423
34424
34425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34426
34427  # First separate the path from the arguments. This will split at the first
34428  # space.
34429  complete="$DUMPBIN"
34430  path="${complete%% *}"
34431  tmp="$complete EOL"
34432  arguments="${tmp#* }"
34433
34434  # Input might be given as Windows format, start by converting to
34435  # unix format.
34436  new_path=`$CYGPATH -u "$path"`
34437
34438  # Now try to locate executable using which
34439  new_path=`$WHICH "$new_path" 2> /dev/null`
34440  # bat and cmd files are not always considered executable in cygwin causing which
34441  # to not find them
34442  if test "x$new_path" = x \
34443      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34444      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34445    new_path=`$CYGPATH -u "$path"`
34446  fi
34447  if test "x$new_path" = x; then
34448    # Oops. Which didn't find the executable.
34449    # The splitting of arguments from the executable at a space might have been incorrect,
34450    # since paths with space are more likely in Windows. Give it another try with the whole
34451    # argument.
34452    path="$complete"
34453    arguments="EOL"
34454    new_path=`$CYGPATH -u "$path"`
34455    new_path=`$WHICH "$new_path" 2> /dev/null`
34456    # bat and cmd files are not always considered executable in cygwin causing which
34457    # to not find them
34458    if test "x$new_path" = x \
34459        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34460        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34461      new_path=`$CYGPATH -u "$path"`
34462    fi
34463    if test "x$new_path" = x; then
34464      # It's still not found. Now this is an unrecoverable error.
34465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34466$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34467      has_space=`$ECHO "$complete" | $GREP " "`
34468      if test "x$has_space" != x; then
34469        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34470$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34471      fi
34472      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34473    fi
34474  fi
34475
34476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34479  # "foo.exe" is OK but "foo" is an error.
34480  #
34481  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34482  # It is also a way to make sure we got the proper file name for the real test later on.
34483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34484  if test "x$test_shortpath" = x; then
34485    # Short path failed, file does not exist as specified.
34486    # Try adding .exe or .cmd
34487    if test -f "${new_path}.exe"; then
34488      input_to_shortpath="${new_path}.exe"
34489    elif test -f "${new_path}.cmd"; then
34490      input_to_shortpath="${new_path}.cmd"
34491    else
34492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34493$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34494      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34495$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34496      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34497    fi
34498  else
34499    input_to_shortpath="$new_path"
34500  fi
34501
34502  # Call helper function which possibly converts this using DOS-style short mode.
34503  # If so, the updated path is stored in $new_path.
34504  new_path="$input_to_shortpath"
34505
34506  input_path="$input_to_shortpath"
34507  # Check if we need to convert this using DOS-style short mode. If the path
34508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34509  # take no chances and rewrite it.
34510  # Note: m4 eats our [], so we need to use [ and ] instead.
34511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34512  if test "x$has_forbidden_chars" != x; then
34513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34514    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34515    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34516    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34517      # Going to short mode and back again did indeed matter. Since short mode is
34518      # case insensitive, let's make it lowercase to improve readability.
34519      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34520      # Now convert it back to Unix-stile (cygpath)
34521      input_path=`$CYGPATH -u "$shortmode_path"`
34522      new_path="$input_path"
34523    fi
34524  fi
34525
34526  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34527  if test "x$test_cygdrive_prefix" = x; then
34528    # As a simple fix, exclude /usr/bin since it's not a real path.
34529    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34530      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34531      # a path prefixed by /cygdrive for fixpath to work.
34532      new_path="$CYGWIN_ROOT_PATH$input_path"
34533    fi
34534  fi
34535
34536  # remove trailing .exe if any
34537  new_path="${new_path/%.exe/}"
34538
34539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34540
34541  # First separate the path from the arguments. This will split at the first
34542  # space.
34543  complete="$DUMPBIN"
34544  path="${complete%% *}"
34545  tmp="$complete EOL"
34546  arguments="${tmp#* }"
34547
34548  # Input might be given as Windows format, start by converting to
34549  # unix format.
34550  new_path="$path"
34551
34552  windows_path="$new_path"
34553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34554    unix_path=`$CYGPATH -u "$windows_path"`
34555    new_path="$unix_path"
34556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34558    new_path="$unix_path"
34559  fi
34560
34561
34562  # Now try to locate executable using which
34563  new_path=`$WHICH "$new_path" 2> /dev/null`
34564
34565  if test "x$new_path" = x; then
34566    # Oops. Which didn't find the executable.
34567    # The splitting of arguments from the executable at a space might have been incorrect,
34568    # since paths with space are more likely in Windows. Give it another try with the whole
34569    # argument.
34570    path="$complete"
34571    arguments="EOL"
34572    new_path="$path"
34573
34574  windows_path="$new_path"
34575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34576    unix_path=`$CYGPATH -u "$windows_path"`
34577    new_path="$unix_path"
34578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34580    new_path="$unix_path"
34581  fi
34582
34583
34584    new_path=`$WHICH "$new_path" 2> /dev/null`
34585
34586    if test "x$new_path" = x; then
34587      # It's still not found. Now this is an unrecoverable error.
34588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34589$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34590      has_space=`$ECHO "$complete" | $GREP " "`
34591      if test "x$has_space" != x; then
34592        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34593$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34594      fi
34595      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34596    fi
34597  fi
34598
34599  # Now new_path has a complete unix path to the binary
34600  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34601    # Keep paths in /bin as-is, but remove trailing .exe if any
34602    new_path="${new_path/%.exe/}"
34603    # Do not save /bin paths to all_fixpath_prefixes!
34604  else
34605    # Not in mixed or Windows style, start by that.
34606    new_path=`cmd //c echo $new_path`
34607
34608  input_path="$new_path"
34609  # Check if we need to convert this using DOS-style short mode. If the path
34610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34611  # take no chances and rewrite it.
34612  # Note: m4 eats our [], so we need to use [ and ] instead.
34613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34614  if test "x$has_forbidden_chars" != x; then
34615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34616    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34617  fi
34618
34619    # Output is in $new_path
34620
34621  windows_path="$new_path"
34622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34623    unix_path=`$CYGPATH -u "$windows_path"`
34624    new_path="$unix_path"
34625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34627    new_path="$unix_path"
34628  fi
34629
34630    # remove trailing .exe if any
34631    new_path="${new_path/%.exe/}"
34632
34633    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34634    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34635  fi
34636
34637  else
34638    # We're on a posix platform. Hooray! :)
34639    # First separate the path from the arguments. This will split at the first
34640    # space.
34641    complete="$DUMPBIN"
34642    path="${complete%% *}"
34643    tmp="$complete EOL"
34644    arguments="${tmp#* }"
34645
34646    # Cannot rely on the command "which" here since it doesn't always work.
34647    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34648    if test -z "$is_absolute_path"; then
34649      # Path to executable is not absolute. Find it.
34650      IFS_save="$IFS"
34651      IFS=:
34652      for p in $PATH; do
34653        if test -f "$p/$path" && test -x "$p/$path"; then
34654          new_path="$p/$path"
34655          break
34656        fi
34657      done
34658      IFS="$IFS_save"
34659    else
34660      # This is an absolute path, we can use it without further modifications.
34661      new_path="$path"
34662    fi
34663
34664    if test "x$new_path" = x; then
34665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34666$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34667      has_space=`$ECHO "$complete" | $GREP " "`
34668      if test "x$has_space" != x; then
34669        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34670$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34671      fi
34672      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34673    fi
34674  fi
34675
34676  # Now join together the path and the arguments once again
34677  if test "x$arguments" != xEOL; then
34678    new_complete="$new_path ${arguments% *}"
34679  else
34680    new_complete="$new_path"
34681  fi
34682
34683  if test "x$complete" != "x$new_complete"; then
34684    DUMPBIN="$new_complete"
34685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34686$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34687  fi
34688
34689  fi
34690
34691  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34692
34693
34694  # Publish this variable in the help.
34695
34696
34697  if test "x$STRIP" = x; then
34698    # The variable is not set by user, try to locate tool using the code snippet
34699    for ac_prog in strip
34700do
34701  # Extract the first word of "$ac_prog", so it can be a program name with args.
34702set dummy $ac_prog; ac_word=$2
34703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34704$as_echo_n "checking for $ac_word... " >&6; }
34705if ${ac_cv_path_STRIP+:} false; then :
34706  $as_echo_n "(cached) " >&6
34707else
34708  case $STRIP in
34709  [\\/]* | ?:[\\/]*)
34710  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34711  ;;
34712  *)
34713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34714for as_dir in $PATH
34715do
34716  IFS=$as_save_IFS
34717  test -z "$as_dir" && as_dir=.
34718    for ac_exec_ext in '' $ac_executable_extensions; do
34719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34720    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34722    break 2
34723  fi
34724done
34725  done
34726IFS=$as_save_IFS
34727
34728  ;;
34729esac
34730fi
34731STRIP=$ac_cv_path_STRIP
34732if test -n "$STRIP"; then
34733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34734$as_echo "$STRIP" >&6; }
34735else
34736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34737$as_echo "no" >&6; }
34738fi
34739
34740
34741  test -n "$STRIP" && break
34742done
34743
34744  else
34745    # The variable is set, but is it from the command line or the environment?
34746
34747    # Try to remove the string !STRIP! from our list.
34748    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
34749    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34750      # If it failed, the variable was not from the command line. Ignore it,
34751      # but warn the user (except for BASH, which is always set by the calling BASH).
34752      if test "xSTRIP" != xBASH; then
34753        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
34754$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
34755      fi
34756      # Try to locate tool using the code snippet
34757      for ac_prog in strip
34758do
34759  # Extract the first word of "$ac_prog", so it can be a program name with args.
34760set dummy $ac_prog; ac_word=$2
34761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34762$as_echo_n "checking for $ac_word... " >&6; }
34763if ${ac_cv_path_STRIP+:} false; then :
34764  $as_echo_n "(cached) " >&6
34765else
34766  case $STRIP in
34767  [\\/]* | ?:[\\/]*)
34768  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34769  ;;
34770  *)
34771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34772for as_dir in $PATH
34773do
34774  IFS=$as_save_IFS
34775  test -z "$as_dir" && as_dir=.
34776    for ac_exec_ext in '' $ac_executable_extensions; do
34777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34778    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34780    break 2
34781  fi
34782done
34783  done
34784IFS=$as_save_IFS
34785
34786  ;;
34787esac
34788fi
34789STRIP=$ac_cv_path_STRIP
34790if test -n "$STRIP"; then
34791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34792$as_echo "$STRIP" >&6; }
34793else
34794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34795$as_echo "no" >&6; }
34796fi
34797
34798
34799  test -n "$STRIP" && break
34800done
34801
34802    else
34803      # If it succeeded, then it was overridden by the user. We will use it
34804      # for the tool.
34805
34806      # First remove it from the list of overridden variables, so we can test
34807      # for unknown variables in the end.
34808      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34809
34810      # Check if the provided tool contains a complete path.
34811      tool_specified="$STRIP"
34812      tool_basename="${tool_specified##*/}"
34813      if test "x$tool_basename" = "x$tool_specified"; then
34814        # A command without a complete path is provided, search $PATH.
34815        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
34816$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
34817        # Extract the first word of "$tool_basename", so it can be a program name with args.
34818set dummy $tool_basename; ac_word=$2
34819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34820$as_echo_n "checking for $ac_word... " >&6; }
34821if ${ac_cv_path_STRIP+:} false; then :
34822  $as_echo_n "(cached) " >&6
34823else
34824  case $STRIP in
34825  [\\/]* | ?:[\\/]*)
34826  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34827  ;;
34828  *)
34829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34830for as_dir in $PATH
34831do
34832  IFS=$as_save_IFS
34833  test -z "$as_dir" && as_dir=.
34834    for ac_exec_ext in '' $ac_executable_extensions; do
34835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34836    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34838    break 2
34839  fi
34840done
34841  done
34842IFS=$as_save_IFS
34843
34844  ;;
34845esac
34846fi
34847STRIP=$ac_cv_path_STRIP
34848if test -n "$STRIP"; then
34849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34850$as_echo "$STRIP" >&6; }
34851else
34852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34853$as_echo "no" >&6; }
34854fi
34855
34856
34857        if test "x$STRIP" = x; then
34858          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34859        fi
34860      else
34861        # Otherwise we believe it is a complete path. Use it as it is.
34862        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
34863$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
34864        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
34865$as_echo_n "checking for STRIP... " >&6; }
34866        if test ! -x "$tool_specified"; then
34867          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34868$as_echo "not found" >&6; }
34869          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
34870        fi
34871        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34872$as_echo "$tool_specified" >&6; }
34873      fi
34874    fi
34875  fi
34876
34877
34878
34879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34880
34881  # First separate the path from the arguments. This will split at the first
34882  # space.
34883  complete="$STRIP"
34884  path="${complete%% *}"
34885  tmp="$complete EOL"
34886  arguments="${tmp#* }"
34887
34888  # Input might be given as Windows format, start by converting to
34889  # unix format.
34890  new_path=`$CYGPATH -u "$path"`
34891
34892  # Now try to locate executable using which
34893  new_path=`$WHICH "$new_path" 2> /dev/null`
34894  # bat and cmd files are not always considered executable in cygwin causing which
34895  # to not find them
34896  if test "x$new_path" = x \
34897      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34898      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34899    new_path=`$CYGPATH -u "$path"`
34900  fi
34901  if test "x$new_path" = x; then
34902    # Oops. Which didn't find the executable.
34903    # The splitting of arguments from the executable at a space might have been incorrect,
34904    # since paths with space are more likely in Windows. Give it another try with the whole
34905    # argument.
34906    path="$complete"
34907    arguments="EOL"
34908    new_path=`$CYGPATH -u "$path"`
34909    new_path=`$WHICH "$new_path" 2> /dev/null`
34910    # bat and cmd files are not always considered executable in cygwin causing which
34911    # to not find them
34912    if test "x$new_path" = x \
34913        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34914        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34915      new_path=`$CYGPATH -u "$path"`
34916    fi
34917    if test "x$new_path" = x; then
34918      # It's still not found. Now this is an unrecoverable error.
34919      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34920$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34921      has_space=`$ECHO "$complete" | $GREP " "`
34922      if test "x$has_space" != x; then
34923        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34924$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34925      fi
34926      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34927    fi
34928  fi
34929
34930  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34931  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34932  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34933  # "foo.exe" is OK but "foo" is an error.
34934  #
34935  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34936  # It is also a way to make sure we got the proper file name for the real test later on.
34937  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34938  if test "x$test_shortpath" = x; then
34939    # Short path failed, file does not exist as specified.
34940    # Try adding .exe or .cmd
34941    if test -f "${new_path}.exe"; then
34942      input_to_shortpath="${new_path}.exe"
34943    elif test -f "${new_path}.cmd"; then
34944      input_to_shortpath="${new_path}.cmd"
34945    else
34946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
34947$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
34948      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34949$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34950      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34951    fi
34952  else
34953    input_to_shortpath="$new_path"
34954  fi
34955
34956  # Call helper function which possibly converts this using DOS-style short mode.
34957  # If so, the updated path is stored in $new_path.
34958  new_path="$input_to_shortpath"
34959
34960  input_path="$input_to_shortpath"
34961  # Check if we need to convert this using DOS-style short mode. If the path
34962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34963  # take no chances and rewrite it.
34964  # Note: m4 eats our [], so we need to use [ and ] instead.
34965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34966  if test "x$has_forbidden_chars" != x; then
34967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34968    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34969    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34970    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34971      # Going to short mode and back again did indeed matter. Since short mode is
34972      # case insensitive, let's make it lowercase to improve readability.
34973      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34974      # Now convert it back to Unix-stile (cygpath)
34975      input_path=`$CYGPATH -u "$shortmode_path"`
34976      new_path="$input_path"
34977    fi
34978  fi
34979
34980  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34981  if test "x$test_cygdrive_prefix" = x; then
34982    # As a simple fix, exclude /usr/bin since it's not a real path.
34983    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34984      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34985      # a path prefixed by /cygdrive for fixpath to work.
34986      new_path="$CYGWIN_ROOT_PATH$input_path"
34987    fi
34988  fi
34989
34990  # remove trailing .exe if any
34991  new_path="${new_path/%.exe/}"
34992
34993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34994
34995  # First separate the path from the arguments. This will split at the first
34996  # space.
34997  complete="$STRIP"
34998  path="${complete%% *}"
34999  tmp="$complete EOL"
35000  arguments="${tmp#* }"
35001
35002  # Input might be given as Windows format, start by converting to
35003  # unix format.
35004  new_path="$path"
35005
35006  windows_path="$new_path"
35007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35008    unix_path=`$CYGPATH -u "$windows_path"`
35009    new_path="$unix_path"
35010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35012    new_path="$unix_path"
35013  fi
35014
35015
35016  # Now try to locate executable using which
35017  new_path=`$WHICH "$new_path" 2> /dev/null`
35018
35019  if test "x$new_path" = x; then
35020    # Oops. Which didn't find the executable.
35021    # The splitting of arguments from the executable at a space might have been incorrect,
35022    # since paths with space are more likely in Windows. Give it another try with the whole
35023    # argument.
35024    path="$complete"
35025    arguments="EOL"
35026    new_path="$path"
35027
35028  windows_path="$new_path"
35029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35030    unix_path=`$CYGPATH -u "$windows_path"`
35031    new_path="$unix_path"
35032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35034    new_path="$unix_path"
35035  fi
35036
35037
35038    new_path=`$WHICH "$new_path" 2> /dev/null`
35039
35040    if test "x$new_path" = x; then
35041      # It's still not found. Now this is an unrecoverable error.
35042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35043$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35044      has_space=`$ECHO "$complete" | $GREP " "`
35045      if test "x$has_space" != x; then
35046        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35047$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35048      fi
35049      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35050    fi
35051  fi
35052
35053  # Now new_path has a complete unix path to the binary
35054  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35055    # Keep paths in /bin as-is, but remove trailing .exe if any
35056    new_path="${new_path/%.exe/}"
35057    # Do not save /bin paths to all_fixpath_prefixes!
35058  else
35059    # Not in mixed or Windows style, start by that.
35060    new_path=`cmd //c echo $new_path`
35061
35062  input_path="$new_path"
35063  # Check if we need to convert this using DOS-style short mode. If the path
35064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35065  # take no chances and rewrite it.
35066  # Note: m4 eats our [], so we need to use [ and ] instead.
35067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35068  if test "x$has_forbidden_chars" != x; then
35069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35070    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35071  fi
35072
35073    # Output is in $new_path
35074
35075  windows_path="$new_path"
35076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35077    unix_path=`$CYGPATH -u "$windows_path"`
35078    new_path="$unix_path"
35079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35081    new_path="$unix_path"
35082  fi
35083
35084    # remove trailing .exe if any
35085    new_path="${new_path/%.exe/}"
35086
35087    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35088    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35089  fi
35090
35091  else
35092    # We're on a posix platform. Hooray! :)
35093    # First separate the path from the arguments. This will split at the first
35094    # space.
35095    complete="$STRIP"
35096    path="${complete%% *}"
35097    tmp="$complete EOL"
35098    arguments="${tmp#* }"
35099
35100    # Cannot rely on the command "which" here since it doesn't always work.
35101    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35102    if test -z "$is_absolute_path"; then
35103      # Path to executable is not absolute. Find it.
35104      IFS_save="$IFS"
35105      IFS=:
35106      for p in $PATH; do
35107        if test -f "$p/$path" && test -x "$p/$path"; then
35108          new_path="$p/$path"
35109          break
35110        fi
35111      done
35112      IFS="$IFS_save"
35113    else
35114      # This is an absolute path, we can use it without further modifications.
35115      new_path="$path"
35116    fi
35117
35118    if test "x$new_path" = x; then
35119      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35120$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35121      has_space=`$ECHO "$complete" | $GREP " "`
35122      if test "x$has_space" != x; then
35123        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35124$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35125      fi
35126      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35127    fi
35128  fi
35129
35130  # Now join together the path and the arguments once again
35131  if test "x$arguments" != xEOL; then
35132    new_complete="$new_path ${arguments% *}"
35133  else
35134    new_complete="$new_path"
35135  fi
35136
35137  if test "x$complete" != "x$new_complete"; then
35138    STRIP="$new_complete"
35139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35140$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35141  fi
35142
35143
35144
35145  # Publish this variable in the help.
35146
35147
35148  if test "x$NM" = x; then
35149    # The variable is not set by user, try to locate tool using the code snippet
35150    for ac_prog in nm
35151do
35152  # Extract the first word of "$ac_prog", so it can be a program name with args.
35153set dummy $ac_prog; ac_word=$2
35154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35155$as_echo_n "checking for $ac_word... " >&6; }
35156if ${ac_cv_path_NM+:} false; then :
35157  $as_echo_n "(cached) " >&6
35158else
35159  case $NM in
35160  [\\/]* | ?:[\\/]*)
35161  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35162  ;;
35163  *)
35164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35165for as_dir in $PATH
35166do
35167  IFS=$as_save_IFS
35168  test -z "$as_dir" && as_dir=.
35169    for ac_exec_ext in '' $ac_executable_extensions; do
35170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35171    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35173    break 2
35174  fi
35175done
35176  done
35177IFS=$as_save_IFS
35178
35179  ;;
35180esac
35181fi
35182NM=$ac_cv_path_NM
35183if test -n "$NM"; then
35184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35185$as_echo "$NM" >&6; }
35186else
35187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35188$as_echo "no" >&6; }
35189fi
35190
35191
35192  test -n "$NM" && break
35193done
35194
35195  else
35196    # The variable is set, but is it from the command line or the environment?
35197
35198    # Try to remove the string !NM! from our list.
35199    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35200    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35201      # If it failed, the variable was not from the command line. Ignore it,
35202      # but warn the user (except for BASH, which is always set by the calling BASH).
35203      if test "xNM" != xBASH; then
35204        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35205$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35206      fi
35207      # Try to locate tool using the code snippet
35208      for ac_prog in nm
35209do
35210  # Extract the first word of "$ac_prog", so it can be a program name with args.
35211set dummy $ac_prog; ac_word=$2
35212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35213$as_echo_n "checking for $ac_word... " >&6; }
35214if ${ac_cv_path_NM+:} false; then :
35215  $as_echo_n "(cached) " >&6
35216else
35217  case $NM in
35218  [\\/]* | ?:[\\/]*)
35219  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35220  ;;
35221  *)
35222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35223for as_dir in $PATH
35224do
35225  IFS=$as_save_IFS
35226  test -z "$as_dir" && as_dir=.
35227    for ac_exec_ext in '' $ac_executable_extensions; do
35228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35229    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35231    break 2
35232  fi
35233done
35234  done
35235IFS=$as_save_IFS
35236
35237  ;;
35238esac
35239fi
35240NM=$ac_cv_path_NM
35241if test -n "$NM"; then
35242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35243$as_echo "$NM" >&6; }
35244else
35245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35246$as_echo "no" >&6; }
35247fi
35248
35249
35250  test -n "$NM" && break
35251done
35252
35253    else
35254      # If it succeeded, then it was overridden by the user. We will use it
35255      # for the tool.
35256
35257      # First remove it from the list of overridden variables, so we can test
35258      # for unknown variables in the end.
35259      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35260
35261      # Check if the provided tool contains a complete path.
35262      tool_specified="$NM"
35263      tool_basename="${tool_specified##*/}"
35264      if test "x$tool_basename" = "x$tool_specified"; then
35265        # A command without a complete path is provided, search $PATH.
35266        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35267$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35268        # Extract the first word of "$tool_basename", so it can be a program name with args.
35269set dummy $tool_basename; ac_word=$2
35270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35271$as_echo_n "checking for $ac_word... " >&6; }
35272if ${ac_cv_path_NM+:} false; then :
35273  $as_echo_n "(cached) " >&6
35274else
35275  case $NM in
35276  [\\/]* | ?:[\\/]*)
35277  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35278  ;;
35279  *)
35280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35281for as_dir in $PATH
35282do
35283  IFS=$as_save_IFS
35284  test -z "$as_dir" && as_dir=.
35285    for ac_exec_ext in '' $ac_executable_extensions; do
35286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35287    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35289    break 2
35290  fi
35291done
35292  done
35293IFS=$as_save_IFS
35294
35295  ;;
35296esac
35297fi
35298NM=$ac_cv_path_NM
35299if test -n "$NM"; then
35300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35301$as_echo "$NM" >&6; }
35302else
35303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35304$as_echo "no" >&6; }
35305fi
35306
35307
35308        if test "x$NM" = x; then
35309          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35310        fi
35311      else
35312        # Otherwise we believe it is a complete path. Use it as it is.
35313        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35314$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35315        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35316$as_echo_n "checking for NM... " >&6; }
35317        if test ! -x "$tool_specified"; then
35318          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35319$as_echo "not found" >&6; }
35320          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35321        fi
35322        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35323$as_echo "$tool_specified" >&6; }
35324      fi
35325    fi
35326  fi
35327
35328
35329
35330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35331
35332  # First separate the path from the arguments. This will split at the first
35333  # space.
35334  complete="$NM"
35335  path="${complete%% *}"
35336  tmp="$complete EOL"
35337  arguments="${tmp#* }"
35338
35339  # Input might be given as Windows format, start by converting to
35340  # unix format.
35341  new_path=`$CYGPATH -u "$path"`
35342
35343  # Now try to locate executable using which
35344  new_path=`$WHICH "$new_path" 2> /dev/null`
35345  # bat and cmd files are not always considered executable in cygwin causing which
35346  # to not find them
35347  if test "x$new_path" = x \
35348      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35349      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35350    new_path=`$CYGPATH -u "$path"`
35351  fi
35352  if test "x$new_path" = x; then
35353    # Oops. Which didn't find the executable.
35354    # The splitting of arguments from the executable at a space might have been incorrect,
35355    # since paths with space are more likely in Windows. Give it another try with the whole
35356    # argument.
35357    path="$complete"
35358    arguments="EOL"
35359    new_path=`$CYGPATH -u "$path"`
35360    new_path=`$WHICH "$new_path" 2> /dev/null`
35361    # bat and cmd files are not always considered executable in cygwin causing which
35362    # to not find them
35363    if test "x$new_path" = x \
35364        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35365        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35366      new_path=`$CYGPATH -u "$path"`
35367    fi
35368    if test "x$new_path" = x; then
35369      # It's still not found. Now this is an unrecoverable error.
35370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35371$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35372      has_space=`$ECHO "$complete" | $GREP " "`
35373      if test "x$has_space" != x; then
35374        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35375$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35376      fi
35377      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35378    fi
35379  fi
35380
35381  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35382  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35383  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35384  # "foo.exe" is OK but "foo" is an error.
35385  #
35386  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35387  # It is also a way to make sure we got the proper file name for the real test later on.
35388  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35389  if test "x$test_shortpath" = x; then
35390    # Short path failed, file does not exist as specified.
35391    # Try adding .exe or .cmd
35392    if test -f "${new_path}.exe"; then
35393      input_to_shortpath="${new_path}.exe"
35394    elif test -f "${new_path}.cmd"; then
35395      input_to_shortpath="${new_path}.cmd"
35396    else
35397      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35398$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35399      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35400$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35401      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35402    fi
35403  else
35404    input_to_shortpath="$new_path"
35405  fi
35406
35407  # Call helper function which possibly converts this using DOS-style short mode.
35408  # If so, the updated path is stored in $new_path.
35409  new_path="$input_to_shortpath"
35410
35411  input_path="$input_to_shortpath"
35412  # Check if we need to convert this using DOS-style short mode. If the path
35413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35414  # take no chances and rewrite it.
35415  # Note: m4 eats our [], so we need to use [ and ] instead.
35416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35417  if test "x$has_forbidden_chars" != x; then
35418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35419    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35420    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35421    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35422      # Going to short mode and back again did indeed matter. Since short mode is
35423      # case insensitive, let's make it lowercase to improve readability.
35424      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35425      # Now convert it back to Unix-stile (cygpath)
35426      input_path=`$CYGPATH -u "$shortmode_path"`
35427      new_path="$input_path"
35428    fi
35429  fi
35430
35431  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35432  if test "x$test_cygdrive_prefix" = x; then
35433    # As a simple fix, exclude /usr/bin since it's not a real path.
35434    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35435      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35436      # a path prefixed by /cygdrive for fixpath to work.
35437      new_path="$CYGWIN_ROOT_PATH$input_path"
35438    fi
35439  fi
35440
35441  # remove trailing .exe if any
35442  new_path="${new_path/%.exe/}"
35443
35444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35445
35446  # First separate the path from the arguments. This will split at the first
35447  # space.
35448  complete="$NM"
35449  path="${complete%% *}"
35450  tmp="$complete EOL"
35451  arguments="${tmp#* }"
35452
35453  # Input might be given as Windows format, start by converting to
35454  # unix format.
35455  new_path="$path"
35456
35457  windows_path="$new_path"
35458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35459    unix_path=`$CYGPATH -u "$windows_path"`
35460    new_path="$unix_path"
35461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35463    new_path="$unix_path"
35464  fi
35465
35466
35467  # Now try to locate executable using which
35468  new_path=`$WHICH "$new_path" 2> /dev/null`
35469
35470  if test "x$new_path" = x; then
35471    # Oops. Which didn't find the executable.
35472    # The splitting of arguments from the executable at a space might have been incorrect,
35473    # since paths with space are more likely in Windows. Give it another try with the whole
35474    # argument.
35475    path="$complete"
35476    arguments="EOL"
35477    new_path="$path"
35478
35479  windows_path="$new_path"
35480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35481    unix_path=`$CYGPATH -u "$windows_path"`
35482    new_path="$unix_path"
35483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35485    new_path="$unix_path"
35486  fi
35487
35488
35489    new_path=`$WHICH "$new_path" 2> /dev/null`
35490
35491    if test "x$new_path" = x; then
35492      # It's still not found. Now this is an unrecoverable error.
35493      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35494$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35495      has_space=`$ECHO "$complete" | $GREP " "`
35496      if test "x$has_space" != x; then
35497        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35498$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35499      fi
35500      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35501    fi
35502  fi
35503
35504  # Now new_path has a complete unix path to the binary
35505  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35506    # Keep paths in /bin as-is, but remove trailing .exe if any
35507    new_path="${new_path/%.exe/}"
35508    # Do not save /bin paths to all_fixpath_prefixes!
35509  else
35510    # Not in mixed or Windows style, start by that.
35511    new_path=`cmd //c echo $new_path`
35512
35513  input_path="$new_path"
35514  # Check if we need to convert this using DOS-style short mode. If the path
35515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35516  # take no chances and rewrite it.
35517  # Note: m4 eats our [], so we need to use [ and ] instead.
35518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35519  if test "x$has_forbidden_chars" != x; then
35520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35521    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35522  fi
35523
35524    # Output is in $new_path
35525
35526  windows_path="$new_path"
35527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35528    unix_path=`$CYGPATH -u "$windows_path"`
35529    new_path="$unix_path"
35530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35532    new_path="$unix_path"
35533  fi
35534
35535    # remove trailing .exe if any
35536    new_path="${new_path/%.exe/}"
35537
35538    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35539    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35540  fi
35541
35542  else
35543    # We're on a posix platform. Hooray! :)
35544    # First separate the path from the arguments. This will split at the first
35545    # space.
35546    complete="$NM"
35547    path="${complete%% *}"
35548    tmp="$complete EOL"
35549    arguments="${tmp#* }"
35550
35551    # Cannot rely on the command "which" here since it doesn't always work.
35552    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35553    if test -z "$is_absolute_path"; then
35554      # Path to executable is not absolute. Find it.
35555      IFS_save="$IFS"
35556      IFS=:
35557      for p in $PATH; do
35558        if test -f "$p/$path" && test -x "$p/$path"; then
35559          new_path="$p/$path"
35560          break
35561        fi
35562      done
35563      IFS="$IFS_save"
35564    else
35565      # This is an absolute path, we can use it without further modifications.
35566      new_path="$path"
35567    fi
35568
35569    if test "x$new_path" = x; then
35570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35571$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35572      has_space=`$ECHO "$complete" | $GREP " "`
35573      if test "x$has_space" != x; then
35574        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35575$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35576      fi
35577      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35578    fi
35579  fi
35580
35581  # Now join together the path and the arguments once again
35582  if test "x$arguments" != xEOL; then
35583    new_complete="$new_path ${arguments% *}"
35584  else
35585    new_complete="$new_path"
35586  fi
35587
35588  if test "x$complete" != "x$new_complete"; then
35589    NM="$new_complete"
35590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35591$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35592  fi
35593
35594
35595
35596  # Publish this variable in the help.
35597
35598
35599  if test "x$GNM" = x; then
35600    # The variable is not set by user, try to locate tool using the code snippet
35601    for ac_prog in gnm
35602do
35603  # Extract the first word of "$ac_prog", so it can be a program name with args.
35604set dummy $ac_prog; ac_word=$2
35605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35606$as_echo_n "checking for $ac_word... " >&6; }
35607if ${ac_cv_path_GNM+:} false; then :
35608  $as_echo_n "(cached) " >&6
35609else
35610  case $GNM in
35611  [\\/]* | ?:[\\/]*)
35612  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35613  ;;
35614  *)
35615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35616for as_dir in $PATH
35617do
35618  IFS=$as_save_IFS
35619  test -z "$as_dir" && as_dir=.
35620    for ac_exec_ext in '' $ac_executable_extensions; do
35621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35622    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35624    break 2
35625  fi
35626done
35627  done
35628IFS=$as_save_IFS
35629
35630  ;;
35631esac
35632fi
35633GNM=$ac_cv_path_GNM
35634if test -n "$GNM"; then
35635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35636$as_echo "$GNM" >&6; }
35637else
35638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35639$as_echo "no" >&6; }
35640fi
35641
35642
35643  test -n "$GNM" && break
35644done
35645
35646  else
35647    # The variable is set, but is it from the command line or the environment?
35648
35649    # Try to remove the string !GNM! from our list.
35650    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35651    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35652      # If it failed, the variable was not from the command line. Ignore it,
35653      # but warn the user (except for BASH, which is always set by the calling BASH).
35654      if test "xGNM" != xBASH; then
35655        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35656$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35657      fi
35658      # Try to locate tool using the code snippet
35659      for ac_prog in gnm
35660do
35661  # Extract the first word of "$ac_prog", so it can be a program name with args.
35662set dummy $ac_prog; ac_word=$2
35663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35664$as_echo_n "checking for $ac_word... " >&6; }
35665if ${ac_cv_path_GNM+:} false; then :
35666  $as_echo_n "(cached) " >&6
35667else
35668  case $GNM in
35669  [\\/]* | ?:[\\/]*)
35670  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35671  ;;
35672  *)
35673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35674for as_dir in $PATH
35675do
35676  IFS=$as_save_IFS
35677  test -z "$as_dir" && as_dir=.
35678    for ac_exec_ext in '' $ac_executable_extensions; do
35679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35680    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35682    break 2
35683  fi
35684done
35685  done
35686IFS=$as_save_IFS
35687
35688  ;;
35689esac
35690fi
35691GNM=$ac_cv_path_GNM
35692if test -n "$GNM"; then
35693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35694$as_echo "$GNM" >&6; }
35695else
35696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35697$as_echo "no" >&6; }
35698fi
35699
35700
35701  test -n "$GNM" && break
35702done
35703
35704    else
35705      # If it succeeded, then it was overridden by the user. We will use it
35706      # for the tool.
35707
35708      # First remove it from the list of overridden variables, so we can test
35709      # for unknown variables in the end.
35710      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35711
35712      # Check if the provided tool contains a complete path.
35713      tool_specified="$GNM"
35714      tool_basename="${tool_specified##*/}"
35715      if test "x$tool_basename" = "x$tool_specified"; then
35716        # A command without a complete path is provided, search $PATH.
35717        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35718$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35719        # Extract the first word of "$tool_basename", so it can be a program name with args.
35720set dummy $tool_basename; ac_word=$2
35721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35722$as_echo_n "checking for $ac_word... " >&6; }
35723if ${ac_cv_path_GNM+:} false; then :
35724  $as_echo_n "(cached) " >&6
35725else
35726  case $GNM in
35727  [\\/]* | ?:[\\/]*)
35728  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35729  ;;
35730  *)
35731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35732for as_dir in $PATH
35733do
35734  IFS=$as_save_IFS
35735  test -z "$as_dir" && as_dir=.
35736    for ac_exec_ext in '' $ac_executable_extensions; do
35737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35738    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35740    break 2
35741  fi
35742done
35743  done
35744IFS=$as_save_IFS
35745
35746  ;;
35747esac
35748fi
35749GNM=$ac_cv_path_GNM
35750if test -n "$GNM"; then
35751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35752$as_echo "$GNM" >&6; }
35753else
35754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35755$as_echo "no" >&6; }
35756fi
35757
35758
35759        if test "x$GNM" = x; then
35760          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35761        fi
35762      else
35763        # Otherwise we believe it is a complete path. Use it as it is.
35764        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35765$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35766        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35767$as_echo_n "checking for GNM... " >&6; }
35768        if test ! -x "$tool_specified"; then
35769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35770$as_echo "not found" >&6; }
35771          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
35772        fi
35773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35774$as_echo "$tool_specified" >&6; }
35775      fi
35776    fi
35777  fi
35778
35779
35780
35781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35782
35783  # First separate the path from the arguments. This will split at the first
35784  # space.
35785  complete="$GNM"
35786  path="${complete%% *}"
35787  tmp="$complete EOL"
35788  arguments="${tmp#* }"
35789
35790  # Input might be given as Windows format, start by converting to
35791  # unix format.
35792  new_path=`$CYGPATH -u "$path"`
35793
35794  # Now try to locate executable using which
35795  new_path=`$WHICH "$new_path" 2> /dev/null`
35796  # bat and cmd files are not always considered executable in cygwin causing which
35797  # to not find them
35798  if test "x$new_path" = x \
35799      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35800      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35801    new_path=`$CYGPATH -u "$path"`
35802  fi
35803  if test "x$new_path" = x; then
35804    # Oops. Which didn't find the executable.
35805    # The splitting of arguments from the executable at a space might have been incorrect,
35806    # since paths with space are more likely in Windows. Give it another try with the whole
35807    # argument.
35808    path="$complete"
35809    arguments="EOL"
35810    new_path=`$CYGPATH -u "$path"`
35811    new_path=`$WHICH "$new_path" 2> /dev/null`
35812    # bat and cmd files are not always considered executable in cygwin causing which
35813    # to not find them
35814    if test "x$new_path" = x \
35815        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35816        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35817      new_path=`$CYGPATH -u "$path"`
35818    fi
35819    if test "x$new_path" = x; then
35820      # It's still not found. Now this is an unrecoverable error.
35821      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35822$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35823      has_space=`$ECHO "$complete" | $GREP " "`
35824      if test "x$has_space" != x; then
35825        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35826$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35827      fi
35828      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35829    fi
35830  fi
35831
35832  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35833  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35834  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35835  # "foo.exe" is OK but "foo" is an error.
35836  #
35837  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35838  # It is also a way to make sure we got the proper file name for the real test later on.
35839  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35840  if test "x$test_shortpath" = x; then
35841    # Short path failed, file does not exist as specified.
35842    # Try adding .exe or .cmd
35843    if test -f "${new_path}.exe"; then
35844      input_to_shortpath="${new_path}.exe"
35845    elif test -f "${new_path}.cmd"; then
35846      input_to_shortpath="${new_path}.cmd"
35847    else
35848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
35849$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
35850      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35851$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35852      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35853    fi
35854  else
35855    input_to_shortpath="$new_path"
35856  fi
35857
35858  # Call helper function which possibly converts this using DOS-style short mode.
35859  # If so, the updated path is stored in $new_path.
35860  new_path="$input_to_shortpath"
35861
35862  input_path="$input_to_shortpath"
35863  # Check if we need to convert this using DOS-style short mode. If the path
35864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35865  # take no chances and rewrite it.
35866  # Note: m4 eats our [], so we need to use [ and ] instead.
35867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35868  if test "x$has_forbidden_chars" != x; then
35869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35870    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35871    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35872    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35873      # Going to short mode and back again did indeed matter. Since short mode is
35874      # case insensitive, let's make it lowercase to improve readability.
35875      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35876      # Now convert it back to Unix-stile (cygpath)
35877      input_path=`$CYGPATH -u "$shortmode_path"`
35878      new_path="$input_path"
35879    fi
35880  fi
35881
35882  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35883  if test "x$test_cygdrive_prefix" = x; then
35884    # As a simple fix, exclude /usr/bin since it's not a real path.
35885    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35886      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35887      # a path prefixed by /cygdrive for fixpath to work.
35888      new_path="$CYGWIN_ROOT_PATH$input_path"
35889    fi
35890  fi
35891
35892  # remove trailing .exe if any
35893  new_path="${new_path/%.exe/}"
35894
35895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35896
35897  # First separate the path from the arguments. This will split at the first
35898  # space.
35899  complete="$GNM"
35900  path="${complete%% *}"
35901  tmp="$complete EOL"
35902  arguments="${tmp#* }"
35903
35904  # Input might be given as Windows format, start by converting to
35905  # unix format.
35906  new_path="$path"
35907
35908  windows_path="$new_path"
35909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35910    unix_path=`$CYGPATH -u "$windows_path"`
35911    new_path="$unix_path"
35912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35914    new_path="$unix_path"
35915  fi
35916
35917
35918  # Now try to locate executable using which
35919  new_path=`$WHICH "$new_path" 2> /dev/null`
35920
35921  if test "x$new_path" = x; then
35922    # Oops. Which didn't find the executable.
35923    # The splitting of arguments from the executable at a space might have been incorrect,
35924    # since paths with space are more likely in Windows. Give it another try with the whole
35925    # argument.
35926    path="$complete"
35927    arguments="EOL"
35928    new_path="$path"
35929
35930  windows_path="$new_path"
35931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35932    unix_path=`$CYGPATH -u "$windows_path"`
35933    new_path="$unix_path"
35934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35936    new_path="$unix_path"
35937  fi
35938
35939
35940    new_path=`$WHICH "$new_path" 2> /dev/null`
35941
35942    if test "x$new_path" = x; then
35943      # It's still not found. Now this is an unrecoverable error.
35944      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35945$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35946      has_space=`$ECHO "$complete" | $GREP " "`
35947      if test "x$has_space" != x; then
35948        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35949$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35950      fi
35951      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35952    fi
35953  fi
35954
35955  # Now new_path has a complete unix path to the binary
35956  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35957    # Keep paths in /bin as-is, but remove trailing .exe if any
35958    new_path="${new_path/%.exe/}"
35959    # Do not save /bin paths to all_fixpath_prefixes!
35960  else
35961    # Not in mixed or Windows style, start by that.
35962    new_path=`cmd //c echo $new_path`
35963
35964  input_path="$new_path"
35965  # Check if we need to convert this using DOS-style short mode. If the path
35966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35967  # take no chances and rewrite it.
35968  # Note: m4 eats our [], so we need to use [ and ] instead.
35969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35970  if test "x$has_forbidden_chars" != x; then
35971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35973  fi
35974
35975    # Output is in $new_path
35976
35977  windows_path="$new_path"
35978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35979    unix_path=`$CYGPATH -u "$windows_path"`
35980    new_path="$unix_path"
35981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35983    new_path="$unix_path"
35984  fi
35985
35986    # remove trailing .exe if any
35987    new_path="${new_path/%.exe/}"
35988
35989    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35990    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35991  fi
35992
35993  else
35994    # We're on a posix platform. Hooray! :)
35995    # First separate the path from the arguments. This will split at the first
35996    # space.
35997    complete="$GNM"
35998    path="${complete%% *}"
35999    tmp="$complete EOL"
36000    arguments="${tmp#* }"
36001
36002    # Cannot rely on the command "which" here since it doesn't always work.
36003    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36004    if test -z "$is_absolute_path"; then
36005      # Path to executable is not absolute. Find it.
36006      IFS_save="$IFS"
36007      IFS=:
36008      for p in $PATH; do
36009        if test -f "$p/$path" && test -x "$p/$path"; then
36010          new_path="$p/$path"
36011          break
36012        fi
36013      done
36014      IFS="$IFS_save"
36015    else
36016      # This is an absolute path, we can use it without further modifications.
36017      new_path="$path"
36018    fi
36019
36020    if test "x$new_path" = x; then
36021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36022$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36023      has_space=`$ECHO "$complete" | $GREP " "`
36024      if test "x$has_space" != x; then
36025        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36026$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36027      fi
36028      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36029    fi
36030  fi
36031
36032  # Now join together the path and the arguments once again
36033  if test "x$arguments" != xEOL; then
36034    new_complete="$new_path ${arguments% *}"
36035  else
36036    new_complete="$new_path"
36037  fi
36038
36039  if test "x$complete" != "x$new_complete"; then
36040    GNM="$new_complete"
36041    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36042$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36043  fi
36044
36045
36046
36047
36048  # Publish this variable in the help.
36049
36050
36051  if test "x$MCS" = x; then
36052    # The variable is not set by user, try to locate tool using the code snippet
36053    for ac_prog in mcs
36054do
36055  # Extract the first word of "$ac_prog", so it can be a program name with args.
36056set dummy $ac_prog; ac_word=$2
36057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36058$as_echo_n "checking for $ac_word... " >&6; }
36059if ${ac_cv_path_MCS+:} false; then :
36060  $as_echo_n "(cached) " >&6
36061else
36062  case $MCS in
36063  [\\/]* | ?:[\\/]*)
36064  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36065  ;;
36066  *)
36067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36068for as_dir in $PATH
36069do
36070  IFS=$as_save_IFS
36071  test -z "$as_dir" && as_dir=.
36072    for ac_exec_ext in '' $ac_executable_extensions; do
36073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36074    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36076    break 2
36077  fi
36078done
36079  done
36080IFS=$as_save_IFS
36081
36082  ;;
36083esac
36084fi
36085MCS=$ac_cv_path_MCS
36086if test -n "$MCS"; then
36087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36088$as_echo "$MCS" >&6; }
36089else
36090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36091$as_echo "no" >&6; }
36092fi
36093
36094
36095  test -n "$MCS" && break
36096done
36097
36098  else
36099    # The variable is set, but is it from the command line or the environment?
36100
36101    # Try to remove the string !MCS! from our list.
36102    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36103    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36104      # If it failed, the variable was not from the command line. Ignore it,
36105      # but warn the user (except for BASH, which is always set by the calling BASH).
36106      if test "xMCS" != xBASH; then
36107        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36108$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36109      fi
36110      # Try to locate tool using the code snippet
36111      for ac_prog in mcs
36112do
36113  # Extract the first word of "$ac_prog", so it can be a program name with args.
36114set dummy $ac_prog; ac_word=$2
36115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36116$as_echo_n "checking for $ac_word... " >&6; }
36117if ${ac_cv_path_MCS+:} false; then :
36118  $as_echo_n "(cached) " >&6
36119else
36120  case $MCS in
36121  [\\/]* | ?:[\\/]*)
36122  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36123  ;;
36124  *)
36125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36126for as_dir in $PATH
36127do
36128  IFS=$as_save_IFS
36129  test -z "$as_dir" && as_dir=.
36130    for ac_exec_ext in '' $ac_executable_extensions; do
36131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36132    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36134    break 2
36135  fi
36136done
36137  done
36138IFS=$as_save_IFS
36139
36140  ;;
36141esac
36142fi
36143MCS=$ac_cv_path_MCS
36144if test -n "$MCS"; then
36145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36146$as_echo "$MCS" >&6; }
36147else
36148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36149$as_echo "no" >&6; }
36150fi
36151
36152
36153  test -n "$MCS" && break
36154done
36155
36156    else
36157      # If it succeeded, then it was overridden by the user. We will use it
36158      # for the tool.
36159
36160      # First remove it from the list of overridden variables, so we can test
36161      # for unknown variables in the end.
36162      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36163
36164      # Check if the provided tool contains a complete path.
36165      tool_specified="$MCS"
36166      tool_basename="${tool_specified##*/}"
36167      if test "x$tool_basename" = "x$tool_specified"; then
36168        # A command without a complete path is provided, search $PATH.
36169        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36170$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36171        # Extract the first word of "$tool_basename", so it can be a program name with args.
36172set dummy $tool_basename; ac_word=$2
36173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36174$as_echo_n "checking for $ac_word... " >&6; }
36175if ${ac_cv_path_MCS+:} false; then :
36176  $as_echo_n "(cached) " >&6
36177else
36178  case $MCS in
36179  [\\/]* | ?:[\\/]*)
36180  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36181  ;;
36182  *)
36183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36184for as_dir in $PATH
36185do
36186  IFS=$as_save_IFS
36187  test -z "$as_dir" && as_dir=.
36188    for ac_exec_ext in '' $ac_executable_extensions; do
36189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36190    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36192    break 2
36193  fi
36194done
36195  done
36196IFS=$as_save_IFS
36197
36198  ;;
36199esac
36200fi
36201MCS=$ac_cv_path_MCS
36202if test -n "$MCS"; then
36203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36204$as_echo "$MCS" >&6; }
36205else
36206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36207$as_echo "no" >&6; }
36208fi
36209
36210
36211        if test "x$MCS" = x; then
36212          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36213        fi
36214      else
36215        # Otherwise we believe it is a complete path. Use it as it is.
36216        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36217$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36218        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36219$as_echo_n "checking for MCS... " >&6; }
36220        if test ! -x "$tool_specified"; then
36221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36222$as_echo "not found" >&6; }
36223          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36224        fi
36225        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36226$as_echo "$tool_specified" >&6; }
36227      fi
36228    fi
36229  fi
36230
36231
36232
36233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36234
36235  # First separate the path from the arguments. This will split at the first
36236  # space.
36237  complete="$MCS"
36238  path="${complete%% *}"
36239  tmp="$complete EOL"
36240  arguments="${tmp#* }"
36241
36242  # Input might be given as Windows format, start by converting to
36243  # unix format.
36244  new_path=`$CYGPATH -u "$path"`
36245
36246  # Now try to locate executable using which
36247  new_path=`$WHICH "$new_path" 2> /dev/null`
36248  # bat and cmd files are not always considered executable in cygwin causing which
36249  # to not find them
36250  if test "x$new_path" = x \
36251      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36252      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36253    new_path=`$CYGPATH -u "$path"`
36254  fi
36255  if test "x$new_path" = x; then
36256    # Oops. Which didn't find the executable.
36257    # The splitting of arguments from the executable at a space might have been incorrect,
36258    # since paths with space are more likely in Windows. Give it another try with the whole
36259    # argument.
36260    path="$complete"
36261    arguments="EOL"
36262    new_path=`$CYGPATH -u "$path"`
36263    new_path=`$WHICH "$new_path" 2> /dev/null`
36264    # bat and cmd files are not always considered executable in cygwin causing which
36265    # to not find them
36266    if test "x$new_path" = x \
36267        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36268        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36269      new_path=`$CYGPATH -u "$path"`
36270    fi
36271    if test "x$new_path" = x; then
36272      # It's still not found. Now this is an unrecoverable error.
36273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36274$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36275      has_space=`$ECHO "$complete" | $GREP " "`
36276      if test "x$has_space" != x; then
36277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36279      fi
36280      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36281    fi
36282  fi
36283
36284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36287  # "foo.exe" is OK but "foo" is an error.
36288  #
36289  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36290  # It is also a way to make sure we got the proper file name for the real test later on.
36291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36292  if test "x$test_shortpath" = x; then
36293    # Short path failed, file does not exist as specified.
36294    # Try adding .exe or .cmd
36295    if test -f "${new_path}.exe"; then
36296      input_to_shortpath="${new_path}.exe"
36297    elif test -f "${new_path}.cmd"; then
36298      input_to_shortpath="${new_path}.cmd"
36299    else
36300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36301$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36302      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36303$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36304      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36305    fi
36306  else
36307    input_to_shortpath="$new_path"
36308  fi
36309
36310  # Call helper function which possibly converts this using DOS-style short mode.
36311  # If so, the updated path is stored in $new_path.
36312  new_path="$input_to_shortpath"
36313
36314  input_path="$input_to_shortpath"
36315  # Check if we need to convert this using DOS-style short mode. If the path
36316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36317  # take no chances and rewrite it.
36318  # Note: m4 eats our [], so we need to use [ and ] instead.
36319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36320  if test "x$has_forbidden_chars" != x; then
36321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36325      # Going to short mode and back again did indeed matter. Since short mode is
36326      # case insensitive, let's make it lowercase to improve readability.
36327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36328      # Now convert it back to Unix-stile (cygpath)
36329      input_path=`$CYGPATH -u "$shortmode_path"`
36330      new_path="$input_path"
36331    fi
36332  fi
36333
36334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36335  if test "x$test_cygdrive_prefix" = x; then
36336    # As a simple fix, exclude /usr/bin since it's not a real path.
36337    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36339      # a path prefixed by /cygdrive for fixpath to work.
36340      new_path="$CYGWIN_ROOT_PATH$input_path"
36341    fi
36342  fi
36343
36344  # remove trailing .exe if any
36345  new_path="${new_path/%.exe/}"
36346
36347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36348
36349  # First separate the path from the arguments. This will split at the first
36350  # space.
36351  complete="$MCS"
36352  path="${complete%% *}"
36353  tmp="$complete EOL"
36354  arguments="${tmp#* }"
36355
36356  # Input might be given as Windows format, start by converting to
36357  # unix format.
36358  new_path="$path"
36359
36360  windows_path="$new_path"
36361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36362    unix_path=`$CYGPATH -u "$windows_path"`
36363    new_path="$unix_path"
36364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36366    new_path="$unix_path"
36367  fi
36368
36369
36370  # Now try to locate executable using which
36371  new_path=`$WHICH "$new_path" 2> /dev/null`
36372
36373  if test "x$new_path" = x; then
36374    # Oops. Which didn't find the executable.
36375    # The splitting of arguments from the executable at a space might have been incorrect,
36376    # since paths with space are more likely in Windows. Give it another try with the whole
36377    # argument.
36378    path="$complete"
36379    arguments="EOL"
36380    new_path="$path"
36381
36382  windows_path="$new_path"
36383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36384    unix_path=`$CYGPATH -u "$windows_path"`
36385    new_path="$unix_path"
36386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36388    new_path="$unix_path"
36389  fi
36390
36391
36392    new_path=`$WHICH "$new_path" 2> /dev/null`
36393
36394    if test "x$new_path" = x; then
36395      # It's still not found. Now this is an unrecoverable error.
36396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36397$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36398      has_space=`$ECHO "$complete" | $GREP " "`
36399      if test "x$has_space" != x; then
36400        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36401$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36402      fi
36403      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36404    fi
36405  fi
36406
36407  # Now new_path has a complete unix path to the binary
36408  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36409    # Keep paths in /bin as-is, but remove trailing .exe if any
36410    new_path="${new_path/%.exe/}"
36411    # Do not save /bin paths to all_fixpath_prefixes!
36412  else
36413    # Not in mixed or Windows style, start by that.
36414    new_path=`cmd //c echo $new_path`
36415
36416  input_path="$new_path"
36417  # Check if we need to convert this using DOS-style short mode. If the path
36418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36419  # take no chances and rewrite it.
36420  # Note: m4 eats our [], so we need to use [ and ] instead.
36421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36422  if test "x$has_forbidden_chars" != x; then
36423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36424    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36425  fi
36426
36427    # Output is in $new_path
36428
36429  windows_path="$new_path"
36430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36431    unix_path=`$CYGPATH -u "$windows_path"`
36432    new_path="$unix_path"
36433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36435    new_path="$unix_path"
36436  fi
36437
36438    # remove trailing .exe if any
36439    new_path="${new_path/%.exe/}"
36440
36441    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36442    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36443  fi
36444
36445  else
36446    # We're on a posix platform. Hooray! :)
36447    # First separate the path from the arguments. This will split at the first
36448    # space.
36449    complete="$MCS"
36450    path="${complete%% *}"
36451    tmp="$complete EOL"
36452    arguments="${tmp#* }"
36453
36454    # Cannot rely on the command "which" here since it doesn't always work.
36455    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36456    if test -z "$is_absolute_path"; then
36457      # Path to executable is not absolute. Find it.
36458      IFS_save="$IFS"
36459      IFS=:
36460      for p in $PATH; do
36461        if test -f "$p/$path" && test -x "$p/$path"; then
36462          new_path="$p/$path"
36463          break
36464        fi
36465      done
36466      IFS="$IFS_save"
36467    else
36468      # This is an absolute path, we can use it without further modifications.
36469      new_path="$path"
36470    fi
36471
36472    if test "x$new_path" = x; then
36473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36474$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36475      has_space=`$ECHO "$complete" | $GREP " "`
36476      if test "x$has_space" != x; then
36477        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36478$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36479      fi
36480      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36481    fi
36482  fi
36483
36484  # Now join together the path and the arguments once again
36485  if test "x$arguments" != xEOL; then
36486    new_complete="$new_path ${arguments% *}"
36487  else
36488    new_complete="$new_path"
36489  fi
36490
36491  if test "x$complete" != "x$new_complete"; then
36492    MCS="$new_complete"
36493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36494$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36495  fi
36496
36497  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36498    # FIXME: we should unify this with the solaris case above.
36499
36500
36501  # Publish this variable in the help.
36502
36503
36504  if test "x$STRIP" = x; then
36505    # The variable is not set by user, try to locate tool using the code snippet
36506    if test -n "$ac_tool_prefix"; then
36507  for ac_prog in strip
36508  do
36509    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36510set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36512$as_echo_n "checking for $ac_word... " >&6; }
36513if ${ac_cv_prog_STRIP+:} false; then :
36514  $as_echo_n "(cached) " >&6
36515else
36516  if test -n "$STRIP"; then
36517  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36518else
36519as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36520for as_dir in $PATH
36521do
36522  IFS=$as_save_IFS
36523  test -z "$as_dir" && as_dir=.
36524    for ac_exec_ext in '' $ac_executable_extensions; do
36525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36526    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36528    break 2
36529  fi
36530done
36531  done
36532IFS=$as_save_IFS
36533
36534fi
36535fi
36536STRIP=$ac_cv_prog_STRIP
36537if test -n "$STRIP"; then
36538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36539$as_echo "$STRIP" >&6; }
36540else
36541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36542$as_echo "no" >&6; }
36543fi
36544
36545
36546    test -n "$STRIP" && break
36547  done
36548fi
36549if test -z "$STRIP"; then
36550  ac_ct_STRIP=$STRIP
36551  for ac_prog in strip
36552do
36553  # Extract the first word of "$ac_prog", so it can be a program name with args.
36554set dummy $ac_prog; ac_word=$2
36555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36556$as_echo_n "checking for $ac_word... " >&6; }
36557if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36558  $as_echo_n "(cached) " >&6
36559else
36560  if test -n "$ac_ct_STRIP"; then
36561  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36562else
36563as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36564for as_dir in $PATH
36565do
36566  IFS=$as_save_IFS
36567  test -z "$as_dir" && as_dir=.
36568    for ac_exec_ext in '' $ac_executable_extensions; do
36569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36570    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36572    break 2
36573  fi
36574done
36575  done
36576IFS=$as_save_IFS
36577
36578fi
36579fi
36580ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36581if test -n "$ac_ct_STRIP"; then
36582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36583$as_echo "$ac_ct_STRIP" >&6; }
36584else
36585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36586$as_echo "no" >&6; }
36587fi
36588
36589
36590  test -n "$ac_ct_STRIP" && break
36591done
36592
36593  if test "x$ac_ct_STRIP" = x; then
36594    STRIP=""
36595  else
36596    case $cross_compiling:$ac_tool_warned in
36597yes:)
36598{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36599$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36600ac_tool_warned=yes ;;
36601esac
36602    STRIP=$ac_ct_STRIP
36603  fi
36604fi
36605
36606  else
36607    # The variable is set, but is it from the command line or the environment?
36608
36609    # Try to remove the string !STRIP! from our list.
36610    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36611    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36612      # If it failed, the variable was not from the command line. Ignore it,
36613      # but warn the user (except for BASH, which is always set by the calling BASH).
36614      if test "xSTRIP" != xBASH; then
36615        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36616$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36617      fi
36618      # Try to locate tool using the code snippet
36619      if test -n "$ac_tool_prefix"; then
36620  for ac_prog in strip
36621  do
36622    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36623set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36625$as_echo_n "checking for $ac_word... " >&6; }
36626if ${ac_cv_prog_STRIP+:} false; then :
36627  $as_echo_n "(cached) " >&6
36628else
36629  if test -n "$STRIP"; then
36630  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36631else
36632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36633for as_dir in $PATH
36634do
36635  IFS=$as_save_IFS
36636  test -z "$as_dir" && as_dir=.
36637    for ac_exec_ext in '' $ac_executable_extensions; do
36638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36639    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36641    break 2
36642  fi
36643done
36644  done
36645IFS=$as_save_IFS
36646
36647fi
36648fi
36649STRIP=$ac_cv_prog_STRIP
36650if test -n "$STRIP"; then
36651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36652$as_echo "$STRIP" >&6; }
36653else
36654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36655$as_echo "no" >&6; }
36656fi
36657
36658
36659    test -n "$STRIP" && break
36660  done
36661fi
36662if test -z "$STRIP"; then
36663  ac_ct_STRIP=$STRIP
36664  for ac_prog in strip
36665do
36666  # Extract the first word of "$ac_prog", so it can be a program name with args.
36667set dummy $ac_prog; ac_word=$2
36668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36669$as_echo_n "checking for $ac_word... " >&6; }
36670if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36671  $as_echo_n "(cached) " >&6
36672else
36673  if test -n "$ac_ct_STRIP"; then
36674  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36675else
36676as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36677for as_dir in $PATH
36678do
36679  IFS=$as_save_IFS
36680  test -z "$as_dir" && as_dir=.
36681    for ac_exec_ext in '' $ac_executable_extensions; do
36682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36683    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36685    break 2
36686  fi
36687done
36688  done
36689IFS=$as_save_IFS
36690
36691fi
36692fi
36693ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36694if test -n "$ac_ct_STRIP"; then
36695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36696$as_echo "$ac_ct_STRIP" >&6; }
36697else
36698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36699$as_echo "no" >&6; }
36700fi
36701
36702
36703  test -n "$ac_ct_STRIP" && break
36704done
36705
36706  if test "x$ac_ct_STRIP" = x; then
36707    STRIP=""
36708  else
36709    case $cross_compiling:$ac_tool_warned in
36710yes:)
36711{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36712$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36713ac_tool_warned=yes ;;
36714esac
36715    STRIP=$ac_ct_STRIP
36716  fi
36717fi
36718
36719    else
36720      # If it succeeded, then it was overridden by the user. We will use it
36721      # for the tool.
36722
36723      # First remove it from the list of overridden variables, so we can test
36724      # for unknown variables in the end.
36725      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36726
36727      # Check if the provided tool contains a complete path.
36728      tool_specified="$STRIP"
36729      tool_basename="${tool_specified##*/}"
36730      if test "x$tool_basename" = "x$tool_specified"; then
36731        # A command without a complete path is provided, search $PATH.
36732        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36733$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36734        # Extract the first word of "$tool_basename", so it can be a program name with args.
36735set dummy $tool_basename; ac_word=$2
36736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36737$as_echo_n "checking for $ac_word... " >&6; }
36738if ${ac_cv_path_STRIP+:} false; then :
36739  $as_echo_n "(cached) " >&6
36740else
36741  case $STRIP in
36742  [\\/]* | ?:[\\/]*)
36743  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36744  ;;
36745  *)
36746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36747for as_dir in $PATH
36748do
36749  IFS=$as_save_IFS
36750  test -z "$as_dir" && as_dir=.
36751    for ac_exec_ext in '' $ac_executable_extensions; do
36752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36753    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36755    break 2
36756  fi
36757done
36758  done
36759IFS=$as_save_IFS
36760
36761  ;;
36762esac
36763fi
36764STRIP=$ac_cv_path_STRIP
36765if test -n "$STRIP"; then
36766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36767$as_echo "$STRIP" >&6; }
36768else
36769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36770$as_echo "no" >&6; }
36771fi
36772
36773
36774        if test "x$STRIP" = x; then
36775          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36776        fi
36777      else
36778        # Otherwise we believe it is a complete path. Use it as it is.
36779        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36780$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36781        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36782$as_echo_n "checking for STRIP... " >&6; }
36783        if test ! -x "$tool_specified"; then
36784          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36785$as_echo "not found" >&6; }
36786          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36787        fi
36788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36789$as_echo "$tool_specified" >&6; }
36790      fi
36791    fi
36792  fi
36793
36794
36795
36796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36797
36798  # First separate the path from the arguments. This will split at the first
36799  # space.
36800  complete="$STRIP"
36801  path="${complete%% *}"
36802  tmp="$complete EOL"
36803  arguments="${tmp#* }"
36804
36805  # Input might be given as Windows format, start by converting to
36806  # unix format.
36807  new_path=`$CYGPATH -u "$path"`
36808
36809  # Now try to locate executable using which
36810  new_path=`$WHICH "$new_path" 2> /dev/null`
36811  # bat and cmd files are not always considered executable in cygwin causing which
36812  # to not find them
36813  if test "x$new_path" = x \
36814      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36815      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36816    new_path=`$CYGPATH -u "$path"`
36817  fi
36818  if test "x$new_path" = x; then
36819    # Oops. Which didn't find the executable.
36820    # The splitting of arguments from the executable at a space might have been incorrect,
36821    # since paths with space are more likely in Windows. Give it another try with the whole
36822    # argument.
36823    path="$complete"
36824    arguments="EOL"
36825    new_path=`$CYGPATH -u "$path"`
36826    new_path=`$WHICH "$new_path" 2> /dev/null`
36827    # bat and cmd files are not always considered executable in cygwin causing which
36828    # to not find them
36829    if test "x$new_path" = x \
36830        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36831        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36832      new_path=`$CYGPATH -u "$path"`
36833    fi
36834    if test "x$new_path" = x; then
36835      # It's still not found. Now this is an unrecoverable error.
36836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36837$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36838      has_space=`$ECHO "$complete" | $GREP " "`
36839      if test "x$has_space" != x; then
36840        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36841$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36842      fi
36843      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36844    fi
36845  fi
36846
36847  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36848  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36849  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36850  # "foo.exe" is OK but "foo" is an error.
36851  #
36852  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36853  # It is also a way to make sure we got the proper file name for the real test later on.
36854  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36855  if test "x$test_shortpath" = x; then
36856    # Short path failed, file does not exist as specified.
36857    # Try adding .exe or .cmd
36858    if test -f "${new_path}.exe"; then
36859      input_to_shortpath="${new_path}.exe"
36860    elif test -f "${new_path}.cmd"; then
36861      input_to_shortpath="${new_path}.cmd"
36862    else
36863      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36864$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36865      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36866$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36867      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36868    fi
36869  else
36870    input_to_shortpath="$new_path"
36871  fi
36872
36873  # Call helper function which possibly converts this using DOS-style short mode.
36874  # If so, the updated path is stored in $new_path.
36875  new_path="$input_to_shortpath"
36876
36877  input_path="$input_to_shortpath"
36878  # Check if we need to convert this using DOS-style short mode. If the path
36879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36880  # take no chances and rewrite it.
36881  # Note: m4 eats our [], so we need to use [ and ] instead.
36882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36883  if test "x$has_forbidden_chars" != x; then
36884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36885    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36886    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36887    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36888      # Going to short mode and back again did indeed matter. Since short mode is
36889      # case insensitive, let's make it lowercase to improve readability.
36890      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36891      # Now convert it back to Unix-stile (cygpath)
36892      input_path=`$CYGPATH -u "$shortmode_path"`
36893      new_path="$input_path"
36894    fi
36895  fi
36896
36897  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36898  if test "x$test_cygdrive_prefix" = x; then
36899    # As a simple fix, exclude /usr/bin since it's not a real path.
36900    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36901      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36902      # a path prefixed by /cygdrive for fixpath to work.
36903      new_path="$CYGWIN_ROOT_PATH$input_path"
36904    fi
36905  fi
36906
36907  # remove trailing .exe if any
36908  new_path="${new_path/%.exe/}"
36909
36910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36911
36912  # First separate the path from the arguments. This will split at the first
36913  # space.
36914  complete="$STRIP"
36915  path="${complete%% *}"
36916  tmp="$complete EOL"
36917  arguments="${tmp#* }"
36918
36919  # Input might be given as Windows format, start by converting to
36920  # unix format.
36921  new_path="$path"
36922
36923  windows_path="$new_path"
36924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36925    unix_path=`$CYGPATH -u "$windows_path"`
36926    new_path="$unix_path"
36927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36929    new_path="$unix_path"
36930  fi
36931
36932
36933  # Now try to locate executable using which
36934  new_path=`$WHICH "$new_path" 2> /dev/null`
36935
36936  if test "x$new_path" = x; then
36937    # Oops. Which didn't find the executable.
36938    # The splitting of arguments from the executable at a space might have been incorrect,
36939    # since paths with space are more likely in Windows. Give it another try with the whole
36940    # argument.
36941    path="$complete"
36942    arguments="EOL"
36943    new_path="$path"
36944
36945  windows_path="$new_path"
36946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36947    unix_path=`$CYGPATH -u "$windows_path"`
36948    new_path="$unix_path"
36949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36951    new_path="$unix_path"
36952  fi
36953
36954
36955    new_path=`$WHICH "$new_path" 2> /dev/null`
36956
36957    if test "x$new_path" = x; then
36958      # It's still not found. Now this is an unrecoverable error.
36959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36960$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36961      has_space=`$ECHO "$complete" | $GREP " "`
36962      if test "x$has_space" != x; then
36963        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36964$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36965      fi
36966      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36967    fi
36968  fi
36969
36970  # Now new_path has a complete unix path to the binary
36971  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36972    # Keep paths in /bin as-is, but remove trailing .exe if any
36973    new_path="${new_path/%.exe/}"
36974    # Do not save /bin paths to all_fixpath_prefixes!
36975  else
36976    # Not in mixed or Windows style, start by that.
36977    new_path=`cmd //c echo $new_path`
36978
36979  input_path="$new_path"
36980  # Check if we need to convert this using DOS-style short mode. If the path
36981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36982  # take no chances and rewrite it.
36983  # Note: m4 eats our [], so we need to use [ and ] instead.
36984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36985  if test "x$has_forbidden_chars" != x; then
36986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36988  fi
36989
36990    # Output is in $new_path
36991
36992  windows_path="$new_path"
36993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36994    unix_path=`$CYGPATH -u "$windows_path"`
36995    new_path="$unix_path"
36996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36998    new_path="$unix_path"
36999  fi
37000
37001    # remove trailing .exe if any
37002    new_path="${new_path/%.exe/}"
37003
37004    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37005    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37006  fi
37007
37008  else
37009    # We're on a posix platform. Hooray! :)
37010    # First separate the path from the arguments. This will split at the first
37011    # space.
37012    complete="$STRIP"
37013    path="${complete%% *}"
37014    tmp="$complete EOL"
37015    arguments="${tmp#* }"
37016
37017    # Cannot rely on the command "which" here since it doesn't always work.
37018    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37019    if test -z "$is_absolute_path"; then
37020      # Path to executable is not absolute. Find it.
37021      IFS_save="$IFS"
37022      IFS=:
37023      for p in $PATH; do
37024        if test -f "$p/$path" && test -x "$p/$path"; then
37025          new_path="$p/$path"
37026          break
37027        fi
37028      done
37029      IFS="$IFS_save"
37030    else
37031      # This is an absolute path, we can use it without further modifications.
37032      new_path="$path"
37033    fi
37034
37035    if test "x$new_path" = x; then
37036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37037$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37038      has_space=`$ECHO "$complete" | $GREP " "`
37039      if test "x$has_space" != x; then
37040        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37041$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37042      fi
37043      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37044    fi
37045  fi
37046
37047  # Now join together the path and the arguments once again
37048  if test "x$arguments" != xEOL; then
37049    new_complete="$new_path ${arguments% *}"
37050  else
37051    new_complete="$new_path"
37052  fi
37053
37054  if test "x$complete" != "x$new_complete"; then
37055    STRIP="$new_complete"
37056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37057$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37058  fi
37059
37060
37061
37062  # Publish this variable in the help.
37063
37064
37065  if test "x$NM" = x; then
37066    # The variable is not set by user, try to locate tool using the code snippet
37067    if test -n "$ac_tool_prefix"; then
37068  for ac_prog in nm
37069  do
37070    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37071set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37073$as_echo_n "checking for $ac_word... " >&6; }
37074if ${ac_cv_prog_NM+:} false; then :
37075  $as_echo_n "(cached) " >&6
37076else
37077  if test -n "$NM"; then
37078  ac_cv_prog_NM="$NM" # Let the user override the test.
37079else
37080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37081for as_dir in $PATH
37082do
37083  IFS=$as_save_IFS
37084  test -z "$as_dir" && as_dir=.
37085    for ac_exec_ext in '' $ac_executable_extensions; do
37086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37087    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37089    break 2
37090  fi
37091done
37092  done
37093IFS=$as_save_IFS
37094
37095fi
37096fi
37097NM=$ac_cv_prog_NM
37098if test -n "$NM"; then
37099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37100$as_echo "$NM" >&6; }
37101else
37102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37103$as_echo "no" >&6; }
37104fi
37105
37106
37107    test -n "$NM" && break
37108  done
37109fi
37110if test -z "$NM"; then
37111  ac_ct_NM=$NM
37112  for ac_prog in nm
37113do
37114  # Extract the first word of "$ac_prog", so it can be a program name with args.
37115set dummy $ac_prog; ac_word=$2
37116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37117$as_echo_n "checking for $ac_word... " >&6; }
37118if ${ac_cv_prog_ac_ct_NM+:} false; then :
37119  $as_echo_n "(cached) " >&6
37120else
37121  if test -n "$ac_ct_NM"; then
37122  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37123else
37124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37125for as_dir in $PATH
37126do
37127  IFS=$as_save_IFS
37128  test -z "$as_dir" && as_dir=.
37129    for ac_exec_ext in '' $ac_executable_extensions; do
37130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37131    ac_cv_prog_ac_ct_NM="$ac_prog"
37132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37133    break 2
37134  fi
37135done
37136  done
37137IFS=$as_save_IFS
37138
37139fi
37140fi
37141ac_ct_NM=$ac_cv_prog_ac_ct_NM
37142if test -n "$ac_ct_NM"; then
37143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37144$as_echo "$ac_ct_NM" >&6; }
37145else
37146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37147$as_echo "no" >&6; }
37148fi
37149
37150
37151  test -n "$ac_ct_NM" && break
37152done
37153
37154  if test "x$ac_ct_NM" = x; then
37155    NM=""
37156  else
37157    case $cross_compiling:$ac_tool_warned in
37158yes:)
37159{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37160$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37161ac_tool_warned=yes ;;
37162esac
37163    NM=$ac_ct_NM
37164  fi
37165fi
37166
37167  else
37168    # The variable is set, but is it from the command line or the environment?
37169
37170    # Try to remove the string !NM! from our list.
37171    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37172    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37173      # If it failed, the variable was not from the command line. Ignore it,
37174      # but warn the user (except for BASH, which is always set by the calling BASH).
37175      if test "xNM" != xBASH; then
37176        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37177$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37178      fi
37179      # Try to locate tool using the code snippet
37180      if test -n "$ac_tool_prefix"; then
37181  for ac_prog in nm
37182  do
37183    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37184set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37186$as_echo_n "checking for $ac_word... " >&6; }
37187if ${ac_cv_prog_NM+:} false; then :
37188  $as_echo_n "(cached) " >&6
37189else
37190  if test -n "$NM"; then
37191  ac_cv_prog_NM="$NM" # Let the user override the test.
37192else
37193as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37194for as_dir in $PATH
37195do
37196  IFS=$as_save_IFS
37197  test -z "$as_dir" && as_dir=.
37198    for ac_exec_ext in '' $ac_executable_extensions; do
37199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37200    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37202    break 2
37203  fi
37204done
37205  done
37206IFS=$as_save_IFS
37207
37208fi
37209fi
37210NM=$ac_cv_prog_NM
37211if test -n "$NM"; then
37212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37213$as_echo "$NM" >&6; }
37214else
37215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37216$as_echo "no" >&6; }
37217fi
37218
37219
37220    test -n "$NM" && break
37221  done
37222fi
37223if test -z "$NM"; then
37224  ac_ct_NM=$NM
37225  for ac_prog in nm
37226do
37227  # Extract the first word of "$ac_prog", so it can be a program name with args.
37228set dummy $ac_prog; ac_word=$2
37229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37230$as_echo_n "checking for $ac_word... " >&6; }
37231if ${ac_cv_prog_ac_ct_NM+:} false; then :
37232  $as_echo_n "(cached) " >&6
37233else
37234  if test -n "$ac_ct_NM"; then
37235  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37236else
37237as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37238for as_dir in $PATH
37239do
37240  IFS=$as_save_IFS
37241  test -z "$as_dir" && as_dir=.
37242    for ac_exec_ext in '' $ac_executable_extensions; do
37243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37244    ac_cv_prog_ac_ct_NM="$ac_prog"
37245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37246    break 2
37247  fi
37248done
37249  done
37250IFS=$as_save_IFS
37251
37252fi
37253fi
37254ac_ct_NM=$ac_cv_prog_ac_ct_NM
37255if test -n "$ac_ct_NM"; then
37256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37257$as_echo "$ac_ct_NM" >&6; }
37258else
37259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37260$as_echo "no" >&6; }
37261fi
37262
37263
37264  test -n "$ac_ct_NM" && break
37265done
37266
37267  if test "x$ac_ct_NM" = x; then
37268    NM=""
37269  else
37270    case $cross_compiling:$ac_tool_warned in
37271yes:)
37272{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37273$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37274ac_tool_warned=yes ;;
37275esac
37276    NM=$ac_ct_NM
37277  fi
37278fi
37279
37280    else
37281      # If it succeeded, then it was overridden by the user. We will use it
37282      # for the tool.
37283
37284      # First remove it from the list of overridden variables, so we can test
37285      # for unknown variables in the end.
37286      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37287
37288      # Check if the provided tool contains a complete path.
37289      tool_specified="$NM"
37290      tool_basename="${tool_specified##*/}"
37291      if test "x$tool_basename" = "x$tool_specified"; then
37292        # A command without a complete path is provided, search $PATH.
37293        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37294$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37295        # Extract the first word of "$tool_basename", so it can be a program name with args.
37296set dummy $tool_basename; ac_word=$2
37297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37298$as_echo_n "checking for $ac_word... " >&6; }
37299if ${ac_cv_path_NM+:} false; then :
37300  $as_echo_n "(cached) " >&6
37301else
37302  case $NM in
37303  [\\/]* | ?:[\\/]*)
37304  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37305  ;;
37306  *)
37307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37308for as_dir in $PATH
37309do
37310  IFS=$as_save_IFS
37311  test -z "$as_dir" && as_dir=.
37312    for ac_exec_ext in '' $ac_executable_extensions; do
37313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37314    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37316    break 2
37317  fi
37318done
37319  done
37320IFS=$as_save_IFS
37321
37322  ;;
37323esac
37324fi
37325NM=$ac_cv_path_NM
37326if test -n "$NM"; then
37327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37328$as_echo "$NM" >&6; }
37329else
37330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37331$as_echo "no" >&6; }
37332fi
37333
37334
37335        if test "x$NM" = x; then
37336          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37337        fi
37338      else
37339        # Otherwise we believe it is a complete path. Use it as it is.
37340        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37341$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37342        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37343$as_echo_n "checking for NM... " >&6; }
37344        if test ! -x "$tool_specified"; then
37345          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37346$as_echo "not found" >&6; }
37347          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37348        fi
37349        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37350$as_echo "$tool_specified" >&6; }
37351      fi
37352    fi
37353  fi
37354
37355
37356
37357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37358
37359  # First separate the path from the arguments. This will split at the first
37360  # space.
37361  complete="$NM"
37362  path="${complete%% *}"
37363  tmp="$complete EOL"
37364  arguments="${tmp#* }"
37365
37366  # Input might be given as Windows format, start by converting to
37367  # unix format.
37368  new_path=`$CYGPATH -u "$path"`
37369
37370  # Now try to locate executable using which
37371  new_path=`$WHICH "$new_path" 2> /dev/null`
37372  # bat and cmd files are not always considered executable in cygwin causing which
37373  # to not find them
37374  if test "x$new_path" = x \
37375      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37376      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37377    new_path=`$CYGPATH -u "$path"`
37378  fi
37379  if test "x$new_path" = x; then
37380    # Oops. Which didn't find the executable.
37381    # The splitting of arguments from the executable at a space might have been incorrect,
37382    # since paths with space are more likely in Windows. Give it another try with the whole
37383    # argument.
37384    path="$complete"
37385    arguments="EOL"
37386    new_path=`$CYGPATH -u "$path"`
37387    new_path=`$WHICH "$new_path" 2> /dev/null`
37388    # bat and cmd files are not always considered executable in cygwin causing which
37389    # to not find them
37390    if test "x$new_path" = x \
37391        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37392        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37393      new_path=`$CYGPATH -u "$path"`
37394    fi
37395    if test "x$new_path" = x; then
37396      # It's still not found. Now this is an unrecoverable error.
37397      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37398$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37399      has_space=`$ECHO "$complete" | $GREP " "`
37400      if test "x$has_space" != x; then
37401        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37402$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37403      fi
37404      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37405    fi
37406  fi
37407
37408  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37409  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37410  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37411  # "foo.exe" is OK but "foo" is an error.
37412  #
37413  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37414  # It is also a way to make sure we got the proper file name for the real test later on.
37415  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37416  if test "x$test_shortpath" = x; then
37417    # Short path failed, file does not exist as specified.
37418    # Try adding .exe or .cmd
37419    if test -f "${new_path}.exe"; then
37420      input_to_shortpath="${new_path}.exe"
37421    elif test -f "${new_path}.cmd"; then
37422      input_to_shortpath="${new_path}.cmd"
37423    else
37424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37425$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37426      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37427$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37428      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37429    fi
37430  else
37431    input_to_shortpath="$new_path"
37432  fi
37433
37434  # Call helper function which possibly converts this using DOS-style short mode.
37435  # If so, the updated path is stored in $new_path.
37436  new_path="$input_to_shortpath"
37437
37438  input_path="$input_to_shortpath"
37439  # Check if we need to convert this using DOS-style short mode. If the path
37440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37441  # take no chances and rewrite it.
37442  # Note: m4 eats our [], so we need to use [ and ] instead.
37443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37444  if test "x$has_forbidden_chars" != x; then
37445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37446    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37447    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37448    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37449      # Going to short mode and back again did indeed matter. Since short mode is
37450      # case insensitive, let's make it lowercase to improve readability.
37451      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37452      # Now convert it back to Unix-stile (cygpath)
37453      input_path=`$CYGPATH -u "$shortmode_path"`
37454      new_path="$input_path"
37455    fi
37456  fi
37457
37458  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37459  if test "x$test_cygdrive_prefix" = x; then
37460    # As a simple fix, exclude /usr/bin since it's not a real path.
37461    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37462      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37463      # a path prefixed by /cygdrive for fixpath to work.
37464      new_path="$CYGWIN_ROOT_PATH$input_path"
37465    fi
37466  fi
37467
37468  # remove trailing .exe if any
37469  new_path="${new_path/%.exe/}"
37470
37471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37472
37473  # First separate the path from the arguments. This will split at the first
37474  # space.
37475  complete="$NM"
37476  path="${complete%% *}"
37477  tmp="$complete EOL"
37478  arguments="${tmp#* }"
37479
37480  # Input might be given as Windows format, start by converting to
37481  # unix format.
37482  new_path="$path"
37483
37484  windows_path="$new_path"
37485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37486    unix_path=`$CYGPATH -u "$windows_path"`
37487    new_path="$unix_path"
37488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37490    new_path="$unix_path"
37491  fi
37492
37493
37494  # Now try to locate executable using which
37495  new_path=`$WHICH "$new_path" 2> /dev/null`
37496
37497  if test "x$new_path" = x; then
37498    # Oops. Which didn't find the executable.
37499    # The splitting of arguments from the executable at a space might have been incorrect,
37500    # since paths with space are more likely in Windows. Give it another try with the whole
37501    # argument.
37502    path="$complete"
37503    arguments="EOL"
37504    new_path="$path"
37505
37506  windows_path="$new_path"
37507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37508    unix_path=`$CYGPATH -u "$windows_path"`
37509    new_path="$unix_path"
37510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37512    new_path="$unix_path"
37513  fi
37514
37515
37516    new_path=`$WHICH "$new_path" 2> /dev/null`
37517
37518    if test "x$new_path" = x; then
37519      # It's still not found. Now this is an unrecoverable error.
37520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37521$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37522      has_space=`$ECHO "$complete" | $GREP " "`
37523      if test "x$has_space" != x; then
37524        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37525$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37526      fi
37527      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37528    fi
37529  fi
37530
37531  # Now new_path has a complete unix path to the binary
37532  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37533    # Keep paths in /bin as-is, but remove trailing .exe if any
37534    new_path="${new_path/%.exe/}"
37535    # Do not save /bin paths to all_fixpath_prefixes!
37536  else
37537    # Not in mixed or Windows style, start by that.
37538    new_path=`cmd //c echo $new_path`
37539
37540  input_path="$new_path"
37541  # Check if we need to convert this using DOS-style short mode. If the path
37542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37543  # take no chances and rewrite it.
37544  # Note: m4 eats our [], so we need to use [ and ] instead.
37545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37546  if test "x$has_forbidden_chars" != x; then
37547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37548    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37549  fi
37550
37551    # Output is in $new_path
37552
37553  windows_path="$new_path"
37554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37555    unix_path=`$CYGPATH -u "$windows_path"`
37556    new_path="$unix_path"
37557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37559    new_path="$unix_path"
37560  fi
37561
37562    # remove trailing .exe if any
37563    new_path="${new_path/%.exe/}"
37564
37565    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37566    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37567  fi
37568
37569  else
37570    # We're on a posix platform. Hooray! :)
37571    # First separate the path from the arguments. This will split at the first
37572    # space.
37573    complete="$NM"
37574    path="${complete%% *}"
37575    tmp="$complete EOL"
37576    arguments="${tmp#* }"
37577
37578    # Cannot rely on the command "which" here since it doesn't always work.
37579    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37580    if test -z "$is_absolute_path"; then
37581      # Path to executable is not absolute. Find it.
37582      IFS_save="$IFS"
37583      IFS=:
37584      for p in $PATH; do
37585        if test -f "$p/$path" && test -x "$p/$path"; then
37586          new_path="$p/$path"
37587          break
37588        fi
37589      done
37590      IFS="$IFS_save"
37591    else
37592      # This is an absolute path, we can use it without further modifications.
37593      new_path="$path"
37594    fi
37595
37596    if test "x$new_path" = x; then
37597      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37598$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37599      has_space=`$ECHO "$complete" | $GREP " "`
37600      if test "x$has_space" != x; then
37601        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37602$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37603      fi
37604      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37605    fi
37606  fi
37607
37608  # Now join together the path and the arguments once again
37609  if test "x$arguments" != xEOL; then
37610    new_complete="$new_path ${arguments% *}"
37611  else
37612    new_complete="$new_path"
37613  fi
37614
37615  if test "x$complete" != "x$new_complete"; then
37616    NM="$new_complete"
37617    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37618$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37619  fi
37620
37621    GNM="$NM"
37622
37623  fi
37624
37625  # objcopy is used for moving debug symbols to separate files when
37626  # full debug symbols are enabled.
37627  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37628
37629
37630  # Publish this variable in the help.
37631
37632
37633  if test "x$OBJCOPY" = x; then
37634    # The variable is not set by user, try to locate tool using the code snippet
37635    if test -n "$ac_tool_prefix"; then
37636  for ac_prog in gobjcopy objcopy
37637  do
37638    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37639set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37641$as_echo_n "checking for $ac_word... " >&6; }
37642if ${ac_cv_prog_OBJCOPY+:} false; then :
37643  $as_echo_n "(cached) " >&6
37644else
37645  if test -n "$OBJCOPY"; then
37646  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37647else
37648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37649for as_dir in $PATH
37650do
37651  IFS=$as_save_IFS
37652  test -z "$as_dir" && as_dir=.
37653    for ac_exec_ext in '' $ac_executable_extensions; do
37654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37655    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37657    break 2
37658  fi
37659done
37660  done
37661IFS=$as_save_IFS
37662
37663fi
37664fi
37665OBJCOPY=$ac_cv_prog_OBJCOPY
37666if test -n "$OBJCOPY"; then
37667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37668$as_echo "$OBJCOPY" >&6; }
37669else
37670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37671$as_echo "no" >&6; }
37672fi
37673
37674
37675    test -n "$OBJCOPY" && break
37676  done
37677fi
37678if test -z "$OBJCOPY"; then
37679  ac_ct_OBJCOPY=$OBJCOPY
37680  for ac_prog in gobjcopy objcopy
37681do
37682  # Extract the first word of "$ac_prog", so it can be a program name with args.
37683set dummy $ac_prog; ac_word=$2
37684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37685$as_echo_n "checking for $ac_word... " >&6; }
37686if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37687  $as_echo_n "(cached) " >&6
37688else
37689  if test -n "$ac_ct_OBJCOPY"; then
37690  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37691else
37692as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37693for as_dir in $PATH
37694do
37695  IFS=$as_save_IFS
37696  test -z "$as_dir" && as_dir=.
37697    for ac_exec_ext in '' $ac_executable_extensions; do
37698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37699    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37701    break 2
37702  fi
37703done
37704  done
37705IFS=$as_save_IFS
37706
37707fi
37708fi
37709ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37710if test -n "$ac_ct_OBJCOPY"; then
37711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37712$as_echo "$ac_ct_OBJCOPY" >&6; }
37713else
37714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37715$as_echo "no" >&6; }
37716fi
37717
37718
37719  test -n "$ac_ct_OBJCOPY" && break
37720done
37721
37722  if test "x$ac_ct_OBJCOPY" = x; then
37723    OBJCOPY=""
37724  else
37725    case $cross_compiling:$ac_tool_warned in
37726yes:)
37727{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37728$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37729ac_tool_warned=yes ;;
37730esac
37731    OBJCOPY=$ac_ct_OBJCOPY
37732  fi
37733fi
37734
37735  else
37736    # The variable is set, but is it from the command line or the environment?
37737
37738    # Try to remove the string !OBJCOPY! from our list.
37739    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37740    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37741      # If it failed, the variable was not from the command line. Ignore it,
37742      # but warn the user (except for BASH, which is always set by the calling BASH).
37743      if test "xOBJCOPY" != xBASH; then
37744        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37745$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37746      fi
37747      # Try to locate tool using the code snippet
37748      if test -n "$ac_tool_prefix"; then
37749  for ac_prog in gobjcopy objcopy
37750  do
37751    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37752set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37754$as_echo_n "checking for $ac_word... " >&6; }
37755if ${ac_cv_prog_OBJCOPY+:} false; then :
37756  $as_echo_n "(cached) " >&6
37757else
37758  if test -n "$OBJCOPY"; then
37759  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37760else
37761as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37762for as_dir in $PATH
37763do
37764  IFS=$as_save_IFS
37765  test -z "$as_dir" && as_dir=.
37766    for ac_exec_ext in '' $ac_executable_extensions; do
37767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37768    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37770    break 2
37771  fi
37772done
37773  done
37774IFS=$as_save_IFS
37775
37776fi
37777fi
37778OBJCOPY=$ac_cv_prog_OBJCOPY
37779if test -n "$OBJCOPY"; then
37780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37781$as_echo "$OBJCOPY" >&6; }
37782else
37783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37784$as_echo "no" >&6; }
37785fi
37786
37787
37788    test -n "$OBJCOPY" && break
37789  done
37790fi
37791if test -z "$OBJCOPY"; then
37792  ac_ct_OBJCOPY=$OBJCOPY
37793  for ac_prog in gobjcopy objcopy
37794do
37795  # Extract the first word of "$ac_prog", so it can be a program name with args.
37796set dummy $ac_prog; ac_word=$2
37797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37798$as_echo_n "checking for $ac_word... " >&6; }
37799if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37800  $as_echo_n "(cached) " >&6
37801else
37802  if test -n "$ac_ct_OBJCOPY"; then
37803  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37804else
37805as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37806for as_dir in $PATH
37807do
37808  IFS=$as_save_IFS
37809  test -z "$as_dir" && as_dir=.
37810    for ac_exec_ext in '' $ac_executable_extensions; do
37811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37812    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37814    break 2
37815  fi
37816done
37817  done
37818IFS=$as_save_IFS
37819
37820fi
37821fi
37822ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37823if test -n "$ac_ct_OBJCOPY"; then
37824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37825$as_echo "$ac_ct_OBJCOPY" >&6; }
37826else
37827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37828$as_echo "no" >&6; }
37829fi
37830
37831
37832  test -n "$ac_ct_OBJCOPY" && break
37833done
37834
37835  if test "x$ac_ct_OBJCOPY" = x; then
37836    OBJCOPY=""
37837  else
37838    case $cross_compiling:$ac_tool_warned in
37839yes:)
37840{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37841$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37842ac_tool_warned=yes ;;
37843esac
37844    OBJCOPY=$ac_ct_OBJCOPY
37845  fi
37846fi
37847
37848    else
37849      # If it succeeded, then it was overridden by the user. We will use it
37850      # for the tool.
37851
37852      # First remove it from the list of overridden variables, so we can test
37853      # for unknown variables in the end.
37854      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37855
37856      # Check if the provided tool contains a complete path.
37857      tool_specified="$OBJCOPY"
37858      tool_basename="${tool_specified##*/}"
37859      if test "x$tool_basename" = "x$tool_specified"; then
37860        # A command without a complete path is provided, search $PATH.
37861        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37862$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37863        # Extract the first word of "$tool_basename", so it can be a program name with args.
37864set dummy $tool_basename; ac_word=$2
37865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37866$as_echo_n "checking for $ac_word... " >&6; }
37867if ${ac_cv_path_OBJCOPY+:} false; then :
37868  $as_echo_n "(cached) " >&6
37869else
37870  case $OBJCOPY in
37871  [\\/]* | ?:[\\/]*)
37872  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37873  ;;
37874  *)
37875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37876for as_dir in $PATH
37877do
37878  IFS=$as_save_IFS
37879  test -z "$as_dir" && as_dir=.
37880    for ac_exec_ext in '' $ac_executable_extensions; do
37881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37882    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37884    break 2
37885  fi
37886done
37887  done
37888IFS=$as_save_IFS
37889
37890  ;;
37891esac
37892fi
37893OBJCOPY=$ac_cv_path_OBJCOPY
37894if test -n "$OBJCOPY"; then
37895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37896$as_echo "$OBJCOPY" >&6; }
37897else
37898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37899$as_echo "no" >&6; }
37900fi
37901
37902
37903        if test "x$OBJCOPY" = x; then
37904          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37905        fi
37906      else
37907        # Otherwise we believe it is a complete path. Use it as it is.
37908        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
37909$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
37910        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
37911$as_echo_n "checking for OBJCOPY... " >&6; }
37912        if test ! -x "$tool_specified"; then
37913          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37914$as_echo "not found" >&6; }
37915          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
37916        fi
37917        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37918$as_echo "$tool_specified" >&6; }
37919      fi
37920    fi
37921  fi
37922
37923
37924    # Only call fixup if objcopy was found.
37925    if test -n "$OBJCOPY"; then
37926
37927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37928
37929  # First separate the path from the arguments. This will split at the first
37930  # space.
37931  complete="$OBJCOPY"
37932  path="${complete%% *}"
37933  tmp="$complete EOL"
37934  arguments="${tmp#* }"
37935
37936  # Input might be given as Windows format, start by converting to
37937  # unix format.
37938  new_path=`$CYGPATH -u "$path"`
37939
37940  # Now try to locate executable using which
37941  new_path=`$WHICH "$new_path" 2> /dev/null`
37942  # bat and cmd files are not always considered executable in cygwin causing which
37943  # to not find them
37944  if test "x$new_path" = x \
37945      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37946      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37947    new_path=`$CYGPATH -u "$path"`
37948  fi
37949  if test "x$new_path" = x; then
37950    # Oops. Which didn't find the executable.
37951    # The splitting of arguments from the executable at a space might have been incorrect,
37952    # since paths with space are more likely in Windows. Give it another try with the whole
37953    # argument.
37954    path="$complete"
37955    arguments="EOL"
37956    new_path=`$CYGPATH -u "$path"`
37957    new_path=`$WHICH "$new_path" 2> /dev/null`
37958    # bat and cmd files are not always considered executable in cygwin causing which
37959    # to not find them
37960    if test "x$new_path" = x \
37961        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37962        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37963      new_path=`$CYGPATH -u "$path"`
37964    fi
37965    if test "x$new_path" = x; then
37966      # It's still not found. Now this is an unrecoverable error.
37967      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
37968$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
37969      has_space=`$ECHO "$complete" | $GREP " "`
37970      if test "x$has_space" != x; then
37971        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37972$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37973      fi
37974      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37975    fi
37976  fi
37977
37978  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37979  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37980  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37981  # "foo.exe" is OK but "foo" is an error.
37982  #
37983  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37984  # It is also a way to make sure we got the proper file name for the real test later on.
37985  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37986  if test "x$test_shortpath" = x; then
37987    # Short path failed, file does not exist as specified.
37988    # Try adding .exe or .cmd
37989    if test -f "${new_path}.exe"; then
37990      input_to_shortpath="${new_path}.exe"
37991    elif test -f "${new_path}.cmd"; then
37992      input_to_shortpath="${new_path}.cmd"
37993    else
37994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
37995$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
37996      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37997$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37998      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37999    fi
38000  else
38001    input_to_shortpath="$new_path"
38002  fi
38003
38004  # Call helper function which possibly converts this using DOS-style short mode.
38005  # If so, the updated path is stored in $new_path.
38006  new_path="$input_to_shortpath"
38007
38008  input_path="$input_to_shortpath"
38009  # Check if we need to convert this using DOS-style short mode. If the path
38010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38011  # take no chances and rewrite it.
38012  # Note: m4 eats our [], so we need to use [ and ] instead.
38013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38014  if test "x$has_forbidden_chars" != x; then
38015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38016    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38017    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38018    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38019      # Going to short mode and back again did indeed matter. Since short mode is
38020      # case insensitive, let's make it lowercase to improve readability.
38021      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38022      # Now convert it back to Unix-stile (cygpath)
38023      input_path=`$CYGPATH -u "$shortmode_path"`
38024      new_path="$input_path"
38025    fi
38026  fi
38027
38028  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38029  if test "x$test_cygdrive_prefix" = x; then
38030    # As a simple fix, exclude /usr/bin since it's not a real path.
38031    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38032      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38033      # a path prefixed by /cygdrive for fixpath to work.
38034      new_path="$CYGWIN_ROOT_PATH$input_path"
38035    fi
38036  fi
38037
38038  # remove trailing .exe if any
38039  new_path="${new_path/%.exe/}"
38040
38041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38042
38043  # First separate the path from the arguments. This will split at the first
38044  # space.
38045  complete="$OBJCOPY"
38046  path="${complete%% *}"
38047  tmp="$complete EOL"
38048  arguments="${tmp#* }"
38049
38050  # Input might be given as Windows format, start by converting to
38051  # unix format.
38052  new_path="$path"
38053
38054  windows_path="$new_path"
38055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38056    unix_path=`$CYGPATH -u "$windows_path"`
38057    new_path="$unix_path"
38058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38060    new_path="$unix_path"
38061  fi
38062
38063
38064  # Now try to locate executable using which
38065  new_path=`$WHICH "$new_path" 2> /dev/null`
38066
38067  if test "x$new_path" = x; then
38068    # Oops. Which didn't find the executable.
38069    # The splitting of arguments from the executable at a space might have been incorrect,
38070    # since paths with space are more likely in Windows. Give it another try with the whole
38071    # argument.
38072    path="$complete"
38073    arguments="EOL"
38074    new_path="$path"
38075
38076  windows_path="$new_path"
38077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38078    unix_path=`$CYGPATH -u "$windows_path"`
38079    new_path="$unix_path"
38080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38082    new_path="$unix_path"
38083  fi
38084
38085
38086    new_path=`$WHICH "$new_path" 2> /dev/null`
38087
38088    if test "x$new_path" = x; then
38089      # It's still not found. Now this is an unrecoverable error.
38090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38091$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38092      has_space=`$ECHO "$complete" | $GREP " "`
38093      if test "x$has_space" != x; then
38094        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38095$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38096      fi
38097      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38098    fi
38099  fi
38100
38101  # Now new_path has a complete unix path to the binary
38102  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38103    # Keep paths in /bin as-is, but remove trailing .exe if any
38104    new_path="${new_path/%.exe/}"
38105    # Do not save /bin paths to all_fixpath_prefixes!
38106  else
38107    # Not in mixed or Windows style, start by that.
38108    new_path=`cmd //c echo $new_path`
38109
38110  input_path="$new_path"
38111  # Check if we need to convert this using DOS-style short mode. If the path
38112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38113  # take no chances and rewrite it.
38114  # Note: m4 eats our [], so we need to use [ and ] instead.
38115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38116  if test "x$has_forbidden_chars" != x; then
38117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38118    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38119  fi
38120
38121    # Output is in $new_path
38122
38123  windows_path="$new_path"
38124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38125    unix_path=`$CYGPATH -u "$windows_path"`
38126    new_path="$unix_path"
38127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38129    new_path="$unix_path"
38130  fi
38131
38132    # remove trailing .exe if any
38133    new_path="${new_path/%.exe/}"
38134
38135    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38136    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38137  fi
38138
38139  else
38140    # We're on a posix platform. Hooray! :)
38141    # First separate the path from the arguments. This will split at the first
38142    # space.
38143    complete="$OBJCOPY"
38144    path="${complete%% *}"
38145    tmp="$complete EOL"
38146    arguments="${tmp#* }"
38147
38148    # Cannot rely on the command "which" here since it doesn't always work.
38149    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38150    if test -z "$is_absolute_path"; then
38151      # Path to executable is not absolute. Find it.
38152      IFS_save="$IFS"
38153      IFS=:
38154      for p in $PATH; do
38155        if test -f "$p/$path" && test -x "$p/$path"; then
38156          new_path="$p/$path"
38157          break
38158        fi
38159      done
38160      IFS="$IFS_save"
38161    else
38162      # This is an absolute path, we can use it without further modifications.
38163      new_path="$path"
38164    fi
38165
38166    if test "x$new_path" = x; then
38167      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38168$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38169      has_space=`$ECHO "$complete" | $GREP " "`
38170      if test "x$has_space" != x; then
38171        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38172$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38173      fi
38174      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38175    fi
38176  fi
38177
38178  # Now join together the path and the arguments once again
38179  if test "x$arguments" != xEOL; then
38180    new_complete="$new_path ${arguments% *}"
38181  else
38182    new_complete="$new_path"
38183  fi
38184
38185  if test "x$complete" != "x$new_complete"; then
38186    OBJCOPY="$new_complete"
38187    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38188$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38189  fi
38190
38191    fi
38192  fi
38193
38194
38195
38196  # Publish this variable in the help.
38197
38198
38199  if test "x$OBJDUMP" = x; then
38200    # The variable is not set by user, try to locate tool using the code snippet
38201    if test -n "$ac_tool_prefix"; then
38202  for ac_prog in gobjdump objdump
38203  do
38204    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38205set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38207$as_echo_n "checking for $ac_word... " >&6; }
38208if ${ac_cv_prog_OBJDUMP+:} false; then :
38209  $as_echo_n "(cached) " >&6
38210else
38211  if test -n "$OBJDUMP"; then
38212  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38213else
38214as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38215for as_dir in $PATH
38216do
38217  IFS=$as_save_IFS
38218  test -z "$as_dir" && as_dir=.
38219    for ac_exec_ext in '' $ac_executable_extensions; do
38220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38221    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38223    break 2
38224  fi
38225done
38226  done
38227IFS=$as_save_IFS
38228
38229fi
38230fi
38231OBJDUMP=$ac_cv_prog_OBJDUMP
38232if test -n "$OBJDUMP"; then
38233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38234$as_echo "$OBJDUMP" >&6; }
38235else
38236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38237$as_echo "no" >&6; }
38238fi
38239
38240
38241    test -n "$OBJDUMP" && break
38242  done
38243fi
38244if test -z "$OBJDUMP"; then
38245  ac_ct_OBJDUMP=$OBJDUMP
38246  for ac_prog in gobjdump objdump
38247do
38248  # Extract the first word of "$ac_prog", so it can be a program name with args.
38249set dummy $ac_prog; ac_word=$2
38250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38251$as_echo_n "checking for $ac_word... " >&6; }
38252if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38253  $as_echo_n "(cached) " >&6
38254else
38255  if test -n "$ac_ct_OBJDUMP"; then
38256  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38257else
38258as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38259for as_dir in $PATH
38260do
38261  IFS=$as_save_IFS
38262  test -z "$as_dir" && as_dir=.
38263    for ac_exec_ext in '' $ac_executable_extensions; do
38264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38265    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38267    break 2
38268  fi
38269done
38270  done
38271IFS=$as_save_IFS
38272
38273fi
38274fi
38275ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38276if test -n "$ac_ct_OBJDUMP"; then
38277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38278$as_echo "$ac_ct_OBJDUMP" >&6; }
38279else
38280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38281$as_echo "no" >&6; }
38282fi
38283
38284
38285  test -n "$ac_ct_OBJDUMP" && break
38286done
38287
38288  if test "x$ac_ct_OBJDUMP" = x; then
38289    OBJDUMP=""
38290  else
38291    case $cross_compiling:$ac_tool_warned in
38292yes:)
38293{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38294$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38295ac_tool_warned=yes ;;
38296esac
38297    OBJDUMP=$ac_ct_OBJDUMP
38298  fi
38299fi
38300
38301  else
38302    # The variable is set, but is it from the command line or the environment?
38303
38304    # Try to remove the string !OBJDUMP! from our list.
38305    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38306    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38307      # If it failed, the variable was not from the command line. Ignore it,
38308      # but warn the user (except for BASH, which is always set by the calling BASH).
38309      if test "xOBJDUMP" != xBASH; then
38310        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38311$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38312      fi
38313      # Try to locate tool using the code snippet
38314      if test -n "$ac_tool_prefix"; then
38315  for ac_prog in gobjdump objdump
38316  do
38317    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38318set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38320$as_echo_n "checking for $ac_word... " >&6; }
38321if ${ac_cv_prog_OBJDUMP+:} false; then :
38322  $as_echo_n "(cached) " >&6
38323else
38324  if test -n "$OBJDUMP"; then
38325  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38326else
38327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38328for as_dir in $PATH
38329do
38330  IFS=$as_save_IFS
38331  test -z "$as_dir" && as_dir=.
38332    for ac_exec_ext in '' $ac_executable_extensions; do
38333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38334    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38336    break 2
38337  fi
38338done
38339  done
38340IFS=$as_save_IFS
38341
38342fi
38343fi
38344OBJDUMP=$ac_cv_prog_OBJDUMP
38345if test -n "$OBJDUMP"; then
38346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38347$as_echo "$OBJDUMP" >&6; }
38348else
38349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38350$as_echo "no" >&6; }
38351fi
38352
38353
38354    test -n "$OBJDUMP" && break
38355  done
38356fi
38357if test -z "$OBJDUMP"; then
38358  ac_ct_OBJDUMP=$OBJDUMP
38359  for ac_prog in gobjdump objdump
38360do
38361  # Extract the first word of "$ac_prog", so it can be a program name with args.
38362set dummy $ac_prog; ac_word=$2
38363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38364$as_echo_n "checking for $ac_word... " >&6; }
38365if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38366  $as_echo_n "(cached) " >&6
38367else
38368  if test -n "$ac_ct_OBJDUMP"; then
38369  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38370else
38371as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38372for as_dir in $PATH
38373do
38374  IFS=$as_save_IFS
38375  test -z "$as_dir" && as_dir=.
38376    for ac_exec_ext in '' $ac_executable_extensions; do
38377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38378    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38380    break 2
38381  fi
38382done
38383  done
38384IFS=$as_save_IFS
38385
38386fi
38387fi
38388ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38389if test -n "$ac_ct_OBJDUMP"; then
38390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38391$as_echo "$ac_ct_OBJDUMP" >&6; }
38392else
38393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38394$as_echo "no" >&6; }
38395fi
38396
38397
38398  test -n "$ac_ct_OBJDUMP" && break
38399done
38400
38401  if test "x$ac_ct_OBJDUMP" = x; then
38402    OBJDUMP=""
38403  else
38404    case $cross_compiling:$ac_tool_warned in
38405yes:)
38406{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38407$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38408ac_tool_warned=yes ;;
38409esac
38410    OBJDUMP=$ac_ct_OBJDUMP
38411  fi
38412fi
38413
38414    else
38415      # If it succeeded, then it was overridden by the user. We will use it
38416      # for the tool.
38417
38418      # First remove it from the list of overridden variables, so we can test
38419      # for unknown variables in the end.
38420      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38421
38422      # Check if the provided tool contains a complete path.
38423      tool_specified="$OBJDUMP"
38424      tool_basename="${tool_specified##*/}"
38425      if test "x$tool_basename" = "x$tool_specified"; then
38426        # A command without a complete path is provided, search $PATH.
38427        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38428$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38429        # Extract the first word of "$tool_basename", so it can be a program name with args.
38430set dummy $tool_basename; ac_word=$2
38431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38432$as_echo_n "checking for $ac_word... " >&6; }
38433if ${ac_cv_path_OBJDUMP+:} false; then :
38434  $as_echo_n "(cached) " >&6
38435else
38436  case $OBJDUMP in
38437  [\\/]* | ?:[\\/]*)
38438  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38439  ;;
38440  *)
38441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38442for as_dir in $PATH
38443do
38444  IFS=$as_save_IFS
38445  test -z "$as_dir" && as_dir=.
38446    for ac_exec_ext in '' $ac_executable_extensions; do
38447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38448    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38450    break 2
38451  fi
38452done
38453  done
38454IFS=$as_save_IFS
38455
38456  ;;
38457esac
38458fi
38459OBJDUMP=$ac_cv_path_OBJDUMP
38460if test -n "$OBJDUMP"; then
38461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38462$as_echo "$OBJDUMP" >&6; }
38463else
38464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38465$as_echo "no" >&6; }
38466fi
38467
38468
38469        if test "x$OBJDUMP" = x; then
38470          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38471        fi
38472      else
38473        # Otherwise we believe it is a complete path. Use it as it is.
38474        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38475$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38476        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38477$as_echo_n "checking for OBJDUMP... " >&6; }
38478        if test ! -x "$tool_specified"; then
38479          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38480$as_echo "not found" >&6; }
38481          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38482        fi
38483        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38484$as_echo "$tool_specified" >&6; }
38485      fi
38486    fi
38487  fi
38488
38489
38490  if test "x$OBJDUMP" != x; then
38491    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38492    # bails if argument is missing.
38493
38494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38495
38496  # First separate the path from the arguments. This will split at the first
38497  # space.
38498  complete="$OBJDUMP"
38499  path="${complete%% *}"
38500  tmp="$complete EOL"
38501  arguments="${tmp#* }"
38502
38503  # Input might be given as Windows format, start by converting to
38504  # unix format.
38505  new_path=`$CYGPATH -u "$path"`
38506
38507  # Now try to locate executable using which
38508  new_path=`$WHICH "$new_path" 2> /dev/null`
38509  # bat and cmd files are not always considered executable in cygwin causing which
38510  # to not find them
38511  if test "x$new_path" = x \
38512      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38513      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38514    new_path=`$CYGPATH -u "$path"`
38515  fi
38516  if test "x$new_path" = x; then
38517    # Oops. Which didn't find the executable.
38518    # The splitting of arguments from the executable at a space might have been incorrect,
38519    # since paths with space are more likely in Windows. Give it another try with the whole
38520    # argument.
38521    path="$complete"
38522    arguments="EOL"
38523    new_path=`$CYGPATH -u "$path"`
38524    new_path=`$WHICH "$new_path" 2> /dev/null`
38525    # bat and cmd files are not always considered executable in cygwin causing which
38526    # to not find them
38527    if test "x$new_path" = x \
38528        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38529        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38530      new_path=`$CYGPATH -u "$path"`
38531    fi
38532    if test "x$new_path" = x; then
38533      # It's still not found. Now this is an unrecoverable error.
38534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38535$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38536      has_space=`$ECHO "$complete" | $GREP " "`
38537      if test "x$has_space" != x; then
38538        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38539$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38540      fi
38541      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38542    fi
38543  fi
38544
38545  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38546  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38547  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38548  # "foo.exe" is OK but "foo" is an error.
38549  #
38550  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38551  # It is also a way to make sure we got the proper file name for the real test later on.
38552  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38553  if test "x$test_shortpath" = x; then
38554    # Short path failed, file does not exist as specified.
38555    # Try adding .exe or .cmd
38556    if test -f "${new_path}.exe"; then
38557      input_to_shortpath="${new_path}.exe"
38558    elif test -f "${new_path}.cmd"; then
38559      input_to_shortpath="${new_path}.cmd"
38560    else
38561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38562$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38563      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38564$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38565      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38566    fi
38567  else
38568    input_to_shortpath="$new_path"
38569  fi
38570
38571  # Call helper function which possibly converts this using DOS-style short mode.
38572  # If so, the updated path is stored in $new_path.
38573  new_path="$input_to_shortpath"
38574
38575  input_path="$input_to_shortpath"
38576  # Check if we need to convert this using DOS-style short mode. If the path
38577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38578  # take no chances and rewrite it.
38579  # Note: m4 eats our [], so we need to use [ and ] instead.
38580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38581  if test "x$has_forbidden_chars" != x; then
38582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38586      # Going to short mode and back again did indeed matter. Since short mode is
38587      # case insensitive, let's make it lowercase to improve readability.
38588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38589      # Now convert it back to Unix-stile (cygpath)
38590      input_path=`$CYGPATH -u "$shortmode_path"`
38591      new_path="$input_path"
38592    fi
38593  fi
38594
38595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38596  if test "x$test_cygdrive_prefix" = x; then
38597    # As a simple fix, exclude /usr/bin since it's not a real path.
38598    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38600      # a path prefixed by /cygdrive for fixpath to work.
38601      new_path="$CYGWIN_ROOT_PATH$input_path"
38602    fi
38603  fi
38604
38605  # remove trailing .exe if any
38606  new_path="${new_path/%.exe/}"
38607
38608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38609
38610  # First separate the path from the arguments. This will split at the first
38611  # space.
38612  complete="$OBJDUMP"
38613  path="${complete%% *}"
38614  tmp="$complete EOL"
38615  arguments="${tmp#* }"
38616
38617  # Input might be given as Windows format, start by converting to
38618  # unix format.
38619  new_path="$path"
38620
38621  windows_path="$new_path"
38622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38623    unix_path=`$CYGPATH -u "$windows_path"`
38624    new_path="$unix_path"
38625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38627    new_path="$unix_path"
38628  fi
38629
38630
38631  # Now try to locate executable using which
38632  new_path=`$WHICH "$new_path" 2> /dev/null`
38633
38634  if test "x$new_path" = x; then
38635    # Oops. Which didn't find the executable.
38636    # The splitting of arguments from the executable at a space might have been incorrect,
38637    # since paths with space are more likely in Windows. Give it another try with the whole
38638    # argument.
38639    path="$complete"
38640    arguments="EOL"
38641    new_path="$path"
38642
38643  windows_path="$new_path"
38644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38645    unix_path=`$CYGPATH -u "$windows_path"`
38646    new_path="$unix_path"
38647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38649    new_path="$unix_path"
38650  fi
38651
38652
38653    new_path=`$WHICH "$new_path" 2> /dev/null`
38654
38655    if test "x$new_path" = x; then
38656      # It's still not found. Now this is an unrecoverable error.
38657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38658$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38659      has_space=`$ECHO "$complete" | $GREP " "`
38660      if test "x$has_space" != x; then
38661        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38662$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38663      fi
38664      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38665    fi
38666  fi
38667
38668  # Now new_path has a complete unix path to the binary
38669  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38670    # Keep paths in /bin as-is, but remove trailing .exe if any
38671    new_path="${new_path/%.exe/}"
38672    # Do not save /bin paths to all_fixpath_prefixes!
38673  else
38674    # Not in mixed or Windows style, start by that.
38675    new_path=`cmd //c echo $new_path`
38676
38677  input_path="$new_path"
38678  # Check if we need to convert this using DOS-style short mode. If the path
38679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38680  # take no chances and rewrite it.
38681  # Note: m4 eats our [], so we need to use [ and ] instead.
38682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38683  if test "x$has_forbidden_chars" != x; then
38684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38686  fi
38687
38688    # Output is in $new_path
38689
38690  windows_path="$new_path"
38691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38692    unix_path=`$CYGPATH -u "$windows_path"`
38693    new_path="$unix_path"
38694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38696    new_path="$unix_path"
38697  fi
38698
38699    # remove trailing .exe if any
38700    new_path="${new_path/%.exe/}"
38701
38702    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38703    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38704  fi
38705
38706  else
38707    # We're on a posix platform. Hooray! :)
38708    # First separate the path from the arguments. This will split at the first
38709    # space.
38710    complete="$OBJDUMP"
38711    path="${complete%% *}"
38712    tmp="$complete EOL"
38713    arguments="${tmp#* }"
38714
38715    # Cannot rely on the command "which" here since it doesn't always work.
38716    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38717    if test -z "$is_absolute_path"; then
38718      # Path to executable is not absolute. Find it.
38719      IFS_save="$IFS"
38720      IFS=:
38721      for p in $PATH; do
38722        if test -f "$p/$path" && test -x "$p/$path"; then
38723          new_path="$p/$path"
38724          break
38725        fi
38726      done
38727      IFS="$IFS_save"
38728    else
38729      # This is an absolute path, we can use it without further modifications.
38730      new_path="$path"
38731    fi
38732
38733    if test "x$new_path" = x; then
38734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38735$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38736      has_space=`$ECHO "$complete" | $GREP " "`
38737      if test "x$has_space" != x; then
38738        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38739$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38740      fi
38741      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38742    fi
38743  fi
38744
38745  # Now join together the path and the arguments once again
38746  if test "x$arguments" != xEOL; then
38747    new_complete="$new_path ${arguments% *}"
38748  else
38749    new_complete="$new_path"
38750  fi
38751
38752  if test "x$complete" != "x$new_complete"; then
38753    OBJDUMP="$new_complete"
38754    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38755$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38756  fi
38757
38758  fi
38759
38760
38761  # Restore old path.
38762  PATH="$OLD_PATH"
38763
38764  # Restore the flags to the user specified values.
38765  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38766  CFLAGS="$ORG_CFLAGS"
38767  CXXFLAGS="$ORG_CXXFLAGS"
38768  OBJCFLAGS="$ORG_OBJCFLAGS"
38769
38770
38771# Finally do some processing after the detection phase
38772
38773  if test "x$COMPILE_TYPE" = "xcross"; then
38774    # Now we need to find a C/C++ compiler that can build executables for the
38775    # build platform. We can't use the AC_PROG_CC macro, since it can only be
38776    # used once. Also, we need to do this without adding a tools dir to the
38777    # path, otherwise we might pick up cross-compilers which don't use standard
38778    # naming.
38779
38780    # FIXME: we should list the discovered compilers as an exclude pattern!
38781    # If we do that, we can do this detection before POST_DETECTION, and still
38782    # find the build compilers in the tools dir, if needed.
38783
38784
38785  # Publish this variable in the help.
38786
38787
38788  if test "x$BUILD_CC" = x; then
38789    # The variable is not set by user, try to locate tool using the code snippet
38790    for ac_prog in cl cc gcc
38791do
38792  # Extract the first word of "$ac_prog", so it can be a program name with args.
38793set dummy $ac_prog; ac_word=$2
38794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38795$as_echo_n "checking for $ac_word... " >&6; }
38796if ${ac_cv_path_BUILD_CC+:} false; then :
38797  $as_echo_n "(cached) " >&6
38798else
38799  case $BUILD_CC in
38800  [\\/]* | ?:[\\/]*)
38801  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38802  ;;
38803  *)
38804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38805for as_dir in $PATH
38806do
38807  IFS=$as_save_IFS
38808  test -z "$as_dir" && as_dir=.
38809    for ac_exec_ext in '' $ac_executable_extensions; do
38810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38811    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38813    break 2
38814  fi
38815done
38816  done
38817IFS=$as_save_IFS
38818
38819  ;;
38820esac
38821fi
38822BUILD_CC=$ac_cv_path_BUILD_CC
38823if test -n "$BUILD_CC"; then
38824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38825$as_echo "$BUILD_CC" >&6; }
38826else
38827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38828$as_echo "no" >&6; }
38829fi
38830
38831
38832  test -n "$BUILD_CC" && break
38833done
38834
38835  else
38836    # The variable is set, but is it from the command line or the environment?
38837
38838    # Try to remove the string !BUILD_CC! from our list.
38839    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38840    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38841      # If it failed, the variable was not from the command line. Ignore it,
38842      # but warn the user (except for BASH, which is always set by the calling BASH).
38843      if test "xBUILD_CC" != xBASH; then
38844        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38845$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38846      fi
38847      # Try to locate tool using the code snippet
38848      for ac_prog in cl cc gcc
38849do
38850  # Extract the first word of "$ac_prog", so it can be a program name with args.
38851set dummy $ac_prog; ac_word=$2
38852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38853$as_echo_n "checking for $ac_word... " >&6; }
38854if ${ac_cv_path_BUILD_CC+:} false; then :
38855  $as_echo_n "(cached) " >&6
38856else
38857  case $BUILD_CC in
38858  [\\/]* | ?:[\\/]*)
38859  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38860  ;;
38861  *)
38862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38863for as_dir in $PATH
38864do
38865  IFS=$as_save_IFS
38866  test -z "$as_dir" && as_dir=.
38867    for ac_exec_ext in '' $ac_executable_extensions; do
38868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38869    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38871    break 2
38872  fi
38873done
38874  done
38875IFS=$as_save_IFS
38876
38877  ;;
38878esac
38879fi
38880BUILD_CC=$ac_cv_path_BUILD_CC
38881if test -n "$BUILD_CC"; then
38882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38883$as_echo "$BUILD_CC" >&6; }
38884else
38885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38886$as_echo "no" >&6; }
38887fi
38888
38889
38890  test -n "$BUILD_CC" && break
38891done
38892
38893    else
38894      # If it succeeded, then it was overridden by the user. We will use it
38895      # for the tool.
38896
38897      # First remove it from the list of overridden variables, so we can test
38898      # for unknown variables in the end.
38899      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38900
38901      # Check if the provided tool contains a complete path.
38902      tool_specified="$BUILD_CC"
38903      tool_basename="${tool_specified##*/}"
38904      if test "x$tool_basename" = "x$tool_specified"; then
38905        # A command without a complete path is provided, search $PATH.
38906        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
38907$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
38908        # Extract the first word of "$tool_basename", so it can be a program name with args.
38909set dummy $tool_basename; ac_word=$2
38910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38911$as_echo_n "checking for $ac_word... " >&6; }
38912if ${ac_cv_path_BUILD_CC+:} false; then :
38913  $as_echo_n "(cached) " >&6
38914else
38915  case $BUILD_CC in
38916  [\\/]* | ?:[\\/]*)
38917  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38918  ;;
38919  *)
38920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38921for as_dir in $PATH
38922do
38923  IFS=$as_save_IFS
38924  test -z "$as_dir" && as_dir=.
38925    for ac_exec_ext in '' $ac_executable_extensions; do
38926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38927    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38929    break 2
38930  fi
38931done
38932  done
38933IFS=$as_save_IFS
38934
38935  ;;
38936esac
38937fi
38938BUILD_CC=$ac_cv_path_BUILD_CC
38939if test -n "$BUILD_CC"; then
38940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38941$as_echo "$BUILD_CC" >&6; }
38942else
38943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38944$as_echo "no" >&6; }
38945fi
38946
38947
38948        if test "x$BUILD_CC" = x; then
38949          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38950        fi
38951      else
38952        # Otherwise we believe it is a complete path. Use it as it is.
38953        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
38954$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
38955        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
38956$as_echo_n "checking for BUILD_CC... " >&6; }
38957        if test ! -x "$tool_specified"; then
38958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38959$as_echo "not found" >&6; }
38960          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
38961        fi
38962        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38963$as_echo "$tool_specified" >&6; }
38964      fi
38965    fi
38966  fi
38967
38968
38969
38970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38971
38972  # First separate the path from the arguments. This will split at the first
38973  # space.
38974  complete="$BUILD_CC"
38975  path="${complete%% *}"
38976  tmp="$complete EOL"
38977  arguments="${tmp#* }"
38978
38979  # Input might be given as Windows format, start by converting to
38980  # unix format.
38981  new_path=`$CYGPATH -u "$path"`
38982
38983  # Now try to locate executable using which
38984  new_path=`$WHICH "$new_path" 2> /dev/null`
38985  # bat and cmd files are not always considered executable in cygwin causing which
38986  # to not find them
38987  if test "x$new_path" = x \
38988      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38989      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38990    new_path=`$CYGPATH -u "$path"`
38991  fi
38992  if test "x$new_path" = x; then
38993    # Oops. Which didn't find the executable.
38994    # The splitting of arguments from the executable at a space might have been incorrect,
38995    # since paths with space are more likely in Windows. Give it another try with the whole
38996    # argument.
38997    path="$complete"
38998    arguments="EOL"
38999    new_path=`$CYGPATH -u "$path"`
39000    new_path=`$WHICH "$new_path" 2> /dev/null`
39001    # bat and cmd files are not always considered executable in cygwin causing which
39002    # to not find them
39003    if test "x$new_path" = x \
39004        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39005        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39006      new_path=`$CYGPATH -u "$path"`
39007    fi
39008    if test "x$new_path" = x; then
39009      # It's still not found. Now this is an unrecoverable error.
39010      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39011$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39012      has_space=`$ECHO "$complete" | $GREP " "`
39013      if test "x$has_space" != x; then
39014        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39015$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39016      fi
39017      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39018    fi
39019  fi
39020
39021  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39022  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39023  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39024  # "foo.exe" is OK but "foo" is an error.
39025  #
39026  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39027  # It is also a way to make sure we got the proper file name for the real test later on.
39028  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39029  if test "x$test_shortpath" = x; then
39030    # Short path failed, file does not exist as specified.
39031    # Try adding .exe or .cmd
39032    if test -f "${new_path}.exe"; then
39033      input_to_shortpath="${new_path}.exe"
39034    elif test -f "${new_path}.cmd"; then
39035      input_to_shortpath="${new_path}.cmd"
39036    else
39037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39038$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39039      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39040$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39041      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39042    fi
39043  else
39044    input_to_shortpath="$new_path"
39045  fi
39046
39047  # Call helper function which possibly converts this using DOS-style short mode.
39048  # If so, the updated path is stored in $new_path.
39049  new_path="$input_to_shortpath"
39050
39051  input_path="$input_to_shortpath"
39052  # Check if we need to convert this using DOS-style short mode. If the path
39053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39054  # take no chances and rewrite it.
39055  # Note: m4 eats our [], so we need to use [ and ] instead.
39056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39057  if test "x$has_forbidden_chars" != x; then
39058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39059    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39060    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39061    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39062      # Going to short mode and back again did indeed matter. Since short mode is
39063      # case insensitive, let's make it lowercase to improve readability.
39064      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39065      # Now convert it back to Unix-stile (cygpath)
39066      input_path=`$CYGPATH -u "$shortmode_path"`
39067      new_path="$input_path"
39068    fi
39069  fi
39070
39071  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39072  if test "x$test_cygdrive_prefix" = x; then
39073    # As a simple fix, exclude /usr/bin since it's not a real path.
39074    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39075      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39076      # a path prefixed by /cygdrive for fixpath to work.
39077      new_path="$CYGWIN_ROOT_PATH$input_path"
39078    fi
39079  fi
39080
39081  # remove trailing .exe if any
39082  new_path="${new_path/%.exe/}"
39083
39084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39085
39086  # First separate the path from the arguments. This will split at the first
39087  # space.
39088  complete="$BUILD_CC"
39089  path="${complete%% *}"
39090  tmp="$complete EOL"
39091  arguments="${tmp#* }"
39092
39093  # Input might be given as Windows format, start by converting to
39094  # unix format.
39095  new_path="$path"
39096
39097  windows_path="$new_path"
39098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39099    unix_path=`$CYGPATH -u "$windows_path"`
39100    new_path="$unix_path"
39101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39103    new_path="$unix_path"
39104  fi
39105
39106
39107  # Now try to locate executable using which
39108  new_path=`$WHICH "$new_path" 2> /dev/null`
39109
39110  if test "x$new_path" = x; then
39111    # Oops. Which didn't find the executable.
39112    # The splitting of arguments from the executable at a space might have been incorrect,
39113    # since paths with space are more likely in Windows. Give it another try with the whole
39114    # argument.
39115    path="$complete"
39116    arguments="EOL"
39117    new_path="$path"
39118
39119  windows_path="$new_path"
39120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39121    unix_path=`$CYGPATH -u "$windows_path"`
39122    new_path="$unix_path"
39123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39125    new_path="$unix_path"
39126  fi
39127
39128
39129    new_path=`$WHICH "$new_path" 2> /dev/null`
39130
39131    if test "x$new_path" = x; then
39132      # It's still not found. Now this is an unrecoverable error.
39133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39134$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39135      has_space=`$ECHO "$complete" | $GREP " "`
39136      if test "x$has_space" != x; then
39137        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39138$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39139      fi
39140      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39141    fi
39142  fi
39143
39144  # Now new_path has a complete unix path to the binary
39145  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39146    # Keep paths in /bin as-is, but remove trailing .exe if any
39147    new_path="${new_path/%.exe/}"
39148    # Do not save /bin paths to all_fixpath_prefixes!
39149  else
39150    # Not in mixed or Windows style, start by that.
39151    new_path=`cmd //c echo $new_path`
39152
39153  input_path="$new_path"
39154  # Check if we need to convert this using DOS-style short mode. If the path
39155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39156  # take no chances and rewrite it.
39157  # Note: m4 eats our [], so we need to use [ and ] instead.
39158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39159  if test "x$has_forbidden_chars" != x; then
39160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39161    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39162  fi
39163
39164    # Output is in $new_path
39165
39166  windows_path="$new_path"
39167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39168    unix_path=`$CYGPATH -u "$windows_path"`
39169    new_path="$unix_path"
39170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39172    new_path="$unix_path"
39173  fi
39174
39175    # remove trailing .exe if any
39176    new_path="${new_path/%.exe/}"
39177
39178    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39179    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39180  fi
39181
39182  else
39183    # We're on a posix platform. Hooray! :)
39184    # First separate the path from the arguments. This will split at the first
39185    # space.
39186    complete="$BUILD_CC"
39187    path="${complete%% *}"
39188    tmp="$complete EOL"
39189    arguments="${tmp#* }"
39190
39191    # Cannot rely on the command "which" here since it doesn't always work.
39192    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39193    if test -z "$is_absolute_path"; then
39194      # Path to executable is not absolute. Find it.
39195      IFS_save="$IFS"
39196      IFS=:
39197      for p in $PATH; do
39198        if test -f "$p/$path" && test -x "$p/$path"; then
39199          new_path="$p/$path"
39200          break
39201        fi
39202      done
39203      IFS="$IFS_save"
39204    else
39205      # This is an absolute path, we can use it without further modifications.
39206      new_path="$path"
39207    fi
39208
39209    if test "x$new_path" = x; then
39210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39211$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39212      has_space=`$ECHO "$complete" | $GREP " "`
39213      if test "x$has_space" != x; then
39214        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39215$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39216      fi
39217      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39218    fi
39219  fi
39220
39221  # Now join together the path and the arguments once again
39222  if test "x$arguments" != xEOL; then
39223    new_complete="$new_path ${arguments% *}"
39224  else
39225    new_complete="$new_path"
39226  fi
39227
39228  if test "x$complete" != "x$new_complete"; then
39229    BUILD_CC="$new_complete"
39230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39231$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39232  fi
39233
39234
39235
39236  # Publish this variable in the help.
39237
39238
39239  if test "x$BUILD_CXX" = x; then
39240    # The variable is not set by user, try to locate tool using the code snippet
39241    for ac_prog in cl CC g++
39242do
39243  # Extract the first word of "$ac_prog", so it can be a program name with args.
39244set dummy $ac_prog; ac_word=$2
39245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39246$as_echo_n "checking for $ac_word... " >&6; }
39247if ${ac_cv_path_BUILD_CXX+:} false; then :
39248  $as_echo_n "(cached) " >&6
39249else
39250  case $BUILD_CXX in
39251  [\\/]* | ?:[\\/]*)
39252  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39253  ;;
39254  *)
39255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39256for as_dir in $PATH
39257do
39258  IFS=$as_save_IFS
39259  test -z "$as_dir" && as_dir=.
39260    for ac_exec_ext in '' $ac_executable_extensions; do
39261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39262    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39264    break 2
39265  fi
39266done
39267  done
39268IFS=$as_save_IFS
39269
39270  ;;
39271esac
39272fi
39273BUILD_CXX=$ac_cv_path_BUILD_CXX
39274if test -n "$BUILD_CXX"; then
39275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39276$as_echo "$BUILD_CXX" >&6; }
39277else
39278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39279$as_echo "no" >&6; }
39280fi
39281
39282
39283  test -n "$BUILD_CXX" && break
39284done
39285
39286  else
39287    # The variable is set, but is it from the command line or the environment?
39288
39289    # Try to remove the string !BUILD_CXX! from our list.
39290    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39291    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39292      # If it failed, the variable was not from the command line. Ignore it,
39293      # but warn the user (except for BASH, which is always set by the calling BASH).
39294      if test "xBUILD_CXX" != xBASH; then
39295        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39296$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39297      fi
39298      # Try to locate tool using the code snippet
39299      for ac_prog in cl CC g++
39300do
39301  # Extract the first word of "$ac_prog", so it can be a program name with args.
39302set dummy $ac_prog; ac_word=$2
39303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39304$as_echo_n "checking for $ac_word... " >&6; }
39305if ${ac_cv_path_BUILD_CXX+:} false; then :
39306  $as_echo_n "(cached) " >&6
39307else
39308  case $BUILD_CXX in
39309  [\\/]* | ?:[\\/]*)
39310  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39311  ;;
39312  *)
39313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39314for as_dir in $PATH
39315do
39316  IFS=$as_save_IFS
39317  test -z "$as_dir" && as_dir=.
39318    for ac_exec_ext in '' $ac_executable_extensions; do
39319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39320    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39322    break 2
39323  fi
39324done
39325  done
39326IFS=$as_save_IFS
39327
39328  ;;
39329esac
39330fi
39331BUILD_CXX=$ac_cv_path_BUILD_CXX
39332if test -n "$BUILD_CXX"; then
39333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39334$as_echo "$BUILD_CXX" >&6; }
39335else
39336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39337$as_echo "no" >&6; }
39338fi
39339
39340
39341  test -n "$BUILD_CXX" && break
39342done
39343
39344    else
39345      # If it succeeded, then it was overridden by the user. We will use it
39346      # for the tool.
39347
39348      # First remove it from the list of overridden variables, so we can test
39349      # for unknown variables in the end.
39350      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39351
39352      # Check if the provided tool contains a complete path.
39353      tool_specified="$BUILD_CXX"
39354      tool_basename="${tool_specified##*/}"
39355      if test "x$tool_basename" = "x$tool_specified"; then
39356        # A command without a complete path is provided, search $PATH.
39357        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39358$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39359        # Extract the first word of "$tool_basename", so it can be a program name with args.
39360set dummy $tool_basename; ac_word=$2
39361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39362$as_echo_n "checking for $ac_word... " >&6; }
39363if ${ac_cv_path_BUILD_CXX+:} false; then :
39364  $as_echo_n "(cached) " >&6
39365else
39366  case $BUILD_CXX in
39367  [\\/]* | ?:[\\/]*)
39368  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39369  ;;
39370  *)
39371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39372for as_dir in $PATH
39373do
39374  IFS=$as_save_IFS
39375  test -z "$as_dir" && as_dir=.
39376    for ac_exec_ext in '' $ac_executable_extensions; do
39377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39378    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39380    break 2
39381  fi
39382done
39383  done
39384IFS=$as_save_IFS
39385
39386  ;;
39387esac
39388fi
39389BUILD_CXX=$ac_cv_path_BUILD_CXX
39390if test -n "$BUILD_CXX"; then
39391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39392$as_echo "$BUILD_CXX" >&6; }
39393else
39394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39395$as_echo "no" >&6; }
39396fi
39397
39398
39399        if test "x$BUILD_CXX" = x; then
39400          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39401        fi
39402      else
39403        # Otherwise we believe it is a complete path. Use it as it is.
39404        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39405$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39406        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39407$as_echo_n "checking for BUILD_CXX... " >&6; }
39408        if test ! -x "$tool_specified"; then
39409          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39410$as_echo "not found" >&6; }
39411          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39412        fi
39413        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39414$as_echo "$tool_specified" >&6; }
39415      fi
39416    fi
39417  fi
39418
39419
39420
39421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39422
39423  # First separate the path from the arguments. This will split at the first
39424  # space.
39425  complete="$BUILD_CXX"
39426  path="${complete%% *}"
39427  tmp="$complete EOL"
39428  arguments="${tmp#* }"
39429
39430  # Input might be given as Windows format, start by converting to
39431  # unix format.
39432  new_path=`$CYGPATH -u "$path"`
39433
39434  # Now try to locate executable using which
39435  new_path=`$WHICH "$new_path" 2> /dev/null`
39436  # bat and cmd files are not always considered executable in cygwin causing which
39437  # to not find them
39438  if test "x$new_path" = x \
39439      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39440      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39441    new_path=`$CYGPATH -u "$path"`
39442  fi
39443  if test "x$new_path" = x; then
39444    # Oops. Which didn't find the executable.
39445    # The splitting of arguments from the executable at a space might have been incorrect,
39446    # since paths with space are more likely in Windows. Give it another try with the whole
39447    # argument.
39448    path="$complete"
39449    arguments="EOL"
39450    new_path=`$CYGPATH -u "$path"`
39451    new_path=`$WHICH "$new_path" 2> /dev/null`
39452    # bat and cmd files are not always considered executable in cygwin causing which
39453    # to not find them
39454    if test "x$new_path" = x \
39455        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39456        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39457      new_path=`$CYGPATH -u "$path"`
39458    fi
39459    if test "x$new_path" = x; then
39460      # It's still not found. Now this is an unrecoverable error.
39461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39462$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39463      has_space=`$ECHO "$complete" | $GREP " "`
39464      if test "x$has_space" != x; then
39465        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39466$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39467      fi
39468      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39469    fi
39470  fi
39471
39472  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39473  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39474  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39475  # "foo.exe" is OK but "foo" is an error.
39476  #
39477  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39478  # It is also a way to make sure we got the proper file name for the real test later on.
39479  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39480  if test "x$test_shortpath" = x; then
39481    # Short path failed, file does not exist as specified.
39482    # Try adding .exe or .cmd
39483    if test -f "${new_path}.exe"; then
39484      input_to_shortpath="${new_path}.exe"
39485    elif test -f "${new_path}.cmd"; then
39486      input_to_shortpath="${new_path}.cmd"
39487    else
39488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39489$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39490      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39491$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39492      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39493    fi
39494  else
39495    input_to_shortpath="$new_path"
39496  fi
39497
39498  # Call helper function which possibly converts this using DOS-style short mode.
39499  # If so, the updated path is stored in $new_path.
39500  new_path="$input_to_shortpath"
39501
39502  input_path="$input_to_shortpath"
39503  # Check if we need to convert this using DOS-style short mode. If the path
39504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39505  # take no chances and rewrite it.
39506  # Note: m4 eats our [], so we need to use [ and ] instead.
39507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39508  if test "x$has_forbidden_chars" != x; then
39509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39510    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39511    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39512    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39513      # Going to short mode and back again did indeed matter. Since short mode is
39514      # case insensitive, let's make it lowercase to improve readability.
39515      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39516      # Now convert it back to Unix-stile (cygpath)
39517      input_path=`$CYGPATH -u "$shortmode_path"`
39518      new_path="$input_path"
39519    fi
39520  fi
39521
39522  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39523  if test "x$test_cygdrive_prefix" = x; then
39524    # As a simple fix, exclude /usr/bin since it's not a real path.
39525    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39526      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39527      # a path prefixed by /cygdrive for fixpath to work.
39528      new_path="$CYGWIN_ROOT_PATH$input_path"
39529    fi
39530  fi
39531
39532  # remove trailing .exe if any
39533  new_path="${new_path/%.exe/}"
39534
39535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39536
39537  # First separate the path from the arguments. This will split at the first
39538  # space.
39539  complete="$BUILD_CXX"
39540  path="${complete%% *}"
39541  tmp="$complete EOL"
39542  arguments="${tmp#* }"
39543
39544  # Input might be given as Windows format, start by converting to
39545  # unix format.
39546  new_path="$path"
39547
39548  windows_path="$new_path"
39549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39550    unix_path=`$CYGPATH -u "$windows_path"`
39551    new_path="$unix_path"
39552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39554    new_path="$unix_path"
39555  fi
39556
39557
39558  # Now try to locate executable using which
39559  new_path=`$WHICH "$new_path" 2> /dev/null`
39560
39561  if test "x$new_path" = x; then
39562    # Oops. Which didn't find the executable.
39563    # The splitting of arguments from the executable at a space might have been incorrect,
39564    # since paths with space are more likely in Windows. Give it another try with the whole
39565    # argument.
39566    path="$complete"
39567    arguments="EOL"
39568    new_path="$path"
39569
39570  windows_path="$new_path"
39571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39572    unix_path=`$CYGPATH -u "$windows_path"`
39573    new_path="$unix_path"
39574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39576    new_path="$unix_path"
39577  fi
39578
39579
39580    new_path=`$WHICH "$new_path" 2> /dev/null`
39581
39582    if test "x$new_path" = x; then
39583      # It's still not found. Now this is an unrecoverable error.
39584      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39585$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39586      has_space=`$ECHO "$complete" | $GREP " "`
39587      if test "x$has_space" != x; then
39588        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39589$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39590      fi
39591      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39592    fi
39593  fi
39594
39595  # Now new_path has a complete unix path to the binary
39596  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39597    # Keep paths in /bin as-is, but remove trailing .exe if any
39598    new_path="${new_path/%.exe/}"
39599    # Do not save /bin paths to all_fixpath_prefixes!
39600  else
39601    # Not in mixed or Windows style, start by that.
39602    new_path=`cmd //c echo $new_path`
39603
39604  input_path="$new_path"
39605  # Check if we need to convert this using DOS-style short mode. If the path
39606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39607  # take no chances and rewrite it.
39608  # Note: m4 eats our [], so we need to use [ and ] instead.
39609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39610  if test "x$has_forbidden_chars" != x; then
39611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39612    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39613  fi
39614
39615    # Output is in $new_path
39616
39617  windows_path="$new_path"
39618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39619    unix_path=`$CYGPATH -u "$windows_path"`
39620    new_path="$unix_path"
39621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39623    new_path="$unix_path"
39624  fi
39625
39626    # remove trailing .exe if any
39627    new_path="${new_path/%.exe/}"
39628
39629    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39630    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39631  fi
39632
39633  else
39634    # We're on a posix platform. Hooray! :)
39635    # First separate the path from the arguments. This will split at the first
39636    # space.
39637    complete="$BUILD_CXX"
39638    path="${complete%% *}"
39639    tmp="$complete EOL"
39640    arguments="${tmp#* }"
39641
39642    # Cannot rely on the command "which" here since it doesn't always work.
39643    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39644    if test -z "$is_absolute_path"; then
39645      # Path to executable is not absolute. Find it.
39646      IFS_save="$IFS"
39647      IFS=:
39648      for p in $PATH; do
39649        if test -f "$p/$path" && test -x "$p/$path"; then
39650          new_path="$p/$path"
39651          break
39652        fi
39653      done
39654      IFS="$IFS_save"
39655    else
39656      # This is an absolute path, we can use it without further modifications.
39657      new_path="$path"
39658    fi
39659
39660    if test "x$new_path" = x; then
39661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39662$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39663      has_space=`$ECHO "$complete" | $GREP " "`
39664      if test "x$has_space" != x; then
39665        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39666$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39667      fi
39668      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39669    fi
39670  fi
39671
39672  # Now join together the path and the arguments once again
39673  if test "x$arguments" != xEOL; then
39674    new_complete="$new_path ${arguments% *}"
39675  else
39676    new_complete="$new_path"
39677  fi
39678
39679  if test "x$complete" != "x$new_complete"; then
39680    BUILD_CXX="$new_complete"
39681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39682$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39683  fi
39684
39685
39686
39687  # Publish this variable in the help.
39688
39689
39690  if test "x$BUILD_LD" = x; then
39691    # The variable is not set by user, try to locate tool using the code snippet
39692    for ac_prog in ld
39693do
39694  # Extract the first word of "$ac_prog", so it can be a program name with args.
39695set dummy $ac_prog; ac_word=$2
39696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39697$as_echo_n "checking for $ac_word... " >&6; }
39698if ${ac_cv_path_BUILD_LD+:} false; then :
39699  $as_echo_n "(cached) " >&6
39700else
39701  case $BUILD_LD in
39702  [\\/]* | ?:[\\/]*)
39703  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39704  ;;
39705  *)
39706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39707for as_dir in $PATH
39708do
39709  IFS=$as_save_IFS
39710  test -z "$as_dir" && as_dir=.
39711    for ac_exec_ext in '' $ac_executable_extensions; do
39712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39713    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39715    break 2
39716  fi
39717done
39718  done
39719IFS=$as_save_IFS
39720
39721  ;;
39722esac
39723fi
39724BUILD_LD=$ac_cv_path_BUILD_LD
39725if test -n "$BUILD_LD"; then
39726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39727$as_echo "$BUILD_LD" >&6; }
39728else
39729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39730$as_echo "no" >&6; }
39731fi
39732
39733
39734  test -n "$BUILD_LD" && break
39735done
39736
39737  else
39738    # The variable is set, but is it from the command line or the environment?
39739
39740    # Try to remove the string !BUILD_LD! from our list.
39741    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39742    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39743      # If it failed, the variable was not from the command line. Ignore it,
39744      # but warn the user (except for BASH, which is always set by the calling BASH).
39745      if test "xBUILD_LD" != xBASH; then
39746        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39747$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39748      fi
39749      # Try to locate tool using the code snippet
39750      for ac_prog in ld
39751do
39752  # Extract the first word of "$ac_prog", so it can be a program name with args.
39753set dummy $ac_prog; ac_word=$2
39754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39755$as_echo_n "checking for $ac_word... " >&6; }
39756if ${ac_cv_path_BUILD_LD+:} false; then :
39757  $as_echo_n "(cached) " >&6
39758else
39759  case $BUILD_LD in
39760  [\\/]* | ?:[\\/]*)
39761  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39762  ;;
39763  *)
39764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39765for as_dir in $PATH
39766do
39767  IFS=$as_save_IFS
39768  test -z "$as_dir" && as_dir=.
39769    for ac_exec_ext in '' $ac_executable_extensions; do
39770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39771    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39773    break 2
39774  fi
39775done
39776  done
39777IFS=$as_save_IFS
39778
39779  ;;
39780esac
39781fi
39782BUILD_LD=$ac_cv_path_BUILD_LD
39783if test -n "$BUILD_LD"; then
39784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39785$as_echo "$BUILD_LD" >&6; }
39786else
39787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39788$as_echo "no" >&6; }
39789fi
39790
39791
39792  test -n "$BUILD_LD" && break
39793done
39794
39795    else
39796      # If it succeeded, then it was overridden by the user. We will use it
39797      # for the tool.
39798
39799      # First remove it from the list of overridden variables, so we can test
39800      # for unknown variables in the end.
39801      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39802
39803      # Check if the provided tool contains a complete path.
39804      tool_specified="$BUILD_LD"
39805      tool_basename="${tool_specified##*/}"
39806      if test "x$tool_basename" = "x$tool_specified"; then
39807        # A command without a complete path is provided, search $PATH.
39808        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
39809$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
39810        # Extract the first word of "$tool_basename", so it can be a program name with args.
39811set dummy $tool_basename; ac_word=$2
39812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39813$as_echo_n "checking for $ac_word... " >&6; }
39814if ${ac_cv_path_BUILD_LD+:} false; then :
39815  $as_echo_n "(cached) " >&6
39816else
39817  case $BUILD_LD in
39818  [\\/]* | ?:[\\/]*)
39819  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39820  ;;
39821  *)
39822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39823for as_dir in $PATH
39824do
39825  IFS=$as_save_IFS
39826  test -z "$as_dir" && as_dir=.
39827    for ac_exec_ext in '' $ac_executable_extensions; do
39828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39829    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39831    break 2
39832  fi
39833done
39834  done
39835IFS=$as_save_IFS
39836
39837  ;;
39838esac
39839fi
39840BUILD_LD=$ac_cv_path_BUILD_LD
39841if test -n "$BUILD_LD"; then
39842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39843$as_echo "$BUILD_LD" >&6; }
39844else
39845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39846$as_echo "no" >&6; }
39847fi
39848
39849
39850        if test "x$BUILD_LD" = x; then
39851          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39852        fi
39853      else
39854        # Otherwise we believe it is a complete path. Use it as it is.
39855        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
39856$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
39857        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
39858$as_echo_n "checking for BUILD_LD... " >&6; }
39859        if test ! -x "$tool_specified"; then
39860          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39861$as_echo "not found" >&6; }
39862          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
39863        fi
39864        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39865$as_echo "$tool_specified" >&6; }
39866      fi
39867    fi
39868  fi
39869
39870
39871
39872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39873
39874  # First separate the path from the arguments. This will split at the first
39875  # space.
39876  complete="$BUILD_LD"
39877  path="${complete%% *}"
39878  tmp="$complete EOL"
39879  arguments="${tmp#* }"
39880
39881  # Input might be given as Windows format, start by converting to
39882  # unix format.
39883  new_path=`$CYGPATH -u "$path"`
39884
39885  # Now try to locate executable using which
39886  new_path=`$WHICH "$new_path" 2> /dev/null`
39887  # bat and cmd files are not always considered executable in cygwin causing which
39888  # to not find them
39889  if test "x$new_path" = x \
39890      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39891      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39892    new_path=`$CYGPATH -u "$path"`
39893  fi
39894  if test "x$new_path" = x; then
39895    # Oops. Which didn't find the executable.
39896    # The splitting of arguments from the executable at a space might have been incorrect,
39897    # since paths with space are more likely in Windows. Give it another try with the whole
39898    # argument.
39899    path="$complete"
39900    arguments="EOL"
39901    new_path=`$CYGPATH -u "$path"`
39902    new_path=`$WHICH "$new_path" 2> /dev/null`
39903    # bat and cmd files are not always considered executable in cygwin causing which
39904    # to not find them
39905    if test "x$new_path" = x \
39906        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39907        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39908      new_path=`$CYGPATH -u "$path"`
39909    fi
39910    if test "x$new_path" = x; then
39911      # It's still not found. Now this is an unrecoverable error.
39912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39913$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39914      has_space=`$ECHO "$complete" | $GREP " "`
39915      if test "x$has_space" != x; then
39916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39918      fi
39919      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39920    fi
39921  fi
39922
39923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39926  # "foo.exe" is OK but "foo" is an error.
39927  #
39928  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39929  # It is also a way to make sure we got the proper file name for the real test later on.
39930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39931  if test "x$test_shortpath" = x; then
39932    # Short path failed, file does not exist as specified.
39933    # Try adding .exe or .cmd
39934    if test -f "${new_path}.exe"; then
39935      input_to_shortpath="${new_path}.exe"
39936    elif test -f "${new_path}.cmd"; then
39937      input_to_shortpath="${new_path}.cmd"
39938    else
39939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
39940$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
39941      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39942$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39943      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39944    fi
39945  else
39946    input_to_shortpath="$new_path"
39947  fi
39948
39949  # Call helper function which possibly converts this using DOS-style short mode.
39950  # If so, the updated path is stored in $new_path.
39951  new_path="$input_to_shortpath"
39952
39953  input_path="$input_to_shortpath"
39954  # Check if we need to convert this using DOS-style short mode. If the path
39955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39956  # take no chances and rewrite it.
39957  # Note: m4 eats our [], so we need to use [ and ] instead.
39958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39959  if test "x$has_forbidden_chars" != x; then
39960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39961    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39962    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39963    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39964      # Going to short mode and back again did indeed matter. Since short mode is
39965      # case insensitive, let's make it lowercase to improve readability.
39966      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39967      # Now convert it back to Unix-stile (cygpath)
39968      input_path=`$CYGPATH -u "$shortmode_path"`
39969      new_path="$input_path"
39970    fi
39971  fi
39972
39973  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39974  if test "x$test_cygdrive_prefix" = x; then
39975    # As a simple fix, exclude /usr/bin since it's not a real path.
39976    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39977      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39978      # a path prefixed by /cygdrive for fixpath to work.
39979      new_path="$CYGWIN_ROOT_PATH$input_path"
39980    fi
39981  fi
39982
39983  # remove trailing .exe if any
39984  new_path="${new_path/%.exe/}"
39985
39986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39987
39988  # First separate the path from the arguments. This will split at the first
39989  # space.
39990  complete="$BUILD_LD"
39991  path="${complete%% *}"
39992  tmp="$complete EOL"
39993  arguments="${tmp#* }"
39994
39995  # Input might be given as Windows format, start by converting to
39996  # unix format.
39997  new_path="$path"
39998
39999  windows_path="$new_path"
40000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40001    unix_path=`$CYGPATH -u "$windows_path"`
40002    new_path="$unix_path"
40003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40005    new_path="$unix_path"
40006  fi
40007
40008
40009  # Now try to locate executable using which
40010  new_path=`$WHICH "$new_path" 2> /dev/null`
40011
40012  if test "x$new_path" = x; then
40013    # Oops. Which didn't find the executable.
40014    # The splitting of arguments from the executable at a space might have been incorrect,
40015    # since paths with space are more likely in Windows. Give it another try with the whole
40016    # argument.
40017    path="$complete"
40018    arguments="EOL"
40019    new_path="$path"
40020
40021  windows_path="$new_path"
40022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40023    unix_path=`$CYGPATH -u "$windows_path"`
40024    new_path="$unix_path"
40025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40027    new_path="$unix_path"
40028  fi
40029
40030
40031    new_path=`$WHICH "$new_path" 2> /dev/null`
40032
40033    if test "x$new_path" = x; then
40034      # It's still not found. Now this is an unrecoverable error.
40035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40036$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40037      has_space=`$ECHO "$complete" | $GREP " "`
40038      if test "x$has_space" != x; then
40039        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40040$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40041      fi
40042      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40043    fi
40044  fi
40045
40046  # Now new_path has a complete unix path to the binary
40047  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40048    # Keep paths in /bin as-is, but remove trailing .exe if any
40049    new_path="${new_path/%.exe/}"
40050    # Do not save /bin paths to all_fixpath_prefixes!
40051  else
40052    # Not in mixed or Windows style, start by that.
40053    new_path=`cmd //c echo $new_path`
40054
40055  input_path="$new_path"
40056  # Check if we need to convert this using DOS-style short mode. If the path
40057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40058  # take no chances and rewrite it.
40059  # Note: m4 eats our [], so we need to use [ and ] instead.
40060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40061  if test "x$has_forbidden_chars" != x; then
40062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40064  fi
40065
40066    # Output is in $new_path
40067
40068  windows_path="$new_path"
40069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40070    unix_path=`$CYGPATH -u "$windows_path"`
40071    new_path="$unix_path"
40072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40074    new_path="$unix_path"
40075  fi
40076
40077    # remove trailing .exe if any
40078    new_path="${new_path/%.exe/}"
40079
40080    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40081    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40082  fi
40083
40084  else
40085    # We're on a posix platform. Hooray! :)
40086    # First separate the path from the arguments. This will split at the first
40087    # space.
40088    complete="$BUILD_LD"
40089    path="${complete%% *}"
40090    tmp="$complete EOL"
40091    arguments="${tmp#* }"
40092
40093    # Cannot rely on the command "which" here since it doesn't always work.
40094    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40095    if test -z "$is_absolute_path"; then
40096      # Path to executable is not absolute. Find it.
40097      IFS_save="$IFS"
40098      IFS=:
40099      for p in $PATH; do
40100        if test -f "$p/$path" && test -x "$p/$path"; then
40101          new_path="$p/$path"
40102          break
40103        fi
40104      done
40105      IFS="$IFS_save"
40106    else
40107      # This is an absolute path, we can use it without further modifications.
40108      new_path="$path"
40109    fi
40110
40111    if test "x$new_path" = x; then
40112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40113$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40114      has_space=`$ECHO "$complete" | $GREP " "`
40115      if test "x$has_space" != x; then
40116        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40117$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40118      fi
40119      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40120    fi
40121  fi
40122
40123  # Now join together the path and the arguments once again
40124  if test "x$arguments" != xEOL; then
40125    new_complete="$new_path ${arguments% *}"
40126  else
40127    new_complete="$new_path"
40128  fi
40129
40130  if test "x$complete" != "x$new_complete"; then
40131    BUILD_LD="$new_complete"
40132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40133$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40134  fi
40135
40136  else
40137    # If we are not cross compiling, use the normal target compilers for
40138    # building the build platform executables.
40139    BUILD_CC="$CC"
40140    BUILD_CXX="$CXX"
40141    BUILD_LD="$LD"
40142  fi
40143
40144
40145
40146
40147
40148
40149  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40150    # For hotspot, we need these in Windows mixed path,
40151    # so rewrite them all. Need added .exe suffix.
40152    HOTSPOT_CXX="$CXX.exe"
40153    HOTSPOT_LD="$LD.exe"
40154    HOTSPOT_MT="$MT.exe"
40155    HOTSPOT_RC="$RC.exe"
40156
40157  unix_path="$HOTSPOT_CXX"
40158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40159    windows_path=`$CYGPATH -m "$unix_path"`
40160    HOTSPOT_CXX="$windows_path"
40161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40162    windows_path=`cmd //c echo $unix_path`
40163    HOTSPOT_CXX="$windows_path"
40164  fi
40165
40166
40167  unix_path="$HOTSPOT_LD"
40168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40169    windows_path=`$CYGPATH -m "$unix_path"`
40170    HOTSPOT_LD="$windows_path"
40171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40172    windows_path=`cmd //c echo $unix_path`
40173    HOTSPOT_LD="$windows_path"
40174  fi
40175
40176
40177  unix_path="$HOTSPOT_MT"
40178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40179    windows_path=`$CYGPATH -m "$unix_path"`
40180    HOTSPOT_MT="$windows_path"
40181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40182    windows_path=`cmd //c echo $unix_path`
40183    HOTSPOT_MT="$windows_path"
40184  fi
40185
40186
40187  unix_path="$HOTSPOT_RC"
40188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40189    windows_path=`$CYGPATH -m "$unix_path"`
40190    HOTSPOT_RC="$windows_path"
40191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40192    windows_path=`cmd //c echo $unix_path`
40193    HOTSPOT_RC="$windows_path"
40194  fi
40195
40196
40197
40198  else
40199    HOTSPOT_CXX="$CXX"
40200    HOTSPOT_LD="$LD"
40201  fi
40202
40203
40204
40205  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40206    USE_CLANG=true
40207  fi
40208
40209
40210  # LDEXE is the linker to use, when creating executables. Not really used.
40211  # FIXME: These should just be removed!
40212  LDEXE="$LD"
40213  LDEXECXX="$LDCXX"
40214
40215
40216
40217
40218  # The package path is used only on macosx?
40219  # FIXME: clean this up, and/or move it elsewhere.
40220  PACKAGE_PATH=/opt/local
40221
40222
40223  # Check for extra potential brokenness.
40224  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40225    # On Windows, double-check that we got the right compiler.
40226    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40227    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40228    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40229      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40230        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40231      fi
40232    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40233      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40234        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40235      fi
40236    fi
40237  fi
40238
40239  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40240    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40241    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40242    # This is later checked when setting flags.
40243  fi
40244
40245  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40246  # in executable.'
40247  USING_BROKEN_SUSE_LD=no
40248  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40249    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40250$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40251    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
40252    echo "int main() { }" > main.c
40253    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40254      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40255$as_echo "no" >&6; }
40256      USING_BROKEN_SUSE_LD=no
40257    else
40258      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40259$as_echo "yes" >&6; }
40260      USING_BROKEN_SUSE_LD=yes
40261    fi
40262    rm -rf version-script.map main.c a.out
40263  fi
40264
40265
40266
40267# Setup the JTReg Regression Test Harness.
40268
40269
40270# Check whether --with-jtreg was given.
40271if test "${with_jtreg+set}" = set; then :
40272  withval=$with_jtreg;
40273else
40274  with_jtreg=no
40275fi
40276
40277
40278  if test "x$with_jtreg" = xno; then
40279    # jtreg disabled
40280    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40281$as_echo_n "checking for jtreg... " >&6; }
40282    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40283$as_echo "no" >&6; }
40284  else
40285    if test "x$with_jtreg" != xyes; then
40286      # with path specified.
40287      JT_HOME="$with_jtreg"
40288    fi
40289
40290    if test "x$JT_HOME" != x; then
40291      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40292$as_echo_n "checking for jtreg... " >&6; }
40293
40294      # use JT_HOME enviroment var.
40295
40296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40297
40298  # Input might be given as Windows format, start by converting to
40299  # unix format.
40300  path="$JT_HOME"
40301  new_path=`$CYGPATH -u "$path"`
40302
40303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40306  # "foo.exe" is OK but "foo" is an error.
40307  #
40308  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40309  # It is also a way to make sure we got the proper file name for the real test later on.
40310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40311  if test "x$test_shortpath" = x; then
40312    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40313$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40314    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40315  fi
40316
40317  # Call helper function which possibly converts this using DOS-style short mode.
40318  # If so, the updated path is stored in $new_path.
40319
40320  input_path="$new_path"
40321  # Check if we need to convert this using DOS-style short mode. If the path
40322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40323  # take no chances and rewrite it.
40324  # Note: m4 eats our [], so we need to use [ and ] instead.
40325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40326  if test "x$has_forbidden_chars" != x; then
40327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40331      # Going to short mode and back again did indeed matter. Since short mode is
40332      # case insensitive, let's make it lowercase to improve readability.
40333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40334      # Now convert it back to Unix-stile (cygpath)
40335      input_path=`$CYGPATH -u "$shortmode_path"`
40336      new_path="$input_path"
40337    fi
40338  fi
40339
40340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40341  if test "x$test_cygdrive_prefix" = x; then
40342    # As a simple fix, exclude /usr/bin since it's not a real path.
40343    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40345      # a path prefixed by /cygdrive for fixpath to work.
40346      new_path="$CYGWIN_ROOT_PATH$input_path"
40347    fi
40348  fi
40349
40350
40351  if test "x$path" != "x$new_path"; then
40352    JT_HOME="$new_path"
40353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40354$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40355  fi
40356
40357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40358
40359  path="$JT_HOME"
40360  has_colon=`$ECHO $path | $GREP ^.:`
40361  new_path="$path"
40362  if test "x$has_colon" = x; then
40363    # Not in mixed or Windows style, start by that.
40364    new_path=`cmd //c echo $path`
40365  fi
40366
40367
40368  input_path="$new_path"
40369  # Check if we need to convert this using DOS-style short mode. If the path
40370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40371  # take no chances and rewrite it.
40372  # Note: m4 eats our [], so we need to use [ and ] instead.
40373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40374  if test "x$has_forbidden_chars" != x; then
40375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40376    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40377  fi
40378
40379
40380  windows_path="$new_path"
40381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40382    unix_path=`$CYGPATH -u "$windows_path"`
40383    new_path="$unix_path"
40384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40386    new_path="$unix_path"
40387  fi
40388
40389  if test "x$path" != "x$new_path"; then
40390    JT_HOME="$new_path"
40391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40392$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40393  fi
40394
40395  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40396  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40397
40398  else
40399    # We're on a posix platform. Hooray! :)
40400    path="$JT_HOME"
40401    has_space=`$ECHO "$path" | $GREP " "`
40402    if test "x$has_space" != x; then
40403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40404$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40405      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40406    fi
40407
40408    # Use eval to expand a potential ~
40409    eval path="$path"
40410    if test ! -f "$path" && test ! -d "$path"; then
40411      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40412    fi
40413
40414    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40415  fi
40416
40417
40418      # jtreg win32 script works for everybody
40419      JTREGEXE="$JT_HOME/win32/bin/jtreg"
40420
40421      if test ! -f "$JTREGEXE"; then
40422        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40423      fi
40424
40425      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40426$as_echo "$JTREGEXE" >&6; }
40427    else
40428      # try to find jtreg on path
40429
40430
40431
40432  # Publish this variable in the help.
40433
40434
40435  if test "x$JTREGEXE" = x; then
40436    # The variable is not set by user, try to locate tool using the code snippet
40437    for ac_prog in jtreg
40438do
40439  # Extract the first word of "$ac_prog", so it can be a program name with args.
40440set dummy $ac_prog; ac_word=$2
40441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40442$as_echo_n "checking for $ac_word... " >&6; }
40443if ${ac_cv_path_JTREGEXE+:} false; then :
40444  $as_echo_n "(cached) " >&6
40445else
40446  case $JTREGEXE in
40447  [\\/]* | ?:[\\/]*)
40448  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40449  ;;
40450  *)
40451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40452for as_dir in $PATH
40453do
40454  IFS=$as_save_IFS
40455  test -z "$as_dir" && as_dir=.
40456    for ac_exec_ext in '' $ac_executable_extensions; do
40457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40458    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40460    break 2
40461  fi
40462done
40463  done
40464IFS=$as_save_IFS
40465
40466  ;;
40467esac
40468fi
40469JTREGEXE=$ac_cv_path_JTREGEXE
40470if test -n "$JTREGEXE"; then
40471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40472$as_echo "$JTREGEXE" >&6; }
40473else
40474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40475$as_echo "no" >&6; }
40476fi
40477
40478
40479  test -n "$JTREGEXE" && break
40480done
40481
40482  else
40483    # The variable is set, but is it from the command line or the environment?
40484
40485    # Try to remove the string !JTREGEXE! from our list.
40486    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40487    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40488      # If it failed, the variable was not from the command line. Ignore it,
40489      # but warn the user (except for BASH, which is always set by the calling BASH).
40490      if test "xJTREGEXE" != xBASH; then
40491        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40492$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40493      fi
40494      # Try to locate tool using the code snippet
40495      for ac_prog in jtreg
40496do
40497  # Extract the first word of "$ac_prog", so it can be a program name with args.
40498set dummy $ac_prog; ac_word=$2
40499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40500$as_echo_n "checking for $ac_word... " >&6; }
40501if ${ac_cv_path_JTREGEXE+:} false; then :
40502  $as_echo_n "(cached) " >&6
40503else
40504  case $JTREGEXE in
40505  [\\/]* | ?:[\\/]*)
40506  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40507  ;;
40508  *)
40509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40510for as_dir in $PATH
40511do
40512  IFS=$as_save_IFS
40513  test -z "$as_dir" && as_dir=.
40514    for ac_exec_ext in '' $ac_executable_extensions; do
40515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40516    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40518    break 2
40519  fi
40520done
40521  done
40522IFS=$as_save_IFS
40523
40524  ;;
40525esac
40526fi
40527JTREGEXE=$ac_cv_path_JTREGEXE
40528if test -n "$JTREGEXE"; then
40529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40530$as_echo "$JTREGEXE" >&6; }
40531else
40532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40533$as_echo "no" >&6; }
40534fi
40535
40536
40537  test -n "$JTREGEXE" && break
40538done
40539
40540    else
40541      # If it succeeded, then it was overridden by the user. We will use it
40542      # for the tool.
40543
40544      # First remove it from the list of overridden variables, so we can test
40545      # for unknown variables in the end.
40546      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40547
40548      # Check if the provided tool contains a complete path.
40549      tool_specified="$JTREGEXE"
40550      tool_basename="${tool_specified##*/}"
40551      if test "x$tool_basename" = "x$tool_specified"; then
40552        # A command without a complete path is provided, search $PATH.
40553        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40554$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40555        # Extract the first word of "$tool_basename", so it can be a program name with args.
40556set dummy $tool_basename; ac_word=$2
40557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40558$as_echo_n "checking for $ac_word... " >&6; }
40559if ${ac_cv_path_JTREGEXE+:} false; then :
40560  $as_echo_n "(cached) " >&6
40561else
40562  case $JTREGEXE in
40563  [\\/]* | ?:[\\/]*)
40564  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40565  ;;
40566  *)
40567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40568for as_dir in $PATH
40569do
40570  IFS=$as_save_IFS
40571  test -z "$as_dir" && as_dir=.
40572    for ac_exec_ext in '' $ac_executable_extensions; do
40573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40574    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40576    break 2
40577  fi
40578done
40579  done
40580IFS=$as_save_IFS
40581
40582  ;;
40583esac
40584fi
40585JTREGEXE=$ac_cv_path_JTREGEXE
40586if test -n "$JTREGEXE"; then
40587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40588$as_echo "$JTREGEXE" >&6; }
40589else
40590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40591$as_echo "no" >&6; }
40592fi
40593
40594
40595        if test "x$JTREGEXE" = x; then
40596          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40597        fi
40598      else
40599        # Otherwise we believe it is a complete path. Use it as it is.
40600        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40601$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40602        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40603$as_echo_n "checking for JTREGEXE... " >&6; }
40604        if test ! -x "$tool_specified"; then
40605          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40606$as_echo "not found" >&6; }
40607          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40608        fi
40609        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40610$as_echo "$tool_specified" >&6; }
40611      fi
40612    fi
40613  fi
40614
40615
40616
40617  if test "x$JTREGEXE" = x; then
40618    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40619  fi
40620
40621
40622      JT_HOME="`$DIRNAME $JTREGEXE`"
40623    fi
40624  fi
40625
40626
40627
40628
40629
40630
40631  # Option used to tell the compiler whether to create 32- or 64-bit executables
40632  if test "x$TOOLCHAIN_TYPE" = xxlc; then
40633    COMPILER_TARGET_BITS_FLAG="-q"
40634  else
40635    COMPILER_TARGET_BITS_FLAG="-m"
40636  fi
40637
40638
40639  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
40640  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40641    ARFLAGS="-r"
40642  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40643    ARFLAGS="-X64"
40644  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
40645    # lib.exe is used as AR to create static libraries.
40646    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
40647  else
40648    ARFLAGS=""
40649  fi
40650
40651
40652  ## Setup strip.
40653  # FIXME: should this really be per platform, or should it be per toolchain type?
40654  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
40655  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
40656  if test "x$OPENJDK_TARGET_OS" = xlinux; then
40657    STRIPFLAGS="-g"
40658  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
40659    STRIPFLAGS="-x"
40660  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
40661    STRIPFLAGS="-S"
40662  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40663    STRIPFLAGS="-X32_64"
40664  fi
40665
40666  if test "x$OPENJDK_TARGET_OS" != xwindows; then
40667    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
40668  fi
40669
40670
40671  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40672    # FIXME: break out into MCSFLAGS
40673    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
40674  fi
40675
40676
40677  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40678    CC_OUT_OPTION=-Fo
40679    EXE_OUT_OPTION=-out:
40680    LD_OUT_OPTION=-out:
40681    AR_OUT_OPTION=-out:
40682  else
40683    # The option used to specify the target .o,.a or .so file.
40684    # When compiling, how to specify the to be created object file.
40685    CC_OUT_OPTION='-o$(SPACE)'
40686    # When linking, how to specify the to be created executable.
40687    EXE_OUT_OPTION='-o$(SPACE)'
40688    # When linking, how to specify the to be created dynamically linkable library.
40689    LD_OUT_OPTION='-o$(SPACE)'
40690    # When archiving, how to specify the to be create static archive for object files.
40691    AR_OUT_OPTION='rcs$(SPACE)'
40692  fi
40693
40694
40695
40696
40697
40698  # On Windows, we need to set RC flags.
40699  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40700    RC_FLAGS="-nologo -l 0x409 -r"
40701    if test "x$VARIANT" = xOPT; then
40702      RC_FLAGS="$RC_FLAGS -d NDEBUG"
40703    fi
40704
40705    # The version variables used to create RC_FLAGS may be overridden
40706    # in a custom configure script, or possibly the command line.
40707    # Let those variables be expanded at make time in spec.gmk.
40708    # The \$ are escaped to the shell, and the $(...) variables
40709    # are evaluated by make.
40710    RC_FLAGS="$RC_FLAGS \
40711        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
40712        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
40713        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
40714        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
40715        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
40716        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
40717        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
40718  fi
40719
40720
40721  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40722    # FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
40723    CCXXFLAGS="$CCXXFLAGS -nologo"
40724  fi
40725
40726  if test "x$SYSROOT" != "x"; then
40727    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
40728      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40729        # Solaris Studio does not have a concept of sysroot. Instead we must
40730        # make sure the default include and lib dirs are appended to each
40731        # compile and link command line.
40732        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
40733        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
40734            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
40735            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
40736      fi
40737    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
40738      SYSROOT_CFLAGS="--sysroot=\"$SYSROOT\""
40739      SYSROOT_LDFLAGS="--sysroot=\"$SYSROOT\""
40740    elif test "x$TOOLCHAIN_TYPE" = xclang; then
40741      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
40742      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
40743    fi
40744    # Propagate the sysroot args to hotspot
40745    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
40746    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
40747    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
40748  fi
40749
40750
40751
40752
40753# FIXME: Currently we must test this after toolchain but before flags. Fix!
40754
40755# Now we can test some aspects on the target using configure macros.
40756
40757
40758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
40759$as_echo_n "checking for ANSI C header files... " >&6; }
40760if ${ac_cv_header_stdc+:} false; then :
40761  $as_echo_n "(cached) " >&6
40762else
40763  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40764/* end confdefs.h.  */
40765#include <stdlib.h>
40766#include <stdarg.h>
40767#include <string.h>
40768#include <float.h>
40769
40770int
40771main ()
40772{
40773
40774  ;
40775  return 0;
40776}
40777_ACEOF
40778if ac_fn_cxx_try_compile "$LINENO"; then :
40779  ac_cv_header_stdc=yes
40780else
40781  ac_cv_header_stdc=no
40782fi
40783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40784
40785if test $ac_cv_header_stdc = yes; then
40786  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
40787  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40788/* end confdefs.h.  */
40789#include <string.h>
40790
40791_ACEOF
40792if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40793  $EGREP "memchr" >/dev/null 2>&1; then :
40794
40795else
40796  ac_cv_header_stdc=no
40797fi
40798rm -f conftest*
40799
40800fi
40801
40802if test $ac_cv_header_stdc = yes; then
40803  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
40804  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40805/* end confdefs.h.  */
40806#include <stdlib.h>
40807
40808_ACEOF
40809if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40810  $EGREP "free" >/dev/null 2>&1; then :
40811
40812else
40813  ac_cv_header_stdc=no
40814fi
40815rm -f conftest*
40816
40817fi
40818
40819if test $ac_cv_header_stdc = yes; then
40820  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
40821  if test "$cross_compiling" = yes; then :
40822  :
40823else
40824  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40825/* end confdefs.h.  */
40826#include <ctype.h>
40827#include <stdlib.h>
40828#if ((' ' & 0x0FF) == 0x020)
40829# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
40830# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
40831#else
40832# define ISLOWER(c) \
40833		   (('a' <= (c) && (c) <= 'i') \
40834		     || ('j' <= (c) && (c) <= 'r') \
40835		     || ('s' <= (c) && (c) <= 'z'))
40836# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
40837#endif
40838
40839#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
40840int
40841main ()
40842{
40843  int i;
40844  for (i = 0; i < 256; i++)
40845    if (XOR (islower (i), ISLOWER (i))
40846	|| toupper (i) != TOUPPER (i))
40847      return 2;
40848  return 0;
40849}
40850_ACEOF
40851if ac_fn_cxx_try_run "$LINENO"; then :
40852
40853else
40854  ac_cv_header_stdc=no
40855fi
40856rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40857  conftest.$ac_objext conftest.beam conftest.$ac_ext
40858fi
40859
40860fi
40861fi
40862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
40863$as_echo "$ac_cv_header_stdc" >&6; }
40864if test $ac_cv_header_stdc = yes; then
40865
40866$as_echo "#define STDC_HEADERS 1" >>confdefs.h
40867
40868fi
40869
40870# On IRIX 5.3, sys/types and inttypes.h are conflicting.
40871for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
40872		  inttypes.h stdint.h unistd.h
40873do :
40874  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
40875ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
40876"
40877if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
40878  cat >>confdefs.h <<_ACEOF
40879#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
40880_ACEOF
40881
40882fi
40883
40884done
40885
40886
40887
40888  ###############################################################################
40889  #
40890  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
40891  # (The JVM can use 32 or 64 bit Java pointers but that decision
40892  # is made at runtime.)
40893  #
40894
40895  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
40896    # Always specify -m flag on Solaris
40897    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
40898
40899  # When we add flags to the "official" CFLAGS etc, we need to
40900  # keep track of these additions in ADDED_CFLAGS etc. These
40901  # will later be checked to make sure only controlled additions
40902  # have been made to CFLAGS etc.
40903  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40904  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40905  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40906
40907  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40908  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40909  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40910
40911  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40912  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40913  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40914
40915  elif test "x$COMPILE_TYPE" = xreduced; then
40916    if test "x$OPENJDK_TARGET_OS" != xwindows; then
40917      # Specify -m if running reduced on other Posix platforms
40918
40919  # When we add flags to the "official" CFLAGS etc, we need to
40920  # keep track of these additions in ADDED_CFLAGS etc. These
40921  # will later be checked to make sure only controlled additions
40922  # have been made to CFLAGS etc.
40923  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40924  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40925  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40926
40927  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40928  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40929  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40930
40931  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40932  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40933  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40934
40935    fi
40936  fi
40937
40938  # Make compilation sanity check
40939  for ac_header in stdio.h
40940do :
40941  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
40942if test "x$ac_cv_header_stdio_h" = xyes; then :
40943  cat >>confdefs.h <<_ACEOF
40944#define HAVE_STDIO_H 1
40945_ACEOF
40946
40947else
40948
40949    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
40950$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
40951    if test "x$COMPILE_TYPE" = xreduced; then
40952      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
40953$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
40954    elif test "x$COMPILE_TYPE" = xcross; then
40955      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
40956$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
40957    fi
40958    as_fn_error $? "Cannot continue." "$LINENO" 5
40959
40960fi
40961
40962done
40963
40964
40965  # The cast to long int works around a bug in the HP C Compiler
40966# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40967# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40968# This bug is HP SR number 8606223364.
40969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
40970$as_echo_n "checking size of int *... " >&6; }
40971if ${ac_cv_sizeof_int_p+:} false; then :
40972  $as_echo_n "(cached) " >&6
40973else
40974  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
40975
40976else
40977  if test "$ac_cv_type_int_p" = yes; then
40978     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
40979$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
40980as_fn_error 77 "cannot compute sizeof (int *)
40981See \`config.log' for more details" "$LINENO" 5; }
40982   else
40983     ac_cv_sizeof_int_p=0
40984   fi
40985fi
40986
40987fi
40988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
40989$as_echo "$ac_cv_sizeof_int_p" >&6; }
40990
40991
40992
40993cat >>confdefs.h <<_ACEOF
40994#define SIZEOF_INT_P $ac_cv_sizeof_int_p
40995_ACEOF
40996
40997
40998
40999  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41000  if test "x$ac_cv_sizeof_int_p" = x; then
41001    # The test failed, lets stick to the assumed value.
41002    { $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
41003$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41004  else
41005    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41006
41007    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41008      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41009      # Let's try to implicitely set the compilers target architecture and retry the test
41010      { $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
41011$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;}
41012      { $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
41013$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;}
41014
41015  # When we add flags to the "official" CFLAGS etc, we need to
41016  # keep track of these additions in ADDED_CFLAGS etc. These
41017  # will later be checked to make sure only controlled additions
41018  # have been made to CFLAGS etc.
41019  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41020  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41021  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41022
41023  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41024  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41025  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41026
41027  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41028  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41029  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41030
41031
41032      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41033      unset ac_cv_sizeof_int_p
41034      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41035      cat >>confdefs.h <<_ACEOF
41036#undef SIZEOF_INT_P
41037_ACEOF
41038
41039      # The cast to long int works around a bug in the HP C Compiler
41040# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41041# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41042# This bug is HP SR number 8606223364.
41043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41044$as_echo_n "checking size of int *... " >&6; }
41045if ${ac_cv_sizeof_int_p+:} false; then :
41046  $as_echo_n "(cached) " >&6
41047else
41048  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41049
41050else
41051  if test "$ac_cv_type_int_p" = yes; then
41052     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41053$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41054as_fn_error 77 "cannot compute sizeof (int *)
41055See \`config.log' for more details" "$LINENO" 5; }
41056   else
41057     ac_cv_sizeof_int_p=0
41058   fi
41059fi
41060
41061fi
41062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41063$as_echo "$ac_cv_sizeof_int_p" >&6; }
41064
41065
41066
41067cat >>confdefs.h <<_ACEOF
41068#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41069_ACEOF
41070
41071
41072
41073      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41074
41075      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41076        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
41077      fi
41078    fi
41079  fi
41080
41081  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41082$as_echo_n "checking for target address size... " >&6; }
41083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41084$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41085
41086
41087  ###############################################################################
41088  #
41089  # Is the target little of big endian?
41090  #
41091   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41092$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41093if ${ac_cv_c_bigendian+:} false; then :
41094  $as_echo_n "(cached) " >&6
41095else
41096  ac_cv_c_bigendian=unknown
41097    # See if we're dealing with a universal compiler.
41098    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41099/* end confdefs.h.  */
41100#ifndef __APPLE_CC__
41101	       not a universal capable compiler
41102	     #endif
41103	     typedef int dummy;
41104
41105_ACEOF
41106if ac_fn_cxx_try_compile "$LINENO"; then :
41107
41108	# Check for potential -arch flags.  It is not universal unless
41109	# there are at least two -arch flags with different values.
41110	ac_arch=
41111	ac_prev=
41112	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41113	 if test -n "$ac_prev"; then
41114	   case $ac_word in
41115	     i?86 | x86_64 | ppc | ppc64)
41116	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41117		 ac_arch=$ac_word
41118	       else
41119		 ac_cv_c_bigendian=universal
41120		 break
41121	       fi
41122	       ;;
41123	   esac
41124	   ac_prev=
41125	 elif test "x$ac_word" = "x-arch"; then
41126	   ac_prev=arch
41127	 fi
41128       done
41129fi
41130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41131    if test $ac_cv_c_bigendian = unknown; then
41132      # See if sys/param.h defines the BYTE_ORDER macro.
41133      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41134/* end confdefs.h.  */
41135#include <sys/types.h>
41136	     #include <sys/param.h>
41137
41138int
41139main ()
41140{
41141#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41142		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41143		     && LITTLE_ENDIAN)
41144	      bogus endian macros
41145	     #endif
41146
41147  ;
41148  return 0;
41149}
41150_ACEOF
41151if ac_fn_cxx_try_compile "$LINENO"; then :
41152  # It does; now see whether it defined to BIG_ENDIAN or not.
41153	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41154/* end confdefs.h.  */
41155#include <sys/types.h>
41156		#include <sys/param.h>
41157
41158int
41159main ()
41160{
41161#if BYTE_ORDER != BIG_ENDIAN
41162		 not big endian
41163		#endif
41164
41165  ;
41166  return 0;
41167}
41168_ACEOF
41169if ac_fn_cxx_try_compile "$LINENO"; then :
41170  ac_cv_c_bigendian=yes
41171else
41172  ac_cv_c_bigendian=no
41173fi
41174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41175fi
41176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41177    fi
41178    if test $ac_cv_c_bigendian = unknown; then
41179      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41180      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41181/* end confdefs.h.  */
41182#include <limits.h>
41183
41184int
41185main ()
41186{
41187#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41188	      bogus endian macros
41189	     #endif
41190
41191  ;
41192  return 0;
41193}
41194_ACEOF
41195if ac_fn_cxx_try_compile "$LINENO"; then :
41196  # It does; now see whether it defined to _BIG_ENDIAN or not.
41197	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41198/* end confdefs.h.  */
41199#include <limits.h>
41200
41201int
41202main ()
41203{
41204#ifndef _BIG_ENDIAN
41205		 not big endian
41206		#endif
41207
41208  ;
41209  return 0;
41210}
41211_ACEOF
41212if ac_fn_cxx_try_compile "$LINENO"; then :
41213  ac_cv_c_bigendian=yes
41214else
41215  ac_cv_c_bigendian=no
41216fi
41217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41218fi
41219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41220    fi
41221    if test $ac_cv_c_bigendian = unknown; then
41222      # Compile a test program.
41223      if test "$cross_compiling" = yes; then :
41224  # Try to guess by grepping values from an object file.
41225	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41226/* end confdefs.h.  */
41227short int ascii_mm[] =
41228		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41229		short int ascii_ii[] =
41230		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41231		int use_ascii (int i) {
41232		  return ascii_mm[i] + ascii_ii[i];
41233		}
41234		short int ebcdic_ii[] =
41235		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41236		short int ebcdic_mm[] =
41237		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41238		int use_ebcdic (int i) {
41239		  return ebcdic_mm[i] + ebcdic_ii[i];
41240		}
41241		extern int foo;
41242
41243int
41244main ()
41245{
41246return use_ascii (foo) == use_ebcdic (foo);
41247  ;
41248  return 0;
41249}
41250_ACEOF
41251if ac_fn_cxx_try_compile "$LINENO"; then :
41252  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41253	      ac_cv_c_bigendian=yes
41254	    fi
41255	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41256	      if test "$ac_cv_c_bigendian" = unknown; then
41257		ac_cv_c_bigendian=no
41258	      else
41259		# finding both strings is unlikely to happen, but who knows?
41260		ac_cv_c_bigendian=unknown
41261	      fi
41262	    fi
41263fi
41264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41265else
41266  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41267/* end confdefs.h.  */
41268$ac_includes_default
41269int
41270main ()
41271{
41272
41273	     /* Are we little or big endian?  From Harbison&Steele.  */
41274	     union
41275	     {
41276	       long int l;
41277	       char c[sizeof (long int)];
41278	     } u;
41279	     u.l = 1;
41280	     return u.c[sizeof (long int) - 1] == 1;
41281
41282  ;
41283  return 0;
41284}
41285_ACEOF
41286if ac_fn_cxx_try_run "$LINENO"; then :
41287  ac_cv_c_bigendian=no
41288else
41289  ac_cv_c_bigendian=yes
41290fi
41291rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41292  conftest.$ac_objext conftest.beam conftest.$ac_ext
41293fi
41294
41295    fi
41296fi
41297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41298$as_echo "$ac_cv_c_bigendian" >&6; }
41299 case $ac_cv_c_bigendian in #(
41300   yes)
41301     ENDIAN="big";; #(
41302   no)
41303     ENDIAN="little" ;; #(
41304   universal)
41305     ENDIAN="universal_endianness"
41306     ;; #(
41307   *)
41308     ENDIAN="unknown" ;;
41309 esac
41310
41311
41312  if test "x$ENDIAN" = xuniversal_endianness; then
41313    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41314  fi
41315  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41316    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
41317  fi
41318
41319
41320# Configure flags for the tools
41321
41322  ###############################################################################
41323  #
41324  # How to compile shared libraries.
41325  #
41326
41327  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41328    PICFLAG="-fPIC"
41329    C_FLAG_REORDER=''
41330    CXX_FLAG_REORDER=''
41331
41332    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41333      # Linking is different on MacOSX
41334      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41335      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41336      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41337      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41338      SET_SHARED_LIBRARY_MAPFILE=''
41339    else
41340      # Default works for linux, might work on other platforms as well.
41341      SHARED_LIBRARY_FLAGS='-shared'
41342      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41343      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41344      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41345      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41346    fi
41347  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41348    PICFLAG=''
41349    C_FLAG_REORDER=''
41350    CXX_FLAG_REORDER=''
41351
41352    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41353      # Linking is different on MacOSX
41354      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41355      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41356      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41357      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41358      SET_SHARED_LIBRARY_MAPFILE=''
41359    else
41360      # Default works for linux, might work on other platforms as well.
41361      SHARED_LIBRARY_FLAGS='-shared'
41362      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41363      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41364      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41365      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41366    fi
41367  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41368    PICFLAG="-KPIC"
41369    C_FLAG_REORDER='-xF'
41370    CXX_FLAG_REORDER='-xF'
41371    SHARED_LIBRARY_FLAGS="-G"
41372    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41373    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41374    SET_SHARED_LIBRARY_NAME=''
41375    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41376  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41377    PICFLAG="-qpic=large"
41378    C_FLAG_REORDER=''
41379    CXX_FLAG_REORDER=''
41380    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41381    SET_EXECUTABLE_ORIGIN=""
41382    SET_SHARED_LIBRARY_ORIGIN=''
41383    SET_SHARED_LIBRARY_NAME=''
41384    SET_SHARED_LIBRARY_MAPFILE=''
41385  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41386    PICFLAG=""
41387    C_FLAG_REORDER=''
41388    CXX_FLAG_REORDER=''
41389    SHARED_LIBRARY_FLAGS="-LD"
41390    SET_EXECUTABLE_ORIGIN=''
41391    SET_SHARED_LIBRARY_ORIGIN=''
41392    SET_SHARED_LIBRARY_NAME=''
41393    SET_SHARED_LIBRARY_MAPFILE=''
41394  fi
41395
41396
41397
41398
41399
41400
41401
41402
41403
41404  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41405    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41406    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41407    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41408  fi
41409  # The (cross) compiler is now configured, we can now test capabilities
41410  # of the target platform.
41411
41412
41413
41414  ###############################################################################
41415  #
41416  # Setup the opt flags for different compilers
41417  # and different operating systems.
41418  #
41419
41420  # FIXME: this was indirectly the old default, but just inherited.
41421  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41422  #   C_FLAG_DEPS="-MMD -MF"
41423  # fi
41424
41425  # Generate make dependency files
41426  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41427    C_FLAG_DEPS="-MMD -MF"
41428  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41429    C_FLAG_DEPS="-MMD -MF"
41430  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41431    C_FLAG_DEPS="-xMMD -xMF"
41432  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41433    C_FLAG_DEPS="-qmakedep=gcc -MF"
41434  fi
41435  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41436
41437
41438
41439  # Debug symbols
41440  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41441    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41442      CFLAGS_DEBUG_SYMBOLS="-g1"
41443      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41444    else
41445      CFLAGS_DEBUG_SYMBOLS="-g"
41446      CXXFLAGS_DEBUG_SYMBOLS="-g"
41447    fi
41448  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41449    CFLAGS_DEBUG_SYMBOLS="-g"
41450    CXXFLAGS_DEBUG_SYMBOLS="-g"
41451  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41452    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41453    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41454  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41455    CFLAGS_DEBUG_SYMBOLS="-g"
41456    CXXFLAGS_DEBUG_SYMBOLS="-g"
41457  fi
41458
41459
41460
41461  # Optimization levels
41462  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41463    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41464
41465    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41466      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41467      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
41468      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41469      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41470      C_O_FLAG_NONE="-xregs=no%frameptr"
41471      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41472      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41473      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41474      CXX_O_FLAG_NONE="-xregs=no%frameptr"
41475      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41476        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41477        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41478      fi
41479    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41480      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
41481      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41482      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41483      C_O_FLAG_NONE=""
41484      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41485      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41486      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41487      CXX_O_FLAG_NONE=""
41488    fi
41489  else
41490    # The remaining toolchains share opt flags between CC and CXX;
41491    # setup for C and duplicate afterwards.
41492    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41493      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41494        # On MacOSX we optimize for size, something
41495        # we should do for all platforms?
41496        C_O_FLAG_HIGHEST="-Os"
41497        C_O_FLAG_HI="-Os"
41498        C_O_FLAG_NORM="-Os"
41499        C_O_FLAG_NONE=""
41500      else
41501        C_O_FLAG_HIGHEST="-O3"
41502        C_O_FLAG_HI="-O3"
41503        C_O_FLAG_NORM="-O2"
41504        C_O_FLAG_NONE="-O0"
41505      fi
41506    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41507      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41508        # On MacOSX we optimize for size, something
41509        # we should do for all platforms?
41510        C_O_FLAG_HIGHEST="-Os"
41511        C_O_FLAG_HI="-Os"
41512        C_O_FLAG_NORM="-Os"
41513        C_O_FLAG_NONE=""
41514      else
41515        C_O_FLAG_HIGHEST="-O3"
41516        C_O_FLAG_HI="-O3"
41517        C_O_FLAG_NORM="-O2"
41518        C_O_FLAG_NONE="-O0"
41519      fi
41520    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41521      C_O_FLAG_HIGHEST="-O3"
41522      C_O_FLAG_HI="-O3 -qstrict"
41523      C_O_FLAG_NORM="-O2"
41524      C_O_FLAG_NONE=""
41525    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41526      C_O_FLAG_HIGHEST="-O2"
41527      C_O_FLAG_HI="-O1"
41528      C_O_FLAG_NORM="-O1"
41529      C_O_FLAG_NONE="-Od"
41530    fi
41531    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41532    CXX_O_FLAG_HI="$C_O_FLAG_HI"
41533    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41534    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41535  fi
41536
41537
41538
41539
41540
41541
41542
41543
41544
41545
41546
41547  # Special extras...
41548  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41549    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41550      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41551      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41552    fi
41553  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41554    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
41555    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41556    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41557  fi
41558
41559  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41560    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41561$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41562  fi
41563
41564  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41565    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41566$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41567  fi
41568
41569  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41570    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41571$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41572  fi
41573
41574
41575# Check whether --with-extra-cflags was given.
41576if test "${with_extra_cflags+set}" = set; then :
41577  withval=$with_extra_cflags;
41578fi
41579
41580
41581
41582# Check whether --with-extra-cxxflags was given.
41583if test "${with_extra_cxxflags+set}" = set; then :
41584  withval=$with_extra_cxxflags;
41585fi
41586
41587
41588
41589# Check whether --with-extra-ldflags was given.
41590if test "${with_extra_ldflags+set}" = set; then :
41591  withval=$with_extra_ldflags;
41592fi
41593
41594
41595  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
41596  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
41597  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
41598
41599  # Hotspot needs these set in their legacy form
41600  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
41601  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
41602  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
41603
41604
41605
41606
41607
41608  ###############################################################################
41609  #
41610  # Now setup the CFLAGS and LDFLAGS for the JDK build.
41611  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
41612  #
41613
41614  # Setup compiler/platform specific flags to CFLAGS_JDK,
41615  # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
41616  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41617    # these options are used for both C and C++ compiles
41618    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
41619        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
41620    case $OPENJDK_TARGET_CPU_ARCH in
41621      arm )
41622        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41623        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41624        ;;
41625      ppc )
41626        # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
41627        ;;
41628      * )
41629        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
41630        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41631        ;;
41632    esac
41633  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41634    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
41635    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
41636      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
41637      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
41638    fi
41639
41640    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
41641    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
41642  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41643    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41644    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41645  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41646    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
41647    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
41648    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
41649    -DWIN32 -DIAL"
41650    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
41651      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
41652    else
41653      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
41654    fi
41655  fi
41656
41657  ###############################################################################
41658
41659  # Adjust flags according to debug level.
41660  case $DEBUG_LEVEL in
41661    fastdebug )
41662      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41663      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41664      C_O_FLAG_HI="$C_O_FLAG_NORM"
41665      C_O_FLAG_NORM="$C_O_FLAG_NORM"
41666      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41667      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
41668      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41669      ;;
41670    slowdebug )
41671      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41672      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41673      C_O_FLAG_HI="$C_O_FLAG_NONE"
41674      C_O_FLAG_NORM="$C_O_FLAG_NONE"
41675      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
41676      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
41677      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41678      ;;
41679  esac
41680
41681  # Setup LP64
41682  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
41683
41684  # Set some common defines. These works for all compilers, but assume
41685  # -D is universally accepted.
41686
41687  # Setup endianness
41688  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
41689    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
41690    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
41691    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
41692    #   Note: -Dmacro         is the same as    #define macro 1
41693    #         -Dmacro=        is the same as    #define macro
41694    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41695      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
41696    else
41697      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
41698    fi
41699  else
41700    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
41701    # are defined in the system?
41702    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41703      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN="
41704    else
41705      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
41706    fi
41707  fi
41708
41709  # Setup target OS define. Use OS target name but in upper case.
41710  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
41711  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
41712
41713  # Setup target CPU
41714  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
41715
41716  # Setup debug/release defines
41717  if test "x$DEBUG_LEVEL" = xrelease; then
41718    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
41719    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41720      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
41721    fi
41722  else
41723    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
41724  fi
41725
41726  # Setup release name
41727  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
41728
41729
41730  # Set some additional per-OS defines.
41731  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41732    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
41733  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41734    # FIXME: PPC64 should not be here.
41735    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DPPC64"
41736  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
41737    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
41738  fi
41739
41740  # Additional macosx handling
41741  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41742    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41743      # FIXME: This needs to be exported in spec.gmk due to closed legacy code.
41744      # FIXME: clean this up, and/or move it elsewhere.
41745
41746      # Setting these parameters makes it an error to link to macosx APIs that are
41747      # newer than the given OS version and makes the linked binaries compatible
41748      # even if built on a newer version of the OS.
41749      # The expected format is X.Y.Z
41750      MACOSX_VERSION_MIN=10.7.0
41751
41752
41753      # The macro takes the version with no dots, ex: 1070
41754      # Let the flags variables get resolved in make for easier override on make
41755      # command line.
41756      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41757      LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41758    fi
41759  fi
41760
41761  # Setup some hard coded includes
41762  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
41763      -I${JDK_OUTPUTDIR}/include \
41764      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
41765      -I${JDK_TOPDIR}/src/share/javavm/export \
41766      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
41767      -I${JDK_TOPDIR}/src/share/native/common \
41768      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
41769
41770  # The shared libraries are compiled using the picflag.
41771  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
41772  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
41773
41774  # Executable flags
41775  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
41776  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
41777
41778
41779
41780
41781
41782
41783  # Setup LDFLAGS et al.
41784  #
41785  # Now this is odd. The JDK native libraries have to link against libjvm.so
41786  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
41787  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
41788  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
41789  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
41790  # libraries will link to whatever is in memory. Yuck.
41791  #
41792  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
41793  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41794    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
41795    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41796      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
41797    fi
41798    # TODO: make -debug optional "--disable-full-debug-symbols"
41799    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
41800    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
41801    LDFLAGS_JDKLIB_SUFFIX=""
41802    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
41803      LDFLAGS_STACK_SIZE=1048576
41804    else
41805      LDFLAGS_STACK_SIZE=327680
41806    fi
41807    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
41808  else
41809    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41810      # If this is a --hash-style=gnu system, use --hash-style=both, why?
41811      # We have previously set HAS_GNU_HASH if this is the case
41812      if test -n "$HAS_GNU_HASH"; then
41813        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
41814      fi
41815      if test "x$OPENJDK_TARGET_OS" = xlinux; then
41816        # And since we now know that the linker is gnu, then add -z defs, to forbid
41817        # undefined symbols in object files.
41818        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
41819        if test "x$DEBUG_LEVEL" = "xrelease"; then
41820          # When building release libraries, tell the linker optimize them.
41821          # Should this be supplied to the OSS linker as well?
41822          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
41823        fi
41824      fi
41825    fi
41826
41827    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41828      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
41829      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
41830    fi
41831
41832    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
41833        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
41834
41835    # On some platforms (mac) the linker warns about non existing -L dirs.
41836    # Add server first if available. Linking aginst client does not always produce the same results.
41837    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
41838    # Default to server for other variants.
41839    if test "x$JVM_VARIANT_SERVER" = xtrue; then
41840      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41841    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
41842      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
41843    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
41844      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
41845    else
41846      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41847    fi
41848
41849    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
41850    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41851      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
41852    fi
41853
41854    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
41855    if test "x$OPENJDK_TARGET_OS" = xlinux; then
41856      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
41857    fi
41858  fi
41859
41860
41861
41862
41863
41864
41865
41866
41867  # Some Zero and Shark settings.
41868  # ZERO_ARCHFLAG tells the compiler which mode to build for
41869  case "${OPENJDK_TARGET_CPU}" in
41870    s390)
41871      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
41872      ;;
41873    *)
41874      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41875  esac
41876
41877  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
41878$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
41879  supports=yes
41880
41881  saved_cflags="$CFLAGS"
41882  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
41883  ac_ext=c
41884ac_cpp='$CPP $CPPFLAGS'
41885ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41886ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41887ac_compiler_gnu=$ac_cv_c_compiler_gnu
41888
41889  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41890/* end confdefs.h.  */
41891int i;
41892_ACEOF
41893if ac_fn_c_try_compile "$LINENO"; then :
41894
41895else
41896  supports=no
41897fi
41898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41899  ac_ext=cpp
41900ac_cpp='$CXXCPP $CPPFLAGS'
41901ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41902ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41903ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41904
41905  CFLAGS="$saved_cflags"
41906
41907  saved_cxxflags="$CXXFLAGS"
41908  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
41909  ac_ext=cpp
41910ac_cpp='$CXXCPP $CPPFLAGS'
41911ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41912ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41913ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41914
41915  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41916/* end confdefs.h.  */
41917int i;
41918_ACEOF
41919if ac_fn_cxx_try_compile "$LINENO"; then :
41920
41921else
41922  supports=no
41923fi
41924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41925  ac_ext=cpp
41926ac_cpp='$CXXCPP $CPPFLAGS'
41927ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41928ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41929ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41930
41931  CXXFLAGS="$saved_cxxflags"
41932
41933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41934$as_echo "$supports" >&6; }
41935  if test "x$supports" = "xyes" ; then
41936    :
41937  else
41938    ZERO_ARCHFLAG=""
41939  fi
41940
41941
41942
41943  # Check that the compiler supports -mX (or -qX on AIX) flags
41944  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
41945
41946  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
41947$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
41948  supports=yes
41949
41950  saved_cflags="$CFLAGS"
41951  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41952  ac_ext=c
41953ac_cpp='$CPP $CPPFLAGS'
41954ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41955ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41956ac_compiler_gnu=$ac_cv_c_compiler_gnu
41957
41958  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41959/* end confdefs.h.  */
41960int i;
41961_ACEOF
41962if ac_fn_c_try_compile "$LINENO"; then :
41963
41964else
41965  supports=no
41966fi
41967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41968  ac_ext=cpp
41969ac_cpp='$CXXCPP $CPPFLAGS'
41970ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41971ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41972ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41973
41974  CFLAGS="$saved_cflags"
41975
41976  saved_cxxflags="$CXXFLAGS"
41977  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41978  ac_ext=cpp
41979ac_cpp='$CXXCPP $CPPFLAGS'
41980ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41981ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41982ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41983
41984  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41985/* end confdefs.h.  */
41986int i;
41987_ACEOF
41988if ac_fn_cxx_try_compile "$LINENO"; then :
41989
41990else
41991  supports=no
41992fi
41993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41994  ac_ext=cpp
41995ac_cpp='$CXXCPP $CPPFLAGS'
41996ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41997ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41998ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41999
42000  CXXFLAGS="$saved_cxxflags"
42001
42002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42003$as_echo "$supports" >&6; }
42004  if test "x$supports" = "xyes" ; then
42005    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42006  else
42007    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42008  fi
42009
42010
42011
42012  case "${TOOLCHAIN_TYPE}" in
42013    microsoft)
42014      CFLAGS_WARNINGS_ARE_ERRORS="/WX"
42015      ;;
42016    solstudio)
42017      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42018      ;;
42019    gcc)
42020      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42021      ;;
42022    clang)
42023      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42024      ;;
42025  esac
42026
42027
42028
42029# Setup debug symbols (need objcopy from the toolchain for that)
42030
42031  #
42032  # ENABLE_DEBUG_SYMBOLS
42033  # This must be done after the toolchain is setup, since we're looking at objcopy.
42034  #
42035  # Check whether --enable-debug-symbols was given.
42036if test "${enable_debug_symbols+set}" = set; then :
42037  enableval=$enable_debug_symbols;
42038fi
42039
42040
42041  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42042$as_echo_n "checking if we should generate debug symbols... " >&6; }
42043
42044  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42045    # explicit enabling of enable-debug-symbols and can't find objcopy
42046    #   this is an error
42047    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42048  fi
42049
42050  if test "x$enable_debug_symbols" = "xyes"; then
42051    ENABLE_DEBUG_SYMBOLS=true
42052  elif test "x$enable_debug_symbols" = "xno"; then
42053    ENABLE_DEBUG_SYMBOLS=false
42054  else
42055    # Default is on if objcopy is found
42056    if test "x$OBJCOPY" != x; then
42057      ENABLE_DEBUG_SYMBOLS=true
42058    # MacOS X and Windows don't use objcopy but default is on for those OSes
42059    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42060      ENABLE_DEBUG_SYMBOLS=true
42061    else
42062      ENABLE_DEBUG_SYMBOLS=false
42063    fi
42064  fi
42065
42066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42067$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42068
42069  #
42070  # ZIP_DEBUGINFO_FILES
42071  #
42072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42073$as_echo_n "checking if we should zip debug-info files... " >&6; }
42074  # Check whether --enable-zip-debug-info was given.
42075if test "${enable_zip_debug_info+set}" = set; then :
42076  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42077else
42078  enable_zip_debug_info="yes"
42079fi
42080
42081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42082$as_echo "${enable_zip_debug_info}" >&6; }
42083
42084  if test "x${enable_zip_debug_info}" = "xno"; then
42085    ZIP_DEBUGINFO_FILES=false
42086  else
42087    ZIP_DEBUGINFO_FILES=true
42088  fi
42089
42090
42091
42092
42093
42094###############################################################################
42095#
42096# Check dependencies for external and internal libraries.
42097#
42098###############################################################################
42099
42100# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42101
42102  # When using cygwin or msys, we need a wrapper binary that renames
42103  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42104  # @files and rewrites these too! This wrapper binary is
42105  # called fixpath.
42106  FIXPATH=
42107  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42109$as_echo_n "checking if fixpath can be created... " >&6; }
42110    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42111    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42112    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42113      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42114      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42115      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42116      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42117    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42118      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42119      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42120
42121      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42122      # @ was chosen as separator to minimize risk of other tools messing around with it
42123      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42124      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42125
42126      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42127    fi
42128    rm -f $OUTPUT_ROOT/fixpath*
42129    cd $OUTPUT_ROOT
42130    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42131    cd $CURDIR
42132
42133    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42134      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42135$as_echo "no" >&6; }
42136      cat $OUTPUT_ROOT/fixpath1.log
42137      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42138    fi
42139    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42140$as_echo "yes" >&6; }
42141    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42142$as_echo_n "checking if fixpath.exe works... " >&6; }
42143    cd $OUTPUT_ROOT
42144    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42145    cd $CURDIR
42146    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42147      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42148$as_echo "no" >&6; }
42149      cat $OUTPUT_ROOT/fixpath2.log
42150      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42151    fi
42152    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42153$as_echo "yes" >&6; }
42154    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42155  fi
42156
42157
42158
42159
42160
42161
42162  ###############################################################################
42163  #
42164  # OS specific settings that we never will need to probe.
42165  #
42166  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42167    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42168$as_echo_n "checking what is not needed on Linux?... " >&6; }
42169    PULSE_NOT_NEEDED=yes
42170    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42171$as_echo "pulse" >&6; }
42172  fi
42173
42174  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42175    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42176$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42177    ALSA_NOT_NEEDED=yes
42178    PULSE_NOT_NEEDED=yes
42179    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42180$as_echo "alsa pulse" >&6; }
42181  fi
42182
42183  if test "x$OPENJDK_TARGET_OS" = xaix; then
42184    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42185$as_echo_n "checking what is not needed on AIX?... " >&6; }
42186    ALSA_NOT_NEEDED=yes
42187    PULSE_NOT_NEEDED=yes
42188    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42189$as_echo "alsa pulse" >&6; }
42190  fi
42191
42192
42193  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42195$as_echo_n "checking what is not needed on Windows?... " >&6; }
42196    CUPS_NOT_NEEDED=yes
42197    ALSA_NOT_NEEDED=yes
42198    PULSE_NOT_NEEDED=yes
42199    X11_NOT_NEEDED=yes
42200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42201$as_echo "alsa cups pulse x11" >&6; }
42202  fi
42203
42204  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42205    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42206$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42207    ALSA_NOT_NEEDED=yes
42208    PULSE_NOT_NEEDED=yes
42209    X11_NOT_NEEDED=yes
42210    # If the java runtime framework is disabled, then we need X11.
42211    # This will be adjusted below.
42212    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42213$as_echo "alsa pulse x11" >&6; }
42214  fi
42215
42216  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42217    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42218$as_echo_n "checking what is not needed on bsd?... " >&6; }
42219    ALSA_NOT_NEEDED=yes
42220    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42221$as_echo "alsa" >&6; }
42222  fi
42223
42224  if test "x$OPENJDK" = "xfalse"; then
42225    FREETYPE_NOT_NEEDED=yes
42226  fi
42227
42228  if test "x$SUPPORT_HEADFUL" = xno; then
42229    X11_NOT_NEEDED=yes
42230  fi
42231
42232  ###############################################################################
42233  #
42234  # Check for MacOSX support for OpenJDK.
42235  #
42236
42237
42238  # Check whether --enable-macosx-runtime-support was given.
42239if test "${enable_macosx_runtime_support+set}" = set; then :
42240  enableval=$enable_macosx_runtime_support;
42241fi
42242
42243  if test "x$enable_macosx_runtime_support" != x; then
42244    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
42245$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
42246  fi
42247
42248
42249  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
42250$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
42251  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
42252    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
42253$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
42254  else
42255    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42256$as_echo "no" >&6; }
42257  fi
42258
42259
42260
42261  ###############################################################################
42262  #
42263  # Check for X Windows
42264  #
42265
42266  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42267  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42268  # --x-libraries for the sysroot, if that seems to be correct.
42269  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
42270    if test "x$SYSROOT" != "x"; then
42271      if test "x$x_includes" = xNONE; then
42272        if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
42273          x_includes="$SYSROOT/usr/X11R6/include"
42274        elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
42275          x_includes="$SYSROOT/usr/include"
42276        fi
42277      fi
42278      if test "x$x_libraries" = xNONE; then
42279        if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
42280          x_libraries="$SYSROOT/usr/X11R6/lib"
42281        elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42282          x_libraries="$SYSROOT/usr/lib64"
42283        elif test -f "$SYSROOT/usr/lib/libX11.so"; then
42284          x_libraries="$SYSROOT/usr/lib"
42285        fi
42286      fi
42287    fi
42288  fi
42289
42290  # Now let autoconf do it's magic
42291  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42292$as_echo_n "checking for X... " >&6; }
42293
42294
42295# Check whether --with-x was given.
42296if test "${with_x+set}" = set; then :
42297  withval=$with_x;
42298fi
42299
42300# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42301if test "x$with_x" = xno; then
42302  # The user explicitly disabled X.
42303  have_x=disabled
42304else
42305  case $x_includes,$x_libraries in #(
42306    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42307    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42308  $as_echo_n "(cached) " >&6
42309else
42310  # One or both of the vars are not set, and there is no cached value.
42311ac_x_includes=no ac_x_libraries=no
42312rm -f -r conftest.dir
42313if mkdir conftest.dir; then
42314  cd conftest.dir
42315  cat >Imakefile <<'_ACEOF'
42316incroot:
42317	@echo incroot='${INCROOT}'
42318usrlibdir:
42319	@echo usrlibdir='${USRLIBDIR}'
42320libdir:
42321	@echo libdir='${LIBDIR}'
42322_ACEOF
42323  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42324    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42325    for ac_var in incroot usrlibdir libdir; do
42326      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42327    done
42328    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42329    for ac_extension in a so sl dylib la dll; do
42330      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42331	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42332	ac_im_usrlibdir=$ac_im_libdir; break
42333      fi
42334    done
42335    # Screen out bogus values from the imake configuration.  They are
42336    # bogus both because they are the default anyway, and because
42337    # using them would break gcc on systems where it needs fixed includes.
42338    case $ac_im_incroot in
42339	/usr/include) ac_x_includes= ;;
42340	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42341    esac
42342    case $ac_im_usrlibdir in
42343	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
42344	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42345    esac
42346  fi
42347  cd ..
42348  rm -f -r conftest.dir
42349fi
42350
42351# Standard set of common directories for X headers.
42352# Check X11 before X11Rn because it is often a symlink to the current release.
42353ac_x_header_dirs='
42354/usr/X11/include
42355/usr/X11R7/include
42356/usr/X11R6/include
42357/usr/X11R5/include
42358/usr/X11R4/include
42359
42360/usr/include/X11
42361/usr/include/X11R7
42362/usr/include/X11R6
42363/usr/include/X11R5
42364/usr/include/X11R4
42365
42366/usr/local/X11/include
42367/usr/local/X11R7/include
42368/usr/local/X11R6/include
42369/usr/local/X11R5/include
42370/usr/local/X11R4/include
42371
42372/usr/local/include/X11
42373/usr/local/include/X11R7
42374/usr/local/include/X11R6
42375/usr/local/include/X11R5
42376/usr/local/include/X11R4
42377
42378/usr/X386/include
42379/usr/x386/include
42380/usr/XFree86/include/X11
42381
42382/usr/include
42383/usr/local/include
42384/usr/unsupported/include
42385/usr/athena/include
42386/usr/local/x11r5/include
42387/usr/lpp/Xamples/include
42388
42389/usr/openwin/include
42390/usr/openwin/share/include'
42391
42392if test "$ac_x_includes" = no; then
42393  # Guess where to find include files, by looking for Xlib.h.
42394  # First, try using that file with no special directory specified.
42395  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42396/* end confdefs.h.  */
42397#include <X11/Xlib.h>
42398_ACEOF
42399if ac_fn_cxx_try_cpp "$LINENO"; then :
42400  # We can compile using X headers with no special include directory.
42401ac_x_includes=
42402else
42403  for ac_dir in $ac_x_header_dirs; do
42404  if test -r "$ac_dir/X11/Xlib.h"; then
42405    ac_x_includes=$ac_dir
42406    break
42407  fi
42408done
42409fi
42410rm -f conftest.err conftest.i conftest.$ac_ext
42411fi # $ac_x_includes = no
42412
42413if test "$ac_x_libraries" = no; then
42414  # Check for the libraries.
42415  # See if we find them without any special options.
42416  # Don't add to $LIBS permanently.
42417  ac_save_LIBS=$LIBS
42418  LIBS="-lX11 $LIBS"
42419  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42420/* end confdefs.h.  */
42421#include <X11/Xlib.h>
42422int
42423main ()
42424{
42425XrmInitialize ()
42426  ;
42427  return 0;
42428}
42429_ACEOF
42430if ac_fn_cxx_try_link "$LINENO"; then :
42431  LIBS=$ac_save_LIBS
42432# We can link X programs with no special library path.
42433ac_x_libraries=
42434else
42435  LIBS=$ac_save_LIBS
42436for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42437do
42438  # Don't even attempt the hair of trying to link an X program!
42439  for ac_extension in a so sl dylib la dll; do
42440    if test -r "$ac_dir/libX11.$ac_extension"; then
42441      ac_x_libraries=$ac_dir
42442      break 2
42443    fi
42444  done
42445done
42446fi
42447rm -f core conftest.err conftest.$ac_objext \
42448    conftest$ac_exeext conftest.$ac_ext
42449fi # $ac_x_libraries = no
42450
42451case $ac_x_includes,$ac_x_libraries in #(
42452  no,* | *,no | *\'*)
42453    # Didn't find X, or a directory has "'" in its name.
42454    ac_cv_have_x="have_x=no";; #(
42455  *)
42456    # Record where we found X for the cache.
42457    ac_cv_have_x="have_x=yes\
42458	ac_x_includes='$ac_x_includes'\
42459	ac_x_libraries='$ac_x_libraries'"
42460esac
42461fi
42462;; #(
42463    *) have_x=yes;;
42464  esac
42465  eval "$ac_cv_have_x"
42466fi # $with_x != no
42467
42468if test "$have_x" != yes; then
42469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
42470$as_echo "$have_x" >&6; }
42471  no_x=yes
42472else
42473  # If each of the values was on the command line, it overrides each guess.
42474  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
42475  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
42476  # Update the cache value to reflect the command line values.
42477  ac_cv_have_x="have_x=yes\
42478	ac_x_includes='$x_includes'\
42479	ac_x_libraries='$x_libraries'"
42480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
42481$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
42482fi
42483
42484  if test "$no_x" = yes; then
42485  # Not all programs may use this symbol, but it does not hurt to define it.
42486
42487$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
42488
42489  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
42490else
42491  if test -n "$x_includes"; then
42492    X_CFLAGS="$X_CFLAGS -I$x_includes"
42493  fi
42494
42495  # It would also be nice to do this for all -L options, not just this one.
42496  if test -n "$x_libraries"; then
42497    X_LIBS="$X_LIBS -L$x_libraries"
42498    # For Solaris; some versions of Sun CC require a space after -R and
42499    # others require no space.  Words are not sufficient . . . .
42500    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
42501$as_echo_n "checking whether -R must be followed by a space... " >&6; }
42502    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
42503    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
42504    ac_cxx_werror_flag=yes
42505    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42506/* end confdefs.h.  */
42507
42508int
42509main ()
42510{
42511
42512  ;
42513  return 0;
42514}
42515_ACEOF
42516if ac_fn_cxx_try_link "$LINENO"; then :
42517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42518$as_echo "no" >&6; }
42519       X_LIBS="$X_LIBS -R$x_libraries"
42520else
42521  LIBS="$ac_xsave_LIBS -R $x_libraries"
42522       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42523/* end confdefs.h.  */
42524
42525int
42526main ()
42527{
42528
42529  ;
42530  return 0;
42531}
42532_ACEOF
42533if ac_fn_cxx_try_link "$LINENO"; then :
42534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42535$as_echo "yes" >&6; }
42536	  X_LIBS="$X_LIBS -R $x_libraries"
42537else
42538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
42539$as_echo "neither works" >&6; }
42540fi
42541rm -f core conftest.err conftest.$ac_objext \
42542    conftest$ac_exeext conftest.$ac_ext
42543fi
42544rm -f core conftest.err conftest.$ac_objext \
42545    conftest$ac_exeext conftest.$ac_ext
42546    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
42547    LIBS=$ac_xsave_LIBS
42548  fi
42549
42550  # Check for system-dependent libraries X programs must link with.
42551  # Do this before checking for the system-independent R6 libraries
42552  # (-lICE), since we may need -lsocket or whatever for X linking.
42553
42554  if test "$ISC" = yes; then
42555    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
42556  else
42557    # Martyn Johnson says this is needed for Ultrix, if the X
42558    # libraries were built with DECnet support.  And Karl Berry says
42559    # the Alpha needs dnet_stub (dnet does not exist).
42560    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
42561    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42562/* end confdefs.h.  */
42563
42564/* Override any GCC internal prototype to avoid an error.
42565   Use char because int might match the return type of a GCC
42566   builtin and then its argument prototype would still apply.  */
42567#ifdef __cplusplus
42568extern "C"
42569#endif
42570char XOpenDisplay ();
42571int
42572main ()
42573{
42574return XOpenDisplay ();
42575  ;
42576  return 0;
42577}
42578_ACEOF
42579if ac_fn_cxx_try_link "$LINENO"; then :
42580
42581else
42582  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
42583$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
42584if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
42585  $as_echo_n "(cached) " >&6
42586else
42587  ac_check_lib_save_LIBS=$LIBS
42588LIBS="-ldnet  $LIBS"
42589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42590/* end confdefs.h.  */
42591
42592/* Override any GCC internal prototype to avoid an error.
42593   Use char because int might match the return type of a GCC
42594   builtin and then its argument prototype would still apply.  */
42595#ifdef __cplusplus
42596extern "C"
42597#endif
42598char dnet_ntoa ();
42599int
42600main ()
42601{
42602return dnet_ntoa ();
42603  ;
42604  return 0;
42605}
42606_ACEOF
42607if ac_fn_cxx_try_link "$LINENO"; then :
42608  ac_cv_lib_dnet_dnet_ntoa=yes
42609else
42610  ac_cv_lib_dnet_dnet_ntoa=no
42611fi
42612rm -f core conftest.err conftest.$ac_objext \
42613    conftest$ac_exeext conftest.$ac_ext
42614LIBS=$ac_check_lib_save_LIBS
42615fi
42616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
42617$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
42618if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
42619  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
42620fi
42621
42622    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
42623      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
42624$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
42625if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
42626  $as_echo_n "(cached) " >&6
42627else
42628  ac_check_lib_save_LIBS=$LIBS
42629LIBS="-ldnet_stub  $LIBS"
42630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42631/* end confdefs.h.  */
42632
42633/* Override any GCC internal prototype to avoid an error.
42634   Use char because int might match the return type of a GCC
42635   builtin and then its argument prototype would still apply.  */
42636#ifdef __cplusplus
42637extern "C"
42638#endif
42639char dnet_ntoa ();
42640int
42641main ()
42642{
42643return dnet_ntoa ();
42644  ;
42645  return 0;
42646}
42647_ACEOF
42648if ac_fn_cxx_try_link "$LINENO"; then :
42649  ac_cv_lib_dnet_stub_dnet_ntoa=yes
42650else
42651  ac_cv_lib_dnet_stub_dnet_ntoa=no
42652fi
42653rm -f core conftest.err conftest.$ac_objext \
42654    conftest$ac_exeext conftest.$ac_ext
42655LIBS=$ac_check_lib_save_LIBS
42656fi
42657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
42658$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
42659if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
42660  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
42661fi
42662
42663    fi
42664fi
42665rm -f core conftest.err conftest.$ac_objext \
42666    conftest$ac_exeext conftest.$ac_ext
42667    LIBS="$ac_xsave_LIBS"
42668
42669    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
42670    # to get the SysV transport functions.
42671    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
42672    # needs -lnsl.
42673    # The nsl library prevents programs from opening the X display
42674    # on Irix 5.2, according to T.E. Dickey.
42675    # The functions gethostbyname, getservbyname, and inet_addr are
42676    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
42677    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
42678if test "x$ac_cv_func_gethostbyname" = xyes; then :
42679
42680fi
42681
42682    if test $ac_cv_func_gethostbyname = no; then
42683      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
42684$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
42685if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
42686  $as_echo_n "(cached) " >&6
42687else
42688  ac_check_lib_save_LIBS=$LIBS
42689LIBS="-lnsl  $LIBS"
42690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42691/* end confdefs.h.  */
42692
42693/* Override any GCC internal prototype to avoid an error.
42694   Use char because int might match the return type of a GCC
42695   builtin and then its argument prototype would still apply.  */
42696#ifdef __cplusplus
42697extern "C"
42698#endif
42699char gethostbyname ();
42700int
42701main ()
42702{
42703return gethostbyname ();
42704  ;
42705  return 0;
42706}
42707_ACEOF
42708if ac_fn_cxx_try_link "$LINENO"; then :
42709  ac_cv_lib_nsl_gethostbyname=yes
42710else
42711  ac_cv_lib_nsl_gethostbyname=no
42712fi
42713rm -f core conftest.err conftest.$ac_objext \
42714    conftest$ac_exeext conftest.$ac_ext
42715LIBS=$ac_check_lib_save_LIBS
42716fi
42717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
42718$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
42719if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
42720  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
42721fi
42722
42723      if test $ac_cv_lib_nsl_gethostbyname = no; then
42724	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
42725$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
42726if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
42727  $as_echo_n "(cached) " >&6
42728else
42729  ac_check_lib_save_LIBS=$LIBS
42730LIBS="-lbsd  $LIBS"
42731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42732/* end confdefs.h.  */
42733
42734/* Override any GCC internal prototype to avoid an error.
42735   Use char because int might match the return type of a GCC
42736   builtin and then its argument prototype would still apply.  */
42737#ifdef __cplusplus
42738extern "C"
42739#endif
42740char gethostbyname ();
42741int
42742main ()
42743{
42744return gethostbyname ();
42745  ;
42746  return 0;
42747}
42748_ACEOF
42749if ac_fn_cxx_try_link "$LINENO"; then :
42750  ac_cv_lib_bsd_gethostbyname=yes
42751else
42752  ac_cv_lib_bsd_gethostbyname=no
42753fi
42754rm -f core conftest.err conftest.$ac_objext \
42755    conftest$ac_exeext conftest.$ac_ext
42756LIBS=$ac_check_lib_save_LIBS
42757fi
42758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
42759$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
42760if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
42761  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
42762fi
42763
42764      fi
42765    fi
42766
42767    # lieder@skyler.mavd.honeywell.com says without -lsocket,
42768    # socket/setsockopt and other routines are undefined under SCO ODT
42769    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
42770    # on later versions), says Simon Leinen: it contains gethostby*
42771    # variants that don't use the name server (or something).  -lsocket
42772    # must be given before -lnsl if both are needed.  We assume that
42773    # if connect needs -lnsl, so does gethostbyname.
42774    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
42775if test "x$ac_cv_func_connect" = xyes; then :
42776
42777fi
42778
42779    if test $ac_cv_func_connect = no; then
42780      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
42781$as_echo_n "checking for connect in -lsocket... " >&6; }
42782if ${ac_cv_lib_socket_connect+:} false; then :
42783  $as_echo_n "(cached) " >&6
42784else
42785  ac_check_lib_save_LIBS=$LIBS
42786LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
42787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42788/* end confdefs.h.  */
42789
42790/* Override any GCC internal prototype to avoid an error.
42791   Use char because int might match the return type of a GCC
42792   builtin and then its argument prototype would still apply.  */
42793#ifdef __cplusplus
42794extern "C"
42795#endif
42796char connect ();
42797int
42798main ()
42799{
42800return connect ();
42801  ;
42802  return 0;
42803}
42804_ACEOF
42805if ac_fn_cxx_try_link "$LINENO"; then :
42806  ac_cv_lib_socket_connect=yes
42807else
42808  ac_cv_lib_socket_connect=no
42809fi
42810rm -f core conftest.err conftest.$ac_objext \
42811    conftest$ac_exeext conftest.$ac_ext
42812LIBS=$ac_check_lib_save_LIBS
42813fi
42814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
42815$as_echo "$ac_cv_lib_socket_connect" >&6; }
42816if test "x$ac_cv_lib_socket_connect" = xyes; then :
42817  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
42818fi
42819
42820    fi
42821
42822    # Guillermo Gomez says -lposix is necessary on A/UX.
42823    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
42824if test "x$ac_cv_func_remove" = xyes; then :
42825
42826fi
42827
42828    if test $ac_cv_func_remove = no; then
42829      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
42830$as_echo_n "checking for remove in -lposix... " >&6; }
42831if ${ac_cv_lib_posix_remove+:} false; then :
42832  $as_echo_n "(cached) " >&6
42833else
42834  ac_check_lib_save_LIBS=$LIBS
42835LIBS="-lposix  $LIBS"
42836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42837/* end confdefs.h.  */
42838
42839/* Override any GCC internal prototype to avoid an error.
42840   Use char because int might match the return type of a GCC
42841   builtin and then its argument prototype would still apply.  */
42842#ifdef __cplusplus
42843extern "C"
42844#endif
42845char remove ();
42846int
42847main ()
42848{
42849return remove ();
42850  ;
42851  return 0;
42852}
42853_ACEOF
42854if ac_fn_cxx_try_link "$LINENO"; then :
42855  ac_cv_lib_posix_remove=yes
42856else
42857  ac_cv_lib_posix_remove=no
42858fi
42859rm -f core conftest.err conftest.$ac_objext \
42860    conftest$ac_exeext conftest.$ac_ext
42861LIBS=$ac_check_lib_save_LIBS
42862fi
42863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
42864$as_echo "$ac_cv_lib_posix_remove" >&6; }
42865if test "x$ac_cv_lib_posix_remove" = xyes; then :
42866  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
42867fi
42868
42869    fi
42870
42871    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
42872    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
42873if test "x$ac_cv_func_shmat" = xyes; then :
42874
42875fi
42876
42877    if test $ac_cv_func_shmat = no; then
42878      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
42879$as_echo_n "checking for shmat in -lipc... " >&6; }
42880if ${ac_cv_lib_ipc_shmat+:} false; then :
42881  $as_echo_n "(cached) " >&6
42882else
42883  ac_check_lib_save_LIBS=$LIBS
42884LIBS="-lipc  $LIBS"
42885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42886/* end confdefs.h.  */
42887
42888/* Override any GCC internal prototype to avoid an error.
42889   Use char because int might match the return type of a GCC
42890   builtin and then its argument prototype would still apply.  */
42891#ifdef __cplusplus
42892extern "C"
42893#endif
42894char shmat ();
42895int
42896main ()
42897{
42898return shmat ();
42899  ;
42900  return 0;
42901}
42902_ACEOF
42903if ac_fn_cxx_try_link "$LINENO"; then :
42904  ac_cv_lib_ipc_shmat=yes
42905else
42906  ac_cv_lib_ipc_shmat=no
42907fi
42908rm -f core conftest.err conftest.$ac_objext \
42909    conftest$ac_exeext conftest.$ac_ext
42910LIBS=$ac_check_lib_save_LIBS
42911fi
42912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
42913$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
42914if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
42915  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
42916fi
42917
42918    fi
42919  fi
42920
42921  # Check for libraries that X11R6 Xt/Xaw programs need.
42922  ac_save_LDFLAGS=$LDFLAGS
42923  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
42924  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
42925  # check for ICE first), but we must link in the order -lSM -lICE or
42926  # we get undefined symbols.  So assume we have SM if we have ICE.
42927  # These have to be linked with before -lX11, unlike the other
42928  # libraries we check for below, so use a different variable.
42929  # John Interrante, Karl Berry
42930  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
42931$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
42932if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
42933  $as_echo_n "(cached) " >&6
42934else
42935  ac_check_lib_save_LIBS=$LIBS
42936LIBS="-lICE $X_EXTRA_LIBS $LIBS"
42937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42938/* end confdefs.h.  */
42939
42940/* Override any GCC internal prototype to avoid an error.
42941   Use char because int might match the return type of a GCC
42942   builtin and then its argument prototype would still apply.  */
42943#ifdef __cplusplus
42944extern "C"
42945#endif
42946char IceConnectionNumber ();
42947int
42948main ()
42949{
42950return IceConnectionNumber ();
42951  ;
42952  return 0;
42953}
42954_ACEOF
42955if ac_fn_cxx_try_link "$LINENO"; then :
42956  ac_cv_lib_ICE_IceConnectionNumber=yes
42957else
42958  ac_cv_lib_ICE_IceConnectionNumber=no
42959fi
42960rm -f core conftest.err conftest.$ac_objext \
42961    conftest$ac_exeext conftest.$ac_ext
42962LIBS=$ac_check_lib_save_LIBS
42963fi
42964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
42965$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
42966if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
42967  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
42968fi
42969
42970  LDFLAGS=$ac_save_LDFLAGS
42971
42972fi
42973
42974
42975  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
42976  # this doesn't make sense so we remove it.
42977  if test "x$COMPILE_TYPE" = xcross; then
42978    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
42979  fi
42980
42981  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
42982
42983  # Print a helpful message on how to acquire the necessary build dependency.
42984  # x11 is the help tag: freetype, cups, pulse, alsa etc
42985  MISSING_DEPENDENCY=x11
42986
42987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42988    cygwin_help $MISSING_DEPENDENCY
42989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42990    msys_help $MISSING_DEPENDENCY
42991  else
42992    PKGHANDLER_COMMAND=
42993
42994    case $PKGHANDLER in
42995      apt-get)
42996        apt_help     $MISSING_DEPENDENCY ;;
42997      yum)
42998        yum_help     $MISSING_DEPENDENCY ;;
42999      port)
43000        port_help    $MISSING_DEPENDENCY ;;
43001      pkgutil)
43002        pkgutil_help $MISSING_DEPENDENCY ;;
43003      pkgadd)
43004        pkgadd_help  $MISSING_DEPENDENCY ;;
43005    esac
43006
43007    if test "x$PKGHANDLER_COMMAND" != x; then
43008      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43009    fi
43010  fi
43011
43012    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43013  fi
43014
43015  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43016    OPENWIN_HOME="/usr/openwin"
43017    X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43018    X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43019        -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43020        -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43021        -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43022  fi
43023
43024  #
43025  # Weird Sol10 something check...TODO change to try compile
43026  #
43027  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
43028    if test "`uname -r`" = "5.10"; then
43029      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
43030        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
43031      fi
43032    fi
43033  fi
43034
43035  ac_ext=c
43036ac_cpp='$CPP $CPPFLAGS'
43037ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43038ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43039ac_compiler_gnu=$ac_cv_c_compiler_gnu
43040
43041  OLD_CFLAGS="$CFLAGS"
43042  CFLAGS="$CFLAGS $X_CFLAGS"
43043
43044  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43045  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43046do :
43047  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43048ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43049        # include <X11/Xlib.h>
43050        # include <X11/Xutil.h>
43051
43052
43053"
43054if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43055  cat >>confdefs.h <<_ACEOF
43056#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43057_ACEOF
43058 X11_A_OK=yes
43059else
43060  X11_A_OK=no; break
43061fi
43062
43063done
43064
43065
43066  CFLAGS="$OLD_CFLAGS"
43067  ac_ext=cpp
43068ac_cpp='$CXXCPP $CPPFLAGS'
43069ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43070ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43071ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43072
43073
43074  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
43075
43076  # Print a helpful message on how to acquire the necessary build dependency.
43077  # x11 is the help tag: freetype, cups, pulse, alsa etc
43078  MISSING_DEPENDENCY=x11
43079
43080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43081    cygwin_help $MISSING_DEPENDENCY
43082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43083    msys_help $MISSING_DEPENDENCY
43084  else
43085    PKGHANDLER_COMMAND=
43086
43087    case $PKGHANDLER in
43088      apt-get)
43089        apt_help     $MISSING_DEPENDENCY ;;
43090      yum)
43091        yum_help     $MISSING_DEPENDENCY ;;
43092      port)
43093        port_help    $MISSING_DEPENDENCY ;;
43094      pkgutil)
43095        pkgutil_help $MISSING_DEPENDENCY ;;
43096      pkgadd)
43097        pkgadd_help  $MISSING_DEPENDENCY ;;
43098    esac
43099
43100    if test "x$PKGHANDLER_COMMAND" != x; then
43101      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43102    fi
43103  fi
43104
43105    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43106  fi
43107
43108
43109
43110
43111
43112
43113  ###############################################################################
43114  #
43115  # The common unix printing system cups is used to print from java.
43116  #
43117
43118# Check whether --with-cups was given.
43119if test "${with_cups+set}" = set; then :
43120  withval=$with_cups;
43121fi
43122
43123
43124# Check whether --with-cups-include was given.
43125if test "${with_cups_include+set}" = set; then :
43126  withval=$with_cups_include;
43127fi
43128
43129
43130  if test "x$CUPS_NOT_NEEDED" = xyes; then
43131    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43132      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43133$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43134    fi
43135    CUPS_CFLAGS=
43136  else
43137    CUPS_FOUND=no
43138
43139    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43140      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43141    fi
43142
43143    if test "x${with_cups}" != x; then
43144      CUPS_CFLAGS="-I${with_cups}/include"
43145      CUPS_FOUND=yes
43146    fi
43147    if test "x${with_cups_include}" != x; then
43148      CUPS_CFLAGS="-I${with_cups_include}"
43149      CUPS_FOUND=yes
43150    fi
43151    if test "x$CUPS_FOUND" = xno; then
43152
43153
43154  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43155    # Source the builddeps file again, to make sure it uses the latest variables!
43156    . $builddepsfile
43157    # Look for a target and build machine specific resource!
43158    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43159    if test "x$resource" = x; then
43160      # Ok, lets instead look for a target specific resource
43161      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43162    fi
43163    if test "x$resource" = x; then
43164      # Ok, lets instead look for a build specific resource
43165      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43166    fi
43167    if test "x$resource" = x; then
43168      # Ok, lets instead look for a generic resource
43169      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43170      resource=${builddep_cups}
43171    fi
43172    if test "x$resource" != x; then
43173      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43174$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43175      # If the resource in the builddeps.conf file is an existing directory,
43176      # for example /java/linux/cups
43177      if test -d ${resource}; then
43178        depdir=${resource}
43179      else
43180
43181  # cups is for example mymodule
43182  # $resource is for example libs/general/libmymod_1_2_3.zip
43183  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43184  # $with_builddeps_dir is for example /localhome/builddeps
43185  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43186  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43187  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43188  filename=`basename $resource`
43189  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43190  filebase=${filename%%.*}
43191  extension=${filename#*.}
43192  installdir=$with_builddeps_dir/$filebase
43193  if test ! -f $installdir/$filename.unpacked; then
43194    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43195$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43196    if test ! -d $installdir; then
43197      mkdir -p $installdir
43198    fi
43199    if test ! -d $installdir; then
43200      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43201    fi
43202    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43203    touch $tmpfile
43204    if test ! -f $tmpfile; then
43205      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43206    fi
43207
43208  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43209  # $tmpfile is the local file name for the downloaded file.
43210  VALID_TOOL=no
43211  if test "x$BDEPS_FTP" = xwget; then
43212    VALID_TOOL=yes
43213    wget -O $tmpfile $with_builddeps_server/$resource
43214  fi
43215  if test "x$BDEPS_FTP" = xlftp; then
43216    VALID_TOOL=yes
43217    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43218  fi
43219  if test "x$BDEPS_FTP" = xftp; then
43220    VALID_TOOL=yes
43221    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43222    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43223    FTPUSERPWD=${FTPSERVER%%@*}
43224    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43225      FTPUSER=${userpwd%%:*}
43226      FTPPWD=${userpwd#*@}
43227      FTPSERVER=${FTPSERVER#*@}
43228    else
43229      FTPUSER=ftp
43230      FTPPWD=ftp
43231    fi
43232    # the "pass" command does not work on some
43233    # ftp clients (read ftp.exe) but if it works,
43234    # passive mode is better!
43235    ( \
43236        echo "user $FTPUSER $FTPPWD"        ; \
43237        echo "pass"                         ; \
43238        echo "bin"                          ; \
43239        echo "get $FTPPATH $tmpfile"              ; \
43240    ) | ftp -in $FTPSERVER
43241  fi
43242  if test "x$VALID_TOOL" != xyes; then
43243    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43244  fi
43245
43246    mv $tmpfile $installdir/$filename
43247    if test ! -s $installdir/$filename; then
43248      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43249    fi
43250    case "$extension" in
43251      zip)  echo "Unzipping $installdir/$filename..."
43252        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43253        ;;
43254      tar.gz) echo "Untaring $installdir/$filename..."
43255        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43256        ;;
43257      tgz) echo "Untaring $installdir/$filename..."
43258        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43259        ;;
43260      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43261        ;;
43262    esac
43263  fi
43264  if test -f $installdir/$filename.unpacked; then
43265    depdir=$installdir
43266  fi
43267
43268      fi
43269      # Source the builddeps file again, because in the previous command, the depdir
43270      # was updated to point at the current build dependency install directory.
43271      . $builddepsfile
43272      # Now extract variables from the builddeps.conf files.
43273      theroot=${builddep_cups_ROOT}
43274      thecflags=${builddep_cups_CFLAGS}
43275      thelibs=${builddep_cups_LIBS}
43276      if test "x$depdir" = x; then
43277        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43278      fi
43279      CUPS=$depdir
43280      if test "x$theroot" != x; then
43281        CUPS="$theroot"
43282      fi
43283      if test "x$thecflags" != x; then
43284        CUPS_CFLAGS="$thecflags"
43285      fi
43286      if test "x$thelibs" != x; then
43287        CUPS_LIBS="$thelibs"
43288      fi
43289      CUPS_FOUND=yes
43290
43291    fi
43292
43293  fi
43294
43295    fi
43296    if test "x$CUPS_FOUND" = xno; then
43297      # Are the cups headers installed in the default /usr/include location?
43298      for ac_header in cups/cups.h cups/ppd.h
43299do :
43300  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43301ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43302if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43303  cat >>confdefs.h <<_ACEOF
43304#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43305_ACEOF
43306
43307            CUPS_FOUND=yes
43308            CUPS_CFLAGS=
43309            DEFAULT_CUPS=yes
43310
43311
43312fi
43313
43314done
43315
43316    fi
43317    if test "x$CUPS_FOUND" = xno; then
43318      # Getting nervous now? Lets poke around for standard Solaris third-party
43319      # package installation locations.
43320      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43321$as_echo_n "checking for cups headers... " >&6; }
43322      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
43323        # An SFW package seems to be installed!
43324        CUPS_FOUND=yes
43325        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
43326      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
43327        # A CSW package seems to be installed!
43328        CUPS_FOUND=yes
43329        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
43330      fi
43331      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43332$as_echo "$CUPS_FOUND" >&6; }
43333    fi
43334    if test "x$CUPS_FOUND" = xno; then
43335
43336  # Print a helpful message on how to acquire the necessary build dependency.
43337  # cups is the help tag: freetype, cups, pulse, alsa etc
43338  MISSING_DEPENDENCY=cups
43339
43340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43341    cygwin_help $MISSING_DEPENDENCY
43342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43343    msys_help $MISSING_DEPENDENCY
43344  else
43345    PKGHANDLER_COMMAND=
43346
43347    case $PKGHANDLER in
43348      apt-get)
43349        apt_help     $MISSING_DEPENDENCY ;;
43350      yum)
43351        yum_help     $MISSING_DEPENDENCY ;;
43352      port)
43353        port_help    $MISSING_DEPENDENCY ;;
43354      pkgutil)
43355        pkgutil_help $MISSING_DEPENDENCY ;;
43356      pkgadd)
43357        pkgadd_help  $MISSING_DEPENDENCY ;;
43358    esac
43359
43360    if test "x$PKGHANDLER_COMMAND" != x; then
43361      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43362    fi
43363  fi
43364
43365      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43366    fi
43367  fi
43368
43369
43370
43371
43372
43373
43374  ###############################################################################
43375  #
43376  # The ubiquitous freetype library is used to render fonts.
43377  #
43378
43379# Check whether --with-freetype was given.
43380if test "${with_freetype+set}" = set; then :
43381  withval=$with_freetype;
43382fi
43383
43384
43385# Check whether --with-freetype-include was given.
43386if test "${with_freetype_include+set}" = set; then :
43387  withval=$with_freetype_include;
43388fi
43389
43390
43391# Check whether --with-freetype-lib was given.
43392if test "${with_freetype_lib+set}" = set; then :
43393  withval=$with_freetype_lib;
43394fi
43395
43396  # Check whether --enable-freetype-bundling was given.
43397if test "${enable_freetype_bundling+set}" = set; then :
43398  enableval=$enable_freetype_bundling;
43399fi
43400
43401
43402  FREETYPE_CFLAGS=
43403  FREETYPE_LIBS=
43404  FREETYPE_BUNDLE_LIB_PATH=
43405
43406  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43407    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43408      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43409$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43410    fi
43411    if test "x$enable_freetype_bundling" != x; then
43412      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43413$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43414    fi
43415  else
43416    # freetype is needed to build; go get it!
43417
43418    BUNDLE_FREETYPE="$enable_freetype_bundling"
43419
43420    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43421      # User has specified settings
43422
43423      if test "x$BUNDLE_FREETYPE" = x; then
43424        # If not specified, default is to bundle freetype
43425        BUNDLE_FREETYPE=yes
43426      fi
43427
43428      if test "x$with_freetype" != x; then
43429        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
43430        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
43431      fi
43432
43433      # Allow --with-freetype-lib and --with-freetype-include to override
43434      if test "x$with_freetype_include" != x; then
43435        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
43436      fi
43437      if test "x$with_freetype_lib" != x; then
43438        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
43439      fi
43440
43441      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
43442        # Okay, we got it. Check that it works.
43443
43444  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43445  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43446  METHOD="--with-freetype"
43447
43448  # First check if the files exists.
43449  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43450    # We found an arbitrary include file. That's a good sign.
43451    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43452$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43453    FOUND_FREETYPE=yes
43454
43455    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43456    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43457      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43458$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43459      FOUND_FREETYPE=no
43460    else
43461      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43462        # On Windows, we will need both .lib and .dll file.
43463        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43464          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43465$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43466          FOUND_FREETYPE=no
43467        fi
43468      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
43469        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43470        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43471      fi
43472    fi
43473  fi
43474
43475  if test "x$FOUND_FREETYPE" = xyes; then
43476
43477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43478
43479  # Input might be given as Windows format, start by converting to
43480  # unix format.
43481  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43482  new_path=`$CYGPATH -u "$path"`
43483
43484  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43485  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43486  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43487  # "foo.exe" is OK but "foo" is an error.
43488  #
43489  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43490  # It is also a way to make sure we got the proper file name for the real test later on.
43491  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43492  if test "x$test_shortpath" = x; then
43493    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43494$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43495    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43496  fi
43497
43498  # Call helper function which possibly converts this using DOS-style short mode.
43499  # If so, the updated path is stored in $new_path.
43500
43501  input_path="$new_path"
43502  # Check if we need to convert this using DOS-style short mode. If the path
43503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43504  # take no chances and rewrite it.
43505  # Note: m4 eats our [], so we need to use [ and ] instead.
43506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43507  if test "x$has_forbidden_chars" != x; then
43508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43509    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43510    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43511    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43512      # Going to short mode and back again did indeed matter. Since short mode is
43513      # case insensitive, let's make it lowercase to improve readability.
43514      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43515      # Now convert it back to Unix-stile (cygpath)
43516      input_path=`$CYGPATH -u "$shortmode_path"`
43517      new_path="$input_path"
43518    fi
43519  fi
43520
43521  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43522  if test "x$test_cygdrive_prefix" = x; then
43523    # As a simple fix, exclude /usr/bin since it's not a real path.
43524    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43525      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43526      # a path prefixed by /cygdrive for fixpath to work.
43527      new_path="$CYGWIN_ROOT_PATH$input_path"
43528    fi
43529  fi
43530
43531
43532  if test "x$path" != "x$new_path"; then
43533    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43535$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43536  fi
43537
43538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43539
43540  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43541  has_colon=`$ECHO $path | $GREP ^.:`
43542  new_path="$path"
43543  if test "x$has_colon" = x; then
43544    # Not in mixed or Windows style, start by that.
43545    new_path=`cmd //c echo $path`
43546  fi
43547
43548
43549  input_path="$new_path"
43550  # Check if we need to convert this using DOS-style short mode. If the path
43551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43552  # take no chances and rewrite it.
43553  # Note: m4 eats our [], so we need to use [ and ] instead.
43554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43555  if test "x$has_forbidden_chars" != x; then
43556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43557    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43558  fi
43559
43560
43561  windows_path="$new_path"
43562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43563    unix_path=`$CYGPATH -u "$windows_path"`
43564    new_path="$unix_path"
43565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43567    new_path="$unix_path"
43568  fi
43569
43570  if test "x$path" != "x$new_path"; then
43571    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43573$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43574  fi
43575
43576  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43577  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43578
43579  else
43580    # We're on a posix platform. Hooray! :)
43581    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43582    has_space=`$ECHO "$path" | $GREP " "`
43583    if test "x$has_space" != x; then
43584      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43585$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43586      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43587    fi
43588
43589    # Use eval to expand a potential ~
43590    eval path="$path"
43591    if test ! -f "$path" && test ! -d "$path"; then
43592      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43593    fi
43594
43595    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43596  fi
43597
43598
43599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43600
43601  # Input might be given as Windows format, start by converting to
43602  # unix format.
43603  path="$POTENTIAL_FREETYPE_LIB_PATH"
43604  new_path=`$CYGPATH -u "$path"`
43605
43606  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43607  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43608  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43609  # "foo.exe" is OK but "foo" is an error.
43610  #
43611  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43612  # It is also a way to make sure we got the proper file name for the real test later on.
43613  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43614  if test "x$test_shortpath" = x; then
43615    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43616$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43617    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43618  fi
43619
43620  # Call helper function which possibly converts this using DOS-style short mode.
43621  # If so, the updated path is stored in $new_path.
43622
43623  input_path="$new_path"
43624  # Check if we need to convert this using DOS-style short mode. If the path
43625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43626  # take no chances and rewrite it.
43627  # Note: m4 eats our [], so we need to use [ and ] instead.
43628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43629  if test "x$has_forbidden_chars" != x; then
43630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43631    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43632    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43633    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43634      # Going to short mode and back again did indeed matter. Since short mode is
43635      # case insensitive, let's make it lowercase to improve readability.
43636      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43637      # Now convert it back to Unix-stile (cygpath)
43638      input_path=`$CYGPATH -u "$shortmode_path"`
43639      new_path="$input_path"
43640    fi
43641  fi
43642
43643  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43644  if test "x$test_cygdrive_prefix" = x; then
43645    # As a simple fix, exclude /usr/bin since it's not a real path.
43646    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43647      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43648      # a path prefixed by /cygdrive for fixpath to work.
43649      new_path="$CYGWIN_ROOT_PATH$input_path"
43650    fi
43651  fi
43652
43653
43654  if test "x$path" != "x$new_path"; then
43655    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43657$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43658  fi
43659
43660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43661
43662  path="$POTENTIAL_FREETYPE_LIB_PATH"
43663  has_colon=`$ECHO $path | $GREP ^.:`
43664  new_path="$path"
43665  if test "x$has_colon" = x; then
43666    # Not in mixed or Windows style, start by that.
43667    new_path=`cmd //c echo $path`
43668  fi
43669
43670
43671  input_path="$new_path"
43672  # Check if we need to convert this using DOS-style short mode. If the path
43673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43674  # take no chances and rewrite it.
43675  # Note: m4 eats our [], so we need to use [ and ] instead.
43676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43677  if test "x$has_forbidden_chars" != x; then
43678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43679    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43680  fi
43681
43682
43683  windows_path="$new_path"
43684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43685    unix_path=`$CYGPATH -u "$windows_path"`
43686    new_path="$unix_path"
43687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43689    new_path="$unix_path"
43690  fi
43691
43692  if test "x$path" != "x$new_path"; then
43693    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43695$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43696  fi
43697
43698  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43699  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43700
43701  else
43702    # We're on a posix platform. Hooray! :)
43703    path="$POTENTIAL_FREETYPE_LIB_PATH"
43704    has_space=`$ECHO "$path" | $GREP " "`
43705    if test "x$has_space" != x; then
43706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43707$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43708      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43709    fi
43710
43711    # Use eval to expand a potential ~
43712    eval path="$path"
43713    if test ! -f "$path" && test ! -d "$path"; then
43714      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43715    fi
43716
43717    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43718  fi
43719
43720
43721    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43723$as_echo_n "checking for freetype includes... " >&6; }
43724    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43725$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43726    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43727    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43728$as_echo_n "checking for freetype libraries... " >&6; }
43729    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43730$as_echo "$FREETYPE_LIB_PATH" >&6; }
43731  fi
43732
43733        if test "x$FOUND_FREETYPE" != xyes; then
43734          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
43735        fi
43736      else
43737        # User specified only one of lib or include. This is an error.
43738        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
43739          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
43740$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
43741          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43742        else
43743          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
43744$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
43745          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43746        fi
43747      fi
43748    else
43749      # User did not specify settings, but we need freetype. Try to locate it.
43750
43751      if test "x$BUNDLE_FREETYPE" = x; then
43752        # If not specified, default is to bundle freetype only on windows
43753        if test "x$OPENJDK_TARGET_OS" = xwindows; then
43754          BUNDLE_FREETYPE=yes
43755        else
43756          BUNDLE_FREETYPE=no
43757        fi
43758      fi
43759
43760      if test "x$FOUND_FREETYPE" != xyes; then
43761        # Check builddeps
43762
43763
43764  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43765    # Source the builddeps file again, to make sure it uses the latest variables!
43766    . $builddepsfile
43767    # Look for a target and build machine specific resource!
43768    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43769    if test "x$resource" = x; then
43770      # Ok, lets instead look for a target specific resource
43771      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
43772    fi
43773    if test "x$resource" = x; then
43774      # Ok, lets instead look for a build specific resource
43775      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
43776    fi
43777    if test "x$resource" = x; then
43778      # Ok, lets instead look for a generic resource
43779      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
43780      resource=${builddep_freetype2}
43781    fi
43782    if test "x$resource" != x; then
43783      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
43784$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
43785      # If the resource in the builddeps.conf file is an existing directory,
43786      # for example /java/linux/cups
43787      if test -d ${resource}; then
43788        depdir=${resource}
43789      else
43790
43791  # freetype2 is for example mymodule
43792  # $resource is for example libs/general/libmymod_1_2_3.zip
43793  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43794  # $with_builddeps_dir is for example /localhome/builddeps
43795  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43796  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43797  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43798  filename=`basename $resource`
43799  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43800  filebase=${filename%%.*}
43801  extension=${filename#*.}
43802  installdir=$with_builddeps_dir/$filebase
43803  if test ! -f $installdir/$filename.unpacked; then
43804    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
43805$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43806    if test ! -d $installdir; then
43807      mkdir -p $installdir
43808    fi
43809    if test ! -d $installdir; then
43810      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43811    fi
43812    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
43813    touch $tmpfile
43814    if test ! -f $tmpfile; then
43815      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43816    fi
43817
43818  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43819  # $tmpfile is the local file name for the downloaded file.
43820  VALID_TOOL=no
43821  if test "x$BDEPS_FTP" = xwget; then
43822    VALID_TOOL=yes
43823    wget -O $tmpfile $with_builddeps_server/$resource
43824  fi
43825  if test "x$BDEPS_FTP" = xlftp; then
43826    VALID_TOOL=yes
43827    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43828  fi
43829  if test "x$BDEPS_FTP" = xftp; then
43830    VALID_TOOL=yes
43831    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43832    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43833    FTPUSERPWD=${FTPSERVER%%@*}
43834    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43835      FTPUSER=${userpwd%%:*}
43836      FTPPWD=${userpwd#*@}
43837      FTPSERVER=${FTPSERVER#*@}
43838    else
43839      FTPUSER=ftp
43840      FTPPWD=ftp
43841    fi
43842    # the "pass" command does not work on some
43843    # ftp clients (read ftp.exe) but if it works,
43844    # passive mode is better!
43845    ( \
43846        echo "user $FTPUSER $FTPPWD"        ; \
43847        echo "pass"                         ; \
43848        echo "bin"                          ; \
43849        echo "get $FTPPATH $tmpfile"              ; \
43850    ) | ftp -in $FTPSERVER
43851  fi
43852  if test "x$VALID_TOOL" != xyes; then
43853    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43854  fi
43855
43856    mv $tmpfile $installdir/$filename
43857    if test ! -s $installdir/$filename; then
43858      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43859    fi
43860    case "$extension" in
43861      zip)  echo "Unzipping $installdir/$filename..."
43862        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43863        ;;
43864      tar.gz) echo "Untaring $installdir/$filename..."
43865        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43866        ;;
43867      tgz) echo "Untaring $installdir/$filename..."
43868        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43869        ;;
43870      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43871        ;;
43872    esac
43873  fi
43874  if test -f $installdir/$filename.unpacked; then
43875    depdir=$installdir
43876  fi
43877
43878      fi
43879      # Source the builddeps file again, because in the previous command, the depdir
43880      # was updated to point at the current build dependency install directory.
43881      . $builddepsfile
43882      # Now extract variables from the builddeps.conf files.
43883      theroot=${builddep_freetype2_ROOT}
43884      thecflags=${builddep_freetype2_CFLAGS}
43885      thelibs=${builddep_freetype2_LIBS}
43886      if test "x$depdir" = x; then
43887        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
43888      fi
43889      FREETYPE=$depdir
43890      if test "x$theroot" != x; then
43891        FREETYPE="$theroot"
43892      fi
43893      if test "x$thecflags" != x; then
43894        FREETYPE_CFLAGS="$thecflags"
43895      fi
43896      if test "x$thelibs" != x; then
43897        FREETYPE_LIBS="$thelibs"
43898      fi
43899      FOUND_FREETYPE=yes
43900      else FOUND_FREETYPE=no
43901
43902    fi
43903    else FOUND_FREETYPE=no
43904
43905  fi
43906
43907        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
43908        if test "x$FOUND_FREETYPE" = xyes; then
43909          if test "x$BUNDLE_FREETYPE" = xyes; then
43910            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
43911$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
43912            FOUND_FREETYPE=no
43913          else
43914            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
43915$as_echo_n "checking for freetype... " >&6; }
43916            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
43917$as_echo "yes (using builddeps)" >&6; }
43918          fi
43919        fi
43920      fi
43921
43922      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
43923      if test "x$SYSROOT" = x; then
43924        if test "x$FOUND_FREETYPE" != xyes; then
43925          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
43926          if test "x$PKG_CONFIG" != x; then
43927
43928pkg_failed=no
43929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
43930$as_echo_n "checking for FREETYPE... " >&6; }
43931
43932if test -n "$FREETYPE_CFLAGS"; then
43933    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
43934 elif test -n "$PKG_CONFIG"; then
43935    if test -n "$PKG_CONFIG" && \
43936    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43937  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43938  ac_status=$?
43939  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43940  test $ac_status = 0; }; then
43941  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
43942else
43943  pkg_failed=yes
43944fi
43945 else
43946    pkg_failed=untried
43947fi
43948if test -n "$FREETYPE_LIBS"; then
43949    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
43950 elif test -n "$PKG_CONFIG"; then
43951    if test -n "$PKG_CONFIG" && \
43952    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43953  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43954  ac_status=$?
43955  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43956  test $ac_status = 0; }; then
43957  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
43958else
43959  pkg_failed=yes
43960fi
43961 else
43962    pkg_failed=untried
43963fi
43964
43965
43966
43967if test $pkg_failed = yes; then
43968
43969if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
43970        _pkg_short_errors_supported=yes
43971else
43972        _pkg_short_errors_supported=no
43973fi
43974        if test $_pkg_short_errors_supported = yes; then
43975	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
43976        else
43977	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
43978        fi
43979	# Put the nasty error message in config.log where it belongs
43980	echo "$FREETYPE_PKG_ERRORS" >&5
43981
43982	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43983$as_echo "no" >&6; }
43984                FOUND_FREETYPE=no
43985elif test $pkg_failed = untried; then
43986	FOUND_FREETYPE=no
43987else
43988	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
43989	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
43990        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43991$as_echo "yes" >&6; }
43992	FOUND_FREETYPE=yes
43993fi
43994            if test "x$FOUND_FREETYPE" = xyes; then
43995              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
43996              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
43997              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
43998              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
43999                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
44000              fi
44001              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44002              if test "x$BUNDLE_FREETYPE" = xyes; then
44003                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
44004$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
44005                FOUND_FREETYPE=no
44006              else
44007                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44008$as_echo_n "checking for freetype... " >&6; }
44009                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
44010$as_echo "yes (using pkg-config)" >&6; }
44011              fi
44012            fi
44013          fi
44014        fi
44015      fi
44016
44017      if test "x$FOUND_FREETYPE" != xyes; then
44018        # Check in well-known locations
44019        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44020          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
44021
44022  windows_path="$FREETYPE_BASE_DIR"
44023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44024    unix_path=`$CYGPATH -u "$windows_path"`
44025    FREETYPE_BASE_DIR="$unix_path"
44026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44028    FREETYPE_BASE_DIR="$unix_path"
44029  fi
44030
44031
44032  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44033  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44034  METHOD="well-known location"
44035
44036  # First check if the files exists.
44037  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44038    # We found an arbitrary include file. That's a good sign.
44039    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44040$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44041    FOUND_FREETYPE=yes
44042
44043    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44044    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44045      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44046$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44047      FOUND_FREETYPE=no
44048    else
44049      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44050        # On Windows, we will need both .lib and .dll file.
44051        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44052          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44053$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44054          FOUND_FREETYPE=no
44055        fi
44056      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
44057        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44058        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44059      fi
44060    fi
44061  fi
44062
44063  if test "x$FOUND_FREETYPE" = xyes; then
44064
44065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44066
44067  # Input might be given as Windows format, start by converting to
44068  # unix format.
44069  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44070  new_path=`$CYGPATH -u "$path"`
44071
44072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44075  # "foo.exe" is OK but "foo" is an error.
44076  #
44077  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44078  # It is also a way to make sure we got the proper file name for the real test later on.
44079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44080  if test "x$test_shortpath" = x; then
44081    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44082$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44083    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44084  fi
44085
44086  # Call helper function which possibly converts this using DOS-style short mode.
44087  # If so, the updated path is stored in $new_path.
44088
44089  input_path="$new_path"
44090  # Check if we need to convert this using DOS-style short mode. If the path
44091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44092  # take no chances and rewrite it.
44093  # Note: m4 eats our [], so we need to use [ and ] instead.
44094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44095  if test "x$has_forbidden_chars" != x; then
44096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44100      # Going to short mode and back again did indeed matter. Since short mode is
44101      # case insensitive, let's make it lowercase to improve readability.
44102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44103      # Now convert it back to Unix-stile (cygpath)
44104      input_path=`$CYGPATH -u "$shortmode_path"`
44105      new_path="$input_path"
44106    fi
44107  fi
44108
44109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44110  if test "x$test_cygdrive_prefix" = x; then
44111    # As a simple fix, exclude /usr/bin since it's not a real path.
44112    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44114      # a path prefixed by /cygdrive for fixpath to work.
44115      new_path="$CYGWIN_ROOT_PATH$input_path"
44116    fi
44117  fi
44118
44119
44120  if test "x$path" != "x$new_path"; then
44121    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44123$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44124  fi
44125
44126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44127
44128  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44129  has_colon=`$ECHO $path | $GREP ^.:`
44130  new_path="$path"
44131  if test "x$has_colon" = x; then
44132    # Not in mixed or Windows style, start by that.
44133    new_path=`cmd //c echo $path`
44134  fi
44135
44136
44137  input_path="$new_path"
44138  # Check if we need to convert this using DOS-style short mode. If the path
44139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44140  # take no chances and rewrite it.
44141  # Note: m4 eats our [], so we need to use [ and ] instead.
44142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44143  if test "x$has_forbidden_chars" != x; then
44144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44146  fi
44147
44148
44149  windows_path="$new_path"
44150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44151    unix_path=`$CYGPATH -u "$windows_path"`
44152    new_path="$unix_path"
44153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44155    new_path="$unix_path"
44156  fi
44157
44158  if test "x$path" != "x$new_path"; then
44159    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44161$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44162  fi
44163
44164  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44165  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44166
44167  else
44168    # We're on a posix platform. Hooray! :)
44169    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44170    has_space=`$ECHO "$path" | $GREP " "`
44171    if test "x$has_space" != x; then
44172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44173$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44174      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44175    fi
44176
44177    # Use eval to expand a potential ~
44178    eval path="$path"
44179    if test ! -f "$path" && test ! -d "$path"; then
44180      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44181    fi
44182
44183    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44184  fi
44185
44186
44187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44188
44189  # Input might be given as Windows format, start by converting to
44190  # unix format.
44191  path="$POTENTIAL_FREETYPE_LIB_PATH"
44192  new_path=`$CYGPATH -u "$path"`
44193
44194  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44195  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44196  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44197  # "foo.exe" is OK but "foo" is an error.
44198  #
44199  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44200  # It is also a way to make sure we got the proper file name for the real test later on.
44201  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44202  if test "x$test_shortpath" = x; then
44203    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44204$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44205    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44206  fi
44207
44208  # Call helper function which possibly converts this using DOS-style short mode.
44209  # If so, the updated path is stored in $new_path.
44210
44211  input_path="$new_path"
44212  # Check if we need to convert this using DOS-style short mode. If the path
44213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44214  # take no chances and rewrite it.
44215  # Note: m4 eats our [], so we need to use [ and ] instead.
44216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44217  if test "x$has_forbidden_chars" != x; then
44218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44219    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44220    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44221    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44222      # Going to short mode and back again did indeed matter. Since short mode is
44223      # case insensitive, let's make it lowercase to improve readability.
44224      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44225      # Now convert it back to Unix-stile (cygpath)
44226      input_path=`$CYGPATH -u "$shortmode_path"`
44227      new_path="$input_path"
44228    fi
44229  fi
44230
44231  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44232  if test "x$test_cygdrive_prefix" = x; then
44233    # As a simple fix, exclude /usr/bin since it's not a real path.
44234    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44235      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44236      # a path prefixed by /cygdrive for fixpath to work.
44237      new_path="$CYGWIN_ROOT_PATH$input_path"
44238    fi
44239  fi
44240
44241
44242  if test "x$path" != "x$new_path"; then
44243    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44245$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44246  fi
44247
44248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44249
44250  path="$POTENTIAL_FREETYPE_LIB_PATH"
44251  has_colon=`$ECHO $path | $GREP ^.:`
44252  new_path="$path"
44253  if test "x$has_colon" = x; then
44254    # Not in mixed or Windows style, start by that.
44255    new_path=`cmd //c echo $path`
44256  fi
44257
44258
44259  input_path="$new_path"
44260  # Check if we need to convert this using DOS-style short mode. If the path
44261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44262  # take no chances and rewrite it.
44263  # Note: m4 eats our [], so we need to use [ and ] instead.
44264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44265  if test "x$has_forbidden_chars" != x; then
44266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44267    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44268  fi
44269
44270
44271  windows_path="$new_path"
44272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44273    unix_path=`$CYGPATH -u "$windows_path"`
44274    new_path="$unix_path"
44275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44277    new_path="$unix_path"
44278  fi
44279
44280  if test "x$path" != "x$new_path"; then
44281    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44283$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44284  fi
44285
44286  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44287  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44288
44289  else
44290    # We're on a posix platform. Hooray! :)
44291    path="$POTENTIAL_FREETYPE_LIB_PATH"
44292    has_space=`$ECHO "$path" | $GREP " "`
44293    if test "x$has_space" != x; then
44294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44295$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44296      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44297    fi
44298
44299    # Use eval to expand a potential ~
44300    eval path="$path"
44301    if test ! -f "$path" && test ! -d "$path"; then
44302      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44303    fi
44304
44305    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44306  fi
44307
44308
44309    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44310    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44311$as_echo_n "checking for freetype includes... " >&6; }
44312    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44313$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44314    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44315    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44316$as_echo_n "checking for freetype libraries... " >&6; }
44317    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44318$as_echo "$FREETYPE_LIB_PATH" >&6; }
44319  fi
44320
44321          if test "x$FOUND_FREETYPE" != xyes; then
44322            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44323
44324  windows_path="$FREETYPE_BASE_DIR"
44325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44326    unix_path=`$CYGPATH -u "$windows_path"`
44327    FREETYPE_BASE_DIR="$unix_path"
44328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44330    FREETYPE_BASE_DIR="$unix_path"
44331  fi
44332
44333
44334  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44335  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44336  METHOD="well-known location"
44337
44338  # First check if the files exists.
44339  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44340    # We found an arbitrary include file. That's a good sign.
44341    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44342$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44343    FOUND_FREETYPE=yes
44344
44345    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44346    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44347      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44348$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44349      FOUND_FREETYPE=no
44350    else
44351      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44352        # On Windows, we will need both .lib and .dll file.
44353        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44354          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44355$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44356          FOUND_FREETYPE=no
44357        fi
44358      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
44359        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44360        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44361      fi
44362    fi
44363  fi
44364
44365  if test "x$FOUND_FREETYPE" = xyes; then
44366
44367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44368
44369  # Input might be given as Windows format, start by converting to
44370  # unix format.
44371  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44372  new_path=`$CYGPATH -u "$path"`
44373
44374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44377  # "foo.exe" is OK but "foo" is an error.
44378  #
44379  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44380  # It is also a way to make sure we got the proper file name for the real test later on.
44381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44382  if test "x$test_shortpath" = x; then
44383    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44384$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44385    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44386  fi
44387
44388  # Call helper function which possibly converts this using DOS-style short mode.
44389  # If so, the updated path is stored in $new_path.
44390
44391  input_path="$new_path"
44392  # Check if we need to convert this using DOS-style short mode. If the path
44393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44394  # take no chances and rewrite it.
44395  # Note: m4 eats our [], so we need to use [ and ] instead.
44396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44397  if test "x$has_forbidden_chars" != x; then
44398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44402      # Going to short mode and back again did indeed matter. Since short mode is
44403      # case insensitive, let's make it lowercase to improve readability.
44404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44405      # Now convert it back to Unix-stile (cygpath)
44406      input_path=`$CYGPATH -u "$shortmode_path"`
44407      new_path="$input_path"
44408    fi
44409  fi
44410
44411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44412  if test "x$test_cygdrive_prefix" = x; then
44413    # As a simple fix, exclude /usr/bin since it's not a real path.
44414    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44416      # a path prefixed by /cygdrive for fixpath to work.
44417      new_path="$CYGWIN_ROOT_PATH$input_path"
44418    fi
44419  fi
44420
44421
44422  if test "x$path" != "x$new_path"; then
44423    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44425$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44426  fi
44427
44428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44429
44430  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44431  has_colon=`$ECHO $path | $GREP ^.:`
44432  new_path="$path"
44433  if test "x$has_colon" = x; then
44434    # Not in mixed or Windows style, start by that.
44435    new_path=`cmd //c echo $path`
44436  fi
44437
44438
44439  input_path="$new_path"
44440  # Check if we need to convert this using DOS-style short mode. If the path
44441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44442  # take no chances and rewrite it.
44443  # Note: m4 eats our [], so we need to use [ and ] instead.
44444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44445  if test "x$has_forbidden_chars" != x; then
44446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44448  fi
44449
44450
44451  windows_path="$new_path"
44452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44453    unix_path=`$CYGPATH -u "$windows_path"`
44454    new_path="$unix_path"
44455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44457    new_path="$unix_path"
44458  fi
44459
44460  if test "x$path" != "x$new_path"; then
44461    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44463$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44464  fi
44465
44466  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44467  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44468
44469  else
44470    # We're on a posix platform. Hooray! :)
44471    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44472    has_space=`$ECHO "$path" | $GREP " "`
44473    if test "x$has_space" != x; then
44474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44475$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44476      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44477    fi
44478
44479    # Use eval to expand a potential ~
44480    eval path="$path"
44481    if test ! -f "$path" && test ! -d "$path"; then
44482      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44483    fi
44484
44485    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44486  fi
44487
44488
44489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44490
44491  # Input might be given as Windows format, start by converting to
44492  # unix format.
44493  path="$POTENTIAL_FREETYPE_LIB_PATH"
44494  new_path=`$CYGPATH -u "$path"`
44495
44496  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44497  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44498  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44499  # "foo.exe" is OK but "foo" is an error.
44500  #
44501  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44502  # It is also a way to make sure we got the proper file name for the real test later on.
44503  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44504  if test "x$test_shortpath" = x; then
44505    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44506$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44507    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44508  fi
44509
44510  # Call helper function which possibly converts this using DOS-style short mode.
44511  # If so, the updated path is stored in $new_path.
44512
44513  input_path="$new_path"
44514  # Check if we need to convert this using DOS-style short mode. If the path
44515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44516  # take no chances and rewrite it.
44517  # Note: m4 eats our [], so we need to use [ and ] instead.
44518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44519  if test "x$has_forbidden_chars" != x; then
44520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44524      # Going to short mode and back again did indeed matter. Since short mode is
44525      # case insensitive, let's make it lowercase to improve readability.
44526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44527      # Now convert it back to Unix-stile (cygpath)
44528      input_path=`$CYGPATH -u "$shortmode_path"`
44529      new_path="$input_path"
44530    fi
44531  fi
44532
44533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44534  if test "x$test_cygdrive_prefix" = x; then
44535    # As a simple fix, exclude /usr/bin since it's not a real path.
44536    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44538      # a path prefixed by /cygdrive for fixpath to work.
44539      new_path="$CYGWIN_ROOT_PATH$input_path"
44540    fi
44541  fi
44542
44543
44544  if test "x$path" != "x$new_path"; then
44545    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44547$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44548  fi
44549
44550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44551
44552  path="$POTENTIAL_FREETYPE_LIB_PATH"
44553  has_colon=`$ECHO $path | $GREP ^.:`
44554  new_path="$path"
44555  if test "x$has_colon" = x; then
44556    # Not in mixed or Windows style, start by that.
44557    new_path=`cmd //c echo $path`
44558  fi
44559
44560
44561  input_path="$new_path"
44562  # Check if we need to convert this using DOS-style short mode. If the path
44563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44564  # take no chances and rewrite it.
44565  # Note: m4 eats our [], so we need to use [ and ] instead.
44566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44567  if test "x$has_forbidden_chars" != x; then
44568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44569    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44570  fi
44571
44572
44573  windows_path="$new_path"
44574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44575    unix_path=`$CYGPATH -u "$windows_path"`
44576    new_path="$unix_path"
44577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44579    new_path="$unix_path"
44580  fi
44581
44582  if test "x$path" != "x$new_path"; then
44583    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44585$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44586  fi
44587
44588  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44589  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44590
44591  else
44592    # We're on a posix platform. Hooray! :)
44593    path="$POTENTIAL_FREETYPE_LIB_PATH"
44594    has_space=`$ECHO "$path" | $GREP " "`
44595    if test "x$has_space" != x; then
44596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44597$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44598      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44599    fi
44600
44601    # Use eval to expand a potential ~
44602    eval path="$path"
44603    if test ! -f "$path" && test ! -d "$path"; then
44604      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44605    fi
44606
44607    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44608  fi
44609
44610
44611    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44612    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44613$as_echo_n "checking for freetype includes... " >&6; }
44614    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44615$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44616    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44618$as_echo_n "checking for freetype libraries... " >&6; }
44619    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44620$as_echo "$FREETYPE_LIB_PATH" >&6; }
44621  fi
44622
44623          fi
44624        else
44625          FREETYPE_BASE_DIR="$SYSROOT/usr"
44626
44627  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44628  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44629  METHOD="well-known location"
44630
44631  # First check if the files exists.
44632  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44633    # We found an arbitrary include file. That's a good sign.
44634    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44635$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44636    FOUND_FREETYPE=yes
44637
44638    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44639    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44640      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44641$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44642      FOUND_FREETYPE=no
44643    else
44644      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44645        # On Windows, we will need both .lib and .dll file.
44646        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44647          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44648$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44649          FOUND_FREETYPE=no
44650        fi
44651      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
44652        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44653        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44654      fi
44655    fi
44656  fi
44657
44658  if test "x$FOUND_FREETYPE" = xyes; then
44659
44660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44661
44662  # Input might be given as Windows format, start by converting to
44663  # unix format.
44664  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44665  new_path=`$CYGPATH -u "$path"`
44666
44667  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44668  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44669  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44670  # "foo.exe" is OK but "foo" is an error.
44671  #
44672  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44673  # It is also a way to make sure we got the proper file name for the real test later on.
44674  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44675  if test "x$test_shortpath" = x; then
44676    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44677$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44678    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44679  fi
44680
44681  # Call helper function which possibly converts this using DOS-style short mode.
44682  # If so, the updated path is stored in $new_path.
44683
44684  input_path="$new_path"
44685  # Check if we need to convert this using DOS-style short mode. If the path
44686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44687  # take no chances and rewrite it.
44688  # Note: m4 eats our [], so we need to use [ and ] instead.
44689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44690  if test "x$has_forbidden_chars" != x; then
44691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44695      # Going to short mode and back again did indeed matter. Since short mode is
44696      # case insensitive, let's make it lowercase to improve readability.
44697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44698      # Now convert it back to Unix-stile (cygpath)
44699      input_path=`$CYGPATH -u "$shortmode_path"`
44700      new_path="$input_path"
44701    fi
44702  fi
44703
44704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44705  if test "x$test_cygdrive_prefix" = x; then
44706    # As a simple fix, exclude /usr/bin since it's not a real path.
44707    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44709      # a path prefixed by /cygdrive for fixpath to work.
44710      new_path="$CYGWIN_ROOT_PATH$input_path"
44711    fi
44712  fi
44713
44714
44715  if test "x$path" != "x$new_path"; then
44716    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44718$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44719  fi
44720
44721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44722
44723  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44724  has_colon=`$ECHO $path | $GREP ^.:`
44725  new_path="$path"
44726  if test "x$has_colon" = x; then
44727    # Not in mixed or Windows style, start by that.
44728    new_path=`cmd //c echo $path`
44729  fi
44730
44731
44732  input_path="$new_path"
44733  # Check if we need to convert this using DOS-style short mode. If the path
44734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44735  # take no chances and rewrite it.
44736  # Note: m4 eats our [], so we need to use [ and ] instead.
44737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44738  if test "x$has_forbidden_chars" != x; then
44739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44741  fi
44742
44743
44744  windows_path="$new_path"
44745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44746    unix_path=`$CYGPATH -u "$windows_path"`
44747    new_path="$unix_path"
44748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44750    new_path="$unix_path"
44751  fi
44752
44753  if test "x$path" != "x$new_path"; then
44754    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44755    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44756$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44757  fi
44758
44759  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44760  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44761
44762  else
44763    # We're on a posix platform. Hooray! :)
44764    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44765    has_space=`$ECHO "$path" | $GREP " "`
44766    if test "x$has_space" != x; then
44767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44768$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44769      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44770    fi
44771
44772    # Use eval to expand a potential ~
44773    eval path="$path"
44774    if test ! -f "$path" && test ! -d "$path"; then
44775      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44776    fi
44777
44778    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44779  fi
44780
44781
44782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44783
44784  # Input might be given as Windows format, start by converting to
44785  # unix format.
44786  path="$POTENTIAL_FREETYPE_LIB_PATH"
44787  new_path=`$CYGPATH -u "$path"`
44788
44789  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44790  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44791  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44792  # "foo.exe" is OK but "foo" is an error.
44793  #
44794  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44795  # It is also a way to make sure we got the proper file name for the real test later on.
44796  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44797  if test "x$test_shortpath" = x; then
44798    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44799$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44800    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44801  fi
44802
44803  # Call helper function which possibly converts this using DOS-style short mode.
44804  # If so, the updated path is stored in $new_path.
44805
44806  input_path="$new_path"
44807  # Check if we need to convert this using DOS-style short mode. If the path
44808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44809  # take no chances and rewrite it.
44810  # Note: m4 eats our [], so we need to use [ and ] instead.
44811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44812  if test "x$has_forbidden_chars" != x; then
44813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44817      # Going to short mode and back again did indeed matter. Since short mode is
44818      # case insensitive, let's make it lowercase to improve readability.
44819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44820      # Now convert it back to Unix-stile (cygpath)
44821      input_path=`$CYGPATH -u "$shortmode_path"`
44822      new_path="$input_path"
44823    fi
44824  fi
44825
44826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44827  if test "x$test_cygdrive_prefix" = x; then
44828    # As a simple fix, exclude /usr/bin since it's not a real path.
44829    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44831      # a path prefixed by /cygdrive for fixpath to work.
44832      new_path="$CYGWIN_ROOT_PATH$input_path"
44833    fi
44834  fi
44835
44836
44837  if test "x$path" != "x$new_path"; then
44838    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44840$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44841  fi
44842
44843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44844
44845  path="$POTENTIAL_FREETYPE_LIB_PATH"
44846  has_colon=`$ECHO $path | $GREP ^.:`
44847  new_path="$path"
44848  if test "x$has_colon" = x; then
44849    # Not in mixed or Windows style, start by that.
44850    new_path=`cmd //c echo $path`
44851  fi
44852
44853
44854  input_path="$new_path"
44855  # Check if we need to convert this using DOS-style short mode. If the path
44856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44857  # take no chances and rewrite it.
44858  # Note: m4 eats our [], so we need to use [ and ] instead.
44859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44860  if test "x$has_forbidden_chars" != x; then
44861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44863  fi
44864
44865
44866  windows_path="$new_path"
44867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44868    unix_path=`$CYGPATH -u "$windows_path"`
44869    new_path="$unix_path"
44870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44872    new_path="$unix_path"
44873  fi
44874
44875  if test "x$path" != "x$new_path"; then
44876    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44878$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44879  fi
44880
44881  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44882  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44883
44884  else
44885    # We're on a posix platform. Hooray! :)
44886    path="$POTENTIAL_FREETYPE_LIB_PATH"
44887    has_space=`$ECHO "$path" | $GREP " "`
44888    if test "x$has_space" != x; then
44889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44890$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44891      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44892    fi
44893
44894    # Use eval to expand a potential ~
44895    eval path="$path"
44896    if test ! -f "$path" && test ! -d "$path"; then
44897      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44898    fi
44899
44900    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44901  fi
44902
44903
44904    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44905    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44906$as_echo_n "checking for freetype includes... " >&6; }
44907    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44908$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44909    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44910    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44911$as_echo_n "checking for freetype libraries... " >&6; }
44912    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44913$as_echo "$FREETYPE_LIB_PATH" >&6; }
44914  fi
44915
44916
44917          if test "x$FOUND_FREETYPE" != xyes; then
44918            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
44919
44920  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44921  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44922  METHOD="well-known location"
44923
44924  # First check if the files exists.
44925  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44926    # We found an arbitrary include file. That's a good sign.
44927    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44928$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44929    FOUND_FREETYPE=yes
44930
44931    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44932    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44933      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44934$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44935      FOUND_FREETYPE=no
44936    else
44937      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44938        # On Windows, we will need both .lib and .dll file.
44939        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44940          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44941$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44942          FOUND_FREETYPE=no
44943        fi
44944      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
44945        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44946        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44947      fi
44948    fi
44949  fi
44950
44951  if test "x$FOUND_FREETYPE" = xyes; then
44952
44953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44954
44955  # Input might be given as Windows format, start by converting to
44956  # unix format.
44957  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44958  new_path=`$CYGPATH -u "$path"`
44959
44960  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44961  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44962  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44963  # "foo.exe" is OK but "foo" is an error.
44964  #
44965  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44966  # It is also a way to make sure we got the proper file name for the real test later on.
44967  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44968  if test "x$test_shortpath" = x; then
44969    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44970$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44971    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44972  fi
44973
44974  # Call helper function which possibly converts this using DOS-style short mode.
44975  # If so, the updated path is stored in $new_path.
44976
44977  input_path="$new_path"
44978  # Check if we need to convert this using DOS-style short mode. If the path
44979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44980  # take no chances and rewrite it.
44981  # Note: m4 eats our [], so we need to use [ and ] instead.
44982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44983  if test "x$has_forbidden_chars" != x; then
44984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44985    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44986    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44987    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44988      # Going to short mode and back again did indeed matter. Since short mode is
44989      # case insensitive, let's make it lowercase to improve readability.
44990      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44991      # Now convert it back to Unix-stile (cygpath)
44992      input_path=`$CYGPATH -u "$shortmode_path"`
44993      new_path="$input_path"
44994    fi
44995  fi
44996
44997  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44998  if test "x$test_cygdrive_prefix" = x; then
44999    # As a simple fix, exclude /usr/bin since it's not a real path.
45000    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45001      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45002      # a path prefixed by /cygdrive for fixpath to work.
45003      new_path="$CYGWIN_ROOT_PATH$input_path"
45004    fi
45005  fi
45006
45007
45008  if test "x$path" != "x$new_path"; then
45009    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45011$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45012  fi
45013
45014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45015
45016  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45017  has_colon=`$ECHO $path | $GREP ^.:`
45018  new_path="$path"
45019  if test "x$has_colon" = x; then
45020    # Not in mixed or Windows style, start by that.
45021    new_path=`cmd //c echo $path`
45022  fi
45023
45024
45025  input_path="$new_path"
45026  # Check if we need to convert this using DOS-style short mode. If the path
45027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45028  # take no chances and rewrite it.
45029  # Note: m4 eats our [], so we need to use [ and ] instead.
45030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45031  if test "x$has_forbidden_chars" != x; then
45032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45033    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45034  fi
45035
45036
45037  windows_path="$new_path"
45038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45039    unix_path=`$CYGPATH -u "$windows_path"`
45040    new_path="$unix_path"
45041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45043    new_path="$unix_path"
45044  fi
45045
45046  if test "x$path" != "x$new_path"; then
45047    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45049$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45050  fi
45051
45052  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45053  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45054
45055  else
45056    # We're on a posix platform. Hooray! :)
45057    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45058    has_space=`$ECHO "$path" | $GREP " "`
45059    if test "x$has_space" != x; then
45060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45061$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45062      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45063    fi
45064
45065    # Use eval to expand a potential ~
45066    eval path="$path"
45067    if test ! -f "$path" && test ! -d "$path"; then
45068      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45069    fi
45070
45071    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45072  fi
45073
45074
45075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45076
45077  # Input might be given as Windows format, start by converting to
45078  # unix format.
45079  path="$POTENTIAL_FREETYPE_LIB_PATH"
45080  new_path=`$CYGPATH -u "$path"`
45081
45082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45085  # "foo.exe" is OK but "foo" is an error.
45086  #
45087  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45088  # It is also a way to make sure we got the proper file name for the real test later on.
45089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45090  if test "x$test_shortpath" = x; then
45091    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45092$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45093    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45094  fi
45095
45096  # Call helper function which possibly converts this using DOS-style short mode.
45097  # If so, the updated path is stored in $new_path.
45098
45099  input_path="$new_path"
45100  # Check if we need to convert this using DOS-style short mode. If the path
45101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45102  # take no chances and rewrite it.
45103  # Note: m4 eats our [], so we need to use [ and ] instead.
45104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45105  if test "x$has_forbidden_chars" != x; then
45106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45107    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45108    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45109    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45110      # Going to short mode and back again did indeed matter. Since short mode is
45111      # case insensitive, let's make it lowercase to improve readability.
45112      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45113      # Now convert it back to Unix-stile (cygpath)
45114      input_path=`$CYGPATH -u "$shortmode_path"`
45115      new_path="$input_path"
45116    fi
45117  fi
45118
45119  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45120  if test "x$test_cygdrive_prefix" = x; then
45121    # As a simple fix, exclude /usr/bin since it's not a real path.
45122    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45123      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45124      # a path prefixed by /cygdrive for fixpath to work.
45125      new_path="$CYGWIN_ROOT_PATH$input_path"
45126    fi
45127  fi
45128
45129
45130  if test "x$path" != "x$new_path"; then
45131    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45133$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45134  fi
45135
45136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45137
45138  path="$POTENTIAL_FREETYPE_LIB_PATH"
45139  has_colon=`$ECHO $path | $GREP ^.:`
45140  new_path="$path"
45141  if test "x$has_colon" = x; then
45142    # Not in mixed or Windows style, start by that.
45143    new_path=`cmd //c echo $path`
45144  fi
45145
45146
45147  input_path="$new_path"
45148  # Check if we need to convert this using DOS-style short mode. If the path
45149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45150  # take no chances and rewrite it.
45151  # Note: m4 eats our [], so we need to use [ and ] instead.
45152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45153  if test "x$has_forbidden_chars" != x; then
45154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45155    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45156  fi
45157
45158
45159  windows_path="$new_path"
45160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45161    unix_path=`$CYGPATH -u "$windows_path"`
45162    new_path="$unix_path"
45163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45165    new_path="$unix_path"
45166  fi
45167
45168  if test "x$path" != "x$new_path"; then
45169    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45171$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45172  fi
45173
45174  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45175  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45176
45177  else
45178    # We're on a posix platform. Hooray! :)
45179    path="$POTENTIAL_FREETYPE_LIB_PATH"
45180    has_space=`$ECHO "$path" | $GREP " "`
45181    if test "x$has_space" != x; then
45182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45183$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45184      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45185    fi
45186
45187    # Use eval to expand a potential ~
45188    eval path="$path"
45189    if test ! -f "$path" && test ! -d "$path"; then
45190      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45191    fi
45192
45193    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45194  fi
45195
45196
45197    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45198    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45199$as_echo_n "checking for freetype includes... " >&6; }
45200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45201$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45202    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45203    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45204$as_echo_n "checking for freetype libraries... " >&6; }
45205    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45206$as_echo "$FREETYPE_LIB_PATH" >&6; }
45207  fi
45208
45209          fi
45210
45211          if test "x$FOUND_FREETYPE" != xyes; then
45212            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
45213
45214  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45215  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45216  METHOD="well-known location"
45217
45218  # First check if the files exists.
45219  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45220    # We found an arbitrary include file. That's a good sign.
45221    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45222$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45223    FOUND_FREETYPE=yes
45224
45225    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45226    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45227      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45228$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45229      FOUND_FREETYPE=no
45230    else
45231      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45232        # On Windows, we will need both .lib and .dll file.
45233        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45234          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45235$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45236          FOUND_FREETYPE=no
45237        fi
45238      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
45239        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45240        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45241      fi
45242    fi
45243  fi
45244
45245  if test "x$FOUND_FREETYPE" = xyes; then
45246
45247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45248
45249  # Input might be given as Windows format, start by converting to
45250  # unix format.
45251  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45252  new_path=`$CYGPATH -u "$path"`
45253
45254  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45255  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45256  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45257  # "foo.exe" is OK but "foo" is an error.
45258  #
45259  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45260  # It is also a way to make sure we got the proper file name for the real test later on.
45261  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45262  if test "x$test_shortpath" = x; then
45263    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45264$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45265    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45266  fi
45267
45268  # Call helper function which possibly converts this using DOS-style short mode.
45269  # If so, the updated path is stored in $new_path.
45270
45271  input_path="$new_path"
45272  # Check if we need to convert this using DOS-style short mode. If the path
45273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45274  # take no chances and rewrite it.
45275  # Note: m4 eats our [], so we need to use [ and ] instead.
45276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45277  if test "x$has_forbidden_chars" != x; then
45278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45279    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45280    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45281    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45282      # Going to short mode and back again did indeed matter. Since short mode is
45283      # case insensitive, let's make it lowercase to improve readability.
45284      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45285      # Now convert it back to Unix-stile (cygpath)
45286      input_path=`$CYGPATH -u "$shortmode_path"`
45287      new_path="$input_path"
45288    fi
45289  fi
45290
45291  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45292  if test "x$test_cygdrive_prefix" = x; then
45293    # As a simple fix, exclude /usr/bin since it's not a real path.
45294    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45295      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45296      # a path prefixed by /cygdrive for fixpath to work.
45297      new_path="$CYGWIN_ROOT_PATH$input_path"
45298    fi
45299  fi
45300
45301
45302  if test "x$path" != "x$new_path"; then
45303    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45304    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45305$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45306  fi
45307
45308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45309
45310  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45311  has_colon=`$ECHO $path | $GREP ^.:`
45312  new_path="$path"
45313  if test "x$has_colon" = x; then
45314    # Not in mixed or Windows style, start by that.
45315    new_path=`cmd //c echo $path`
45316  fi
45317
45318
45319  input_path="$new_path"
45320  # Check if we need to convert this using DOS-style short mode. If the path
45321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45322  # take no chances and rewrite it.
45323  # Note: m4 eats our [], so we need to use [ and ] instead.
45324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45325  if test "x$has_forbidden_chars" != x; then
45326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45327    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45328  fi
45329
45330
45331  windows_path="$new_path"
45332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45333    unix_path=`$CYGPATH -u "$windows_path"`
45334    new_path="$unix_path"
45335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45337    new_path="$unix_path"
45338  fi
45339
45340  if test "x$path" != "x$new_path"; then
45341    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45342    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45343$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45344  fi
45345
45346  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45347  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45348
45349  else
45350    # We're on a posix platform. Hooray! :)
45351    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45352    has_space=`$ECHO "$path" | $GREP " "`
45353    if test "x$has_space" != x; then
45354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45355$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45356      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45357    fi
45358
45359    # Use eval to expand a potential ~
45360    eval path="$path"
45361    if test ! -f "$path" && test ! -d "$path"; then
45362      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45363    fi
45364
45365    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45366  fi
45367
45368
45369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45370
45371  # Input might be given as Windows format, start by converting to
45372  # unix format.
45373  path="$POTENTIAL_FREETYPE_LIB_PATH"
45374  new_path=`$CYGPATH -u "$path"`
45375
45376  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45377  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45378  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45379  # "foo.exe" is OK but "foo" is an error.
45380  #
45381  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45382  # It is also a way to make sure we got the proper file name for the real test later on.
45383  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45384  if test "x$test_shortpath" = x; then
45385    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45386$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45387    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45388  fi
45389
45390  # Call helper function which possibly converts this using DOS-style short mode.
45391  # If so, the updated path is stored in $new_path.
45392
45393  input_path="$new_path"
45394  # Check if we need to convert this using DOS-style short mode. If the path
45395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45396  # take no chances and rewrite it.
45397  # Note: m4 eats our [], so we need to use [ and ] instead.
45398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45399  if test "x$has_forbidden_chars" != x; then
45400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45401    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45402    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45403    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45404      # Going to short mode and back again did indeed matter. Since short mode is
45405      # case insensitive, let's make it lowercase to improve readability.
45406      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45407      # Now convert it back to Unix-stile (cygpath)
45408      input_path=`$CYGPATH -u "$shortmode_path"`
45409      new_path="$input_path"
45410    fi
45411  fi
45412
45413  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45414  if test "x$test_cygdrive_prefix" = x; then
45415    # As a simple fix, exclude /usr/bin since it's not a real path.
45416    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45417      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45418      # a path prefixed by /cygdrive for fixpath to work.
45419      new_path="$CYGWIN_ROOT_PATH$input_path"
45420    fi
45421  fi
45422
45423
45424  if test "x$path" != "x$new_path"; then
45425    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45426    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45427$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45428  fi
45429
45430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45431
45432  path="$POTENTIAL_FREETYPE_LIB_PATH"
45433  has_colon=`$ECHO $path | $GREP ^.:`
45434  new_path="$path"
45435  if test "x$has_colon" = x; then
45436    # Not in mixed or Windows style, start by that.
45437    new_path=`cmd //c echo $path`
45438  fi
45439
45440
45441  input_path="$new_path"
45442  # Check if we need to convert this using DOS-style short mode. If the path
45443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45444  # take no chances and rewrite it.
45445  # Note: m4 eats our [], so we need to use [ and ] instead.
45446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45447  if test "x$has_forbidden_chars" != x; then
45448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45450  fi
45451
45452
45453  windows_path="$new_path"
45454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45455    unix_path=`$CYGPATH -u "$windows_path"`
45456    new_path="$unix_path"
45457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45459    new_path="$unix_path"
45460  fi
45461
45462  if test "x$path" != "x$new_path"; then
45463    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45465$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45466  fi
45467
45468  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45469  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45470
45471  else
45472    # We're on a posix platform. Hooray! :)
45473    path="$POTENTIAL_FREETYPE_LIB_PATH"
45474    has_space=`$ECHO "$path" | $GREP " "`
45475    if test "x$has_space" != x; then
45476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45477$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45478      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45479    fi
45480
45481    # Use eval to expand a potential ~
45482    eval path="$path"
45483    if test ! -f "$path" && test ! -d "$path"; then
45484      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45485    fi
45486
45487    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45488  fi
45489
45490
45491    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45492    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45493$as_echo_n "checking for freetype includes... " >&6; }
45494    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45495$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45496    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45497    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45498$as_echo_n "checking for freetype libraries... " >&6; }
45499    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45500$as_echo "$FREETYPE_LIB_PATH" >&6; }
45501  fi
45502
45503          fi
45504
45505          if test "x$FOUND_FREETYPE" != xyes; then
45506            FREETYPE_BASE_DIR="$SYSROOT/usr"
45507            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45508
45509  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45510  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
45511  METHOD="well-known location"
45512
45513  # First check if the files exists.
45514  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45515    # We found an arbitrary include file. That's a good sign.
45516    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45517$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45518    FOUND_FREETYPE=yes
45519
45520    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45521    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45522      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45523$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45524      FOUND_FREETYPE=no
45525    else
45526      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45527        # On Windows, we will need both .lib and .dll file.
45528        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45529          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45530$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45531          FOUND_FREETYPE=no
45532        fi
45533      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
45534        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45535        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45536      fi
45537    fi
45538  fi
45539
45540  if test "x$FOUND_FREETYPE" = xyes; then
45541
45542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45543
45544  # Input might be given as Windows format, start by converting to
45545  # unix format.
45546  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45547  new_path=`$CYGPATH -u "$path"`
45548
45549  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45550  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45551  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45552  # "foo.exe" is OK but "foo" is an error.
45553  #
45554  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45555  # It is also a way to make sure we got the proper file name for the real test later on.
45556  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45557  if test "x$test_shortpath" = x; then
45558    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45559$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45560    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45561  fi
45562
45563  # Call helper function which possibly converts this using DOS-style short mode.
45564  # If so, the updated path is stored in $new_path.
45565
45566  input_path="$new_path"
45567  # Check if we need to convert this using DOS-style short mode. If the path
45568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45569  # take no chances and rewrite it.
45570  # Note: m4 eats our [], so we need to use [ and ] instead.
45571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45572  if test "x$has_forbidden_chars" != x; then
45573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45574    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45575    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45576    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45577      # Going to short mode and back again did indeed matter. Since short mode is
45578      # case insensitive, let's make it lowercase to improve readability.
45579      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45580      # Now convert it back to Unix-stile (cygpath)
45581      input_path=`$CYGPATH -u "$shortmode_path"`
45582      new_path="$input_path"
45583    fi
45584  fi
45585
45586  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45587  if test "x$test_cygdrive_prefix" = x; then
45588    # As a simple fix, exclude /usr/bin since it's not a real path.
45589    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45590      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45591      # a path prefixed by /cygdrive for fixpath to work.
45592      new_path="$CYGWIN_ROOT_PATH$input_path"
45593    fi
45594  fi
45595
45596
45597  if test "x$path" != "x$new_path"; then
45598    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45600$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45601  fi
45602
45603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45604
45605  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45606  has_colon=`$ECHO $path | $GREP ^.:`
45607  new_path="$path"
45608  if test "x$has_colon" = x; then
45609    # Not in mixed or Windows style, start by that.
45610    new_path=`cmd //c echo $path`
45611  fi
45612
45613
45614  input_path="$new_path"
45615  # Check if we need to convert this using DOS-style short mode. If the path
45616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45617  # take no chances and rewrite it.
45618  # Note: m4 eats our [], so we need to use [ and ] instead.
45619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45620  if test "x$has_forbidden_chars" != x; then
45621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45622    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45623  fi
45624
45625
45626  windows_path="$new_path"
45627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45628    unix_path=`$CYGPATH -u "$windows_path"`
45629    new_path="$unix_path"
45630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45632    new_path="$unix_path"
45633  fi
45634
45635  if test "x$path" != "x$new_path"; then
45636    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45638$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45639  fi
45640
45641  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45642  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45643
45644  else
45645    # We're on a posix platform. Hooray! :)
45646    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45647    has_space=`$ECHO "$path" | $GREP " "`
45648    if test "x$has_space" != x; then
45649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45650$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45651      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45652    fi
45653
45654    # Use eval to expand a potential ~
45655    eval path="$path"
45656    if test ! -f "$path" && test ! -d "$path"; then
45657      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45658    fi
45659
45660    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45661  fi
45662
45663
45664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45665
45666  # Input might be given as Windows format, start by converting to
45667  # unix format.
45668  path="$POTENTIAL_FREETYPE_LIB_PATH"
45669  new_path=`$CYGPATH -u "$path"`
45670
45671  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45672  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45673  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45674  # "foo.exe" is OK but "foo" is an error.
45675  #
45676  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45677  # It is also a way to make sure we got the proper file name for the real test later on.
45678  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45679  if test "x$test_shortpath" = x; then
45680    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45681$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45682    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45683  fi
45684
45685  # Call helper function which possibly converts this using DOS-style short mode.
45686  # If so, the updated path is stored in $new_path.
45687
45688  input_path="$new_path"
45689  # Check if we need to convert this using DOS-style short mode. If the path
45690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45691  # take no chances and rewrite it.
45692  # Note: m4 eats our [], so we need to use [ and ] instead.
45693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45694  if test "x$has_forbidden_chars" != x; then
45695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45696    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45697    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45698    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45699      # Going to short mode and back again did indeed matter. Since short mode is
45700      # case insensitive, let's make it lowercase to improve readability.
45701      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45702      # Now convert it back to Unix-stile (cygpath)
45703      input_path=`$CYGPATH -u "$shortmode_path"`
45704      new_path="$input_path"
45705    fi
45706  fi
45707
45708  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45709  if test "x$test_cygdrive_prefix" = x; then
45710    # As a simple fix, exclude /usr/bin since it's not a real path.
45711    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45712      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45713      # a path prefixed by /cygdrive for fixpath to work.
45714      new_path="$CYGWIN_ROOT_PATH$input_path"
45715    fi
45716  fi
45717
45718
45719  if test "x$path" != "x$new_path"; then
45720    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45722$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45723  fi
45724
45725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45726
45727  path="$POTENTIAL_FREETYPE_LIB_PATH"
45728  has_colon=`$ECHO $path | $GREP ^.:`
45729  new_path="$path"
45730  if test "x$has_colon" = x; then
45731    # Not in mixed or Windows style, start by that.
45732    new_path=`cmd //c echo $path`
45733  fi
45734
45735
45736  input_path="$new_path"
45737  # Check if we need to convert this using DOS-style short mode. If the path
45738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45739  # take no chances and rewrite it.
45740  # Note: m4 eats our [], so we need to use [ and ] instead.
45741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45742  if test "x$has_forbidden_chars" != x; then
45743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45744    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45745  fi
45746
45747
45748  windows_path="$new_path"
45749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45750    unix_path=`$CYGPATH -u "$windows_path"`
45751    new_path="$unix_path"
45752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45754    new_path="$unix_path"
45755  fi
45756
45757  if test "x$path" != "x$new_path"; then
45758    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45759    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45760$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45761  fi
45762
45763  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45764  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45765
45766  else
45767    # We're on a posix platform. Hooray! :)
45768    path="$POTENTIAL_FREETYPE_LIB_PATH"
45769    has_space=`$ECHO "$path" | $GREP " "`
45770    if test "x$has_space" != x; then
45771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45772$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45773      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45774    fi
45775
45776    # Use eval to expand a potential ~
45777    eval path="$path"
45778    if test ! -f "$path" && test ! -d "$path"; then
45779      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45780    fi
45781
45782    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45783  fi
45784
45785
45786    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45787    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45788$as_echo_n "checking for freetype includes... " >&6; }
45789    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45790$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45791    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45792    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45793$as_echo_n "checking for freetype libraries... " >&6; }
45794    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45795$as_echo "$FREETYPE_LIB_PATH" >&6; }
45796  fi
45797
45798            else
45799
45800  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45801  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
45802  METHOD="well-known location"
45803
45804  # First check if the files exists.
45805  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45806    # We found an arbitrary include file. That's a good sign.
45807    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45808$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45809    FOUND_FREETYPE=yes
45810
45811    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45812    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45813      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45814$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45815      FOUND_FREETYPE=no
45816    else
45817      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45818        # On Windows, we will need both .lib and .dll file.
45819        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45820          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45821$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45822          FOUND_FREETYPE=no
45823        fi
45824      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
45825        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45826        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45827      fi
45828    fi
45829  fi
45830
45831  if test "x$FOUND_FREETYPE" = xyes; then
45832
45833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45834
45835  # Input might be given as Windows format, start by converting to
45836  # unix format.
45837  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45838  new_path=`$CYGPATH -u "$path"`
45839
45840  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45841  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45842  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45843  # "foo.exe" is OK but "foo" is an error.
45844  #
45845  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45846  # It is also a way to make sure we got the proper file name for the real test later on.
45847  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45848  if test "x$test_shortpath" = x; then
45849    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45850$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45851    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45852  fi
45853
45854  # Call helper function which possibly converts this using DOS-style short mode.
45855  # If so, the updated path is stored in $new_path.
45856
45857  input_path="$new_path"
45858  # Check if we need to convert this using DOS-style short mode. If the path
45859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45860  # take no chances and rewrite it.
45861  # Note: m4 eats our [], so we need to use [ and ] instead.
45862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45863  if test "x$has_forbidden_chars" != x; then
45864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45865    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45866    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45867    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45868      # Going to short mode and back again did indeed matter. Since short mode is
45869      # case insensitive, let's make it lowercase to improve readability.
45870      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45871      # Now convert it back to Unix-stile (cygpath)
45872      input_path=`$CYGPATH -u "$shortmode_path"`
45873      new_path="$input_path"
45874    fi
45875  fi
45876
45877  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45878  if test "x$test_cygdrive_prefix" = x; then
45879    # As a simple fix, exclude /usr/bin since it's not a real path.
45880    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45881      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45882      # a path prefixed by /cygdrive for fixpath to work.
45883      new_path="$CYGWIN_ROOT_PATH$input_path"
45884    fi
45885  fi
45886
45887
45888  if test "x$path" != "x$new_path"; then
45889    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45891$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45892  fi
45893
45894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45895
45896  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45897  has_colon=`$ECHO $path | $GREP ^.:`
45898  new_path="$path"
45899  if test "x$has_colon" = x; then
45900    # Not in mixed or Windows style, start by that.
45901    new_path=`cmd //c echo $path`
45902  fi
45903
45904
45905  input_path="$new_path"
45906  # Check if we need to convert this using DOS-style short mode. If the path
45907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45908  # take no chances and rewrite it.
45909  # Note: m4 eats our [], so we need to use [ and ] instead.
45910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45911  if test "x$has_forbidden_chars" != x; then
45912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45914  fi
45915
45916
45917  windows_path="$new_path"
45918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45919    unix_path=`$CYGPATH -u "$windows_path"`
45920    new_path="$unix_path"
45921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45923    new_path="$unix_path"
45924  fi
45925
45926  if test "x$path" != "x$new_path"; then
45927    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45929$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45930  fi
45931
45932  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45933  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45934
45935  else
45936    # We're on a posix platform. Hooray! :)
45937    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45938    has_space=`$ECHO "$path" | $GREP " "`
45939    if test "x$has_space" != x; then
45940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45941$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45942      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45943    fi
45944
45945    # Use eval to expand a potential ~
45946    eval path="$path"
45947    if test ! -f "$path" && test ! -d "$path"; then
45948      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45949    fi
45950
45951    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45952  fi
45953
45954
45955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45956
45957  # Input might be given as Windows format, start by converting to
45958  # unix format.
45959  path="$POTENTIAL_FREETYPE_LIB_PATH"
45960  new_path=`$CYGPATH -u "$path"`
45961
45962  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45963  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45964  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45965  # "foo.exe" is OK but "foo" is an error.
45966  #
45967  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45968  # It is also a way to make sure we got the proper file name for the real test later on.
45969  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45970  if test "x$test_shortpath" = x; then
45971    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45972$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45973    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45974  fi
45975
45976  # Call helper function which possibly converts this using DOS-style short mode.
45977  # If so, the updated path is stored in $new_path.
45978
45979  input_path="$new_path"
45980  # Check if we need to convert this using DOS-style short mode. If the path
45981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45982  # take no chances and rewrite it.
45983  # Note: m4 eats our [], so we need to use [ and ] instead.
45984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45985  if test "x$has_forbidden_chars" != x; then
45986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45987    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45988    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45989    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45990      # Going to short mode and back again did indeed matter. Since short mode is
45991      # case insensitive, let's make it lowercase to improve readability.
45992      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45993      # Now convert it back to Unix-stile (cygpath)
45994      input_path=`$CYGPATH -u "$shortmode_path"`
45995      new_path="$input_path"
45996    fi
45997  fi
45998
45999  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46000  if test "x$test_cygdrive_prefix" = x; then
46001    # As a simple fix, exclude /usr/bin since it's not a real path.
46002    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46003      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46004      # a path prefixed by /cygdrive for fixpath to work.
46005      new_path="$CYGWIN_ROOT_PATH$input_path"
46006    fi
46007  fi
46008
46009
46010  if test "x$path" != "x$new_path"; then
46011    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46013$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46014  fi
46015
46016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46017
46018  path="$POTENTIAL_FREETYPE_LIB_PATH"
46019  has_colon=`$ECHO $path | $GREP ^.:`
46020  new_path="$path"
46021  if test "x$has_colon" = x; then
46022    # Not in mixed or Windows style, start by that.
46023    new_path=`cmd //c echo $path`
46024  fi
46025
46026
46027  input_path="$new_path"
46028  # Check if we need to convert this using DOS-style short mode. If the path
46029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46030  # take no chances and rewrite it.
46031  # Note: m4 eats our [], so we need to use [ and ] instead.
46032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46033  if test "x$has_forbidden_chars" != x; then
46034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46035    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46036  fi
46037
46038
46039  windows_path="$new_path"
46040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46041    unix_path=`$CYGPATH -u "$windows_path"`
46042    new_path="$unix_path"
46043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46045    new_path="$unix_path"
46046  fi
46047
46048  if test "x$path" != "x$new_path"; then
46049    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46051$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46052  fi
46053
46054  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46055  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46056
46057  else
46058    # We're on a posix platform. Hooray! :)
46059    path="$POTENTIAL_FREETYPE_LIB_PATH"
46060    has_space=`$ECHO "$path" | $GREP " "`
46061    if test "x$has_space" != x; then
46062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46063$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46064      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46065    fi
46066
46067    # Use eval to expand a potential ~
46068    eval path="$path"
46069    if test ! -f "$path" && test ! -d "$path"; then
46070      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46071    fi
46072
46073    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46074  fi
46075
46076
46077    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46078    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46079$as_echo_n "checking for freetype includes... " >&6; }
46080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46081$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46082    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46083    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46084$as_echo_n "checking for freetype libraries... " >&6; }
46085    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46086$as_echo "$FREETYPE_LIB_PATH" >&6; }
46087  fi
46088
46089              if test "x$FOUND_FREETYPE" != xyes; then
46090
46091  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46092  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
46093  METHOD="well-known location"
46094
46095  # First check if the files exists.
46096  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46097    # We found an arbitrary include file. That's a good sign.
46098    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46099$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46100    FOUND_FREETYPE=yes
46101
46102    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46103    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46104      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46105$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46106      FOUND_FREETYPE=no
46107    else
46108      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46109        # On Windows, we will need both .lib and .dll file.
46110        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46111          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46112$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46113          FOUND_FREETYPE=no
46114        fi
46115      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
46116        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
46117        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
46118      fi
46119    fi
46120  fi
46121
46122  if test "x$FOUND_FREETYPE" = xyes; then
46123
46124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46125
46126  # Input might be given as Windows format, start by converting to
46127  # unix format.
46128  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46129  new_path=`$CYGPATH -u "$path"`
46130
46131  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46132  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46133  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46134  # "foo.exe" is OK but "foo" is an error.
46135  #
46136  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46137  # It is also a way to make sure we got the proper file name for the real test later on.
46138  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46139  if test "x$test_shortpath" = x; then
46140    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46141$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46142    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46143  fi
46144
46145  # Call helper function which possibly converts this using DOS-style short mode.
46146  # If so, the updated path is stored in $new_path.
46147
46148  input_path="$new_path"
46149  # Check if we need to convert this using DOS-style short mode. If the path
46150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46151  # take no chances and rewrite it.
46152  # Note: m4 eats our [], so we need to use [ and ] instead.
46153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46154  if test "x$has_forbidden_chars" != x; then
46155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46156    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46157    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46158    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46159      # Going to short mode and back again did indeed matter. Since short mode is
46160      # case insensitive, let's make it lowercase to improve readability.
46161      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46162      # Now convert it back to Unix-stile (cygpath)
46163      input_path=`$CYGPATH -u "$shortmode_path"`
46164      new_path="$input_path"
46165    fi
46166  fi
46167
46168  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46169  if test "x$test_cygdrive_prefix" = x; then
46170    # As a simple fix, exclude /usr/bin since it's not a real path.
46171    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46172      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46173      # a path prefixed by /cygdrive for fixpath to work.
46174      new_path="$CYGWIN_ROOT_PATH$input_path"
46175    fi
46176  fi
46177
46178
46179  if test "x$path" != "x$new_path"; then
46180    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46181    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46182$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46183  fi
46184
46185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46186
46187  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46188  has_colon=`$ECHO $path | $GREP ^.:`
46189  new_path="$path"
46190  if test "x$has_colon" = x; then
46191    # Not in mixed or Windows style, start by that.
46192    new_path=`cmd //c echo $path`
46193  fi
46194
46195
46196  input_path="$new_path"
46197  # Check if we need to convert this using DOS-style short mode. If the path
46198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46199  # take no chances and rewrite it.
46200  # Note: m4 eats our [], so we need to use [ and ] instead.
46201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46202  if test "x$has_forbidden_chars" != x; then
46203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46204    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46205  fi
46206
46207
46208  windows_path="$new_path"
46209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46210    unix_path=`$CYGPATH -u "$windows_path"`
46211    new_path="$unix_path"
46212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46214    new_path="$unix_path"
46215  fi
46216
46217  if test "x$path" != "x$new_path"; then
46218    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46220$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46221  fi
46222
46223  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46224  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46225
46226  else
46227    # We're on a posix platform. Hooray! :)
46228    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46229    has_space=`$ECHO "$path" | $GREP " "`
46230    if test "x$has_space" != x; then
46231      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46232$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46233      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46234    fi
46235
46236    # Use eval to expand a potential ~
46237    eval path="$path"
46238    if test ! -f "$path" && test ! -d "$path"; then
46239      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46240    fi
46241
46242    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46243  fi
46244
46245
46246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46247
46248  # Input might be given as Windows format, start by converting to
46249  # unix format.
46250  path="$POTENTIAL_FREETYPE_LIB_PATH"
46251  new_path=`$CYGPATH -u "$path"`
46252
46253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46256  # "foo.exe" is OK but "foo" is an error.
46257  #
46258  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46259  # It is also a way to make sure we got the proper file name for the real test later on.
46260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46261  if test "x$test_shortpath" = x; then
46262    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46263$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46264    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46265  fi
46266
46267  # Call helper function which possibly converts this using DOS-style short mode.
46268  # If so, the updated path is stored in $new_path.
46269
46270  input_path="$new_path"
46271  # Check if we need to convert this using DOS-style short mode. If the path
46272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46273  # take no chances and rewrite it.
46274  # Note: m4 eats our [], so we need to use [ and ] instead.
46275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46276  if test "x$has_forbidden_chars" != x; then
46277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46278    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46279    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46280    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46281      # Going to short mode and back again did indeed matter. Since short mode is
46282      # case insensitive, let's make it lowercase to improve readability.
46283      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46284      # Now convert it back to Unix-stile (cygpath)
46285      input_path=`$CYGPATH -u "$shortmode_path"`
46286      new_path="$input_path"
46287    fi
46288  fi
46289
46290  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46291  if test "x$test_cygdrive_prefix" = x; then
46292    # As a simple fix, exclude /usr/bin since it's not a real path.
46293    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46294      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46295      # a path prefixed by /cygdrive for fixpath to work.
46296      new_path="$CYGWIN_ROOT_PATH$input_path"
46297    fi
46298  fi
46299
46300
46301  if test "x$path" != "x$new_path"; then
46302    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46304$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46305  fi
46306
46307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46308
46309  path="$POTENTIAL_FREETYPE_LIB_PATH"
46310  has_colon=`$ECHO $path | $GREP ^.:`
46311  new_path="$path"
46312  if test "x$has_colon" = x; then
46313    # Not in mixed or Windows style, start by that.
46314    new_path=`cmd //c echo $path`
46315  fi
46316
46317
46318  input_path="$new_path"
46319  # Check if we need to convert this using DOS-style short mode. If the path
46320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46321  # take no chances and rewrite it.
46322  # Note: m4 eats our [], so we need to use [ and ] instead.
46323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46324  if test "x$has_forbidden_chars" != x; then
46325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46326    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46327  fi
46328
46329
46330  windows_path="$new_path"
46331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46332    unix_path=`$CYGPATH -u "$windows_path"`
46333    new_path="$unix_path"
46334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46336    new_path="$unix_path"
46337  fi
46338
46339  if test "x$path" != "x$new_path"; then
46340    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46342$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46343  fi
46344
46345  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46346  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46347
46348  else
46349    # We're on a posix platform. Hooray! :)
46350    path="$POTENTIAL_FREETYPE_LIB_PATH"
46351    has_space=`$ECHO "$path" | $GREP " "`
46352    if test "x$has_space" != x; then
46353      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46354$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46355      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46356    fi
46357
46358    # Use eval to expand a potential ~
46359    eval path="$path"
46360    if test ! -f "$path" && test ! -d "$path"; then
46361      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46362    fi
46363
46364    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46365  fi
46366
46367
46368    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46369    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46370$as_echo_n "checking for freetype includes... " >&6; }
46371    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46372$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46373    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46374    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46375$as_echo_n "checking for freetype libraries... " >&6; }
46376    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46377$as_echo "$FREETYPE_LIB_PATH" >&6; }
46378  fi
46379
46380              fi
46381            fi
46382          fi
46383        fi
46384      fi # end check in well-known locations
46385
46386      if test "x$FOUND_FREETYPE" != xyes; then
46387
46388  # Print a helpful message on how to acquire the necessary build dependency.
46389  # freetype is the help tag: freetype, cups, pulse, alsa etc
46390  MISSING_DEPENDENCY=freetype
46391
46392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46393    cygwin_help $MISSING_DEPENDENCY
46394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46395    msys_help $MISSING_DEPENDENCY
46396  else
46397    PKGHANDLER_COMMAND=
46398
46399    case $PKGHANDLER in
46400      apt-get)
46401        apt_help     $MISSING_DEPENDENCY ;;
46402      yum)
46403        yum_help     $MISSING_DEPENDENCY ;;
46404      port)
46405        port_help    $MISSING_DEPENDENCY ;;
46406      pkgutil)
46407        pkgutil_help $MISSING_DEPENDENCY ;;
46408      pkgadd)
46409        pkgadd_help  $MISSING_DEPENDENCY ;;
46410    esac
46411
46412    if test "x$PKGHANDLER_COMMAND" != x; then
46413      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46414    fi
46415  fi
46416
46417        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
46418      fi
46419    fi # end user specified settings
46420
46421    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
46422    if test "x$FREETYPE_CFLAGS" = x; then
46423
46424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46425
46426  # Input might be given as Windows format, start by converting to
46427  # unix format.
46428  path="$FREETYPE_INCLUDE_PATH"
46429  new_path=`$CYGPATH -u "$path"`
46430
46431  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46432  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46433  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46434  # "foo.exe" is OK but "foo" is an error.
46435  #
46436  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46437  # It is also a way to make sure we got the proper file name for the real test later on.
46438  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46439  if test "x$test_shortpath" = x; then
46440    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46441$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46442    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
46443  fi
46444
46445  # Call helper function which possibly converts this using DOS-style short mode.
46446  # If so, the updated path is stored in $new_path.
46447
46448  input_path="$new_path"
46449  # Check if we need to convert this using DOS-style short mode. If the path
46450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46451  # take no chances and rewrite it.
46452  # Note: m4 eats our [], so we need to use [ and ] instead.
46453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46454  if test "x$has_forbidden_chars" != x; then
46455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46456    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46457    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46458    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46459      # Going to short mode and back again did indeed matter. Since short mode is
46460      # case insensitive, let's make it lowercase to improve readability.
46461      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46462      # Now convert it back to Unix-stile (cygpath)
46463      input_path=`$CYGPATH -u "$shortmode_path"`
46464      new_path="$input_path"
46465    fi
46466  fi
46467
46468  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46469  if test "x$test_cygdrive_prefix" = x; then
46470    # As a simple fix, exclude /usr/bin since it's not a real path.
46471    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46472      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46473      # a path prefixed by /cygdrive for fixpath to work.
46474      new_path="$CYGWIN_ROOT_PATH$input_path"
46475    fi
46476  fi
46477
46478
46479  if test "x$path" != "x$new_path"; then
46480    FREETYPE_INCLUDE_PATH="$new_path"
46481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46482$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46483  fi
46484
46485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46486
46487  path="$FREETYPE_INCLUDE_PATH"
46488  has_colon=`$ECHO $path | $GREP ^.:`
46489  new_path="$path"
46490  if test "x$has_colon" = x; then
46491    # Not in mixed or Windows style, start by that.
46492    new_path=`cmd //c echo $path`
46493  fi
46494
46495
46496  input_path="$new_path"
46497  # Check if we need to convert this using DOS-style short mode. If the path
46498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46499  # take no chances and rewrite it.
46500  # Note: m4 eats our [], so we need to use [ and ] instead.
46501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46502  if test "x$has_forbidden_chars" != x; then
46503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46504    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46505  fi
46506
46507
46508  windows_path="$new_path"
46509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46510    unix_path=`$CYGPATH -u "$windows_path"`
46511    new_path="$unix_path"
46512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46514    new_path="$unix_path"
46515  fi
46516
46517  if test "x$path" != "x$new_path"; then
46518    FREETYPE_INCLUDE_PATH="$new_path"
46519    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46520$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46521  fi
46522
46523  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46524  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46525
46526  else
46527    # We're on a posix platform. Hooray! :)
46528    path="$FREETYPE_INCLUDE_PATH"
46529    has_space=`$ECHO "$path" | $GREP " "`
46530    if test "x$has_space" != x; then
46531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46532$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46533      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46534    fi
46535
46536    # Use eval to expand a potential ~
46537    eval path="$path"
46538    if test ! -f "$path" && test ! -d "$path"; then
46539      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46540    fi
46541
46542    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46543  fi
46544
46545      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
46546        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
46547      else
46548        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
46549      fi
46550    fi
46551
46552    if test "x$FREETYPE_LIBS" = x; then
46553
46554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46555
46556  # Input might be given as Windows format, start by converting to
46557  # unix format.
46558  path="$FREETYPE_LIB_PATH"
46559  new_path=`$CYGPATH -u "$path"`
46560
46561  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46562  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46563  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46564  # "foo.exe" is OK but "foo" is an error.
46565  #
46566  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46567  # It is also a way to make sure we got the proper file name for the real test later on.
46568  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46569  if test "x$test_shortpath" = x; then
46570    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46571$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46572    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
46573  fi
46574
46575  # Call helper function which possibly converts this using DOS-style short mode.
46576  # If so, the updated path is stored in $new_path.
46577
46578  input_path="$new_path"
46579  # Check if we need to convert this using DOS-style short mode. If the path
46580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46581  # take no chances and rewrite it.
46582  # Note: m4 eats our [], so we need to use [ and ] instead.
46583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46584  if test "x$has_forbidden_chars" != x; then
46585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46586    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46587    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46588    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46589      # Going to short mode and back again did indeed matter. Since short mode is
46590      # case insensitive, let's make it lowercase to improve readability.
46591      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46592      # Now convert it back to Unix-stile (cygpath)
46593      input_path=`$CYGPATH -u "$shortmode_path"`
46594      new_path="$input_path"
46595    fi
46596  fi
46597
46598  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46599  if test "x$test_cygdrive_prefix" = x; then
46600    # As a simple fix, exclude /usr/bin since it's not a real path.
46601    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46602      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46603      # a path prefixed by /cygdrive for fixpath to work.
46604      new_path="$CYGWIN_ROOT_PATH$input_path"
46605    fi
46606  fi
46607
46608
46609  if test "x$path" != "x$new_path"; then
46610    FREETYPE_LIB_PATH="$new_path"
46611    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46612$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46613  fi
46614
46615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46616
46617  path="$FREETYPE_LIB_PATH"
46618  has_colon=`$ECHO $path | $GREP ^.:`
46619  new_path="$path"
46620  if test "x$has_colon" = x; then
46621    # Not in mixed or Windows style, start by that.
46622    new_path=`cmd //c echo $path`
46623  fi
46624
46625
46626  input_path="$new_path"
46627  # Check if we need to convert this using DOS-style short mode. If the path
46628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46629  # take no chances and rewrite it.
46630  # Note: m4 eats our [], so we need to use [ and ] instead.
46631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46632  if test "x$has_forbidden_chars" != x; then
46633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46634    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46635  fi
46636
46637
46638  windows_path="$new_path"
46639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46640    unix_path=`$CYGPATH -u "$windows_path"`
46641    new_path="$unix_path"
46642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46644    new_path="$unix_path"
46645  fi
46646
46647  if test "x$path" != "x$new_path"; then
46648    FREETYPE_LIB_PATH="$new_path"
46649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46650$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46651  fi
46652
46653  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46654  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46655
46656  else
46657    # We're on a posix platform. Hooray! :)
46658    path="$FREETYPE_LIB_PATH"
46659    has_space=`$ECHO "$path" | $GREP " "`
46660    if test "x$has_space" != x; then
46661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46662$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46663      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46664    fi
46665
46666    # Use eval to expand a potential ~
46667    eval path="$path"
46668    if test ! -f "$path" && test ! -d "$path"; then
46669      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46670    fi
46671
46672    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46673  fi
46674
46675      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46676        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
46677      else
46678        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
46679      fi
46680    fi
46681
46682    # Try to compile it
46683    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
46684$as_echo_n "checking if we can compile and link with freetype... " >&6; }
46685    ac_ext=cpp
46686ac_cpp='$CXXCPP $CPPFLAGS'
46687ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46688ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46689ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46690
46691    PREV_CXXCFLAGS="$CXXFLAGS"
46692    PREV_LIBS="$LIBS"
46693    PREV_CXX="$CXX"
46694    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
46695    LIBS="$LIBS $FREETYPE_LIBS"
46696    CXX="$FIXPATH $CXX"
46697    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46698/* end confdefs.h.  */
46699
46700          #include<ft2build.h>
46701          #include FT_FREETYPE_H
46702          int main () {
46703            FT_Init_FreeType(NULL);
46704            return 0;
46705          }
46706
46707_ACEOF
46708if ac_fn_cxx_try_link "$LINENO"; then :
46709
46710          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46711$as_echo "yes" >&6; }
46712
46713else
46714
46715          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46716$as_echo "no" >&6; }
46717          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
46718$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
46719          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
46720$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
46721
46722
46723  # Print a helpful message on how to acquire the necessary build dependency.
46724  # freetype is the help tag: freetype, cups, pulse, alsa etc
46725  MISSING_DEPENDENCY=freetype
46726
46727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46728    cygwin_help $MISSING_DEPENDENCY
46729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46730    msys_help $MISSING_DEPENDENCY
46731  else
46732    PKGHANDLER_COMMAND=
46733
46734    case $PKGHANDLER in
46735      apt-get)
46736        apt_help     $MISSING_DEPENDENCY ;;
46737      yum)
46738        yum_help     $MISSING_DEPENDENCY ;;
46739      port)
46740        port_help    $MISSING_DEPENDENCY ;;
46741      pkgutil)
46742        pkgutil_help $MISSING_DEPENDENCY ;;
46743      pkgadd)
46744        pkgadd_help  $MISSING_DEPENDENCY ;;
46745    esac
46746
46747    if test "x$PKGHANDLER_COMMAND" != x; then
46748      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46749    fi
46750  fi
46751
46752
46753          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
46754
46755
46756fi
46757rm -f core conftest.err conftest.$ac_objext \
46758    conftest$ac_exeext conftest.$ac_ext
46759    CXXCFLAGS="$PREV_CXXFLAGS"
46760    LIBS="$PREV_LIBS"
46761    CXX="$PREV_CXX"
46762    ac_ext=cpp
46763ac_cpp='$CXXCPP $CPPFLAGS'
46764ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46765ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46766ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46767
46768
46769    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
46770$as_echo_n "checking if we should bundle freetype... " >&6; }
46771    if test "x$BUNDLE_FREETYPE" = xyes; then
46772      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
46773    fi
46774    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
46775$as_echo "$BUNDLE_FREETYPE" >&6; }
46776
46777  fi # end freetype needed
46778
46779
46780
46781
46782
46783
46784
46785  ###############################################################################
46786  #
46787  # Check for alsa headers and libraries. Used on Linux/GNU systems.
46788  #
46789
46790# Check whether --with-alsa was given.
46791if test "${with_alsa+set}" = set; then :
46792  withval=$with_alsa;
46793fi
46794
46795
46796# Check whether --with-alsa-include was given.
46797if test "${with_alsa_include+set}" = set; then :
46798  withval=$with_alsa_include;
46799fi
46800
46801
46802# Check whether --with-alsa-lib was given.
46803if test "${with_alsa_lib+set}" = set; then :
46804  withval=$with_alsa_lib;
46805fi
46806
46807
46808  if test "x$ALSA_NOT_NEEDED" = xyes; then
46809    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
46810      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
46811$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
46812    fi
46813    ALSA_CFLAGS=
46814    ALSA_LIBS=
46815  else
46816    ALSA_FOUND=no
46817
46818    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
46819      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
46820    fi
46821
46822    if test "x${with_alsa}" != x; then
46823      ALSA_LIBS="-L${with_alsa}/lib -lasound"
46824      ALSA_CFLAGS="-I${with_alsa}/include"
46825      ALSA_FOUND=yes
46826    fi
46827    if test "x${with_alsa_include}" != x; then
46828      ALSA_CFLAGS="-I${with_alsa_include}"
46829      ALSA_FOUND=yes
46830    fi
46831    if test "x${with_alsa_lib}" != x; then
46832      ALSA_LIBS="-L${with_alsa_lib} -lasound"
46833      ALSA_FOUND=yes
46834    fi
46835    if test "x$ALSA_FOUND" = xno; then
46836
46837
46838  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
46839    # Source the builddeps file again, to make sure it uses the latest variables!
46840    . $builddepsfile
46841    # Look for a target and build machine specific resource!
46842    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
46843    if test "x$resource" = x; then
46844      # Ok, lets instead look for a target specific resource
46845      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
46846    fi
46847    if test "x$resource" = x; then
46848      # Ok, lets instead look for a build specific resource
46849      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
46850    fi
46851    if test "x$resource" = x; then
46852      # Ok, lets instead look for a generic resource
46853      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
46854      resource=${builddep_alsa}
46855    fi
46856    if test "x$resource" != x; then
46857      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
46858$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
46859      # If the resource in the builddeps.conf file is an existing directory,
46860      # for example /java/linux/cups
46861      if test -d ${resource}; then
46862        depdir=${resource}
46863      else
46864
46865  # alsa is for example mymodule
46866  # $resource is for example libs/general/libmymod_1_2_3.zip
46867  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
46868  # $with_builddeps_dir is for example /localhome/builddeps
46869  # depdir is the name of the variable into which we store the depdir, eg MYMOD
46870  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
46871  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
46872  filename=`basename $resource`
46873  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
46874  filebase=${filename%%.*}
46875  extension=${filename#*.}
46876  installdir=$with_builddeps_dir/$filebase
46877  if test ! -f $installdir/$filename.unpacked; then
46878    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
46879$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
46880    if test ! -d $installdir; then
46881      mkdir -p $installdir
46882    fi
46883    if test ! -d $installdir; then
46884      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
46885    fi
46886    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
46887    touch $tmpfile
46888    if test ! -f $tmpfile; then
46889      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
46890    fi
46891
46892  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
46893  # $tmpfile is the local file name for the downloaded file.
46894  VALID_TOOL=no
46895  if test "x$BDEPS_FTP" = xwget; then
46896    VALID_TOOL=yes
46897    wget -O $tmpfile $with_builddeps_server/$resource
46898  fi
46899  if test "x$BDEPS_FTP" = xlftp; then
46900    VALID_TOOL=yes
46901    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
46902  fi
46903  if test "x$BDEPS_FTP" = xftp; then
46904    VALID_TOOL=yes
46905    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
46906    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
46907    FTPUSERPWD=${FTPSERVER%%@*}
46908    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
46909      FTPUSER=${userpwd%%:*}
46910      FTPPWD=${userpwd#*@}
46911      FTPSERVER=${FTPSERVER#*@}
46912    else
46913      FTPUSER=ftp
46914      FTPPWD=ftp
46915    fi
46916    # the "pass" command does not work on some
46917    # ftp clients (read ftp.exe) but if it works,
46918    # passive mode is better!
46919    ( \
46920        echo "user $FTPUSER $FTPPWD"        ; \
46921        echo "pass"                         ; \
46922        echo "bin"                          ; \
46923        echo "get $FTPPATH $tmpfile"              ; \
46924    ) | ftp -in $FTPSERVER
46925  fi
46926  if test "x$VALID_TOOL" != xyes; then
46927    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
46928  fi
46929
46930    mv $tmpfile $installdir/$filename
46931    if test ! -s $installdir/$filename; then
46932      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
46933    fi
46934    case "$extension" in
46935      zip)  echo "Unzipping $installdir/$filename..."
46936        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
46937        ;;
46938      tar.gz) echo "Untaring $installdir/$filename..."
46939        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46940        ;;
46941      tgz) echo "Untaring $installdir/$filename..."
46942        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46943        ;;
46944      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
46945        ;;
46946    esac
46947  fi
46948  if test -f $installdir/$filename.unpacked; then
46949    depdir=$installdir
46950  fi
46951
46952      fi
46953      # Source the builddeps file again, because in the previous command, the depdir
46954      # was updated to point at the current build dependency install directory.
46955      . $builddepsfile
46956      # Now extract variables from the builddeps.conf files.
46957      theroot=${builddep_alsa_ROOT}
46958      thecflags=${builddep_alsa_CFLAGS}
46959      thelibs=${builddep_alsa_LIBS}
46960      if test "x$depdir" = x; then
46961        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
46962      fi
46963      ALSA=$depdir
46964      if test "x$theroot" != x; then
46965        ALSA="$theroot"
46966      fi
46967      if test "x$thecflags" != x; then
46968        ALSA_CFLAGS="$thecflags"
46969      fi
46970      if test "x$thelibs" != x; then
46971        ALSA_LIBS="$thelibs"
46972      fi
46973      ALSA_FOUND=yes
46974      else ALSA_FOUND=no
46975
46976    fi
46977    else ALSA_FOUND=no
46978
46979  fi
46980
46981    fi
46982    # Do not try pkg-config if we have a sysroot set.
46983    if test "x$SYSROOT" = x; then
46984      if test "x$ALSA_FOUND" = xno; then
46985
46986pkg_failed=no
46987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
46988$as_echo_n "checking for ALSA... " >&6; }
46989
46990if test -n "$ALSA_CFLAGS"; then
46991    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
46992 elif test -n "$PKG_CONFIG"; then
46993    if test -n "$PKG_CONFIG" && \
46994    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46995  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46996  ac_status=$?
46997  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46998  test $ac_status = 0; }; then
46999  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
47000else
47001  pkg_failed=yes
47002fi
47003 else
47004    pkg_failed=untried
47005fi
47006if test -n "$ALSA_LIBS"; then
47007    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
47008 elif test -n "$PKG_CONFIG"; then
47009    if test -n "$PKG_CONFIG" && \
47010    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47011  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47012  ac_status=$?
47013  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47014  test $ac_status = 0; }; then
47015  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
47016else
47017  pkg_failed=yes
47018fi
47019 else
47020    pkg_failed=untried
47021fi
47022
47023
47024
47025if test $pkg_failed = yes; then
47026
47027if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47028        _pkg_short_errors_supported=yes
47029else
47030        _pkg_short_errors_supported=no
47031fi
47032        if test $_pkg_short_errors_supported = yes; then
47033	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
47034        else
47035	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
47036        fi
47037	# Put the nasty error message in config.log where it belongs
47038	echo "$ALSA_PKG_ERRORS" >&5
47039
47040	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47041$as_echo "no" >&6; }
47042                ALSA_FOUND=no
47043elif test $pkg_failed = untried; then
47044	ALSA_FOUND=no
47045else
47046	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
47047	ALSA_LIBS=$pkg_cv_ALSA_LIBS
47048        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47049$as_echo "yes" >&6; }
47050	ALSA_FOUND=yes
47051fi
47052      fi
47053    fi
47054    if test "x$ALSA_FOUND" = xno; then
47055      for ac_header in alsa/asoundlib.h
47056do :
47057  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
47058if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
47059  cat >>confdefs.h <<_ACEOF
47060#define HAVE_ALSA_ASOUNDLIB_H 1
47061_ACEOF
47062
47063            ALSA_FOUND=yes
47064            ALSA_CFLAGS=-Iignoreme
47065            ALSA_LIBS=-lasound
47066            DEFAULT_ALSA=yes
47067
47068else
47069  ALSA_FOUND=no
47070fi
47071
47072done
47073
47074    fi
47075    if test "x$ALSA_FOUND" = xno; then
47076
47077  # Print a helpful message on how to acquire the necessary build dependency.
47078  # alsa is the help tag: freetype, cups, pulse, alsa etc
47079  MISSING_DEPENDENCY=alsa
47080
47081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47082    cygwin_help $MISSING_DEPENDENCY
47083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47084    msys_help $MISSING_DEPENDENCY
47085  else
47086    PKGHANDLER_COMMAND=
47087
47088    case $PKGHANDLER in
47089      apt-get)
47090        apt_help     $MISSING_DEPENDENCY ;;
47091      yum)
47092        yum_help     $MISSING_DEPENDENCY ;;
47093      port)
47094        port_help    $MISSING_DEPENDENCY ;;
47095      pkgutil)
47096        pkgutil_help $MISSING_DEPENDENCY ;;
47097      pkgadd)
47098        pkgadd_help  $MISSING_DEPENDENCY ;;
47099    esac
47100
47101    if test "x$PKGHANDLER_COMMAND" != x; then
47102      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47103    fi
47104  fi
47105
47106      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
47107    fi
47108  fi
47109
47110
47111
47112
47113
47114
47115  ###############################################################################
47116  #
47117  # Check for the jpeg library
47118  #
47119
47120  USE_EXTERNAL_LIBJPEG=true
47121  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
47122$as_echo_n "checking for main in -ljpeg... " >&6; }
47123if ${ac_cv_lib_jpeg_main+:} false; then :
47124  $as_echo_n "(cached) " >&6
47125else
47126  ac_check_lib_save_LIBS=$LIBS
47127LIBS="-ljpeg  $LIBS"
47128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47129/* end confdefs.h.  */
47130
47131
47132int
47133main ()
47134{
47135return main ();
47136  ;
47137  return 0;
47138}
47139_ACEOF
47140if ac_fn_cxx_try_link "$LINENO"; then :
47141  ac_cv_lib_jpeg_main=yes
47142else
47143  ac_cv_lib_jpeg_main=no
47144fi
47145rm -f core conftest.err conftest.$ac_objext \
47146    conftest$ac_exeext conftest.$ac_ext
47147LIBS=$ac_check_lib_save_LIBS
47148fi
47149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
47150$as_echo "$ac_cv_lib_jpeg_main" >&6; }
47151if test "x$ac_cv_lib_jpeg_main" = xyes; then :
47152  cat >>confdefs.h <<_ACEOF
47153#define HAVE_LIBJPEG 1
47154_ACEOF
47155
47156  LIBS="-ljpeg $LIBS"
47157
47158else
47159   USE_EXTERNAL_LIBJPEG=false
47160      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
47161$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
47162
47163fi
47164
47165
47166
47167  ###############################################################################
47168  #
47169  # Check for the gif library
47170  #
47171
47172
47173# Check whether --with-giflib was given.
47174if test "${with_giflib+set}" = set; then :
47175  withval=$with_giflib;
47176fi
47177
47178
47179
47180  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
47181$as_echo_n "checking for which giflib to use... " >&6; }
47182
47183  # default is bundled
47184  DEFAULT_GIFLIB=bundled
47185
47186  #
47187  # if user didn't specify, use DEFAULT_GIFLIB
47188  #
47189  if test "x${with_giflib}" = "x"; then
47190    with_giflib=${DEFAULT_GIFLIB}
47191  fi
47192
47193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
47194$as_echo "${with_giflib}" >&6; }
47195
47196  if test "x${with_giflib}" = "xbundled"; then
47197    USE_EXTERNAL_LIBGIF=false
47198  elif test "x${with_giflib}" = "xsystem"; then
47199    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
47200if test "x$ac_cv_header_gif_lib_h" = xyes; then :
47201
47202else
47203   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
47204fi
47205
47206
47207    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
47208$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
47209if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
47210  $as_echo_n "(cached) " >&6
47211else
47212  ac_check_lib_save_LIBS=$LIBS
47213LIBS="-lgif  $LIBS"
47214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47215/* end confdefs.h.  */
47216
47217/* Override any GCC internal prototype to avoid an error.
47218   Use char because int might match the return type of a GCC
47219   builtin and then its argument prototype would still apply.  */
47220#ifdef __cplusplus
47221extern "C"
47222#endif
47223char DGifGetCode ();
47224int
47225main ()
47226{
47227return DGifGetCode ();
47228  ;
47229  return 0;
47230}
47231_ACEOF
47232if ac_fn_cxx_try_link "$LINENO"; then :
47233  ac_cv_lib_gif_DGifGetCode=yes
47234else
47235  ac_cv_lib_gif_DGifGetCode=no
47236fi
47237rm -f core conftest.err conftest.$ac_objext \
47238    conftest$ac_exeext conftest.$ac_ext
47239LIBS=$ac_check_lib_save_LIBS
47240fi
47241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
47242$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
47243if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
47244  cat >>confdefs.h <<_ACEOF
47245#define HAVE_LIBGIF 1
47246_ACEOF
47247
47248  LIBS="-lgif $LIBS"
47249
47250else
47251   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
47252fi
47253
47254
47255    USE_EXTERNAL_LIBGIF=true
47256  else
47257    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
47258  fi
47259
47260
47261  ###############################################################################
47262  #
47263  # Check for the png library
47264  #
47265
47266
47267# Check whether --with-libpng was given.
47268if test "${with_libpng+set}" = set; then :
47269  withval=$with_libpng;
47270fi
47271
47272
47273
47274  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
47275$as_echo_n "checking for which libpng to use... " >&6; }
47276
47277  # default is bundled
47278  DEFAULT_LIBPNG=bundled
47279
47280  #
47281  # if user didn't specify, use DEFAULT_LIBPNG
47282  #
47283  if test "x${with_libpng}" = "x"; then
47284      with_libpng=${DEFAULT_LIBPNG}
47285  fi
47286
47287  if test "x${with_libpng}" = "xbundled"; then
47288      USE_EXTERNAL_LIBPNG=false
47289      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47290$as_echo "bundled" >&6; }
47291  elif test "x${with_libpng}" = "xsystem"; then
47292
47293pkg_failed=no
47294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
47295$as_echo_n "checking for PNG... " >&6; }
47296
47297if test -n "$PNG_CFLAGS"; then
47298    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
47299 elif test -n "$PKG_CONFIG"; then
47300    if test -n "$PKG_CONFIG" && \
47301    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
47302  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
47303  ac_status=$?
47304  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47305  test $ac_status = 0; }; then
47306  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
47307else
47308  pkg_failed=yes
47309fi
47310 else
47311    pkg_failed=untried
47312fi
47313if test -n "$PNG_LIBS"; then
47314    pkg_cv_PNG_LIBS="$PNG_LIBS"
47315 elif test -n "$PKG_CONFIG"; then
47316    if test -n "$PKG_CONFIG" && \
47317    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
47318  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
47319  ac_status=$?
47320  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47321  test $ac_status = 0; }; then
47322  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
47323else
47324  pkg_failed=yes
47325fi
47326 else
47327    pkg_failed=untried
47328fi
47329
47330
47331
47332if test $pkg_failed = yes; then
47333
47334if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47335        _pkg_short_errors_supported=yes
47336else
47337        _pkg_short_errors_supported=no
47338fi
47339        if test $_pkg_short_errors_supported = yes; then
47340	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
47341        else
47342	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
47343        fi
47344	# Put the nasty error message in config.log where it belongs
47345	echo "$PNG_PKG_ERRORS" >&5
47346
47347	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47348$as_echo "no" >&6; }
47349                 LIBPNG_FOUND=no
47350elif test $pkg_failed = untried; then
47351	 LIBPNG_FOUND=no
47352else
47353	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
47354	PNG_LIBS=$pkg_cv_PNG_LIBS
47355        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47356$as_echo "yes" >&6; }
47357	 LIBPNG_FOUND=yes
47358fi
47359      if test "x${LIBPNG_FOUND}" = "xyes"; then
47360          USE_EXTERNAL_LIBPNG=true
47361          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47362$as_echo "system" >&6; }
47363      else
47364          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47365$as_echo "system not found" >&6; }
47366          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
47367      fi
47368  else
47369      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
47370  fi
47371
47372
47373  ###############################################################################
47374  #
47375  # Check for the zlib library
47376  #
47377
47378
47379# Check whether --with-zlib was given.
47380if test "${with_zlib+set}" = set; then :
47381  withval=$with_zlib;
47382fi
47383
47384
47385  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
47386$as_echo_n "checking for compress in -lz... " >&6; }
47387if ${ac_cv_lib_z_compress+:} false; then :
47388  $as_echo_n "(cached) " >&6
47389else
47390  ac_check_lib_save_LIBS=$LIBS
47391LIBS="-lz  $LIBS"
47392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47393/* end confdefs.h.  */
47394
47395/* Override any GCC internal prototype to avoid an error.
47396   Use char because int might match the return type of a GCC
47397   builtin and then its argument prototype would still apply.  */
47398#ifdef __cplusplus
47399extern "C"
47400#endif
47401char compress ();
47402int
47403main ()
47404{
47405return compress ();
47406  ;
47407  return 0;
47408}
47409_ACEOF
47410if ac_fn_cxx_try_link "$LINENO"; then :
47411  ac_cv_lib_z_compress=yes
47412else
47413  ac_cv_lib_z_compress=no
47414fi
47415rm -f core conftest.err conftest.$ac_objext \
47416    conftest$ac_exeext conftest.$ac_ext
47417LIBS=$ac_check_lib_save_LIBS
47418fi
47419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
47420$as_echo "$ac_cv_lib_z_compress" >&6; }
47421if test "x$ac_cv_lib_z_compress" = xyes; then :
47422   ZLIB_FOUND=yes
47423else
47424   ZLIB_FOUND=no
47425fi
47426
47427
47428  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
47429$as_echo_n "checking for which zlib to use... " >&6; }
47430
47431  DEFAULT_ZLIB=bundled
47432  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47433    #
47434    # On macosx default is system...on others default is
47435    #
47436    DEFAULT_ZLIB=system
47437  fi
47438
47439  if test "x${ZLIB_FOUND}" != "xyes"; then
47440    #
47441    # If we don't find any system...set default to bundled
47442    #
47443    DEFAULT_ZLIB=bundled
47444  fi
47445
47446  #
47447  # If user didn't specify, use DEFAULT_ZLIB
47448  #
47449  if test "x${with_zlib}" = "x"; then
47450    with_zlib=${DEFAULT_ZLIB}
47451  fi
47452
47453  if test "x${with_zlib}" = "xbundled"; then
47454    USE_EXTERNAL_LIBZ=false
47455    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47456$as_echo "bundled" >&6; }
47457  elif test "x${with_zlib}" = "xsystem"; then
47458    if test "x${ZLIB_FOUND}" = "xyes"; then
47459      USE_EXTERNAL_LIBZ=true
47460      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47461$as_echo "system" >&6; }
47462    else
47463      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47464$as_echo "system not found" >&6; }
47465      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
47466    fi
47467  else
47468    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
47469  fi
47470
47471
47472
47473  ###############################################################################
47474  LIBZIP_CAN_USE_MMAP=true
47475
47476
47477
47478  ###############################################################################
47479  #
47480  # Check if altzone exists in time.h
47481  #
47482
47483  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47484/* end confdefs.h.  */
47485#include <time.h>
47486int
47487main ()
47488{
47489return (int)altzone;
47490  ;
47491  return 0;
47492}
47493_ACEOF
47494if ac_fn_cxx_try_link "$LINENO"; then :
47495  has_altzone=yes
47496else
47497  has_altzone=no
47498fi
47499rm -f core conftest.err conftest.$ac_objext \
47500    conftest$ac_exeext conftest.$ac_ext
47501  if test "x$has_altzone" = xyes; then
47502
47503$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
47504
47505  fi
47506
47507  ###############################################################################
47508  #
47509  # Check the maths library
47510  #
47511
47512  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
47513$as_echo_n "checking for cos in -lm... " >&6; }
47514if ${ac_cv_lib_m_cos+:} false; then :
47515  $as_echo_n "(cached) " >&6
47516else
47517  ac_check_lib_save_LIBS=$LIBS
47518LIBS="-lm  $LIBS"
47519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47520/* end confdefs.h.  */
47521
47522/* Override any GCC internal prototype to avoid an error.
47523   Use char because int might match the return type of a GCC
47524   builtin and then its argument prototype would still apply.  */
47525#ifdef __cplusplus
47526extern "C"
47527#endif
47528char cos ();
47529int
47530main ()
47531{
47532return cos ();
47533  ;
47534  return 0;
47535}
47536_ACEOF
47537if ac_fn_cxx_try_link "$LINENO"; then :
47538  ac_cv_lib_m_cos=yes
47539else
47540  ac_cv_lib_m_cos=no
47541fi
47542rm -f core conftest.err conftest.$ac_objext \
47543    conftest$ac_exeext conftest.$ac_ext
47544LIBS=$ac_check_lib_save_LIBS
47545fi
47546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
47547$as_echo "$ac_cv_lib_m_cos" >&6; }
47548if test "x$ac_cv_lib_m_cos" = xyes; then :
47549  cat >>confdefs.h <<_ACEOF
47550#define HAVE_LIBM 1
47551_ACEOF
47552
47553  LIBS="-lm $LIBS"
47554
47555else
47556
47557        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
47558$as_echo "$as_me: Maths library was not found" >&6;}
47559
47560
47561fi
47562
47563
47564
47565  ###############################################################################
47566  #
47567  # Check for libdl.so
47568
47569  save_LIBS="$LIBS"
47570  LIBS=""
47571  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
47572$as_echo_n "checking for dlopen in -ldl... " >&6; }
47573if ${ac_cv_lib_dl_dlopen+:} false; then :
47574  $as_echo_n "(cached) " >&6
47575else
47576  ac_check_lib_save_LIBS=$LIBS
47577LIBS="-ldl  $LIBS"
47578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47579/* end confdefs.h.  */
47580
47581/* Override any GCC internal prototype to avoid an error.
47582   Use char because int might match the return type of a GCC
47583   builtin and then its argument prototype would still apply.  */
47584#ifdef __cplusplus
47585extern "C"
47586#endif
47587char dlopen ();
47588int
47589main ()
47590{
47591return dlopen ();
47592  ;
47593  return 0;
47594}
47595_ACEOF
47596if ac_fn_cxx_try_link "$LINENO"; then :
47597  ac_cv_lib_dl_dlopen=yes
47598else
47599  ac_cv_lib_dl_dlopen=no
47600fi
47601rm -f core conftest.err conftest.$ac_objext \
47602    conftest$ac_exeext conftest.$ac_ext
47603LIBS=$ac_check_lib_save_LIBS
47604fi
47605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
47606$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
47607if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
47608  cat >>confdefs.h <<_ACEOF
47609#define HAVE_LIBDL 1
47610_ACEOF
47611
47612  LIBS="-ldl $LIBS"
47613
47614fi
47615
47616  LIBDL="$LIBS"
47617
47618  LIBS="$save_LIBS"
47619
47620
47621  ###############################################################################
47622  #
47623  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47624  # dynamic build is configured on command line.
47625  #
47626
47627# Check whether --with-stdc++lib was given.
47628if test "${with_stdc__lib+set}" = set; then :
47629  withval=$with_stdc__lib;
47630        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47631                && test "x$with_stdc__lib" != xdefault; then
47632          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47633        fi
47634
47635else
47636  with_stdc__lib=default
47637
47638fi
47639
47640
47641  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47642    # Test if -lstdc++ works.
47643    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47644$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47645    ac_ext=cpp
47646ac_cpp='$CXXCPP $CPPFLAGS'
47647ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47648ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47649ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47650
47651    OLD_CXXFLAGS="$CXXFLAGS"
47652    CXXFLAGS="$CXXFLAGS -lstdc++"
47653    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47654/* end confdefs.h.  */
47655
47656int
47657main ()
47658{
47659return 0;
47660  ;
47661  return 0;
47662}
47663_ACEOF
47664if ac_fn_cxx_try_link "$LINENO"; then :
47665  has_dynamic_libstdcxx=yes
47666else
47667  has_dynamic_libstdcxx=no
47668fi
47669rm -f core conftest.err conftest.$ac_objext \
47670    conftest$ac_exeext conftest.$ac_ext
47671    CXXFLAGS="$OLD_CXXFLAGS"
47672    ac_ext=cpp
47673ac_cpp='$CXXCPP $CPPFLAGS'
47674ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47675ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47676ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47677
47678    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47679$as_echo "$has_dynamic_libstdcxx" >&6; }
47680
47681    # Test if stdc++ can be linked statically.
47682    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47683$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47684    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47685    ac_ext=cpp
47686ac_cpp='$CXXCPP $CPPFLAGS'
47687ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47688ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47689ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47690
47691    OLD_LIBS="$LIBS"
47692    OLD_CXX="$CXX"
47693    LIBS="$STATIC_STDCXX_FLAGS"
47694    CXX="$CC"
47695    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47696/* end confdefs.h.  */
47697
47698int
47699main ()
47700{
47701return 0;
47702  ;
47703  return 0;
47704}
47705_ACEOF
47706if ac_fn_cxx_try_link "$LINENO"; then :
47707  has_static_libstdcxx=yes
47708else
47709  has_static_libstdcxx=no
47710fi
47711rm -f core conftest.err conftest.$ac_objext \
47712    conftest$ac_exeext conftest.$ac_ext
47713    LIBS="$OLD_LIBS"
47714    CXX="$OLD_CXX"
47715    ac_ext=cpp
47716ac_cpp='$CXXCPP $CPPFLAGS'
47717ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47718ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47719ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47720
47721    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47722$as_echo "$has_static_libstdcxx" >&6; }
47723
47724    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47725      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47726    fi
47727
47728    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47729      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47730    fi
47731
47732    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47733      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47734    fi
47735
47736    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47737$as_echo_n "checking how to link with libstdc++... " >&6; }
47738    # If dynamic was requested, it's available since it would fail above otherwise.
47739    # If dynamic wasn't requested, go with static unless it isn't available.
47740    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47741      LIBCXX="$LIBCXX -lstdc++"
47742      LDCXX="$CXX"
47743      STATIC_CXX_SETTING="STATIC_CXX=false"
47744      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47745$as_echo "dynamic" >&6; }
47746    else
47747      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47748      LDCXX="$CC"
47749      STATIC_CXX_SETTING="STATIC_CXX=true"
47750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47751$as_echo "static" >&6; }
47752    fi
47753  fi
47754
47755
47756  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47757    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
47758
47759pkg_failed=no
47760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
47761$as_echo_n "checking for LIBFFI... " >&6; }
47762
47763if test -n "$LIBFFI_CFLAGS"; then
47764    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
47765 elif test -n "$PKG_CONFIG"; then
47766    if test -n "$PKG_CONFIG" && \
47767    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47768  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47769  ac_status=$?
47770  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47771  test $ac_status = 0; }; then
47772  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
47773else
47774  pkg_failed=yes
47775fi
47776 else
47777    pkg_failed=untried
47778fi
47779if test -n "$LIBFFI_LIBS"; then
47780    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
47781 elif test -n "$PKG_CONFIG"; then
47782    if test -n "$PKG_CONFIG" && \
47783    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47784  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47785  ac_status=$?
47786  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47787  test $ac_status = 0; }; then
47788  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
47789else
47790  pkg_failed=yes
47791fi
47792 else
47793    pkg_failed=untried
47794fi
47795
47796
47797
47798if test $pkg_failed = yes; then
47799
47800if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47801        _pkg_short_errors_supported=yes
47802else
47803        _pkg_short_errors_supported=no
47804fi
47805        if test $_pkg_short_errors_supported = yes; then
47806	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
47807        else
47808	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
47809        fi
47810	# Put the nasty error message in config.log where it belongs
47811	echo "$LIBFFI_PKG_ERRORS" >&5
47812
47813	as_fn_error $? "Package requirements (libffi) were not met:
47814
47815$LIBFFI_PKG_ERRORS
47816
47817Consider adjusting the PKG_CONFIG_PATH environment variable if you
47818installed software in a non-standard prefix.
47819
47820Alternatively, you may set the environment variables LIBFFI_CFLAGS
47821and LIBFFI_LIBS to avoid the need to call pkg-config.
47822See the pkg-config man page for more details.
47823" "$LINENO" 5
47824elif test $pkg_failed = untried; then
47825	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47826$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47827as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
47828is in your PATH or set the PKG_CONFIG environment variable to the full
47829path to pkg-config.
47830
47831Alternatively, you may set the environment variables LIBFFI_CFLAGS
47832and LIBFFI_LIBS to avoid the need to call pkg-config.
47833See the pkg-config man page for more details.
47834
47835To get pkg-config, see <http://pkg-config.freedesktop.org/>.
47836See \`config.log' for more details" "$LINENO" 5; }
47837else
47838	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
47839	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
47840        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47841$as_echo "yes" >&6; }
47842	:
47843fi
47844
47845  fi
47846
47847  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47848    # Extract the first word of "llvm-config", so it can be a program name with args.
47849set dummy llvm-config; ac_word=$2
47850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47851$as_echo_n "checking for $ac_word... " >&6; }
47852if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
47853  $as_echo_n "(cached) " >&6
47854else
47855  if test -n "$LLVM_CONFIG"; then
47856  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
47857else
47858as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47859for as_dir in $PATH
47860do
47861  IFS=$as_save_IFS
47862  test -z "$as_dir" && as_dir=.
47863    for ac_exec_ext in '' $ac_executable_extensions; do
47864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47865    ac_cv_prog_LLVM_CONFIG="llvm-config"
47866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47867    break 2
47868  fi
47869done
47870  done
47871IFS=$as_save_IFS
47872
47873fi
47874fi
47875LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
47876if test -n "$LLVM_CONFIG"; then
47877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
47878$as_echo "$LLVM_CONFIG" >&6; }
47879else
47880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47881$as_echo "no" >&6; }
47882fi
47883
47884
47885
47886    if test "x$LLVM_CONFIG" != xllvm-config; then
47887      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
47888    fi
47889
47890    llvm_components="jit mcjit engine nativecodegen native"
47891    unset LLVM_CFLAGS
47892    for flag in $("$LLVM_CONFIG" --cxxflags); do
47893      if echo "${flag}" | grep -q '^-[ID]'; then
47894        if test "${flag}" != "-D_DEBUG" ; then
47895          if test "${LLVM_CFLAGS}" != "" ; then
47896            LLVM_CFLAGS="${LLVM_CFLAGS} "
47897          fi
47898          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
47899        fi
47900      fi
47901    done
47902    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
47903    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
47904
47905    unset LLVM_LDFLAGS
47906    for flag in $("${LLVM_CONFIG}" --ldflags); do
47907      if echo "${flag}" | grep -q '^-L'; then
47908        if test "${LLVM_LDFLAGS}" != ""; then
47909          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
47910        fi
47911        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
47912      fi
47913    done
47914
47915    unset LLVM_LIBS
47916    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
47917      if echo "${flag}" | grep -q '^-l'; then
47918        if test "${LLVM_LIBS}" != ""; then
47919          LLVM_LIBS="${LLVM_LIBS} "
47920        fi
47921        LLVM_LIBS="${LLVM_LIBS}${flag}"
47922      fi
47923    done
47924
47925
47926
47927
47928  fi
47929
47930  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47931  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47932    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47933  fi
47934
47935  # TODO better (platform agnostic) test
47936  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47937    LIBCXX="-lstdc++"
47938  fi
47939
47940
47941
47942
47943  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47944
47945
47946# Check whether --with-msvcr-dll was given.
47947if test "${with_msvcr_dll+set}" = set; then :
47948  withval=$with_msvcr_dll;
47949fi
47950
47951
47952  if test "x$with_msvcr_dll" != x; then
47953    # If given explicitely by user, do not probe. If not present, fail directly.
47954
47955  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
47956  METHOD="--with-msvcr-dll"
47957  if test -e "$POSSIBLE_MSVCR_DLL"; then
47958    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47959$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47960
47961    # Need to check if the found msvcr is correct architecture
47962    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47963$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47964    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47965    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47966      CORRECT_MSVCR_ARCH=386
47967    else
47968      CORRECT_MSVCR_ARCH=x86-64
47969    fi
47970    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47971      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47972$as_echo "ok" >&6; }
47973      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47974      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47975$as_echo_n "checking for msvcr100.dll... " >&6; }
47976      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47977$as_echo "$MSVCR_DLL" >&6; }
47978    else
47979      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47980$as_echo "incorrect, ignoring" >&6; }
47981      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47982$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47983    fi
47984  fi
47985
47986    if test "x$MSVCR_DLL" = x; then
47987      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
47988    fi
47989  fi
47990
47991  if test "x$MSVCR_DLL" = x; then
47992    # Probe: Using well-known location from Visual Studio 10.0
47993    if test "x$VCINSTALLDIR" != x; then
47994      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
47995
47996  windows_path="$CYGWIN_VC_INSTALL_DIR"
47997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47998    unix_path=`$CYGPATH -u "$windows_path"`
47999    CYGWIN_VC_INSTALL_DIR="$unix_path"
48000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48002    CYGWIN_VC_INSTALL_DIR="$unix_path"
48003  fi
48004
48005      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48006        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
48007      else
48008        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
48009      fi
48010
48011  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48012  METHOD="well-known location in VCINSTALLDIR"
48013  if test -e "$POSSIBLE_MSVCR_DLL"; then
48014    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48015$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48016
48017    # Need to check if the found msvcr is correct architecture
48018    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48019$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48020    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48021    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48022      CORRECT_MSVCR_ARCH=386
48023    else
48024      CORRECT_MSVCR_ARCH=x86-64
48025    fi
48026    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48027      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48028$as_echo "ok" >&6; }
48029      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48030      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48031$as_echo_n "checking for msvcr100.dll... " >&6; }
48032      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48033$as_echo "$MSVCR_DLL" >&6; }
48034    else
48035      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48036$as_echo "incorrect, ignoring" >&6; }
48037      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48038$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48039    fi
48040  fi
48041
48042    fi
48043  fi
48044
48045  if test "x$MSVCR_DLL" = x; then
48046    # Probe: Check in the Boot JDK directory.
48047    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
48048
48049  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48050  METHOD="well-known location in Boot JDK"
48051  if test -e "$POSSIBLE_MSVCR_DLL"; then
48052    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48053$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48054
48055    # Need to check if the found msvcr is correct architecture
48056    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48057$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48058    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48059    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48060      CORRECT_MSVCR_ARCH=386
48061    else
48062      CORRECT_MSVCR_ARCH=x86-64
48063    fi
48064    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48065      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48066$as_echo "ok" >&6; }
48067      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48068      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48069$as_echo_n "checking for msvcr100.dll... " >&6; }
48070      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48071$as_echo "$MSVCR_DLL" >&6; }
48072    else
48073      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48074$as_echo "incorrect, ignoring" >&6; }
48075      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48076$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48077    fi
48078  fi
48079
48080  fi
48081
48082  if test "x$MSVCR_DLL" = x; then
48083    # Probe: Look in the Windows system32 directory
48084    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48085
48086  windows_path="$CYGWIN_SYSTEMROOT"
48087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48088    unix_path=`$CYGPATH -u "$windows_path"`
48089    CYGWIN_SYSTEMROOT="$unix_path"
48090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48092    CYGWIN_SYSTEMROOT="$unix_path"
48093  fi
48094
48095    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
48096
48097  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48098  METHOD="well-known location in SYSTEMROOT"
48099  if test -e "$POSSIBLE_MSVCR_DLL"; then
48100    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48101$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48102
48103    # Need to check if the found msvcr is correct architecture
48104    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48105$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48106    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48107    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48108      CORRECT_MSVCR_ARCH=386
48109    else
48110      CORRECT_MSVCR_ARCH=x86-64
48111    fi
48112    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48113      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48114$as_echo "ok" >&6; }
48115      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48116      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48117$as_echo_n "checking for msvcr100.dll... " >&6; }
48118      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48119$as_echo "$MSVCR_DLL" >&6; }
48120    else
48121      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48122$as_echo "incorrect, ignoring" >&6; }
48123      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48124$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48125    fi
48126  fi
48127
48128  fi
48129
48130  if test "x$MSVCR_DLL" = x; then
48131    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48132    if test "x$VS100COMNTOOLS" != x; then
48133      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48134
48135  windows_path="$CYGWIN_VS_TOOLS_DIR"
48136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48137    unix_path=`$CYGPATH -u "$windows_path"`
48138    CYGWIN_VS_TOOLS_DIR="$unix_path"
48139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48141    CYGWIN_VS_TOOLS_DIR="$unix_path"
48142  fi
48143
48144      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48145        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
48146      else
48147        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
48148      fi
48149
48150  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48151  METHOD="search of VS100COMNTOOLS"
48152  if test -e "$POSSIBLE_MSVCR_DLL"; then
48153    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48154$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48155
48156    # Need to check if the found msvcr is correct architecture
48157    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48158$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48159    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48160    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48161      CORRECT_MSVCR_ARCH=386
48162    else
48163      CORRECT_MSVCR_ARCH=x86-64
48164    fi
48165    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48166      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48167$as_echo "ok" >&6; }
48168      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48169      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48170$as_echo_n "checking for msvcr100.dll... " >&6; }
48171      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48172$as_echo "$MSVCR_DLL" >&6; }
48173    else
48174      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48175$as_echo "incorrect, ignoring" >&6; }
48176      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48177$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48178    fi
48179  fi
48180
48181    fi
48182  fi
48183
48184  if test "x$MSVCR_DLL" = x; then
48185    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48186    # (This was the original behaviour; kept since it might turn up something)
48187    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48188      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48189        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
48190      else
48191        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48192        if test "x$POSSIBLE_MSVCR_DLL" = x; then
48193          # We're grasping at straws now...
48194          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
48195        fi
48196      fi
48197
48198
48199  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48200  METHOD="search of VCINSTALLDIR"
48201  if test -e "$POSSIBLE_MSVCR_DLL"; then
48202    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48203$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48204
48205    # Need to check if the found msvcr is correct architecture
48206    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48207$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48208    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48209    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48210      CORRECT_MSVCR_ARCH=386
48211    else
48212      CORRECT_MSVCR_ARCH=x86-64
48213    fi
48214    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48215      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48216$as_echo "ok" >&6; }
48217      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48218      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48219$as_echo_n "checking for msvcr100.dll... " >&6; }
48220      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48221$as_echo "$MSVCR_DLL" >&6; }
48222    else
48223      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48224$as_echo "incorrect, ignoring" >&6; }
48225      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48226$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48227    fi
48228  fi
48229
48230    fi
48231  fi
48232
48233  if test "x$MSVCR_DLL" = x; then
48234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48235$as_echo_n "checking for msvcr100.dll... " >&6; }
48236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48237$as_echo "no" >&6; }
48238    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
48239  fi
48240
48241
48242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48243
48244  # Input might be given as Windows format, start by converting to
48245  # unix format.
48246  path="$MSVCR_DLL"
48247  new_path=`$CYGPATH -u "$path"`
48248
48249  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48250  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48251  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48252  # "foo.exe" is OK but "foo" is an error.
48253  #
48254  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48255  # It is also a way to make sure we got the proper file name for the real test later on.
48256  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48257  if test "x$test_shortpath" = x; then
48258    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
48259$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
48260    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
48261  fi
48262
48263  # Call helper function which possibly converts this using DOS-style short mode.
48264  # If so, the updated path is stored in $new_path.
48265
48266  input_path="$new_path"
48267  # Check if we need to convert this using DOS-style short mode. If the path
48268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48269  # take no chances and rewrite it.
48270  # Note: m4 eats our [], so we need to use [ and ] instead.
48271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48272  if test "x$has_forbidden_chars" != x; then
48273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48274    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48275    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48276    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48277      # Going to short mode and back again did indeed matter. Since short mode is
48278      # case insensitive, let's make it lowercase to improve readability.
48279      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48280      # Now convert it back to Unix-stile (cygpath)
48281      input_path=`$CYGPATH -u "$shortmode_path"`
48282      new_path="$input_path"
48283    fi
48284  fi
48285
48286  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48287  if test "x$test_cygdrive_prefix" = x; then
48288    # As a simple fix, exclude /usr/bin since it's not a real path.
48289    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48290      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48291      # a path prefixed by /cygdrive for fixpath to work.
48292      new_path="$CYGWIN_ROOT_PATH$input_path"
48293    fi
48294  fi
48295
48296
48297  if test "x$path" != "x$new_path"; then
48298    MSVCR_DLL="$new_path"
48299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
48300$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
48301  fi
48302
48303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48304
48305  path="$MSVCR_DLL"
48306  has_colon=`$ECHO $path | $GREP ^.:`
48307  new_path="$path"
48308  if test "x$has_colon" = x; then
48309    # Not in mixed or Windows style, start by that.
48310    new_path=`cmd //c echo $path`
48311  fi
48312
48313
48314  input_path="$new_path"
48315  # Check if we need to convert this using DOS-style short mode. If the path
48316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48317  # take no chances and rewrite it.
48318  # Note: m4 eats our [], so we need to use [ and ] instead.
48319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48320  if test "x$has_forbidden_chars" != x; then
48321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48322    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48323  fi
48324
48325
48326  windows_path="$new_path"
48327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48328    unix_path=`$CYGPATH -u "$windows_path"`
48329    new_path="$unix_path"
48330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48332    new_path="$unix_path"
48333  fi
48334
48335  if test "x$path" != "x$new_path"; then
48336    MSVCR_DLL="$new_path"
48337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
48338$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
48339  fi
48340
48341  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48342  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48343
48344  else
48345    # We're on a posix platform. Hooray! :)
48346    path="$MSVCR_DLL"
48347    has_space=`$ECHO "$path" | $GREP " "`
48348    if test "x$has_space" != x; then
48349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
48350$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
48351      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48352    fi
48353
48354    # Use eval to expand a potential ~
48355    eval path="$path"
48356    if test ! -f "$path" && test ! -d "$path"; then
48357      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48358    fi
48359
48360    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
48361  fi
48362
48363
48364
48365
48366# Check whether --with-dxsdk was given.
48367if test "${with_dxsdk+set}" = set; then :
48368  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
48369$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
48370fi
48371
48372
48373
48374
48375# Check whether --with-dxsdk-lib was given.
48376if test "${with_dxsdk_lib+set}" = set; then :
48377  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
48378$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
48379fi
48380
48381
48382
48383
48384# Check whether --with-dxsdk-include was given.
48385if test "${with_dxsdk_include+set}" = set; then :
48386  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
48387$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
48388fi
48389
48390
48391  fi
48392
48393
48394
48395###############################################################################
48396#
48397# We need to do some final tweaking, when everything else is done.
48398#
48399###############################################################################
48400
48401
48402  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
48403
48404
48405  # The name of the Service Agent jar.
48406  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
48407  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48408    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
48409  fi
48410
48411
48412
48413    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
48414$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
48415
48416    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
48417      ENABLE_INTREE_EC=yes
48418      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48419$as_echo "yes" >&6; }
48420    else
48421      ENABLE_INTREE_EC=no
48422      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48423$as_echo "no" >&6; }
48424    fi
48425
48426
48427
48428
48429###############################################################################
48430#
48431# Configure parts of the build that only affect the build performance,
48432# not the result.
48433#
48434###############################################################################
48435
48436
48437  # How many cores do we have on this build system?
48438
48439# Check whether --with-num-cores was given.
48440if test "${with_num_cores+set}" = set; then :
48441  withval=$with_num_cores;
48442fi
48443
48444  if test "x$with_num_cores" = x; then
48445    # The number of cores were not specified, try to probe them.
48446
48447  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
48448$as_echo_n "checking for number of cores... " >&6; }
48449  NUM_CORES=1
48450  FOUND_CORES=no
48451
48452  if test -f /proc/cpuinfo; then
48453    # Looks like a Linux (or cygwin) system
48454    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
48455    FOUND_CORES=yes
48456  elif test -x /usr/sbin/psrinfo; then
48457    # Looks like a Solaris system
48458    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
48459    FOUND_CORES=yes
48460  elif test -x /usr/sbin/system_profiler; then
48461    # Looks like a MacOSX system
48462    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
48463    FOUND_CORES=yes
48464  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
48465    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
48466    FOUND_CORES=yes
48467  elif test -n "$NUMBER_OF_PROCESSORS"; then
48468    # On windows, look in the env
48469    NUM_CORES=$NUMBER_OF_PROCESSORS
48470    FOUND_CORES=yes
48471  fi
48472
48473  if test "x$FOUND_CORES" = xyes; then
48474    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
48475$as_echo "$NUM_CORES" >&6; }
48476  else
48477    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
48478$as_echo "could not detect number of cores, defaulting to 1" >&6; }
48479    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
48480$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
48481  fi
48482
48483  else
48484    NUM_CORES=$with_num_cores
48485  fi
48486
48487
48488
48489  # How much memory do we have on this build system?
48490
48491# Check whether --with-memory-size was given.
48492if test "${with_memory_size+set}" = set; then :
48493  withval=$with_memory_size;
48494fi
48495
48496  if test "x$with_memory_size" = x; then
48497    # The memory size was not specified, try to probe it.
48498
48499  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
48500$as_echo_n "checking for memory size... " >&6; }
48501  # Default to 1024 MB
48502  MEMORY_SIZE=1024
48503  FOUND_MEM=no
48504
48505  if test -f /proc/meminfo; then
48506    # Looks like a Linux (or cygwin) system
48507    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
48508    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
48509    FOUND_MEM=yes
48510  elif test -x /usr/sbin/prtconf; then
48511    # Looks like a Solaris or AIX system
48512    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
48513    FOUND_MEM=yes
48514  elif test -x /usr/sbin/system_profiler; then
48515    # Looks like a MacOSX system
48516    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
48517    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
48518    FOUND_MEM=yes
48519  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
48520    # Windows, but without cygwin
48521    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
48522    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
48523    FOUND_MEM=yes
48524  fi
48525
48526  if test "x$FOUND_MEM" = xyes; then
48527    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
48528$as_echo "$MEMORY_SIZE MB" >&6; }
48529  else
48530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
48531$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
48532    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
48533$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
48534  fi
48535
48536  else
48537    MEMORY_SIZE=$with_memory_size
48538  fi
48539
48540
48541
48542  # Provide a decent default number of parallel jobs for make depending on
48543  # number of cores, amount of memory and machine architecture.
48544
48545# Check whether --with-jobs was given.
48546if test "${with_jobs+set}" = set; then :
48547  withval=$with_jobs;
48548fi
48549
48550  if test "x$with_jobs" = x; then
48551    # Number of jobs was not specified, calculate.
48552    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
48553$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
48554    # Approximate memory in GB, rounding up a bit.
48555    memory_gb=`expr $MEMORY_SIZE / 1100`
48556    # Pick the lowest of memory in gb and number of cores.
48557    if test "$memory_gb" -lt "$NUM_CORES"; then
48558      JOBS="$memory_gb"
48559    else
48560      JOBS="$NUM_CORES"
48561      # On bigger machines, leave some room for other processes to run
48562      if test "$JOBS" -gt "4"; then
48563        JOBS=`expr $JOBS '*' 90 / 100`
48564      fi
48565    fi
48566    # Cap number of jobs to 16
48567    if test "$JOBS" -gt "16"; then
48568      JOBS=16
48569    fi
48570    if test "$JOBS" -eq "0"; then
48571      JOBS=1
48572    fi
48573    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
48574$as_echo "$JOBS" >&6; }
48575  else
48576    JOBS=$with_jobs
48577  fi
48578
48579
48580
48581# Setup smart javac (after cores and memory have been setup)
48582
48583
48584# Check whether --with-sjavac-server-java was given.
48585if test "${with_sjavac_server_java+set}" = set; then :
48586  withval=$with_sjavac_server_java;
48587fi
48588
48589
48590  if test "x$with_sjavac_server_java" != x; then
48591    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
48592    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
48593    if test "x$FOUND_VERSION" = x; then
48594      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
48595    fi
48596  else
48597    SJAVAC_SERVER_JAVA=""
48598    # Hotspot specific options.
48599
48600  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
48601  $ECHO "Command: $JAVA -verbosegc -version" >&5
48602  OUTPUT=`$JAVA -verbosegc -version 2>&1`
48603  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48604  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48605  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48606    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
48607    JVM_ARG_OK=true
48608  else
48609    $ECHO "Arg failed:" >&5
48610    $ECHO "$OUTPUT" >&5
48611    JVM_ARG_OK=false
48612  fi
48613
48614    # JRockit specific options.
48615
48616  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
48617  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
48618  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
48619  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48620  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48621  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48622    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
48623    JVM_ARG_OK=true
48624  else
48625    $ECHO "Arg failed:" >&5
48626    $ECHO "$OUTPUT" >&5
48627    JVM_ARG_OK=false
48628  fi
48629
48630    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
48631  fi
48632
48633
48634  if test "$MEMORY_SIZE" -gt "2500"; then
48635
48636  $ECHO "Check if jvm arg is ok: -d64" >&5
48637  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
48638  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
48639  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48640  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48641  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48642    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
48643    JVM_ARG_OK=true
48644  else
48645    $ECHO "Arg failed:" >&5
48646    $ECHO "$OUTPUT" >&5
48647    JVM_ARG_OK=false
48648  fi
48649
48650    if test "$JVM_ARG_OK" = true; then
48651      JVM_64BIT=true
48652      JVM_ARG_OK=false
48653    fi
48654  fi
48655
48656  if test "$JVM_64BIT" = true; then
48657    if test "$MEMORY_SIZE" -gt "17000"; then
48658
48659  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
48660  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
48661  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
48662  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48663  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48664  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48665    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
48666    JVM_ARG_OK=true
48667  else
48668    $ECHO "Arg failed:" >&5
48669    $ECHO "$OUTPUT" >&5
48670    JVM_ARG_OK=false
48671  fi
48672
48673    fi
48674    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
48675
48676  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
48677  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
48678  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
48679  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48680  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48681  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48682    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
48683    JVM_ARG_OK=true
48684  else
48685    $ECHO "Arg failed:" >&5
48686    $ECHO "$OUTPUT" >&5
48687    JVM_ARG_OK=false
48688  fi
48689
48690    fi
48691    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
48692
48693  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
48694  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
48695  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
48696  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48697  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48698  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48699    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
48700    JVM_ARG_OK=true
48701  else
48702    $ECHO "Arg failed:" >&5
48703    $ECHO "$OUTPUT" >&5
48704    JVM_ARG_OK=false
48705  fi
48706
48707    fi
48708    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
48709
48710  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
48711  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
48712  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
48713  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48714  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48715  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48716    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
48717    JVM_ARG_OK=true
48718  else
48719    $ECHO "Arg failed:" >&5
48720    $ECHO "$OUTPUT" >&5
48721    JVM_ARG_OK=false
48722  fi
48723
48724    fi
48725  fi
48726  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
48727
48728  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
48729  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
48730  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
48731  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48732  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48733  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48734    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
48735    JVM_ARG_OK=true
48736  else
48737    $ECHO "Arg failed:" >&5
48738    $ECHO "$OUTPUT" >&5
48739    JVM_ARG_OK=false
48740  fi
48741
48742  fi
48743  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
48744
48745  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
48746  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
48747  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
48748  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48749  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48750  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48751    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
48752    JVM_ARG_OK=true
48753  else
48754    $ECHO "Arg failed:" >&5
48755    $ECHO "$OUTPUT" >&5
48756    JVM_ARG_OK=false
48757  fi
48758
48759  fi
48760  if test "$JVM_ARG_OK" = false; then
48761
48762  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
48763  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
48764  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
48765  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48766  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48767  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48768    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
48769    JVM_ARG_OK=true
48770  else
48771    $ECHO "Arg failed:" >&5
48772    $ECHO "$OUTPUT" >&5
48773    JVM_ARG_OK=false
48774  fi
48775
48776  fi
48777
48778  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
48779$as_echo_n "checking whether to use sjavac... " >&6; }
48780  # Check whether --enable-sjavac was given.
48781if test "${enable_sjavac+set}" = set; then :
48782  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
48783else
48784  ENABLE_SJAVAC='no'
48785fi
48786
48787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
48788$as_echo "$ENABLE_SJAVAC" >&6; }
48789
48790
48791  if test "x$ENABLE_SJAVAC" = xyes; then
48792    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
48793  else
48794    SJAVAC_SERVER_DIR=
48795  fi
48796
48797
48798
48799# Can the C/C++ compiler use precompiled headers?
48800
48801
48802  ###############################################################################
48803  #
48804  # Can the C/C++ compiler use precompiled headers?
48805  #
48806  # Check whether --enable-precompiled-headers was given.
48807if test "${enable_precompiled_headers+set}" = set; then :
48808  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
48809else
48810  ENABLE_PRECOMPH=yes
48811fi
48812
48813
48814  USE_PRECOMPILED_HEADER=1
48815  if test "x$ENABLE_PRECOMPH" = xno; then
48816    USE_PRECOMPILED_HEADER=0
48817  fi
48818
48819  if test "x$ENABLE_PRECOMPH" = xyes; then
48820    # Check that the compiler actually supports precomp headers.
48821    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48822      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
48823$as_echo_n "checking that precompiled headers work... " >&6; }
48824      echo "int alfa();" > conftest.h
48825      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
48826      if test ! -f conftest.hpp.gch; then
48827        USE_PRECOMPILED_HEADER=0
48828        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48829$as_echo "no" >&6; }
48830      else
48831        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48832$as_echo "yes" >&6; }
48833      fi
48834      rm -f conftest.h conftest.hpp.gch
48835    fi
48836  fi
48837
48838
48839
48840
48841# Setup use of ccache, if available
48842
48843  # Check whether --enable-ccache was given.
48844if test "${enable_ccache+set}" = set; then :
48845  enableval=$enable_ccache;
48846fi
48847
48848
48849  CCACHE=
48850  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
48851$as_echo_n "checking is ccache enabled... " >&6; }
48852  ENABLE_CCACHE=$enable_ccache
48853  if test "x$enable_ccache" = xyes; then
48854    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48855$as_echo "yes" >&6; }
48856    OLD_PATH="$PATH"
48857    if test "x$TOOLCHAIN_PATH" != x; then
48858      PATH=$TOOLCHAIN_PATH:$PATH
48859    fi
48860
48861
48862
48863  # Publish this variable in the help.
48864
48865
48866  if test "x$CCACHE" = x; then
48867    # The variable is not set by user, try to locate tool using the code snippet
48868    for ac_prog in ccache
48869do
48870  # Extract the first word of "$ac_prog", so it can be a program name with args.
48871set dummy $ac_prog; ac_word=$2
48872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48873$as_echo_n "checking for $ac_word... " >&6; }
48874if ${ac_cv_path_CCACHE+:} false; then :
48875  $as_echo_n "(cached) " >&6
48876else
48877  case $CCACHE in
48878  [\\/]* | ?:[\\/]*)
48879  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48880  ;;
48881  *)
48882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48883for as_dir in $PATH
48884do
48885  IFS=$as_save_IFS
48886  test -z "$as_dir" && as_dir=.
48887    for ac_exec_ext in '' $ac_executable_extensions; do
48888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48889    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48891    break 2
48892  fi
48893done
48894  done
48895IFS=$as_save_IFS
48896
48897  ;;
48898esac
48899fi
48900CCACHE=$ac_cv_path_CCACHE
48901if test -n "$CCACHE"; then
48902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48903$as_echo "$CCACHE" >&6; }
48904else
48905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48906$as_echo "no" >&6; }
48907fi
48908
48909
48910  test -n "$CCACHE" && break
48911done
48912
48913  else
48914    # The variable is set, but is it from the command line or the environment?
48915
48916    # Try to remove the string !CCACHE! from our list.
48917    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
48918    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48919      # If it failed, the variable was not from the command line. Ignore it,
48920      # but warn the user (except for BASH, which is always set by the calling BASH).
48921      if test "xCCACHE" != xBASH; then
48922        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
48923$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
48924      fi
48925      # Try to locate tool using the code snippet
48926      for ac_prog in ccache
48927do
48928  # Extract the first word of "$ac_prog", so it can be a program name with args.
48929set dummy $ac_prog; ac_word=$2
48930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48931$as_echo_n "checking for $ac_word... " >&6; }
48932if ${ac_cv_path_CCACHE+:} false; then :
48933  $as_echo_n "(cached) " >&6
48934else
48935  case $CCACHE in
48936  [\\/]* | ?:[\\/]*)
48937  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48938  ;;
48939  *)
48940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48941for as_dir in $PATH
48942do
48943  IFS=$as_save_IFS
48944  test -z "$as_dir" && as_dir=.
48945    for ac_exec_ext in '' $ac_executable_extensions; do
48946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48947    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48949    break 2
48950  fi
48951done
48952  done
48953IFS=$as_save_IFS
48954
48955  ;;
48956esac
48957fi
48958CCACHE=$ac_cv_path_CCACHE
48959if test -n "$CCACHE"; then
48960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48961$as_echo "$CCACHE" >&6; }
48962else
48963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48964$as_echo "no" >&6; }
48965fi
48966
48967
48968  test -n "$CCACHE" && break
48969done
48970
48971    else
48972      # If it succeeded, then it was overridden by the user. We will use it
48973      # for the tool.
48974
48975      # First remove it from the list of overridden variables, so we can test
48976      # for unknown variables in the end.
48977      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48978
48979      # Check if the provided tool contains a complete path.
48980      tool_specified="$CCACHE"
48981      tool_basename="${tool_specified##*/}"
48982      if test "x$tool_basename" = "x$tool_specified"; then
48983        # A command without a complete path is provided, search $PATH.
48984        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
48985$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
48986        # Extract the first word of "$tool_basename", so it can be a program name with args.
48987set dummy $tool_basename; ac_word=$2
48988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48989$as_echo_n "checking for $ac_word... " >&6; }
48990if ${ac_cv_path_CCACHE+:} false; then :
48991  $as_echo_n "(cached) " >&6
48992else
48993  case $CCACHE in
48994  [\\/]* | ?:[\\/]*)
48995  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48996  ;;
48997  *)
48998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48999for as_dir in $PATH
49000do
49001  IFS=$as_save_IFS
49002  test -z "$as_dir" && as_dir=.
49003    for ac_exec_ext in '' $ac_executable_extensions; do
49004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49005    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
49006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49007    break 2
49008  fi
49009done
49010  done
49011IFS=$as_save_IFS
49012
49013  ;;
49014esac
49015fi
49016CCACHE=$ac_cv_path_CCACHE
49017if test -n "$CCACHE"; then
49018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
49019$as_echo "$CCACHE" >&6; }
49020else
49021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49022$as_echo "no" >&6; }
49023fi
49024
49025
49026        if test "x$CCACHE" = x; then
49027          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
49028        fi
49029      else
49030        # Otherwise we believe it is a complete path. Use it as it is.
49031        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
49032$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
49033        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
49034$as_echo_n "checking for CCACHE... " >&6; }
49035        if test ! -x "$tool_specified"; then
49036          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49037$as_echo "not found" >&6; }
49038          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
49039        fi
49040        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
49041$as_echo "$tool_specified" >&6; }
49042      fi
49043    fi
49044  fi
49045
49046
49047
49048  if test "x$CCACHE" = x; then
49049    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
49050  fi
49051
49052
49053    CCACHE_STATUS="enabled"
49054    PATH="$OLD_PATH"
49055  elif test "x$enable_ccache" = xno; then
49056    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
49057$as_echo "no, explicitly disabled" >&6; }
49058  elif test "x$enable_ccache" = x; then
49059    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49060$as_echo "no" >&6; }
49061  else
49062    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
49063$as_echo "unknown" >&6; }
49064    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
49065  fi
49066
49067
49068
49069# Check whether --with-ccache-dir was given.
49070if test "${with_ccache_dir+set}" = set; then :
49071  withval=$with_ccache_dir;
49072fi
49073
49074
49075  if test "x$with_ccache_dir" != x; then
49076    # When using a non home ccache directory, assume the use is to share ccache files
49077    # with other users. Thus change the umask.
49078    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
49079    if test "x$CCACHE" = x; then
49080      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
49081$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
49082    fi
49083  fi
49084
49085  if test "x$CCACHE" != x; then
49086
49087  if test "x$CCACHE" != x; then
49088    # Only use ccache if it is 3.1.4 or later, which supports
49089    # precompiled headers.
49090    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
49091$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
49092    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
49093    if test "x$HAS_GOOD_CCACHE" = x; then
49094      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
49095$as_echo "no, disabling ccache" >&6; }
49096      CCACHE=
49097      CCACHE_STATUS="disabled"
49098    else
49099      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49100$as_echo "yes" >&6; }
49101      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
49102$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
49103      PUSHED_FLAGS="$CXXFLAGS"
49104      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
49105      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49106/* end confdefs.h.  */
49107
49108int
49109main ()
49110{
49111
49112  ;
49113  return 0;
49114}
49115_ACEOF
49116if ac_fn_cxx_try_compile "$LINENO"; then :
49117  CC_KNOWS_CCACHE_TRICK=yes
49118else
49119  CC_KNOWS_CCACHE_TRICK=no
49120fi
49121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49122      CXXFLAGS="$PUSHED_FLAGS"
49123      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
49124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49125$as_echo "yes" >&6; }
49126      else
49127        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
49128$as_echo "no, disabling ccaching of precompiled headers" >&6; }
49129        CCACHE=
49130        CCACHE_STATUS="disabled"
49131      fi
49132    fi
49133  fi
49134
49135  if test "x$CCACHE" != x; then
49136    CCACHE_SLOPPINESS=time_macros
49137    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
49138    CCACHE_FLAGS=-fpch-preprocess
49139
49140    if test "x$SET_CCACHE_DIR" != x; then
49141      mkdir -p $CCACHE_DIR > /dev/null 2>&1
49142      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
49143    fi
49144  fi
49145
49146  fi
49147
49148
49149###############################################################################
49150#
49151# And now the finish...
49152#
49153###############################################################################
49154
49155# Check for some common pitfalls
49156
49157  if test x"$OPENJDK_BUILD_OS" = xwindows; then
49158    file_to_test="$SRC_ROOT/LICENSE"
49159    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
49160      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
49161    fi
49162  fi
49163
49164
49165  # Did user specify any unknown variables?
49166
49167  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
49168    # Replace the separating ! with spaces before presenting for end user.
49169    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
49170    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
49171$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
49172  fi
49173
49174
49175  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
49176$as_echo_n "checking if build directory is on local disk... " >&6; }
49177
49178  # df -l lists only local disks; if the given directory is not found then
49179  # a non-zero exit code is given
49180  if test "x$DF" = x; then
49181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49182      # msys does not have df; use Windows "net use" instead.
49183      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
49184      if test "x$IS_NETWORK_DISK" = x; then
49185        OUTPUT_DIR_IS_LOCAL="yes"
49186      else
49187        OUTPUT_DIR_IS_LOCAL="no"
49188      fi
49189    else
49190      # No df here, say it's local
49191      OUTPUT_DIR_IS_LOCAL="yes"
49192    fi
49193  else
49194    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
49195      OUTPUT_DIR_IS_LOCAL="yes"
49196    else
49197      OUTPUT_DIR_IS_LOCAL="no"
49198    fi
49199  fi
49200
49201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
49202$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
49203
49204
49205
49206  # Check if the user has any old-style ALT_ variables set.
49207  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
49208
49209  # Before generating output files, test if they exist. If they do, this is a reconfigure.
49210  # Since we can't properly handle the dependencies for this, warn the user about the situation
49211  if test -e $OUTPUT_ROOT/spec.gmk; then
49212    IS_RECONFIGURE=yes
49213  else
49214    IS_RECONFIGURE=no
49215  fi
49216
49217
49218# At the end, call the custom hook. (Dummy macro if no custom sources available)
49219
49220
49221# We're messing a bit with internal autoconf variables to put the config.status
49222# in the output directory instead of the current directory.
49223CONFIG_STATUS="$OUTPUT_ROOT/config.status"
49224
49225# Create the actual output files. Now the main work of configure is done.
49226cat >confcache <<\_ACEOF
49227# This file is a shell script that caches the results of configure
49228# tests run on this system so they can be shared between configure
49229# scripts and configure runs, see configure's option --config-cache.
49230# It is not useful on other systems.  If it contains results you don't
49231# want to keep, you may remove or edit it.
49232#
49233# config.status only pays attention to the cache file if you give it
49234# the --recheck option to rerun configure.
49235#
49236# `ac_cv_env_foo' variables (set or unset) will be overridden when
49237# loading this file, other *unset* `ac_cv_foo' will be assigned the
49238# following values.
49239
49240_ACEOF
49241
49242# The following way of writing the cache mishandles newlines in values,
49243# but we know of no workaround that is simple, portable, and efficient.
49244# So, we kill variables containing newlines.
49245# Ultrix sh set writes to stderr and can't be redirected directly,
49246# and sets the high bit in the cache file unless we assign to the vars.
49247(
49248  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
49249    eval ac_val=\$$ac_var
49250    case $ac_val in #(
49251    *${as_nl}*)
49252      case $ac_var in #(
49253      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
49254$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
49255      esac
49256      case $ac_var in #(
49257      _ | IFS | as_nl) ;; #(
49258      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
49259      *) { eval $ac_var=; unset $ac_var;} ;;
49260      esac ;;
49261    esac
49262  done
49263
49264  (set) 2>&1 |
49265    case $as_nl`(ac_space=' '; set) 2>&1` in #(
49266    *${as_nl}ac_space=\ *)
49267      # `set' does not quote correctly, so add quotes: double-quote
49268      # substitution turns \\\\ into \\, and sed turns \\ into \.
49269      sed -n \
49270	"s/'/'\\\\''/g;
49271	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
49272      ;; #(
49273    *)
49274      # `set' quotes correctly as required by POSIX, so do not add quotes.
49275      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
49276      ;;
49277    esac |
49278    sort
49279) |
49280  sed '
49281     /^ac_cv_env_/b end
49282     t clear
49283     :clear
49284     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
49285     t end
49286     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
49287     :end' >>confcache
49288if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
49289  if test -w "$cache_file"; then
49290    if test "x$cache_file" != "x/dev/null"; then
49291      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
49292$as_echo "$as_me: updating cache $cache_file" >&6;}
49293      if test ! -f "$cache_file" || test -h "$cache_file"; then
49294	cat confcache >"$cache_file"
49295      else
49296        case $cache_file in #(
49297        */* | ?:*)
49298	  mv -f confcache "$cache_file"$$ &&
49299	  mv -f "$cache_file"$$ "$cache_file" ;; #(
49300        *)
49301	  mv -f confcache "$cache_file" ;;
49302	esac
49303      fi
49304    fi
49305  else
49306    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
49307$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
49308  fi
49309fi
49310rm -f confcache
49311
49312test "x$prefix" = xNONE && prefix=$ac_default_prefix
49313# Let make expand exec_prefix.
49314test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
49315
49316DEFS=-DHAVE_CONFIG_H
49317
49318ac_libobjs=
49319ac_ltlibobjs=
49320U=
49321for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
49322  # 1. Remove the extension, and $U if already installed.
49323  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
49324  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
49325  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
49326  #    will be set to the directory where LIBOBJS objects are built.
49327  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
49328  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
49329done
49330LIBOBJS=$ac_libobjs
49331
49332LTLIBOBJS=$ac_ltlibobjs
49333
49334
49335
49336: "${CONFIG_STATUS=./config.status}"
49337ac_write_fail=0
49338ac_clean_files_save=$ac_clean_files
49339ac_clean_files="$ac_clean_files $CONFIG_STATUS"
49340{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
49341$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
49342as_write_fail=0
49343cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
49344#! $SHELL
49345# Generated by $as_me.
49346# Run this file to recreate the current configuration.
49347# Compiler output produced by configure, useful for debugging
49348# configure, is in config.log if it exists.
49349
49350debug=false
49351ac_cs_recheck=false
49352ac_cs_silent=false
49353
49354SHELL=\${CONFIG_SHELL-$SHELL}
49355export SHELL
49356_ASEOF
49357cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
49358## -------------------- ##
49359## M4sh Initialization. ##
49360## -------------------- ##
49361
49362# Be more Bourne compatible
49363DUALCASE=1; export DUALCASE # for MKS sh
49364if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
49365  emulate sh
49366  NULLCMD=:
49367  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
49368  # is contrary to our usage.  Disable this feature.
49369  alias -g '${1+"$@"}'='"$@"'
49370  setopt NO_GLOB_SUBST
49371else
49372  case `(set -o) 2>/dev/null` in #(
49373  *posix*) :
49374    set -o posix ;; #(
49375  *) :
49376     ;;
49377esac
49378fi
49379
49380
49381as_nl='
49382'
49383export as_nl
49384# Printing a long string crashes Solaris 7 /usr/bin/printf.
49385as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
49386as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
49387as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49388# Prefer a ksh shell builtin over an external printf program on Solaris,
49389# but without wasting forks for bash or zsh.
49390if test -z "$BASH_VERSION$ZSH_VERSION" \
49391    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49392  as_echo='print -r --'
49393  as_echo_n='print -rn --'
49394elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
49395  as_echo='printf %s\n'
49396  as_echo_n='printf %s'
49397else
49398  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
49399    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
49400    as_echo_n='/usr/ucb/echo -n'
49401  else
49402    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
49403    as_echo_n_body='eval
49404      arg=$1;
49405      case $arg in #(
49406      *"$as_nl"*)
49407	expr "X$arg" : "X\\(.*\\)$as_nl";
49408	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
49409      esac;
49410      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
49411    '
49412    export as_echo_n_body
49413    as_echo_n='sh -c $as_echo_n_body as_echo'
49414  fi
49415  export as_echo_body
49416  as_echo='sh -c $as_echo_body as_echo'
49417fi
49418
49419# The user is always right.
49420if test "${PATH_SEPARATOR+set}" != set; then
49421  PATH_SEPARATOR=:
49422  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
49423    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
49424      PATH_SEPARATOR=';'
49425  }
49426fi
49427
49428
49429# IFS
49430# We need space, tab and new line, in precisely that order.  Quoting is
49431# there to prevent editors from complaining about space-tab.
49432# (If _AS_PATH_WALK were called with IFS unset, it would disable word
49433# splitting by setting IFS to empty value.)
49434IFS=" ""	$as_nl"
49435
49436# Find who we are.  Look in the path if we contain no directory separator.
49437as_myself=
49438case $0 in #((
49439  *[\\/]* ) as_myself=$0 ;;
49440  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49441for as_dir in $PATH
49442do
49443  IFS=$as_save_IFS
49444  test -z "$as_dir" && as_dir=.
49445    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
49446  done
49447IFS=$as_save_IFS
49448
49449     ;;
49450esac
49451# We did not find ourselves, most probably we were run as `sh COMMAND'
49452# in which case we are not to be found in the path.
49453if test "x$as_myself" = x; then
49454  as_myself=$0
49455fi
49456if test ! -f "$as_myself"; then
49457  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
49458  exit 1
49459fi
49460
49461# Unset variables that we do not need and which cause bugs (e.g. in
49462# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
49463# suppresses any "Segmentation fault" message there.  '((' could
49464# trigger a bug in pdksh 5.2.14.
49465for as_var in BASH_ENV ENV MAIL MAILPATH
49466do eval test x\${$as_var+set} = xset \
49467  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
49468done
49469PS1='$ '
49470PS2='> '
49471PS4='+ '
49472
49473# NLS nuisances.
49474LC_ALL=C
49475export LC_ALL
49476LANGUAGE=C
49477export LANGUAGE
49478
49479# CDPATH.
49480(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
49481
49482
49483# as_fn_error STATUS ERROR [LINENO LOG_FD]
49484# ----------------------------------------
49485# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
49486# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
49487# script with STATUS, using 1 if that was 0.
49488as_fn_error ()
49489{
49490  as_status=$1; test $as_status -eq 0 && as_status=1
49491  if test "$4"; then
49492    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
49493    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
49494  fi
49495  $as_echo "$as_me: error: $2" >&2
49496  as_fn_exit $as_status
49497} # as_fn_error
49498
49499
49500# as_fn_set_status STATUS
49501# -----------------------
49502# Set $? to STATUS, without forking.
49503as_fn_set_status ()
49504{
49505  return $1
49506} # as_fn_set_status
49507
49508# as_fn_exit STATUS
49509# -----------------
49510# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
49511as_fn_exit ()
49512{
49513  set +e
49514  as_fn_set_status $1
49515  exit $1
49516} # as_fn_exit
49517
49518# as_fn_unset VAR
49519# ---------------
49520# Portably unset VAR.
49521as_fn_unset ()
49522{
49523  { eval $1=; unset $1;}
49524}
49525as_unset=as_fn_unset
49526# as_fn_append VAR VALUE
49527# ----------------------
49528# Append the text in VALUE to the end of the definition contained in VAR. Take
49529# advantage of any shell optimizations that allow amortized linear growth over
49530# repeated appends, instead of the typical quadratic growth present in naive
49531# implementations.
49532if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
49533  eval 'as_fn_append ()
49534  {
49535    eval $1+=\$2
49536  }'
49537else
49538  as_fn_append ()
49539  {
49540    eval $1=\$$1\$2
49541  }
49542fi # as_fn_append
49543
49544# as_fn_arith ARG...
49545# ------------------
49546# Perform arithmetic evaluation on the ARGs, and store the result in the
49547# global $as_val. Take advantage of shells that can avoid forks. The arguments
49548# must be portable across $(()) and expr.
49549if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
49550  eval 'as_fn_arith ()
49551  {
49552    as_val=$(( $* ))
49553  }'
49554else
49555  as_fn_arith ()
49556  {
49557    as_val=`expr "$@" || test $? -eq 1`
49558  }
49559fi # as_fn_arith
49560
49561
49562if expr a : '\(a\)' >/dev/null 2>&1 &&
49563   test "X`expr 00001 : '.*\(...\)'`" = X001; then
49564  as_expr=expr
49565else
49566  as_expr=false
49567fi
49568
49569if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
49570  as_basename=basename
49571else
49572  as_basename=false
49573fi
49574
49575if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
49576  as_dirname=dirname
49577else
49578  as_dirname=false
49579fi
49580
49581as_me=`$as_basename -- "$0" ||
49582$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
49583	 X"$0" : 'X\(//\)$' \| \
49584	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
49585$as_echo X/"$0" |
49586    sed '/^.*\/\([^/][^/]*\)\/*$/{
49587	    s//\1/
49588	    q
49589	  }
49590	  /^X\/\(\/\/\)$/{
49591	    s//\1/
49592	    q
49593	  }
49594	  /^X\/\(\/\).*/{
49595	    s//\1/
49596	    q
49597	  }
49598	  s/.*/./; q'`
49599
49600# Avoid depending upon Character Ranges.
49601as_cr_letters='abcdefghijklmnopqrstuvwxyz'
49602as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
49603as_cr_Letters=$as_cr_letters$as_cr_LETTERS
49604as_cr_digits='0123456789'
49605as_cr_alnum=$as_cr_Letters$as_cr_digits
49606
49607ECHO_C= ECHO_N= ECHO_T=
49608case `echo -n x` in #(((((
49609-n*)
49610  case `echo 'xy\c'` in
49611  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
49612  xy)  ECHO_C='\c';;
49613  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
49614       ECHO_T='	';;
49615  esac;;
49616*)
49617  ECHO_N='-n';;
49618esac
49619
49620rm -f conf$$ conf$$.exe conf$$.file
49621if test -d conf$$.dir; then
49622  rm -f conf$$.dir/conf$$.file
49623else
49624  rm -f conf$$.dir
49625  mkdir conf$$.dir 2>/dev/null
49626fi
49627if (echo >conf$$.file) 2>/dev/null; then
49628  if ln -s conf$$.file conf$$ 2>/dev/null; then
49629    as_ln_s='ln -s'
49630    # ... but there are two gotchas:
49631    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
49632    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
49633    # In both cases, we have to default to `cp -pR'.
49634    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
49635      as_ln_s='cp -pR'
49636  elif ln conf$$.file conf$$ 2>/dev/null; then
49637    as_ln_s=ln
49638  else
49639    as_ln_s='cp -pR'
49640  fi
49641else
49642  as_ln_s='cp -pR'
49643fi
49644rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
49645rmdir conf$$.dir 2>/dev/null
49646
49647
49648# as_fn_mkdir_p
49649# -------------
49650# Create "$as_dir" as a directory, including parents if necessary.
49651as_fn_mkdir_p ()
49652{
49653
49654  case $as_dir in #(
49655  -*) as_dir=./$as_dir;;
49656  esac
49657  test -d "$as_dir" || eval $as_mkdir_p || {
49658    as_dirs=
49659    while :; do
49660      case $as_dir in #(
49661      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
49662      *) as_qdir=$as_dir;;
49663      esac
49664      as_dirs="'$as_qdir' $as_dirs"
49665      as_dir=`$as_dirname -- "$as_dir" ||
49666$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49667	 X"$as_dir" : 'X\(//\)[^/]' \| \
49668	 X"$as_dir" : 'X\(//\)$' \| \
49669	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
49670$as_echo X"$as_dir" |
49671    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49672	    s//\1/
49673	    q
49674	  }
49675	  /^X\(\/\/\)[^/].*/{
49676	    s//\1/
49677	    q
49678	  }
49679	  /^X\(\/\/\)$/{
49680	    s//\1/
49681	    q
49682	  }
49683	  /^X\(\/\).*/{
49684	    s//\1/
49685	    q
49686	  }
49687	  s/.*/./; q'`
49688      test -d "$as_dir" && break
49689    done
49690    test -z "$as_dirs" || eval "mkdir $as_dirs"
49691  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
49692
49693
49694} # as_fn_mkdir_p
49695if mkdir -p . 2>/dev/null; then
49696  as_mkdir_p='mkdir -p "$as_dir"'
49697else
49698  test -d ./-p && rmdir ./-p
49699  as_mkdir_p=false
49700fi
49701
49702
49703# as_fn_executable_p FILE
49704# -----------------------
49705# Test if FILE is an executable regular file.
49706as_fn_executable_p ()
49707{
49708  test -f "$1" && test -x "$1"
49709} # as_fn_executable_p
49710as_test_x='test -x'
49711as_executable_p=as_fn_executable_p
49712
49713# Sed expression to map a string onto a valid CPP name.
49714as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
49715
49716# Sed expression to map a string onto a valid variable name.
49717as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
49718
49719
49720exec 6>&1
49721## ----------------------------------- ##
49722## Main body of $CONFIG_STATUS script. ##
49723## ----------------------------------- ##
49724_ASEOF
49725test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
49726
49727cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49728# Save the log message, to keep $0 and so on meaningful, and to
49729# report actual input values of CONFIG_FILES etc. instead of their
49730# values after options handling.
49731ac_log="
49732This file was extended by OpenJDK $as_me jdk9, which was
49733generated by GNU Autoconf 2.69.  Invocation command line was
49734
49735  CONFIG_FILES    = $CONFIG_FILES
49736  CONFIG_HEADERS  = $CONFIG_HEADERS
49737  CONFIG_LINKS    = $CONFIG_LINKS
49738  CONFIG_COMMANDS = $CONFIG_COMMANDS
49739  $ $0 $@
49740
49741on `(hostname || uname -n) 2>/dev/null | sed 1q`
49742"
49743
49744_ACEOF
49745
49746case $ac_config_files in *"
49747"*) set x $ac_config_files; shift; ac_config_files=$*;;
49748esac
49749
49750case $ac_config_headers in *"
49751"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
49752esac
49753
49754
49755cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49756# Files that config.status was made for.
49757config_files="$ac_config_files"
49758config_headers="$ac_config_headers"
49759
49760_ACEOF
49761
49762cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49763ac_cs_usage="\
49764\`$as_me' instantiates files and other configuration actions
49765from templates according to the current configuration.  Unless the files
49766and actions are specified as TAGs, all are instantiated by default.
49767
49768Usage: $0 [OPTION]... [TAG]...
49769
49770  -h, --help       print this help, then exit
49771  -V, --version    print version number and configuration settings, then exit
49772      --config     print configuration, then exit
49773  -q, --quiet, --silent
49774                   do not print progress messages
49775  -d, --debug      don't remove temporary files
49776      --recheck    update $as_me by reconfiguring in the same conditions
49777      --file=FILE[:TEMPLATE]
49778                   instantiate the configuration file FILE
49779      --header=FILE[:TEMPLATE]
49780                   instantiate the configuration header FILE
49781
49782Configuration files:
49783$config_files
49784
49785Configuration headers:
49786$config_headers
49787
49788Report bugs to <build-dev@openjdk.java.net>.
49789OpenJDK home page: <http://openjdk.java.net>."
49790
49791_ACEOF
49792cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49793ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
49794ac_cs_version="\\
49795OpenJDK config.status jdk9
49796configured by $0, generated by GNU Autoconf 2.69,
49797  with options \\"\$ac_cs_config\\"
49798
49799Copyright (C) 2012 Free Software Foundation, Inc.
49800This config.status script is free software; the Free Software Foundation
49801gives unlimited permission to copy, distribute and modify it."
49802
49803ac_pwd='$ac_pwd'
49804srcdir='$srcdir'
49805AWK='$AWK'
49806test -n "\$AWK" || AWK=awk
49807_ACEOF
49808
49809cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49810# The default lists apply if the user does not specify any file.
49811ac_need_defaults=:
49812while test $# != 0
49813do
49814  case $1 in
49815  --*=?*)
49816    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49817    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
49818    ac_shift=:
49819    ;;
49820  --*=)
49821    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49822    ac_optarg=
49823    ac_shift=:
49824    ;;
49825  *)
49826    ac_option=$1
49827    ac_optarg=$2
49828    ac_shift=shift
49829    ;;
49830  esac
49831
49832  case $ac_option in
49833  # Handling of the options.
49834  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
49835    ac_cs_recheck=: ;;
49836  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
49837    $as_echo "$ac_cs_version"; exit ;;
49838  --config | --confi | --conf | --con | --co | --c )
49839    $as_echo "$ac_cs_config"; exit ;;
49840  --debug | --debu | --deb | --de | --d | -d )
49841    debug=: ;;
49842  --file | --fil | --fi | --f )
49843    $ac_shift
49844    case $ac_optarg in
49845    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49846    '') as_fn_error $? "missing file argument" ;;
49847    esac
49848    as_fn_append CONFIG_FILES " '$ac_optarg'"
49849    ac_need_defaults=false;;
49850  --header | --heade | --head | --hea )
49851    $ac_shift
49852    case $ac_optarg in
49853    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49854    esac
49855    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
49856    ac_need_defaults=false;;
49857  --he | --h)
49858    # Conflict between --help and --header
49859    as_fn_error $? "ambiguous option: \`$1'
49860Try \`$0 --help' for more information.";;
49861  --help | --hel | -h )
49862    $as_echo "$ac_cs_usage"; exit ;;
49863  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
49864  | -silent | --silent | --silen | --sile | --sil | --si | --s)
49865    ac_cs_silent=: ;;
49866
49867  # This is an error.
49868  -*) as_fn_error $? "unrecognized option: \`$1'
49869Try \`$0 --help' for more information." ;;
49870
49871  *) as_fn_append ac_config_targets " $1"
49872     ac_need_defaults=false ;;
49873
49874  esac
49875  shift
49876done
49877
49878ac_configure_extra_args=
49879
49880if $ac_cs_silent; then
49881  exec 6>/dev/null
49882  ac_configure_extra_args="$ac_configure_extra_args --silent"
49883fi
49884
49885_ACEOF
49886cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49887if \$ac_cs_recheck; then
49888  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
49889  shift
49890  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
49891  CONFIG_SHELL='$SHELL'
49892  export CONFIG_SHELL
49893  exec "\$@"
49894fi
49895
49896_ACEOF
49897cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49898exec 5>>config.log
49899{
49900  echo
49901  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
49902## Running $as_me. ##
49903_ASBOX
49904  $as_echo "$ac_log"
49905} >&5
49906
49907_ACEOF
49908cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49909_ACEOF
49910
49911cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49912
49913# Handling of arguments.
49914for ac_config_target in $ac_config_targets
49915do
49916  case $ac_config_target in
49917    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
49918    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
49919    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
49920    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
49921    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
49922    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
49923    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
49924
49925  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
49926  esac
49927done
49928
49929
49930# If the user did not use the arguments to specify the items to instantiate,
49931# then the envvar interface is used.  Set only those that are not.
49932# We use the long form for the default assignment because of an extremely
49933# bizarre bug on SunOS 4.1.3.
49934if $ac_need_defaults; then
49935  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
49936  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
49937fi
49938
49939# Have a temporary directory for convenience.  Make it in the build tree
49940# simply because there is no reason against having it here, and in addition,
49941# creating and moving files from /tmp can sometimes cause problems.
49942# Hook for its removal unless debugging.
49943# Note that there is a small window in which the directory will not be cleaned:
49944# after its creation but before its name has been assigned to `$tmp'.
49945$debug ||
49946{
49947  tmp= ac_tmp=
49948  trap 'exit_status=$?
49949  : "${ac_tmp:=$tmp}"
49950  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
49951' 0
49952  trap 'as_fn_exit 1' 1 2 13 15
49953}
49954# Create a (secure) tmp directory for tmp files.
49955
49956{
49957  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
49958  test -d "$tmp"
49959}  ||
49960{
49961  tmp=./conf$$-$RANDOM
49962  (umask 077 && mkdir "$tmp")
49963} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
49964ac_tmp=$tmp
49965
49966# Set up the scripts for CONFIG_FILES section.
49967# No need to generate them if there are no CONFIG_FILES.
49968# This happens for instance with `./config.status config.h'.
49969if test -n "$CONFIG_FILES"; then
49970
49971
49972ac_cr=`echo X | tr X '\015'`
49973# On cygwin, bash can eat \r inside `` if the user requested igncr.
49974# But we know of no other shell where ac_cr would be empty at this
49975# point, so we can use a bashism as a fallback.
49976if test "x$ac_cr" = x; then
49977  eval ac_cr=\$\'\\r\'
49978fi
49979ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
49980if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
49981  ac_cs_awk_cr='\\r'
49982else
49983  ac_cs_awk_cr=$ac_cr
49984fi
49985
49986echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
49987_ACEOF
49988
49989
49990{
49991  echo "cat >conf$$subs.awk <<_ACEOF" &&
49992  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
49993  echo "_ACEOF"
49994} >conf$$subs.sh ||
49995  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49996ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
49997ac_delim='%!_!# '
49998for ac_last_try in false false false false false :; do
49999  . ./conf$$subs.sh ||
50000    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50001
50002  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
50003  if test $ac_delim_n = $ac_delim_num; then
50004    break
50005  elif $ac_last_try; then
50006    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50007  else
50008    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
50009  fi
50010done
50011rm -f conf$$subs.sh
50012
50013cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50014cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
50015_ACEOF
50016sed -n '
50017h
50018s/^/S["/; s/!.*/"]=/
50019p
50020g
50021s/^[^!]*!//
50022:repl
50023t repl
50024s/'"$ac_delim"'$//
50025t delim
50026:nl
50027h
50028s/\(.\{148\}\)..*/\1/
50029t more1
50030s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
50031p
50032n
50033b repl
50034:more1
50035s/["\\]/\\&/g; s/^/"/; s/$/"\\/
50036p
50037g
50038s/.\{148\}//
50039t nl
50040:delim
50041h
50042s/\(.\{148\}\)..*/\1/
50043t more2
50044s/["\\]/\\&/g; s/^/"/; s/$/"/
50045p
50046b
50047:more2
50048s/["\\]/\\&/g; s/^/"/; s/$/"\\/
50049p
50050g
50051s/.\{148\}//
50052t delim
50053' <conf$$subs.awk | sed '
50054/^[^""]/{
50055  N
50056  s/\n//
50057}
50058' >>$CONFIG_STATUS || ac_write_fail=1
50059rm -f conf$$subs.awk
50060cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50061_ACAWK
50062cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
50063  for (key in S) S_is_set[key] = 1
50064  FS = ""
50065
50066}
50067{
50068  line = $ 0
50069  nfields = split(line, field, "@")
50070  substed = 0
50071  len = length(field[1])
50072  for (i = 2; i < nfields; i++) {
50073    key = field[i]
50074    keylen = length(key)
50075    if (S_is_set[key]) {
50076      value = S[key]
50077      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
50078      len += length(value) + length(field[++i])
50079      substed = 1
50080    } else
50081      len += 1 + keylen
50082  }
50083
50084  print line
50085}
50086
50087_ACAWK
50088_ACEOF
50089cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50090if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
50091  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
50092else
50093  cat
50094fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
50095  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
50096_ACEOF
50097
50098# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
50099# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
50100# trailing colons and then remove the whole line if VPATH becomes empty
50101# (actually we leave an empty line to preserve line numbers).
50102if test "x$srcdir" = x.; then
50103  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
50104h
50105s///
50106s/^/:/
50107s/[	 ]*$/:/
50108s/:\$(srcdir):/:/g
50109s/:\${srcdir}:/:/g
50110s/:@srcdir@:/:/g
50111s/^:*//
50112s/:*$//
50113x
50114s/\(=[	 ]*\).*/\1/
50115G
50116s/\n//
50117s/^[^=]*=[	 ]*$//
50118}'
50119fi
50120
50121cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50122fi # test -n "$CONFIG_FILES"
50123
50124# Set up the scripts for CONFIG_HEADERS section.
50125# No need to generate them if there are no CONFIG_HEADERS.
50126# This happens for instance with `./config.status Makefile'.
50127if test -n "$CONFIG_HEADERS"; then
50128cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
50129BEGIN {
50130_ACEOF
50131
50132# Transform confdefs.h into an awk script `defines.awk', embedded as
50133# here-document in config.status, that substitutes the proper values into
50134# config.h.in to produce config.h.
50135
50136# Create a delimiter string that does not exist in confdefs.h, to ease
50137# handling of long lines.
50138ac_delim='%!_!# '
50139for ac_last_try in false false :; do
50140  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
50141  if test -z "$ac_tt"; then
50142    break
50143  elif $ac_last_try; then
50144    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
50145  else
50146    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
50147  fi
50148done
50149
50150# For the awk script, D is an array of macro values keyed by name,
50151# likewise P contains macro parameters if any.  Preserve backslash
50152# newline sequences.
50153
50154ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
50155sed -n '
50156s/.\{148\}/&'"$ac_delim"'/g
50157t rset
50158:rset
50159s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
50160t def
50161d
50162:def
50163s/\\$//
50164t bsnl
50165s/["\\]/\\&/g
50166s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
50167D["\1"]=" \3"/p
50168s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
50169d
50170:bsnl
50171s/["\\]/\\&/g
50172s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
50173D["\1"]=" \3\\\\\\n"\\/p
50174t cont
50175s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
50176t cont
50177d
50178:cont
50179n
50180s/.\{148\}/&'"$ac_delim"'/g
50181t clear
50182:clear
50183s/\\$//
50184t bsnlc
50185s/["\\]/\\&/g; s/^/"/; s/$/"/p
50186d
50187:bsnlc
50188s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
50189b cont
50190' <confdefs.h | sed '
50191s/'"$ac_delim"'/"\\\
50192"/g' >>$CONFIG_STATUS || ac_write_fail=1
50193
50194cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50195  for (key in D) D_is_set[key] = 1
50196  FS = ""
50197}
50198/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
50199  line = \$ 0
50200  split(line, arg, " ")
50201  if (arg[1] == "#") {
50202    defundef = arg[2]
50203    mac1 = arg[3]
50204  } else {
50205    defundef = substr(arg[1], 2)
50206    mac1 = arg[2]
50207  }
50208  split(mac1, mac2, "(") #)
50209  macro = mac2[1]
50210  prefix = substr(line, 1, index(line, defundef) - 1)
50211  if (D_is_set[macro]) {
50212    # Preserve the white space surrounding the "#".
50213    print prefix "define", macro P[macro] D[macro]
50214    next
50215  } else {
50216    # Replace #undef with comments.  This is necessary, for example,
50217    # in the case of _POSIX_SOURCE, which is predefined and required
50218    # on some systems where configure will not decide to define it.
50219    if (defundef == "undef") {
50220      print "/*", prefix defundef, macro, "*/"
50221      next
50222    }
50223  }
50224}
50225{ print }
50226_ACAWK
50227_ACEOF
50228cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50229  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
50230fi # test -n "$CONFIG_HEADERS"
50231
50232
50233eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
50234shift
50235for ac_tag
50236do
50237  case $ac_tag in
50238  :[FHLC]) ac_mode=$ac_tag; continue;;
50239  esac
50240  case $ac_mode$ac_tag in
50241  :[FHL]*:*);;
50242  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
50243  :[FH]-) ac_tag=-:-;;
50244  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
50245  esac
50246  ac_save_IFS=$IFS
50247  IFS=:
50248  set x $ac_tag
50249  IFS=$ac_save_IFS
50250  shift
50251  ac_file=$1
50252  shift
50253
50254  case $ac_mode in
50255  :L) ac_source=$1;;
50256  :[FH])
50257    ac_file_inputs=
50258    for ac_f
50259    do
50260      case $ac_f in
50261      -) ac_f="$ac_tmp/stdin";;
50262      *) # Look for the file first in the build tree, then in the source tree
50263	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
50264	 # because $ac_f cannot contain `:'.
50265	 test -f "$ac_f" ||
50266	   case $ac_f in
50267	   [\\/$]*) false;;
50268	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
50269	   esac ||
50270	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
50271      esac
50272      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
50273      as_fn_append ac_file_inputs " '$ac_f'"
50274    done
50275
50276    # Let's still pretend it is `configure' which instantiates (i.e., don't
50277    # use $as_me), people would be surprised to read:
50278    #    /* config.h.  Generated by config.status.  */
50279    configure_input='Generated from '`
50280	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
50281	`' by configure.'
50282    if test x"$ac_file" != x-; then
50283      configure_input="$ac_file.  $configure_input"
50284      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
50285$as_echo "$as_me: creating $ac_file" >&6;}
50286    fi
50287    # Neutralize special characters interpreted by sed in replacement strings.
50288    case $configure_input in #(
50289    *\&* | *\|* | *\\* )
50290       ac_sed_conf_input=`$as_echo "$configure_input" |
50291       sed 's/[\\\\&|]/\\\\&/g'`;; #(
50292    *) ac_sed_conf_input=$configure_input;;
50293    esac
50294
50295    case $ac_tag in
50296    *:-:* | *:-) cat >"$ac_tmp/stdin" \
50297      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
50298    esac
50299    ;;
50300  esac
50301
50302  ac_dir=`$as_dirname -- "$ac_file" ||
50303$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
50304	 X"$ac_file" : 'X\(//\)[^/]' \| \
50305	 X"$ac_file" : 'X\(//\)$' \| \
50306	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
50307$as_echo X"$ac_file" |
50308    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
50309	    s//\1/
50310	    q
50311	  }
50312	  /^X\(\/\/\)[^/].*/{
50313	    s//\1/
50314	    q
50315	  }
50316	  /^X\(\/\/\)$/{
50317	    s//\1/
50318	    q
50319	  }
50320	  /^X\(\/\).*/{
50321	    s//\1/
50322	    q
50323	  }
50324	  s/.*/./; q'`
50325  as_dir="$ac_dir"; as_fn_mkdir_p
50326  ac_builddir=.
50327
50328case "$ac_dir" in
50329.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
50330*)
50331  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
50332  # A ".." for each directory in $ac_dir_suffix.
50333  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
50334  case $ac_top_builddir_sub in
50335  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
50336  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
50337  esac ;;
50338esac
50339ac_abs_top_builddir=$ac_pwd
50340ac_abs_builddir=$ac_pwd$ac_dir_suffix
50341# for backward compatibility:
50342ac_top_builddir=$ac_top_build_prefix
50343
50344case $srcdir in
50345  .)  # We are building in place.
50346    ac_srcdir=.
50347    ac_top_srcdir=$ac_top_builddir_sub
50348    ac_abs_top_srcdir=$ac_pwd ;;
50349  [\\/]* | ?:[\\/]* )  # Absolute name.
50350    ac_srcdir=$srcdir$ac_dir_suffix;
50351    ac_top_srcdir=$srcdir
50352    ac_abs_top_srcdir=$srcdir ;;
50353  *) # Relative name.
50354    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
50355    ac_top_srcdir=$ac_top_build_prefix$srcdir
50356    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
50357esac
50358ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
50359
50360
50361  case $ac_mode in
50362  :F)
50363  #
50364  # CONFIG_FILE
50365  #
50366
50367_ACEOF
50368
50369cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50370# If the template does not know about datarootdir, expand it.
50371# FIXME: This hack should be removed a few years after 2.60.
50372ac_datarootdir_hack=; ac_datarootdir_seen=
50373ac_sed_dataroot='
50374/datarootdir/ {
50375  p
50376  q
50377}
50378/@datadir@/p
50379/@docdir@/p
50380/@infodir@/p
50381/@localedir@/p
50382/@mandir@/p'
50383case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
50384*datarootdir*) ac_datarootdir_seen=yes;;
50385*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
50386  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
50387$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
50388_ACEOF
50389cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50390  ac_datarootdir_hack='
50391  s&@datadir@&$datadir&g
50392  s&@docdir@&$docdir&g
50393  s&@infodir@&$infodir&g
50394  s&@localedir@&$localedir&g
50395  s&@mandir@&$mandir&g
50396  s&\\\${datarootdir}&$datarootdir&g' ;;
50397esac
50398_ACEOF
50399
50400# Neutralize VPATH when `$srcdir' = `.'.
50401# Shell code in configure.ac might set extrasub.
50402# FIXME: do we really want to maintain this feature?
50403cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50404ac_sed_extra="$ac_vpsub
50405$extrasub
50406_ACEOF
50407cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50408:t
50409/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
50410s|@configure_input@|$ac_sed_conf_input|;t t
50411s&@top_builddir@&$ac_top_builddir_sub&;t t
50412s&@top_build_prefix@&$ac_top_build_prefix&;t t
50413s&@srcdir@&$ac_srcdir&;t t
50414s&@abs_srcdir@&$ac_abs_srcdir&;t t
50415s&@top_srcdir@&$ac_top_srcdir&;t t
50416s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
50417s&@builddir@&$ac_builddir&;t t
50418s&@abs_builddir@&$ac_abs_builddir&;t t
50419s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
50420$ac_datarootdir_hack
50421"
50422eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
50423  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50424
50425test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
50426  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
50427  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
50428      "$ac_tmp/out"`; test -z "$ac_out"; } &&
50429  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
50430which seems to be undefined.  Please make sure it is defined" >&5
50431$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
50432which seems to be undefined.  Please make sure it is defined" >&2;}
50433
50434  rm -f "$ac_tmp/stdin"
50435  case $ac_file in
50436  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
50437  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
50438  esac \
50439  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50440 ;;
50441  :H)
50442  #
50443  # CONFIG_HEADER
50444  #
50445  if test x"$ac_file" != x-; then
50446    {
50447      $as_echo "/* $configure_input  */" \
50448      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
50449    } >"$ac_tmp/config.h" \
50450      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50451    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
50452      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
50453$as_echo "$as_me: $ac_file is unchanged" >&6;}
50454    else
50455      rm -f "$ac_file"
50456      mv "$ac_tmp/config.h" "$ac_file" \
50457	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
50458    fi
50459  else
50460    $as_echo "/* $configure_input  */" \
50461      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
50462      || as_fn_error $? "could not create -" "$LINENO" 5
50463  fi
50464 ;;
50465
50466
50467  esac
50468
50469done # for ac_tag
50470
50471
50472as_fn_exit 0
50473_ACEOF
50474ac_clean_files=$ac_clean_files_save
50475
50476test $ac_write_fail = 0 ||
50477  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
50478
50479
50480# configure is writing to config.log, and then calls config.status.
50481# config.status does its own redirection, appending to config.log.
50482# Unfortunately, on DOS this fails, as config.log is still kept open
50483# by configure, so config.status won't be able to write to it; its
50484# output is simply discarded.  So we exec the FD to /dev/null,
50485# effectively closing config.log, so it can be properly (re)opened and
50486# appended to by config.status.  When coming back to configure, we
50487# need to make the FD available again.
50488if test "$no_create" != yes; then
50489  ac_cs_success=:
50490  ac_config_status_args=
50491  test "$silent" = yes &&
50492    ac_config_status_args="$ac_config_status_args --quiet"
50493  exec 5>/dev/null
50494  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
50495  exec 5>>config.log
50496  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
50497  # would make configure fail if this is the last instruction.
50498  $ac_cs_success || as_fn_exit 1
50499fi
50500if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
50501  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
50502$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
50503fi
50504
50505
50506# Try to move the config.log file to the output directory.
50507if test -e ./config.log; then
50508  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
50509fi
50510
50511# Make the compare script executable
50512$CHMOD +x $OUTPUT_ROOT/compare.sh
50513
50514# Finally output some useful information to the user
50515
50516  # Finally output some useful information to the user
50517
50518  printf "\n"
50519  printf "====================================================\n"
50520  if test "x$no_create" != "xyes"; then
50521    if test "x$IS_RECONFIGURE" != "xyes"; then
50522      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
50523    else
50524      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
50525    fi
50526  else
50527    if test "x$IS_RECONFIGURE" != "xyes"; then
50528      printf "A configuration has been successfully checked but not created\n"
50529    else
50530      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
50531    fi
50532  fi
50533  if test "x$CONFIGURE_COMMAND_LINE" != x; then
50534    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
50535  else
50536    printf "using default settings.\n"
50537  fi
50538
50539  printf "\n"
50540  printf "Configuration summary:\n"
50541  printf "* Debug level:    $DEBUG_LEVEL\n"
50542  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
50543  printf "* JDK variant:    $JDK_VARIANT\n"
50544  printf "* JVM variants:   $with_jvm_variants\n"
50545  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
50546
50547  printf "\n"
50548  printf "Tools summary:\n"
50549  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
50550    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
50551  fi
50552  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
50553  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
50554  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
50555  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
50556
50557  printf "\n"
50558  printf "Build performance summary:\n"
50559  printf "* Cores to use:   $JOBS\n"
50560  printf "* Memory limit:   $MEMORY_SIZE MB\n"
50561  if test "x$CCACHE_STATUS" != "x"; then
50562    printf "* ccache status:  $CCACHE_STATUS\n"
50563  fi
50564  printf "\n"
50565
50566  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
50567    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
50568    printf "will result in longer build times.\n"
50569    printf "\n"
50570  fi
50571
50572  if test "x$FOUND_ALT_VARIABLES" != "x"; then
50573    printf "WARNING: You have old-style ALT_ environment variables set.\n"
50574    printf "These are not respected, and will be ignored. It is recommended\n"
50575    printf "that you clean your environment. The following variables are set:\n"
50576    printf "$FOUND_ALT_VARIABLES\n"
50577    printf "\n"
50578  fi
50579
50580  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
50581    printf "WARNING: Your build output directory is not on a local disk.\n"
50582    printf "This will severely degrade build performance!\n"
50583    printf "It is recommended that you create an output directory on a local disk,\n"
50584    printf "and run the configure script again from that directory.\n"
50585    printf "\n"
50586  fi
50587
50588  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
50589    printf "WARNING: The result of this configuration has overridden an older\n"
50590    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
50591    printf "proper build. Failure to do so might result in strange build problems.\n"
50592    printf "\n"
50593  fi
50594
50595  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
50596    printf "WARNING: The result of this configuration was not saved.\n"
50597    printf "You should run without '--no-create | -n' to create the configuration.\n"
50598    printf "\n"
50599  fi
50600
50601