generated-configure.sh revision 1243:56e20ce67f01
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_FLAGS
637SJAVAC_SERVER_JAVA
638JAVA_TOOL_FLAGS_SMALL
639JAVA_FLAGS_SMALL
640JAVA_FLAGS_BIG
641JAVA_FLAGS
642JOBS
643MEMORY_SIZE
644NUM_CORES
645ENABLE_INTREE_EC
646SALIB_NAME
647HOTSPOT_MAKE_ARGS
648MSVCR_DLL
649LIBCXX
650LLVM_LIBS
651LLVM_LDFLAGS
652LLVM_CFLAGS
653LLVM_CONFIG
654LIBFFI_LIBS
655LIBFFI_CFLAGS
656STATIC_CXX_SETTING
657LIBDL
658LIBM
659LIBZIP_CAN_USE_MMAP
660USE_EXTERNAL_LIBZ
661USE_EXTERNAL_LIBPNG
662PNG_LIBS
663PNG_CFLAGS
664USE_EXTERNAL_LCMS
665LCMS_LIBS
666LCMS_CFLAGS
667USE_EXTERNAL_LIBGIF
668USE_EXTERNAL_LIBJPEG
669ALSA_LIBS
670ALSA_CFLAGS
671FREETYPE_BUNDLE_LIB_PATH
672FREETYPE_LIBS
673FREETYPE_CFLAGS
674CUPS_CFLAGS
675X_EXTRA_LIBS
676X_LIBS
677X_PRE_LIBS
678X_CFLAGS
679XMKMF
680FIXPATH
681ZIP_DEBUGINFO_FILES
682ENABLE_DEBUG_SYMBOLS
683CFLAGS_WARNINGS_ARE_ERRORS
684COMPILER_SUPPORTS_TARGET_BITS_FLAG
685ZERO_ARCHFLAG
686LDFLAGS_CXX_JDK
687LDFLAGS_JDKEXE_SUFFIX
688LDFLAGS_JDKLIB_SUFFIX
689LDFLAGS_JDKEXE
690LDFLAGS_JDKLIB
691CXXFLAGS_JDKEXE
692CXXFLAGS_JDKLIB
693CFLAGS_JDKEXE
694CFLAGS_JDKLIB
695MACOSX_VERSION_MIN
696LEGACY_EXTRA_LDFLAGS
697LEGACY_EXTRA_CXXFLAGS
698LEGACY_EXTRA_CFLAGS
699CXX_O_FLAG_NONE
700CXX_O_FLAG_DEBUG
701CXX_O_FLAG_NORM
702CXX_O_FLAG_HI
703CXX_O_FLAG_HIGHEST
704C_O_FLAG_NONE
705C_O_FLAG_DEBUG
706C_O_FLAG_NORM
707C_O_FLAG_HI
708C_O_FLAG_HIGHEST
709CXXFLAGS_DEBUG_OPTIONS
710CFLAGS_DEBUG_OPTIONS
711CXXFLAGS_DEBUG_SYMBOLS
712CFLAGS_DEBUG_SYMBOLS
713CXX_FLAG_DEPS
714C_FLAG_DEPS
715SET_SHARED_LIBRARY_MAPFILE
716SET_SHARED_LIBRARY_NAME
717SET_SHARED_LIBRARY_ORIGIN
718SET_EXECUTABLE_ORIGIN
719SHARED_LIBRARY_FLAGS
720CXX_FLAG_REORDER
721C_FLAG_REORDER
722SYSROOT_LDFLAGS
723SYSROOT_CFLAGS
724RC_FLAGS
725AR_OUT_OPTION
726LD_OUT_OPTION
727EXE_OUT_OPTION
728CC_OUT_OPTION
729POST_MCS_CMD
730POST_STRIP_CMD
731ARFLAGS
732COMPILER_TARGET_BITS_FLAG
733JT_HOME
734JTREGEXE
735USING_BROKEN_SUSE_LD
736PACKAGE_PATH
737LDEXECXX
738LDEXE
739USE_CLANG
740HOTSPOT_LD
741HOTSPOT_CXX
742HOTSPOT_RC
743HOTSPOT_MT
744BUILD_LD
745BUILD_CXX
746BUILD_CC
747ac_ct_OBJDUMP
748OBJDUMP
749ac_ct_OBJCOPY
750OBJCOPY
751ac_ct_NM
752ac_ct_STRIP
753MCS
754GNM
755NM
756STRIP
757MSBUILD
758DUMPBIN
759RC
760MT
761LIPO
762ac_ct_OBJC
763OBJCFLAGS
764OBJC
765ac_ct_AR
766AR
767AS
768LDCXX
769LD
770CXXCPP
771CPP
772ac_ct_CXX
773CXXFLAGS
774CXX
775ac_ct_PROPER_COMPILER_CXX
776PROPER_COMPILER_CXX
777TOOLCHAIN_PATH_CXX
778POTENTIAL_CXX
779OBJEXT
780EXEEXT
781ac_ct_CC
782CPPFLAGS
783LDFLAGS
784CFLAGS
785CC
786ac_ct_PROPER_COMPILER_CC
787PROPER_COMPILER_CC
788TOOLCHAIN_PATH_CC
789POTENTIAL_CC
790VS_LIB
791VS_INCLUDE
792VS_PATH
793CYGWIN_LINK
794EXE_SUFFIX
795OBJ_SUFFIX
796STATIC_LIBRARY
797SHARED_LIBRARY
798STATIC_LIBRARY_SUFFIX
799SHARED_LIBRARY_SUFFIX
800LIBRARY_PREFIX
801TOOLCHAIN_TYPE
802BUILD_HOTSPOT
803HOTSPOT_DIST
804BUILD_OUTPUT
805OVERRIDE_SRC_ROOT
806ADD_SRC_ROOT
807JDK_TOPDIR
808NASHORN_TOPDIR
809HOTSPOT_TOPDIR
810JAXWS_TOPDIR
811JAXP_TOPDIR
812CORBA_TOPDIR
813LANGTOOLS_TOPDIR
814JAVAC_FLAGS
815BOOT_JDK_SOURCETARGET
816JARSIGNER
817NATIVE2ASCII
818JAR
819JAVAH
820JAVAC
821JAVA
822BOOT_JDK
823JAVA_CHECK
824JAVAC_CHECK
825COOKED_BUILD_NUMBER
826JDK_VERSION
827COPYRIGHT_YEAR
828MACOSX_BUNDLE_ID_BASE
829MACOSX_BUNDLE_NAME_BASE
830COMPANY_NAME
831JDK_RC_PLATFORM_NAME
832PRODUCT_SUFFIX
833PRODUCT_NAME
834LAUNCHER_NAME
835MILESTONE
836JDK_BUILD_NUMBER
837JDK_UPDATE_VERSION
838JDK_MICRO_VERSION
839JDK_MINOR_VERSION
840JDK_MAJOR_VERSION
841USER_RELEASE_SUFFIX
842COMPRESS_JARS
843RMICONNECTOR_IIOP
844UNLIMITED_CRYPTO
845CACERTS_FILE
846TEST_IN_BUILD
847BUILD_HEADLESS
848SUPPORT_HEADFUL
849SUPPORT_HEADLESS
850BDEPS_FTP
851BDEPS_UNZIP
852OS_VERSION_MICRO
853OS_VERSION_MINOR
854OS_VERSION_MAJOR
855PKG_CONFIG
856CODESIGN
857XATTR
858DSYMUTIL
859IS_GNU_TIME
860TIME
861STAT
862HG
863READELF
864OTOOL
865LDD
866ZIP
867UNZIP
868FIND_DELETE
869OUTPUT_SYNC
870OUTPUT_SYNC_SUPPORTED
871MAKE
872CHECK_TOOLSDIR_MAKE
873CHECK_TOOLSDIR_GMAKE
874CHECK_MAKE
875CHECK_GMAKE
876PKGHANDLER
877OUTPUT_ROOT
878CONF_NAME
879SPEC
880SDKROOT
881XCODEBUILD
882BUILD_VARIANT_RELEASE
883DEBUG_CLASSFILES
884FASTDEBUG
885VARIANT
886DEBUG_LEVEL
887MACOSX_UNIVERSAL
888INCLUDE_SA
889JVM_VARIANT_CORE
890JVM_VARIANT_ZEROSHARK
891JVM_VARIANT_ZERO
892JVM_VARIANT_KERNEL
893JVM_VARIANT_MINIMAL1
894JVM_VARIANT_CLIENT
895JVM_VARIANT_SERVER
896JVM_VARIANTS
897JVM_INTERPRETER
898JDK_VARIANT
899SET_OPENJDK
900BUILD_LOG_WRAPPER
901BUILD_LOG_PREVIOUS
902BUILD_LOG
903TOPDIR
904PATH_SEP
905ZERO_ARCHDEF
906DEFINE_CROSS_COMPILE_ARCH
907LP64
908OPENJDK_TARGET_OS_EXPORT_DIR
909OPENJDK_TARGET_CPU_JLI_CFLAGS
910OPENJDK_TARGET_CPU_OSARCH
911OPENJDK_TARGET_CPU_ISADIR
912OPENJDK_TARGET_CPU_LIBDIR
913OPENJDK_TARGET_CPU_LEGACY_LIB
914OPENJDK_TARGET_CPU_LEGACY
915REQUIRED_OS_VERSION
916REQUIRED_OS_NAME
917COMPILE_TYPE
918OPENJDK_TARGET_CPU_ENDIAN
919OPENJDK_TARGET_CPU_BITS
920OPENJDK_TARGET_CPU_ARCH
921OPENJDK_TARGET_CPU
922OPENJDK_TARGET_OS_ENV
923OPENJDK_TARGET_OS_TYPE
924OPENJDK_TARGET_OS
925OPENJDK_BUILD_CPU_ENDIAN
926OPENJDK_BUILD_CPU_BITS
927OPENJDK_BUILD_CPU_ARCH
928OPENJDK_BUILD_CPU
929OPENJDK_BUILD_OS_ENV
930OPENJDK_BUILD_OS_TYPE
931OPENJDK_BUILD_OS
932OPENJDK_BUILD_AUTOCONF_NAME
933OPENJDK_TARGET_AUTOCONF_NAME
934target_os
935target_vendor
936target_cpu
937target
938host_os
939host_vendor
940host_cpu
941host
942build_os
943build_vendor
944build_cpu
945build
946CPIO
947SETFILE
948DF
949READLINK
950CYGPATH
951SED
952FGREP
953EGREP
954GREP
955AWK
956XARGS
957WHICH
958WC
959UNIQ
960UNAME
961TR
962TOUCH
963TEE
964TAR
965TAIL
966SORT
967SH
968RM
969PRINTF
970NAWK
971MV
972MKTEMP
973MKDIR
974LS
975LN
976HEAD
977FIND
978FILE
979EXPR
980ECHO
981DIRNAME
982DIFF
983DATE
984CUT
985CP
986COMM
987CMP
988CHMOD
989CAT
990BASH
991BASENAME
992DATE_WHEN_CONFIGURED
993CONFIGURE_COMMAND_LINE
994target_alias
995host_alias
996build_alias
997LIBS
998ECHO_T
999ECHO_N
1000ECHO_C
1001DEFS
1002mandir
1003localedir
1004libdir
1005psdir
1006pdfdir
1007dvidir
1008htmldir
1009infodir
1010docdir
1011oldincludedir
1012includedir
1013localstatedir
1014sharedstatedir
1015sysconfdir
1016datadir
1017datarootdir
1018libexecdir
1019sbindir
1020bindir
1021program_transform_name
1022prefix
1023exec_prefix
1024PACKAGE_URL
1025PACKAGE_BUGREPORT
1026PACKAGE_STRING
1027PACKAGE_VERSION
1028PACKAGE_TARNAME
1029PACKAGE_NAME
1030PATH_SEPARATOR
1031SHELL'
1032ac_subst_files=''
1033ac_user_opts='
1034enable_option_checking
1035with_target_bits
1036enable_openjdk_only
1037with_custom_make_dir
1038with_jdk_variant
1039with_jvm_interpreter
1040with_jvm_variants
1041enable_debug
1042with_debug_level
1043with_devkit
1044with_sys_root
1045with_sysroot
1046with_tools_dir
1047with_toolchain_path
1048with_extra_path
1049with_sdk_name
1050with_conf_name
1051with_output_sync
1052with_builddeps_conf
1053with_builddeps_server
1054with_builddeps_dir
1055with_builddeps_group
1056enable_headful
1057enable_hotspot_test_in_build
1058with_cacerts_file
1059enable_unlimited_crypto
1060enable_rmiconnector_iiop
1061with_milestone
1062with_update_version
1063with_user_release_suffix
1064with_build_number
1065with_copyright_year
1066with_boot_jdk
1067with_add_source_root
1068with_override_source_root
1069with_adds_and_overrides
1070with_override_langtools
1071with_override_corba
1072with_override_jaxp
1073with_override_jaxws
1074with_override_hotspot
1075with_override_nashorn
1076with_override_jdk
1077with_import_hotspot
1078with_toolchain_type
1079with_jtreg
1080with_extra_cflags
1081with_extra_cxxflags
1082with_extra_ldflags
1083enable_debug_symbols
1084enable_zip_debug_info
1085with_x
1086with_cups
1087with_cups_include
1088with_freetype
1089with_freetype_include
1090with_freetype_lib
1091with_freetype_src
1092enable_freetype_bundling
1093with_alsa
1094with_alsa_include
1095with_alsa_lib
1096with_libjpeg
1097with_giflib
1098with_lcms
1099with_libpng
1100with_zlib
1101with_stdc__lib
1102with_msvcr_dll
1103with_dxsdk
1104with_dxsdk_lib
1105with_dxsdk_include
1106with_num_cores
1107with_memory_size
1108with_jobs
1109with_boot_jdk_jvmargs
1110with_sjavac_server_java
1111enable_sjavac
1112enable_precompiled_headers
1113enable_ccache
1114with_ccache_dir
1115'
1116      ac_precious_vars='build_alias
1117host_alias
1118target_alias
1119BASENAME
1120BASH
1121CAT
1122CHMOD
1123CMP
1124COMM
1125CP
1126CUT
1127DATE
1128DIFF
1129DIRNAME
1130ECHO
1131EXPR
1132FILE
1133FIND
1134HEAD
1135LN
1136LS
1137MKDIR
1138MKTEMP
1139MV
1140NAWK
1141PRINTF
1142RM
1143SH
1144SORT
1145TAIL
1146TAR
1147TEE
1148TOUCH
1149TR
1150UNAME
1151UNIQ
1152WC
1153WHICH
1154XARGS
1155AWK
1156GREP
1157EGREP
1158FGREP
1159SED
1160CYGPATH
1161READLINK
1162DF
1163SETFILE
1164CPIO
1165UNZIP
1166ZIP
1167LDD
1168OTOOL
1169READELF
1170HG
1171STAT
1172TIME
1173DSYMUTIL
1174XATTR
1175CODESIGN
1176PKG_CONFIG
1177JAVA
1178JAVAC
1179JAVAH
1180JAR
1181NATIVE2ASCII
1182JARSIGNER
1183CC
1184CFLAGS
1185LDFLAGS
1186LIBS
1187CPPFLAGS
1188CXX
1189CXXFLAGS
1190CCC
1191CPP
1192CXXCPP
1193AS
1194AR
1195OBJC
1196OBJCFLAGS
1197LIPO
1198STRIP
1199NM
1200GNM
1201MCS
1202OBJCOPY
1203OBJDUMP
1204BUILD_CC
1205BUILD_CXX
1206BUILD_LD
1207JTREGEXE
1208XMKMF
1209FREETYPE_CFLAGS
1210FREETYPE_LIBS
1211ALSA_CFLAGS
1212ALSA_LIBS
1213LCMS_CFLAGS
1214LCMS_LIBS
1215PNG_CFLAGS
1216PNG_LIBS
1217LIBFFI_CFLAGS
1218LIBFFI_LIBS
1219CCACHE'
1220
1221
1222# Initialize some variables set by options.
1223ac_init_help=
1224ac_init_version=false
1225ac_unrecognized_opts=
1226ac_unrecognized_sep=
1227# The variables have the same names as the options, with
1228# dashes changed to underlines.
1229cache_file=/dev/null
1230exec_prefix=NONE
1231no_create=
1232no_recursion=
1233prefix=NONE
1234program_prefix=NONE
1235program_suffix=NONE
1236program_transform_name=s,x,x,
1237silent=
1238site=
1239srcdir=
1240verbose=
1241x_includes=NONE
1242x_libraries=NONE
1243
1244# Installation directory options.
1245# These are left unexpanded so users can "make install exec_prefix=/foo"
1246# and all the variables that are supposed to be based on exec_prefix
1247# by default will actually change.
1248# Use braces instead of parens because sh, perl, etc. also accept them.
1249# (The list follows the same order as the GNU Coding Standards.)
1250bindir='${exec_prefix}/bin'
1251sbindir='${exec_prefix}/sbin'
1252libexecdir='${exec_prefix}/libexec'
1253datarootdir='${prefix}/share'
1254datadir='${datarootdir}'
1255sysconfdir='${prefix}/etc'
1256sharedstatedir='${prefix}/com'
1257localstatedir='${prefix}/var'
1258includedir='${prefix}/include'
1259oldincludedir='/usr/include'
1260docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1261infodir='${datarootdir}/info'
1262htmldir='${docdir}'
1263dvidir='${docdir}'
1264pdfdir='${docdir}'
1265psdir='${docdir}'
1266libdir='${exec_prefix}/lib'
1267localedir='${datarootdir}/locale'
1268mandir='${datarootdir}/man'
1269
1270ac_prev=
1271ac_dashdash=
1272for ac_option
1273do
1274  # If the previous option needs an argument, assign it.
1275  if test -n "$ac_prev"; then
1276    eval $ac_prev=\$ac_option
1277    ac_prev=
1278    continue
1279  fi
1280
1281  case $ac_option in
1282  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1283  *=)   ac_optarg= ;;
1284  *)    ac_optarg=yes ;;
1285  esac
1286
1287  # Accept the important Cygnus configure options, so we can diagnose typos.
1288
1289  case $ac_dashdash$ac_option in
1290  --)
1291    ac_dashdash=yes ;;
1292
1293  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1294    ac_prev=bindir ;;
1295  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1296    bindir=$ac_optarg ;;
1297
1298  -build | --build | --buil | --bui | --bu)
1299    ac_prev=build_alias ;;
1300  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1301    build_alias=$ac_optarg ;;
1302
1303  -cache-file | --cache-file | --cache-fil | --cache-fi \
1304  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1305    ac_prev=cache_file ;;
1306  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1307  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1308    cache_file=$ac_optarg ;;
1309
1310  --config-cache | -C)
1311    cache_file=config.cache ;;
1312
1313  -datadir | --datadir | --datadi | --datad)
1314    ac_prev=datadir ;;
1315  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1316    datadir=$ac_optarg ;;
1317
1318  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1319  | --dataroo | --dataro | --datar)
1320    ac_prev=datarootdir ;;
1321  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1322  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1323    datarootdir=$ac_optarg ;;
1324
1325  -disable-* | --disable-*)
1326    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1327    # Reject names that are not valid shell variable names.
1328    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1329      as_fn_error $? "invalid feature name: $ac_useropt"
1330    ac_useropt_orig=$ac_useropt
1331    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1332    case $ac_user_opts in
1333      *"
1334"enable_$ac_useropt"
1335"*) ;;
1336      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1337	 ac_unrecognized_sep=', ';;
1338    esac
1339    eval enable_$ac_useropt=no ;;
1340
1341  -docdir | --docdir | --docdi | --doc | --do)
1342    ac_prev=docdir ;;
1343  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1344    docdir=$ac_optarg ;;
1345
1346  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1347    ac_prev=dvidir ;;
1348  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1349    dvidir=$ac_optarg ;;
1350
1351  -enable-* | --enable-*)
1352    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1353    # Reject names that are not valid shell variable names.
1354    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1355      as_fn_error $? "invalid feature name: $ac_useropt"
1356    ac_useropt_orig=$ac_useropt
1357    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1358    case $ac_user_opts in
1359      *"
1360"enable_$ac_useropt"
1361"*) ;;
1362      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1363	 ac_unrecognized_sep=', ';;
1364    esac
1365    eval enable_$ac_useropt=\$ac_optarg ;;
1366
1367  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1368  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1369  | --exec | --exe | --ex)
1370    ac_prev=exec_prefix ;;
1371  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1372  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1373  | --exec=* | --exe=* | --ex=*)
1374    exec_prefix=$ac_optarg ;;
1375
1376  -gas | --gas | --ga | --g)
1377    # Obsolete; use --with-gas.
1378    with_gas=yes ;;
1379
1380  -help | --help | --hel | --he | -h)
1381    ac_init_help=long ;;
1382  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1383    ac_init_help=recursive ;;
1384  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1385    ac_init_help=short ;;
1386
1387  -host | --host | --hos | --ho)
1388    ac_prev=host_alias ;;
1389  -host=* | --host=* | --hos=* | --ho=*)
1390    host_alias=$ac_optarg ;;
1391
1392  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1393    ac_prev=htmldir ;;
1394  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1395  | --ht=*)
1396    htmldir=$ac_optarg ;;
1397
1398  -includedir | --includedir | --includedi | --included | --include \
1399  | --includ | --inclu | --incl | --inc)
1400    ac_prev=includedir ;;
1401  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1402  | --includ=* | --inclu=* | --incl=* | --inc=*)
1403    includedir=$ac_optarg ;;
1404
1405  -infodir | --infodir | --infodi | --infod | --info | --inf)
1406    ac_prev=infodir ;;
1407  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1408    infodir=$ac_optarg ;;
1409
1410  -libdir | --libdir | --libdi | --libd)
1411    ac_prev=libdir ;;
1412  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1413    libdir=$ac_optarg ;;
1414
1415  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1416  | --libexe | --libex | --libe)
1417    ac_prev=libexecdir ;;
1418  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1419  | --libexe=* | --libex=* | --libe=*)
1420    libexecdir=$ac_optarg ;;
1421
1422  -localedir | --localedir | --localedi | --localed | --locale)
1423    ac_prev=localedir ;;
1424  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1425    localedir=$ac_optarg ;;
1426
1427  -localstatedir | --localstatedir | --localstatedi | --localstated \
1428  | --localstate | --localstat | --localsta | --localst | --locals)
1429    ac_prev=localstatedir ;;
1430  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1431  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1432    localstatedir=$ac_optarg ;;
1433
1434  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1435    ac_prev=mandir ;;
1436  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1437    mandir=$ac_optarg ;;
1438
1439  -nfp | --nfp | --nf)
1440    # Obsolete; use --without-fp.
1441    with_fp=no ;;
1442
1443  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1444  | --no-cr | --no-c | -n)
1445    no_create=yes ;;
1446
1447  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1448  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1449    no_recursion=yes ;;
1450
1451  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1452  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1453  | --oldin | --oldi | --old | --ol | --o)
1454    ac_prev=oldincludedir ;;
1455  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1456  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1457  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1458    oldincludedir=$ac_optarg ;;
1459
1460  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1461    ac_prev=prefix ;;
1462  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1463    prefix=$ac_optarg ;;
1464
1465  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1466  | --program-pre | --program-pr | --program-p)
1467    ac_prev=program_prefix ;;
1468  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1469  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1470    program_prefix=$ac_optarg ;;
1471
1472  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1473  | --program-suf | --program-su | --program-s)
1474    ac_prev=program_suffix ;;
1475  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1476  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1477    program_suffix=$ac_optarg ;;
1478
1479  -program-transform-name | --program-transform-name \
1480  | --program-transform-nam | --program-transform-na \
1481  | --program-transform-n | --program-transform- \
1482  | --program-transform | --program-transfor \
1483  | --program-transfo | --program-transf \
1484  | --program-trans | --program-tran \
1485  | --progr-tra | --program-tr | --program-t)
1486    ac_prev=program_transform_name ;;
1487  -program-transform-name=* | --program-transform-name=* \
1488  | --program-transform-nam=* | --program-transform-na=* \
1489  | --program-transform-n=* | --program-transform-=* \
1490  | --program-transform=* | --program-transfor=* \
1491  | --program-transfo=* | --program-transf=* \
1492  | --program-trans=* | --program-tran=* \
1493  | --progr-tra=* | --program-tr=* | --program-t=*)
1494    program_transform_name=$ac_optarg ;;
1495
1496  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1497    ac_prev=pdfdir ;;
1498  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1499    pdfdir=$ac_optarg ;;
1500
1501  -psdir | --psdir | --psdi | --psd | --ps)
1502    ac_prev=psdir ;;
1503  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1504    psdir=$ac_optarg ;;
1505
1506  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1507  | -silent | --silent | --silen | --sile | --sil)
1508    silent=yes ;;
1509
1510  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1511    ac_prev=sbindir ;;
1512  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1513  | --sbi=* | --sb=*)
1514    sbindir=$ac_optarg ;;
1515
1516  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1517  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1518  | --sharedst | --shareds | --shared | --share | --shar \
1519  | --sha | --sh)
1520    ac_prev=sharedstatedir ;;
1521  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1522  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1523  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1524  | --sha=* | --sh=*)
1525    sharedstatedir=$ac_optarg ;;
1526
1527  -site | --site | --sit)
1528    ac_prev=site ;;
1529  -site=* | --site=* | --sit=*)
1530    site=$ac_optarg ;;
1531
1532  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1533    ac_prev=srcdir ;;
1534  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1535    srcdir=$ac_optarg ;;
1536
1537  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1538  | --syscon | --sysco | --sysc | --sys | --sy)
1539    ac_prev=sysconfdir ;;
1540  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1541  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1542    sysconfdir=$ac_optarg ;;
1543
1544  -target | --target | --targe | --targ | --tar | --ta | --t)
1545    ac_prev=target_alias ;;
1546  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1547    target_alias=$ac_optarg ;;
1548
1549  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1550    verbose=yes ;;
1551
1552  -version | --version | --versio | --versi | --vers | -V)
1553    ac_init_version=: ;;
1554
1555  -with-* | --with-*)
1556    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1557    # Reject names that are not valid shell variable names.
1558    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1559      as_fn_error $? "invalid package name: $ac_useropt"
1560    ac_useropt_orig=$ac_useropt
1561    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1562    case $ac_user_opts in
1563      *"
1564"with_$ac_useropt"
1565"*) ;;
1566      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1567	 ac_unrecognized_sep=', ';;
1568    esac
1569    eval with_$ac_useropt=\$ac_optarg ;;
1570
1571  -without-* | --without-*)
1572    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1573    # Reject names that are not valid shell variable names.
1574    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1575      as_fn_error $? "invalid package name: $ac_useropt"
1576    ac_useropt_orig=$ac_useropt
1577    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1578    case $ac_user_opts in
1579      *"
1580"with_$ac_useropt"
1581"*) ;;
1582      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1583	 ac_unrecognized_sep=', ';;
1584    esac
1585    eval with_$ac_useropt=no ;;
1586
1587  --x)
1588    # Obsolete; use --with-x.
1589    with_x=yes ;;
1590
1591  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1592  | --x-incl | --x-inc | --x-in | --x-i)
1593    ac_prev=x_includes ;;
1594  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1595  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1596    x_includes=$ac_optarg ;;
1597
1598  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1599  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1600    ac_prev=x_libraries ;;
1601  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1602  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1603    x_libraries=$ac_optarg ;;
1604
1605  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1606Try \`$0 --help' for more information"
1607    ;;
1608
1609  *=*)
1610    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1611    # Reject names that are not valid shell variable names.
1612    case $ac_envvar in #(
1613      '' | [0-9]* | *[!_$as_cr_alnum]* )
1614      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1615    esac
1616    eval $ac_envvar=\$ac_optarg
1617    export $ac_envvar ;;
1618
1619  *)
1620    # FIXME: should be removed in autoconf 3.0.
1621    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1622    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1623      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1624    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1625    ;;
1626
1627  esac
1628done
1629
1630if test -n "$ac_prev"; then
1631  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1632  as_fn_error $? "missing argument to $ac_option"
1633fi
1634
1635if test -n "$ac_unrecognized_opts"; then
1636  case $enable_option_checking in
1637    no) ;;
1638    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1639    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1640  esac
1641fi
1642
1643# Check all directory arguments for consistency.
1644for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1645		datadir sysconfdir sharedstatedir localstatedir includedir \
1646		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1647		libdir localedir mandir
1648do
1649  eval ac_val=\$$ac_var
1650  # Remove trailing slashes.
1651  case $ac_val in
1652    */ )
1653      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1654      eval $ac_var=\$ac_val;;
1655  esac
1656  # Be sure to have absolute directory names.
1657  case $ac_val in
1658    [\\/$]* | ?:[\\/]* )  continue;;
1659    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1660  esac
1661  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1662done
1663
1664# There might be people who depend on the old broken behavior: `$host'
1665# used to hold the argument of --host etc.
1666# FIXME: To remove some day.
1667build=$build_alias
1668host=$host_alias
1669target=$target_alias
1670
1671# FIXME: To remove some day.
1672if test "x$host_alias" != x; then
1673  if test "x$build_alias" = x; then
1674    cross_compiling=maybe
1675  elif test "x$build_alias" != "x$host_alias"; then
1676    cross_compiling=yes
1677  fi
1678fi
1679
1680ac_tool_prefix=
1681test -n "$host_alias" && ac_tool_prefix=$host_alias-
1682
1683test "$silent" = yes && exec 6>/dev/null
1684
1685
1686ac_pwd=`pwd` && test -n "$ac_pwd" &&
1687ac_ls_di=`ls -di .` &&
1688ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1689  as_fn_error $? "working directory cannot be determined"
1690test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1691  as_fn_error $? "pwd does not report name of working directory"
1692
1693
1694# Find the source files, if location was not specified.
1695if test -z "$srcdir"; then
1696  ac_srcdir_defaulted=yes
1697  # Try the directory containing this script, then the parent directory.
1698  ac_confdir=`$as_dirname -- "$as_myself" ||
1699$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1700	 X"$as_myself" : 'X\(//\)[^/]' \| \
1701	 X"$as_myself" : 'X\(//\)$' \| \
1702	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1703$as_echo X"$as_myself" |
1704    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1705	    s//\1/
1706	    q
1707	  }
1708	  /^X\(\/\/\)[^/].*/{
1709	    s//\1/
1710	    q
1711	  }
1712	  /^X\(\/\/\)$/{
1713	    s//\1/
1714	    q
1715	  }
1716	  /^X\(\/\).*/{
1717	    s//\1/
1718	    q
1719	  }
1720	  s/.*/./; q'`
1721  srcdir=$ac_confdir
1722  if test ! -r "$srcdir/$ac_unique_file"; then
1723    srcdir=..
1724  fi
1725else
1726  ac_srcdir_defaulted=no
1727fi
1728if test ! -r "$srcdir/$ac_unique_file"; then
1729  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1730  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1731fi
1732ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1733ac_abs_confdir=`(
1734	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1735	pwd)`
1736# When building in place, set srcdir=.
1737if test "$ac_abs_confdir" = "$ac_pwd"; then
1738  srcdir=.
1739fi
1740# Remove unnecessary trailing slashes from srcdir.
1741# Double slashes in file names in object file debugging info
1742# mess up M-x gdb in Emacs.
1743case $srcdir in
1744*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1745esac
1746for ac_var in $ac_precious_vars; do
1747  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1748  eval ac_env_${ac_var}_value=\$${ac_var}
1749  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1750  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1751done
1752
1753#
1754# Report the --help message.
1755#
1756if test "$ac_init_help" = "long"; then
1757  # Omit some internal or obsolete options to make the list less imposing.
1758  # This message is too long to be a string in the A/UX 3.1 sh.
1759  cat <<_ACEOF
1760\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1761
1762Usage: $0 [OPTION]... [VAR=VALUE]...
1763
1764To assign environment variables (e.g., CC, CFLAGS...), specify them as
1765VAR=VALUE.  See below for descriptions of some of the useful variables.
1766
1767Defaults for the options are specified in brackets.
1768
1769Configuration:
1770  -h, --help              display this help and exit
1771      --help=short        display options specific to this package
1772      --help=recursive    display the short help of all the included packages
1773  -V, --version           display version information and exit
1774  -q, --quiet, --silent   do not print \`checking ...' messages
1775      --cache-file=FILE   cache test results in FILE [disabled]
1776  -C, --config-cache      alias for \`--cache-file=config.cache'
1777  -n, --no-create         do not create output files
1778      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1779
1780Installation directories:
1781  --prefix=PREFIX         install architecture-independent files in PREFIX
1782                          [$ac_default_prefix]
1783  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1784                          [PREFIX]
1785
1786By default, \`make install' will install all the files in
1787\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1788an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1789for instance \`--prefix=\$HOME'.
1790
1791For better control, use the options below.
1792
1793Fine tuning of the installation directories:
1794  --bindir=DIR            user executables [EPREFIX/bin]
1795  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1796  --libexecdir=DIR        program executables [EPREFIX/libexec]
1797  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1798  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1799  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1800  --libdir=DIR            object code libraries [EPREFIX/lib]
1801  --includedir=DIR        C header files [PREFIX/include]
1802  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1803  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1804  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1805  --infodir=DIR           info documentation [DATAROOTDIR/info]
1806  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1807  --mandir=DIR            man documentation [DATAROOTDIR/man]
1808  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1809  --htmldir=DIR           html documentation [DOCDIR]
1810  --dvidir=DIR            dvi documentation [DOCDIR]
1811  --pdfdir=DIR            pdf documentation [DOCDIR]
1812  --psdir=DIR             ps documentation [DOCDIR]
1813_ACEOF
1814
1815  cat <<\_ACEOF
1816
1817X features:
1818  --x-includes=DIR    X include files are in DIR
1819  --x-libraries=DIR   X library files are in DIR
1820
1821System types:
1822  --build=BUILD     configure for building on BUILD [guessed]
1823  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1824  --target=TARGET   configure for building compilers for TARGET [HOST]
1825_ACEOF
1826fi
1827
1828if test -n "$ac_init_help"; then
1829  case $ac_init_help in
1830     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1831   esac
1832  cat <<\_ACEOF
1833
1834Optional Features:
1835  --disable-option-checking  ignore unrecognized --enable/--with options
1836  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1837  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1838  --enable-openjdk-only   suppress building custom source even if present
1839                          [disabled]
1840  --enable-debug          set the debug level to fastdebug (shorthand for
1841                          --with-debug-level=fastdebug) [disabled]
1842  --disable-headful       disable building headful support (graphical UI
1843                          support) [enabled]
1844  --enable-hotspot-test-in-build
1845                          run the Queens test after Hotspot build [disabled]
1846  --enable-unlimited-crypto
1847                          Enable unlimited crypto policy [disabled]
1848  --enable-rmiconnector-iiop
1849                          enable the JMX RMIConnector iiop transport
1850                          [disabled]
1851  --disable-debug-symbols disable generation of debug symbols [enabled]
1852  --disable-zip-debug-info
1853                          disable zipping of debug-info files [enabled]
1854  --disable-freetype-bundling
1855                          disable bundling of the freetype library with the
1856                          build result [enabled on Windows or when using
1857                          --with-freetype, disabled otherwise]
1858  --enable-sjavac         use sjavac to do fast incremental compiles
1859                          [disabled]
1860  --disable-precompiled-headers
1861                          disable using precompiled headers when compiling C++
1862                          [enabled]
1863  --enable-ccache         enable using ccache to speed up recompilations
1864                          [disabled]
1865
1866Optional Packages:
1867  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1868  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1869  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1870                          support it), e.g. --with-target-bits=32 [guessed]
1871  --with-custom-make-dir  Deprecated. Option is kept for backwards
1872                          compatibility and is ignored
1873  --with-jdk-variant      JDK variant to build (normal) [normal]
1874  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1875  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1876                          client, minimal1, kernel, zero, zeroshark, core)
1877                          [server]
1878  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1879                          optimized (HotSpot build only)) [release]
1880  --with-devkit           use this devkit for compilers, tools and resources
1881  --with-sys-root         alias for --with-sysroot for backwards compatability
1882  --with-sysroot          use this directory as sysroot
1883  --with-tools-dir        alias for --with-toolchain-path for backwards
1884                          compatibility
1885  --with-toolchain-path   prepend these directories when searching for
1886                          toolchain binaries (compilers etc)
1887  --with-extra-path       prepend these directories to the default path
1888  --with-sdk-name         use the platform SDK of the given name. [macosx]
1889  --with-conf-name        use this as the name of the configuration [generated
1890                          from important configuration options]
1891  --with-output-sync      set make output sync type if supported by make.
1892                          [recurse]
1893  --with-builddeps-conf   use this configuration file for the builddeps
1894  --with-builddeps-server download and use build dependencies from this server
1895                          url
1896  --with-builddeps-dir    store downloaded build dependencies here
1897                          [/localhome/builddeps]
1898  --with-builddeps-group  chgrp the downloaded build dependencies to this
1899                          group
1900  --with-cacerts-file     specify alternative cacerts file
1901  --with-milestone        Set milestone value for build [internal]
1902  --with-update-version   Set update version value for build [b00]
1903  --with-user-release-suffix
1904                          Add a custom string to the version string if build
1905                          number is not set.[username_builddateb00]
1906  --with-build-number     Set build number value for build [b00]
1907  --with-copyright-year   Set copyright year value for build [current year]
1908  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1909  --with-add-source-root  for each and every source directory, look in this
1910                          additional source root for the same directory; if it
1911                          exists and have files in it, include it in the build
1912  --with-override-source-root
1913                          for each and every source directory, look in this
1914                          override source root for the same directory; if it
1915                          exists, use that directory instead and ignore the
1916                          directory in the original source root
1917  --with-adds-and-overrides
1918                          use the subdirs 'adds' and 'overrides' in the
1919                          specified directory as add-source-root and
1920                          override-source-root
1921  --with-override-langtools
1922                          use this langtools dir for the build
1923  --with-override-corba   use this corba dir for the build
1924  --with-override-jaxp    use this jaxp dir for the build
1925  --with-override-jaxws   use this jaxws dir for the build
1926  --with-override-hotspot use this hotspot dir for the build
1927  --with-override-nashorn use this nashorn dir for the build
1928  --with-override-jdk     use this jdk dir for the build
1929  --with-import-hotspot   import hotspot binaries from this jdk image or
1930                          hotspot build dist dir instead of building from
1931                          source
1932  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1933                          to show possible values [platform dependent]
1934  --with-jtreg            Regression Test Harness [probed]
1935  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1936  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1937  --with-extra-ldflags    extra flags to be used when linking jdk
1938  --with-x                use the X Window System
1939  --with-cups             specify prefix directory for the cups package
1940                          (expecting the headers under PATH/include)
1941  --with-cups-include     specify directory for the cups include files
1942  --with-freetype         specify prefix directory for the freetype package
1943                          (expecting the libraries under PATH/lib and the
1944                          headers under PATH/include)
1945  --with-freetype-include specify directory for the freetype include files
1946  --with-freetype-lib     specify directory for the freetype library
1947  --with-freetype-src     specify directory with freetype sources to
1948                          automatically build the library (experimental,
1949                          Windows-only)
1950  --with-alsa             specify prefix directory for the alsa package
1951                          (expecting the libraries under PATH/lib and the
1952                          headers under PATH/include)
1953  --with-alsa-include     specify directory for the alsa include files
1954  --with-alsa-lib         specify directory for the alsa library
1955  --with-libjpeg          use libjpeg from build system or OpenJDK source
1956                          (system, bundled) [bundled]
1957  --with-giflib           use giflib from build system or OpenJDK source
1958                          (system, bundled) [bundled]
1959  --with-lcms             use lcms2 from build system or OpenJDK source
1960                          (system, bundled) [bundled]
1961  --with-libpng           use libpng from build system or OpenJDK source
1962                          (system, bundled) [bundled]
1963  --with-zlib             use zlib from build system or OpenJDK source
1964                          (system, bundled) [bundled]
1965  --with-stdc++lib=<static>,<dynamic>,<default>
1966                          force linking of the C++ runtime on Linux to either
1967                          static or dynamic, default is static with dynamic as
1968                          fallback
1969  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1970                          only) [probed]
1971  --with-dxsdk            Deprecated. Option is kept for backwards
1972                          compatibility and is ignored
1973  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1974                          compatibility and is ignored
1975  --with-dxsdk-include    Deprecated. Option is kept for backwards
1976                          compatibility and is ignored
1977  --with-num-cores        number of cores in the build system, e.g.
1978                          --with-num-cores=8 [probed]
1979  --with-memory-size      memory (in MB) available in the build system, e.g.
1980                          --with-memory-size=1024 [probed]
1981  --with-jobs             number of parallel jobs to let make run [calculated
1982                          based on cores and memory]
1983  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1984                          invocations of boot JDK, overriding the default
1985                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1986                          -enableassertions"
1987  --with-sjavac-server-java
1988                          use this java binary for running the sjavac
1989                          background server [Boot JDK java]
1990  --with-ccache-dir       where to store ccache files [~/.ccache]
1991
1992Some influential environment variables:
1993  BASENAME    Override default value for BASENAME
1994  BASH        Override default value for BASH
1995  CAT         Override default value for CAT
1996  CHMOD       Override default value for CHMOD
1997  CMP         Override default value for CMP
1998  COMM        Override default value for COMM
1999  CP          Override default value for CP
2000  CUT         Override default value for CUT
2001  DATE        Override default value for DATE
2002  DIFF        Override default value for DIFF
2003  DIRNAME     Override default value for DIRNAME
2004  ECHO        Override default value for ECHO
2005  EXPR        Override default value for EXPR
2006  FILE        Override default value for FILE
2007  FIND        Override default value for FIND
2008  HEAD        Override default value for HEAD
2009  LN          Override default value for LN
2010  LS          Override default value for LS
2011  MKDIR       Override default value for MKDIR
2012  MKTEMP      Override default value for MKTEMP
2013  MV          Override default value for MV
2014  NAWK        Override default value for NAWK
2015  PRINTF      Override default value for PRINTF
2016  RM          Override default value for RM
2017  SH          Override default value for SH
2018  SORT        Override default value for SORT
2019  TAIL        Override default value for TAIL
2020  TAR         Override default value for TAR
2021  TEE         Override default value for TEE
2022  TOUCH       Override default value for TOUCH
2023  TR          Override default value for TR
2024  UNAME       Override default value for UNAME
2025  UNIQ        Override default value for UNIQ
2026  WC          Override default value for WC
2027  WHICH       Override default value for WHICH
2028  XARGS       Override default value for XARGS
2029  AWK         Override default value for AWK
2030  GREP        Override default value for GREP
2031  EGREP       Override default value for EGREP
2032  FGREP       Override default value for FGREP
2033  SED         Override default value for SED
2034  CYGPATH     Override default value for CYGPATH
2035  READLINK    Override default value for READLINK
2036  DF          Override default value for DF
2037  SETFILE     Override default value for SETFILE
2038  CPIO        Override default value for CPIO
2039  UNZIP       Override default value for UNZIP
2040  ZIP         Override default value for ZIP
2041  LDD         Override default value for LDD
2042  OTOOL       Override default value for OTOOL
2043  READELF     Override default value for READELF
2044  HG          Override default value for HG
2045  STAT        Override default value for STAT
2046  TIME        Override default value for TIME
2047  DSYMUTIL    Override default value for DSYMUTIL
2048  XATTR       Override default value for XATTR
2049  CODESIGN    Override default value for CODESIGN
2050  PKG_CONFIG  path to pkg-config utility
2051  JAVA        Override default value for JAVA
2052  JAVAC       Override default value for JAVAC
2053  JAVAH       Override default value for JAVAH
2054  JAR         Override default value for JAR
2055  NATIVE2ASCII
2056              Override default value for NATIVE2ASCII
2057  JARSIGNER   Override default value for JARSIGNER
2058  CC          C compiler command
2059  CFLAGS      C compiler flags
2060  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2061              nonstandard directory <lib dir>
2062  LIBS        libraries to pass to the linker, e.g. -l<library>
2063  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2064              you have headers in a nonstandard directory <include dir>
2065  CXX         C++ compiler command
2066  CXXFLAGS    C++ compiler flags
2067  CPP         C preprocessor
2068  CXXCPP      C++ preprocessor
2069  AS          Override default value for AS
2070  AR          Override default value for AR
2071  OBJC        Objective C compiler command
2072  OBJCFLAGS   Objective C compiler flags
2073  LIPO        Override default value for LIPO
2074  STRIP       Override default value for STRIP
2075  NM          Override default value for NM
2076  GNM         Override default value for GNM
2077  MCS         Override default value for MCS
2078  OBJCOPY     Override default value for OBJCOPY
2079  OBJDUMP     Override default value for OBJDUMP
2080  BUILD_CC    Override default value for BUILD_CC
2081  BUILD_CXX   Override default value for BUILD_CXX
2082  BUILD_LD    Override default value for BUILD_LD
2083  JTREGEXE    Override default value for JTREGEXE
2084  XMKMF       Path to xmkmf, Makefile generator for X Window System
2085  FREETYPE_CFLAGS
2086              C compiler flags for FREETYPE, overriding pkg-config
2087  FREETYPE_LIBS
2088              linker flags for FREETYPE, overriding pkg-config
2089  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2090  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2091  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2092  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2093  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2094  PNG_LIBS    linker flags for PNG, overriding pkg-config
2095  LIBFFI_CFLAGS
2096              C compiler flags for LIBFFI, overriding pkg-config
2097  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2098  CCACHE      Override default value for CCACHE
2099
2100Use these variables to override the choices made by `configure' or to help
2101it to find libraries and programs with nonstandard names/locations.
2102
2103Report bugs to <build-dev@openjdk.java.net>.
2104OpenJDK home page: <http://openjdk.java.net>.
2105_ACEOF
2106ac_status=$?
2107fi
2108
2109if test "$ac_init_help" = "recursive"; then
2110  # If there are subdirs, report their specific --help.
2111  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2112    test -d "$ac_dir" ||
2113      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2114      continue
2115    ac_builddir=.
2116
2117case "$ac_dir" in
2118.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2119*)
2120  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2121  # A ".." for each directory in $ac_dir_suffix.
2122  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2123  case $ac_top_builddir_sub in
2124  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2125  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2126  esac ;;
2127esac
2128ac_abs_top_builddir=$ac_pwd
2129ac_abs_builddir=$ac_pwd$ac_dir_suffix
2130# for backward compatibility:
2131ac_top_builddir=$ac_top_build_prefix
2132
2133case $srcdir in
2134  .)  # We are building in place.
2135    ac_srcdir=.
2136    ac_top_srcdir=$ac_top_builddir_sub
2137    ac_abs_top_srcdir=$ac_pwd ;;
2138  [\\/]* | ?:[\\/]* )  # Absolute name.
2139    ac_srcdir=$srcdir$ac_dir_suffix;
2140    ac_top_srcdir=$srcdir
2141    ac_abs_top_srcdir=$srcdir ;;
2142  *) # Relative name.
2143    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2144    ac_top_srcdir=$ac_top_build_prefix$srcdir
2145    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2146esac
2147ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2148
2149    cd "$ac_dir" || { ac_status=$?; continue; }
2150    # Check for guested configure.
2151    if test -f "$ac_srcdir/configure.gnu"; then
2152      echo &&
2153      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2154    elif test -f "$ac_srcdir/configure"; then
2155      echo &&
2156      $SHELL "$ac_srcdir/configure" --help=recursive
2157    else
2158      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2159    fi || ac_status=$?
2160    cd "$ac_pwd" || { ac_status=$?; break; }
2161  done
2162fi
2163
2164test -n "$ac_init_help" && exit $ac_status
2165if $ac_init_version; then
2166  cat <<\_ACEOF
2167OpenJDK configure jdk9
2168generated by GNU Autoconf 2.69
2169
2170Copyright (C) 2012 Free Software Foundation, Inc.
2171This configure script is free software; the Free Software Foundation
2172gives unlimited permission to copy, distribute and modify it.
2173_ACEOF
2174  exit
2175fi
2176
2177## ------------------------ ##
2178## Autoconf initialization. ##
2179## ------------------------ ##
2180
2181# ac_fn_c_try_compile LINENO
2182# --------------------------
2183# Try to compile conftest.$ac_ext, and return whether this succeeded.
2184ac_fn_c_try_compile ()
2185{
2186  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2187  rm -f conftest.$ac_objext
2188  if { { ac_try="$ac_compile"
2189case "(($ac_try" in
2190  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2191  *) ac_try_echo=$ac_try;;
2192esac
2193eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2194$as_echo "$ac_try_echo"; } >&5
2195  (eval "$ac_compile") 2>conftest.err
2196  ac_status=$?
2197  if test -s conftest.err; then
2198    grep -v '^ *+' conftest.err >conftest.er1
2199    cat conftest.er1 >&5
2200    mv -f conftest.er1 conftest.err
2201  fi
2202  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2203  test $ac_status = 0; } && {
2204	 test -z "$ac_c_werror_flag" ||
2205	 test ! -s conftest.err
2206       } && test -s conftest.$ac_objext; then :
2207  ac_retval=0
2208else
2209  $as_echo "$as_me: failed program was:" >&5
2210sed 's/^/| /' conftest.$ac_ext >&5
2211
2212	ac_retval=1
2213fi
2214  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2215  as_fn_set_status $ac_retval
2216
2217} # ac_fn_c_try_compile
2218
2219# ac_fn_cxx_try_compile LINENO
2220# ----------------------------
2221# Try to compile conftest.$ac_ext, and return whether this succeeded.
2222ac_fn_cxx_try_compile ()
2223{
2224  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2225  rm -f conftest.$ac_objext
2226  if { { ac_try="$ac_compile"
2227case "(($ac_try" in
2228  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2229  *) ac_try_echo=$ac_try;;
2230esac
2231eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2232$as_echo "$ac_try_echo"; } >&5
2233  (eval "$ac_compile") 2>conftest.err
2234  ac_status=$?
2235  if test -s conftest.err; then
2236    grep -v '^ *+' conftest.err >conftest.er1
2237    cat conftest.er1 >&5
2238    mv -f conftest.er1 conftest.err
2239  fi
2240  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2241  test $ac_status = 0; } && {
2242	 test -z "$ac_cxx_werror_flag" ||
2243	 test ! -s conftest.err
2244       } && test -s conftest.$ac_objext; then :
2245  ac_retval=0
2246else
2247  $as_echo "$as_me: failed program was:" >&5
2248sed 's/^/| /' conftest.$ac_ext >&5
2249
2250	ac_retval=1
2251fi
2252  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2253  as_fn_set_status $ac_retval
2254
2255} # ac_fn_cxx_try_compile
2256
2257# ac_fn_c_try_cpp LINENO
2258# ----------------------
2259# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2260ac_fn_c_try_cpp ()
2261{
2262  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2263  if { { ac_try="$ac_cpp conftest.$ac_ext"
2264case "(($ac_try" in
2265  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2266  *) ac_try_echo=$ac_try;;
2267esac
2268eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2269$as_echo "$ac_try_echo"; } >&5
2270  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2271  ac_status=$?
2272  if test -s conftest.err; then
2273    grep -v '^ *+' conftest.err >conftest.er1
2274    cat conftest.er1 >&5
2275    mv -f conftest.er1 conftest.err
2276  fi
2277  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2278  test $ac_status = 0; } > conftest.i && {
2279	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2280	 test ! -s conftest.err
2281       }; then :
2282  ac_retval=0
2283else
2284  $as_echo "$as_me: failed program was:" >&5
2285sed 's/^/| /' conftest.$ac_ext >&5
2286
2287    ac_retval=1
2288fi
2289  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2290  as_fn_set_status $ac_retval
2291
2292} # ac_fn_c_try_cpp
2293
2294# ac_fn_cxx_try_cpp LINENO
2295# ------------------------
2296# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2297ac_fn_cxx_try_cpp ()
2298{
2299  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2300  if { { ac_try="$ac_cpp conftest.$ac_ext"
2301case "(($ac_try" in
2302  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2303  *) ac_try_echo=$ac_try;;
2304esac
2305eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2306$as_echo "$ac_try_echo"; } >&5
2307  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2308  ac_status=$?
2309  if test -s conftest.err; then
2310    grep -v '^ *+' conftest.err >conftest.er1
2311    cat conftest.er1 >&5
2312    mv -f conftest.er1 conftest.err
2313  fi
2314  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2315  test $ac_status = 0; } > conftest.i && {
2316	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2317	 test ! -s conftest.err
2318       }; then :
2319  ac_retval=0
2320else
2321  $as_echo "$as_me: failed program was:" >&5
2322sed 's/^/| /' conftest.$ac_ext >&5
2323
2324    ac_retval=1
2325fi
2326  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2327  as_fn_set_status $ac_retval
2328
2329} # ac_fn_cxx_try_cpp
2330
2331# ac_fn_objc_try_compile LINENO
2332# -----------------------------
2333# Try to compile conftest.$ac_ext, and return whether this succeeded.
2334ac_fn_objc_try_compile ()
2335{
2336  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2337  rm -f conftest.$ac_objext
2338  if { { ac_try="$ac_compile"
2339case "(($ac_try" in
2340  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2341  *) ac_try_echo=$ac_try;;
2342esac
2343eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2344$as_echo "$ac_try_echo"; } >&5
2345  (eval "$ac_compile") 2>conftest.err
2346  ac_status=$?
2347  if test -s conftest.err; then
2348    grep -v '^ *+' conftest.err >conftest.er1
2349    cat conftest.er1 >&5
2350    mv -f conftest.er1 conftest.err
2351  fi
2352  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2353  test $ac_status = 0; } && {
2354	 test -z "$ac_objc_werror_flag" ||
2355	 test ! -s conftest.err
2356       } && test -s conftest.$ac_objext; then :
2357  ac_retval=0
2358else
2359  $as_echo "$as_me: failed program was:" >&5
2360sed 's/^/| /' conftest.$ac_ext >&5
2361
2362	ac_retval=1
2363fi
2364  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2365  as_fn_set_status $ac_retval
2366
2367} # ac_fn_objc_try_compile
2368
2369# ac_fn_c_try_link LINENO
2370# -----------------------
2371# Try to link conftest.$ac_ext, and return whether this succeeded.
2372ac_fn_c_try_link ()
2373{
2374  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2375  rm -f conftest.$ac_objext conftest$ac_exeext
2376  if { { ac_try="$ac_link"
2377case "(($ac_try" in
2378  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2379  *) ac_try_echo=$ac_try;;
2380esac
2381eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2382$as_echo "$ac_try_echo"; } >&5
2383  (eval "$ac_link") 2>conftest.err
2384  ac_status=$?
2385  if test -s conftest.err; then
2386    grep -v '^ *+' conftest.err >conftest.er1
2387    cat conftest.er1 >&5
2388    mv -f conftest.er1 conftest.err
2389  fi
2390  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2391  test $ac_status = 0; } && {
2392	 test -z "$ac_c_werror_flag" ||
2393	 test ! -s conftest.err
2394       } && test -s conftest$ac_exeext && {
2395	 test "$cross_compiling" = yes ||
2396	 test -x conftest$ac_exeext
2397       }; then :
2398  ac_retval=0
2399else
2400  $as_echo "$as_me: failed program was:" >&5
2401sed 's/^/| /' conftest.$ac_ext >&5
2402
2403	ac_retval=1
2404fi
2405  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2406  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2407  # interfere with the next link command; also delete a directory that is
2408  # left behind by Apple's compiler.  We do this before executing the actions.
2409  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2410  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2411  as_fn_set_status $ac_retval
2412
2413} # ac_fn_c_try_link
2414
2415# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2416# ---------------------------------------------------------
2417# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2418# the include files in INCLUDES and setting the cache variable VAR
2419# accordingly.
2420ac_fn_cxx_check_header_mongrel ()
2421{
2422  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2423  if eval \${$3+:} false; then :
2424  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2425$as_echo_n "checking for $2... " >&6; }
2426if eval \${$3+:} false; then :
2427  $as_echo_n "(cached) " >&6
2428fi
2429eval ac_res=\$$3
2430	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2431$as_echo "$ac_res" >&6; }
2432else
2433  # Is the header compilable?
2434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2435$as_echo_n "checking $2 usability... " >&6; }
2436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2437/* end confdefs.h.  */
2438$4
2439#include <$2>
2440_ACEOF
2441if ac_fn_cxx_try_compile "$LINENO"; then :
2442  ac_header_compiler=yes
2443else
2444  ac_header_compiler=no
2445fi
2446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2448$as_echo "$ac_header_compiler" >&6; }
2449
2450# Is the header present?
2451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2452$as_echo_n "checking $2 presence... " >&6; }
2453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2454/* end confdefs.h.  */
2455#include <$2>
2456_ACEOF
2457if ac_fn_cxx_try_cpp "$LINENO"; then :
2458  ac_header_preproc=yes
2459else
2460  ac_header_preproc=no
2461fi
2462rm -f conftest.err conftest.i conftest.$ac_ext
2463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2464$as_echo "$ac_header_preproc" >&6; }
2465
2466# So?  What about this header?
2467case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2468  yes:no: )
2469    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2470$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2471    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2472$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2473    ;;
2474  no:yes:* )
2475    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2476$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2477    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2478$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2479    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2480$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2481    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2482$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2483    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2484$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2485( $as_echo "## ----------------------------------------- ##
2486## Report this to build-dev@openjdk.java.net ##
2487## ----------------------------------------- ##"
2488     ) | sed "s/^/$as_me: WARNING:     /" >&2
2489    ;;
2490esac
2491  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2492$as_echo_n "checking for $2... " >&6; }
2493if eval \${$3+:} false; then :
2494  $as_echo_n "(cached) " >&6
2495else
2496  eval "$3=\$ac_header_compiler"
2497fi
2498eval ac_res=\$$3
2499	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2500$as_echo "$ac_res" >&6; }
2501fi
2502  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2503
2504} # ac_fn_cxx_check_header_mongrel
2505
2506# ac_fn_cxx_try_run LINENO
2507# ------------------------
2508# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2509# that executables *can* be run.
2510ac_fn_cxx_try_run ()
2511{
2512  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2513  if { { ac_try="$ac_link"
2514case "(($ac_try" in
2515  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2516  *) ac_try_echo=$ac_try;;
2517esac
2518eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2519$as_echo "$ac_try_echo"; } >&5
2520  (eval "$ac_link") 2>&5
2521  ac_status=$?
2522  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2523  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2524  { { case "(($ac_try" in
2525  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2526  *) ac_try_echo=$ac_try;;
2527esac
2528eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2529$as_echo "$ac_try_echo"; } >&5
2530  (eval "$ac_try") 2>&5
2531  ac_status=$?
2532  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2533  test $ac_status = 0; }; }; then :
2534  ac_retval=0
2535else
2536  $as_echo "$as_me: program exited with status $ac_status" >&5
2537       $as_echo "$as_me: failed program was:" >&5
2538sed 's/^/| /' conftest.$ac_ext >&5
2539
2540       ac_retval=$ac_status
2541fi
2542  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2543  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2544  as_fn_set_status $ac_retval
2545
2546} # ac_fn_cxx_try_run
2547
2548# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2549# ---------------------------------------------------------
2550# Tests whether HEADER exists and can be compiled using the include files in
2551# INCLUDES, setting the cache variable VAR accordingly.
2552ac_fn_cxx_check_header_compile ()
2553{
2554  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2555  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2556$as_echo_n "checking for $2... " >&6; }
2557if eval \${$3+:} false; then :
2558  $as_echo_n "(cached) " >&6
2559else
2560  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2561/* end confdefs.h.  */
2562$4
2563#include <$2>
2564_ACEOF
2565if ac_fn_cxx_try_compile "$LINENO"; then :
2566  eval "$3=yes"
2567else
2568  eval "$3=no"
2569fi
2570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2571fi
2572eval ac_res=\$$3
2573	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2574$as_echo "$ac_res" >&6; }
2575  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2576
2577} # ac_fn_cxx_check_header_compile
2578
2579# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2580# ----------------------------------------------
2581# Tries to find the compile-time value of EXPR in a program that includes
2582# INCLUDES, setting VAR accordingly. Returns whether the value could be
2583# computed
2584ac_fn_cxx_compute_int ()
2585{
2586  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2587  if test "$cross_compiling" = yes; then
2588    # Depending upon the size, compute the lo and hi bounds.
2589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2590/* end confdefs.h.  */
2591$4
2592int
2593main ()
2594{
2595static int test_array [1 - 2 * !(($2) >= 0)];
2596test_array [0] = 0;
2597return test_array [0];
2598
2599  ;
2600  return 0;
2601}
2602_ACEOF
2603if ac_fn_cxx_try_compile "$LINENO"; then :
2604  ac_lo=0 ac_mid=0
2605  while :; do
2606    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2607/* end confdefs.h.  */
2608$4
2609int
2610main ()
2611{
2612static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2613test_array [0] = 0;
2614return test_array [0];
2615
2616  ;
2617  return 0;
2618}
2619_ACEOF
2620if ac_fn_cxx_try_compile "$LINENO"; then :
2621  ac_hi=$ac_mid; break
2622else
2623  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2624			if test $ac_lo -le $ac_mid; then
2625			  ac_lo= ac_hi=
2626			  break
2627			fi
2628			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2629fi
2630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2631  done
2632else
2633  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2634/* end confdefs.h.  */
2635$4
2636int
2637main ()
2638{
2639static int test_array [1 - 2 * !(($2) < 0)];
2640test_array [0] = 0;
2641return test_array [0];
2642
2643  ;
2644  return 0;
2645}
2646_ACEOF
2647if ac_fn_cxx_try_compile "$LINENO"; then :
2648  ac_hi=-1 ac_mid=-1
2649  while :; do
2650    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2651/* end confdefs.h.  */
2652$4
2653int
2654main ()
2655{
2656static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2657test_array [0] = 0;
2658return test_array [0];
2659
2660  ;
2661  return 0;
2662}
2663_ACEOF
2664if ac_fn_cxx_try_compile "$LINENO"; then :
2665  ac_lo=$ac_mid; break
2666else
2667  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2668			if test $ac_mid -le $ac_hi; then
2669			  ac_lo= ac_hi=
2670			  break
2671			fi
2672			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2673fi
2674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2675  done
2676else
2677  ac_lo= ac_hi=
2678fi
2679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2680fi
2681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2682# Binary search between lo and hi bounds.
2683while test "x$ac_lo" != "x$ac_hi"; do
2684  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2685  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2686/* end confdefs.h.  */
2687$4
2688int
2689main ()
2690{
2691static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2692test_array [0] = 0;
2693return test_array [0];
2694
2695  ;
2696  return 0;
2697}
2698_ACEOF
2699if ac_fn_cxx_try_compile "$LINENO"; then :
2700  ac_hi=$ac_mid
2701else
2702  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2703fi
2704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2705done
2706case $ac_lo in #((
2707?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2708'') ac_retval=1 ;;
2709esac
2710  else
2711    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2712/* end confdefs.h.  */
2713$4
2714static long int longval () { return $2; }
2715static unsigned long int ulongval () { return $2; }
2716#include <stdio.h>
2717#include <stdlib.h>
2718int
2719main ()
2720{
2721
2722  FILE *f = fopen ("conftest.val", "w");
2723  if (! f)
2724    return 1;
2725  if (($2) < 0)
2726    {
2727      long int i = longval ();
2728      if (i != ($2))
2729	return 1;
2730      fprintf (f, "%ld", i);
2731    }
2732  else
2733    {
2734      unsigned long int i = ulongval ();
2735      if (i != ($2))
2736	return 1;
2737      fprintf (f, "%lu", i);
2738    }
2739  /* Do not output a trailing newline, as this causes \r\n confusion
2740     on some platforms.  */
2741  return ferror (f) || fclose (f) != 0;
2742
2743  ;
2744  return 0;
2745}
2746_ACEOF
2747if ac_fn_cxx_try_run "$LINENO"; then :
2748  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2749else
2750  ac_retval=1
2751fi
2752rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2753  conftest.$ac_objext conftest.beam conftest.$ac_ext
2754rm -f conftest.val
2755
2756  fi
2757  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2758  as_fn_set_status $ac_retval
2759
2760} # ac_fn_cxx_compute_int
2761
2762# ac_fn_cxx_try_link LINENO
2763# -------------------------
2764# Try to link conftest.$ac_ext, and return whether this succeeded.
2765ac_fn_cxx_try_link ()
2766{
2767  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2768  rm -f conftest.$ac_objext conftest$ac_exeext
2769  if { { ac_try="$ac_link"
2770case "(($ac_try" in
2771  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2772  *) ac_try_echo=$ac_try;;
2773esac
2774eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2775$as_echo "$ac_try_echo"; } >&5
2776  (eval "$ac_link") 2>conftest.err
2777  ac_status=$?
2778  if test -s conftest.err; then
2779    grep -v '^ *+' conftest.err >conftest.er1
2780    cat conftest.er1 >&5
2781    mv -f conftest.er1 conftest.err
2782  fi
2783  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2784  test $ac_status = 0; } && {
2785	 test -z "$ac_cxx_werror_flag" ||
2786	 test ! -s conftest.err
2787       } && test -s conftest$ac_exeext && {
2788	 test "$cross_compiling" = yes ||
2789	 test -x conftest$ac_exeext
2790       }; then :
2791  ac_retval=0
2792else
2793  $as_echo "$as_me: failed program was:" >&5
2794sed 's/^/| /' conftest.$ac_ext >&5
2795
2796	ac_retval=1
2797fi
2798  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2799  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2800  # interfere with the next link command; also delete a directory that is
2801  # left behind by Apple's compiler.  We do this before executing the actions.
2802  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2803  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2804  as_fn_set_status $ac_retval
2805
2806} # ac_fn_cxx_try_link
2807
2808# ac_fn_cxx_check_func LINENO FUNC VAR
2809# ------------------------------------
2810# Tests whether FUNC exists, setting the cache variable VAR accordingly
2811ac_fn_cxx_check_func ()
2812{
2813  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2814  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2815$as_echo_n "checking for $2... " >&6; }
2816if eval \${$3+:} false; then :
2817  $as_echo_n "(cached) " >&6
2818else
2819  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2820/* end confdefs.h.  */
2821/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2822   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2823#define $2 innocuous_$2
2824
2825/* System header to define __stub macros and hopefully few prototypes,
2826    which can conflict with char $2 (); below.
2827    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2828    <limits.h> exists even on freestanding compilers.  */
2829
2830#ifdef __STDC__
2831# include <limits.h>
2832#else
2833# include <assert.h>
2834#endif
2835
2836#undef $2
2837
2838/* Override any GCC internal prototype to avoid an error.
2839   Use char because int might match the return type of a GCC
2840   builtin and then its argument prototype would still apply.  */
2841#ifdef __cplusplus
2842extern "C"
2843#endif
2844char $2 ();
2845/* The GNU C library defines this for functions which it implements
2846    to always fail with ENOSYS.  Some functions are actually named
2847    something starting with __ and the normal name is an alias.  */
2848#if defined __stub_$2 || defined __stub___$2
2849choke me
2850#endif
2851
2852int
2853main ()
2854{
2855return $2 ();
2856  ;
2857  return 0;
2858}
2859_ACEOF
2860if ac_fn_cxx_try_link "$LINENO"; then :
2861  eval "$3=yes"
2862else
2863  eval "$3=no"
2864fi
2865rm -f core conftest.err conftest.$ac_objext \
2866    conftest$ac_exeext conftest.$ac_ext
2867fi
2868eval ac_res=\$$3
2869	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2870$as_echo "$ac_res" >&6; }
2871  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2872
2873} # ac_fn_cxx_check_func
2874
2875# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2876# -------------------------------------------------------
2877# Tests whether HEADER exists and can be compiled using the include files in
2878# INCLUDES, setting the cache variable VAR accordingly.
2879ac_fn_c_check_header_compile ()
2880{
2881  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2882  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2883$as_echo_n "checking for $2... " >&6; }
2884if eval \${$3+:} false; then :
2885  $as_echo_n "(cached) " >&6
2886else
2887  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2888/* end confdefs.h.  */
2889$4
2890#include <$2>
2891_ACEOF
2892if ac_fn_c_try_compile "$LINENO"; then :
2893  eval "$3=yes"
2894else
2895  eval "$3=no"
2896fi
2897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2898fi
2899eval ac_res=\$$3
2900	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2901$as_echo "$ac_res" >&6; }
2902  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2903
2904} # ac_fn_c_check_header_compile
2905cat >config.log <<_ACEOF
2906This file contains any messages produced by compilers while
2907running configure, to aid debugging if configure makes a mistake.
2908
2909It was created by OpenJDK $as_me jdk9, which was
2910generated by GNU Autoconf 2.69.  Invocation command line was
2911
2912  $ $0 $@
2913
2914_ACEOF
2915exec 5>>config.log
2916{
2917cat <<_ASUNAME
2918## --------- ##
2919## Platform. ##
2920## --------- ##
2921
2922hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2923uname -m = `(uname -m) 2>/dev/null || echo unknown`
2924uname -r = `(uname -r) 2>/dev/null || echo unknown`
2925uname -s = `(uname -s) 2>/dev/null || echo unknown`
2926uname -v = `(uname -v) 2>/dev/null || echo unknown`
2927
2928/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2929/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2930
2931/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2932/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2933/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2934/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2935/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2936/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2937/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2938
2939_ASUNAME
2940
2941as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2942for as_dir in $PATH
2943do
2944  IFS=$as_save_IFS
2945  test -z "$as_dir" && as_dir=.
2946    $as_echo "PATH: $as_dir"
2947  done
2948IFS=$as_save_IFS
2949
2950} >&5
2951
2952cat >&5 <<_ACEOF
2953
2954
2955## ----------- ##
2956## Core tests. ##
2957## ----------- ##
2958
2959_ACEOF
2960
2961
2962# Keep a trace of the command line.
2963# Strip out --no-create and --no-recursion so they do not pile up.
2964# Strip out --silent because we don't want to record it for future runs.
2965# Also quote any args containing shell meta-characters.
2966# Make two passes to allow for proper duplicate-argument suppression.
2967ac_configure_args=
2968ac_configure_args0=
2969ac_configure_args1=
2970ac_must_keep_next=false
2971for ac_pass in 1 2
2972do
2973  for ac_arg
2974  do
2975    case $ac_arg in
2976    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2977    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2978    | -silent | --silent | --silen | --sile | --sil)
2979      continue ;;
2980    *\'*)
2981      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2982    esac
2983    case $ac_pass in
2984    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2985    2)
2986      as_fn_append ac_configure_args1 " '$ac_arg'"
2987      if test $ac_must_keep_next = true; then
2988	ac_must_keep_next=false # Got value, back to normal.
2989      else
2990	case $ac_arg in
2991	  *=* | --config-cache | -C | -disable-* | --disable-* \
2992	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2993	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2994	  | -with-* | --with-* | -without-* | --without-* | --x)
2995	    case "$ac_configure_args0 " in
2996	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2997	    esac
2998	    ;;
2999	  -* ) ac_must_keep_next=true ;;
3000	esac
3001      fi
3002      as_fn_append ac_configure_args " '$ac_arg'"
3003      ;;
3004    esac
3005  done
3006done
3007{ ac_configure_args0=; unset ac_configure_args0;}
3008{ ac_configure_args1=; unset ac_configure_args1;}
3009
3010# When interrupted or exit'd, cleanup temporary files, and complete
3011# config.log.  We remove comments because anyway the quotes in there
3012# would cause problems or look ugly.
3013# WARNING: Use '\'' to represent an apostrophe within the trap.
3014# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3015trap 'exit_status=$?
3016  # Save into config.log some information that might help in debugging.
3017  {
3018    echo
3019
3020    $as_echo "## ---------------- ##
3021## Cache variables. ##
3022## ---------------- ##"
3023    echo
3024    # The following way of writing the cache mishandles newlines in values,
3025(
3026  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3027    eval ac_val=\$$ac_var
3028    case $ac_val in #(
3029    *${as_nl}*)
3030      case $ac_var in #(
3031      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3032$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3033      esac
3034      case $ac_var in #(
3035      _ | IFS | as_nl) ;; #(
3036      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3037      *) { eval $ac_var=; unset $ac_var;} ;;
3038      esac ;;
3039    esac
3040  done
3041  (set) 2>&1 |
3042    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3043    *${as_nl}ac_space=\ *)
3044      sed -n \
3045	"s/'\''/'\''\\\\'\'''\''/g;
3046	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3047      ;; #(
3048    *)
3049      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3050      ;;
3051    esac |
3052    sort
3053)
3054    echo
3055
3056    $as_echo "## ----------------- ##
3057## Output variables. ##
3058## ----------------- ##"
3059    echo
3060    for ac_var in $ac_subst_vars
3061    do
3062      eval ac_val=\$$ac_var
3063      case $ac_val in
3064      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3065      esac
3066      $as_echo "$ac_var='\''$ac_val'\''"
3067    done | sort
3068    echo
3069
3070    if test -n "$ac_subst_files"; then
3071      $as_echo "## ------------------- ##
3072## File substitutions. ##
3073## ------------------- ##"
3074      echo
3075      for ac_var in $ac_subst_files
3076      do
3077	eval ac_val=\$$ac_var
3078	case $ac_val in
3079	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3080	esac
3081	$as_echo "$ac_var='\''$ac_val'\''"
3082      done | sort
3083      echo
3084    fi
3085
3086    if test -s confdefs.h; then
3087      $as_echo "## ----------- ##
3088## confdefs.h. ##
3089## ----------- ##"
3090      echo
3091      cat confdefs.h
3092      echo
3093    fi
3094    test "$ac_signal" != 0 &&
3095      $as_echo "$as_me: caught signal $ac_signal"
3096    $as_echo "$as_me: exit $exit_status"
3097  } >&5
3098  rm -f core *.core core.conftest.* &&
3099    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3100    exit $exit_status
3101' 0
3102for ac_signal in 1 2 13 15; do
3103  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3104done
3105ac_signal=0
3106
3107# confdefs.h avoids OS command line length limits that DEFS can exceed.
3108rm -f -r conftest* confdefs.h
3109
3110$as_echo "/* confdefs.h */" > confdefs.h
3111
3112# Predefined preprocessor variables.
3113
3114cat >>confdefs.h <<_ACEOF
3115#define PACKAGE_NAME "$PACKAGE_NAME"
3116_ACEOF
3117
3118cat >>confdefs.h <<_ACEOF
3119#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3120_ACEOF
3121
3122cat >>confdefs.h <<_ACEOF
3123#define PACKAGE_VERSION "$PACKAGE_VERSION"
3124_ACEOF
3125
3126cat >>confdefs.h <<_ACEOF
3127#define PACKAGE_STRING "$PACKAGE_STRING"
3128_ACEOF
3129
3130cat >>confdefs.h <<_ACEOF
3131#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3132_ACEOF
3133
3134cat >>confdefs.h <<_ACEOF
3135#define PACKAGE_URL "$PACKAGE_URL"
3136_ACEOF
3137
3138
3139# Let the site file select an alternate cache file if it wants to.
3140# Prefer an explicitly selected file to automatically selected ones.
3141ac_site_file1=NONE
3142ac_site_file2=NONE
3143if test -n "$CONFIG_SITE"; then
3144  # We do not want a PATH search for config.site.
3145  case $CONFIG_SITE in #((
3146    -*)  ac_site_file1=./$CONFIG_SITE;;
3147    */*) ac_site_file1=$CONFIG_SITE;;
3148    *)   ac_site_file1=./$CONFIG_SITE;;
3149  esac
3150elif test "x$prefix" != xNONE; then
3151  ac_site_file1=$prefix/share/config.site
3152  ac_site_file2=$prefix/etc/config.site
3153else
3154  ac_site_file1=$ac_default_prefix/share/config.site
3155  ac_site_file2=$ac_default_prefix/etc/config.site
3156fi
3157for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3158do
3159  test "x$ac_site_file" = xNONE && continue
3160  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3161    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3162$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3163    sed 's/^/| /' "$ac_site_file" >&5
3164    . "$ac_site_file" \
3165      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3166$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3167as_fn_error $? "failed to load site script $ac_site_file
3168See \`config.log' for more details" "$LINENO" 5; }
3169  fi
3170done
3171
3172if test -r "$cache_file"; then
3173  # Some versions of bash will fail to source /dev/null (special files
3174  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3175  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3176    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3177$as_echo "$as_me: loading cache $cache_file" >&6;}
3178    case $cache_file in
3179      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3180      *)                      . "./$cache_file";;
3181    esac
3182  fi
3183else
3184  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3185$as_echo "$as_me: creating cache $cache_file" >&6;}
3186  >$cache_file
3187fi
3188
3189# Check that the precious variables saved in the cache have kept the same
3190# value.
3191ac_cache_corrupted=false
3192for ac_var in $ac_precious_vars; do
3193  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3194  eval ac_new_set=\$ac_env_${ac_var}_set
3195  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3196  eval ac_new_val=\$ac_env_${ac_var}_value
3197  case $ac_old_set,$ac_new_set in
3198    set,)
3199      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3200$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3201      ac_cache_corrupted=: ;;
3202    ,set)
3203      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3204$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3205      ac_cache_corrupted=: ;;
3206    ,);;
3207    *)
3208      if test "x$ac_old_val" != "x$ac_new_val"; then
3209	# differences in whitespace do not lead to failure.
3210	ac_old_val_w=`echo x $ac_old_val`
3211	ac_new_val_w=`echo x $ac_new_val`
3212	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3213	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3214$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3215	  ac_cache_corrupted=:
3216	else
3217	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3218$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3219	  eval $ac_var=\$ac_old_val
3220	fi
3221	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3222$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3223	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3224$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3225      fi;;
3226  esac
3227  # Pass precious variables to config.status.
3228  if test "$ac_new_set" = set; then
3229    case $ac_new_val in
3230    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3231    *) ac_arg=$ac_var=$ac_new_val ;;
3232    esac
3233    case " $ac_configure_args " in
3234      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3235      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3236    esac
3237  fi
3238done
3239if $ac_cache_corrupted; then
3240  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3241$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3242  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3243$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3244  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3245fi
3246## -------------------- ##
3247## Main body of script. ##
3248## -------------------- ##
3249
3250ac_ext=c
3251ac_cpp='$CPP $CPPFLAGS'
3252ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3253ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3254ac_compiler_gnu=$ac_cv_c_compiler_gnu
3255
3256
3257
3258ac_aux_dir=
3259for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3260  if test -f "$ac_dir/install-sh"; then
3261    ac_aux_dir=$ac_dir
3262    ac_install_sh="$ac_aux_dir/install-sh -c"
3263    break
3264  elif test -f "$ac_dir/install.sh"; then
3265    ac_aux_dir=$ac_dir
3266    ac_install_sh="$ac_aux_dir/install.sh -c"
3267    break
3268  elif test -f "$ac_dir/shtool"; then
3269    ac_aux_dir=$ac_dir
3270    ac_install_sh="$ac_aux_dir/shtool install -c"
3271    break
3272  fi
3273done
3274if test -z "$ac_aux_dir"; then
3275  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
3276fi
3277
3278# These three variables are undocumented and unsupported,
3279# and are intended to be withdrawn in a future Autoconf release.
3280# They can cause serious problems if a builder's source tree is in a directory
3281# whose full name contains unusual characters.
3282ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3283ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3284ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3285
3286
3287# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3288
3289#
3290# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3291# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3292#
3293# This code is free software; you can redistribute it and/or modify it
3294# under the terms of the GNU General Public License version 2 only, as
3295# published by the Free Software Foundation.  Oracle designates this
3296# particular file as subject to the "Classpath" exception as provided
3297# by Oracle in the LICENSE file that accompanied this code.
3298#
3299# This code is distributed in the hope that it will be useful, but WITHOUT
3300# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3301# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3302# version 2 for more details (a copy is included in the LICENSE file that
3303# accompanied this code).
3304#
3305# You should have received a copy of the GNU General Public License version
3306# 2 along with this work; if not, write to the Free Software Foundation,
3307# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3308#
3309# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3310# or visit www.oracle.com if you need additional information or have any
3311# questions.
3312#
3313
3314#
3315# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3316#
3317# This program is free software; you can redistribute it and/or modify
3318# it under the terms of the GNU General Public License as published by
3319# the Free Software Foundation; either version 2 of the License, or
3320# (at your option) any later version.
3321#
3322# This program is distributed in the hope that it will be useful, but
3323# WITHOUT ANY WARRANTY; without even the implied warranty of
3324# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3325# General Public License for more details.
3326#
3327# You should have received a copy of the GNU General Public License
3328# along with this program; if not, write to the Free Software
3329# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3330#
3331# As a special exception to the GNU General Public License, if you
3332# distribute this file as part of a program that contains a
3333# configuration script generated by Autoconf, you may include it under
3334# the same distribution terms that you use for the rest of that program.
3335
3336# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3337# ----------------------------------
3338# PKG_PROG_PKG_CONFIG
3339
3340# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3341#
3342# Check to see whether a particular set of modules exists.  Similar
3343# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3344#
3345#
3346# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3347# this or PKG_CHECK_MODULES is called, or make sure to call
3348# PKG_CHECK_EXISTS manually
3349# --------------------------------------------------------------
3350
3351
3352
3353# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3354# ---------------------------------------------
3355# _PKG_CONFIG
3356
3357# _PKG_SHORT_ERRORS_SUPPORTED
3358# -----------------------------
3359# _PKG_SHORT_ERRORS_SUPPORTED
3360
3361
3362# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3363# [ACTION-IF-NOT-FOUND])
3364#
3365#
3366# Note that if there is a possibility the first call to
3367# PKG_CHECK_MODULES might not happen, you should be sure to include an
3368# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3369#
3370#
3371# --------------------------------------------------------------
3372# PKG_CHECK_MODULES
3373
3374
3375# Include these first...
3376#
3377# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3378# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3379#
3380# This code is free software; you can redistribute it and/or modify it
3381# under the terms of the GNU General Public License version 2 only, as
3382# published by the Free Software Foundation.  Oracle designates this
3383# particular file as subject to the "Classpath" exception as provided
3384# by Oracle in the LICENSE file that accompanied this code.
3385#
3386# This code is distributed in the hope that it will be useful, but WITHOUT
3387# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3388# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3389# version 2 for more details (a copy is included in the LICENSE file that
3390# accompanied this code).
3391#
3392# You should have received a copy of the GNU General Public License version
3393# 2 along with this work; if not, write to the Free Software Foundation,
3394# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3395#
3396# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3397# or visit www.oracle.com if you need additional information or have any
3398# questions.
3399#
3400
3401# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3402# If so, then append $1 to $2 \
3403# Also set JVM_ARG_OK to true/false depending on outcome.
3404
3405
3406# Appends a string to a path variable, only adding the : when needed.
3407
3408
3409# Prepends a string to a path variable, only adding the : when needed.
3410
3411
3412# This will make sure the given variable points to a full and proper
3413# path. This means:
3414# 1) There will be no spaces in the path. On unix platforms,
3415#    spaces in the path will result in an error. On Windows,
3416#    the path will be rewritten using short-style to be space-free.
3417# 2) The path will be absolute, and it will be in unix-style (on
3418#     cygwin).
3419# $1: The name of the variable to fix
3420
3421
3422# This will make sure the given variable points to a executable
3423# with a full and proper path. This means:
3424# 1) There will be no spaces in the path. On unix platforms,
3425#    spaces in the path will result in an error. On Windows,
3426#    the path will be rewritten using short-style to be space-free.
3427# 2) The path will be absolute, and it will be in unix-style (on
3428#     cygwin).
3429# Any arguments given to the executable is preserved.
3430# If the input variable does not have a directory specification, then
3431# it need to be in the PATH.
3432# $1: The name of the variable to fix
3433
3434
3435
3436
3437# Register a --with argument but mark it as deprecated
3438# $1: The name of the with argument to deprecate, not including --with-
3439
3440
3441# Register a --enable argument but mark it as deprecated
3442# $1: The name of the with argument to deprecate, not including --enable-
3443# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3444
3445
3446
3447
3448# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3449# $1: variable to check
3450
3451
3452# Check that there are no unprocessed overridden variables left.
3453# If so, they are an incorrect argument and we will exit with an error.
3454
3455
3456# Setup a tool for the given variable. If correctly specified by the user,
3457# use that value, otherwise search for the tool using the supplied code snippet.
3458# $1: variable to set
3459# $2: code snippet to call to look for the tool
3460
3461
3462# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3463# $1: variable to set
3464# $2: executable name (or list of names) to look for
3465
3466
3467# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3468# $1: variable to set
3469# $2: executable name (or list of names) to look for
3470
3471
3472# Like BASIC_PATH_PROGS but fails if no tool was found.
3473# $1: variable to set
3474# $2: executable name (or list of names) to look for
3475
3476
3477# Like BASIC_SETUP_TOOL but fails if no tool was found.
3478# $1: variable to set
3479# $2: autoconf macro to call to look for the special tool
3480
3481
3482# Setup the most fundamental tools that relies on not much else to set up,
3483# but is used by much of the early bootstrap code.
3484
3485
3486# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496#%%% Simple tools %%%
3497
3498# Check if we have found a usable version of make
3499# $1: the path to a potential make binary (or empty)
3500# $2: the description on how we found this
3501
3502
3503
3504
3505# Goes looking for a usable version of GNU make.
3506
3507
3508
3509
3510
3511
3512# Check if build directory is on local disk. If not possible to determine,
3513# we prefer to claim it's local.
3514# Argument 1: directory to test
3515# Argument 2: what to do if it is on local disk
3516# Argument 3: what to do otherwise (remote disk or failure)
3517
3518
3519# Check that source files have basic read permissions set. This might
3520# not be the case in cygwin in certain conditions.
3521
3522
3523
3524
3525#
3526# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3527# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3528#
3529# This code is free software; you can redistribute it and/or modify it
3530# under the terms of the GNU General Public License version 2 only, as
3531# published by the Free Software Foundation.  Oracle designates this
3532# particular file as subject to the "Classpath" exception as provided
3533# by Oracle in the LICENSE file that accompanied this code.
3534#
3535# This code is distributed in the hope that it will be useful, but WITHOUT
3536# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3537# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3538# version 2 for more details (a copy is included in the LICENSE file that
3539# accompanied this code).
3540#
3541# You should have received a copy of the GNU General Public License version
3542# 2 along with this work; if not, write to the Free Software Foundation,
3543# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3544#
3545# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3546# or visit www.oracle.com if you need additional information or have any
3547# questions.
3548#
3549
3550
3551
3552
3553
3554# Helper function which possibly converts a path using DOS-style short mode.
3555# If so, the updated path is stored in $new_path.
3556# $1: The path to check
3557
3558
3559# Helper function which possibly converts a path using DOS-style short mode.
3560# If so, the updated path is stored in $new_path.
3561# $1: The path to check
3562
3563
3564# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3565# and could probably be heavily simplified. However, all changes in this
3566# area tend to need lot of testing in different scenarios, and in lack of
3567# proper unit testing, cleaning this up has not been deemed worth the effort
3568# at the moment.
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3579
3580
3581
3582
3583#
3584# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3585# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3586#
3587# This code is free software; you can redistribute it and/or modify it
3588# under the terms of the GNU General Public License version 2 only, as
3589# published by the Free Software Foundation.  Oracle designates this
3590# particular file as subject to the "Classpath" exception as provided
3591# by Oracle in the LICENSE file that accompanied this code.
3592#
3593# This code is distributed in the hope that it will be useful, but WITHOUT
3594# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3595# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3596# version 2 for more details (a copy is included in the LICENSE file that
3597# accompanied this code).
3598#
3599# You should have received a copy of the GNU General Public License version
3600# 2 along with this work; if not, write to the Free Software Foundation,
3601# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3602#
3603# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3604# or visit www.oracle.com if you need additional information or have any
3605# questions.
3606#
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618# ... then the rest
3619#
3620# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3621# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3622#
3623# This code is free software; you can redistribute it and/or modify it
3624# under the terms of the GNU General Public License version 2 only, as
3625# published by the Free Software Foundation.  Oracle designates this
3626# particular file as subject to the "Classpath" exception as provided
3627# by Oracle in the LICENSE file that accompanied this code.
3628#
3629# This code is distributed in the hope that it will be useful, but WITHOUT
3630# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3631# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3632# version 2 for more details (a copy is included in the LICENSE file that
3633# accompanied this code).
3634#
3635# You should have received a copy of the GNU General Public License version
3636# 2 along with this work; if not, write to the Free Software Foundation,
3637# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3638#
3639# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3640# or visit www.oracle.com if you need additional information or have any
3641# questions.
3642#
3643
3644########################################################################
3645# This file handles detection of the Boot JDK. The Boot JDK detection
3646# process has been developed as a response to solve a complex real-world
3647# problem. Initially, it was simple, but it has grown as platform after
3648# platform, idiosyncracy after idiosyncracy has been supported.
3649#
3650# The basic idea is this:
3651# 1) You need an acceptable *) JDK to use as a Boot JDK
3652# 2) There are several ways to locate a JDK, that are mostly platform
3653#    dependent **)
3654# 3) You can have multiple JDKs installed
3655# 4) If possible, configure should try to dig out an acceptable JDK
3656#    automatically, without having to resort to command-line options
3657#
3658# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3659#     javac) and not a JRE, etc.
3660#
3661# **) On Windows we typically use a well-known path.
3662#     On MacOSX we typically use the tool java_home.
3663#     On Linux we typically find javac in the $PATH, and then follow a
3664#     chain of symlinks that often ends up in a real JDK.
3665#
3666# This leads to the code where we check in different ways to locate a
3667# JDK, and if one is found, check if it is acceptable. If not, we print
3668# our reasons for rejecting it (useful when debugging non-working
3669# configure situations) and continue checking the next one.
3670########################################################################
3671
3672# Execute the check given as argument, and verify the result
3673# If the Boot JDK was previously found, do nothing
3674# $1 A command line (typically autoconf macro) to execute
3675
3676
3677# Test: Is bootjdk explicitely set by command line arguments?
3678
3679
3680# Test: Is bootjdk available from builddeps?
3681
3682
3683# Test: Is $JAVA_HOME set?
3684
3685
3686# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3687
3688
3689# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3690# $1: Argument to the java_home binary (optional)
3691
3692
3693# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3694
3695
3696# Look for a jdk in the given path. If there are multiple, try to select the newest.
3697# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3698# $1 = Path to directory containing jdk installations.
3699# $2 = String to append to the found JDK directory to get the proper JDK home
3700
3701
3702# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3703# environmental variable as base for where to look.
3704# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3705
3706
3707# Test: Is there a JDK installed in default, well-known locations?
3708
3709
3710# Check that a command-line tool in the Boot JDK is correct
3711# $1 = name of variable to assign
3712# $2 = name of binary
3713
3714
3715###############################################################################
3716#
3717# We need a Boot JDK to bootstrap the build.
3718#
3719
3720
3721
3722
3723
3724#
3725# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3726# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3727#
3728# This code is free software; you can redistribute it and/or modify it
3729# under the terms of the GNU General Public License version 2 only, as
3730# published by the Free Software Foundation.  Oracle designates this
3731# particular file as subject to the "Classpath" exception as provided
3732# by Oracle in the LICENSE file that accompanied this code.
3733#
3734# This code is distributed in the hope that it will be useful, but WITHOUT
3735# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3736# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3737# version 2 for more details (a copy is included in the LICENSE file that
3738# accompanied this code).
3739#
3740# You should have received a copy of the GNU General Public License version
3741# 2 along with this work; if not, write to the Free Software Foundation,
3742# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3743#
3744# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3745# or visit www.oracle.com if you need additional information or have any
3746# questions.
3747#
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768#
3769# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3770# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3771#
3772# This code is free software; you can redistribute it and/or modify it
3773# under the terms of the GNU General Public License version 2 only, as
3774# published by the Free Software Foundation.  Oracle designates this
3775# particular file as subject to the "Classpath" exception as provided
3776# by Oracle in the LICENSE file that accompanied this code.
3777#
3778# This code is distributed in the hope that it will be useful, but WITHOUT
3779# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3780# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3781# version 2 for more details (a copy is included in the LICENSE file that
3782# accompanied this code).
3783#
3784# You should have received a copy of the GNU General Public License version
3785# 2 along with this work; if not, write to the Free Software Foundation,
3786# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3787#
3788# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3789# or visit www.oracle.com if you need additional information or have any
3790# questions.
3791#
3792
3793
3794
3795
3796
3797# Documentation on common flags used for solstudio in HIGHEST.
3798#
3799# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3800#          done with care, there are some assumptions below that need to
3801#          be understood about the use of pointers, and IEEE behavior.
3802#
3803# -fns: Use non-standard floating point mode (not IEEE 754)
3804# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3805# -fsingle: Use single precision floating point with 'float'
3806# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3807#   (Source with excessing pointer casting and data access with mixed
3808#    pointer types are not recommended)
3809# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3810#   (If you expect perfect errno behavior, do not use this)
3811# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3812# -xrestrict: Pointer parameters to functions do not overlap
3813#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3814#    If you pass in multiple pointers to the same data, do not use this)
3815# -xlibmil: Inline some library routines
3816#   (If you expect perfect errno behavior, do not use this)
3817# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3818#   (If you expect perfect errno behavior, do not use this)
3819#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3820
3821    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3822    # Bug?
3823    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3824    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3825    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3826    #fi
3827
3828
3829
3830
3831
3832# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3833#                                   [RUN-IF-FALSE])
3834# ------------------------------------------------------------
3835# Check that the c and c++ compilers support an argument
3836
3837
3838# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3839#                                    [RUN-IF-FALSE])
3840# ------------------------------------------------------------
3841# Check that the linker support an argument
3842
3843
3844
3845
3846#
3847# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3848# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3849#
3850# This code is free software; you can redistribute it and/or modify it
3851# under the terms of the GNU General Public License version 2 only, as
3852# published by the Free Software Foundation.  Oracle designates this
3853# particular file as subject to the "Classpath" exception as provided
3854# by Oracle in the LICENSE file that accompanied this code.
3855#
3856# This code is distributed in the hope that it will be useful, but WITHOUT
3857# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3858# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3859# version 2 for more details (a copy is included in the LICENSE file that
3860# accompanied this code).
3861#
3862# You should have received a copy of the GNU General Public License version
3863# 2 along with this work; if not, write to the Free Software Foundation,
3864# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3865#
3866# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3867# or visit www.oracle.com if you need additional information or have any
3868# questions.
3869#
3870
3871
3872
3873
3874
3875cygwin_help() {
3876  case $1 in
3877    unzip)
3878      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3879      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3880      ;;
3881    zip)
3882      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3883      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3884      ;;
3885    make)
3886      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3887      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3888      ;;
3889    freetype)
3890      HELP_MSG="
3891The freetype library can now be build during the configure process.
3892Download the freetype sources and unpack them into an arbitrary directory:
3893
3894wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3895tar -xzf freetype-2.5.3.tar.gz
3896
3897Then run configure with '--with-freetype-src=<freetype_src>'. This will
3898automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3899builds or into '<freetype_src>/lib32' for 32-bit builds.
3900Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3901and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3902      ;;
3903  esac
3904}
3905
3906msys_help() {
3907  PKGHANDLER_COMMAND=""
3908}
3909
3910apt_help() {
3911  case $1 in
3912    devkit)
3913      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3914    openjdk)
3915      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3916    alsa)
3917      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3918    cups)
3919      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3920    freetype)
3921      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3922    pulse)
3923      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3924    x11)
3925      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3926    ccache)
3927      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3928  esac
3929}
3930
3931yum_help() {
3932  case $1 in
3933    devkit)
3934      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3935    openjdk)
3936      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3937    alsa)
3938      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3939    cups)
3940      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3941    freetype)
3942      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3943    pulse)
3944      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3945    x11)
3946      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3947    ccache)
3948      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3949  esac
3950}
3951
3952port_help() {
3953  PKGHANDLER_COMMAND=""
3954}
3955
3956pkgutil_help() {
3957  PKGHANDLER_COMMAND=""
3958}
3959
3960pkgadd_help() {
3961  PKGHANDLER_COMMAND=""
3962}
3963
3964# This function will check if we're called from the "configure" wrapper while
3965# printing --help. If so, we will print out additional information that can
3966# only be extracted within the autoconf script, and then exit. This must be
3967# called at the very beginning in configure.ac.
3968
3969
3970
3971
3972
3973
3974#
3975# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3976# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3977#
3978# This code is free software; you can redistribute it and/or modify it
3979# under the terms of the GNU General Public License version 2 only, as
3980# published by the Free Software Foundation.  Oracle designates this
3981# particular file as subject to the "Classpath" exception as provided
3982# by Oracle in the LICENSE file that accompanied this code.
3983#
3984# This code is distributed in the hope that it will be useful, but WITHOUT
3985# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3986# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3987# version 2 for more details (a copy is included in the LICENSE file that
3988# accompanied this code).
3989#
3990# You should have received a copy of the GNU General Public License version
3991# 2 along with this work; if not, write to the Free Software Foundation,
3992# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3993#
3994# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3995# or visit www.oracle.com if you need additional information or have any
3996# questions.
3997#
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008###############################################################################
4009#
4010# Should we build only OpenJDK even if closed sources are present?
4011#
4012
4013
4014
4015
4016###############################################################################
4017#
4018# Setup version numbers
4019#
4020
4021
4022
4023
4024
4025
4026#
4027# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4028# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4029#
4030# This code is free software; you can redistribute it and/or modify it
4031# under the terms of the GNU General Public License version 2 only, as
4032# published by the Free Software Foundation.  Oracle designates this
4033# particular file as subject to the "Classpath" exception as provided
4034# by Oracle in the LICENSE file that accompanied this code.
4035#
4036# This code is distributed in the hope that it will be useful, but WITHOUT
4037# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4038# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4039# version 2 for more details (a copy is included in the LICENSE file that
4040# accompanied this code).
4041#
4042# You should have received a copy of the GNU General Public License version
4043# 2 along with this work; if not, write to the Free Software Foundation,
4044# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4045#
4046# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4047# or visit www.oracle.com if you need additional information or have any
4048# questions.
4049#
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071#
4072# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4073# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4074#
4075# This code is free software; you can redistribute it and/or modify it
4076# under the terms of the GNU General Public License version 2 only, as
4077# published by the Free Software Foundation.  Oracle designates this
4078# particular file as subject to the "Classpath" exception as provided
4079# by Oracle in the LICENSE file that accompanied this code.
4080#
4081# This code is distributed in the hope that it will be useful, but WITHOUT
4082# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4083# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4084# version 2 for more details (a copy is included in the LICENSE file that
4085# accompanied this code).
4086#
4087# You should have received a copy of the GNU General Public License version
4088# 2 along with this work; if not, write to the Free Software Foundation,
4089# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4090#
4091# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4092# or visit www.oracle.com if you need additional information or have any
4093# questions.
4094#
4095
4096# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4097# Converts autoconf style CPU name to OpenJDK style, into
4098# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4099
4100
4101# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4102# Converts autoconf style OS name to OpenJDK style, into
4103# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4104
4105
4106# Expects $host_os $host_cpu $build_os and $build_cpu
4107# and $with_target_bits to have been setup!
4108#
4109# Translate the standard triplet(quadruplet) definition
4110# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4111# OPENJDK_BUILD_OS, etc.
4112
4113
4114# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4115# accordingly. Must be done after setting up build and target system, but before
4116# doing anything else with these values.
4117
4118
4119# Setup the legacy variables, for controlling the old makefiles.
4120#
4121
4122
4123
4124
4125#%%% Build and target systems %%%
4126
4127
4128
4129
4130# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4131# Add -mX to various FLAGS variables.
4132
4133
4134
4135
4136
4137
4138#
4139# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4140# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4141#
4142# This code is free software; you can redistribute it and/or modify it
4143# under the terms of the GNU General Public License version 2 only, as
4144# published by the Free Software Foundation.  Oracle designates this
4145# particular file as subject to the "Classpath" exception as provided
4146# by Oracle in the LICENSE file that accompanied this code.
4147#
4148# This code is distributed in the hope that it will be useful, but WITHOUT
4149# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4150# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4151# version 2 for more details (a copy is included in the LICENSE file that
4152# accompanied this code).
4153#
4154# You should have received a copy of the GNU General Public License version
4155# 2 along with this work; if not, write to the Free Software Foundation,
4156# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4157#
4158# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4159# or visit www.oracle.com if you need additional information or have any
4160# questions.
4161#
4162
4163
4164
4165
4166
4167
4168
4169
4170#
4171# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4172# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4173#
4174# This code is free software; you can redistribute it and/or modify it
4175# under the terms of the GNU General Public License version 2 only, as
4176# published by the Free Software Foundation.  Oracle designates this
4177# particular file as subject to the "Classpath" exception as provided
4178# by Oracle in the LICENSE file that accompanied this code.
4179#
4180# This code is distributed in the hope that it will be useful, but WITHOUT
4181# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4182# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4183# version 2 for more details (a copy is included in the LICENSE file that
4184# accompanied this code).
4185#
4186# You should have received a copy of the GNU General Public License version
4187# 2 along with this work; if not, write to the Free Software Foundation,
4188# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4189#
4190# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4191# or visit www.oracle.com if you need additional information or have any
4192# questions.
4193#
4194
4195########################################################################
4196# This file is responsible for detecting, verifying and setting up the
4197# toolchain, i.e. the compiler, linker and related utilities. It will setup
4198# proper paths to the binaries, but it will not setup any flags.
4199#
4200# The binaries used is determined by the toolchain type, which is the family of
4201# compilers and related tools that are used.
4202########################################################################
4203
4204
4205# All valid toolchains, regardless of platform (used by help.m4)
4206VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4207
4208# These toolchains are valid on different platforms
4209VALID_TOOLCHAINS_linux="gcc clang"
4210VALID_TOOLCHAINS_solaris="solstudio"
4211VALID_TOOLCHAINS_macosx="gcc clang"
4212VALID_TOOLCHAINS_aix="xlc"
4213VALID_TOOLCHAINS_windows="microsoft"
4214
4215# Toolchain descriptions
4216TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4217TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4218TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4219TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4220TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4221
4222# Setup a number of variables describing how native output files are
4223# named on this platform/toolchain.
4224
4225
4226# Determine which toolchain type to use, and make sure it is valid for this
4227# platform. Setup various information about the selected toolchain.
4228
4229
4230# Before we start detecting the toolchain executables, we might need some
4231# special setup, e.g. additional paths etc.
4232
4233
4234# Restore path, etc
4235
4236
4237# Check if a compiler is of the toolchain type we expect, and save the version
4238# information from it. If the compiler does not match the expected type,
4239# this function will abort using AC_MSG_ERROR. If it matches, the version will
4240# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4241# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4242#
4243# $1 = compiler to test (CC or CXX)
4244# $2 = human readable name of compiler (C or C++)
4245
4246
4247# Try to locate the given C or C++ compiler in the path, or otherwise.
4248#
4249# $1 = compiler to test (CC or CXX)
4250# $2 = human readable name of compiler (C or C++)
4251# $3 = list of compiler names to search for
4252
4253
4254# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4255# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4256# archiver (AR). Verify that the compilers are correct according to the
4257# toolchain type.
4258
4259
4260# Setup additional tools that is considered a part of the toolchain, but not the
4261# core part. Many of these are highly platform-specific and do not exist,
4262# and/or are not needed on all platforms.
4263
4264
4265# Setup the build tools (i.e, the compiler and linker used to build programs
4266# that should be run on the build platform, not the target platform, as a build
4267# helper). Since the non-cross-compile case uses the normal, target compilers
4268# for this, we can only do this after these have been setup.
4269
4270
4271# Setup legacy variables that are still needed as alternative ways to refer to
4272# parts of the toolchain.
4273
4274
4275# Do some additional checks on the detected tools.
4276
4277
4278# Setup the JTReg Regression Test Harness.
4279
4280
4281#
4282# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4283# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4284#
4285# This code is free software; you can redistribute it and/or modify it
4286# under the terms of the GNU General Public License version 2 only, as
4287# published by the Free Software Foundation.  Oracle designates this
4288# particular file as subject to the "Classpath" exception as provided
4289# by Oracle in the LICENSE file that accompanied this code.
4290#
4291# This code is distributed in the hope that it will be useful, but WITHOUT
4292# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4293# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4294# version 2 for more details (a copy is included in the LICENSE file that
4295# accompanied this code).
4296#
4297# You should have received a copy of the GNU General Public License version
4298# 2 along with this work; if not, write to the Free Software Foundation,
4299# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4300#
4301# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4302# or visit www.oracle.com if you need additional information or have any
4303# questions.
4304#
4305
4306
4307
4308
4309
4310
4311
4312# Check if the VS env variables were setup prior to running configure.
4313# If not, then find vcvarsall.bat and run it automatically, and integrate
4314# the set env variables into the spec file.
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326# This line needs to be here, verbatim, after all includes and the dummy hook
4327# definitions. It is replaced with custom functionality when building
4328# custom sources.
4329#CUSTOM_AUTOCONF_INCLUDE
4330
4331# Do not change or remove the following line, it is needed for consistency checks:
4332DATE_WHEN_GENERATED=1417630847
4333
4334###############################################################################
4335#
4336# Initialization / Boot-strapping
4337#
4338# The bootstrapping process needs to solve the "chicken or the egg" problem,
4339# thus it jumps back and forth, each time gaining something needed later on.
4340#
4341###############################################################################
4342
4343# If we are requested to print additional help, do that and then exit.
4344# This must be the very first call.
4345
4346  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4347    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4348    $PRINTF "Which are valid to use depends on the build platform.\n"
4349    for toolchain in $VALID_TOOLCHAINS_all; do
4350      # Use indirect variable referencing
4351      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4352      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4353      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4354    done
4355
4356    # And now exit directly
4357    exit 0
4358  fi
4359
4360
4361# Basic initialization that must happen first of all in the normal process.
4362
4363  # Save the original command line. This is passed to us by the wrapper configure script.
4364
4365  DATE_WHEN_CONFIGURED=`LANG=C date`
4366
4367  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4368$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4369  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4370$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4371
4372
4373  # Start with tools that do not need have cross compilation support
4374  # and can be expected to be found in the default PATH. These tools are
4375  # used by configure. Nor are these tools expected to be found in the
4376  # devkit from the builddeps server either, since they are
4377  # needed to download the devkit.
4378
4379  # First are all the simple required tools.
4380
4381
4382
4383  # Publish this variable in the help.
4384
4385
4386  if test "x$BASENAME" = x; then
4387    # The variable is not set by user, try to locate tool using the code snippet
4388    for ac_prog in basename
4389do
4390  # Extract the first word of "$ac_prog", so it can be a program name with args.
4391set dummy $ac_prog; ac_word=$2
4392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4393$as_echo_n "checking for $ac_word... " >&6; }
4394if ${ac_cv_path_BASENAME+:} false; then :
4395  $as_echo_n "(cached) " >&6
4396else
4397  case $BASENAME in
4398  [\\/]* | ?:[\\/]*)
4399  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4400  ;;
4401  *)
4402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4403for as_dir in $PATH
4404do
4405  IFS=$as_save_IFS
4406  test -z "$as_dir" && as_dir=.
4407    for ac_exec_ext in '' $ac_executable_extensions; do
4408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4409    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4411    break 2
4412  fi
4413done
4414  done
4415IFS=$as_save_IFS
4416
4417  ;;
4418esac
4419fi
4420BASENAME=$ac_cv_path_BASENAME
4421if test -n "$BASENAME"; then
4422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4423$as_echo "$BASENAME" >&6; }
4424else
4425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4426$as_echo "no" >&6; }
4427fi
4428
4429
4430  test -n "$BASENAME" && break
4431done
4432
4433  else
4434    # The variable is set, but is it from the command line or the environment?
4435
4436    # Try to remove the string !BASENAME! from our list.
4437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4439      # If it failed, the variable was not from the command line. Ignore it,
4440      # but warn the user (except for BASH, which is always set by the calling BASH).
4441      if test "xBASENAME" != xBASH; then
4442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4443$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4444      fi
4445      # Try to locate tool using the code snippet
4446      for ac_prog in basename
4447do
4448  # Extract the first word of "$ac_prog", so it can be a program name with args.
4449set dummy $ac_prog; ac_word=$2
4450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4451$as_echo_n "checking for $ac_word... " >&6; }
4452if ${ac_cv_path_BASENAME+:} false; then :
4453  $as_echo_n "(cached) " >&6
4454else
4455  case $BASENAME in
4456  [\\/]* | ?:[\\/]*)
4457  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4458  ;;
4459  *)
4460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4461for as_dir in $PATH
4462do
4463  IFS=$as_save_IFS
4464  test -z "$as_dir" && as_dir=.
4465    for ac_exec_ext in '' $ac_executable_extensions; do
4466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4467    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4469    break 2
4470  fi
4471done
4472  done
4473IFS=$as_save_IFS
4474
4475  ;;
4476esac
4477fi
4478BASENAME=$ac_cv_path_BASENAME
4479if test -n "$BASENAME"; then
4480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4481$as_echo "$BASENAME" >&6; }
4482else
4483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4484$as_echo "no" >&6; }
4485fi
4486
4487
4488  test -n "$BASENAME" && break
4489done
4490
4491    else
4492      # If it succeeded, then it was overridden by the user. We will use it
4493      # for the tool.
4494
4495      # First remove it from the list of overridden variables, so we can test
4496      # for unknown variables in the end.
4497      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4498
4499      # Check if the provided tool contains a complete path.
4500      tool_specified="$BASENAME"
4501      tool_basename="${tool_specified##*/}"
4502      if test "x$tool_basename" = "x$tool_specified"; then
4503        # A command without a complete path is provided, search $PATH.
4504        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4505$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4506        # Extract the first word of "$tool_basename", so it can be a program name with args.
4507set dummy $tool_basename; ac_word=$2
4508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4509$as_echo_n "checking for $ac_word... " >&6; }
4510if ${ac_cv_path_BASENAME+:} false; then :
4511  $as_echo_n "(cached) " >&6
4512else
4513  case $BASENAME in
4514  [\\/]* | ?:[\\/]*)
4515  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4516  ;;
4517  *)
4518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4519for as_dir in $PATH
4520do
4521  IFS=$as_save_IFS
4522  test -z "$as_dir" && as_dir=.
4523    for ac_exec_ext in '' $ac_executable_extensions; do
4524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4525    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4527    break 2
4528  fi
4529done
4530  done
4531IFS=$as_save_IFS
4532
4533  ;;
4534esac
4535fi
4536BASENAME=$ac_cv_path_BASENAME
4537if test -n "$BASENAME"; then
4538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4539$as_echo "$BASENAME" >&6; }
4540else
4541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4542$as_echo "no" >&6; }
4543fi
4544
4545
4546        if test "x$BASENAME" = x; then
4547          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4548        fi
4549      else
4550        # Otherwise we believe it is a complete path. Use it as it is.
4551        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4552$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4553        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4554$as_echo_n "checking for BASENAME... " >&6; }
4555        if test ! -x "$tool_specified"; then
4556          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4557$as_echo "not found" >&6; }
4558          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4559        fi
4560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4561$as_echo "$tool_specified" >&6; }
4562      fi
4563    fi
4564  fi
4565
4566
4567
4568  if test "x$BASENAME" = x; then
4569    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4570  fi
4571
4572
4573
4574
4575
4576  # Publish this variable in the help.
4577
4578
4579  if test "x$BASH" = x; then
4580    # The variable is not set by user, try to locate tool using the code snippet
4581    for ac_prog in bash
4582do
4583  # Extract the first word of "$ac_prog", so it can be a program name with args.
4584set dummy $ac_prog; ac_word=$2
4585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4586$as_echo_n "checking for $ac_word... " >&6; }
4587if ${ac_cv_path_BASH+:} false; then :
4588  $as_echo_n "(cached) " >&6
4589else
4590  case $BASH in
4591  [\\/]* | ?:[\\/]*)
4592  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4593  ;;
4594  *)
4595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4596for as_dir in $PATH
4597do
4598  IFS=$as_save_IFS
4599  test -z "$as_dir" && as_dir=.
4600    for ac_exec_ext in '' $ac_executable_extensions; do
4601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4602    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4604    break 2
4605  fi
4606done
4607  done
4608IFS=$as_save_IFS
4609
4610  ;;
4611esac
4612fi
4613BASH=$ac_cv_path_BASH
4614if test -n "$BASH"; then
4615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4616$as_echo "$BASH" >&6; }
4617else
4618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4619$as_echo "no" >&6; }
4620fi
4621
4622
4623  test -n "$BASH" && break
4624done
4625
4626  else
4627    # The variable is set, but is it from the command line or the environment?
4628
4629    # Try to remove the string !BASH! from our list.
4630    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4631    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4632      # If it failed, the variable was not from the command line. Ignore it,
4633      # but warn the user (except for BASH, which is always set by the calling BASH).
4634      if test "xBASH" != xBASH; then
4635        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4636$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4637      fi
4638      # Try to locate tool using the code snippet
4639      for ac_prog in bash
4640do
4641  # Extract the first word of "$ac_prog", so it can be a program name with args.
4642set dummy $ac_prog; ac_word=$2
4643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4644$as_echo_n "checking for $ac_word... " >&6; }
4645if ${ac_cv_path_BASH+:} false; then :
4646  $as_echo_n "(cached) " >&6
4647else
4648  case $BASH in
4649  [\\/]* | ?:[\\/]*)
4650  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4651  ;;
4652  *)
4653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4654for as_dir in $PATH
4655do
4656  IFS=$as_save_IFS
4657  test -z "$as_dir" && as_dir=.
4658    for ac_exec_ext in '' $ac_executable_extensions; do
4659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4660    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4662    break 2
4663  fi
4664done
4665  done
4666IFS=$as_save_IFS
4667
4668  ;;
4669esac
4670fi
4671BASH=$ac_cv_path_BASH
4672if test -n "$BASH"; then
4673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4674$as_echo "$BASH" >&6; }
4675else
4676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4677$as_echo "no" >&6; }
4678fi
4679
4680
4681  test -n "$BASH" && break
4682done
4683
4684    else
4685      # If it succeeded, then it was overridden by the user. We will use it
4686      # for the tool.
4687
4688      # First remove it from the list of overridden variables, so we can test
4689      # for unknown variables in the end.
4690      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4691
4692      # Check if the provided tool contains a complete path.
4693      tool_specified="$BASH"
4694      tool_basename="${tool_specified##*/}"
4695      if test "x$tool_basename" = "x$tool_specified"; then
4696        # A command without a complete path is provided, search $PATH.
4697        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4698$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4699        # Extract the first word of "$tool_basename", so it can be a program name with args.
4700set dummy $tool_basename; ac_word=$2
4701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4702$as_echo_n "checking for $ac_word... " >&6; }
4703if ${ac_cv_path_BASH+:} false; then :
4704  $as_echo_n "(cached) " >&6
4705else
4706  case $BASH in
4707  [\\/]* | ?:[\\/]*)
4708  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4709  ;;
4710  *)
4711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4712for as_dir in $PATH
4713do
4714  IFS=$as_save_IFS
4715  test -z "$as_dir" && as_dir=.
4716    for ac_exec_ext in '' $ac_executable_extensions; do
4717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4718    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4720    break 2
4721  fi
4722done
4723  done
4724IFS=$as_save_IFS
4725
4726  ;;
4727esac
4728fi
4729BASH=$ac_cv_path_BASH
4730if test -n "$BASH"; then
4731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4732$as_echo "$BASH" >&6; }
4733else
4734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4735$as_echo "no" >&6; }
4736fi
4737
4738
4739        if test "x$BASH" = x; then
4740          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4741        fi
4742      else
4743        # Otherwise we believe it is a complete path. Use it as it is.
4744        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4745$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4746        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4747$as_echo_n "checking for BASH... " >&6; }
4748        if test ! -x "$tool_specified"; then
4749          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4750$as_echo "not found" >&6; }
4751          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4752        fi
4753        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4754$as_echo "$tool_specified" >&6; }
4755      fi
4756    fi
4757  fi
4758
4759
4760
4761  if test "x$BASH" = x; then
4762    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4763  fi
4764
4765
4766
4767
4768
4769  # Publish this variable in the help.
4770
4771
4772  if test "x$CAT" = x; then
4773    # The variable is not set by user, try to locate tool using the code snippet
4774    for ac_prog in cat
4775do
4776  # Extract the first word of "$ac_prog", so it can be a program name with args.
4777set dummy $ac_prog; ac_word=$2
4778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4779$as_echo_n "checking for $ac_word... " >&6; }
4780if ${ac_cv_path_CAT+:} false; then :
4781  $as_echo_n "(cached) " >&6
4782else
4783  case $CAT in
4784  [\\/]* | ?:[\\/]*)
4785  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4786  ;;
4787  *)
4788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4789for as_dir in $PATH
4790do
4791  IFS=$as_save_IFS
4792  test -z "$as_dir" && as_dir=.
4793    for ac_exec_ext in '' $ac_executable_extensions; do
4794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4795    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4797    break 2
4798  fi
4799done
4800  done
4801IFS=$as_save_IFS
4802
4803  ;;
4804esac
4805fi
4806CAT=$ac_cv_path_CAT
4807if test -n "$CAT"; then
4808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4809$as_echo "$CAT" >&6; }
4810else
4811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4812$as_echo "no" >&6; }
4813fi
4814
4815
4816  test -n "$CAT" && break
4817done
4818
4819  else
4820    # The variable is set, but is it from the command line or the environment?
4821
4822    # Try to remove the string !CAT! from our list.
4823    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4824    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4825      # If it failed, the variable was not from the command line. Ignore it,
4826      # but warn the user (except for BASH, which is always set by the calling BASH).
4827      if test "xCAT" != xBASH; then
4828        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4829$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4830      fi
4831      # Try to locate tool using the code snippet
4832      for ac_prog in cat
4833do
4834  # Extract the first word of "$ac_prog", so it can be a program name with args.
4835set dummy $ac_prog; ac_word=$2
4836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4837$as_echo_n "checking for $ac_word... " >&6; }
4838if ${ac_cv_path_CAT+:} false; then :
4839  $as_echo_n "(cached) " >&6
4840else
4841  case $CAT in
4842  [\\/]* | ?:[\\/]*)
4843  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4844  ;;
4845  *)
4846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4847for as_dir in $PATH
4848do
4849  IFS=$as_save_IFS
4850  test -z "$as_dir" && as_dir=.
4851    for ac_exec_ext in '' $ac_executable_extensions; do
4852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4853    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4855    break 2
4856  fi
4857done
4858  done
4859IFS=$as_save_IFS
4860
4861  ;;
4862esac
4863fi
4864CAT=$ac_cv_path_CAT
4865if test -n "$CAT"; then
4866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4867$as_echo "$CAT" >&6; }
4868else
4869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4870$as_echo "no" >&6; }
4871fi
4872
4873
4874  test -n "$CAT" && break
4875done
4876
4877    else
4878      # If it succeeded, then it was overridden by the user. We will use it
4879      # for the tool.
4880
4881      # First remove it from the list of overridden variables, so we can test
4882      # for unknown variables in the end.
4883      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4884
4885      # Check if the provided tool contains a complete path.
4886      tool_specified="$CAT"
4887      tool_basename="${tool_specified##*/}"
4888      if test "x$tool_basename" = "x$tool_specified"; then
4889        # A command without a complete path is provided, search $PATH.
4890        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4891$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4892        # Extract the first word of "$tool_basename", so it can be a program name with args.
4893set dummy $tool_basename; ac_word=$2
4894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4895$as_echo_n "checking for $ac_word... " >&6; }
4896if ${ac_cv_path_CAT+:} false; then :
4897  $as_echo_n "(cached) " >&6
4898else
4899  case $CAT in
4900  [\\/]* | ?:[\\/]*)
4901  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4902  ;;
4903  *)
4904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4905for as_dir in $PATH
4906do
4907  IFS=$as_save_IFS
4908  test -z "$as_dir" && as_dir=.
4909    for ac_exec_ext in '' $ac_executable_extensions; do
4910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4911    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4913    break 2
4914  fi
4915done
4916  done
4917IFS=$as_save_IFS
4918
4919  ;;
4920esac
4921fi
4922CAT=$ac_cv_path_CAT
4923if test -n "$CAT"; then
4924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4925$as_echo "$CAT" >&6; }
4926else
4927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4928$as_echo "no" >&6; }
4929fi
4930
4931
4932        if test "x$CAT" = x; then
4933          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4934        fi
4935      else
4936        # Otherwise we believe it is a complete path. Use it as it is.
4937        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4938$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4939        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4940$as_echo_n "checking for CAT... " >&6; }
4941        if test ! -x "$tool_specified"; then
4942          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4943$as_echo "not found" >&6; }
4944          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4945        fi
4946        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4947$as_echo "$tool_specified" >&6; }
4948      fi
4949    fi
4950  fi
4951
4952
4953
4954  if test "x$CAT" = x; then
4955    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4956  fi
4957
4958
4959
4960
4961
4962  # Publish this variable in the help.
4963
4964
4965  if test "x$CHMOD" = x; then
4966    # The variable is not set by user, try to locate tool using the code snippet
4967    for ac_prog in chmod
4968do
4969  # Extract the first word of "$ac_prog", so it can be a program name with args.
4970set dummy $ac_prog; ac_word=$2
4971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4972$as_echo_n "checking for $ac_word... " >&6; }
4973if ${ac_cv_path_CHMOD+:} false; then :
4974  $as_echo_n "(cached) " >&6
4975else
4976  case $CHMOD in
4977  [\\/]* | ?:[\\/]*)
4978  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4979  ;;
4980  *)
4981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4982for as_dir in $PATH
4983do
4984  IFS=$as_save_IFS
4985  test -z "$as_dir" && as_dir=.
4986    for ac_exec_ext in '' $ac_executable_extensions; do
4987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4988    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4990    break 2
4991  fi
4992done
4993  done
4994IFS=$as_save_IFS
4995
4996  ;;
4997esac
4998fi
4999CHMOD=$ac_cv_path_CHMOD
5000if test -n "$CHMOD"; then
5001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5002$as_echo "$CHMOD" >&6; }
5003else
5004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5005$as_echo "no" >&6; }
5006fi
5007
5008
5009  test -n "$CHMOD" && break
5010done
5011
5012  else
5013    # The variable is set, but is it from the command line or the environment?
5014
5015    # Try to remove the string !CHMOD! from our list.
5016    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5017    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5018      # If it failed, the variable was not from the command line. Ignore it,
5019      # but warn the user (except for BASH, which is always set by the calling BASH).
5020      if test "xCHMOD" != xBASH; then
5021        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5022$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5023      fi
5024      # Try to locate tool using the code snippet
5025      for ac_prog in chmod
5026do
5027  # Extract the first word of "$ac_prog", so it can be a program name with args.
5028set dummy $ac_prog; ac_word=$2
5029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5030$as_echo_n "checking for $ac_word... " >&6; }
5031if ${ac_cv_path_CHMOD+:} false; then :
5032  $as_echo_n "(cached) " >&6
5033else
5034  case $CHMOD in
5035  [\\/]* | ?:[\\/]*)
5036  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5037  ;;
5038  *)
5039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5040for as_dir in $PATH
5041do
5042  IFS=$as_save_IFS
5043  test -z "$as_dir" && as_dir=.
5044    for ac_exec_ext in '' $ac_executable_extensions; do
5045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5046    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5048    break 2
5049  fi
5050done
5051  done
5052IFS=$as_save_IFS
5053
5054  ;;
5055esac
5056fi
5057CHMOD=$ac_cv_path_CHMOD
5058if test -n "$CHMOD"; then
5059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5060$as_echo "$CHMOD" >&6; }
5061else
5062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5063$as_echo "no" >&6; }
5064fi
5065
5066
5067  test -n "$CHMOD" && break
5068done
5069
5070    else
5071      # If it succeeded, then it was overridden by the user. We will use it
5072      # for the tool.
5073
5074      # First remove it from the list of overridden variables, so we can test
5075      # for unknown variables in the end.
5076      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5077
5078      # Check if the provided tool contains a complete path.
5079      tool_specified="$CHMOD"
5080      tool_basename="${tool_specified##*/}"
5081      if test "x$tool_basename" = "x$tool_specified"; then
5082        # A command without a complete path is provided, search $PATH.
5083        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5084$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5085        # Extract the first word of "$tool_basename", so it can be a program name with args.
5086set dummy $tool_basename; ac_word=$2
5087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5088$as_echo_n "checking for $ac_word... " >&6; }
5089if ${ac_cv_path_CHMOD+:} false; then :
5090  $as_echo_n "(cached) " >&6
5091else
5092  case $CHMOD in
5093  [\\/]* | ?:[\\/]*)
5094  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5095  ;;
5096  *)
5097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5098for as_dir in $PATH
5099do
5100  IFS=$as_save_IFS
5101  test -z "$as_dir" && as_dir=.
5102    for ac_exec_ext in '' $ac_executable_extensions; do
5103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5104    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5106    break 2
5107  fi
5108done
5109  done
5110IFS=$as_save_IFS
5111
5112  ;;
5113esac
5114fi
5115CHMOD=$ac_cv_path_CHMOD
5116if test -n "$CHMOD"; then
5117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5118$as_echo "$CHMOD" >&6; }
5119else
5120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5121$as_echo "no" >&6; }
5122fi
5123
5124
5125        if test "x$CHMOD" = x; then
5126          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5127        fi
5128      else
5129        # Otherwise we believe it is a complete path. Use it as it is.
5130        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5131$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5132        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5133$as_echo_n "checking for CHMOD... " >&6; }
5134        if test ! -x "$tool_specified"; then
5135          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5136$as_echo "not found" >&6; }
5137          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5138        fi
5139        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5140$as_echo "$tool_specified" >&6; }
5141      fi
5142    fi
5143  fi
5144
5145
5146
5147  if test "x$CHMOD" = x; then
5148    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5149  fi
5150
5151
5152
5153
5154
5155  # Publish this variable in the help.
5156
5157
5158  if test "x$CMP" = x; then
5159    # The variable is not set by user, try to locate tool using the code snippet
5160    for ac_prog in cmp
5161do
5162  # Extract the first word of "$ac_prog", so it can be a program name with args.
5163set dummy $ac_prog; ac_word=$2
5164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5165$as_echo_n "checking for $ac_word... " >&6; }
5166if ${ac_cv_path_CMP+:} false; then :
5167  $as_echo_n "(cached) " >&6
5168else
5169  case $CMP in
5170  [\\/]* | ?:[\\/]*)
5171  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5172  ;;
5173  *)
5174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5175for as_dir in $PATH
5176do
5177  IFS=$as_save_IFS
5178  test -z "$as_dir" && as_dir=.
5179    for ac_exec_ext in '' $ac_executable_extensions; do
5180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5181    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5183    break 2
5184  fi
5185done
5186  done
5187IFS=$as_save_IFS
5188
5189  ;;
5190esac
5191fi
5192CMP=$ac_cv_path_CMP
5193if test -n "$CMP"; then
5194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5195$as_echo "$CMP" >&6; }
5196else
5197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5198$as_echo "no" >&6; }
5199fi
5200
5201
5202  test -n "$CMP" && break
5203done
5204
5205  else
5206    # The variable is set, but is it from the command line or the environment?
5207
5208    # Try to remove the string !CMP! from our list.
5209    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5210    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5211      # If it failed, the variable was not from the command line. Ignore it,
5212      # but warn the user (except for BASH, which is always set by the calling BASH).
5213      if test "xCMP" != xBASH; then
5214        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5215$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5216      fi
5217      # Try to locate tool using the code snippet
5218      for ac_prog in cmp
5219do
5220  # Extract the first word of "$ac_prog", so it can be a program name with args.
5221set dummy $ac_prog; ac_word=$2
5222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5223$as_echo_n "checking for $ac_word... " >&6; }
5224if ${ac_cv_path_CMP+:} false; then :
5225  $as_echo_n "(cached) " >&6
5226else
5227  case $CMP in
5228  [\\/]* | ?:[\\/]*)
5229  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5230  ;;
5231  *)
5232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5233for as_dir in $PATH
5234do
5235  IFS=$as_save_IFS
5236  test -z "$as_dir" && as_dir=.
5237    for ac_exec_ext in '' $ac_executable_extensions; do
5238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5239    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5241    break 2
5242  fi
5243done
5244  done
5245IFS=$as_save_IFS
5246
5247  ;;
5248esac
5249fi
5250CMP=$ac_cv_path_CMP
5251if test -n "$CMP"; then
5252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5253$as_echo "$CMP" >&6; }
5254else
5255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5256$as_echo "no" >&6; }
5257fi
5258
5259
5260  test -n "$CMP" && break
5261done
5262
5263    else
5264      # If it succeeded, then it was overridden by the user. We will use it
5265      # for the tool.
5266
5267      # First remove it from the list of overridden variables, so we can test
5268      # for unknown variables in the end.
5269      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5270
5271      # Check if the provided tool contains a complete path.
5272      tool_specified="$CMP"
5273      tool_basename="${tool_specified##*/}"
5274      if test "x$tool_basename" = "x$tool_specified"; then
5275        # A command without a complete path is provided, search $PATH.
5276        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5277$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5278        # Extract the first word of "$tool_basename", so it can be a program name with args.
5279set dummy $tool_basename; ac_word=$2
5280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5281$as_echo_n "checking for $ac_word... " >&6; }
5282if ${ac_cv_path_CMP+:} false; then :
5283  $as_echo_n "(cached) " >&6
5284else
5285  case $CMP in
5286  [\\/]* | ?:[\\/]*)
5287  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5288  ;;
5289  *)
5290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5291for as_dir in $PATH
5292do
5293  IFS=$as_save_IFS
5294  test -z "$as_dir" && as_dir=.
5295    for ac_exec_ext in '' $ac_executable_extensions; do
5296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5297    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5299    break 2
5300  fi
5301done
5302  done
5303IFS=$as_save_IFS
5304
5305  ;;
5306esac
5307fi
5308CMP=$ac_cv_path_CMP
5309if test -n "$CMP"; then
5310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5311$as_echo "$CMP" >&6; }
5312else
5313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5314$as_echo "no" >&6; }
5315fi
5316
5317
5318        if test "x$CMP" = x; then
5319          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5320        fi
5321      else
5322        # Otherwise we believe it is a complete path. Use it as it is.
5323        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5324$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5325        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5326$as_echo_n "checking for CMP... " >&6; }
5327        if test ! -x "$tool_specified"; then
5328          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5329$as_echo "not found" >&6; }
5330          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5331        fi
5332        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5333$as_echo "$tool_specified" >&6; }
5334      fi
5335    fi
5336  fi
5337
5338
5339
5340  if test "x$CMP" = x; then
5341    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5342  fi
5343
5344
5345
5346
5347
5348  # Publish this variable in the help.
5349
5350
5351  if test "x$COMM" = x; then
5352    # The variable is not set by user, try to locate tool using the code snippet
5353    for ac_prog in comm
5354do
5355  # Extract the first word of "$ac_prog", so it can be a program name with args.
5356set dummy $ac_prog; ac_word=$2
5357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5358$as_echo_n "checking for $ac_word... " >&6; }
5359if ${ac_cv_path_COMM+:} false; then :
5360  $as_echo_n "(cached) " >&6
5361else
5362  case $COMM in
5363  [\\/]* | ?:[\\/]*)
5364  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5365  ;;
5366  *)
5367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5368for as_dir in $PATH
5369do
5370  IFS=$as_save_IFS
5371  test -z "$as_dir" && as_dir=.
5372    for ac_exec_ext in '' $ac_executable_extensions; do
5373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5374    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5376    break 2
5377  fi
5378done
5379  done
5380IFS=$as_save_IFS
5381
5382  ;;
5383esac
5384fi
5385COMM=$ac_cv_path_COMM
5386if test -n "$COMM"; then
5387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5388$as_echo "$COMM" >&6; }
5389else
5390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5391$as_echo "no" >&6; }
5392fi
5393
5394
5395  test -n "$COMM" && break
5396done
5397
5398  else
5399    # The variable is set, but is it from the command line or the environment?
5400
5401    # Try to remove the string !COMM! from our list.
5402    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5403    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5404      # If it failed, the variable was not from the command line. Ignore it,
5405      # but warn the user (except for BASH, which is always set by the calling BASH).
5406      if test "xCOMM" != xBASH; then
5407        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5408$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5409      fi
5410      # Try to locate tool using the code snippet
5411      for ac_prog in comm
5412do
5413  # Extract the first word of "$ac_prog", so it can be a program name with args.
5414set dummy $ac_prog; ac_word=$2
5415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5416$as_echo_n "checking for $ac_word... " >&6; }
5417if ${ac_cv_path_COMM+:} false; then :
5418  $as_echo_n "(cached) " >&6
5419else
5420  case $COMM in
5421  [\\/]* | ?:[\\/]*)
5422  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5423  ;;
5424  *)
5425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5426for as_dir in $PATH
5427do
5428  IFS=$as_save_IFS
5429  test -z "$as_dir" && as_dir=.
5430    for ac_exec_ext in '' $ac_executable_extensions; do
5431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5432    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5434    break 2
5435  fi
5436done
5437  done
5438IFS=$as_save_IFS
5439
5440  ;;
5441esac
5442fi
5443COMM=$ac_cv_path_COMM
5444if test -n "$COMM"; then
5445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5446$as_echo "$COMM" >&6; }
5447else
5448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5449$as_echo "no" >&6; }
5450fi
5451
5452
5453  test -n "$COMM" && break
5454done
5455
5456    else
5457      # If it succeeded, then it was overridden by the user. We will use it
5458      # for the tool.
5459
5460      # First remove it from the list of overridden variables, so we can test
5461      # for unknown variables in the end.
5462      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5463
5464      # Check if the provided tool contains a complete path.
5465      tool_specified="$COMM"
5466      tool_basename="${tool_specified##*/}"
5467      if test "x$tool_basename" = "x$tool_specified"; then
5468        # A command without a complete path is provided, search $PATH.
5469        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5470$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5471        # Extract the first word of "$tool_basename", so it can be a program name with args.
5472set dummy $tool_basename; ac_word=$2
5473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5474$as_echo_n "checking for $ac_word... " >&6; }
5475if ${ac_cv_path_COMM+:} false; then :
5476  $as_echo_n "(cached) " >&6
5477else
5478  case $COMM in
5479  [\\/]* | ?:[\\/]*)
5480  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5481  ;;
5482  *)
5483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5484for as_dir in $PATH
5485do
5486  IFS=$as_save_IFS
5487  test -z "$as_dir" && as_dir=.
5488    for ac_exec_ext in '' $ac_executable_extensions; do
5489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5490    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5492    break 2
5493  fi
5494done
5495  done
5496IFS=$as_save_IFS
5497
5498  ;;
5499esac
5500fi
5501COMM=$ac_cv_path_COMM
5502if test -n "$COMM"; then
5503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5504$as_echo "$COMM" >&6; }
5505else
5506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5507$as_echo "no" >&6; }
5508fi
5509
5510
5511        if test "x$COMM" = x; then
5512          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5513        fi
5514      else
5515        # Otherwise we believe it is a complete path. Use it as it is.
5516        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5517$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5518        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5519$as_echo_n "checking for COMM... " >&6; }
5520        if test ! -x "$tool_specified"; then
5521          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5522$as_echo "not found" >&6; }
5523          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5524        fi
5525        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5526$as_echo "$tool_specified" >&6; }
5527      fi
5528    fi
5529  fi
5530
5531
5532
5533  if test "x$COMM" = x; then
5534    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5535  fi
5536
5537
5538
5539
5540
5541  # Publish this variable in the help.
5542
5543
5544  if test "x$CP" = x; then
5545    # The variable is not set by user, try to locate tool using the code snippet
5546    for ac_prog in cp
5547do
5548  # Extract the first word of "$ac_prog", so it can be a program name with args.
5549set dummy $ac_prog; ac_word=$2
5550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5551$as_echo_n "checking for $ac_word... " >&6; }
5552if ${ac_cv_path_CP+:} false; then :
5553  $as_echo_n "(cached) " >&6
5554else
5555  case $CP in
5556  [\\/]* | ?:[\\/]*)
5557  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5558  ;;
5559  *)
5560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5561for as_dir in $PATH
5562do
5563  IFS=$as_save_IFS
5564  test -z "$as_dir" && as_dir=.
5565    for ac_exec_ext in '' $ac_executable_extensions; do
5566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5567    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5569    break 2
5570  fi
5571done
5572  done
5573IFS=$as_save_IFS
5574
5575  ;;
5576esac
5577fi
5578CP=$ac_cv_path_CP
5579if test -n "$CP"; then
5580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5581$as_echo "$CP" >&6; }
5582else
5583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5584$as_echo "no" >&6; }
5585fi
5586
5587
5588  test -n "$CP" && break
5589done
5590
5591  else
5592    # The variable is set, but is it from the command line or the environment?
5593
5594    # Try to remove the string !CP! from our list.
5595    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5596    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5597      # If it failed, the variable was not from the command line. Ignore it,
5598      # but warn the user (except for BASH, which is always set by the calling BASH).
5599      if test "xCP" != xBASH; then
5600        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5601$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5602      fi
5603      # Try to locate tool using the code snippet
5604      for ac_prog in cp
5605do
5606  # Extract the first word of "$ac_prog", so it can be a program name with args.
5607set dummy $ac_prog; ac_word=$2
5608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5609$as_echo_n "checking for $ac_word... " >&6; }
5610if ${ac_cv_path_CP+:} false; then :
5611  $as_echo_n "(cached) " >&6
5612else
5613  case $CP in
5614  [\\/]* | ?:[\\/]*)
5615  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5616  ;;
5617  *)
5618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5619for as_dir in $PATH
5620do
5621  IFS=$as_save_IFS
5622  test -z "$as_dir" && as_dir=.
5623    for ac_exec_ext in '' $ac_executable_extensions; do
5624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5625    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5627    break 2
5628  fi
5629done
5630  done
5631IFS=$as_save_IFS
5632
5633  ;;
5634esac
5635fi
5636CP=$ac_cv_path_CP
5637if test -n "$CP"; then
5638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5639$as_echo "$CP" >&6; }
5640else
5641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5642$as_echo "no" >&6; }
5643fi
5644
5645
5646  test -n "$CP" && break
5647done
5648
5649    else
5650      # If it succeeded, then it was overridden by the user. We will use it
5651      # for the tool.
5652
5653      # First remove it from the list of overridden variables, so we can test
5654      # for unknown variables in the end.
5655      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5656
5657      # Check if the provided tool contains a complete path.
5658      tool_specified="$CP"
5659      tool_basename="${tool_specified##*/}"
5660      if test "x$tool_basename" = "x$tool_specified"; then
5661        # A command without a complete path is provided, search $PATH.
5662        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5663$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5664        # Extract the first word of "$tool_basename", so it can be a program name with args.
5665set dummy $tool_basename; ac_word=$2
5666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5667$as_echo_n "checking for $ac_word... " >&6; }
5668if ${ac_cv_path_CP+:} false; then :
5669  $as_echo_n "(cached) " >&6
5670else
5671  case $CP in
5672  [\\/]* | ?:[\\/]*)
5673  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5674  ;;
5675  *)
5676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5677for as_dir in $PATH
5678do
5679  IFS=$as_save_IFS
5680  test -z "$as_dir" && as_dir=.
5681    for ac_exec_ext in '' $ac_executable_extensions; do
5682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5683    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5685    break 2
5686  fi
5687done
5688  done
5689IFS=$as_save_IFS
5690
5691  ;;
5692esac
5693fi
5694CP=$ac_cv_path_CP
5695if test -n "$CP"; then
5696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5697$as_echo "$CP" >&6; }
5698else
5699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5700$as_echo "no" >&6; }
5701fi
5702
5703
5704        if test "x$CP" = x; then
5705          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5706        fi
5707      else
5708        # Otherwise we believe it is a complete path. Use it as it is.
5709        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5710$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5711        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5712$as_echo_n "checking for CP... " >&6; }
5713        if test ! -x "$tool_specified"; then
5714          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5715$as_echo "not found" >&6; }
5716          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5717        fi
5718        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5719$as_echo "$tool_specified" >&6; }
5720      fi
5721    fi
5722  fi
5723
5724
5725
5726  if test "x$CP" = x; then
5727    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5728  fi
5729
5730
5731
5732
5733
5734  # Publish this variable in the help.
5735
5736
5737  if test "x$CUT" = x; then
5738    # The variable is not set by user, try to locate tool using the code snippet
5739    for ac_prog in cut
5740do
5741  # Extract the first word of "$ac_prog", so it can be a program name with args.
5742set dummy $ac_prog; ac_word=$2
5743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5744$as_echo_n "checking for $ac_word... " >&6; }
5745if ${ac_cv_path_CUT+:} false; then :
5746  $as_echo_n "(cached) " >&6
5747else
5748  case $CUT in
5749  [\\/]* | ?:[\\/]*)
5750  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5751  ;;
5752  *)
5753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5754for as_dir in $PATH
5755do
5756  IFS=$as_save_IFS
5757  test -z "$as_dir" && as_dir=.
5758    for ac_exec_ext in '' $ac_executable_extensions; do
5759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5760    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5762    break 2
5763  fi
5764done
5765  done
5766IFS=$as_save_IFS
5767
5768  ;;
5769esac
5770fi
5771CUT=$ac_cv_path_CUT
5772if test -n "$CUT"; then
5773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5774$as_echo "$CUT" >&6; }
5775else
5776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5777$as_echo "no" >&6; }
5778fi
5779
5780
5781  test -n "$CUT" && break
5782done
5783
5784  else
5785    # The variable is set, but is it from the command line or the environment?
5786
5787    # Try to remove the string !CUT! from our list.
5788    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5789    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5790      # If it failed, the variable was not from the command line. Ignore it,
5791      # but warn the user (except for BASH, which is always set by the calling BASH).
5792      if test "xCUT" != xBASH; then
5793        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5794$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5795      fi
5796      # Try to locate tool using the code snippet
5797      for ac_prog in cut
5798do
5799  # Extract the first word of "$ac_prog", so it can be a program name with args.
5800set dummy $ac_prog; ac_word=$2
5801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5802$as_echo_n "checking for $ac_word... " >&6; }
5803if ${ac_cv_path_CUT+:} false; then :
5804  $as_echo_n "(cached) " >&6
5805else
5806  case $CUT in
5807  [\\/]* | ?:[\\/]*)
5808  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5809  ;;
5810  *)
5811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5812for as_dir in $PATH
5813do
5814  IFS=$as_save_IFS
5815  test -z "$as_dir" && as_dir=.
5816    for ac_exec_ext in '' $ac_executable_extensions; do
5817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5818    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5820    break 2
5821  fi
5822done
5823  done
5824IFS=$as_save_IFS
5825
5826  ;;
5827esac
5828fi
5829CUT=$ac_cv_path_CUT
5830if test -n "$CUT"; then
5831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5832$as_echo "$CUT" >&6; }
5833else
5834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5835$as_echo "no" >&6; }
5836fi
5837
5838
5839  test -n "$CUT" && break
5840done
5841
5842    else
5843      # If it succeeded, then it was overridden by the user. We will use it
5844      # for the tool.
5845
5846      # First remove it from the list of overridden variables, so we can test
5847      # for unknown variables in the end.
5848      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5849
5850      # Check if the provided tool contains a complete path.
5851      tool_specified="$CUT"
5852      tool_basename="${tool_specified##*/}"
5853      if test "x$tool_basename" = "x$tool_specified"; then
5854        # A command without a complete path is provided, search $PATH.
5855        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5856$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5857        # Extract the first word of "$tool_basename", so it can be a program name with args.
5858set dummy $tool_basename; ac_word=$2
5859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5860$as_echo_n "checking for $ac_word... " >&6; }
5861if ${ac_cv_path_CUT+:} false; then :
5862  $as_echo_n "(cached) " >&6
5863else
5864  case $CUT in
5865  [\\/]* | ?:[\\/]*)
5866  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5867  ;;
5868  *)
5869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5870for as_dir in $PATH
5871do
5872  IFS=$as_save_IFS
5873  test -z "$as_dir" && as_dir=.
5874    for ac_exec_ext in '' $ac_executable_extensions; do
5875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5876    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5878    break 2
5879  fi
5880done
5881  done
5882IFS=$as_save_IFS
5883
5884  ;;
5885esac
5886fi
5887CUT=$ac_cv_path_CUT
5888if test -n "$CUT"; then
5889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5890$as_echo "$CUT" >&6; }
5891else
5892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5893$as_echo "no" >&6; }
5894fi
5895
5896
5897        if test "x$CUT" = x; then
5898          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5899        fi
5900      else
5901        # Otherwise we believe it is a complete path. Use it as it is.
5902        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5903$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5904        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5905$as_echo_n "checking for CUT... " >&6; }
5906        if test ! -x "$tool_specified"; then
5907          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5908$as_echo "not found" >&6; }
5909          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5910        fi
5911        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5912$as_echo "$tool_specified" >&6; }
5913      fi
5914    fi
5915  fi
5916
5917
5918
5919  if test "x$CUT" = x; then
5920    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5921  fi
5922
5923
5924
5925
5926
5927  # Publish this variable in the help.
5928
5929
5930  if test "x$DATE" = x; then
5931    # The variable is not set by user, try to locate tool using the code snippet
5932    for ac_prog in date
5933do
5934  # Extract the first word of "$ac_prog", so it can be a program name with args.
5935set dummy $ac_prog; ac_word=$2
5936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5937$as_echo_n "checking for $ac_word... " >&6; }
5938if ${ac_cv_path_DATE+:} false; then :
5939  $as_echo_n "(cached) " >&6
5940else
5941  case $DATE in
5942  [\\/]* | ?:[\\/]*)
5943  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5944  ;;
5945  *)
5946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5947for as_dir in $PATH
5948do
5949  IFS=$as_save_IFS
5950  test -z "$as_dir" && as_dir=.
5951    for ac_exec_ext in '' $ac_executable_extensions; do
5952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5953    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5955    break 2
5956  fi
5957done
5958  done
5959IFS=$as_save_IFS
5960
5961  ;;
5962esac
5963fi
5964DATE=$ac_cv_path_DATE
5965if test -n "$DATE"; then
5966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5967$as_echo "$DATE" >&6; }
5968else
5969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5970$as_echo "no" >&6; }
5971fi
5972
5973
5974  test -n "$DATE" && break
5975done
5976
5977  else
5978    # The variable is set, but is it from the command line or the environment?
5979
5980    # Try to remove the string !DATE! from our list.
5981    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
5982    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5983      # If it failed, the variable was not from the command line. Ignore it,
5984      # but warn the user (except for BASH, which is always set by the calling BASH).
5985      if test "xDATE" != xBASH; then
5986        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
5987$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
5988      fi
5989      # Try to locate tool using the code snippet
5990      for ac_prog in date
5991do
5992  # Extract the first word of "$ac_prog", so it can be a program name with args.
5993set dummy $ac_prog; ac_word=$2
5994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5995$as_echo_n "checking for $ac_word... " >&6; }
5996if ${ac_cv_path_DATE+:} false; then :
5997  $as_echo_n "(cached) " >&6
5998else
5999  case $DATE in
6000  [\\/]* | ?:[\\/]*)
6001  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6002  ;;
6003  *)
6004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6005for as_dir in $PATH
6006do
6007  IFS=$as_save_IFS
6008  test -z "$as_dir" && as_dir=.
6009    for ac_exec_ext in '' $ac_executable_extensions; do
6010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6011    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6013    break 2
6014  fi
6015done
6016  done
6017IFS=$as_save_IFS
6018
6019  ;;
6020esac
6021fi
6022DATE=$ac_cv_path_DATE
6023if test -n "$DATE"; then
6024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6025$as_echo "$DATE" >&6; }
6026else
6027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6028$as_echo "no" >&6; }
6029fi
6030
6031
6032  test -n "$DATE" && break
6033done
6034
6035    else
6036      # If it succeeded, then it was overridden by the user. We will use it
6037      # for the tool.
6038
6039      # First remove it from the list of overridden variables, so we can test
6040      # for unknown variables in the end.
6041      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6042
6043      # Check if the provided tool contains a complete path.
6044      tool_specified="$DATE"
6045      tool_basename="${tool_specified##*/}"
6046      if test "x$tool_basename" = "x$tool_specified"; then
6047        # A command without a complete path is provided, search $PATH.
6048        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6049$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6050        # Extract the first word of "$tool_basename", so it can be a program name with args.
6051set dummy $tool_basename; ac_word=$2
6052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6053$as_echo_n "checking for $ac_word... " >&6; }
6054if ${ac_cv_path_DATE+:} false; then :
6055  $as_echo_n "(cached) " >&6
6056else
6057  case $DATE in
6058  [\\/]* | ?:[\\/]*)
6059  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6060  ;;
6061  *)
6062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6063for as_dir in $PATH
6064do
6065  IFS=$as_save_IFS
6066  test -z "$as_dir" && as_dir=.
6067    for ac_exec_ext in '' $ac_executable_extensions; do
6068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6069    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6071    break 2
6072  fi
6073done
6074  done
6075IFS=$as_save_IFS
6076
6077  ;;
6078esac
6079fi
6080DATE=$ac_cv_path_DATE
6081if test -n "$DATE"; then
6082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6083$as_echo "$DATE" >&6; }
6084else
6085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6086$as_echo "no" >&6; }
6087fi
6088
6089
6090        if test "x$DATE" = x; then
6091          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6092        fi
6093      else
6094        # Otherwise we believe it is a complete path. Use it as it is.
6095        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6096$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6097        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6098$as_echo_n "checking for DATE... " >&6; }
6099        if test ! -x "$tool_specified"; then
6100          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6101$as_echo "not found" >&6; }
6102          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6103        fi
6104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6105$as_echo "$tool_specified" >&6; }
6106      fi
6107    fi
6108  fi
6109
6110
6111
6112  if test "x$DATE" = x; then
6113    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6114  fi
6115
6116
6117
6118
6119
6120  # Publish this variable in the help.
6121
6122
6123  if test "x$DIFF" = x; then
6124    # The variable is not set by user, try to locate tool using the code snippet
6125    for ac_prog in gdiff diff
6126do
6127  # Extract the first word of "$ac_prog", so it can be a program name with args.
6128set dummy $ac_prog; ac_word=$2
6129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6130$as_echo_n "checking for $ac_word... " >&6; }
6131if ${ac_cv_path_DIFF+:} false; then :
6132  $as_echo_n "(cached) " >&6
6133else
6134  case $DIFF in
6135  [\\/]* | ?:[\\/]*)
6136  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6137  ;;
6138  *)
6139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6140for as_dir in $PATH
6141do
6142  IFS=$as_save_IFS
6143  test -z "$as_dir" && as_dir=.
6144    for ac_exec_ext in '' $ac_executable_extensions; do
6145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6146    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6148    break 2
6149  fi
6150done
6151  done
6152IFS=$as_save_IFS
6153
6154  ;;
6155esac
6156fi
6157DIFF=$ac_cv_path_DIFF
6158if test -n "$DIFF"; then
6159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6160$as_echo "$DIFF" >&6; }
6161else
6162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6163$as_echo "no" >&6; }
6164fi
6165
6166
6167  test -n "$DIFF" && break
6168done
6169
6170  else
6171    # The variable is set, but is it from the command line or the environment?
6172
6173    # Try to remove the string !DIFF! from our list.
6174    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6175    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6176      # If it failed, the variable was not from the command line. Ignore it,
6177      # but warn the user (except for BASH, which is always set by the calling BASH).
6178      if test "xDIFF" != xBASH; then
6179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6180$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6181      fi
6182      # Try to locate tool using the code snippet
6183      for ac_prog in gdiff diff
6184do
6185  # Extract the first word of "$ac_prog", so it can be a program name with args.
6186set dummy $ac_prog; ac_word=$2
6187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6188$as_echo_n "checking for $ac_word... " >&6; }
6189if ${ac_cv_path_DIFF+:} false; then :
6190  $as_echo_n "(cached) " >&6
6191else
6192  case $DIFF in
6193  [\\/]* | ?:[\\/]*)
6194  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6195  ;;
6196  *)
6197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6198for as_dir in $PATH
6199do
6200  IFS=$as_save_IFS
6201  test -z "$as_dir" && as_dir=.
6202    for ac_exec_ext in '' $ac_executable_extensions; do
6203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6204    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6206    break 2
6207  fi
6208done
6209  done
6210IFS=$as_save_IFS
6211
6212  ;;
6213esac
6214fi
6215DIFF=$ac_cv_path_DIFF
6216if test -n "$DIFF"; then
6217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6218$as_echo "$DIFF" >&6; }
6219else
6220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6221$as_echo "no" >&6; }
6222fi
6223
6224
6225  test -n "$DIFF" && break
6226done
6227
6228    else
6229      # If it succeeded, then it was overridden by the user. We will use it
6230      # for the tool.
6231
6232      # First remove it from the list of overridden variables, so we can test
6233      # for unknown variables in the end.
6234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6235
6236      # Check if the provided tool contains a complete path.
6237      tool_specified="$DIFF"
6238      tool_basename="${tool_specified##*/}"
6239      if test "x$tool_basename" = "x$tool_specified"; then
6240        # A command without a complete path is provided, search $PATH.
6241        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6242$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6243        # Extract the first word of "$tool_basename", so it can be a program name with args.
6244set dummy $tool_basename; ac_word=$2
6245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6246$as_echo_n "checking for $ac_word... " >&6; }
6247if ${ac_cv_path_DIFF+:} false; then :
6248  $as_echo_n "(cached) " >&6
6249else
6250  case $DIFF in
6251  [\\/]* | ?:[\\/]*)
6252  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6253  ;;
6254  *)
6255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6256for as_dir in $PATH
6257do
6258  IFS=$as_save_IFS
6259  test -z "$as_dir" && as_dir=.
6260    for ac_exec_ext in '' $ac_executable_extensions; do
6261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6262    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6264    break 2
6265  fi
6266done
6267  done
6268IFS=$as_save_IFS
6269
6270  ;;
6271esac
6272fi
6273DIFF=$ac_cv_path_DIFF
6274if test -n "$DIFF"; then
6275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6276$as_echo "$DIFF" >&6; }
6277else
6278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6279$as_echo "no" >&6; }
6280fi
6281
6282
6283        if test "x$DIFF" = x; then
6284          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6285        fi
6286      else
6287        # Otherwise we believe it is a complete path. Use it as it is.
6288        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6289$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6290        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6291$as_echo_n "checking for DIFF... " >&6; }
6292        if test ! -x "$tool_specified"; then
6293          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6294$as_echo "not found" >&6; }
6295          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6296        fi
6297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6298$as_echo "$tool_specified" >&6; }
6299      fi
6300    fi
6301  fi
6302
6303
6304
6305  if test "x$DIFF" = x; then
6306    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6307  fi
6308
6309
6310
6311
6312
6313  # Publish this variable in the help.
6314
6315
6316  if test "x$DIRNAME" = x; then
6317    # The variable is not set by user, try to locate tool using the code snippet
6318    for ac_prog in dirname
6319do
6320  # Extract the first word of "$ac_prog", so it can be a program name with args.
6321set dummy $ac_prog; ac_word=$2
6322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6323$as_echo_n "checking for $ac_word... " >&6; }
6324if ${ac_cv_path_DIRNAME+:} false; then :
6325  $as_echo_n "(cached) " >&6
6326else
6327  case $DIRNAME in
6328  [\\/]* | ?:[\\/]*)
6329  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6330  ;;
6331  *)
6332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6333for as_dir in $PATH
6334do
6335  IFS=$as_save_IFS
6336  test -z "$as_dir" && as_dir=.
6337    for ac_exec_ext in '' $ac_executable_extensions; do
6338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6339    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6341    break 2
6342  fi
6343done
6344  done
6345IFS=$as_save_IFS
6346
6347  ;;
6348esac
6349fi
6350DIRNAME=$ac_cv_path_DIRNAME
6351if test -n "$DIRNAME"; then
6352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6353$as_echo "$DIRNAME" >&6; }
6354else
6355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6356$as_echo "no" >&6; }
6357fi
6358
6359
6360  test -n "$DIRNAME" && break
6361done
6362
6363  else
6364    # The variable is set, but is it from the command line or the environment?
6365
6366    # Try to remove the string !DIRNAME! from our list.
6367    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6368    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6369      # If it failed, the variable was not from the command line. Ignore it,
6370      # but warn the user (except for BASH, which is always set by the calling BASH).
6371      if test "xDIRNAME" != xBASH; then
6372        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6373$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6374      fi
6375      # Try to locate tool using the code snippet
6376      for ac_prog in dirname
6377do
6378  # Extract the first word of "$ac_prog", so it can be a program name with args.
6379set dummy $ac_prog; ac_word=$2
6380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6381$as_echo_n "checking for $ac_word... " >&6; }
6382if ${ac_cv_path_DIRNAME+:} false; then :
6383  $as_echo_n "(cached) " >&6
6384else
6385  case $DIRNAME in
6386  [\\/]* | ?:[\\/]*)
6387  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6388  ;;
6389  *)
6390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6391for as_dir in $PATH
6392do
6393  IFS=$as_save_IFS
6394  test -z "$as_dir" && as_dir=.
6395    for ac_exec_ext in '' $ac_executable_extensions; do
6396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6397    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6399    break 2
6400  fi
6401done
6402  done
6403IFS=$as_save_IFS
6404
6405  ;;
6406esac
6407fi
6408DIRNAME=$ac_cv_path_DIRNAME
6409if test -n "$DIRNAME"; then
6410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6411$as_echo "$DIRNAME" >&6; }
6412else
6413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6414$as_echo "no" >&6; }
6415fi
6416
6417
6418  test -n "$DIRNAME" && break
6419done
6420
6421    else
6422      # If it succeeded, then it was overridden by the user. We will use it
6423      # for the tool.
6424
6425      # First remove it from the list of overridden variables, so we can test
6426      # for unknown variables in the end.
6427      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6428
6429      # Check if the provided tool contains a complete path.
6430      tool_specified="$DIRNAME"
6431      tool_basename="${tool_specified##*/}"
6432      if test "x$tool_basename" = "x$tool_specified"; then
6433        # A command without a complete path is provided, search $PATH.
6434        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6435$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6436        # Extract the first word of "$tool_basename", so it can be a program name with args.
6437set dummy $tool_basename; ac_word=$2
6438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6439$as_echo_n "checking for $ac_word... " >&6; }
6440if ${ac_cv_path_DIRNAME+:} false; then :
6441  $as_echo_n "(cached) " >&6
6442else
6443  case $DIRNAME in
6444  [\\/]* | ?:[\\/]*)
6445  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6446  ;;
6447  *)
6448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6449for as_dir in $PATH
6450do
6451  IFS=$as_save_IFS
6452  test -z "$as_dir" && as_dir=.
6453    for ac_exec_ext in '' $ac_executable_extensions; do
6454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6455    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6457    break 2
6458  fi
6459done
6460  done
6461IFS=$as_save_IFS
6462
6463  ;;
6464esac
6465fi
6466DIRNAME=$ac_cv_path_DIRNAME
6467if test -n "$DIRNAME"; then
6468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6469$as_echo "$DIRNAME" >&6; }
6470else
6471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6472$as_echo "no" >&6; }
6473fi
6474
6475
6476        if test "x$DIRNAME" = x; then
6477          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6478        fi
6479      else
6480        # Otherwise we believe it is a complete path. Use it as it is.
6481        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6482$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6483        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6484$as_echo_n "checking for DIRNAME... " >&6; }
6485        if test ! -x "$tool_specified"; then
6486          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6487$as_echo "not found" >&6; }
6488          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6489        fi
6490        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6491$as_echo "$tool_specified" >&6; }
6492      fi
6493    fi
6494  fi
6495
6496
6497
6498  if test "x$DIRNAME" = x; then
6499    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6500  fi
6501
6502
6503
6504
6505
6506  # Publish this variable in the help.
6507
6508
6509  if test "x$ECHO" = x; then
6510    # The variable is not set by user, try to locate tool using the code snippet
6511    for ac_prog in echo
6512do
6513  # Extract the first word of "$ac_prog", so it can be a program name with args.
6514set dummy $ac_prog; ac_word=$2
6515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6516$as_echo_n "checking for $ac_word... " >&6; }
6517if ${ac_cv_path_ECHO+:} false; then :
6518  $as_echo_n "(cached) " >&6
6519else
6520  case $ECHO in
6521  [\\/]* | ?:[\\/]*)
6522  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6523  ;;
6524  *)
6525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6526for as_dir in $PATH
6527do
6528  IFS=$as_save_IFS
6529  test -z "$as_dir" && as_dir=.
6530    for ac_exec_ext in '' $ac_executable_extensions; do
6531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6532    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6534    break 2
6535  fi
6536done
6537  done
6538IFS=$as_save_IFS
6539
6540  ;;
6541esac
6542fi
6543ECHO=$ac_cv_path_ECHO
6544if test -n "$ECHO"; then
6545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6546$as_echo "$ECHO" >&6; }
6547else
6548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6549$as_echo "no" >&6; }
6550fi
6551
6552
6553  test -n "$ECHO" && break
6554done
6555
6556  else
6557    # The variable is set, but is it from the command line or the environment?
6558
6559    # Try to remove the string !ECHO! from our list.
6560    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6561    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6562      # If it failed, the variable was not from the command line. Ignore it,
6563      # but warn the user (except for BASH, which is always set by the calling BASH).
6564      if test "xECHO" != xBASH; then
6565        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6566$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6567      fi
6568      # Try to locate tool using the code snippet
6569      for ac_prog in echo
6570do
6571  # Extract the first word of "$ac_prog", so it can be a program name with args.
6572set dummy $ac_prog; ac_word=$2
6573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6574$as_echo_n "checking for $ac_word... " >&6; }
6575if ${ac_cv_path_ECHO+:} false; then :
6576  $as_echo_n "(cached) " >&6
6577else
6578  case $ECHO in
6579  [\\/]* | ?:[\\/]*)
6580  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6581  ;;
6582  *)
6583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6584for as_dir in $PATH
6585do
6586  IFS=$as_save_IFS
6587  test -z "$as_dir" && as_dir=.
6588    for ac_exec_ext in '' $ac_executable_extensions; do
6589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6590    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6592    break 2
6593  fi
6594done
6595  done
6596IFS=$as_save_IFS
6597
6598  ;;
6599esac
6600fi
6601ECHO=$ac_cv_path_ECHO
6602if test -n "$ECHO"; then
6603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6604$as_echo "$ECHO" >&6; }
6605else
6606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6607$as_echo "no" >&6; }
6608fi
6609
6610
6611  test -n "$ECHO" && break
6612done
6613
6614    else
6615      # If it succeeded, then it was overridden by the user. We will use it
6616      # for the tool.
6617
6618      # First remove it from the list of overridden variables, so we can test
6619      # for unknown variables in the end.
6620      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6621
6622      # Check if the provided tool contains a complete path.
6623      tool_specified="$ECHO"
6624      tool_basename="${tool_specified##*/}"
6625      if test "x$tool_basename" = "x$tool_specified"; then
6626        # A command without a complete path is provided, search $PATH.
6627        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6628$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6629        # Extract the first word of "$tool_basename", so it can be a program name with args.
6630set dummy $tool_basename; ac_word=$2
6631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6632$as_echo_n "checking for $ac_word... " >&6; }
6633if ${ac_cv_path_ECHO+:} false; then :
6634  $as_echo_n "(cached) " >&6
6635else
6636  case $ECHO in
6637  [\\/]* | ?:[\\/]*)
6638  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6639  ;;
6640  *)
6641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6642for as_dir in $PATH
6643do
6644  IFS=$as_save_IFS
6645  test -z "$as_dir" && as_dir=.
6646    for ac_exec_ext in '' $ac_executable_extensions; do
6647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6648    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6650    break 2
6651  fi
6652done
6653  done
6654IFS=$as_save_IFS
6655
6656  ;;
6657esac
6658fi
6659ECHO=$ac_cv_path_ECHO
6660if test -n "$ECHO"; then
6661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6662$as_echo "$ECHO" >&6; }
6663else
6664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6665$as_echo "no" >&6; }
6666fi
6667
6668
6669        if test "x$ECHO" = x; then
6670          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6671        fi
6672      else
6673        # Otherwise we believe it is a complete path. Use it as it is.
6674        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6675$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6676        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6677$as_echo_n "checking for ECHO... " >&6; }
6678        if test ! -x "$tool_specified"; then
6679          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6680$as_echo "not found" >&6; }
6681          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6682        fi
6683        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6684$as_echo "$tool_specified" >&6; }
6685      fi
6686    fi
6687  fi
6688
6689
6690
6691  if test "x$ECHO" = x; then
6692    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6693  fi
6694
6695
6696
6697
6698
6699  # Publish this variable in the help.
6700
6701
6702  if test "x$EXPR" = x; then
6703    # The variable is not set by user, try to locate tool using the code snippet
6704    for ac_prog in expr
6705do
6706  # Extract the first word of "$ac_prog", so it can be a program name with args.
6707set dummy $ac_prog; ac_word=$2
6708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6709$as_echo_n "checking for $ac_word... " >&6; }
6710if ${ac_cv_path_EXPR+:} false; then :
6711  $as_echo_n "(cached) " >&6
6712else
6713  case $EXPR in
6714  [\\/]* | ?:[\\/]*)
6715  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6716  ;;
6717  *)
6718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6719for as_dir in $PATH
6720do
6721  IFS=$as_save_IFS
6722  test -z "$as_dir" && as_dir=.
6723    for ac_exec_ext in '' $ac_executable_extensions; do
6724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6725    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6727    break 2
6728  fi
6729done
6730  done
6731IFS=$as_save_IFS
6732
6733  ;;
6734esac
6735fi
6736EXPR=$ac_cv_path_EXPR
6737if test -n "$EXPR"; then
6738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6739$as_echo "$EXPR" >&6; }
6740else
6741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6742$as_echo "no" >&6; }
6743fi
6744
6745
6746  test -n "$EXPR" && break
6747done
6748
6749  else
6750    # The variable is set, but is it from the command line or the environment?
6751
6752    # Try to remove the string !EXPR! from our list.
6753    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6754    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6755      # If it failed, the variable was not from the command line. Ignore it,
6756      # but warn the user (except for BASH, which is always set by the calling BASH).
6757      if test "xEXPR" != xBASH; then
6758        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6759$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6760      fi
6761      # Try to locate tool using the code snippet
6762      for ac_prog in expr
6763do
6764  # Extract the first word of "$ac_prog", so it can be a program name with args.
6765set dummy $ac_prog; ac_word=$2
6766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6767$as_echo_n "checking for $ac_word... " >&6; }
6768if ${ac_cv_path_EXPR+:} false; then :
6769  $as_echo_n "(cached) " >&6
6770else
6771  case $EXPR in
6772  [\\/]* | ?:[\\/]*)
6773  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6774  ;;
6775  *)
6776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6777for as_dir in $PATH
6778do
6779  IFS=$as_save_IFS
6780  test -z "$as_dir" && as_dir=.
6781    for ac_exec_ext in '' $ac_executable_extensions; do
6782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6783    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6785    break 2
6786  fi
6787done
6788  done
6789IFS=$as_save_IFS
6790
6791  ;;
6792esac
6793fi
6794EXPR=$ac_cv_path_EXPR
6795if test -n "$EXPR"; then
6796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6797$as_echo "$EXPR" >&6; }
6798else
6799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6800$as_echo "no" >&6; }
6801fi
6802
6803
6804  test -n "$EXPR" && break
6805done
6806
6807    else
6808      # If it succeeded, then it was overridden by the user. We will use it
6809      # for the tool.
6810
6811      # First remove it from the list of overridden variables, so we can test
6812      # for unknown variables in the end.
6813      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6814
6815      # Check if the provided tool contains a complete path.
6816      tool_specified="$EXPR"
6817      tool_basename="${tool_specified##*/}"
6818      if test "x$tool_basename" = "x$tool_specified"; then
6819        # A command without a complete path is provided, search $PATH.
6820        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6821$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6822        # Extract the first word of "$tool_basename", so it can be a program name with args.
6823set dummy $tool_basename; ac_word=$2
6824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6825$as_echo_n "checking for $ac_word... " >&6; }
6826if ${ac_cv_path_EXPR+:} false; then :
6827  $as_echo_n "(cached) " >&6
6828else
6829  case $EXPR in
6830  [\\/]* | ?:[\\/]*)
6831  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6832  ;;
6833  *)
6834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6835for as_dir in $PATH
6836do
6837  IFS=$as_save_IFS
6838  test -z "$as_dir" && as_dir=.
6839    for ac_exec_ext in '' $ac_executable_extensions; do
6840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6841    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6843    break 2
6844  fi
6845done
6846  done
6847IFS=$as_save_IFS
6848
6849  ;;
6850esac
6851fi
6852EXPR=$ac_cv_path_EXPR
6853if test -n "$EXPR"; then
6854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6855$as_echo "$EXPR" >&6; }
6856else
6857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6858$as_echo "no" >&6; }
6859fi
6860
6861
6862        if test "x$EXPR" = x; then
6863          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6864        fi
6865      else
6866        # Otherwise we believe it is a complete path. Use it as it is.
6867        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6868$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6869        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6870$as_echo_n "checking for EXPR... " >&6; }
6871        if test ! -x "$tool_specified"; then
6872          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6873$as_echo "not found" >&6; }
6874          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6875        fi
6876        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6877$as_echo "$tool_specified" >&6; }
6878      fi
6879    fi
6880  fi
6881
6882
6883
6884  if test "x$EXPR" = x; then
6885    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6886  fi
6887
6888
6889
6890
6891
6892  # Publish this variable in the help.
6893
6894
6895  if test "x$FILE" = x; then
6896    # The variable is not set by user, try to locate tool using the code snippet
6897    for ac_prog in file
6898do
6899  # Extract the first word of "$ac_prog", so it can be a program name with args.
6900set dummy $ac_prog; ac_word=$2
6901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6902$as_echo_n "checking for $ac_word... " >&6; }
6903if ${ac_cv_path_FILE+:} false; then :
6904  $as_echo_n "(cached) " >&6
6905else
6906  case $FILE in
6907  [\\/]* | ?:[\\/]*)
6908  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6909  ;;
6910  *)
6911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6912for as_dir in $PATH
6913do
6914  IFS=$as_save_IFS
6915  test -z "$as_dir" && as_dir=.
6916    for ac_exec_ext in '' $ac_executable_extensions; do
6917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6918    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6920    break 2
6921  fi
6922done
6923  done
6924IFS=$as_save_IFS
6925
6926  ;;
6927esac
6928fi
6929FILE=$ac_cv_path_FILE
6930if test -n "$FILE"; then
6931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6932$as_echo "$FILE" >&6; }
6933else
6934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6935$as_echo "no" >&6; }
6936fi
6937
6938
6939  test -n "$FILE" && break
6940done
6941
6942  else
6943    # The variable is set, but is it from the command line or the environment?
6944
6945    # Try to remove the string !FILE! from our list.
6946    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6947    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6948      # If it failed, the variable was not from the command line. Ignore it,
6949      # but warn the user (except for BASH, which is always set by the calling BASH).
6950      if test "xFILE" != xBASH; then
6951        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6952$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6953      fi
6954      # Try to locate tool using the code snippet
6955      for ac_prog in file
6956do
6957  # Extract the first word of "$ac_prog", so it can be a program name with args.
6958set dummy $ac_prog; ac_word=$2
6959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6960$as_echo_n "checking for $ac_word... " >&6; }
6961if ${ac_cv_path_FILE+:} false; then :
6962  $as_echo_n "(cached) " >&6
6963else
6964  case $FILE in
6965  [\\/]* | ?:[\\/]*)
6966  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6967  ;;
6968  *)
6969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6970for as_dir in $PATH
6971do
6972  IFS=$as_save_IFS
6973  test -z "$as_dir" && as_dir=.
6974    for ac_exec_ext in '' $ac_executable_extensions; do
6975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6976    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6978    break 2
6979  fi
6980done
6981  done
6982IFS=$as_save_IFS
6983
6984  ;;
6985esac
6986fi
6987FILE=$ac_cv_path_FILE
6988if test -n "$FILE"; then
6989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6990$as_echo "$FILE" >&6; }
6991else
6992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6993$as_echo "no" >&6; }
6994fi
6995
6996
6997  test -n "$FILE" && break
6998done
6999
7000    else
7001      # If it succeeded, then it was overridden by the user. We will use it
7002      # for the tool.
7003
7004      # First remove it from the list of overridden variables, so we can test
7005      # for unknown variables in the end.
7006      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7007
7008      # Check if the provided tool contains a complete path.
7009      tool_specified="$FILE"
7010      tool_basename="${tool_specified##*/}"
7011      if test "x$tool_basename" = "x$tool_specified"; then
7012        # A command without a complete path is provided, search $PATH.
7013        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7014$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7015        # Extract the first word of "$tool_basename", so it can be a program name with args.
7016set dummy $tool_basename; ac_word=$2
7017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7018$as_echo_n "checking for $ac_word... " >&6; }
7019if ${ac_cv_path_FILE+:} false; then :
7020  $as_echo_n "(cached) " >&6
7021else
7022  case $FILE in
7023  [\\/]* | ?:[\\/]*)
7024  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7025  ;;
7026  *)
7027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7028for as_dir in $PATH
7029do
7030  IFS=$as_save_IFS
7031  test -z "$as_dir" && as_dir=.
7032    for ac_exec_ext in '' $ac_executable_extensions; do
7033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7034    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7036    break 2
7037  fi
7038done
7039  done
7040IFS=$as_save_IFS
7041
7042  ;;
7043esac
7044fi
7045FILE=$ac_cv_path_FILE
7046if test -n "$FILE"; then
7047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7048$as_echo "$FILE" >&6; }
7049else
7050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7051$as_echo "no" >&6; }
7052fi
7053
7054
7055        if test "x$FILE" = x; then
7056          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7057        fi
7058      else
7059        # Otherwise we believe it is a complete path. Use it as it is.
7060        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7061$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7062        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7063$as_echo_n "checking for FILE... " >&6; }
7064        if test ! -x "$tool_specified"; then
7065          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7066$as_echo "not found" >&6; }
7067          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7068        fi
7069        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7070$as_echo "$tool_specified" >&6; }
7071      fi
7072    fi
7073  fi
7074
7075
7076
7077  if test "x$FILE" = x; then
7078    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7079  fi
7080
7081
7082
7083
7084
7085  # Publish this variable in the help.
7086
7087
7088  if test "x$FIND" = x; then
7089    # The variable is not set by user, try to locate tool using the code snippet
7090    for ac_prog in find
7091do
7092  # Extract the first word of "$ac_prog", so it can be a program name with args.
7093set dummy $ac_prog; ac_word=$2
7094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7095$as_echo_n "checking for $ac_word... " >&6; }
7096if ${ac_cv_path_FIND+:} false; then :
7097  $as_echo_n "(cached) " >&6
7098else
7099  case $FIND in
7100  [\\/]* | ?:[\\/]*)
7101  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7102  ;;
7103  *)
7104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7105for as_dir in $PATH
7106do
7107  IFS=$as_save_IFS
7108  test -z "$as_dir" && as_dir=.
7109    for ac_exec_ext in '' $ac_executable_extensions; do
7110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7111    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7113    break 2
7114  fi
7115done
7116  done
7117IFS=$as_save_IFS
7118
7119  ;;
7120esac
7121fi
7122FIND=$ac_cv_path_FIND
7123if test -n "$FIND"; then
7124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7125$as_echo "$FIND" >&6; }
7126else
7127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7128$as_echo "no" >&6; }
7129fi
7130
7131
7132  test -n "$FIND" && break
7133done
7134
7135  else
7136    # The variable is set, but is it from the command line or the environment?
7137
7138    # Try to remove the string !FIND! from our list.
7139    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7140    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7141      # If it failed, the variable was not from the command line. Ignore it,
7142      # but warn the user (except for BASH, which is always set by the calling BASH).
7143      if test "xFIND" != xBASH; then
7144        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7145$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7146      fi
7147      # Try to locate tool using the code snippet
7148      for ac_prog in find
7149do
7150  # Extract the first word of "$ac_prog", so it can be a program name with args.
7151set dummy $ac_prog; ac_word=$2
7152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7153$as_echo_n "checking for $ac_word... " >&6; }
7154if ${ac_cv_path_FIND+:} false; then :
7155  $as_echo_n "(cached) " >&6
7156else
7157  case $FIND in
7158  [\\/]* | ?:[\\/]*)
7159  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7160  ;;
7161  *)
7162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7163for as_dir in $PATH
7164do
7165  IFS=$as_save_IFS
7166  test -z "$as_dir" && as_dir=.
7167    for ac_exec_ext in '' $ac_executable_extensions; do
7168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7169    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7171    break 2
7172  fi
7173done
7174  done
7175IFS=$as_save_IFS
7176
7177  ;;
7178esac
7179fi
7180FIND=$ac_cv_path_FIND
7181if test -n "$FIND"; then
7182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7183$as_echo "$FIND" >&6; }
7184else
7185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7186$as_echo "no" >&6; }
7187fi
7188
7189
7190  test -n "$FIND" && break
7191done
7192
7193    else
7194      # If it succeeded, then it was overridden by the user. We will use it
7195      # for the tool.
7196
7197      # First remove it from the list of overridden variables, so we can test
7198      # for unknown variables in the end.
7199      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7200
7201      # Check if the provided tool contains a complete path.
7202      tool_specified="$FIND"
7203      tool_basename="${tool_specified##*/}"
7204      if test "x$tool_basename" = "x$tool_specified"; then
7205        # A command without a complete path is provided, search $PATH.
7206        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7207$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7208        # Extract the first word of "$tool_basename", so it can be a program name with args.
7209set dummy $tool_basename; ac_word=$2
7210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7211$as_echo_n "checking for $ac_word... " >&6; }
7212if ${ac_cv_path_FIND+:} false; then :
7213  $as_echo_n "(cached) " >&6
7214else
7215  case $FIND in
7216  [\\/]* | ?:[\\/]*)
7217  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7218  ;;
7219  *)
7220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7221for as_dir in $PATH
7222do
7223  IFS=$as_save_IFS
7224  test -z "$as_dir" && as_dir=.
7225    for ac_exec_ext in '' $ac_executable_extensions; do
7226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7227    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7229    break 2
7230  fi
7231done
7232  done
7233IFS=$as_save_IFS
7234
7235  ;;
7236esac
7237fi
7238FIND=$ac_cv_path_FIND
7239if test -n "$FIND"; then
7240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7241$as_echo "$FIND" >&6; }
7242else
7243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7244$as_echo "no" >&6; }
7245fi
7246
7247
7248        if test "x$FIND" = x; then
7249          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7250        fi
7251      else
7252        # Otherwise we believe it is a complete path. Use it as it is.
7253        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7254$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7255        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7256$as_echo_n "checking for FIND... " >&6; }
7257        if test ! -x "$tool_specified"; then
7258          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7259$as_echo "not found" >&6; }
7260          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7261        fi
7262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7263$as_echo "$tool_specified" >&6; }
7264      fi
7265    fi
7266  fi
7267
7268
7269
7270  if test "x$FIND" = x; then
7271    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7272  fi
7273
7274
7275
7276
7277
7278  # Publish this variable in the help.
7279
7280
7281  if test "x$HEAD" = x; then
7282    # The variable is not set by user, try to locate tool using the code snippet
7283    for ac_prog in head
7284do
7285  # Extract the first word of "$ac_prog", so it can be a program name with args.
7286set dummy $ac_prog; ac_word=$2
7287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7288$as_echo_n "checking for $ac_word... " >&6; }
7289if ${ac_cv_path_HEAD+:} false; then :
7290  $as_echo_n "(cached) " >&6
7291else
7292  case $HEAD in
7293  [\\/]* | ?:[\\/]*)
7294  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7295  ;;
7296  *)
7297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7298for as_dir in $PATH
7299do
7300  IFS=$as_save_IFS
7301  test -z "$as_dir" && as_dir=.
7302    for ac_exec_ext in '' $ac_executable_extensions; do
7303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7304    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7306    break 2
7307  fi
7308done
7309  done
7310IFS=$as_save_IFS
7311
7312  ;;
7313esac
7314fi
7315HEAD=$ac_cv_path_HEAD
7316if test -n "$HEAD"; then
7317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7318$as_echo "$HEAD" >&6; }
7319else
7320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7321$as_echo "no" >&6; }
7322fi
7323
7324
7325  test -n "$HEAD" && break
7326done
7327
7328  else
7329    # The variable is set, but is it from the command line or the environment?
7330
7331    # Try to remove the string !HEAD! from our list.
7332    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7333    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7334      # If it failed, the variable was not from the command line. Ignore it,
7335      # but warn the user (except for BASH, which is always set by the calling BASH).
7336      if test "xHEAD" != xBASH; then
7337        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7338$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7339      fi
7340      # Try to locate tool using the code snippet
7341      for ac_prog in head
7342do
7343  # Extract the first word of "$ac_prog", so it can be a program name with args.
7344set dummy $ac_prog; ac_word=$2
7345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7346$as_echo_n "checking for $ac_word... " >&6; }
7347if ${ac_cv_path_HEAD+:} false; then :
7348  $as_echo_n "(cached) " >&6
7349else
7350  case $HEAD in
7351  [\\/]* | ?:[\\/]*)
7352  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7353  ;;
7354  *)
7355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7356for as_dir in $PATH
7357do
7358  IFS=$as_save_IFS
7359  test -z "$as_dir" && as_dir=.
7360    for ac_exec_ext in '' $ac_executable_extensions; do
7361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7362    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7364    break 2
7365  fi
7366done
7367  done
7368IFS=$as_save_IFS
7369
7370  ;;
7371esac
7372fi
7373HEAD=$ac_cv_path_HEAD
7374if test -n "$HEAD"; then
7375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7376$as_echo "$HEAD" >&6; }
7377else
7378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7379$as_echo "no" >&6; }
7380fi
7381
7382
7383  test -n "$HEAD" && break
7384done
7385
7386    else
7387      # If it succeeded, then it was overridden by the user. We will use it
7388      # for the tool.
7389
7390      # First remove it from the list of overridden variables, so we can test
7391      # for unknown variables in the end.
7392      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7393
7394      # Check if the provided tool contains a complete path.
7395      tool_specified="$HEAD"
7396      tool_basename="${tool_specified##*/}"
7397      if test "x$tool_basename" = "x$tool_specified"; then
7398        # A command without a complete path is provided, search $PATH.
7399        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7400$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7401        # Extract the first word of "$tool_basename", so it can be a program name with args.
7402set dummy $tool_basename; ac_word=$2
7403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7404$as_echo_n "checking for $ac_word... " >&6; }
7405if ${ac_cv_path_HEAD+:} false; then :
7406  $as_echo_n "(cached) " >&6
7407else
7408  case $HEAD in
7409  [\\/]* | ?:[\\/]*)
7410  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7411  ;;
7412  *)
7413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7414for as_dir in $PATH
7415do
7416  IFS=$as_save_IFS
7417  test -z "$as_dir" && as_dir=.
7418    for ac_exec_ext in '' $ac_executable_extensions; do
7419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7420    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7422    break 2
7423  fi
7424done
7425  done
7426IFS=$as_save_IFS
7427
7428  ;;
7429esac
7430fi
7431HEAD=$ac_cv_path_HEAD
7432if test -n "$HEAD"; then
7433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7434$as_echo "$HEAD" >&6; }
7435else
7436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7437$as_echo "no" >&6; }
7438fi
7439
7440
7441        if test "x$HEAD" = x; then
7442          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7443        fi
7444      else
7445        # Otherwise we believe it is a complete path. Use it as it is.
7446        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7447$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7448        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7449$as_echo_n "checking for HEAD... " >&6; }
7450        if test ! -x "$tool_specified"; then
7451          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7452$as_echo "not found" >&6; }
7453          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7454        fi
7455        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7456$as_echo "$tool_specified" >&6; }
7457      fi
7458    fi
7459  fi
7460
7461
7462
7463  if test "x$HEAD" = x; then
7464    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7465  fi
7466
7467
7468
7469
7470
7471  # Publish this variable in the help.
7472
7473
7474  if test "x$LN" = x; then
7475    # The variable is not set by user, try to locate tool using the code snippet
7476    for ac_prog in ln
7477do
7478  # Extract the first word of "$ac_prog", so it can be a program name with args.
7479set dummy $ac_prog; ac_word=$2
7480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7481$as_echo_n "checking for $ac_word... " >&6; }
7482if ${ac_cv_path_LN+:} false; then :
7483  $as_echo_n "(cached) " >&6
7484else
7485  case $LN in
7486  [\\/]* | ?:[\\/]*)
7487  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7488  ;;
7489  *)
7490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7491for as_dir in $PATH
7492do
7493  IFS=$as_save_IFS
7494  test -z "$as_dir" && as_dir=.
7495    for ac_exec_ext in '' $ac_executable_extensions; do
7496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7497    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7499    break 2
7500  fi
7501done
7502  done
7503IFS=$as_save_IFS
7504
7505  ;;
7506esac
7507fi
7508LN=$ac_cv_path_LN
7509if test -n "$LN"; then
7510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7511$as_echo "$LN" >&6; }
7512else
7513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7514$as_echo "no" >&6; }
7515fi
7516
7517
7518  test -n "$LN" && break
7519done
7520
7521  else
7522    # The variable is set, but is it from the command line or the environment?
7523
7524    # Try to remove the string !LN! from our list.
7525    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7526    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7527      # If it failed, the variable was not from the command line. Ignore it,
7528      # but warn the user (except for BASH, which is always set by the calling BASH).
7529      if test "xLN" != xBASH; then
7530        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7531$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7532      fi
7533      # Try to locate tool using the code snippet
7534      for ac_prog in ln
7535do
7536  # Extract the first word of "$ac_prog", so it can be a program name with args.
7537set dummy $ac_prog; ac_word=$2
7538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7539$as_echo_n "checking for $ac_word... " >&6; }
7540if ${ac_cv_path_LN+:} false; then :
7541  $as_echo_n "(cached) " >&6
7542else
7543  case $LN in
7544  [\\/]* | ?:[\\/]*)
7545  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7546  ;;
7547  *)
7548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7549for as_dir in $PATH
7550do
7551  IFS=$as_save_IFS
7552  test -z "$as_dir" && as_dir=.
7553    for ac_exec_ext in '' $ac_executable_extensions; do
7554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7555    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7557    break 2
7558  fi
7559done
7560  done
7561IFS=$as_save_IFS
7562
7563  ;;
7564esac
7565fi
7566LN=$ac_cv_path_LN
7567if test -n "$LN"; then
7568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7569$as_echo "$LN" >&6; }
7570else
7571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7572$as_echo "no" >&6; }
7573fi
7574
7575
7576  test -n "$LN" && break
7577done
7578
7579    else
7580      # If it succeeded, then it was overridden by the user. We will use it
7581      # for the tool.
7582
7583      # First remove it from the list of overridden variables, so we can test
7584      # for unknown variables in the end.
7585      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7586
7587      # Check if the provided tool contains a complete path.
7588      tool_specified="$LN"
7589      tool_basename="${tool_specified##*/}"
7590      if test "x$tool_basename" = "x$tool_specified"; then
7591        # A command without a complete path is provided, search $PATH.
7592        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7593$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7594        # Extract the first word of "$tool_basename", so it can be a program name with args.
7595set dummy $tool_basename; ac_word=$2
7596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7597$as_echo_n "checking for $ac_word... " >&6; }
7598if ${ac_cv_path_LN+:} false; then :
7599  $as_echo_n "(cached) " >&6
7600else
7601  case $LN in
7602  [\\/]* | ?:[\\/]*)
7603  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7604  ;;
7605  *)
7606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7607for as_dir in $PATH
7608do
7609  IFS=$as_save_IFS
7610  test -z "$as_dir" && as_dir=.
7611    for ac_exec_ext in '' $ac_executable_extensions; do
7612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7613    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7615    break 2
7616  fi
7617done
7618  done
7619IFS=$as_save_IFS
7620
7621  ;;
7622esac
7623fi
7624LN=$ac_cv_path_LN
7625if test -n "$LN"; then
7626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7627$as_echo "$LN" >&6; }
7628else
7629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7630$as_echo "no" >&6; }
7631fi
7632
7633
7634        if test "x$LN" = x; then
7635          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7636        fi
7637      else
7638        # Otherwise we believe it is a complete path. Use it as it is.
7639        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7640$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7641        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7642$as_echo_n "checking for LN... " >&6; }
7643        if test ! -x "$tool_specified"; then
7644          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7645$as_echo "not found" >&6; }
7646          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7647        fi
7648        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7649$as_echo "$tool_specified" >&6; }
7650      fi
7651    fi
7652  fi
7653
7654
7655
7656  if test "x$LN" = x; then
7657    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7658  fi
7659
7660
7661
7662
7663
7664  # Publish this variable in the help.
7665
7666
7667  if test "x$LS" = x; then
7668    # The variable is not set by user, try to locate tool using the code snippet
7669    for ac_prog in ls
7670do
7671  # Extract the first word of "$ac_prog", so it can be a program name with args.
7672set dummy $ac_prog; ac_word=$2
7673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7674$as_echo_n "checking for $ac_word... " >&6; }
7675if ${ac_cv_path_LS+:} false; then :
7676  $as_echo_n "(cached) " >&6
7677else
7678  case $LS in
7679  [\\/]* | ?:[\\/]*)
7680  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7681  ;;
7682  *)
7683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7684for as_dir in $PATH
7685do
7686  IFS=$as_save_IFS
7687  test -z "$as_dir" && as_dir=.
7688    for ac_exec_ext in '' $ac_executable_extensions; do
7689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7690    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7692    break 2
7693  fi
7694done
7695  done
7696IFS=$as_save_IFS
7697
7698  ;;
7699esac
7700fi
7701LS=$ac_cv_path_LS
7702if test -n "$LS"; then
7703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7704$as_echo "$LS" >&6; }
7705else
7706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7707$as_echo "no" >&6; }
7708fi
7709
7710
7711  test -n "$LS" && break
7712done
7713
7714  else
7715    # The variable is set, but is it from the command line or the environment?
7716
7717    # Try to remove the string !LS! from our list.
7718    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7719    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7720      # If it failed, the variable was not from the command line. Ignore it,
7721      # but warn the user (except for BASH, which is always set by the calling BASH).
7722      if test "xLS" != xBASH; then
7723        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7724$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7725      fi
7726      # Try to locate tool using the code snippet
7727      for ac_prog in ls
7728do
7729  # Extract the first word of "$ac_prog", so it can be a program name with args.
7730set dummy $ac_prog; ac_word=$2
7731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7732$as_echo_n "checking for $ac_word... " >&6; }
7733if ${ac_cv_path_LS+:} false; then :
7734  $as_echo_n "(cached) " >&6
7735else
7736  case $LS in
7737  [\\/]* | ?:[\\/]*)
7738  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7739  ;;
7740  *)
7741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7742for as_dir in $PATH
7743do
7744  IFS=$as_save_IFS
7745  test -z "$as_dir" && as_dir=.
7746    for ac_exec_ext in '' $ac_executable_extensions; do
7747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7748    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7750    break 2
7751  fi
7752done
7753  done
7754IFS=$as_save_IFS
7755
7756  ;;
7757esac
7758fi
7759LS=$ac_cv_path_LS
7760if test -n "$LS"; then
7761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7762$as_echo "$LS" >&6; }
7763else
7764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7765$as_echo "no" >&6; }
7766fi
7767
7768
7769  test -n "$LS" && break
7770done
7771
7772    else
7773      # If it succeeded, then it was overridden by the user. We will use it
7774      # for the tool.
7775
7776      # First remove it from the list of overridden variables, so we can test
7777      # for unknown variables in the end.
7778      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7779
7780      # Check if the provided tool contains a complete path.
7781      tool_specified="$LS"
7782      tool_basename="${tool_specified##*/}"
7783      if test "x$tool_basename" = "x$tool_specified"; then
7784        # A command without a complete path is provided, search $PATH.
7785        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7786$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7787        # Extract the first word of "$tool_basename", so it can be a program name with args.
7788set dummy $tool_basename; ac_word=$2
7789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7790$as_echo_n "checking for $ac_word... " >&6; }
7791if ${ac_cv_path_LS+:} false; then :
7792  $as_echo_n "(cached) " >&6
7793else
7794  case $LS in
7795  [\\/]* | ?:[\\/]*)
7796  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7797  ;;
7798  *)
7799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7800for as_dir in $PATH
7801do
7802  IFS=$as_save_IFS
7803  test -z "$as_dir" && as_dir=.
7804    for ac_exec_ext in '' $ac_executable_extensions; do
7805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7806    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7808    break 2
7809  fi
7810done
7811  done
7812IFS=$as_save_IFS
7813
7814  ;;
7815esac
7816fi
7817LS=$ac_cv_path_LS
7818if test -n "$LS"; then
7819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7820$as_echo "$LS" >&6; }
7821else
7822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7823$as_echo "no" >&6; }
7824fi
7825
7826
7827        if test "x$LS" = x; then
7828          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7829        fi
7830      else
7831        # Otherwise we believe it is a complete path. Use it as it is.
7832        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7833$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7834        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7835$as_echo_n "checking for LS... " >&6; }
7836        if test ! -x "$tool_specified"; then
7837          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7838$as_echo "not found" >&6; }
7839          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7840        fi
7841        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7842$as_echo "$tool_specified" >&6; }
7843      fi
7844    fi
7845  fi
7846
7847
7848
7849  if test "x$LS" = x; then
7850    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7851  fi
7852
7853
7854
7855
7856
7857  # Publish this variable in the help.
7858
7859
7860  if test "x$MKDIR" = x; then
7861    # The variable is not set by user, try to locate tool using the code snippet
7862    for ac_prog in mkdir
7863do
7864  # Extract the first word of "$ac_prog", so it can be a program name with args.
7865set dummy $ac_prog; ac_word=$2
7866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7867$as_echo_n "checking for $ac_word... " >&6; }
7868if ${ac_cv_path_MKDIR+:} false; then :
7869  $as_echo_n "(cached) " >&6
7870else
7871  case $MKDIR in
7872  [\\/]* | ?:[\\/]*)
7873  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7874  ;;
7875  *)
7876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7877for as_dir in $PATH
7878do
7879  IFS=$as_save_IFS
7880  test -z "$as_dir" && as_dir=.
7881    for ac_exec_ext in '' $ac_executable_extensions; do
7882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7883    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7885    break 2
7886  fi
7887done
7888  done
7889IFS=$as_save_IFS
7890
7891  ;;
7892esac
7893fi
7894MKDIR=$ac_cv_path_MKDIR
7895if test -n "$MKDIR"; then
7896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7897$as_echo "$MKDIR" >&6; }
7898else
7899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7900$as_echo "no" >&6; }
7901fi
7902
7903
7904  test -n "$MKDIR" && break
7905done
7906
7907  else
7908    # The variable is set, but is it from the command line or the environment?
7909
7910    # Try to remove the string !MKDIR! from our list.
7911    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7912    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7913      # If it failed, the variable was not from the command line. Ignore it,
7914      # but warn the user (except for BASH, which is always set by the calling BASH).
7915      if test "xMKDIR" != xBASH; then
7916        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7917$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7918      fi
7919      # Try to locate tool using the code snippet
7920      for ac_prog in mkdir
7921do
7922  # Extract the first word of "$ac_prog", so it can be a program name with args.
7923set dummy $ac_prog; ac_word=$2
7924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7925$as_echo_n "checking for $ac_word... " >&6; }
7926if ${ac_cv_path_MKDIR+:} false; then :
7927  $as_echo_n "(cached) " >&6
7928else
7929  case $MKDIR in
7930  [\\/]* | ?:[\\/]*)
7931  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7932  ;;
7933  *)
7934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7935for as_dir in $PATH
7936do
7937  IFS=$as_save_IFS
7938  test -z "$as_dir" && as_dir=.
7939    for ac_exec_ext in '' $ac_executable_extensions; do
7940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7941    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7943    break 2
7944  fi
7945done
7946  done
7947IFS=$as_save_IFS
7948
7949  ;;
7950esac
7951fi
7952MKDIR=$ac_cv_path_MKDIR
7953if test -n "$MKDIR"; then
7954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7955$as_echo "$MKDIR" >&6; }
7956else
7957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7958$as_echo "no" >&6; }
7959fi
7960
7961
7962  test -n "$MKDIR" && break
7963done
7964
7965    else
7966      # If it succeeded, then it was overridden by the user. We will use it
7967      # for the tool.
7968
7969      # First remove it from the list of overridden variables, so we can test
7970      # for unknown variables in the end.
7971      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7972
7973      # Check if the provided tool contains a complete path.
7974      tool_specified="$MKDIR"
7975      tool_basename="${tool_specified##*/}"
7976      if test "x$tool_basename" = "x$tool_specified"; then
7977        # A command without a complete path is provided, search $PATH.
7978        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
7979$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
7980        # Extract the first word of "$tool_basename", so it can be a program name with args.
7981set dummy $tool_basename; ac_word=$2
7982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7983$as_echo_n "checking for $ac_word... " >&6; }
7984if ${ac_cv_path_MKDIR+:} false; then :
7985  $as_echo_n "(cached) " >&6
7986else
7987  case $MKDIR in
7988  [\\/]* | ?:[\\/]*)
7989  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7990  ;;
7991  *)
7992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7993for as_dir in $PATH
7994do
7995  IFS=$as_save_IFS
7996  test -z "$as_dir" && as_dir=.
7997    for ac_exec_ext in '' $ac_executable_extensions; do
7998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7999    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8001    break 2
8002  fi
8003done
8004  done
8005IFS=$as_save_IFS
8006
8007  ;;
8008esac
8009fi
8010MKDIR=$ac_cv_path_MKDIR
8011if test -n "$MKDIR"; then
8012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8013$as_echo "$MKDIR" >&6; }
8014else
8015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8016$as_echo "no" >&6; }
8017fi
8018
8019
8020        if test "x$MKDIR" = x; then
8021          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8022        fi
8023      else
8024        # Otherwise we believe it is a complete path. Use it as it is.
8025        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8026$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8027        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8028$as_echo_n "checking for MKDIR... " >&6; }
8029        if test ! -x "$tool_specified"; then
8030          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8031$as_echo "not found" >&6; }
8032          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8033        fi
8034        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8035$as_echo "$tool_specified" >&6; }
8036      fi
8037    fi
8038  fi
8039
8040
8041
8042  if test "x$MKDIR" = x; then
8043    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8044  fi
8045
8046
8047
8048
8049
8050  # Publish this variable in the help.
8051
8052
8053  if test "x$MKTEMP" = x; then
8054    # The variable is not set by user, try to locate tool using the code snippet
8055    for ac_prog in mktemp
8056do
8057  # Extract the first word of "$ac_prog", so it can be a program name with args.
8058set dummy $ac_prog; ac_word=$2
8059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8060$as_echo_n "checking for $ac_word... " >&6; }
8061if ${ac_cv_path_MKTEMP+:} false; then :
8062  $as_echo_n "(cached) " >&6
8063else
8064  case $MKTEMP in
8065  [\\/]* | ?:[\\/]*)
8066  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8067  ;;
8068  *)
8069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8070for as_dir in $PATH
8071do
8072  IFS=$as_save_IFS
8073  test -z "$as_dir" && as_dir=.
8074    for ac_exec_ext in '' $ac_executable_extensions; do
8075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8076    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8078    break 2
8079  fi
8080done
8081  done
8082IFS=$as_save_IFS
8083
8084  ;;
8085esac
8086fi
8087MKTEMP=$ac_cv_path_MKTEMP
8088if test -n "$MKTEMP"; then
8089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8090$as_echo "$MKTEMP" >&6; }
8091else
8092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8093$as_echo "no" >&6; }
8094fi
8095
8096
8097  test -n "$MKTEMP" && break
8098done
8099
8100  else
8101    # The variable is set, but is it from the command line or the environment?
8102
8103    # Try to remove the string !MKTEMP! from our list.
8104    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8105    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8106      # If it failed, the variable was not from the command line. Ignore it,
8107      # but warn the user (except for BASH, which is always set by the calling BASH).
8108      if test "xMKTEMP" != xBASH; then
8109        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8110$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8111      fi
8112      # Try to locate tool using the code snippet
8113      for ac_prog in mktemp
8114do
8115  # Extract the first word of "$ac_prog", so it can be a program name with args.
8116set dummy $ac_prog; ac_word=$2
8117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8118$as_echo_n "checking for $ac_word... " >&6; }
8119if ${ac_cv_path_MKTEMP+:} false; then :
8120  $as_echo_n "(cached) " >&6
8121else
8122  case $MKTEMP in
8123  [\\/]* | ?:[\\/]*)
8124  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8125  ;;
8126  *)
8127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8128for as_dir in $PATH
8129do
8130  IFS=$as_save_IFS
8131  test -z "$as_dir" && as_dir=.
8132    for ac_exec_ext in '' $ac_executable_extensions; do
8133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8134    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8136    break 2
8137  fi
8138done
8139  done
8140IFS=$as_save_IFS
8141
8142  ;;
8143esac
8144fi
8145MKTEMP=$ac_cv_path_MKTEMP
8146if test -n "$MKTEMP"; then
8147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8148$as_echo "$MKTEMP" >&6; }
8149else
8150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8151$as_echo "no" >&6; }
8152fi
8153
8154
8155  test -n "$MKTEMP" && break
8156done
8157
8158    else
8159      # If it succeeded, then it was overridden by the user. We will use it
8160      # for the tool.
8161
8162      # First remove it from the list of overridden variables, so we can test
8163      # for unknown variables in the end.
8164      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8165
8166      # Check if the provided tool contains a complete path.
8167      tool_specified="$MKTEMP"
8168      tool_basename="${tool_specified##*/}"
8169      if test "x$tool_basename" = "x$tool_specified"; then
8170        # A command without a complete path is provided, search $PATH.
8171        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8172$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8173        # Extract the first word of "$tool_basename", so it can be a program name with args.
8174set dummy $tool_basename; ac_word=$2
8175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8176$as_echo_n "checking for $ac_word... " >&6; }
8177if ${ac_cv_path_MKTEMP+:} false; then :
8178  $as_echo_n "(cached) " >&6
8179else
8180  case $MKTEMP in
8181  [\\/]* | ?:[\\/]*)
8182  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8183  ;;
8184  *)
8185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8186for as_dir in $PATH
8187do
8188  IFS=$as_save_IFS
8189  test -z "$as_dir" && as_dir=.
8190    for ac_exec_ext in '' $ac_executable_extensions; do
8191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8192    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8194    break 2
8195  fi
8196done
8197  done
8198IFS=$as_save_IFS
8199
8200  ;;
8201esac
8202fi
8203MKTEMP=$ac_cv_path_MKTEMP
8204if test -n "$MKTEMP"; then
8205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8206$as_echo "$MKTEMP" >&6; }
8207else
8208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8209$as_echo "no" >&6; }
8210fi
8211
8212
8213        if test "x$MKTEMP" = x; then
8214          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8215        fi
8216      else
8217        # Otherwise we believe it is a complete path. Use it as it is.
8218        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8219$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8220        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8221$as_echo_n "checking for MKTEMP... " >&6; }
8222        if test ! -x "$tool_specified"; then
8223          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8224$as_echo "not found" >&6; }
8225          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8226        fi
8227        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8228$as_echo "$tool_specified" >&6; }
8229      fi
8230    fi
8231  fi
8232
8233
8234
8235  if test "x$MKTEMP" = x; then
8236    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8237  fi
8238
8239
8240
8241
8242
8243  # Publish this variable in the help.
8244
8245
8246  if test "x$MV" = x; then
8247    # The variable is not set by user, try to locate tool using the code snippet
8248    for ac_prog in mv
8249do
8250  # Extract the first word of "$ac_prog", so it can be a program name with args.
8251set dummy $ac_prog; ac_word=$2
8252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8253$as_echo_n "checking for $ac_word... " >&6; }
8254if ${ac_cv_path_MV+:} false; then :
8255  $as_echo_n "(cached) " >&6
8256else
8257  case $MV in
8258  [\\/]* | ?:[\\/]*)
8259  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8260  ;;
8261  *)
8262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8263for as_dir in $PATH
8264do
8265  IFS=$as_save_IFS
8266  test -z "$as_dir" && as_dir=.
8267    for ac_exec_ext in '' $ac_executable_extensions; do
8268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8269    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8271    break 2
8272  fi
8273done
8274  done
8275IFS=$as_save_IFS
8276
8277  ;;
8278esac
8279fi
8280MV=$ac_cv_path_MV
8281if test -n "$MV"; then
8282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8283$as_echo "$MV" >&6; }
8284else
8285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8286$as_echo "no" >&6; }
8287fi
8288
8289
8290  test -n "$MV" && break
8291done
8292
8293  else
8294    # The variable is set, but is it from the command line or the environment?
8295
8296    # Try to remove the string !MV! from our list.
8297    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8298    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8299      # If it failed, the variable was not from the command line. Ignore it,
8300      # but warn the user (except for BASH, which is always set by the calling BASH).
8301      if test "xMV" != xBASH; then
8302        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8303$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8304      fi
8305      # Try to locate tool using the code snippet
8306      for ac_prog in mv
8307do
8308  # Extract the first word of "$ac_prog", so it can be a program name with args.
8309set dummy $ac_prog; ac_word=$2
8310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8311$as_echo_n "checking for $ac_word... " >&6; }
8312if ${ac_cv_path_MV+:} false; then :
8313  $as_echo_n "(cached) " >&6
8314else
8315  case $MV in
8316  [\\/]* | ?:[\\/]*)
8317  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8318  ;;
8319  *)
8320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8321for as_dir in $PATH
8322do
8323  IFS=$as_save_IFS
8324  test -z "$as_dir" && as_dir=.
8325    for ac_exec_ext in '' $ac_executable_extensions; do
8326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8327    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8329    break 2
8330  fi
8331done
8332  done
8333IFS=$as_save_IFS
8334
8335  ;;
8336esac
8337fi
8338MV=$ac_cv_path_MV
8339if test -n "$MV"; then
8340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8341$as_echo "$MV" >&6; }
8342else
8343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8344$as_echo "no" >&6; }
8345fi
8346
8347
8348  test -n "$MV" && break
8349done
8350
8351    else
8352      # If it succeeded, then it was overridden by the user. We will use it
8353      # for the tool.
8354
8355      # First remove it from the list of overridden variables, so we can test
8356      # for unknown variables in the end.
8357      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8358
8359      # Check if the provided tool contains a complete path.
8360      tool_specified="$MV"
8361      tool_basename="${tool_specified##*/}"
8362      if test "x$tool_basename" = "x$tool_specified"; then
8363        # A command without a complete path is provided, search $PATH.
8364        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8365$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8366        # Extract the first word of "$tool_basename", so it can be a program name with args.
8367set dummy $tool_basename; ac_word=$2
8368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8369$as_echo_n "checking for $ac_word... " >&6; }
8370if ${ac_cv_path_MV+:} false; then :
8371  $as_echo_n "(cached) " >&6
8372else
8373  case $MV in
8374  [\\/]* | ?:[\\/]*)
8375  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8376  ;;
8377  *)
8378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8379for as_dir in $PATH
8380do
8381  IFS=$as_save_IFS
8382  test -z "$as_dir" && as_dir=.
8383    for ac_exec_ext in '' $ac_executable_extensions; do
8384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8385    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8387    break 2
8388  fi
8389done
8390  done
8391IFS=$as_save_IFS
8392
8393  ;;
8394esac
8395fi
8396MV=$ac_cv_path_MV
8397if test -n "$MV"; then
8398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8399$as_echo "$MV" >&6; }
8400else
8401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8402$as_echo "no" >&6; }
8403fi
8404
8405
8406        if test "x$MV" = x; then
8407          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8408        fi
8409      else
8410        # Otherwise we believe it is a complete path. Use it as it is.
8411        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8412$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8413        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8414$as_echo_n "checking for MV... " >&6; }
8415        if test ! -x "$tool_specified"; then
8416          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8417$as_echo "not found" >&6; }
8418          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8419        fi
8420        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8421$as_echo "$tool_specified" >&6; }
8422      fi
8423    fi
8424  fi
8425
8426
8427
8428  if test "x$MV" = x; then
8429    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8430  fi
8431
8432
8433
8434
8435
8436  # Publish this variable in the help.
8437
8438
8439  if test "x$NAWK" = x; then
8440    # The variable is not set by user, try to locate tool using the code snippet
8441    for ac_prog in nawk gawk awk
8442do
8443  # Extract the first word of "$ac_prog", so it can be a program name with args.
8444set dummy $ac_prog; ac_word=$2
8445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8446$as_echo_n "checking for $ac_word... " >&6; }
8447if ${ac_cv_path_NAWK+:} false; then :
8448  $as_echo_n "(cached) " >&6
8449else
8450  case $NAWK in
8451  [\\/]* | ?:[\\/]*)
8452  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8453  ;;
8454  *)
8455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8456for as_dir in $PATH
8457do
8458  IFS=$as_save_IFS
8459  test -z "$as_dir" && as_dir=.
8460    for ac_exec_ext in '' $ac_executable_extensions; do
8461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8462    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8464    break 2
8465  fi
8466done
8467  done
8468IFS=$as_save_IFS
8469
8470  ;;
8471esac
8472fi
8473NAWK=$ac_cv_path_NAWK
8474if test -n "$NAWK"; then
8475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8476$as_echo "$NAWK" >&6; }
8477else
8478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8479$as_echo "no" >&6; }
8480fi
8481
8482
8483  test -n "$NAWK" && break
8484done
8485
8486  else
8487    # The variable is set, but is it from the command line or the environment?
8488
8489    # Try to remove the string !NAWK! from our list.
8490    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8491    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8492      # If it failed, the variable was not from the command line. Ignore it,
8493      # but warn the user (except for BASH, which is always set by the calling BASH).
8494      if test "xNAWK" != xBASH; then
8495        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8496$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8497      fi
8498      # Try to locate tool using the code snippet
8499      for ac_prog in nawk gawk awk
8500do
8501  # Extract the first word of "$ac_prog", so it can be a program name with args.
8502set dummy $ac_prog; ac_word=$2
8503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8504$as_echo_n "checking for $ac_word... " >&6; }
8505if ${ac_cv_path_NAWK+:} false; then :
8506  $as_echo_n "(cached) " >&6
8507else
8508  case $NAWK in
8509  [\\/]* | ?:[\\/]*)
8510  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8511  ;;
8512  *)
8513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8514for as_dir in $PATH
8515do
8516  IFS=$as_save_IFS
8517  test -z "$as_dir" && as_dir=.
8518    for ac_exec_ext in '' $ac_executable_extensions; do
8519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8520    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8522    break 2
8523  fi
8524done
8525  done
8526IFS=$as_save_IFS
8527
8528  ;;
8529esac
8530fi
8531NAWK=$ac_cv_path_NAWK
8532if test -n "$NAWK"; then
8533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8534$as_echo "$NAWK" >&6; }
8535else
8536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8537$as_echo "no" >&6; }
8538fi
8539
8540
8541  test -n "$NAWK" && break
8542done
8543
8544    else
8545      # If it succeeded, then it was overridden by the user. We will use it
8546      # for the tool.
8547
8548      # First remove it from the list of overridden variables, so we can test
8549      # for unknown variables in the end.
8550      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8551
8552      # Check if the provided tool contains a complete path.
8553      tool_specified="$NAWK"
8554      tool_basename="${tool_specified##*/}"
8555      if test "x$tool_basename" = "x$tool_specified"; then
8556        # A command without a complete path is provided, search $PATH.
8557        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8558$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8559        # Extract the first word of "$tool_basename", so it can be a program name with args.
8560set dummy $tool_basename; ac_word=$2
8561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8562$as_echo_n "checking for $ac_word... " >&6; }
8563if ${ac_cv_path_NAWK+:} false; then :
8564  $as_echo_n "(cached) " >&6
8565else
8566  case $NAWK in
8567  [\\/]* | ?:[\\/]*)
8568  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8569  ;;
8570  *)
8571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8572for as_dir in $PATH
8573do
8574  IFS=$as_save_IFS
8575  test -z "$as_dir" && as_dir=.
8576    for ac_exec_ext in '' $ac_executable_extensions; do
8577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8578    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8580    break 2
8581  fi
8582done
8583  done
8584IFS=$as_save_IFS
8585
8586  ;;
8587esac
8588fi
8589NAWK=$ac_cv_path_NAWK
8590if test -n "$NAWK"; then
8591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8592$as_echo "$NAWK" >&6; }
8593else
8594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8595$as_echo "no" >&6; }
8596fi
8597
8598
8599        if test "x$NAWK" = x; then
8600          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8601        fi
8602      else
8603        # Otherwise we believe it is a complete path. Use it as it is.
8604        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8605$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8606        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8607$as_echo_n "checking for NAWK... " >&6; }
8608        if test ! -x "$tool_specified"; then
8609          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8610$as_echo "not found" >&6; }
8611          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8612        fi
8613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8614$as_echo "$tool_specified" >&6; }
8615      fi
8616    fi
8617  fi
8618
8619
8620
8621  if test "x$NAWK" = x; then
8622    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8623  fi
8624
8625
8626
8627
8628
8629  # Publish this variable in the help.
8630
8631
8632  if test "x$PRINTF" = x; then
8633    # The variable is not set by user, try to locate tool using the code snippet
8634    for ac_prog in printf
8635do
8636  # Extract the first word of "$ac_prog", so it can be a program name with args.
8637set dummy $ac_prog; ac_word=$2
8638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8639$as_echo_n "checking for $ac_word... " >&6; }
8640if ${ac_cv_path_PRINTF+:} false; then :
8641  $as_echo_n "(cached) " >&6
8642else
8643  case $PRINTF in
8644  [\\/]* | ?:[\\/]*)
8645  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8646  ;;
8647  *)
8648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8649for as_dir in $PATH
8650do
8651  IFS=$as_save_IFS
8652  test -z "$as_dir" && as_dir=.
8653    for ac_exec_ext in '' $ac_executable_extensions; do
8654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8655    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8657    break 2
8658  fi
8659done
8660  done
8661IFS=$as_save_IFS
8662
8663  ;;
8664esac
8665fi
8666PRINTF=$ac_cv_path_PRINTF
8667if test -n "$PRINTF"; then
8668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8669$as_echo "$PRINTF" >&6; }
8670else
8671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8672$as_echo "no" >&6; }
8673fi
8674
8675
8676  test -n "$PRINTF" && break
8677done
8678
8679  else
8680    # The variable is set, but is it from the command line or the environment?
8681
8682    # Try to remove the string !PRINTF! from our list.
8683    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8684    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8685      # If it failed, the variable was not from the command line. Ignore it,
8686      # but warn the user (except for BASH, which is always set by the calling BASH).
8687      if test "xPRINTF" != xBASH; then
8688        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8689$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8690      fi
8691      # Try to locate tool using the code snippet
8692      for ac_prog in printf
8693do
8694  # Extract the first word of "$ac_prog", so it can be a program name with args.
8695set dummy $ac_prog; ac_word=$2
8696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8697$as_echo_n "checking for $ac_word... " >&6; }
8698if ${ac_cv_path_PRINTF+:} false; then :
8699  $as_echo_n "(cached) " >&6
8700else
8701  case $PRINTF in
8702  [\\/]* | ?:[\\/]*)
8703  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8704  ;;
8705  *)
8706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8707for as_dir in $PATH
8708do
8709  IFS=$as_save_IFS
8710  test -z "$as_dir" && as_dir=.
8711    for ac_exec_ext in '' $ac_executable_extensions; do
8712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8713    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8715    break 2
8716  fi
8717done
8718  done
8719IFS=$as_save_IFS
8720
8721  ;;
8722esac
8723fi
8724PRINTF=$ac_cv_path_PRINTF
8725if test -n "$PRINTF"; then
8726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8727$as_echo "$PRINTF" >&6; }
8728else
8729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8730$as_echo "no" >&6; }
8731fi
8732
8733
8734  test -n "$PRINTF" && break
8735done
8736
8737    else
8738      # If it succeeded, then it was overridden by the user. We will use it
8739      # for the tool.
8740
8741      # First remove it from the list of overridden variables, so we can test
8742      # for unknown variables in the end.
8743      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8744
8745      # Check if the provided tool contains a complete path.
8746      tool_specified="$PRINTF"
8747      tool_basename="${tool_specified##*/}"
8748      if test "x$tool_basename" = "x$tool_specified"; then
8749        # A command without a complete path is provided, search $PATH.
8750        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8751$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8752        # Extract the first word of "$tool_basename", so it can be a program name with args.
8753set dummy $tool_basename; ac_word=$2
8754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8755$as_echo_n "checking for $ac_word... " >&6; }
8756if ${ac_cv_path_PRINTF+:} false; then :
8757  $as_echo_n "(cached) " >&6
8758else
8759  case $PRINTF in
8760  [\\/]* | ?:[\\/]*)
8761  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8762  ;;
8763  *)
8764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8765for as_dir in $PATH
8766do
8767  IFS=$as_save_IFS
8768  test -z "$as_dir" && as_dir=.
8769    for ac_exec_ext in '' $ac_executable_extensions; do
8770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8771    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8773    break 2
8774  fi
8775done
8776  done
8777IFS=$as_save_IFS
8778
8779  ;;
8780esac
8781fi
8782PRINTF=$ac_cv_path_PRINTF
8783if test -n "$PRINTF"; then
8784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8785$as_echo "$PRINTF" >&6; }
8786else
8787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8788$as_echo "no" >&6; }
8789fi
8790
8791
8792        if test "x$PRINTF" = x; then
8793          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8794        fi
8795      else
8796        # Otherwise we believe it is a complete path. Use it as it is.
8797        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8798$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8799        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8800$as_echo_n "checking for PRINTF... " >&6; }
8801        if test ! -x "$tool_specified"; then
8802          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8803$as_echo "not found" >&6; }
8804          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8805        fi
8806        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8807$as_echo "$tool_specified" >&6; }
8808      fi
8809    fi
8810  fi
8811
8812
8813
8814  if test "x$PRINTF" = x; then
8815    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8816  fi
8817
8818
8819
8820
8821
8822  # Publish this variable in the help.
8823
8824
8825  if test "x$RM" = x; then
8826    # The variable is not set by user, try to locate tool using the code snippet
8827    for ac_prog in rm
8828do
8829  # Extract the first word of "$ac_prog", so it can be a program name with args.
8830set dummy $ac_prog; ac_word=$2
8831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8832$as_echo_n "checking for $ac_word... " >&6; }
8833if ${ac_cv_path_RM+:} false; then :
8834  $as_echo_n "(cached) " >&6
8835else
8836  case $RM in
8837  [\\/]* | ?:[\\/]*)
8838  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8839  ;;
8840  *)
8841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8842for as_dir in $PATH
8843do
8844  IFS=$as_save_IFS
8845  test -z "$as_dir" && as_dir=.
8846    for ac_exec_ext in '' $ac_executable_extensions; do
8847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8848    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8850    break 2
8851  fi
8852done
8853  done
8854IFS=$as_save_IFS
8855
8856  ;;
8857esac
8858fi
8859RM=$ac_cv_path_RM
8860if test -n "$RM"; then
8861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8862$as_echo "$RM" >&6; }
8863else
8864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8865$as_echo "no" >&6; }
8866fi
8867
8868
8869  test -n "$RM" && break
8870done
8871
8872  else
8873    # The variable is set, but is it from the command line or the environment?
8874
8875    # Try to remove the string !RM! from our list.
8876    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8877    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8878      # If it failed, the variable was not from the command line. Ignore it,
8879      # but warn the user (except for BASH, which is always set by the calling BASH).
8880      if test "xRM" != xBASH; then
8881        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8882$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8883      fi
8884      # Try to locate tool using the code snippet
8885      for ac_prog in rm
8886do
8887  # Extract the first word of "$ac_prog", so it can be a program name with args.
8888set dummy $ac_prog; ac_word=$2
8889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8890$as_echo_n "checking for $ac_word... " >&6; }
8891if ${ac_cv_path_RM+:} false; then :
8892  $as_echo_n "(cached) " >&6
8893else
8894  case $RM in
8895  [\\/]* | ?:[\\/]*)
8896  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8897  ;;
8898  *)
8899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8900for as_dir in $PATH
8901do
8902  IFS=$as_save_IFS
8903  test -z "$as_dir" && as_dir=.
8904    for ac_exec_ext in '' $ac_executable_extensions; do
8905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8906    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8908    break 2
8909  fi
8910done
8911  done
8912IFS=$as_save_IFS
8913
8914  ;;
8915esac
8916fi
8917RM=$ac_cv_path_RM
8918if test -n "$RM"; then
8919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8920$as_echo "$RM" >&6; }
8921else
8922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8923$as_echo "no" >&6; }
8924fi
8925
8926
8927  test -n "$RM" && break
8928done
8929
8930    else
8931      # If it succeeded, then it was overridden by the user. We will use it
8932      # for the tool.
8933
8934      # First remove it from the list of overridden variables, so we can test
8935      # for unknown variables in the end.
8936      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8937
8938      # Check if the provided tool contains a complete path.
8939      tool_specified="$RM"
8940      tool_basename="${tool_specified##*/}"
8941      if test "x$tool_basename" = "x$tool_specified"; then
8942        # A command without a complete path is provided, search $PATH.
8943        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8944$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8945        # Extract the first word of "$tool_basename", so it can be a program name with args.
8946set dummy $tool_basename; ac_word=$2
8947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8948$as_echo_n "checking for $ac_word... " >&6; }
8949if ${ac_cv_path_RM+:} false; then :
8950  $as_echo_n "(cached) " >&6
8951else
8952  case $RM in
8953  [\\/]* | ?:[\\/]*)
8954  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8955  ;;
8956  *)
8957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8958for as_dir in $PATH
8959do
8960  IFS=$as_save_IFS
8961  test -z "$as_dir" && as_dir=.
8962    for ac_exec_ext in '' $ac_executable_extensions; do
8963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8964    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8966    break 2
8967  fi
8968done
8969  done
8970IFS=$as_save_IFS
8971
8972  ;;
8973esac
8974fi
8975RM=$ac_cv_path_RM
8976if test -n "$RM"; then
8977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8978$as_echo "$RM" >&6; }
8979else
8980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8981$as_echo "no" >&6; }
8982fi
8983
8984
8985        if test "x$RM" = x; then
8986          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8987        fi
8988      else
8989        # Otherwise we believe it is a complete path. Use it as it is.
8990        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
8991$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
8992        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
8993$as_echo_n "checking for RM... " >&6; }
8994        if test ! -x "$tool_specified"; then
8995          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8996$as_echo "not found" >&6; }
8997          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
8998        fi
8999        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9000$as_echo "$tool_specified" >&6; }
9001      fi
9002    fi
9003  fi
9004
9005
9006
9007  if test "x$RM" = x; then
9008    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9009  fi
9010
9011
9012
9013
9014
9015  # Publish this variable in the help.
9016
9017
9018  if test "x$SH" = x; then
9019    # The variable is not set by user, try to locate tool using the code snippet
9020    for ac_prog in sh
9021do
9022  # Extract the first word of "$ac_prog", so it can be a program name with args.
9023set dummy $ac_prog; ac_word=$2
9024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9025$as_echo_n "checking for $ac_word... " >&6; }
9026if ${ac_cv_path_SH+:} false; then :
9027  $as_echo_n "(cached) " >&6
9028else
9029  case $SH in
9030  [\\/]* | ?:[\\/]*)
9031  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9032  ;;
9033  *)
9034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9035for as_dir in $PATH
9036do
9037  IFS=$as_save_IFS
9038  test -z "$as_dir" && as_dir=.
9039    for ac_exec_ext in '' $ac_executable_extensions; do
9040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9041    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9043    break 2
9044  fi
9045done
9046  done
9047IFS=$as_save_IFS
9048
9049  ;;
9050esac
9051fi
9052SH=$ac_cv_path_SH
9053if test -n "$SH"; then
9054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9055$as_echo "$SH" >&6; }
9056else
9057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9058$as_echo "no" >&6; }
9059fi
9060
9061
9062  test -n "$SH" && break
9063done
9064
9065  else
9066    # The variable is set, but is it from the command line or the environment?
9067
9068    # Try to remove the string !SH! from our list.
9069    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9070    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9071      # If it failed, the variable was not from the command line. Ignore it,
9072      # but warn the user (except for BASH, which is always set by the calling BASH).
9073      if test "xSH" != xBASH; then
9074        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9075$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9076      fi
9077      # Try to locate tool using the code snippet
9078      for ac_prog in sh
9079do
9080  # Extract the first word of "$ac_prog", so it can be a program name with args.
9081set dummy $ac_prog; ac_word=$2
9082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9083$as_echo_n "checking for $ac_word... " >&6; }
9084if ${ac_cv_path_SH+:} false; then :
9085  $as_echo_n "(cached) " >&6
9086else
9087  case $SH in
9088  [\\/]* | ?:[\\/]*)
9089  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9090  ;;
9091  *)
9092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9093for as_dir in $PATH
9094do
9095  IFS=$as_save_IFS
9096  test -z "$as_dir" && as_dir=.
9097    for ac_exec_ext in '' $ac_executable_extensions; do
9098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9099    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9101    break 2
9102  fi
9103done
9104  done
9105IFS=$as_save_IFS
9106
9107  ;;
9108esac
9109fi
9110SH=$ac_cv_path_SH
9111if test -n "$SH"; then
9112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9113$as_echo "$SH" >&6; }
9114else
9115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9116$as_echo "no" >&6; }
9117fi
9118
9119
9120  test -n "$SH" && break
9121done
9122
9123    else
9124      # If it succeeded, then it was overridden by the user. We will use it
9125      # for the tool.
9126
9127      # First remove it from the list of overridden variables, so we can test
9128      # for unknown variables in the end.
9129      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9130
9131      # Check if the provided tool contains a complete path.
9132      tool_specified="$SH"
9133      tool_basename="${tool_specified##*/}"
9134      if test "x$tool_basename" = "x$tool_specified"; then
9135        # A command without a complete path is provided, search $PATH.
9136        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9137$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9138        # Extract the first word of "$tool_basename", so it can be a program name with args.
9139set dummy $tool_basename; ac_word=$2
9140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9141$as_echo_n "checking for $ac_word... " >&6; }
9142if ${ac_cv_path_SH+:} false; then :
9143  $as_echo_n "(cached) " >&6
9144else
9145  case $SH in
9146  [\\/]* | ?:[\\/]*)
9147  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9148  ;;
9149  *)
9150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9151for as_dir in $PATH
9152do
9153  IFS=$as_save_IFS
9154  test -z "$as_dir" && as_dir=.
9155    for ac_exec_ext in '' $ac_executable_extensions; do
9156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9157    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9159    break 2
9160  fi
9161done
9162  done
9163IFS=$as_save_IFS
9164
9165  ;;
9166esac
9167fi
9168SH=$ac_cv_path_SH
9169if test -n "$SH"; then
9170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9171$as_echo "$SH" >&6; }
9172else
9173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9174$as_echo "no" >&6; }
9175fi
9176
9177
9178        if test "x$SH" = x; then
9179          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9180        fi
9181      else
9182        # Otherwise we believe it is a complete path. Use it as it is.
9183        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9184$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9185        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9186$as_echo_n "checking for SH... " >&6; }
9187        if test ! -x "$tool_specified"; then
9188          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9189$as_echo "not found" >&6; }
9190          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9191        fi
9192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9193$as_echo "$tool_specified" >&6; }
9194      fi
9195    fi
9196  fi
9197
9198
9199
9200  if test "x$SH" = x; then
9201    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9202  fi
9203
9204
9205
9206
9207
9208  # Publish this variable in the help.
9209
9210
9211  if test "x$SORT" = x; then
9212    # The variable is not set by user, try to locate tool using the code snippet
9213    for ac_prog in sort
9214do
9215  # Extract the first word of "$ac_prog", so it can be a program name with args.
9216set dummy $ac_prog; ac_word=$2
9217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9218$as_echo_n "checking for $ac_word... " >&6; }
9219if ${ac_cv_path_SORT+:} false; then :
9220  $as_echo_n "(cached) " >&6
9221else
9222  case $SORT in
9223  [\\/]* | ?:[\\/]*)
9224  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9225  ;;
9226  *)
9227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9228for as_dir in $PATH
9229do
9230  IFS=$as_save_IFS
9231  test -z "$as_dir" && as_dir=.
9232    for ac_exec_ext in '' $ac_executable_extensions; do
9233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9234    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9236    break 2
9237  fi
9238done
9239  done
9240IFS=$as_save_IFS
9241
9242  ;;
9243esac
9244fi
9245SORT=$ac_cv_path_SORT
9246if test -n "$SORT"; then
9247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9248$as_echo "$SORT" >&6; }
9249else
9250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9251$as_echo "no" >&6; }
9252fi
9253
9254
9255  test -n "$SORT" && break
9256done
9257
9258  else
9259    # The variable is set, but is it from the command line or the environment?
9260
9261    # Try to remove the string !SORT! from our list.
9262    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9263    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9264      # If it failed, the variable was not from the command line. Ignore it,
9265      # but warn the user (except for BASH, which is always set by the calling BASH).
9266      if test "xSORT" != xBASH; then
9267        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9268$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9269      fi
9270      # Try to locate tool using the code snippet
9271      for ac_prog in sort
9272do
9273  # Extract the first word of "$ac_prog", so it can be a program name with args.
9274set dummy $ac_prog; ac_word=$2
9275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9276$as_echo_n "checking for $ac_word... " >&6; }
9277if ${ac_cv_path_SORT+:} false; then :
9278  $as_echo_n "(cached) " >&6
9279else
9280  case $SORT in
9281  [\\/]* | ?:[\\/]*)
9282  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9283  ;;
9284  *)
9285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9286for as_dir in $PATH
9287do
9288  IFS=$as_save_IFS
9289  test -z "$as_dir" && as_dir=.
9290    for ac_exec_ext in '' $ac_executable_extensions; do
9291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9292    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9294    break 2
9295  fi
9296done
9297  done
9298IFS=$as_save_IFS
9299
9300  ;;
9301esac
9302fi
9303SORT=$ac_cv_path_SORT
9304if test -n "$SORT"; then
9305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9306$as_echo "$SORT" >&6; }
9307else
9308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9309$as_echo "no" >&6; }
9310fi
9311
9312
9313  test -n "$SORT" && break
9314done
9315
9316    else
9317      # If it succeeded, then it was overridden by the user. We will use it
9318      # for the tool.
9319
9320      # First remove it from the list of overridden variables, so we can test
9321      # for unknown variables in the end.
9322      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9323
9324      # Check if the provided tool contains a complete path.
9325      tool_specified="$SORT"
9326      tool_basename="${tool_specified##*/}"
9327      if test "x$tool_basename" = "x$tool_specified"; then
9328        # A command without a complete path is provided, search $PATH.
9329        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9330$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9331        # Extract the first word of "$tool_basename", so it can be a program name with args.
9332set dummy $tool_basename; ac_word=$2
9333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9334$as_echo_n "checking for $ac_word... " >&6; }
9335if ${ac_cv_path_SORT+:} false; then :
9336  $as_echo_n "(cached) " >&6
9337else
9338  case $SORT in
9339  [\\/]* | ?:[\\/]*)
9340  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9341  ;;
9342  *)
9343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9344for as_dir in $PATH
9345do
9346  IFS=$as_save_IFS
9347  test -z "$as_dir" && as_dir=.
9348    for ac_exec_ext in '' $ac_executable_extensions; do
9349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9350    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9352    break 2
9353  fi
9354done
9355  done
9356IFS=$as_save_IFS
9357
9358  ;;
9359esac
9360fi
9361SORT=$ac_cv_path_SORT
9362if test -n "$SORT"; then
9363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9364$as_echo "$SORT" >&6; }
9365else
9366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9367$as_echo "no" >&6; }
9368fi
9369
9370
9371        if test "x$SORT" = x; then
9372          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9373        fi
9374      else
9375        # Otherwise we believe it is a complete path. Use it as it is.
9376        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9377$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9378        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9379$as_echo_n "checking for SORT... " >&6; }
9380        if test ! -x "$tool_specified"; then
9381          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9382$as_echo "not found" >&6; }
9383          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9384        fi
9385        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9386$as_echo "$tool_specified" >&6; }
9387      fi
9388    fi
9389  fi
9390
9391
9392
9393  if test "x$SORT" = x; then
9394    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9395  fi
9396
9397
9398
9399
9400
9401  # Publish this variable in the help.
9402
9403
9404  if test "x$TAIL" = x; then
9405    # The variable is not set by user, try to locate tool using the code snippet
9406    for ac_prog in tail
9407do
9408  # Extract the first word of "$ac_prog", so it can be a program name with args.
9409set dummy $ac_prog; ac_word=$2
9410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9411$as_echo_n "checking for $ac_word... " >&6; }
9412if ${ac_cv_path_TAIL+:} false; then :
9413  $as_echo_n "(cached) " >&6
9414else
9415  case $TAIL in
9416  [\\/]* | ?:[\\/]*)
9417  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9418  ;;
9419  *)
9420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9421for as_dir in $PATH
9422do
9423  IFS=$as_save_IFS
9424  test -z "$as_dir" && as_dir=.
9425    for ac_exec_ext in '' $ac_executable_extensions; do
9426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9427    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9429    break 2
9430  fi
9431done
9432  done
9433IFS=$as_save_IFS
9434
9435  ;;
9436esac
9437fi
9438TAIL=$ac_cv_path_TAIL
9439if test -n "$TAIL"; then
9440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9441$as_echo "$TAIL" >&6; }
9442else
9443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9444$as_echo "no" >&6; }
9445fi
9446
9447
9448  test -n "$TAIL" && break
9449done
9450
9451  else
9452    # The variable is set, but is it from the command line or the environment?
9453
9454    # Try to remove the string !TAIL! from our list.
9455    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9456    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9457      # If it failed, the variable was not from the command line. Ignore it,
9458      # but warn the user (except for BASH, which is always set by the calling BASH).
9459      if test "xTAIL" != xBASH; then
9460        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9461$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9462      fi
9463      # Try to locate tool using the code snippet
9464      for ac_prog in tail
9465do
9466  # Extract the first word of "$ac_prog", so it can be a program name with args.
9467set dummy $ac_prog; ac_word=$2
9468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9469$as_echo_n "checking for $ac_word... " >&6; }
9470if ${ac_cv_path_TAIL+:} false; then :
9471  $as_echo_n "(cached) " >&6
9472else
9473  case $TAIL in
9474  [\\/]* | ?:[\\/]*)
9475  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9476  ;;
9477  *)
9478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9479for as_dir in $PATH
9480do
9481  IFS=$as_save_IFS
9482  test -z "$as_dir" && as_dir=.
9483    for ac_exec_ext in '' $ac_executable_extensions; do
9484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9485    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9487    break 2
9488  fi
9489done
9490  done
9491IFS=$as_save_IFS
9492
9493  ;;
9494esac
9495fi
9496TAIL=$ac_cv_path_TAIL
9497if test -n "$TAIL"; then
9498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9499$as_echo "$TAIL" >&6; }
9500else
9501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9502$as_echo "no" >&6; }
9503fi
9504
9505
9506  test -n "$TAIL" && break
9507done
9508
9509    else
9510      # If it succeeded, then it was overridden by the user. We will use it
9511      # for the tool.
9512
9513      # First remove it from the list of overridden variables, so we can test
9514      # for unknown variables in the end.
9515      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9516
9517      # Check if the provided tool contains a complete path.
9518      tool_specified="$TAIL"
9519      tool_basename="${tool_specified##*/}"
9520      if test "x$tool_basename" = "x$tool_specified"; then
9521        # A command without a complete path is provided, search $PATH.
9522        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9523$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9524        # Extract the first word of "$tool_basename", so it can be a program name with args.
9525set dummy $tool_basename; ac_word=$2
9526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9527$as_echo_n "checking for $ac_word... " >&6; }
9528if ${ac_cv_path_TAIL+:} false; then :
9529  $as_echo_n "(cached) " >&6
9530else
9531  case $TAIL in
9532  [\\/]* | ?:[\\/]*)
9533  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9534  ;;
9535  *)
9536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9537for as_dir in $PATH
9538do
9539  IFS=$as_save_IFS
9540  test -z "$as_dir" && as_dir=.
9541    for ac_exec_ext in '' $ac_executable_extensions; do
9542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9543    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9545    break 2
9546  fi
9547done
9548  done
9549IFS=$as_save_IFS
9550
9551  ;;
9552esac
9553fi
9554TAIL=$ac_cv_path_TAIL
9555if test -n "$TAIL"; then
9556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9557$as_echo "$TAIL" >&6; }
9558else
9559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9560$as_echo "no" >&6; }
9561fi
9562
9563
9564        if test "x$TAIL" = x; then
9565          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9566        fi
9567      else
9568        # Otherwise we believe it is a complete path. Use it as it is.
9569        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9570$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9571        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9572$as_echo_n "checking for TAIL... " >&6; }
9573        if test ! -x "$tool_specified"; then
9574          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9575$as_echo "not found" >&6; }
9576          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9577        fi
9578        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9579$as_echo "$tool_specified" >&6; }
9580      fi
9581    fi
9582  fi
9583
9584
9585
9586  if test "x$TAIL" = x; then
9587    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9588  fi
9589
9590
9591
9592
9593
9594  # Publish this variable in the help.
9595
9596
9597  if test "x$TAR" = x; then
9598    # The variable is not set by user, try to locate tool using the code snippet
9599    for ac_prog in tar
9600do
9601  # Extract the first word of "$ac_prog", so it can be a program name with args.
9602set dummy $ac_prog; ac_word=$2
9603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9604$as_echo_n "checking for $ac_word... " >&6; }
9605if ${ac_cv_path_TAR+:} false; then :
9606  $as_echo_n "(cached) " >&6
9607else
9608  case $TAR in
9609  [\\/]* | ?:[\\/]*)
9610  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9611  ;;
9612  *)
9613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9614for as_dir in $PATH
9615do
9616  IFS=$as_save_IFS
9617  test -z "$as_dir" && as_dir=.
9618    for ac_exec_ext in '' $ac_executable_extensions; do
9619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9620    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9622    break 2
9623  fi
9624done
9625  done
9626IFS=$as_save_IFS
9627
9628  ;;
9629esac
9630fi
9631TAR=$ac_cv_path_TAR
9632if test -n "$TAR"; then
9633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9634$as_echo "$TAR" >&6; }
9635else
9636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9637$as_echo "no" >&6; }
9638fi
9639
9640
9641  test -n "$TAR" && break
9642done
9643
9644  else
9645    # The variable is set, but is it from the command line or the environment?
9646
9647    # Try to remove the string !TAR! from our list.
9648    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9649    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9650      # If it failed, the variable was not from the command line. Ignore it,
9651      # but warn the user (except for BASH, which is always set by the calling BASH).
9652      if test "xTAR" != xBASH; then
9653        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9654$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9655      fi
9656      # Try to locate tool using the code snippet
9657      for ac_prog in tar
9658do
9659  # Extract the first word of "$ac_prog", so it can be a program name with args.
9660set dummy $ac_prog; ac_word=$2
9661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9662$as_echo_n "checking for $ac_word... " >&6; }
9663if ${ac_cv_path_TAR+:} false; then :
9664  $as_echo_n "(cached) " >&6
9665else
9666  case $TAR in
9667  [\\/]* | ?:[\\/]*)
9668  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9669  ;;
9670  *)
9671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9672for as_dir in $PATH
9673do
9674  IFS=$as_save_IFS
9675  test -z "$as_dir" && as_dir=.
9676    for ac_exec_ext in '' $ac_executable_extensions; do
9677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9678    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9680    break 2
9681  fi
9682done
9683  done
9684IFS=$as_save_IFS
9685
9686  ;;
9687esac
9688fi
9689TAR=$ac_cv_path_TAR
9690if test -n "$TAR"; then
9691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9692$as_echo "$TAR" >&6; }
9693else
9694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9695$as_echo "no" >&6; }
9696fi
9697
9698
9699  test -n "$TAR" && break
9700done
9701
9702    else
9703      # If it succeeded, then it was overridden by the user. We will use it
9704      # for the tool.
9705
9706      # First remove it from the list of overridden variables, so we can test
9707      # for unknown variables in the end.
9708      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9709
9710      # Check if the provided tool contains a complete path.
9711      tool_specified="$TAR"
9712      tool_basename="${tool_specified##*/}"
9713      if test "x$tool_basename" = "x$tool_specified"; then
9714        # A command without a complete path is provided, search $PATH.
9715        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9716$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9717        # Extract the first word of "$tool_basename", so it can be a program name with args.
9718set dummy $tool_basename; ac_word=$2
9719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9720$as_echo_n "checking for $ac_word... " >&6; }
9721if ${ac_cv_path_TAR+:} false; then :
9722  $as_echo_n "(cached) " >&6
9723else
9724  case $TAR in
9725  [\\/]* | ?:[\\/]*)
9726  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9727  ;;
9728  *)
9729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9730for as_dir in $PATH
9731do
9732  IFS=$as_save_IFS
9733  test -z "$as_dir" && as_dir=.
9734    for ac_exec_ext in '' $ac_executable_extensions; do
9735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9736    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9738    break 2
9739  fi
9740done
9741  done
9742IFS=$as_save_IFS
9743
9744  ;;
9745esac
9746fi
9747TAR=$ac_cv_path_TAR
9748if test -n "$TAR"; then
9749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9750$as_echo "$TAR" >&6; }
9751else
9752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9753$as_echo "no" >&6; }
9754fi
9755
9756
9757        if test "x$TAR" = x; then
9758          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9759        fi
9760      else
9761        # Otherwise we believe it is a complete path. Use it as it is.
9762        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9763$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9764        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9765$as_echo_n "checking for TAR... " >&6; }
9766        if test ! -x "$tool_specified"; then
9767          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9768$as_echo "not found" >&6; }
9769          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9770        fi
9771        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9772$as_echo "$tool_specified" >&6; }
9773      fi
9774    fi
9775  fi
9776
9777
9778
9779  if test "x$TAR" = x; then
9780    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9781  fi
9782
9783
9784
9785
9786
9787  # Publish this variable in the help.
9788
9789
9790  if test "x$TEE" = x; then
9791    # The variable is not set by user, try to locate tool using the code snippet
9792    for ac_prog in tee
9793do
9794  # Extract the first word of "$ac_prog", so it can be a program name with args.
9795set dummy $ac_prog; ac_word=$2
9796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9797$as_echo_n "checking for $ac_word... " >&6; }
9798if ${ac_cv_path_TEE+:} false; then :
9799  $as_echo_n "(cached) " >&6
9800else
9801  case $TEE in
9802  [\\/]* | ?:[\\/]*)
9803  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9804  ;;
9805  *)
9806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9807for as_dir in $PATH
9808do
9809  IFS=$as_save_IFS
9810  test -z "$as_dir" && as_dir=.
9811    for ac_exec_ext in '' $ac_executable_extensions; do
9812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9813    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9815    break 2
9816  fi
9817done
9818  done
9819IFS=$as_save_IFS
9820
9821  ;;
9822esac
9823fi
9824TEE=$ac_cv_path_TEE
9825if test -n "$TEE"; then
9826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9827$as_echo "$TEE" >&6; }
9828else
9829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9830$as_echo "no" >&6; }
9831fi
9832
9833
9834  test -n "$TEE" && break
9835done
9836
9837  else
9838    # The variable is set, but is it from the command line or the environment?
9839
9840    # Try to remove the string !TEE! from our list.
9841    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9842    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9843      # If it failed, the variable was not from the command line. Ignore it,
9844      # but warn the user (except for BASH, which is always set by the calling BASH).
9845      if test "xTEE" != xBASH; then
9846        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9847$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9848      fi
9849      # Try to locate tool using the code snippet
9850      for ac_prog in tee
9851do
9852  # Extract the first word of "$ac_prog", so it can be a program name with args.
9853set dummy $ac_prog; ac_word=$2
9854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9855$as_echo_n "checking for $ac_word... " >&6; }
9856if ${ac_cv_path_TEE+:} false; then :
9857  $as_echo_n "(cached) " >&6
9858else
9859  case $TEE in
9860  [\\/]* | ?:[\\/]*)
9861  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9862  ;;
9863  *)
9864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9865for as_dir in $PATH
9866do
9867  IFS=$as_save_IFS
9868  test -z "$as_dir" && as_dir=.
9869    for ac_exec_ext in '' $ac_executable_extensions; do
9870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9871    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9873    break 2
9874  fi
9875done
9876  done
9877IFS=$as_save_IFS
9878
9879  ;;
9880esac
9881fi
9882TEE=$ac_cv_path_TEE
9883if test -n "$TEE"; then
9884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9885$as_echo "$TEE" >&6; }
9886else
9887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9888$as_echo "no" >&6; }
9889fi
9890
9891
9892  test -n "$TEE" && break
9893done
9894
9895    else
9896      # If it succeeded, then it was overridden by the user. We will use it
9897      # for the tool.
9898
9899      # First remove it from the list of overridden variables, so we can test
9900      # for unknown variables in the end.
9901      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9902
9903      # Check if the provided tool contains a complete path.
9904      tool_specified="$TEE"
9905      tool_basename="${tool_specified##*/}"
9906      if test "x$tool_basename" = "x$tool_specified"; then
9907        # A command without a complete path is provided, search $PATH.
9908        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9909$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9910        # Extract the first word of "$tool_basename", so it can be a program name with args.
9911set dummy $tool_basename; ac_word=$2
9912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9913$as_echo_n "checking for $ac_word... " >&6; }
9914if ${ac_cv_path_TEE+:} false; then :
9915  $as_echo_n "(cached) " >&6
9916else
9917  case $TEE in
9918  [\\/]* | ?:[\\/]*)
9919  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9920  ;;
9921  *)
9922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9923for as_dir in $PATH
9924do
9925  IFS=$as_save_IFS
9926  test -z "$as_dir" && as_dir=.
9927    for ac_exec_ext in '' $ac_executable_extensions; do
9928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9929    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9931    break 2
9932  fi
9933done
9934  done
9935IFS=$as_save_IFS
9936
9937  ;;
9938esac
9939fi
9940TEE=$ac_cv_path_TEE
9941if test -n "$TEE"; then
9942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9943$as_echo "$TEE" >&6; }
9944else
9945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9946$as_echo "no" >&6; }
9947fi
9948
9949
9950        if test "x$TEE" = x; then
9951          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9952        fi
9953      else
9954        # Otherwise we believe it is a complete path. Use it as it is.
9955        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9956$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9957        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9958$as_echo_n "checking for TEE... " >&6; }
9959        if test ! -x "$tool_specified"; then
9960          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9961$as_echo "not found" >&6; }
9962          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9963        fi
9964        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9965$as_echo "$tool_specified" >&6; }
9966      fi
9967    fi
9968  fi
9969
9970
9971
9972  if test "x$TEE" = x; then
9973    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
9974  fi
9975
9976
9977
9978
9979
9980  # Publish this variable in the help.
9981
9982
9983  if test "x$TOUCH" = x; then
9984    # The variable is not set by user, try to locate tool using the code snippet
9985    for ac_prog in touch
9986do
9987  # Extract the first word of "$ac_prog", so it can be a program name with args.
9988set dummy $ac_prog; ac_word=$2
9989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9990$as_echo_n "checking for $ac_word... " >&6; }
9991if ${ac_cv_path_TOUCH+:} false; then :
9992  $as_echo_n "(cached) " >&6
9993else
9994  case $TOUCH in
9995  [\\/]* | ?:[\\/]*)
9996  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
9997  ;;
9998  *)
9999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10000for as_dir in $PATH
10001do
10002  IFS=$as_save_IFS
10003  test -z "$as_dir" && as_dir=.
10004    for ac_exec_ext in '' $ac_executable_extensions; do
10005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10006    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10008    break 2
10009  fi
10010done
10011  done
10012IFS=$as_save_IFS
10013
10014  ;;
10015esac
10016fi
10017TOUCH=$ac_cv_path_TOUCH
10018if test -n "$TOUCH"; then
10019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10020$as_echo "$TOUCH" >&6; }
10021else
10022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10023$as_echo "no" >&6; }
10024fi
10025
10026
10027  test -n "$TOUCH" && break
10028done
10029
10030  else
10031    # The variable is set, but is it from the command line or the environment?
10032
10033    # Try to remove the string !TOUCH! from our list.
10034    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10035    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10036      # If it failed, the variable was not from the command line. Ignore it,
10037      # but warn the user (except for BASH, which is always set by the calling BASH).
10038      if test "xTOUCH" != xBASH; then
10039        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10040$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10041      fi
10042      # Try to locate tool using the code snippet
10043      for ac_prog in touch
10044do
10045  # Extract the first word of "$ac_prog", so it can be a program name with args.
10046set dummy $ac_prog; ac_word=$2
10047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10048$as_echo_n "checking for $ac_word... " >&6; }
10049if ${ac_cv_path_TOUCH+:} false; then :
10050  $as_echo_n "(cached) " >&6
10051else
10052  case $TOUCH in
10053  [\\/]* | ?:[\\/]*)
10054  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10055  ;;
10056  *)
10057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10058for as_dir in $PATH
10059do
10060  IFS=$as_save_IFS
10061  test -z "$as_dir" && as_dir=.
10062    for ac_exec_ext in '' $ac_executable_extensions; do
10063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10064    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10066    break 2
10067  fi
10068done
10069  done
10070IFS=$as_save_IFS
10071
10072  ;;
10073esac
10074fi
10075TOUCH=$ac_cv_path_TOUCH
10076if test -n "$TOUCH"; then
10077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10078$as_echo "$TOUCH" >&6; }
10079else
10080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10081$as_echo "no" >&6; }
10082fi
10083
10084
10085  test -n "$TOUCH" && break
10086done
10087
10088    else
10089      # If it succeeded, then it was overridden by the user. We will use it
10090      # for the tool.
10091
10092      # First remove it from the list of overridden variables, so we can test
10093      # for unknown variables in the end.
10094      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10095
10096      # Check if the provided tool contains a complete path.
10097      tool_specified="$TOUCH"
10098      tool_basename="${tool_specified##*/}"
10099      if test "x$tool_basename" = "x$tool_specified"; then
10100        # A command without a complete path is provided, search $PATH.
10101        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10102$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10103        # Extract the first word of "$tool_basename", so it can be a program name with args.
10104set dummy $tool_basename; ac_word=$2
10105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10106$as_echo_n "checking for $ac_word... " >&6; }
10107if ${ac_cv_path_TOUCH+:} false; then :
10108  $as_echo_n "(cached) " >&6
10109else
10110  case $TOUCH in
10111  [\\/]* | ?:[\\/]*)
10112  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10113  ;;
10114  *)
10115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10116for as_dir in $PATH
10117do
10118  IFS=$as_save_IFS
10119  test -z "$as_dir" && as_dir=.
10120    for ac_exec_ext in '' $ac_executable_extensions; do
10121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10122    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10124    break 2
10125  fi
10126done
10127  done
10128IFS=$as_save_IFS
10129
10130  ;;
10131esac
10132fi
10133TOUCH=$ac_cv_path_TOUCH
10134if test -n "$TOUCH"; then
10135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10136$as_echo "$TOUCH" >&6; }
10137else
10138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10139$as_echo "no" >&6; }
10140fi
10141
10142
10143        if test "x$TOUCH" = x; then
10144          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10145        fi
10146      else
10147        # Otherwise we believe it is a complete path. Use it as it is.
10148        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10149$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10150        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10151$as_echo_n "checking for TOUCH... " >&6; }
10152        if test ! -x "$tool_specified"; then
10153          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10154$as_echo "not found" >&6; }
10155          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10156        fi
10157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10158$as_echo "$tool_specified" >&6; }
10159      fi
10160    fi
10161  fi
10162
10163
10164
10165  if test "x$TOUCH" = x; then
10166    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10167  fi
10168
10169
10170
10171
10172
10173  # Publish this variable in the help.
10174
10175
10176  if test "x$TR" = x; then
10177    # The variable is not set by user, try to locate tool using the code snippet
10178    for ac_prog in tr
10179do
10180  # Extract the first word of "$ac_prog", so it can be a program name with args.
10181set dummy $ac_prog; ac_word=$2
10182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10183$as_echo_n "checking for $ac_word... " >&6; }
10184if ${ac_cv_path_TR+:} false; then :
10185  $as_echo_n "(cached) " >&6
10186else
10187  case $TR in
10188  [\\/]* | ?:[\\/]*)
10189  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10190  ;;
10191  *)
10192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10193for as_dir in $PATH
10194do
10195  IFS=$as_save_IFS
10196  test -z "$as_dir" && as_dir=.
10197    for ac_exec_ext in '' $ac_executable_extensions; do
10198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10199    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10201    break 2
10202  fi
10203done
10204  done
10205IFS=$as_save_IFS
10206
10207  ;;
10208esac
10209fi
10210TR=$ac_cv_path_TR
10211if test -n "$TR"; then
10212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10213$as_echo "$TR" >&6; }
10214else
10215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10216$as_echo "no" >&6; }
10217fi
10218
10219
10220  test -n "$TR" && break
10221done
10222
10223  else
10224    # The variable is set, but is it from the command line or the environment?
10225
10226    # Try to remove the string !TR! from our list.
10227    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10228    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10229      # If it failed, the variable was not from the command line. Ignore it,
10230      # but warn the user (except for BASH, which is always set by the calling BASH).
10231      if test "xTR" != xBASH; then
10232        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10233$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10234      fi
10235      # Try to locate tool using the code snippet
10236      for ac_prog in tr
10237do
10238  # Extract the first word of "$ac_prog", so it can be a program name with args.
10239set dummy $ac_prog; ac_word=$2
10240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10241$as_echo_n "checking for $ac_word... " >&6; }
10242if ${ac_cv_path_TR+:} false; then :
10243  $as_echo_n "(cached) " >&6
10244else
10245  case $TR in
10246  [\\/]* | ?:[\\/]*)
10247  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10248  ;;
10249  *)
10250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10251for as_dir in $PATH
10252do
10253  IFS=$as_save_IFS
10254  test -z "$as_dir" && as_dir=.
10255    for ac_exec_ext in '' $ac_executable_extensions; do
10256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10257    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10259    break 2
10260  fi
10261done
10262  done
10263IFS=$as_save_IFS
10264
10265  ;;
10266esac
10267fi
10268TR=$ac_cv_path_TR
10269if test -n "$TR"; then
10270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10271$as_echo "$TR" >&6; }
10272else
10273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10274$as_echo "no" >&6; }
10275fi
10276
10277
10278  test -n "$TR" && break
10279done
10280
10281    else
10282      # If it succeeded, then it was overridden by the user. We will use it
10283      # for the tool.
10284
10285      # First remove it from the list of overridden variables, so we can test
10286      # for unknown variables in the end.
10287      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10288
10289      # Check if the provided tool contains a complete path.
10290      tool_specified="$TR"
10291      tool_basename="${tool_specified##*/}"
10292      if test "x$tool_basename" = "x$tool_specified"; then
10293        # A command without a complete path is provided, search $PATH.
10294        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10295$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10296        # Extract the first word of "$tool_basename", so it can be a program name with args.
10297set dummy $tool_basename; ac_word=$2
10298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10299$as_echo_n "checking for $ac_word... " >&6; }
10300if ${ac_cv_path_TR+:} false; then :
10301  $as_echo_n "(cached) " >&6
10302else
10303  case $TR in
10304  [\\/]* | ?:[\\/]*)
10305  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10306  ;;
10307  *)
10308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10309for as_dir in $PATH
10310do
10311  IFS=$as_save_IFS
10312  test -z "$as_dir" && as_dir=.
10313    for ac_exec_ext in '' $ac_executable_extensions; do
10314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10315    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10317    break 2
10318  fi
10319done
10320  done
10321IFS=$as_save_IFS
10322
10323  ;;
10324esac
10325fi
10326TR=$ac_cv_path_TR
10327if test -n "$TR"; then
10328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10329$as_echo "$TR" >&6; }
10330else
10331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10332$as_echo "no" >&6; }
10333fi
10334
10335
10336        if test "x$TR" = x; then
10337          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10338        fi
10339      else
10340        # Otherwise we believe it is a complete path. Use it as it is.
10341        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10342$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10343        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10344$as_echo_n "checking for TR... " >&6; }
10345        if test ! -x "$tool_specified"; then
10346          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10347$as_echo "not found" >&6; }
10348          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10349        fi
10350        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10351$as_echo "$tool_specified" >&6; }
10352      fi
10353    fi
10354  fi
10355
10356
10357
10358  if test "x$TR" = x; then
10359    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10360  fi
10361
10362
10363
10364
10365
10366  # Publish this variable in the help.
10367
10368
10369  if test "x$UNAME" = x; then
10370    # The variable is not set by user, try to locate tool using the code snippet
10371    for ac_prog in uname
10372do
10373  # Extract the first word of "$ac_prog", so it can be a program name with args.
10374set dummy $ac_prog; ac_word=$2
10375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10376$as_echo_n "checking for $ac_word... " >&6; }
10377if ${ac_cv_path_UNAME+:} false; then :
10378  $as_echo_n "(cached) " >&6
10379else
10380  case $UNAME in
10381  [\\/]* | ?:[\\/]*)
10382  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10383  ;;
10384  *)
10385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10386for as_dir in $PATH
10387do
10388  IFS=$as_save_IFS
10389  test -z "$as_dir" && as_dir=.
10390    for ac_exec_ext in '' $ac_executable_extensions; do
10391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10392    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10394    break 2
10395  fi
10396done
10397  done
10398IFS=$as_save_IFS
10399
10400  ;;
10401esac
10402fi
10403UNAME=$ac_cv_path_UNAME
10404if test -n "$UNAME"; then
10405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10406$as_echo "$UNAME" >&6; }
10407else
10408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10409$as_echo "no" >&6; }
10410fi
10411
10412
10413  test -n "$UNAME" && break
10414done
10415
10416  else
10417    # The variable is set, but is it from the command line or the environment?
10418
10419    # Try to remove the string !UNAME! from our list.
10420    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10421    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10422      # If it failed, the variable was not from the command line. Ignore it,
10423      # but warn the user (except for BASH, which is always set by the calling BASH).
10424      if test "xUNAME" != xBASH; then
10425        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10426$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10427      fi
10428      # Try to locate tool using the code snippet
10429      for ac_prog in uname
10430do
10431  # Extract the first word of "$ac_prog", so it can be a program name with args.
10432set dummy $ac_prog; ac_word=$2
10433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10434$as_echo_n "checking for $ac_word... " >&6; }
10435if ${ac_cv_path_UNAME+:} false; then :
10436  $as_echo_n "(cached) " >&6
10437else
10438  case $UNAME in
10439  [\\/]* | ?:[\\/]*)
10440  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10441  ;;
10442  *)
10443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10444for as_dir in $PATH
10445do
10446  IFS=$as_save_IFS
10447  test -z "$as_dir" && as_dir=.
10448    for ac_exec_ext in '' $ac_executable_extensions; do
10449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10450    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10452    break 2
10453  fi
10454done
10455  done
10456IFS=$as_save_IFS
10457
10458  ;;
10459esac
10460fi
10461UNAME=$ac_cv_path_UNAME
10462if test -n "$UNAME"; then
10463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10464$as_echo "$UNAME" >&6; }
10465else
10466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10467$as_echo "no" >&6; }
10468fi
10469
10470
10471  test -n "$UNAME" && break
10472done
10473
10474    else
10475      # If it succeeded, then it was overridden by the user. We will use it
10476      # for the tool.
10477
10478      # First remove it from the list of overridden variables, so we can test
10479      # for unknown variables in the end.
10480      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10481
10482      # Check if the provided tool contains a complete path.
10483      tool_specified="$UNAME"
10484      tool_basename="${tool_specified##*/}"
10485      if test "x$tool_basename" = "x$tool_specified"; then
10486        # A command without a complete path is provided, search $PATH.
10487        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10488$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10489        # Extract the first word of "$tool_basename", so it can be a program name with args.
10490set dummy $tool_basename; ac_word=$2
10491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10492$as_echo_n "checking for $ac_word... " >&6; }
10493if ${ac_cv_path_UNAME+:} false; then :
10494  $as_echo_n "(cached) " >&6
10495else
10496  case $UNAME in
10497  [\\/]* | ?:[\\/]*)
10498  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10499  ;;
10500  *)
10501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10502for as_dir in $PATH
10503do
10504  IFS=$as_save_IFS
10505  test -z "$as_dir" && as_dir=.
10506    for ac_exec_ext in '' $ac_executable_extensions; do
10507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10508    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10510    break 2
10511  fi
10512done
10513  done
10514IFS=$as_save_IFS
10515
10516  ;;
10517esac
10518fi
10519UNAME=$ac_cv_path_UNAME
10520if test -n "$UNAME"; then
10521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10522$as_echo "$UNAME" >&6; }
10523else
10524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10525$as_echo "no" >&6; }
10526fi
10527
10528
10529        if test "x$UNAME" = x; then
10530          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10531        fi
10532      else
10533        # Otherwise we believe it is a complete path. Use it as it is.
10534        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10535$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10536        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10537$as_echo_n "checking for UNAME... " >&6; }
10538        if test ! -x "$tool_specified"; then
10539          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10540$as_echo "not found" >&6; }
10541          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10542        fi
10543        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10544$as_echo "$tool_specified" >&6; }
10545      fi
10546    fi
10547  fi
10548
10549
10550
10551  if test "x$UNAME" = x; then
10552    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10553  fi
10554
10555
10556
10557
10558
10559  # Publish this variable in the help.
10560
10561
10562  if test "x$UNIQ" = x; then
10563    # The variable is not set by user, try to locate tool using the code snippet
10564    for ac_prog in uniq
10565do
10566  # Extract the first word of "$ac_prog", so it can be a program name with args.
10567set dummy $ac_prog; ac_word=$2
10568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10569$as_echo_n "checking for $ac_word... " >&6; }
10570if ${ac_cv_path_UNIQ+:} false; then :
10571  $as_echo_n "(cached) " >&6
10572else
10573  case $UNIQ in
10574  [\\/]* | ?:[\\/]*)
10575  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10576  ;;
10577  *)
10578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10579for as_dir in $PATH
10580do
10581  IFS=$as_save_IFS
10582  test -z "$as_dir" && as_dir=.
10583    for ac_exec_ext in '' $ac_executable_extensions; do
10584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10585    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10587    break 2
10588  fi
10589done
10590  done
10591IFS=$as_save_IFS
10592
10593  ;;
10594esac
10595fi
10596UNIQ=$ac_cv_path_UNIQ
10597if test -n "$UNIQ"; then
10598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10599$as_echo "$UNIQ" >&6; }
10600else
10601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10602$as_echo "no" >&6; }
10603fi
10604
10605
10606  test -n "$UNIQ" && break
10607done
10608
10609  else
10610    # The variable is set, but is it from the command line or the environment?
10611
10612    # Try to remove the string !UNIQ! from our list.
10613    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10614    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10615      # If it failed, the variable was not from the command line. Ignore it,
10616      # but warn the user (except for BASH, which is always set by the calling BASH).
10617      if test "xUNIQ" != xBASH; then
10618        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10619$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10620      fi
10621      # Try to locate tool using the code snippet
10622      for ac_prog in uniq
10623do
10624  # Extract the first word of "$ac_prog", so it can be a program name with args.
10625set dummy $ac_prog; ac_word=$2
10626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10627$as_echo_n "checking for $ac_word... " >&6; }
10628if ${ac_cv_path_UNIQ+:} false; then :
10629  $as_echo_n "(cached) " >&6
10630else
10631  case $UNIQ in
10632  [\\/]* | ?:[\\/]*)
10633  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10634  ;;
10635  *)
10636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10637for as_dir in $PATH
10638do
10639  IFS=$as_save_IFS
10640  test -z "$as_dir" && as_dir=.
10641    for ac_exec_ext in '' $ac_executable_extensions; do
10642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10643    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10645    break 2
10646  fi
10647done
10648  done
10649IFS=$as_save_IFS
10650
10651  ;;
10652esac
10653fi
10654UNIQ=$ac_cv_path_UNIQ
10655if test -n "$UNIQ"; then
10656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10657$as_echo "$UNIQ" >&6; }
10658else
10659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10660$as_echo "no" >&6; }
10661fi
10662
10663
10664  test -n "$UNIQ" && break
10665done
10666
10667    else
10668      # If it succeeded, then it was overridden by the user. We will use it
10669      # for the tool.
10670
10671      # First remove it from the list of overridden variables, so we can test
10672      # for unknown variables in the end.
10673      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10674
10675      # Check if the provided tool contains a complete path.
10676      tool_specified="$UNIQ"
10677      tool_basename="${tool_specified##*/}"
10678      if test "x$tool_basename" = "x$tool_specified"; then
10679        # A command without a complete path is provided, search $PATH.
10680        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10681$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10682        # Extract the first word of "$tool_basename", so it can be a program name with args.
10683set dummy $tool_basename; ac_word=$2
10684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10685$as_echo_n "checking for $ac_word... " >&6; }
10686if ${ac_cv_path_UNIQ+:} false; then :
10687  $as_echo_n "(cached) " >&6
10688else
10689  case $UNIQ in
10690  [\\/]* | ?:[\\/]*)
10691  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10692  ;;
10693  *)
10694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10695for as_dir in $PATH
10696do
10697  IFS=$as_save_IFS
10698  test -z "$as_dir" && as_dir=.
10699    for ac_exec_ext in '' $ac_executable_extensions; do
10700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10701    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10703    break 2
10704  fi
10705done
10706  done
10707IFS=$as_save_IFS
10708
10709  ;;
10710esac
10711fi
10712UNIQ=$ac_cv_path_UNIQ
10713if test -n "$UNIQ"; then
10714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10715$as_echo "$UNIQ" >&6; }
10716else
10717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10718$as_echo "no" >&6; }
10719fi
10720
10721
10722        if test "x$UNIQ" = x; then
10723          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10724        fi
10725      else
10726        # Otherwise we believe it is a complete path. Use it as it is.
10727        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10728$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10729        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10730$as_echo_n "checking for UNIQ... " >&6; }
10731        if test ! -x "$tool_specified"; then
10732          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10733$as_echo "not found" >&6; }
10734          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10735        fi
10736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10737$as_echo "$tool_specified" >&6; }
10738      fi
10739    fi
10740  fi
10741
10742
10743
10744  if test "x$UNIQ" = x; then
10745    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10746  fi
10747
10748
10749
10750
10751
10752  # Publish this variable in the help.
10753
10754
10755  if test "x$WC" = x; then
10756    # The variable is not set by user, try to locate tool using the code snippet
10757    for ac_prog in wc
10758do
10759  # Extract the first word of "$ac_prog", so it can be a program name with args.
10760set dummy $ac_prog; ac_word=$2
10761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10762$as_echo_n "checking for $ac_word... " >&6; }
10763if ${ac_cv_path_WC+:} false; then :
10764  $as_echo_n "(cached) " >&6
10765else
10766  case $WC in
10767  [\\/]* | ?:[\\/]*)
10768  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10769  ;;
10770  *)
10771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10772for as_dir in $PATH
10773do
10774  IFS=$as_save_IFS
10775  test -z "$as_dir" && as_dir=.
10776    for ac_exec_ext in '' $ac_executable_extensions; do
10777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10778    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10780    break 2
10781  fi
10782done
10783  done
10784IFS=$as_save_IFS
10785
10786  ;;
10787esac
10788fi
10789WC=$ac_cv_path_WC
10790if test -n "$WC"; then
10791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10792$as_echo "$WC" >&6; }
10793else
10794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10795$as_echo "no" >&6; }
10796fi
10797
10798
10799  test -n "$WC" && break
10800done
10801
10802  else
10803    # The variable is set, but is it from the command line or the environment?
10804
10805    # Try to remove the string !WC! from our list.
10806    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10807    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10808      # If it failed, the variable was not from the command line. Ignore it,
10809      # but warn the user (except for BASH, which is always set by the calling BASH).
10810      if test "xWC" != xBASH; then
10811        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10812$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10813      fi
10814      # Try to locate tool using the code snippet
10815      for ac_prog in wc
10816do
10817  # Extract the first word of "$ac_prog", so it can be a program name with args.
10818set dummy $ac_prog; ac_word=$2
10819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10820$as_echo_n "checking for $ac_word... " >&6; }
10821if ${ac_cv_path_WC+:} false; then :
10822  $as_echo_n "(cached) " >&6
10823else
10824  case $WC in
10825  [\\/]* | ?:[\\/]*)
10826  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10827  ;;
10828  *)
10829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10830for as_dir in $PATH
10831do
10832  IFS=$as_save_IFS
10833  test -z "$as_dir" && as_dir=.
10834    for ac_exec_ext in '' $ac_executable_extensions; do
10835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10836    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10838    break 2
10839  fi
10840done
10841  done
10842IFS=$as_save_IFS
10843
10844  ;;
10845esac
10846fi
10847WC=$ac_cv_path_WC
10848if test -n "$WC"; then
10849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10850$as_echo "$WC" >&6; }
10851else
10852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10853$as_echo "no" >&6; }
10854fi
10855
10856
10857  test -n "$WC" && break
10858done
10859
10860    else
10861      # If it succeeded, then it was overridden by the user. We will use it
10862      # for the tool.
10863
10864      # First remove it from the list of overridden variables, so we can test
10865      # for unknown variables in the end.
10866      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10867
10868      # Check if the provided tool contains a complete path.
10869      tool_specified="$WC"
10870      tool_basename="${tool_specified##*/}"
10871      if test "x$tool_basename" = "x$tool_specified"; then
10872        # A command without a complete path is provided, search $PATH.
10873        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10874$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10875        # Extract the first word of "$tool_basename", so it can be a program name with args.
10876set dummy $tool_basename; ac_word=$2
10877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10878$as_echo_n "checking for $ac_word... " >&6; }
10879if ${ac_cv_path_WC+:} false; then :
10880  $as_echo_n "(cached) " >&6
10881else
10882  case $WC in
10883  [\\/]* | ?:[\\/]*)
10884  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10885  ;;
10886  *)
10887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10888for as_dir in $PATH
10889do
10890  IFS=$as_save_IFS
10891  test -z "$as_dir" && as_dir=.
10892    for ac_exec_ext in '' $ac_executable_extensions; do
10893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10894    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10896    break 2
10897  fi
10898done
10899  done
10900IFS=$as_save_IFS
10901
10902  ;;
10903esac
10904fi
10905WC=$ac_cv_path_WC
10906if test -n "$WC"; then
10907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10908$as_echo "$WC" >&6; }
10909else
10910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10911$as_echo "no" >&6; }
10912fi
10913
10914
10915        if test "x$WC" = x; then
10916          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10917        fi
10918      else
10919        # Otherwise we believe it is a complete path. Use it as it is.
10920        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10921$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10922        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10923$as_echo_n "checking for WC... " >&6; }
10924        if test ! -x "$tool_specified"; then
10925          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10926$as_echo "not found" >&6; }
10927          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10928        fi
10929        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10930$as_echo "$tool_specified" >&6; }
10931      fi
10932    fi
10933  fi
10934
10935
10936
10937  if test "x$WC" = x; then
10938    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10939  fi
10940
10941
10942
10943
10944
10945  # Publish this variable in the help.
10946
10947
10948  if test "x$WHICH" = x; then
10949    # The variable is not set by user, try to locate tool using the code snippet
10950    for ac_prog in which
10951do
10952  # Extract the first word of "$ac_prog", so it can be a program name with args.
10953set dummy $ac_prog; ac_word=$2
10954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10955$as_echo_n "checking for $ac_word... " >&6; }
10956if ${ac_cv_path_WHICH+:} false; then :
10957  $as_echo_n "(cached) " >&6
10958else
10959  case $WHICH in
10960  [\\/]* | ?:[\\/]*)
10961  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10962  ;;
10963  *)
10964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10965for as_dir in $PATH
10966do
10967  IFS=$as_save_IFS
10968  test -z "$as_dir" && as_dir=.
10969    for ac_exec_ext in '' $ac_executable_extensions; do
10970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10971    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10973    break 2
10974  fi
10975done
10976  done
10977IFS=$as_save_IFS
10978
10979  ;;
10980esac
10981fi
10982WHICH=$ac_cv_path_WHICH
10983if test -n "$WHICH"; then
10984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10985$as_echo "$WHICH" >&6; }
10986else
10987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10988$as_echo "no" >&6; }
10989fi
10990
10991
10992  test -n "$WHICH" && break
10993done
10994
10995  else
10996    # The variable is set, but is it from the command line or the environment?
10997
10998    # Try to remove the string !WHICH! from our list.
10999    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11000    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11001      # If it failed, the variable was not from the command line. Ignore it,
11002      # but warn the user (except for BASH, which is always set by the calling BASH).
11003      if test "xWHICH" != xBASH; then
11004        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11005$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11006      fi
11007      # Try to locate tool using the code snippet
11008      for ac_prog in which
11009do
11010  # Extract the first word of "$ac_prog", so it can be a program name with args.
11011set dummy $ac_prog; ac_word=$2
11012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11013$as_echo_n "checking for $ac_word... " >&6; }
11014if ${ac_cv_path_WHICH+:} false; then :
11015  $as_echo_n "(cached) " >&6
11016else
11017  case $WHICH in
11018  [\\/]* | ?:[\\/]*)
11019  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11020  ;;
11021  *)
11022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11023for as_dir in $PATH
11024do
11025  IFS=$as_save_IFS
11026  test -z "$as_dir" && as_dir=.
11027    for ac_exec_ext in '' $ac_executable_extensions; do
11028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11029    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11031    break 2
11032  fi
11033done
11034  done
11035IFS=$as_save_IFS
11036
11037  ;;
11038esac
11039fi
11040WHICH=$ac_cv_path_WHICH
11041if test -n "$WHICH"; then
11042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11043$as_echo "$WHICH" >&6; }
11044else
11045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11046$as_echo "no" >&6; }
11047fi
11048
11049
11050  test -n "$WHICH" && break
11051done
11052
11053    else
11054      # If it succeeded, then it was overridden by the user. We will use it
11055      # for the tool.
11056
11057      # First remove it from the list of overridden variables, so we can test
11058      # for unknown variables in the end.
11059      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11060
11061      # Check if the provided tool contains a complete path.
11062      tool_specified="$WHICH"
11063      tool_basename="${tool_specified##*/}"
11064      if test "x$tool_basename" = "x$tool_specified"; then
11065        # A command without a complete path is provided, search $PATH.
11066        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11067$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11068        # Extract the first word of "$tool_basename", so it can be a program name with args.
11069set dummy $tool_basename; ac_word=$2
11070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11071$as_echo_n "checking for $ac_word... " >&6; }
11072if ${ac_cv_path_WHICH+:} false; then :
11073  $as_echo_n "(cached) " >&6
11074else
11075  case $WHICH in
11076  [\\/]* | ?:[\\/]*)
11077  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11078  ;;
11079  *)
11080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11081for as_dir in $PATH
11082do
11083  IFS=$as_save_IFS
11084  test -z "$as_dir" && as_dir=.
11085    for ac_exec_ext in '' $ac_executable_extensions; do
11086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11087    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11089    break 2
11090  fi
11091done
11092  done
11093IFS=$as_save_IFS
11094
11095  ;;
11096esac
11097fi
11098WHICH=$ac_cv_path_WHICH
11099if test -n "$WHICH"; then
11100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11101$as_echo "$WHICH" >&6; }
11102else
11103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11104$as_echo "no" >&6; }
11105fi
11106
11107
11108        if test "x$WHICH" = x; then
11109          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11110        fi
11111      else
11112        # Otherwise we believe it is a complete path. Use it as it is.
11113        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11114$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11115        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11116$as_echo_n "checking for WHICH... " >&6; }
11117        if test ! -x "$tool_specified"; then
11118          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11119$as_echo "not found" >&6; }
11120          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11121        fi
11122        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11123$as_echo "$tool_specified" >&6; }
11124      fi
11125    fi
11126  fi
11127
11128
11129
11130  if test "x$WHICH" = x; then
11131    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11132  fi
11133
11134
11135
11136
11137
11138  # Publish this variable in the help.
11139
11140
11141  if test "x$XARGS" = x; then
11142    # The variable is not set by user, try to locate tool using the code snippet
11143    for ac_prog in xargs
11144do
11145  # Extract the first word of "$ac_prog", so it can be a program name with args.
11146set dummy $ac_prog; ac_word=$2
11147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11148$as_echo_n "checking for $ac_word... " >&6; }
11149if ${ac_cv_path_XARGS+:} false; then :
11150  $as_echo_n "(cached) " >&6
11151else
11152  case $XARGS in
11153  [\\/]* | ?:[\\/]*)
11154  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11155  ;;
11156  *)
11157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11158for as_dir in $PATH
11159do
11160  IFS=$as_save_IFS
11161  test -z "$as_dir" && as_dir=.
11162    for ac_exec_ext in '' $ac_executable_extensions; do
11163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11164    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11166    break 2
11167  fi
11168done
11169  done
11170IFS=$as_save_IFS
11171
11172  ;;
11173esac
11174fi
11175XARGS=$ac_cv_path_XARGS
11176if test -n "$XARGS"; then
11177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11178$as_echo "$XARGS" >&6; }
11179else
11180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11181$as_echo "no" >&6; }
11182fi
11183
11184
11185  test -n "$XARGS" && break
11186done
11187
11188  else
11189    # The variable is set, but is it from the command line or the environment?
11190
11191    # Try to remove the string !XARGS! from our list.
11192    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11193    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11194      # If it failed, the variable was not from the command line. Ignore it,
11195      # but warn the user (except for BASH, which is always set by the calling BASH).
11196      if test "xXARGS" != xBASH; then
11197        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11198$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11199      fi
11200      # Try to locate tool using the code snippet
11201      for ac_prog in xargs
11202do
11203  # Extract the first word of "$ac_prog", so it can be a program name with args.
11204set dummy $ac_prog; ac_word=$2
11205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11206$as_echo_n "checking for $ac_word... " >&6; }
11207if ${ac_cv_path_XARGS+:} false; then :
11208  $as_echo_n "(cached) " >&6
11209else
11210  case $XARGS in
11211  [\\/]* | ?:[\\/]*)
11212  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11213  ;;
11214  *)
11215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11216for as_dir in $PATH
11217do
11218  IFS=$as_save_IFS
11219  test -z "$as_dir" && as_dir=.
11220    for ac_exec_ext in '' $ac_executable_extensions; do
11221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11222    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11224    break 2
11225  fi
11226done
11227  done
11228IFS=$as_save_IFS
11229
11230  ;;
11231esac
11232fi
11233XARGS=$ac_cv_path_XARGS
11234if test -n "$XARGS"; then
11235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11236$as_echo "$XARGS" >&6; }
11237else
11238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11239$as_echo "no" >&6; }
11240fi
11241
11242
11243  test -n "$XARGS" && break
11244done
11245
11246    else
11247      # If it succeeded, then it was overridden by the user. We will use it
11248      # for the tool.
11249
11250      # First remove it from the list of overridden variables, so we can test
11251      # for unknown variables in the end.
11252      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11253
11254      # Check if the provided tool contains a complete path.
11255      tool_specified="$XARGS"
11256      tool_basename="${tool_specified##*/}"
11257      if test "x$tool_basename" = "x$tool_specified"; then
11258        # A command without a complete path is provided, search $PATH.
11259        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11260$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11261        # Extract the first word of "$tool_basename", so it can be a program name with args.
11262set dummy $tool_basename; ac_word=$2
11263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11264$as_echo_n "checking for $ac_word... " >&6; }
11265if ${ac_cv_path_XARGS+:} false; then :
11266  $as_echo_n "(cached) " >&6
11267else
11268  case $XARGS in
11269  [\\/]* | ?:[\\/]*)
11270  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11271  ;;
11272  *)
11273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11274for as_dir in $PATH
11275do
11276  IFS=$as_save_IFS
11277  test -z "$as_dir" && as_dir=.
11278    for ac_exec_ext in '' $ac_executable_extensions; do
11279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11280    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11282    break 2
11283  fi
11284done
11285  done
11286IFS=$as_save_IFS
11287
11288  ;;
11289esac
11290fi
11291XARGS=$ac_cv_path_XARGS
11292if test -n "$XARGS"; then
11293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11294$as_echo "$XARGS" >&6; }
11295else
11296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11297$as_echo "no" >&6; }
11298fi
11299
11300
11301        if test "x$XARGS" = x; then
11302          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11303        fi
11304      else
11305        # Otherwise we believe it is a complete path. Use it as it is.
11306        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11307$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11308        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11309$as_echo_n "checking for XARGS... " >&6; }
11310        if test ! -x "$tool_specified"; then
11311          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11312$as_echo "not found" >&6; }
11313          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11314        fi
11315        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11316$as_echo "$tool_specified" >&6; }
11317      fi
11318    fi
11319  fi
11320
11321
11322
11323  if test "x$XARGS" = x; then
11324    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11325  fi
11326
11327
11328
11329  # Then required tools that require some special treatment.
11330
11331
11332  # Publish this variable in the help.
11333
11334
11335  if test "x$AWK" = x; then
11336    # The variable is not set by user, try to locate tool using the code snippet
11337    for ac_prog in gawk mawk nawk awk
11338do
11339  # Extract the first word of "$ac_prog", so it can be a program name with args.
11340set dummy $ac_prog; ac_word=$2
11341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11342$as_echo_n "checking for $ac_word... " >&6; }
11343if ${ac_cv_prog_AWK+:} false; then :
11344  $as_echo_n "(cached) " >&6
11345else
11346  if test -n "$AWK"; then
11347  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11348else
11349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11350for as_dir in $PATH
11351do
11352  IFS=$as_save_IFS
11353  test -z "$as_dir" && as_dir=.
11354    for ac_exec_ext in '' $ac_executable_extensions; do
11355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11356    ac_cv_prog_AWK="$ac_prog"
11357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11358    break 2
11359  fi
11360done
11361  done
11362IFS=$as_save_IFS
11363
11364fi
11365fi
11366AWK=$ac_cv_prog_AWK
11367if test -n "$AWK"; then
11368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11369$as_echo "$AWK" >&6; }
11370else
11371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11372$as_echo "no" >&6; }
11373fi
11374
11375
11376  test -n "$AWK" && break
11377done
11378
11379  else
11380    # The variable is set, but is it from the command line or the environment?
11381
11382    # Try to remove the string !AWK! from our list.
11383    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11384    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11385      # If it failed, the variable was not from the command line. Ignore it,
11386      # but warn the user (except for BASH, which is always set by the calling BASH).
11387      if test "xAWK" != xBASH; then
11388        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11389$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11390      fi
11391      # Try to locate tool using the code snippet
11392      for ac_prog in gawk mawk nawk awk
11393do
11394  # Extract the first word of "$ac_prog", so it can be a program name with args.
11395set dummy $ac_prog; ac_word=$2
11396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11397$as_echo_n "checking for $ac_word... " >&6; }
11398if ${ac_cv_prog_AWK+:} false; then :
11399  $as_echo_n "(cached) " >&6
11400else
11401  if test -n "$AWK"; then
11402  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11403else
11404as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11405for as_dir in $PATH
11406do
11407  IFS=$as_save_IFS
11408  test -z "$as_dir" && as_dir=.
11409    for ac_exec_ext in '' $ac_executable_extensions; do
11410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11411    ac_cv_prog_AWK="$ac_prog"
11412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11413    break 2
11414  fi
11415done
11416  done
11417IFS=$as_save_IFS
11418
11419fi
11420fi
11421AWK=$ac_cv_prog_AWK
11422if test -n "$AWK"; then
11423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11424$as_echo "$AWK" >&6; }
11425else
11426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11427$as_echo "no" >&6; }
11428fi
11429
11430
11431  test -n "$AWK" && break
11432done
11433
11434    else
11435      # If it succeeded, then it was overridden by the user. We will use it
11436      # for the tool.
11437
11438      # First remove it from the list of overridden variables, so we can test
11439      # for unknown variables in the end.
11440      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11441
11442      # Check if the provided tool contains a complete path.
11443      tool_specified="$AWK"
11444      tool_basename="${tool_specified##*/}"
11445      if test "x$tool_basename" = "x$tool_specified"; then
11446        # A command without a complete path is provided, search $PATH.
11447        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11448$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11449        # Extract the first word of "$tool_basename", so it can be a program name with args.
11450set dummy $tool_basename; ac_word=$2
11451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11452$as_echo_n "checking for $ac_word... " >&6; }
11453if ${ac_cv_path_AWK+:} false; then :
11454  $as_echo_n "(cached) " >&6
11455else
11456  case $AWK in
11457  [\\/]* | ?:[\\/]*)
11458  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11459  ;;
11460  *)
11461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11462for as_dir in $PATH
11463do
11464  IFS=$as_save_IFS
11465  test -z "$as_dir" && as_dir=.
11466    for ac_exec_ext in '' $ac_executable_extensions; do
11467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11468    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11470    break 2
11471  fi
11472done
11473  done
11474IFS=$as_save_IFS
11475
11476  ;;
11477esac
11478fi
11479AWK=$ac_cv_path_AWK
11480if test -n "$AWK"; then
11481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11482$as_echo "$AWK" >&6; }
11483else
11484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11485$as_echo "no" >&6; }
11486fi
11487
11488
11489        if test "x$AWK" = x; then
11490          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11491        fi
11492      else
11493        # Otherwise we believe it is a complete path. Use it as it is.
11494        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11495$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11496        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11497$as_echo_n "checking for AWK... " >&6; }
11498        if test ! -x "$tool_specified"; then
11499          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11500$as_echo "not found" >&6; }
11501          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11502        fi
11503        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11504$as_echo "$tool_specified" >&6; }
11505      fi
11506    fi
11507  fi
11508
11509
11510  if test "x$AWK" = x; then
11511    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11512  fi
11513
11514
11515
11516
11517  # Publish this variable in the help.
11518
11519
11520  if test "x$GREP" = x; then
11521    # The variable is not set by user, try to locate tool using the code snippet
11522    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11523$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11524if ${ac_cv_path_GREP+:} false; then :
11525  $as_echo_n "(cached) " >&6
11526else
11527  if test -z "$GREP"; then
11528  ac_path_GREP_found=false
11529  # Loop through the user's path and test for each of PROGNAME-LIST
11530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11531for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11532do
11533  IFS=$as_save_IFS
11534  test -z "$as_dir" && as_dir=.
11535    for ac_prog in grep ggrep; do
11536    for ac_exec_ext in '' $ac_executable_extensions; do
11537      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11538      as_fn_executable_p "$ac_path_GREP" || continue
11539# Check for GNU ac_path_GREP and select it if it is found.
11540  # Check for GNU $ac_path_GREP
11541case `"$ac_path_GREP" --version 2>&1` in
11542*GNU*)
11543  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11544*)
11545  ac_count=0
11546  $as_echo_n 0123456789 >"conftest.in"
11547  while :
11548  do
11549    cat "conftest.in" "conftest.in" >"conftest.tmp"
11550    mv "conftest.tmp" "conftest.in"
11551    cp "conftest.in" "conftest.nl"
11552    $as_echo 'GREP' >> "conftest.nl"
11553    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11554    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11555    as_fn_arith $ac_count + 1 && ac_count=$as_val
11556    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11557      # Best one so far, save it but keep looking for a better one
11558      ac_cv_path_GREP="$ac_path_GREP"
11559      ac_path_GREP_max=$ac_count
11560    fi
11561    # 10*(2^10) chars as input seems more than enough
11562    test $ac_count -gt 10 && break
11563  done
11564  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11565esac
11566
11567      $ac_path_GREP_found && break 3
11568    done
11569  done
11570  done
11571IFS=$as_save_IFS
11572  if test -z "$ac_cv_path_GREP"; then
11573    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11574  fi
11575else
11576  ac_cv_path_GREP=$GREP
11577fi
11578
11579fi
11580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11581$as_echo "$ac_cv_path_GREP" >&6; }
11582 GREP="$ac_cv_path_GREP"
11583
11584
11585  else
11586    # The variable is set, but is it from the command line or the environment?
11587
11588    # Try to remove the string !GREP! from our list.
11589    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11590    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11591      # If it failed, the variable was not from the command line. Ignore it,
11592      # but warn the user (except for BASH, which is always set by the calling BASH).
11593      if test "xGREP" != xBASH; then
11594        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11595$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11596      fi
11597      # Try to locate tool using the code snippet
11598      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11599$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11600if ${ac_cv_path_GREP+:} false; then :
11601  $as_echo_n "(cached) " >&6
11602else
11603  if test -z "$GREP"; then
11604  ac_path_GREP_found=false
11605  # Loop through the user's path and test for each of PROGNAME-LIST
11606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11607for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11608do
11609  IFS=$as_save_IFS
11610  test -z "$as_dir" && as_dir=.
11611    for ac_prog in grep ggrep; do
11612    for ac_exec_ext in '' $ac_executable_extensions; do
11613      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11614      as_fn_executable_p "$ac_path_GREP" || continue
11615# Check for GNU ac_path_GREP and select it if it is found.
11616  # Check for GNU $ac_path_GREP
11617case `"$ac_path_GREP" --version 2>&1` in
11618*GNU*)
11619  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11620*)
11621  ac_count=0
11622  $as_echo_n 0123456789 >"conftest.in"
11623  while :
11624  do
11625    cat "conftest.in" "conftest.in" >"conftest.tmp"
11626    mv "conftest.tmp" "conftest.in"
11627    cp "conftest.in" "conftest.nl"
11628    $as_echo 'GREP' >> "conftest.nl"
11629    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11630    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11631    as_fn_arith $ac_count + 1 && ac_count=$as_val
11632    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11633      # Best one so far, save it but keep looking for a better one
11634      ac_cv_path_GREP="$ac_path_GREP"
11635      ac_path_GREP_max=$ac_count
11636    fi
11637    # 10*(2^10) chars as input seems more than enough
11638    test $ac_count -gt 10 && break
11639  done
11640  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11641esac
11642
11643      $ac_path_GREP_found && break 3
11644    done
11645  done
11646  done
11647IFS=$as_save_IFS
11648  if test -z "$ac_cv_path_GREP"; then
11649    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11650  fi
11651else
11652  ac_cv_path_GREP=$GREP
11653fi
11654
11655fi
11656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11657$as_echo "$ac_cv_path_GREP" >&6; }
11658 GREP="$ac_cv_path_GREP"
11659
11660
11661    else
11662      # If it succeeded, then it was overridden by the user. We will use it
11663      # for the tool.
11664
11665      # First remove it from the list of overridden variables, so we can test
11666      # for unknown variables in the end.
11667      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11668
11669      # Check if the provided tool contains a complete path.
11670      tool_specified="$GREP"
11671      tool_basename="${tool_specified##*/}"
11672      if test "x$tool_basename" = "x$tool_specified"; then
11673        # A command without a complete path is provided, search $PATH.
11674        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11675$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11676        # Extract the first word of "$tool_basename", so it can be a program name with args.
11677set dummy $tool_basename; ac_word=$2
11678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11679$as_echo_n "checking for $ac_word... " >&6; }
11680if ${ac_cv_path_GREP+:} false; then :
11681  $as_echo_n "(cached) " >&6
11682else
11683  case $GREP in
11684  [\\/]* | ?:[\\/]*)
11685  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11686  ;;
11687  *)
11688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11689for as_dir in $PATH
11690do
11691  IFS=$as_save_IFS
11692  test -z "$as_dir" && as_dir=.
11693    for ac_exec_ext in '' $ac_executable_extensions; do
11694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11695    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11697    break 2
11698  fi
11699done
11700  done
11701IFS=$as_save_IFS
11702
11703  ;;
11704esac
11705fi
11706GREP=$ac_cv_path_GREP
11707if test -n "$GREP"; then
11708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11709$as_echo "$GREP" >&6; }
11710else
11711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11712$as_echo "no" >&6; }
11713fi
11714
11715
11716        if test "x$GREP" = x; then
11717          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11718        fi
11719      else
11720        # Otherwise we believe it is a complete path. Use it as it is.
11721        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11722$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11723        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11724$as_echo_n "checking for GREP... " >&6; }
11725        if test ! -x "$tool_specified"; then
11726          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11727$as_echo "not found" >&6; }
11728          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11729        fi
11730        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11731$as_echo "$tool_specified" >&6; }
11732      fi
11733    fi
11734  fi
11735
11736
11737  if test "x$GREP" = x; then
11738    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11739  fi
11740
11741
11742
11743
11744  # Publish this variable in the help.
11745
11746
11747  if test "x$EGREP" = x; then
11748    # The variable is not set by user, try to locate tool using the code snippet
11749    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11750$as_echo_n "checking for egrep... " >&6; }
11751if ${ac_cv_path_EGREP+:} false; then :
11752  $as_echo_n "(cached) " >&6
11753else
11754  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11755   then ac_cv_path_EGREP="$GREP -E"
11756   else
11757     if test -z "$EGREP"; then
11758  ac_path_EGREP_found=false
11759  # Loop through the user's path and test for each of PROGNAME-LIST
11760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11761for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11762do
11763  IFS=$as_save_IFS
11764  test -z "$as_dir" && as_dir=.
11765    for ac_prog in egrep; do
11766    for ac_exec_ext in '' $ac_executable_extensions; do
11767      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11768      as_fn_executable_p "$ac_path_EGREP" || continue
11769# Check for GNU ac_path_EGREP and select it if it is found.
11770  # Check for GNU $ac_path_EGREP
11771case `"$ac_path_EGREP" --version 2>&1` in
11772*GNU*)
11773  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11774*)
11775  ac_count=0
11776  $as_echo_n 0123456789 >"conftest.in"
11777  while :
11778  do
11779    cat "conftest.in" "conftest.in" >"conftest.tmp"
11780    mv "conftest.tmp" "conftest.in"
11781    cp "conftest.in" "conftest.nl"
11782    $as_echo 'EGREP' >> "conftest.nl"
11783    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11784    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11785    as_fn_arith $ac_count + 1 && ac_count=$as_val
11786    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11787      # Best one so far, save it but keep looking for a better one
11788      ac_cv_path_EGREP="$ac_path_EGREP"
11789      ac_path_EGREP_max=$ac_count
11790    fi
11791    # 10*(2^10) chars as input seems more than enough
11792    test $ac_count -gt 10 && break
11793  done
11794  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11795esac
11796
11797      $ac_path_EGREP_found && break 3
11798    done
11799  done
11800  done
11801IFS=$as_save_IFS
11802  if test -z "$ac_cv_path_EGREP"; then
11803    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11804  fi
11805else
11806  ac_cv_path_EGREP=$EGREP
11807fi
11808
11809   fi
11810fi
11811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11812$as_echo "$ac_cv_path_EGREP" >&6; }
11813 EGREP="$ac_cv_path_EGREP"
11814
11815
11816  else
11817    # The variable is set, but is it from the command line or the environment?
11818
11819    # Try to remove the string !EGREP! from our list.
11820    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11821    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11822      # If it failed, the variable was not from the command line. Ignore it,
11823      # but warn the user (except for BASH, which is always set by the calling BASH).
11824      if test "xEGREP" != xBASH; then
11825        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11826$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11827      fi
11828      # Try to locate tool using the code snippet
11829      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11830$as_echo_n "checking for egrep... " >&6; }
11831if ${ac_cv_path_EGREP+:} false; then :
11832  $as_echo_n "(cached) " >&6
11833else
11834  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11835   then ac_cv_path_EGREP="$GREP -E"
11836   else
11837     if test -z "$EGREP"; then
11838  ac_path_EGREP_found=false
11839  # Loop through the user's path and test for each of PROGNAME-LIST
11840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11841for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11842do
11843  IFS=$as_save_IFS
11844  test -z "$as_dir" && as_dir=.
11845    for ac_prog in egrep; do
11846    for ac_exec_ext in '' $ac_executable_extensions; do
11847      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11848      as_fn_executable_p "$ac_path_EGREP" || continue
11849# Check for GNU ac_path_EGREP and select it if it is found.
11850  # Check for GNU $ac_path_EGREP
11851case `"$ac_path_EGREP" --version 2>&1` in
11852*GNU*)
11853  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11854*)
11855  ac_count=0
11856  $as_echo_n 0123456789 >"conftest.in"
11857  while :
11858  do
11859    cat "conftest.in" "conftest.in" >"conftest.tmp"
11860    mv "conftest.tmp" "conftest.in"
11861    cp "conftest.in" "conftest.nl"
11862    $as_echo 'EGREP' >> "conftest.nl"
11863    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11864    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11865    as_fn_arith $ac_count + 1 && ac_count=$as_val
11866    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11867      # Best one so far, save it but keep looking for a better one
11868      ac_cv_path_EGREP="$ac_path_EGREP"
11869      ac_path_EGREP_max=$ac_count
11870    fi
11871    # 10*(2^10) chars as input seems more than enough
11872    test $ac_count -gt 10 && break
11873  done
11874  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11875esac
11876
11877      $ac_path_EGREP_found && break 3
11878    done
11879  done
11880  done
11881IFS=$as_save_IFS
11882  if test -z "$ac_cv_path_EGREP"; then
11883    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11884  fi
11885else
11886  ac_cv_path_EGREP=$EGREP
11887fi
11888
11889   fi
11890fi
11891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11892$as_echo "$ac_cv_path_EGREP" >&6; }
11893 EGREP="$ac_cv_path_EGREP"
11894
11895
11896    else
11897      # If it succeeded, then it was overridden by the user. We will use it
11898      # for the tool.
11899
11900      # First remove it from the list of overridden variables, so we can test
11901      # for unknown variables in the end.
11902      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11903
11904      # Check if the provided tool contains a complete path.
11905      tool_specified="$EGREP"
11906      tool_basename="${tool_specified##*/}"
11907      if test "x$tool_basename" = "x$tool_specified"; then
11908        # A command without a complete path is provided, search $PATH.
11909        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11910$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11911        # Extract the first word of "$tool_basename", so it can be a program name with args.
11912set dummy $tool_basename; ac_word=$2
11913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11914$as_echo_n "checking for $ac_word... " >&6; }
11915if ${ac_cv_path_EGREP+:} false; then :
11916  $as_echo_n "(cached) " >&6
11917else
11918  case $EGREP in
11919  [\\/]* | ?:[\\/]*)
11920  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11921  ;;
11922  *)
11923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11924for as_dir in $PATH
11925do
11926  IFS=$as_save_IFS
11927  test -z "$as_dir" && as_dir=.
11928    for ac_exec_ext in '' $ac_executable_extensions; do
11929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11930    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11932    break 2
11933  fi
11934done
11935  done
11936IFS=$as_save_IFS
11937
11938  ;;
11939esac
11940fi
11941EGREP=$ac_cv_path_EGREP
11942if test -n "$EGREP"; then
11943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11944$as_echo "$EGREP" >&6; }
11945else
11946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11947$as_echo "no" >&6; }
11948fi
11949
11950
11951        if test "x$EGREP" = x; then
11952          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11953        fi
11954      else
11955        # Otherwise we believe it is a complete path. Use it as it is.
11956        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11957$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11958        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11959$as_echo_n "checking for EGREP... " >&6; }
11960        if test ! -x "$tool_specified"; then
11961          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11962$as_echo "not found" >&6; }
11963          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11964        fi
11965        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11966$as_echo "$tool_specified" >&6; }
11967      fi
11968    fi
11969  fi
11970
11971
11972  if test "x$EGREP" = x; then
11973    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
11974  fi
11975
11976
11977
11978
11979  # Publish this variable in the help.
11980
11981
11982  if test "x$FGREP" = x; then
11983    # The variable is not set by user, try to locate tool using the code snippet
11984    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11985$as_echo_n "checking for fgrep... " >&6; }
11986if ${ac_cv_path_FGREP+:} false; then :
11987  $as_echo_n "(cached) " >&6
11988else
11989  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11990   then ac_cv_path_FGREP="$GREP -F"
11991   else
11992     if test -z "$FGREP"; then
11993  ac_path_FGREP_found=false
11994  # Loop through the user's path and test for each of PROGNAME-LIST
11995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11996for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11997do
11998  IFS=$as_save_IFS
11999  test -z "$as_dir" && as_dir=.
12000    for ac_prog in fgrep; do
12001    for ac_exec_ext in '' $ac_executable_extensions; do
12002      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12003      as_fn_executable_p "$ac_path_FGREP" || continue
12004# Check for GNU ac_path_FGREP and select it if it is found.
12005  # Check for GNU $ac_path_FGREP
12006case `"$ac_path_FGREP" --version 2>&1` in
12007*GNU*)
12008  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12009*)
12010  ac_count=0
12011  $as_echo_n 0123456789 >"conftest.in"
12012  while :
12013  do
12014    cat "conftest.in" "conftest.in" >"conftest.tmp"
12015    mv "conftest.tmp" "conftest.in"
12016    cp "conftest.in" "conftest.nl"
12017    $as_echo 'FGREP' >> "conftest.nl"
12018    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12019    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12020    as_fn_arith $ac_count + 1 && ac_count=$as_val
12021    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12022      # Best one so far, save it but keep looking for a better one
12023      ac_cv_path_FGREP="$ac_path_FGREP"
12024      ac_path_FGREP_max=$ac_count
12025    fi
12026    # 10*(2^10) chars as input seems more than enough
12027    test $ac_count -gt 10 && break
12028  done
12029  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12030esac
12031
12032      $ac_path_FGREP_found && break 3
12033    done
12034  done
12035  done
12036IFS=$as_save_IFS
12037  if test -z "$ac_cv_path_FGREP"; then
12038    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12039  fi
12040else
12041  ac_cv_path_FGREP=$FGREP
12042fi
12043
12044   fi
12045fi
12046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12047$as_echo "$ac_cv_path_FGREP" >&6; }
12048 FGREP="$ac_cv_path_FGREP"
12049
12050
12051  else
12052    # The variable is set, but is it from the command line or the environment?
12053
12054    # Try to remove the string !FGREP! from our list.
12055    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12056    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12057      # If it failed, the variable was not from the command line. Ignore it,
12058      # but warn the user (except for BASH, which is always set by the calling BASH).
12059      if test "xFGREP" != xBASH; then
12060        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12061$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12062      fi
12063      # Try to locate tool using the code snippet
12064      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12065$as_echo_n "checking for fgrep... " >&6; }
12066if ${ac_cv_path_FGREP+:} false; then :
12067  $as_echo_n "(cached) " >&6
12068else
12069  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12070   then ac_cv_path_FGREP="$GREP -F"
12071   else
12072     if test -z "$FGREP"; then
12073  ac_path_FGREP_found=false
12074  # Loop through the user's path and test for each of PROGNAME-LIST
12075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12076for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12077do
12078  IFS=$as_save_IFS
12079  test -z "$as_dir" && as_dir=.
12080    for ac_prog in fgrep; do
12081    for ac_exec_ext in '' $ac_executable_extensions; do
12082      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12083      as_fn_executable_p "$ac_path_FGREP" || continue
12084# Check for GNU ac_path_FGREP and select it if it is found.
12085  # Check for GNU $ac_path_FGREP
12086case `"$ac_path_FGREP" --version 2>&1` in
12087*GNU*)
12088  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12089*)
12090  ac_count=0
12091  $as_echo_n 0123456789 >"conftest.in"
12092  while :
12093  do
12094    cat "conftest.in" "conftest.in" >"conftest.tmp"
12095    mv "conftest.tmp" "conftest.in"
12096    cp "conftest.in" "conftest.nl"
12097    $as_echo 'FGREP' >> "conftest.nl"
12098    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12099    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12100    as_fn_arith $ac_count + 1 && ac_count=$as_val
12101    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12102      # Best one so far, save it but keep looking for a better one
12103      ac_cv_path_FGREP="$ac_path_FGREP"
12104      ac_path_FGREP_max=$ac_count
12105    fi
12106    # 10*(2^10) chars as input seems more than enough
12107    test $ac_count -gt 10 && break
12108  done
12109  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12110esac
12111
12112      $ac_path_FGREP_found && break 3
12113    done
12114  done
12115  done
12116IFS=$as_save_IFS
12117  if test -z "$ac_cv_path_FGREP"; then
12118    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12119  fi
12120else
12121  ac_cv_path_FGREP=$FGREP
12122fi
12123
12124   fi
12125fi
12126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12127$as_echo "$ac_cv_path_FGREP" >&6; }
12128 FGREP="$ac_cv_path_FGREP"
12129
12130
12131    else
12132      # If it succeeded, then it was overridden by the user. We will use it
12133      # for the tool.
12134
12135      # First remove it from the list of overridden variables, so we can test
12136      # for unknown variables in the end.
12137      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12138
12139      # Check if the provided tool contains a complete path.
12140      tool_specified="$FGREP"
12141      tool_basename="${tool_specified##*/}"
12142      if test "x$tool_basename" = "x$tool_specified"; then
12143        # A command without a complete path is provided, search $PATH.
12144        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12145$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12146        # Extract the first word of "$tool_basename", so it can be a program name with args.
12147set dummy $tool_basename; ac_word=$2
12148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12149$as_echo_n "checking for $ac_word... " >&6; }
12150if ${ac_cv_path_FGREP+:} false; then :
12151  $as_echo_n "(cached) " >&6
12152else
12153  case $FGREP in
12154  [\\/]* | ?:[\\/]*)
12155  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12156  ;;
12157  *)
12158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12159for as_dir in $PATH
12160do
12161  IFS=$as_save_IFS
12162  test -z "$as_dir" && as_dir=.
12163    for ac_exec_ext in '' $ac_executable_extensions; do
12164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12165    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12167    break 2
12168  fi
12169done
12170  done
12171IFS=$as_save_IFS
12172
12173  ;;
12174esac
12175fi
12176FGREP=$ac_cv_path_FGREP
12177if test -n "$FGREP"; then
12178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12179$as_echo "$FGREP" >&6; }
12180else
12181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12182$as_echo "no" >&6; }
12183fi
12184
12185
12186        if test "x$FGREP" = x; then
12187          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12188        fi
12189      else
12190        # Otherwise we believe it is a complete path. Use it as it is.
12191        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12192$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12193        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12194$as_echo_n "checking for FGREP... " >&6; }
12195        if test ! -x "$tool_specified"; then
12196          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12197$as_echo "not found" >&6; }
12198          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12199        fi
12200        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12201$as_echo "$tool_specified" >&6; }
12202      fi
12203    fi
12204  fi
12205
12206
12207  if test "x$FGREP" = x; then
12208    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12209  fi
12210
12211
12212
12213
12214  # Publish this variable in the help.
12215
12216
12217  if test "x$SED" = x; then
12218    # The variable is not set by user, try to locate tool using the code snippet
12219    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12220$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12221if ${ac_cv_path_SED+:} false; then :
12222  $as_echo_n "(cached) " >&6
12223else
12224            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12225     for ac_i in 1 2 3 4 5 6 7; do
12226       ac_script="$ac_script$as_nl$ac_script"
12227     done
12228     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12229     { ac_script=; unset ac_script;}
12230     if test -z "$SED"; then
12231  ac_path_SED_found=false
12232  # Loop through the user's path and test for each of PROGNAME-LIST
12233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12234for as_dir in $PATH
12235do
12236  IFS=$as_save_IFS
12237  test -z "$as_dir" && as_dir=.
12238    for ac_prog in sed gsed; do
12239    for ac_exec_ext in '' $ac_executable_extensions; do
12240      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12241      as_fn_executable_p "$ac_path_SED" || continue
12242# Check for GNU ac_path_SED and select it if it is found.
12243  # Check for GNU $ac_path_SED
12244case `"$ac_path_SED" --version 2>&1` in
12245*GNU*)
12246  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12247*)
12248  ac_count=0
12249  $as_echo_n 0123456789 >"conftest.in"
12250  while :
12251  do
12252    cat "conftest.in" "conftest.in" >"conftest.tmp"
12253    mv "conftest.tmp" "conftest.in"
12254    cp "conftest.in" "conftest.nl"
12255    $as_echo '' >> "conftest.nl"
12256    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12257    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12258    as_fn_arith $ac_count + 1 && ac_count=$as_val
12259    if test $ac_count -gt ${ac_path_SED_max-0}; then
12260      # Best one so far, save it but keep looking for a better one
12261      ac_cv_path_SED="$ac_path_SED"
12262      ac_path_SED_max=$ac_count
12263    fi
12264    # 10*(2^10) chars as input seems more than enough
12265    test $ac_count -gt 10 && break
12266  done
12267  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12268esac
12269
12270      $ac_path_SED_found && break 3
12271    done
12272  done
12273  done
12274IFS=$as_save_IFS
12275  if test -z "$ac_cv_path_SED"; then
12276    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12277  fi
12278else
12279  ac_cv_path_SED=$SED
12280fi
12281
12282fi
12283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12284$as_echo "$ac_cv_path_SED" >&6; }
12285 SED="$ac_cv_path_SED"
12286  rm -f conftest.sed
12287
12288  else
12289    # The variable is set, but is it from the command line or the environment?
12290
12291    # Try to remove the string !SED! from our list.
12292    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12293    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12294      # If it failed, the variable was not from the command line. Ignore it,
12295      # but warn the user (except for BASH, which is always set by the calling BASH).
12296      if test "xSED" != xBASH; then
12297        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12298$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12299      fi
12300      # Try to locate tool using the code snippet
12301      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12302$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12303if ${ac_cv_path_SED+:} false; then :
12304  $as_echo_n "(cached) " >&6
12305else
12306            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12307     for ac_i in 1 2 3 4 5 6 7; do
12308       ac_script="$ac_script$as_nl$ac_script"
12309     done
12310     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12311     { ac_script=; unset ac_script;}
12312     if test -z "$SED"; then
12313  ac_path_SED_found=false
12314  # Loop through the user's path and test for each of PROGNAME-LIST
12315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12316for as_dir in $PATH
12317do
12318  IFS=$as_save_IFS
12319  test -z "$as_dir" && as_dir=.
12320    for ac_prog in sed gsed; do
12321    for ac_exec_ext in '' $ac_executable_extensions; do
12322      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12323      as_fn_executable_p "$ac_path_SED" || continue
12324# Check for GNU ac_path_SED and select it if it is found.
12325  # Check for GNU $ac_path_SED
12326case `"$ac_path_SED" --version 2>&1` in
12327*GNU*)
12328  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12329*)
12330  ac_count=0
12331  $as_echo_n 0123456789 >"conftest.in"
12332  while :
12333  do
12334    cat "conftest.in" "conftest.in" >"conftest.tmp"
12335    mv "conftest.tmp" "conftest.in"
12336    cp "conftest.in" "conftest.nl"
12337    $as_echo '' >> "conftest.nl"
12338    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12339    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12340    as_fn_arith $ac_count + 1 && ac_count=$as_val
12341    if test $ac_count -gt ${ac_path_SED_max-0}; then
12342      # Best one so far, save it but keep looking for a better one
12343      ac_cv_path_SED="$ac_path_SED"
12344      ac_path_SED_max=$ac_count
12345    fi
12346    # 10*(2^10) chars as input seems more than enough
12347    test $ac_count -gt 10 && break
12348  done
12349  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12350esac
12351
12352      $ac_path_SED_found && break 3
12353    done
12354  done
12355  done
12356IFS=$as_save_IFS
12357  if test -z "$ac_cv_path_SED"; then
12358    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12359  fi
12360else
12361  ac_cv_path_SED=$SED
12362fi
12363
12364fi
12365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12366$as_echo "$ac_cv_path_SED" >&6; }
12367 SED="$ac_cv_path_SED"
12368  rm -f conftest.sed
12369
12370    else
12371      # If it succeeded, then it was overridden by the user. We will use it
12372      # for the tool.
12373
12374      # First remove it from the list of overridden variables, so we can test
12375      # for unknown variables in the end.
12376      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12377
12378      # Check if the provided tool contains a complete path.
12379      tool_specified="$SED"
12380      tool_basename="${tool_specified##*/}"
12381      if test "x$tool_basename" = "x$tool_specified"; then
12382        # A command without a complete path is provided, search $PATH.
12383        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12384$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12385        # Extract the first word of "$tool_basename", so it can be a program name with args.
12386set dummy $tool_basename; ac_word=$2
12387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12388$as_echo_n "checking for $ac_word... " >&6; }
12389if ${ac_cv_path_SED+:} false; then :
12390  $as_echo_n "(cached) " >&6
12391else
12392  case $SED in
12393  [\\/]* | ?:[\\/]*)
12394  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12395  ;;
12396  *)
12397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12398for as_dir in $PATH
12399do
12400  IFS=$as_save_IFS
12401  test -z "$as_dir" && as_dir=.
12402    for ac_exec_ext in '' $ac_executable_extensions; do
12403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12404    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12406    break 2
12407  fi
12408done
12409  done
12410IFS=$as_save_IFS
12411
12412  ;;
12413esac
12414fi
12415SED=$ac_cv_path_SED
12416if test -n "$SED"; then
12417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12418$as_echo "$SED" >&6; }
12419else
12420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12421$as_echo "no" >&6; }
12422fi
12423
12424
12425        if test "x$SED" = x; then
12426          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12427        fi
12428      else
12429        # Otherwise we believe it is a complete path. Use it as it is.
12430        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12431$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12432        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12433$as_echo_n "checking for SED... " >&6; }
12434        if test ! -x "$tool_specified"; then
12435          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12436$as_echo "not found" >&6; }
12437          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12438        fi
12439        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12440$as_echo "$tool_specified" >&6; }
12441      fi
12442    fi
12443  fi
12444
12445
12446  if test "x$SED" = x; then
12447    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12448  fi
12449
12450
12451
12452  # Always force rm.
12453  RM="$RM -f"
12454
12455  # pwd behaves differently on various platforms and some don't support the -L flag.
12456  # Always use the bash builtin pwd to get uniform behavior.
12457  THEPWDCMD=pwd
12458
12459  # These are not required on all platforms
12460
12461
12462  # Publish this variable in the help.
12463
12464
12465  if test "x$CYGPATH" = x; then
12466    # The variable is not set by user, try to locate tool using the code snippet
12467    for ac_prog in cygpath
12468do
12469  # Extract the first word of "$ac_prog", so it can be a program name with args.
12470set dummy $ac_prog; ac_word=$2
12471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12472$as_echo_n "checking for $ac_word... " >&6; }
12473if ${ac_cv_path_CYGPATH+:} false; then :
12474  $as_echo_n "(cached) " >&6
12475else
12476  case $CYGPATH in
12477  [\\/]* | ?:[\\/]*)
12478  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12479  ;;
12480  *)
12481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12482for as_dir in $PATH
12483do
12484  IFS=$as_save_IFS
12485  test -z "$as_dir" && as_dir=.
12486    for ac_exec_ext in '' $ac_executable_extensions; do
12487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12488    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12490    break 2
12491  fi
12492done
12493  done
12494IFS=$as_save_IFS
12495
12496  ;;
12497esac
12498fi
12499CYGPATH=$ac_cv_path_CYGPATH
12500if test -n "$CYGPATH"; then
12501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12502$as_echo "$CYGPATH" >&6; }
12503else
12504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12505$as_echo "no" >&6; }
12506fi
12507
12508
12509  test -n "$CYGPATH" && break
12510done
12511
12512  else
12513    # The variable is set, but is it from the command line or the environment?
12514
12515    # Try to remove the string !CYGPATH! from our list.
12516    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12517    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12518      # If it failed, the variable was not from the command line. Ignore it,
12519      # but warn the user (except for BASH, which is always set by the calling BASH).
12520      if test "xCYGPATH" != xBASH; then
12521        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12522$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12523      fi
12524      # Try to locate tool using the code snippet
12525      for ac_prog in cygpath
12526do
12527  # Extract the first word of "$ac_prog", so it can be a program name with args.
12528set dummy $ac_prog; ac_word=$2
12529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12530$as_echo_n "checking for $ac_word... " >&6; }
12531if ${ac_cv_path_CYGPATH+:} false; then :
12532  $as_echo_n "(cached) " >&6
12533else
12534  case $CYGPATH in
12535  [\\/]* | ?:[\\/]*)
12536  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12537  ;;
12538  *)
12539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12540for as_dir in $PATH
12541do
12542  IFS=$as_save_IFS
12543  test -z "$as_dir" && as_dir=.
12544    for ac_exec_ext in '' $ac_executable_extensions; do
12545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12546    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12548    break 2
12549  fi
12550done
12551  done
12552IFS=$as_save_IFS
12553
12554  ;;
12555esac
12556fi
12557CYGPATH=$ac_cv_path_CYGPATH
12558if test -n "$CYGPATH"; then
12559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12560$as_echo "$CYGPATH" >&6; }
12561else
12562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12563$as_echo "no" >&6; }
12564fi
12565
12566
12567  test -n "$CYGPATH" && break
12568done
12569
12570    else
12571      # If it succeeded, then it was overridden by the user. We will use it
12572      # for the tool.
12573
12574      # First remove it from the list of overridden variables, so we can test
12575      # for unknown variables in the end.
12576      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12577
12578      # Check if the provided tool contains a complete path.
12579      tool_specified="$CYGPATH"
12580      tool_basename="${tool_specified##*/}"
12581      if test "x$tool_basename" = "x$tool_specified"; then
12582        # A command without a complete path is provided, search $PATH.
12583        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12584$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12585        # Extract the first word of "$tool_basename", so it can be a program name with args.
12586set dummy $tool_basename; ac_word=$2
12587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12588$as_echo_n "checking for $ac_word... " >&6; }
12589if ${ac_cv_path_CYGPATH+:} false; then :
12590  $as_echo_n "(cached) " >&6
12591else
12592  case $CYGPATH in
12593  [\\/]* | ?:[\\/]*)
12594  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12595  ;;
12596  *)
12597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12598for as_dir in $PATH
12599do
12600  IFS=$as_save_IFS
12601  test -z "$as_dir" && as_dir=.
12602    for ac_exec_ext in '' $ac_executable_extensions; do
12603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12604    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12606    break 2
12607  fi
12608done
12609  done
12610IFS=$as_save_IFS
12611
12612  ;;
12613esac
12614fi
12615CYGPATH=$ac_cv_path_CYGPATH
12616if test -n "$CYGPATH"; then
12617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12618$as_echo "$CYGPATH" >&6; }
12619else
12620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12621$as_echo "no" >&6; }
12622fi
12623
12624
12625        if test "x$CYGPATH" = x; then
12626          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12627        fi
12628      else
12629        # Otherwise we believe it is a complete path. Use it as it is.
12630        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12631$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12632        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12633$as_echo_n "checking for CYGPATH... " >&6; }
12634        if test ! -x "$tool_specified"; then
12635          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12636$as_echo "not found" >&6; }
12637          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12638        fi
12639        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12640$as_echo "$tool_specified" >&6; }
12641      fi
12642    fi
12643  fi
12644
12645
12646
12647
12648  # Publish this variable in the help.
12649
12650
12651  if test "x$READLINK" = x; then
12652    # The variable is not set by user, try to locate tool using the code snippet
12653    for ac_prog in greadlink readlink
12654do
12655  # Extract the first word of "$ac_prog", so it can be a program name with args.
12656set dummy $ac_prog; ac_word=$2
12657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12658$as_echo_n "checking for $ac_word... " >&6; }
12659if ${ac_cv_path_READLINK+:} false; then :
12660  $as_echo_n "(cached) " >&6
12661else
12662  case $READLINK in
12663  [\\/]* | ?:[\\/]*)
12664  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12665  ;;
12666  *)
12667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12668for as_dir in $PATH
12669do
12670  IFS=$as_save_IFS
12671  test -z "$as_dir" && as_dir=.
12672    for ac_exec_ext in '' $ac_executable_extensions; do
12673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12674    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12676    break 2
12677  fi
12678done
12679  done
12680IFS=$as_save_IFS
12681
12682  ;;
12683esac
12684fi
12685READLINK=$ac_cv_path_READLINK
12686if test -n "$READLINK"; then
12687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12688$as_echo "$READLINK" >&6; }
12689else
12690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12691$as_echo "no" >&6; }
12692fi
12693
12694
12695  test -n "$READLINK" && break
12696done
12697
12698  else
12699    # The variable is set, but is it from the command line or the environment?
12700
12701    # Try to remove the string !READLINK! from our list.
12702    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12703    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12704      # If it failed, the variable was not from the command line. Ignore it,
12705      # but warn the user (except for BASH, which is always set by the calling BASH).
12706      if test "xREADLINK" != xBASH; then
12707        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12708$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12709      fi
12710      # Try to locate tool using the code snippet
12711      for ac_prog in greadlink readlink
12712do
12713  # Extract the first word of "$ac_prog", so it can be a program name with args.
12714set dummy $ac_prog; ac_word=$2
12715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12716$as_echo_n "checking for $ac_word... " >&6; }
12717if ${ac_cv_path_READLINK+:} false; then :
12718  $as_echo_n "(cached) " >&6
12719else
12720  case $READLINK in
12721  [\\/]* | ?:[\\/]*)
12722  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12723  ;;
12724  *)
12725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12726for as_dir in $PATH
12727do
12728  IFS=$as_save_IFS
12729  test -z "$as_dir" && as_dir=.
12730    for ac_exec_ext in '' $ac_executable_extensions; do
12731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12732    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12734    break 2
12735  fi
12736done
12737  done
12738IFS=$as_save_IFS
12739
12740  ;;
12741esac
12742fi
12743READLINK=$ac_cv_path_READLINK
12744if test -n "$READLINK"; then
12745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12746$as_echo "$READLINK" >&6; }
12747else
12748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12749$as_echo "no" >&6; }
12750fi
12751
12752
12753  test -n "$READLINK" && break
12754done
12755
12756    else
12757      # If it succeeded, then it was overridden by the user. We will use it
12758      # for the tool.
12759
12760      # First remove it from the list of overridden variables, so we can test
12761      # for unknown variables in the end.
12762      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12763
12764      # Check if the provided tool contains a complete path.
12765      tool_specified="$READLINK"
12766      tool_basename="${tool_specified##*/}"
12767      if test "x$tool_basename" = "x$tool_specified"; then
12768        # A command without a complete path is provided, search $PATH.
12769        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12770$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12771        # Extract the first word of "$tool_basename", so it can be a program name with args.
12772set dummy $tool_basename; ac_word=$2
12773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12774$as_echo_n "checking for $ac_word... " >&6; }
12775if ${ac_cv_path_READLINK+:} false; then :
12776  $as_echo_n "(cached) " >&6
12777else
12778  case $READLINK in
12779  [\\/]* | ?:[\\/]*)
12780  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12781  ;;
12782  *)
12783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12784for as_dir in $PATH
12785do
12786  IFS=$as_save_IFS
12787  test -z "$as_dir" && as_dir=.
12788    for ac_exec_ext in '' $ac_executable_extensions; do
12789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12790    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12792    break 2
12793  fi
12794done
12795  done
12796IFS=$as_save_IFS
12797
12798  ;;
12799esac
12800fi
12801READLINK=$ac_cv_path_READLINK
12802if test -n "$READLINK"; then
12803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12804$as_echo "$READLINK" >&6; }
12805else
12806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12807$as_echo "no" >&6; }
12808fi
12809
12810
12811        if test "x$READLINK" = x; then
12812          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12813        fi
12814      else
12815        # Otherwise we believe it is a complete path. Use it as it is.
12816        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12817$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12818        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12819$as_echo_n "checking for READLINK... " >&6; }
12820        if test ! -x "$tool_specified"; then
12821          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12822$as_echo "not found" >&6; }
12823          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12824        fi
12825        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12826$as_echo "$tool_specified" >&6; }
12827      fi
12828    fi
12829  fi
12830
12831
12832
12833
12834  # Publish this variable in the help.
12835
12836
12837  if test "x$DF" = x; then
12838    # The variable is not set by user, try to locate tool using the code snippet
12839    for ac_prog in df
12840do
12841  # Extract the first word of "$ac_prog", so it can be a program name with args.
12842set dummy $ac_prog; ac_word=$2
12843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12844$as_echo_n "checking for $ac_word... " >&6; }
12845if ${ac_cv_path_DF+:} false; then :
12846  $as_echo_n "(cached) " >&6
12847else
12848  case $DF in
12849  [\\/]* | ?:[\\/]*)
12850  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12851  ;;
12852  *)
12853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12854for as_dir in $PATH
12855do
12856  IFS=$as_save_IFS
12857  test -z "$as_dir" && as_dir=.
12858    for ac_exec_ext in '' $ac_executable_extensions; do
12859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12860    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12862    break 2
12863  fi
12864done
12865  done
12866IFS=$as_save_IFS
12867
12868  ;;
12869esac
12870fi
12871DF=$ac_cv_path_DF
12872if test -n "$DF"; then
12873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12874$as_echo "$DF" >&6; }
12875else
12876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12877$as_echo "no" >&6; }
12878fi
12879
12880
12881  test -n "$DF" && break
12882done
12883
12884  else
12885    # The variable is set, but is it from the command line or the environment?
12886
12887    # Try to remove the string !DF! from our list.
12888    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12889    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12890      # If it failed, the variable was not from the command line. Ignore it,
12891      # but warn the user (except for BASH, which is always set by the calling BASH).
12892      if test "xDF" != xBASH; then
12893        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12894$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12895      fi
12896      # Try to locate tool using the code snippet
12897      for ac_prog in df
12898do
12899  # Extract the first word of "$ac_prog", so it can be a program name with args.
12900set dummy $ac_prog; ac_word=$2
12901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12902$as_echo_n "checking for $ac_word... " >&6; }
12903if ${ac_cv_path_DF+:} false; then :
12904  $as_echo_n "(cached) " >&6
12905else
12906  case $DF in
12907  [\\/]* | ?:[\\/]*)
12908  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12909  ;;
12910  *)
12911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12912for as_dir in $PATH
12913do
12914  IFS=$as_save_IFS
12915  test -z "$as_dir" && as_dir=.
12916    for ac_exec_ext in '' $ac_executable_extensions; do
12917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12918    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12920    break 2
12921  fi
12922done
12923  done
12924IFS=$as_save_IFS
12925
12926  ;;
12927esac
12928fi
12929DF=$ac_cv_path_DF
12930if test -n "$DF"; then
12931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12932$as_echo "$DF" >&6; }
12933else
12934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12935$as_echo "no" >&6; }
12936fi
12937
12938
12939  test -n "$DF" && break
12940done
12941
12942    else
12943      # If it succeeded, then it was overridden by the user. We will use it
12944      # for the tool.
12945
12946      # First remove it from the list of overridden variables, so we can test
12947      # for unknown variables in the end.
12948      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12949
12950      # Check if the provided tool contains a complete path.
12951      tool_specified="$DF"
12952      tool_basename="${tool_specified##*/}"
12953      if test "x$tool_basename" = "x$tool_specified"; then
12954        # A command without a complete path is provided, search $PATH.
12955        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12956$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12957        # Extract the first word of "$tool_basename", so it can be a program name with args.
12958set dummy $tool_basename; ac_word=$2
12959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12960$as_echo_n "checking for $ac_word... " >&6; }
12961if ${ac_cv_path_DF+:} false; then :
12962  $as_echo_n "(cached) " >&6
12963else
12964  case $DF in
12965  [\\/]* | ?:[\\/]*)
12966  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12967  ;;
12968  *)
12969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12970for as_dir in $PATH
12971do
12972  IFS=$as_save_IFS
12973  test -z "$as_dir" && as_dir=.
12974    for ac_exec_ext in '' $ac_executable_extensions; do
12975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12976    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12978    break 2
12979  fi
12980done
12981  done
12982IFS=$as_save_IFS
12983
12984  ;;
12985esac
12986fi
12987DF=$ac_cv_path_DF
12988if test -n "$DF"; then
12989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12990$as_echo "$DF" >&6; }
12991else
12992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12993$as_echo "no" >&6; }
12994fi
12995
12996
12997        if test "x$DF" = x; then
12998          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12999        fi
13000      else
13001        # Otherwise we believe it is a complete path. Use it as it is.
13002        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13003$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13004        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13005$as_echo_n "checking for DF... " >&6; }
13006        if test ! -x "$tool_specified"; then
13007          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13008$as_echo "not found" >&6; }
13009          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13010        fi
13011        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13012$as_echo "$tool_specified" >&6; }
13013      fi
13014    fi
13015  fi
13016
13017
13018
13019
13020  # Publish this variable in the help.
13021
13022
13023  if test "x$SETFILE" = x; then
13024    # The variable is not set by user, try to locate tool using the code snippet
13025    for ac_prog in SetFile
13026do
13027  # Extract the first word of "$ac_prog", so it can be a program name with args.
13028set dummy $ac_prog; ac_word=$2
13029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13030$as_echo_n "checking for $ac_word... " >&6; }
13031if ${ac_cv_path_SETFILE+:} false; then :
13032  $as_echo_n "(cached) " >&6
13033else
13034  case $SETFILE in
13035  [\\/]* | ?:[\\/]*)
13036  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13037  ;;
13038  *)
13039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13040for as_dir in $PATH
13041do
13042  IFS=$as_save_IFS
13043  test -z "$as_dir" && as_dir=.
13044    for ac_exec_ext in '' $ac_executable_extensions; do
13045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13046    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13048    break 2
13049  fi
13050done
13051  done
13052IFS=$as_save_IFS
13053
13054  ;;
13055esac
13056fi
13057SETFILE=$ac_cv_path_SETFILE
13058if test -n "$SETFILE"; then
13059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13060$as_echo "$SETFILE" >&6; }
13061else
13062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13063$as_echo "no" >&6; }
13064fi
13065
13066
13067  test -n "$SETFILE" && break
13068done
13069
13070  else
13071    # The variable is set, but is it from the command line or the environment?
13072
13073    # Try to remove the string !SETFILE! from our list.
13074    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13075    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13076      # If it failed, the variable was not from the command line. Ignore it,
13077      # but warn the user (except for BASH, which is always set by the calling BASH).
13078      if test "xSETFILE" != xBASH; then
13079        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13080$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13081      fi
13082      # Try to locate tool using the code snippet
13083      for ac_prog in SetFile
13084do
13085  # Extract the first word of "$ac_prog", so it can be a program name with args.
13086set dummy $ac_prog; ac_word=$2
13087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13088$as_echo_n "checking for $ac_word... " >&6; }
13089if ${ac_cv_path_SETFILE+:} false; then :
13090  $as_echo_n "(cached) " >&6
13091else
13092  case $SETFILE in
13093  [\\/]* | ?:[\\/]*)
13094  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13095  ;;
13096  *)
13097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13098for as_dir in $PATH
13099do
13100  IFS=$as_save_IFS
13101  test -z "$as_dir" && as_dir=.
13102    for ac_exec_ext in '' $ac_executable_extensions; do
13103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13104    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13106    break 2
13107  fi
13108done
13109  done
13110IFS=$as_save_IFS
13111
13112  ;;
13113esac
13114fi
13115SETFILE=$ac_cv_path_SETFILE
13116if test -n "$SETFILE"; then
13117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13118$as_echo "$SETFILE" >&6; }
13119else
13120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13121$as_echo "no" >&6; }
13122fi
13123
13124
13125  test -n "$SETFILE" && break
13126done
13127
13128    else
13129      # If it succeeded, then it was overridden by the user. We will use it
13130      # for the tool.
13131
13132      # First remove it from the list of overridden variables, so we can test
13133      # for unknown variables in the end.
13134      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13135
13136      # Check if the provided tool contains a complete path.
13137      tool_specified="$SETFILE"
13138      tool_basename="${tool_specified##*/}"
13139      if test "x$tool_basename" = "x$tool_specified"; then
13140        # A command without a complete path is provided, search $PATH.
13141        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13142$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13143        # Extract the first word of "$tool_basename", so it can be a program name with args.
13144set dummy $tool_basename; ac_word=$2
13145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13146$as_echo_n "checking for $ac_word... " >&6; }
13147if ${ac_cv_path_SETFILE+:} false; then :
13148  $as_echo_n "(cached) " >&6
13149else
13150  case $SETFILE in
13151  [\\/]* | ?:[\\/]*)
13152  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13153  ;;
13154  *)
13155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13156for as_dir in $PATH
13157do
13158  IFS=$as_save_IFS
13159  test -z "$as_dir" && as_dir=.
13160    for ac_exec_ext in '' $ac_executable_extensions; do
13161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13162    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13164    break 2
13165  fi
13166done
13167  done
13168IFS=$as_save_IFS
13169
13170  ;;
13171esac
13172fi
13173SETFILE=$ac_cv_path_SETFILE
13174if test -n "$SETFILE"; then
13175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13176$as_echo "$SETFILE" >&6; }
13177else
13178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13179$as_echo "no" >&6; }
13180fi
13181
13182
13183        if test "x$SETFILE" = x; then
13184          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13185        fi
13186      else
13187        # Otherwise we believe it is a complete path. Use it as it is.
13188        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13189$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13191$as_echo_n "checking for SETFILE... " >&6; }
13192        if test ! -x "$tool_specified"; then
13193          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13194$as_echo "not found" >&6; }
13195          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13196        fi
13197        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13198$as_echo "$tool_specified" >&6; }
13199      fi
13200    fi
13201  fi
13202
13203
13204
13205
13206  # Publish this variable in the help.
13207
13208
13209  if test "x$CPIO" = x; then
13210    # The variable is not set by user, try to locate tool using the code snippet
13211    for ac_prog in cpio bsdcpio
13212do
13213  # Extract the first word of "$ac_prog", so it can be a program name with args.
13214set dummy $ac_prog; ac_word=$2
13215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13216$as_echo_n "checking for $ac_word... " >&6; }
13217if ${ac_cv_path_CPIO+:} false; then :
13218  $as_echo_n "(cached) " >&6
13219else
13220  case $CPIO in
13221  [\\/]* | ?:[\\/]*)
13222  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13223  ;;
13224  *)
13225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13226for as_dir in $PATH
13227do
13228  IFS=$as_save_IFS
13229  test -z "$as_dir" && as_dir=.
13230    for ac_exec_ext in '' $ac_executable_extensions; do
13231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13232    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13234    break 2
13235  fi
13236done
13237  done
13238IFS=$as_save_IFS
13239
13240  ;;
13241esac
13242fi
13243CPIO=$ac_cv_path_CPIO
13244if test -n "$CPIO"; then
13245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13246$as_echo "$CPIO" >&6; }
13247else
13248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13249$as_echo "no" >&6; }
13250fi
13251
13252
13253  test -n "$CPIO" && break
13254done
13255
13256  else
13257    # The variable is set, but is it from the command line or the environment?
13258
13259    # Try to remove the string !CPIO! from our list.
13260    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13261    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13262      # If it failed, the variable was not from the command line. Ignore it,
13263      # but warn the user (except for BASH, which is always set by the calling BASH).
13264      if test "xCPIO" != xBASH; then
13265        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13266$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13267      fi
13268      # Try to locate tool using the code snippet
13269      for ac_prog in cpio bsdcpio
13270do
13271  # Extract the first word of "$ac_prog", so it can be a program name with args.
13272set dummy $ac_prog; ac_word=$2
13273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13274$as_echo_n "checking for $ac_word... " >&6; }
13275if ${ac_cv_path_CPIO+:} false; then :
13276  $as_echo_n "(cached) " >&6
13277else
13278  case $CPIO in
13279  [\\/]* | ?:[\\/]*)
13280  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13281  ;;
13282  *)
13283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13284for as_dir in $PATH
13285do
13286  IFS=$as_save_IFS
13287  test -z "$as_dir" && as_dir=.
13288    for ac_exec_ext in '' $ac_executable_extensions; do
13289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13290    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13292    break 2
13293  fi
13294done
13295  done
13296IFS=$as_save_IFS
13297
13298  ;;
13299esac
13300fi
13301CPIO=$ac_cv_path_CPIO
13302if test -n "$CPIO"; then
13303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13304$as_echo "$CPIO" >&6; }
13305else
13306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13307$as_echo "no" >&6; }
13308fi
13309
13310
13311  test -n "$CPIO" && break
13312done
13313
13314    else
13315      # If it succeeded, then it was overridden by the user. We will use it
13316      # for the tool.
13317
13318      # First remove it from the list of overridden variables, so we can test
13319      # for unknown variables in the end.
13320      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13321
13322      # Check if the provided tool contains a complete path.
13323      tool_specified="$CPIO"
13324      tool_basename="${tool_specified##*/}"
13325      if test "x$tool_basename" = "x$tool_specified"; then
13326        # A command without a complete path is provided, search $PATH.
13327        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13328$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13329        # Extract the first word of "$tool_basename", so it can be a program name with args.
13330set dummy $tool_basename; ac_word=$2
13331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13332$as_echo_n "checking for $ac_word... " >&6; }
13333if ${ac_cv_path_CPIO+:} false; then :
13334  $as_echo_n "(cached) " >&6
13335else
13336  case $CPIO in
13337  [\\/]* | ?:[\\/]*)
13338  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13339  ;;
13340  *)
13341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13342for as_dir in $PATH
13343do
13344  IFS=$as_save_IFS
13345  test -z "$as_dir" && as_dir=.
13346    for ac_exec_ext in '' $ac_executable_extensions; do
13347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13348    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13350    break 2
13351  fi
13352done
13353  done
13354IFS=$as_save_IFS
13355
13356  ;;
13357esac
13358fi
13359CPIO=$ac_cv_path_CPIO
13360if test -n "$CPIO"; then
13361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13362$as_echo "$CPIO" >&6; }
13363else
13364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13365$as_echo "no" >&6; }
13366fi
13367
13368
13369        if test "x$CPIO" = x; then
13370          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13371        fi
13372      else
13373        # Otherwise we believe it is a complete path. Use it as it is.
13374        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13375$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13376        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13377$as_echo_n "checking for CPIO... " >&6; }
13378        if test ! -x "$tool_specified"; then
13379          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13380$as_echo "not found" >&6; }
13381          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13382        fi
13383        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13384$as_echo "$tool_specified" >&6; }
13385      fi
13386    fi
13387  fi
13388
13389
13390
13391
13392# Now we can determine OpenJDK build and target platforms. This is required to
13393# have early on.
13394# Make sure we can run config.sub.
13395$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13396  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13397
13398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13399$as_echo_n "checking build system type... " >&6; }
13400if ${ac_cv_build+:} false; then :
13401  $as_echo_n "(cached) " >&6
13402else
13403  ac_build_alias=$build_alias
13404test "x$ac_build_alias" = x &&
13405  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13406test "x$ac_build_alias" = x &&
13407  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13408ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13409  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13410
13411fi
13412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13413$as_echo "$ac_cv_build" >&6; }
13414case $ac_cv_build in
13415*-*-*) ;;
13416*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13417esac
13418build=$ac_cv_build
13419ac_save_IFS=$IFS; IFS='-'
13420set x $ac_cv_build
13421shift
13422build_cpu=$1
13423build_vendor=$2
13424shift; shift
13425# Remember, the first character of IFS is used to create $*,
13426# except with old shells:
13427build_os=$*
13428IFS=$ac_save_IFS
13429case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13430
13431
13432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13433$as_echo_n "checking host system type... " >&6; }
13434if ${ac_cv_host+:} false; then :
13435  $as_echo_n "(cached) " >&6
13436else
13437  if test "x$host_alias" = x; then
13438  ac_cv_host=$ac_cv_build
13439else
13440  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13441    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13442fi
13443
13444fi
13445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13446$as_echo "$ac_cv_host" >&6; }
13447case $ac_cv_host in
13448*-*-*) ;;
13449*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13450esac
13451host=$ac_cv_host
13452ac_save_IFS=$IFS; IFS='-'
13453set x $ac_cv_host
13454shift
13455host_cpu=$1
13456host_vendor=$2
13457shift; shift
13458# Remember, the first character of IFS is used to create $*,
13459# except with old shells:
13460host_os=$*
13461IFS=$ac_save_IFS
13462case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13463
13464
13465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13466$as_echo_n "checking target system type... " >&6; }
13467if ${ac_cv_target+:} false; then :
13468  $as_echo_n "(cached) " >&6
13469else
13470  if test "x$target_alias" = x; then
13471  ac_cv_target=$ac_cv_host
13472else
13473  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13474    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13475fi
13476
13477fi
13478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13479$as_echo "$ac_cv_target" >&6; }
13480case $ac_cv_target in
13481*-*-*) ;;
13482*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13483esac
13484target=$ac_cv_target
13485ac_save_IFS=$IFS; IFS='-'
13486set x $ac_cv_target
13487shift
13488target_cpu=$1
13489target_vendor=$2
13490shift; shift
13491# Remember, the first character of IFS is used to create $*,
13492# except with old shells:
13493target_os=$*
13494IFS=$ac_save_IFS
13495case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13496
13497
13498# The aliases save the names the user supplied, while $host etc.
13499# will get canonicalized.
13500test -n "$target_alias" &&
13501  test "$program_prefix$program_suffix$program_transform_name" = \
13502    NONENONEs,x,x, &&
13503  program_prefix=${target_alias}-
13504
13505  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13506  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13507  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13508  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13509  # to use the configure naming style.
13510
13511
13512
13513
13514
13515  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13516  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13517  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13518  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13519  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13520  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13521
13522
13523
13524  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13525
13526  case "$build_os" in
13527    *linux*)
13528      VAR_OS=linux
13529      VAR_OS_TYPE=unix
13530      ;;
13531    *solaris*)
13532      VAR_OS=solaris
13533      VAR_OS_TYPE=unix
13534      ;;
13535    *darwin*)
13536      VAR_OS=macosx
13537      VAR_OS_TYPE=unix
13538      ;;
13539    *bsd*)
13540      VAR_OS=bsd
13541      VAR_OS_TYPE=unix
13542      ;;
13543    *cygwin*)
13544      VAR_OS=windows
13545      VAR_OS_ENV=windows.cygwin
13546      ;;
13547    *mingw*)
13548      VAR_OS=windows
13549      VAR_OS_ENV=windows.msys
13550      ;;
13551    *aix*)
13552      VAR_OS=aix
13553      VAR_OS_TYPE=unix
13554      ;;
13555    *)
13556      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13557      ;;
13558  esac
13559
13560
13561  # First argument is the cpu name from the trip/quad
13562  case "$build_cpu" in
13563    x86_64)
13564      VAR_CPU=x86_64
13565      VAR_CPU_ARCH=x86
13566      VAR_CPU_BITS=64
13567      VAR_CPU_ENDIAN=little
13568      ;;
13569    i?86)
13570      VAR_CPU=x86
13571      VAR_CPU_ARCH=x86
13572      VAR_CPU_BITS=32
13573      VAR_CPU_ENDIAN=little
13574      ;;
13575    arm*)
13576      VAR_CPU=arm
13577      VAR_CPU_ARCH=arm
13578      VAR_CPU_BITS=32
13579      VAR_CPU_ENDIAN=little
13580      ;;
13581    powerpc)
13582      VAR_CPU=ppc
13583      VAR_CPU_ARCH=ppc
13584      VAR_CPU_BITS=32
13585      VAR_CPU_ENDIAN=big
13586      ;;
13587    powerpc64)
13588      VAR_CPU=ppc64
13589      VAR_CPU_ARCH=ppc
13590      VAR_CPU_BITS=64
13591      VAR_CPU_ENDIAN=big
13592      ;;
13593    powerpc64le)
13594      VAR_CPU=ppc64
13595      VAR_CPU_ARCH=ppc
13596      VAR_CPU_BITS=64
13597      VAR_CPU_ENDIAN=little
13598      ;;
13599    s390)
13600      VAR_CPU=s390
13601      VAR_CPU_ARCH=s390
13602      VAR_CPU_BITS=32
13603      VAR_CPU_ENDIAN=big
13604      ;;
13605    s390x)
13606      VAR_CPU=s390x
13607      VAR_CPU_ARCH=s390
13608      VAR_CPU_BITS=64
13609      VAR_CPU_ENDIAN=big
13610      ;;
13611    sparc)
13612      VAR_CPU=sparc
13613      VAR_CPU_ARCH=sparc
13614      VAR_CPU_BITS=32
13615      VAR_CPU_ENDIAN=big
13616      ;;
13617    sparcv9|sparc64)
13618      VAR_CPU=sparcv9
13619      VAR_CPU_ARCH=sparc
13620      VAR_CPU_BITS=64
13621      VAR_CPU_ENDIAN=big
13622      ;;
13623    *)
13624      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13625      ;;
13626  esac
13627
13628  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13629  OPENJDK_BUILD_OS="$VAR_OS"
13630  if test "x$VAR_OS_TYPE" != x; then
13631    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13632  else
13633    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13634  fi
13635  if test "x$VAR_OS_ENV" != x; then
13636    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13637  else
13638    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13639  fi
13640  OPENJDK_BUILD_CPU="$VAR_CPU"
13641  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13642  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13643  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13644
13645
13646
13647
13648
13649
13650
13651
13652  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13653$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13655$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13656
13657  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13658
13659  case "$host_os" in
13660    *linux*)
13661      VAR_OS=linux
13662      VAR_OS_TYPE=unix
13663      ;;
13664    *solaris*)
13665      VAR_OS=solaris
13666      VAR_OS_TYPE=unix
13667      ;;
13668    *darwin*)
13669      VAR_OS=macosx
13670      VAR_OS_TYPE=unix
13671      ;;
13672    *bsd*)
13673      VAR_OS=bsd
13674      VAR_OS_TYPE=unix
13675      ;;
13676    *cygwin*)
13677      VAR_OS=windows
13678      VAR_OS_ENV=windows.cygwin
13679      ;;
13680    *mingw*)
13681      VAR_OS=windows
13682      VAR_OS_ENV=windows.msys
13683      ;;
13684    *aix*)
13685      VAR_OS=aix
13686      VAR_OS_TYPE=unix
13687      ;;
13688    *)
13689      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13690      ;;
13691  esac
13692
13693
13694  # First argument is the cpu name from the trip/quad
13695  case "$host_cpu" in
13696    x86_64)
13697      VAR_CPU=x86_64
13698      VAR_CPU_ARCH=x86
13699      VAR_CPU_BITS=64
13700      VAR_CPU_ENDIAN=little
13701      ;;
13702    i?86)
13703      VAR_CPU=x86
13704      VAR_CPU_ARCH=x86
13705      VAR_CPU_BITS=32
13706      VAR_CPU_ENDIAN=little
13707      ;;
13708    arm*)
13709      VAR_CPU=arm
13710      VAR_CPU_ARCH=arm
13711      VAR_CPU_BITS=32
13712      VAR_CPU_ENDIAN=little
13713      ;;
13714    powerpc)
13715      VAR_CPU=ppc
13716      VAR_CPU_ARCH=ppc
13717      VAR_CPU_BITS=32
13718      VAR_CPU_ENDIAN=big
13719      ;;
13720    powerpc64)
13721      VAR_CPU=ppc64
13722      VAR_CPU_ARCH=ppc
13723      VAR_CPU_BITS=64
13724      VAR_CPU_ENDIAN=big
13725      ;;
13726    powerpc64le)
13727      VAR_CPU=ppc64
13728      VAR_CPU_ARCH=ppc
13729      VAR_CPU_BITS=64
13730      VAR_CPU_ENDIAN=little
13731      ;;
13732    s390)
13733      VAR_CPU=s390
13734      VAR_CPU_ARCH=s390
13735      VAR_CPU_BITS=32
13736      VAR_CPU_ENDIAN=big
13737      ;;
13738    s390x)
13739      VAR_CPU=s390x
13740      VAR_CPU_ARCH=s390
13741      VAR_CPU_BITS=64
13742      VAR_CPU_ENDIAN=big
13743      ;;
13744    sparc)
13745      VAR_CPU=sparc
13746      VAR_CPU_ARCH=sparc
13747      VAR_CPU_BITS=32
13748      VAR_CPU_ENDIAN=big
13749      ;;
13750    sparcv9|sparc64)
13751      VAR_CPU=sparcv9
13752      VAR_CPU_ARCH=sparc
13753      VAR_CPU_BITS=64
13754      VAR_CPU_ENDIAN=big
13755      ;;
13756    *)
13757      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13758      ;;
13759  esac
13760
13761  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13762  OPENJDK_TARGET_OS="$VAR_OS"
13763  if test "x$VAR_OS_TYPE" != x; then
13764    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13765  else
13766    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13767  fi
13768  if test "x$VAR_OS_ENV" != x; then
13769    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13770  else
13771    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13772  fi
13773  OPENJDK_TARGET_CPU="$VAR_CPU"
13774  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13775  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13776  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13777
13778
13779
13780
13781
13782
13783
13784
13785  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13786$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13788$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13789
13790
13791
13792# Check whether --with-target-bits was given.
13793if test "${with_target_bits+set}" = set; then :
13794  withval=$with_target_bits;
13795fi
13796
13797
13798  # We have three types of compiles:
13799  # native  == normal compilation, target system == build system
13800  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13801  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13802  #
13803  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13804    # We're doing a proper cross-compilation
13805    COMPILE_TYPE="cross"
13806  else
13807    COMPILE_TYPE="native"
13808  fi
13809
13810  if test "x$with_target_bits" != x; then
13811    if test "x$COMPILE_TYPE" = "xcross"; then
13812      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13813    fi
13814
13815    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13816      # A reduced build is requested
13817      COMPILE_TYPE="reduced"
13818      OPENJDK_TARGET_CPU_BITS=32
13819      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13820        OPENJDK_TARGET_CPU=x86
13821      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13822        OPENJDK_TARGET_CPU=sparc
13823      else
13824        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13825      fi
13826    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13827      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
13828    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13829      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13830$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13831    else
13832      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13833    fi
13834  fi
13835
13836
13837  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13838$as_echo_n "checking compilation type... " >&6; }
13839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13840$as_echo "$COMPILE_TYPE" >&6; }
13841
13842
13843  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13844    REQUIRED_OS_NAME=SunOS
13845    REQUIRED_OS_VERSION=5.10
13846  fi
13847  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13848    REQUIRED_OS_NAME=Linux
13849    REQUIRED_OS_VERSION=2.6
13850  fi
13851  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13852    REQUIRED_OS_NAME=Windows
13853    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13854      REQUIRED_OS_VERSION=5.2
13855    else
13856      REQUIRED_OS_VERSION=5.1
13857    fi
13858  fi
13859  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13860    REQUIRED_OS_NAME=Darwin
13861    REQUIRED_OS_VERSION=11.2
13862  fi
13863
13864
13865
13866
13867
13868  # Also store the legacy naming of the cpu.
13869  # Ie i586 and amd64 instead of x86 and x86_64
13870  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13871  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13872    OPENJDK_TARGET_CPU_LEGACY="i586"
13873  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13874    # On all platforms except MacOSX replace x86_64 with amd64.
13875    OPENJDK_TARGET_CPU_LEGACY="amd64"
13876  fi
13877
13878
13879  # And the second legacy naming of the cpu.
13880  # Ie i386 and amd64 instead of x86 and x86_64.
13881  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13882  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13883    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13884  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13885    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13886  fi
13887
13888
13889  # This is the name of the cpu (but using i386 and amd64 instead of
13890  # x86 and x86_64, respectively), preceeded by a /, to be used when
13891  # locating libraries. On macosx, it's empty, though.
13892  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13893  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13894    OPENJDK_TARGET_CPU_LIBDIR=""
13895  fi
13896
13897
13898  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13899  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13900  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13901  OPENJDK_TARGET_CPU_ISADIR=""
13902  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13903    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13904      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13905    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13906      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13907    fi
13908  fi
13909
13910
13911  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13912  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13913  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13914    # On linux only, we replace x86 with i386.
13915    OPENJDK_TARGET_CPU_OSARCH="i386"
13916  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13917    # On all platforms except macosx, we replace x86_64 with amd64.
13918    OPENJDK_TARGET_CPU_OSARCH="amd64"
13919  fi
13920
13921
13922  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13923  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13924    OPENJDK_TARGET_CPU_JLI="i386"
13925  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13926    # On all platforms except macosx, we replace x86_64 with amd64.
13927    OPENJDK_TARGET_CPU_JLI="amd64"
13928  fi
13929  # Now setup the -D flags for building libjli.
13930  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13931  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13932    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13933      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13934    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13935      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13936    fi
13937  fi
13938
13939
13940  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13941      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13942  else
13943      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13944  fi
13945
13946
13947  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13948    A_LP64="LP64:="
13949    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13950    # unpack200.exe
13951    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13952      ADD_LP64="-D_LP64=1"
13953    fi
13954  fi
13955  LP64=$A_LP64
13956
13957
13958  if test "x$COMPILE_TYPE" = "xcross"; then
13959    # FIXME: ... or should this include reduced builds..?
13960    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13961  else
13962    DEFINE_CROSS_COMPILE_ARCH=""
13963  fi
13964
13965
13966  # ZERO_ARCHDEF is used to enable architecture-specific code
13967  case "${OPENJDK_TARGET_CPU}" in
13968    ppc*)    ZERO_ARCHDEF=PPC   ;;
13969    s390*)   ZERO_ARCHDEF=S390  ;;
13970    sparc*)  ZERO_ARCHDEF=SPARC ;;
13971    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13972    x86)     ZERO_ARCHDEF=IA32  ;;
13973    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13974  esac
13975
13976
13977
13978
13979# Continue setting up basic stuff. Most remaining code require fundamental tools.
13980
13981  # Save the current directory this script was started from
13982  CURDIR="$PWD"
13983
13984  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13985    PATH_SEP=";"
13986
13987  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13988  if test $SRC_ROOT_LENGTH -gt 100; then
13989    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13990  fi
13991
13992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13993    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13994$as_echo_n "checking cygwin release... " >&6; }
13995    CYGWIN_VERSION=`$UNAME -r`
13996    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13997$as_echo "$CYGWIN_VERSION" >&6; }
13998    WINDOWS_ENV_VENDOR='cygwin'
13999    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14000
14001    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
14002    if test "x$CYGWIN_VERSION_OK" = x; then
14003      { $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
14004$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;}
14005      as_fn_error $? "Cannot continue" "$LINENO" 5
14006    fi
14007    if test "x$CYGPATH" = x; then
14008      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14009    fi
14010    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14011$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14012    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14013    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14014    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14015    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14016    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14017$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14018    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14019    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14020    if test "x$test_cygdrive_prefix" = x; then
14021      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14022    fi
14023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14025$as_echo_n "checking msys release... " >&6; }
14026    MSYS_VERSION=`$UNAME -r`
14027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14028$as_echo "$MSYS_VERSION" >&6; }
14029
14030    WINDOWS_ENV_VENDOR='msys'
14031    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14032
14033    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14034$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14035    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14036    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14037
14038  windows_path="$MSYS_ROOT_PATH"
14039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14040    unix_path=`$CYGPATH -u "$windows_path"`
14041    MSYS_ROOT_PATH="$unix_path"
14042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14044    MSYS_ROOT_PATH="$unix_path"
14045  fi
14046
14047    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14048$as_echo "$MSYS_ROOT_PATH" >&6; }
14049    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14050  else
14051    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14052  fi
14053
14054  # Test if windows or unix (cygwin/msys) find is first in path.
14055  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14056$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14057  FIND_BINARY_OUTPUT=`find --version 2>&1`
14058  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14059    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14060$as_echo "unix style" >&6; }
14061  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14062    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14063$as_echo "Windows" >&6; }
14064    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14065$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14066    { $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
14067$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14068    as_fn_error $? "Cannot continue" "$LINENO" 5
14069  else
14070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14071$as_echo "unknown" >&6; }
14072    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14073$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14074  fi
14075
14076  else
14077    PATH_SEP=":"
14078  fi
14079
14080
14081  # We get the top-level directory from the supporting wrappers.
14082  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14083$as_echo_n "checking for top-level directory... " >&6; }
14084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14085$as_echo "$TOPDIR" >&6; }
14086
14087
14088  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14089
14090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14091
14092  # Input might be given as Windows format, start by converting to
14093  # unix format.
14094  path="$CURDIR"
14095  new_path=`$CYGPATH -u "$path"`
14096
14097  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14098  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14099  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14100  # "foo.exe" is OK but "foo" is an error.
14101  #
14102  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14103  # It is also a way to make sure we got the proper file name for the real test later on.
14104  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14105  if test "x$test_shortpath" = x; then
14106    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14107$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14108    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14109  fi
14110
14111  # Call helper function which possibly converts this using DOS-style short mode.
14112  # If so, the updated path is stored in $new_path.
14113
14114  input_path="$new_path"
14115  # Check if we need to convert this using DOS-style short mode. If the path
14116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14117  # take no chances and rewrite it.
14118  # Note: m4 eats our [], so we need to use [ and ] instead.
14119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14120  if test "x$has_forbidden_chars" != x; then
14121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14122    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14123    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14124    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14125      # Going to short mode and back again did indeed matter. Since short mode is
14126      # case insensitive, let's make it lowercase to improve readability.
14127      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14128      # Now convert it back to Unix-stile (cygpath)
14129      input_path=`$CYGPATH -u "$shortmode_path"`
14130      new_path="$input_path"
14131    fi
14132  fi
14133
14134  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14135  if test "x$test_cygdrive_prefix" = x; then
14136    # As a simple fix, exclude /usr/bin since it's not a real path.
14137    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14138      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14139      # a path prefixed by /cygdrive for fixpath to work.
14140      new_path="$CYGWIN_ROOT_PATH$input_path"
14141    fi
14142  fi
14143
14144
14145  if test "x$path" != "x$new_path"; then
14146    CURDIR="$new_path"
14147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14148$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14149  fi
14150
14151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14152
14153  path="$CURDIR"
14154  has_colon=`$ECHO $path | $GREP ^.:`
14155  new_path="$path"
14156  if test "x$has_colon" = x; then
14157    # Not in mixed or Windows style, start by that.
14158    new_path=`cmd //c echo $path`
14159  fi
14160
14161
14162  input_path="$new_path"
14163  # Check if we need to convert this using DOS-style short mode. If the path
14164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14165  # take no chances and rewrite it.
14166  # Note: m4 eats our [], so we need to use [ and ] instead.
14167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14168  if test "x$has_forbidden_chars" != x; then
14169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14170    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14171  fi
14172
14173
14174  windows_path="$new_path"
14175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14176    unix_path=`$CYGPATH -u "$windows_path"`
14177    new_path="$unix_path"
14178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14180    new_path="$unix_path"
14181  fi
14182
14183  if test "x$path" != "x$new_path"; then
14184    CURDIR="$new_path"
14185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14186$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14187  fi
14188
14189  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14190  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14191
14192  else
14193    # We're on a unix platform. Hooray! :)
14194    path="$CURDIR"
14195    has_space=`$ECHO "$path" | $GREP " "`
14196    if test "x$has_space" != x; then
14197      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14198$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14199      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14200    fi
14201
14202    # Use eval to expand a potential ~
14203    eval path="$path"
14204    if test ! -f "$path" && test ! -d "$path"; then
14205      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14206    fi
14207
14208    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14209  fi
14210
14211
14212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14213
14214  # Input might be given as Windows format, start by converting to
14215  # unix format.
14216  path="$TOPDIR"
14217  new_path=`$CYGPATH -u "$path"`
14218
14219  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14220  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14221  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14222  # "foo.exe" is OK but "foo" is an error.
14223  #
14224  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14225  # It is also a way to make sure we got the proper file name for the real test later on.
14226  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14227  if test "x$test_shortpath" = x; then
14228    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14229$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14230    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14231  fi
14232
14233  # Call helper function which possibly converts this using DOS-style short mode.
14234  # If so, the updated path is stored in $new_path.
14235
14236  input_path="$new_path"
14237  # Check if we need to convert this using DOS-style short mode. If the path
14238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14239  # take no chances and rewrite it.
14240  # Note: m4 eats our [], so we need to use [ and ] instead.
14241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14242  if test "x$has_forbidden_chars" != x; then
14243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14244    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14245    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14246    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14247      # Going to short mode and back again did indeed matter. Since short mode is
14248      # case insensitive, let's make it lowercase to improve readability.
14249      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14250      # Now convert it back to Unix-stile (cygpath)
14251      input_path=`$CYGPATH -u "$shortmode_path"`
14252      new_path="$input_path"
14253    fi
14254  fi
14255
14256  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14257  if test "x$test_cygdrive_prefix" = x; then
14258    # As a simple fix, exclude /usr/bin since it's not a real path.
14259    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14260      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14261      # a path prefixed by /cygdrive for fixpath to work.
14262      new_path="$CYGWIN_ROOT_PATH$input_path"
14263    fi
14264  fi
14265
14266
14267  if test "x$path" != "x$new_path"; then
14268    TOPDIR="$new_path"
14269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14270$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14271  fi
14272
14273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14274
14275  path="$TOPDIR"
14276  has_colon=`$ECHO $path | $GREP ^.:`
14277  new_path="$path"
14278  if test "x$has_colon" = x; then
14279    # Not in mixed or Windows style, start by that.
14280    new_path=`cmd //c echo $path`
14281  fi
14282
14283
14284  input_path="$new_path"
14285  # Check if we need to convert this using DOS-style short mode. If the path
14286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14287  # take no chances and rewrite it.
14288  # Note: m4 eats our [], so we need to use [ and ] instead.
14289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14290  if test "x$has_forbidden_chars" != x; then
14291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14292    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14293  fi
14294
14295
14296  windows_path="$new_path"
14297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14298    unix_path=`$CYGPATH -u "$windows_path"`
14299    new_path="$unix_path"
14300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14302    new_path="$unix_path"
14303  fi
14304
14305  if test "x$path" != "x$new_path"; then
14306    TOPDIR="$new_path"
14307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14308$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14309  fi
14310
14311  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14312  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14313
14314  else
14315    # We're on a unix platform. Hooray! :)
14316    path="$TOPDIR"
14317    has_space=`$ECHO "$path" | $GREP " "`
14318    if test "x$has_space" != x; then
14319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14320$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14321      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14322    fi
14323
14324    # Use eval to expand a potential ~
14325    eval path="$path"
14326    if test ! -f "$path" && test ! -d "$path"; then
14327      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14328    fi
14329
14330    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14331  fi
14332
14333  # SRC_ROOT is a traditional alias for TOPDIR.
14334  SRC_ROOT=$TOPDIR
14335
14336  # Locate the directory of this script.
14337  AUTOCONF_DIR=$TOPDIR/common/autoconf
14338
14339
14340  # Setup default logging of stdout and stderr to build.log in the output root.
14341  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14342  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14343  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14344
14345
14346
14347
14348
14349# Check if it's a pure open build or if custom sources are to be used.
14350
14351  # Check whether --enable-openjdk-only was given.
14352if test "${enable_openjdk_only+set}" = set; then :
14353  enableval=$enable_openjdk_only;
14354else
14355  enable_openjdk_only="no"
14356fi
14357
14358
14359  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14360$as_echo_n "checking for presence of closed sources... " >&6; }
14361  if test -d "$SRC_ROOT/jdk/src/closed"; then
14362    CLOSED_SOURCE_PRESENT=yes
14363  else
14364    CLOSED_SOURCE_PRESENT=no
14365  fi
14366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14367$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14368
14369  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14370$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14371  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14373$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14374
14375  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14376    OPENJDK=true
14377    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14378      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14379$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14380    fi
14381  else
14382    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14383      OPENJDK=true
14384    else
14385      OPENJDK=false
14386    fi
14387  fi
14388
14389  if test "x$OPENJDK" = "xtrue"; then
14390    SET_OPENJDK="OPENJDK=true"
14391  fi
14392
14393
14394
14395  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14396  # the IncludeCustomExtension macro.
14397
14398
14399# Check whether --with-custom-make-dir was given.
14400if test "${with_custom_make_dir+set}" = set; then :
14401  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
14402$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14403fi
14404
14405
14406
14407
14408# These are needed to be able to create a configuration name (and thus the output directory)
14409
14410  ###############################################################################
14411  #
14412  # Check which variant of the JDK that we want to build.
14413  # Currently we have:
14414  #    normal:   standard edition
14415  # but the custom make system may add other variants
14416  #
14417  # Effectively the JDK variant gives a name to a specific set of
14418  # modules to compile into the JDK. In the future, these modules
14419  # might even be Jigsaw modules.
14420  #
14421  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14422$as_echo_n "checking which variant of the JDK to build... " >&6; }
14423
14424# Check whether --with-jdk-variant was given.
14425if test "${with_jdk_variant+set}" = set; then :
14426  withval=$with_jdk_variant;
14427fi
14428
14429
14430  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14431    JDK_VARIANT="normal"
14432  else
14433    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14434  fi
14435
14436
14437
14438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14439$as_echo "$JDK_VARIANT" >&6; }
14440
14441
14442###############################################################################
14443#
14444# Check which interpreter of the JVM we want to build.
14445# Currently we have:
14446#    template: Template interpreter (the default)
14447#    cpp     : C++ interpreter
14448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14449$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14450
14451# Check whether --with-jvm-interpreter was given.
14452if test "${with_jvm_interpreter+set}" = set; then :
14453  withval=$with_jvm_interpreter;
14454fi
14455
14456
14457if test "x$with_jvm_interpreter" = x; then
14458     with_jvm_interpreter="template"
14459fi
14460
14461JVM_INTERPRETER="$with_jvm_interpreter"
14462
14463if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14464   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14465fi
14466
14467
14468
14469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14470$as_echo "$with_jvm_interpreter" >&6; }
14471
14472
14473
14474  ###############################################################################
14475  #
14476  # Check which variants of the JVM that we want to build.
14477  # Currently we have:
14478  #    server: normal interpreter and a tiered C1/C2 compiler
14479  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14480  #    minimal1: reduced form of client with optional VM services and features stripped out
14481  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14482  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14483  #    zero: no machine code interpreter, no compiler
14484  #    zeroshark: zero interpreter and shark/llvm compiler backend
14485#    core: interpreter only, no compiler (only works on some platforms)
14486  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14487$as_echo_n "checking which variants of the JVM to build... " >&6; }
14488
14489# Check whether --with-jvm-variants was given.
14490if test "${with_jvm_variants+set}" = set; then :
14491  withval=$with_jvm_variants;
14492fi
14493
14494
14495  if test "x$with_jvm_variants" = x; then
14496    with_jvm_variants="server"
14497  fi
14498
14499  JVM_VARIANTS=",$with_jvm_variants,"
14500  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,//'`
14501
14502  if test "x$TEST_VARIANTS" != "x,"; then
14503     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14504  fi
14505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14506$as_echo "$with_jvm_variants" >&6; }
14507
14508  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14509  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14510  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14511  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14512  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14513  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14514  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14515
14516  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14517    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14518      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14519    fi
14520  fi
14521  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14522    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14523      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14524    fi
14525  fi
14526  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14527    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14528      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14529    fi
14530  fi
14531
14532  # Replace the commas with AND for use in the build directory name.
14533  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14534  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/'`
14535  if test "x$COUNT_VARIANTS" != "x,1"; then
14536    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14537  else
14538    BUILDING_MULTIPLE_JVM_VARIANTS=no
14539  fi
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550  INCLUDE_SA=true
14551  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14552    INCLUDE_SA=false
14553  fi
14554  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14555    INCLUDE_SA=false
14556  fi
14557  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14558    INCLUDE_SA=false
14559  fi
14560
14561
14562  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14563    MACOSX_UNIVERSAL="true"
14564  fi
14565
14566
14567
14568
14569  ###############################################################################
14570  #
14571  # Set the debug level
14572  #    release: no debug information, all optimizations, no asserts.
14573  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14574  #    fastdebug: debug information (-g), all optimizations, all asserts
14575  #    slowdebug: debug information (-g), no optimizations, all asserts
14576  #
14577  DEBUG_LEVEL="release"
14578  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14579$as_echo_n "checking which debug level to use... " >&6; }
14580  # Check whether --enable-debug was given.
14581if test "${enable_debug+set}" = set; then :
14582  enableval=$enable_debug;
14583        ENABLE_DEBUG="${enableval}"
14584        DEBUG_LEVEL="fastdebug"
14585
14586else
14587  ENABLE_DEBUG="no"
14588fi
14589
14590
14591
14592# Check whether --with-debug-level was given.
14593if test "${with_debug_level+set}" = set; then :
14594  withval=$with_debug_level;
14595        DEBUG_LEVEL="${withval}"
14596        if test "x$ENABLE_DEBUG" = xyes; then
14597          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14598        fi
14599
14600fi
14601
14602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14603$as_echo "$DEBUG_LEVEL" >&6; }
14604
14605  if test "x$DEBUG_LEVEL" != xrelease && \
14606      test "x$DEBUG_LEVEL" != xoptimized && \
14607      test "x$DEBUG_LEVEL" != xfastdebug && \
14608      test "x$DEBUG_LEVEL" != xslowdebug; then
14609    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14610  fi
14611
14612
14613  ###############################################################################
14614  #
14615  # Setup legacy vars/targets and new vars to deal with different debug levels.
14616  #
14617
14618  case $DEBUG_LEVEL in
14619    release )
14620      VARIANT="OPT"
14621      FASTDEBUG="false"
14622      DEBUG_CLASSFILES="false"
14623      BUILD_VARIANT_RELEASE=""
14624      HOTSPOT_DEBUG_LEVEL="product"
14625      HOTSPOT_EXPORT="product"
14626      ;;
14627    fastdebug )
14628      VARIANT="DBG"
14629      FASTDEBUG="true"
14630      DEBUG_CLASSFILES="true"
14631      BUILD_VARIANT_RELEASE="-fastdebug"
14632      HOTSPOT_DEBUG_LEVEL="fastdebug"
14633      HOTSPOT_EXPORT="fastdebug"
14634      ;;
14635    slowdebug )
14636      VARIANT="DBG"
14637      FASTDEBUG="false"
14638      DEBUG_CLASSFILES="true"
14639      BUILD_VARIANT_RELEASE="-debug"
14640      HOTSPOT_DEBUG_LEVEL="debug"
14641      HOTSPOT_EXPORT="debug"
14642      ;;
14643    optimized )
14644      VARIANT="OPT"
14645      FASTDEBUG="false"
14646      DEBUG_CLASSFILES="false"
14647      BUILD_VARIANT_RELEASE="-optimized"
14648      HOTSPOT_DEBUG_LEVEL="optimized"
14649      HOTSPOT_EXPORT="optimized"
14650      ;;
14651  esac
14652
14653  # The debug level 'optimized' is a little special because it is currently only
14654  # applicable to the HotSpot build where it means to build a completely
14655  # optimized version of the VM without any debugging code (like for the
14656  # 'release' debug level which is called 'product' in the HotSpot build) but
14657  # with the exception that it can contain additional code which is otherwise
14658  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14659  # test new and/or experimental features which are not intended for customer
14660  # shipment. Because these new features need to be tested and benchmarked in
14661  # real world scenarios, we want to build the containing JDK at the 'release'
14662  # debug level.
14663  if test "x$DEBUG_LEVEL" = xoptimized; then
14664    DEBUG_LEVEL="release"
14665  fi
14666
14667  #####
14668  # Generate the legacy makefile targets for hotspot.
14669  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14670  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14671  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14672  # But until then ...
14673  HOTSPOT_TARGET=""
14674
14675  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14676    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14677  fi
14678
14679  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14680    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14681  fi
14682
14683  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14684    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14685  fi
14686
14687  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14688    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14689  fi
14690
14691  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14692    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14693  fi
14694
14695  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14696    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14697  fi
14698
14699  if test "x$JVM_VARIANT_CORE" = xtrue; then
14700    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14701  fi
14702
14703  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14704
14705  # On Macosx universal binaries are produced, but they only contain
14706  # 64 bit intel. This invalidates control of which jvms are built
14707  # from configure, but only server is valid anyway. Fix this
14708  # when hotspot makefiles are rewritten.
14709  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14710    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14711  fi
14712
14713  #####
14714
14715
14716
14717
14718
14719
14720
14721
14722# With basic setup done, call the custom early hook.
14723
14724
14725# Check if we have devkits, extra paths or sysroot set.
14726
14727
14728# Check whether --with-devkit was given.
14729if test "${with_devkit+set}" = set; then :
14730  withval=$with_devkit;
14731
14732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14733
14734  # Input might be given as Windows format, start by converting to
14735  # unix format.
14736  path="$with_devkit"
14737  new_path=`$CYGPATH -u "$path"`
14738
14739  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14740  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14741  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14742  # "foo.exe" is OK but "foo" is an error.
14743  #
14744  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14745  # It is also a way to make sure we got the proper file name for the real test later on.
14746  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14747  if test "x$test_shortpath" = x; then
14748    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14749$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14750    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14751  fi
14752
14753  # Call helper function which possibly converts this using DOS-style short mode.
14754  # If so, the updated path is stored in $new_path.
14755
14756  input_path="$new_path"
14757  # Check if we need to convert this using DOS-style short mode. If the path
14758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14759  # take no chances and rewrite it.
14760  # Note: m4 eats our [], so we need to use [ and ] instead.
14761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14762  if test "x$has_forbidden_chars" != x; then
14763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14764    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14765    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14766    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14767      # Going to short mode and back again did indeed matter. Since short mode is
14768      # case insensitive, let's make it lowercase to improve readability.
14769      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14770      # Now convert it back to Unix-stile (cygpath)
14771      input_path=`$CYGPATH -u "$shortmode_path"`
14772      new_path="$input_path"
14773    fi
14774  fi
14775
14776  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14777  if test "x$test_cygdrive_prefix" = x; then
14778    # As a simple fix, exclude /usr/bin since it's not a real path.
14779    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14780      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14781      # a path prefixed by /cygdrive for fixpath to work.
14782      new_path="$CYGWIN_ROOT_PATH$input_path"
14783    fi
14784  fi
14785
14786
14787  if test "x$path" != "x$new_path"; then
14788    with_devkit="$new_path"
14789    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14790$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14791  fi
14792
14793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14794
14795  path="$with_devkit"
14796  has_colon=`$ECHO $path | $GREP ^.:`
14797  new_path="$path"
14798  if test "x$has_colon" = x; then
14799    # Not in mixed or Windows style, start by that.
14800    new_path=`cmd //c echo $path`
14801  fi
14802
14803
14804  input_path="$new_path"
14805  # Check if we need to convert this using DOS-style short mode. If the path
14806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14807  # take no chances and rewrite it.
14808  # Note: m4 eats our [], so we need to use [ and ] instead.
14809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14810  if test "x$has_forbidden_chars" != x; then
14811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14812    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14813  fi
14814
14815
14816  windows_path="$new_path"
14817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14818    unix_path=`$CYGPATH -u "$windows_path"`
14819    new_path="$unix_path"
14820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14822    new_path="$unix_path"
14823  fi
14824
14825  if test "x$path" != "x$new_path"; then
14826    with_devkit="$new_path"
14827    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14828$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14829  fi
14830
14831  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14832  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14833
14834  else
14835    # We're on a unix platform. Hooray! :)
14836    path="$with_devkit"
14837    has_space=`$ECHO "$path" | $GREP " "`
14838    if test "x$has_space" != x; then
14839      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14840$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14841      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14842    fi
14843
14844    # Use eval to expand a potential ~
14845    eval path="$path"
14846    if test ! -f "$path" && test ! -d "$path"; then
14847      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14848    fi
14849
14850    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14851  fi
14852
14853        DEVKIT_ROOT="$with_devkit"
14854        # Check for a meta data info file in the root of the devkit
14855        if test -f "$DEVKIT_ROOT/devkit.info"; then
14856          # This potentially sets the following:
14857          # DEVKIT_NAME: A descriptive name of the devkit
14858          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14859          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14860          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14861          . $DEVKIT_ROOT/devkit.info
14862        fi
14863
14864        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14865$as_echo_n "checking for devkit... " >&6; }
14866        if test "x$DEVKIT_NAME" != x; then
14867          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14868$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14869        else
14870          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14871$as_echo "$DEVKIT_ROOT" >&6; }
14872        fi
14873
14874        if test "x$DEVKIT_EXTRA_PATH" != x; then
14875
14876  if test "x$DEVKIT_EXTRA_PATH" != x; then
14877    if test "x$EXTRA_PATH" = x; then
14878      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14879    else
14880      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14881    fi
14882  fi
14883
14884        fi
14885
14886        # Fallback default of just /bin if DEVKIT_PATH is not defined
14887        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14888          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14889        fi
14890
14891  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14892    if test "x$TOOLCHAIN_PATH" = x; then
14893      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14894    else
14895      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14896    fi
14897  fi
14898
14899
14900        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14901        # places for backwards compatiblity.
14902        if test "x$DEVKIT_SYSROOT" != x; then
14903          SYSROOT="$DEVKIT_SYSROOT"
14904        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14905          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14906        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14907          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14908        fi
14909
14910
14911fi
14912
14913
14914  # You can force the sysroot if the sysroot encoded into the compiler tools
14915  # is not correct.
14916
14917# Check whether --with-sys-root was given.
14918if test "${with_sys_root+set}" = set; then :
14919  withval=$with_sys_root; SYSROOT=$with_sys_root
14920
14921fi
14922
14923
14924
14925# Check whether --with-sysroot was given.
14926if test "${with_sysroot+set}" = set; then :
14927  withval=$with_sysroot; SYSROOT=$with_sysroot
14928
14929fi
14930
14931
14932
14933# Check whether --with-tools-dir was given.
14934if test "${with_tools_dir+set}" = set; then :
14935  withval=$with_tools_dir;
14936  if test "x$with_tools_dir" != x; then
14937    if test "x$TOOLCHAIN_PATH" = x; then
14938      TOOLCHAIN_PATH="$with_tools_dir"
14939    else
14940      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14941    fi
14942  fi
14943
14944
14945fi
14946
14947
14948
14949# Check whether --with-toolchain-path was given.
14950if test "${with_toolchain_path+set}" = set; then :
14951  withval=$with_toolchain_path;
14952  if test "x$with_toolchain_path" != x; then
14953    if test "x$TOOLCHAIN_PATH" = x; then
14954      TOOLCHAIN_PATH="$with_toolchain_path"
14955    else
14956      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14957    fi
14958  fi
14959
14960
14961fi
14962
14963
14964
14965# Check whether --with-extra-path was given.
14966if test "${with_extra_path+set}" = set; then :
14967  withval=$with_extra_path;
14968  if test "x$with_extra_path" != x; then
14969    if test "x$EXTRA_PATH" = x; then
14970      EXTRA_PATH="$with_extra_path"
14971    else
14972      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14973    fi
14974  fi
14975
14976
14977fi
14978
14979
14980  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
14981    # detect if Xcode is installed by running xcodebuild -version
14982    # if no Xcode installed, xcodebuild exits with 1
14983    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
14984    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
14985      # We need to use xcodebuild in the toolchain dir provided by the user, this will
14986      # fall back on the stub binary in /usr/bin/xcodebuild
14987      # Extract the first word of "xcodebuild", so it can be a program name with args.
14988set dummy xcodebuild; ac_word=$2
14989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14990$as_echo_n "checking for $ac_word... " >&6; }
14991if ${ac_cv_path_XCODEBUILD+:} false; then :
14992  $as_echo_n "(cached) " >&6
14993else
14994  case $XCODEBUILD in
14995  [\\/]* | ?:[\\/]*)
14996  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
14997  ;;
14998  *)
14999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15000for as_dir in $TOOLCHAIN_PATH
15001do
15002  IFS=$as_save_IFS
15003  test -z "$as_dir" && as_dir=.
15004    for ac_exec_ext in '' $ac_executable_extensions; do
15005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15006    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15008    break 2
15009  fi
15010done
15011  done
15012IFS=$as_save_IFS
15013
15014  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15015  ;;
15016esac
15017fi
15018XCODEBUILD=$ac_cv_path_XCODEBUILD
15019if test -n "$XCODEBUILD"; then
15020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15021$as_echo "$XCODEBUILD" >&6; }
15022else
15023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15024$as_echo "no" >&6; }
15025fi
15026
15027
15028    else
15029      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15030      # when only the command line tools are installed there are no SDKs, so headers
15031      # are copied into the system frameworks
15032      XCODEBUILD=
15033
15034    fi
15035
15036    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15037$as_echo_n "checking for sdk name... " >&6; }
15038
15039# Check whether --with-sdk-name was given.
15040if test "${with_sdk_name+set}" = set; then :
15041  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15042
15043fi
15044
15045    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15046$as_echo "$SDKNAME" >&6; }
15047
15048    # if toolchain path is specified then don't rely on system headers, they may not compile
15049    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15050    test -z "$TOOLCHAIN_PATH" && \
15051      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15052
15053    if test -z "$SYSROOT"; then
15054      if test -n "$XCODEBUILD"; then
15055        # if we don't have system headers, use default SDK name (last resort)
15056        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15057          SDKNAME=${SDKNAME:-macosx}
15058        fi
15059
15060        if test -n "$SDKNAME"; then
15061          # Call xcodebuild to determine SYSROOT
15062          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15063        fi
15064      else
15065        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15066          as_fn_error $? "No xcodebuild tool and no system framework headers found, use --with-sysroot or --with-sdk-name to provide a path to a valid SDK" "$LINENO" 5
15067        fi
15068      fi
15069    else
15070      # warn user if --with-sdk-name was also set
15071      if test -n "$with_sdk_name"; then
15072        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15073$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15074      fi
15075    fi
15076
15077    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15078      # If no system framework headers, then SYSROOT must be set, or we won't build
15079      as_fn_error $? "Unable to determine SYSROOT and no headers found in /System/Library/Frameworks. Check Xcode configuration, --with-sysroot or --with-sdk-name arguments." "$LINENO" 5
15080    fi
15081
15082    # Perform a basic sanity test
15083    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15084      if test -z "$SYSROOT"; then
15085        as_fn_error $? "Unable to find required framework headers, provide a path to an SDK via --with-sysroot or --with-sdk-name and be sure Xcode is installed properly" "$LINENO" 5
15086      else
15087        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15088      fi
15089    fi
15090
15091    # set SDKROOT too, Xcode tools will pick it up
15092    SDKROOT=$SYSROOT
15093
15094  fi
15095
15096  # Prepend the extra path to the global path
15097
15098  if test "x$EXTRA_PATH" != x; then
15099    if test "x$PATH" = x; then
15100      PATH="$EXTRA_PATH"
15101    else
15102      PATH="$EXTRA_PATH:$PATH"
15103    fi
15104  fi
15105
15106
15107  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15108    # Add extra search paths on solaris for utilities like ar and as etc...
15109    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15110  fi
15111
15112  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15113$as_echo_n "checking for sysroot... " >&6; }
15114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15115$as_echo "$SYSROOT" >&6; }
15116  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15117$as_echo_n "checking for toolchain path... " >&6; }
15118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15119$as_echo "$TOOLCHAIN_PATH" >&6; }
15120  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15121$as_echo_n "checking for extra path... " >&6; }
15122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15123$as_echo "$EXTRA_PATH" >&6; }
15124
15125
15126# To properly create a configuration name, we need to have the OpenJDK target
15127# and options (variants and debug level) parsed.
15128
15129
15130
15131# Check whether --with-conf-name was given.
15132if test "${with_conf_name+set}" = set; then :
15133  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15134fi
15135
15136
15137  # Test from where we are running configure, in or outside of src root.
15138  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15139$as_echo_n "checking where to store configuration... " >&6; }
15140  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15141      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15142      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15143    # We are running configure from the src root.
15144    # Create a default ./build/target-variant-debuglevel output root.
15145    if test "x${CONF_NAME}" = x; then
15146      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15147$as_echo "in default location" >&6; }
15148      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15149    else
15150      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15151$as_echo "in build directory with custom name" >&6; }
15152    fi
15153    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15154    $MKDIR -p "$OUTPUT_ROOT"
15155    if test ! -d "$OUTPUT_ROOT"; then
15156      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15157    fi
15158  else
15159    # We are running configure from outside of the src dir.
15160    # Then use the current directory as output dir!
15161    # If configuration is situated in normal build directory, just use the build
15162    # directory name as configuration name, otherwise use the complete path.
15163    if test "x${CONF_NAME}" = x; then
15164      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15165    fi
15166    OUTPUT_ROOT="$CURDIR"
15167    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15168$as_echo "in current directory" >&6; }
15169
15170    # WARNING: This might be a bad thing to do. You need to be sure you want to
15171    # have a configuration in this directory. Do some sanity checks!
15172
15173    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15174      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15175      # other files
15176      files_present=`$LS $OUTPUT_ROOT`
15177      # Configure has already touched config.log and confdefs.h in the current dir when this check
15178      # is performed.
15179      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15180      | $TR -d '\n'`
15181      if test "x$filtered_files" != x; then
15182        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15183$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15184        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15185$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15186        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15187$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15188        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15189$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15190        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15191$as_echo "$as_me: seriously mess up just about everything." >&6;}
15192        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15193$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15194        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15195$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15196        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15197      fi
15198    fi
15199  fi
15200  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15201$as_echo_n "checking what configuration name to use... " >&6; }
15202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15203$as_echo "$CONF_NAME" >&6; }
15204
15205
15206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15207
15208  # Input might be given as Windows format, start by converting to
15209  # unix format.
15210  path="$OUTPUT_ROOT"
15211  new_path=`$CYGPATH -u "$path"`
15212
15213  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15214  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15215  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15216  # "foo.exe" is OK but "foo" is an error.
15217  #
15218  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15219  # It is also a way to make sure we got the proper file name for the real test later on.
15220  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15221  if test "x$test_shortpath" = x; then
15222    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15223$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15224    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15225  fi
15226
15227  # Call helper function which possibly converts this using DOS-style short mode.
15228  # If so, the updated path is stored in $new_path.
15229
15230  input_path="$new_path"
15231  # Check if we need to convert this using DOS-style short mode. If the path
15232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15233  # take no chances and rewrite it.
15234  # Note: m4 eats our [], so we need to use [ and ] instead.
15235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15236  if test "x$has_forbidden_chars" != x; then
15237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15238    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15239    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15240    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15241      # Going to short mode and back again did indeed matter. Since short mode is
15242      # case insensitive, let's make it lowercase to improve readability.
15243      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15244      # Now convert it back to Unix-stile (cygpath)
15245      input_path=`$CYGPATH -u "$shortmode_path"`
15246      new_path="$input_path"
15247    fi
15248  fi
15249
15250  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15251  if test "x$test_cygdrive_prefix" = x; then
15252    # As a simple fix, exclude /usr/bin since it's not a real path.
15253    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15254      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15255      # a path prefixed by /cygdrive for fixpath to work.
15256      new_path="$CYGWIN_ROOT_PATH$input_path"
15257    fi
15258  fi
15259
15260
15261  if test "x$path" != "x$new_path"; then
15262    OUTPUT_ROOT="$new_path"
15263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15264$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15265  fi
15266
15267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15268
15269  path="$OUTPUT_ROOT"
15270  has_colon=`$ECHO $path | $GREP ^.:`
15271  new_path="$path"
15272  if test "x$has_colon" = x; then
15273    # Not in mixed or Windows style, start by that.
15274    new_path=`cmd //c echo $path`
15275  fi
15276
15277
15278  input_path="$new_path"
15279  # Check if we need to convert this using DOS-style short mode. If the path
15280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15281  # take no chances and rewrite it.
15282  # Note: m4 eats our [], so we need to use [ and ] instead.
15283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15284  if test "x$has_forbidden_chars" != x; then
15285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15286    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15287  fi
15288
15289
15290  windows_path="$new_path"
15291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15292    unix_path=`$CYGPATH -u "$windows_path"`
15293    new_path="$unix_path"
15294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15296    new_path="$unix_path"
15297  fi
15298
15299  if test "x$path" != "x$new_path"; then
15300    OUTPUT_ROOT="$new_path"
15301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15302$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15303  fi
15304
15305  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15306  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15307
15308  else
15309    # We're on a unix platform. Hooray! :)
15310    path="$OUTPUT_ROOT"
15311    has_space=`$ECHO "$path" | $GREP " "`
15312    if test "x$has_space" != x; then
15313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15314$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15315      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15316    fi
15317
15318    # Use eval to expand a potential ~
15319    eval path="$path"
15320    if test ! -f "$path" && test ! -d "$path"; then
15321      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15322    fi
15323
15324    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15325  fi
15326
15327
15328  SPEC=$OUTPUT_ROOT/spec.gmk
15329
15330  CONF_NAME=$CONF_NAME
15331
15332  OUTPUT_ROOT=$OUTPUT_ROOT
15333
15334
15335  # The spec.gmk file contains all variables for the make system.
15336  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15337
15338  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15339  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15340
15341  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15342  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15343
15344  # The compare.sh is used to compare the build output to other builds.
15345  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15346
15347  # The generated Makefile knows where the spec.gmk is and where the source is.
15348  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15349  # which will look for generated configurations
15350  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15351
15352
15353
15354# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15355
15356  for ac_prog in apt-get yum port pkgutil pkgadd
15357do
15358  # Extract the first word of "$ac_prog", so it can be a program name with args.
15359set dummy $ac_prog; ac_word=$2
15360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15361$as_echo_n "checking for $ac_word... " >&6; }
15362if ${ac_cv_prog_PKGHANDLER+:} false; then :
15363  $as_echo_n "(cached) " >&6
15364else
15365  if test -n "$PKGHANDLER"; then
15366  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15367else
15368as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15369for as_dir in $PATH
15370do
15371  IFS=$as_save_IFS
15372  test -z "$as_dir" && as_dir=.
15373    for ac_exec_ext in '' $ac_executable_extensions; do
15374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15375    ac_cv_prog_PKGHANDLER="$ac_prog"
15376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15377    break 2
15378  fi
15379done
15380  done
15381IFS=$as_save_IFS
15382
15383fi
15384fi
15385PKGHANDLER=$ac_cv_prog_PKGHANDLER
15386if test -n "$PKGHANDLER"; then
15387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15388$as_echo "$PKGHANDLER" >&6; }
15389else
15390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15391$as_echo "no" >&6; }
15392fi
15393
15394
15395  test -n "$PKGHANDLER" && break
15396done
15397
15398
15399
15400# Setup tools that requires more complex handling, or that is not needed by the configure script.
15401
15402
15403  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15404  if test "x$MAKE" != x; then
15405    # User has supplied a make, test it.
15406    if test ! -f "$MAKE"; then
15407      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15408    fi
15409
15410  MAKE_CANDIDATE=""$MAKE""
15411  DESCRIPTION="user supplied MAKE=$MAKE"
15412  if test "x$MAKE_CANDIDATE" != x; then
15413    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15414$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15415    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15416    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15417    if test "x$IS_GNU_MAKE" = x; then
15418      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15419$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15420    else
15421      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15422      if test "x$IS_MODERN_MAKE" = x; then
15423        { $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
15424$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;}
15425      else
15426        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15427          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15428            MAKE_EXPECTED_ENV='cygwin'
15429          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15430            MAKE_EXPECTED_ENV='msys'
15431          else
15432            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15433          fi
15434          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15435          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15436        else
15437          # Not relevant for non-Windows
15438          IS_MAKE_CORRECT_ENV=true
15439        fi
15440        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15441          { $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
15442$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;}
15443        else
15444          FOUND_MAKE=$MAKE_CANDIDATE
15445
15446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15447
15448  # First separate the path from the arguments. This will split at the first
15449  # space.
15450  complete="$FOUND_MAKE"
15451  path="${complete%% *}"
15452  tmp="$complete EOL"
15453  arguments="${tmp#* }"
15454
15455  # Input might be given as Windows format, start by converting to
15456  # unix format.
15457  new_path=`$CYGPATH -u "$path"`
15458
15459  # Now try to locate executable using which
15460  new_path=`$WHICH "$new_path" 2> /dev/null`
15461  # bat and cmd files are not always considered executable in cygwin causing which
15462  # to not find them
15463  if test "x$new_path" = x \
15464      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15465      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15466    new_path=`$CYGPATH -u "$path"`
15467  fi
15468  if test "x$new_path" = x; then
15469    # Oops. Which didn't find the executable.
15470    # The splitting of arguments from the executable at a space might have been incorrect,
15471    # since paths with space are more likely in Windows. Give it another try with the whole
15472    # argument.
15473    path="$complete"
15474    arguments="EOL"
15475    new_path=`$CYGPATH -u "$path"`
15476    new_path=`$WHICH "$new_path" 2> /dev/null`
15477    # bat and cmd files are not always considered executable in cygwin causing which
15478    # to not find them
15479    if test "x$new_path" = x \
15480        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15481        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15482      new_path=`$CYGPATH -u "$path"`
15483    fi
15484    if test "x$new_path" = x; then
15485      # It's still not found. Now this is an unrecoverable error.
15486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15487$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15488      has_space=`$ECHO "$complete" | $GREP " "`
15489      if test "x$has_space" != x; then
15490        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15491$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15492      fi
15493      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15494    fi
15495  fi
15496
15497  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15498  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15499  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15500  # "foo.exe" is OK but "foo" is an error.
15501  #
15502  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15503  # It is also a way to make sure we got the proper file name for the real test later on.
15504  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15505  if test "x$test_shortpath" = x; then
15506    # Short path failed, file does not exist as specified.
15507    # Try adding .exe or .cmd
15508    if test -f "${new_path}.exe"; then
15509      input_to_shortpath="${new_path}.exe"
15510    elif test -f "${new_path}.cmd"; then
15511      input_to_shortpath="${new_path}.cmd"
15512    else
15513      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15514$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15515      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15516$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15517      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15518    fi
15519  else
15520    input_to_shortpath="$new_path"
15521  fi
15522
15523  # Call helper function which possibly converts this using DOS-style short mode.
15524  # If so, the updated path is stored in $new_path.
15525  new_path="$input_to_shortpath"
15526
15527  input_path="$input_to_shortpath"
15528  # Check if we need to convert this using DOS-style short mode. If the path
15529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15530  # take no chances and rewrite it.
15531  # Note: m4 eats our [], so we need to use [ and ] instead.
15532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15533  if test "x$has_forbidden_chars" != x; then
15534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15535    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15536    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15537    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15538      # Going to short mode and back again did indeed matter. Since short mode is
15539      # case insensitive, let's make it lowercase to improve readability.
15540      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15541      # Now convert it back to Unix-stile (cygpath)
15542      input_path=`$CYGPATH -u "$shortmode_path"`
15543      new_path="$input_path"
15544    fi
15545  fi
15546
15547  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15548  if test "x$test_cygdrive_prefix" = x; then
15549    # As a simple fix, exclude /usr/bin since it's not a real path.
15550    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15551      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15552      # a path prefixed by /cygdrive for fixpath to work.
15553      new_path="$CYGWIN_ROOT_PATH$input_path"
15554    fi
15555  fi
15556
15557  # remove trailing .exe if any
15558  new_path="${new_path/%.exe/}"
15559
15560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15561
15562  # First separate the path from the arguments. This will split at the first
15563  # space.
15564  complete="$FOUND_MAKE"
15565  path="${complete%% *}"
15566  tmp="$complete EOL"
15567  arguments="${tmp#* }"
15568
15569  # Input might be given as Windows format, start by converting to
15570  # unix format.
15571  new_path="$path"
15572
15573  windows_path="$new_path"
15574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15575    unix_path=`$CYGPATH -u "$windows_path"`
15576    new_path="$unix_path"
15577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15579    new_path="$unix_path"
15580  fi
15581
15582
15583  # Now try to locate executable using which
15584  new_path=`$WHICH "$new_path" 2> /dev/null`
15585
15586  if test "x$new_path" = x; then
15587    # Oops. Which didn't find the executable.
15588    # The splitting of arguments from the executable at a space might have been incorrect,
15589    # since paths with space are more likely in Windows. Give it another try with the whole
15590    # argument.
15591    path="$complete"
15592    arguments="EOL"
15593    new_path="$path"
15594
15595  windows_path="$new_path"
15596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15597    unix_path=`$CYGPATH -u "$windows_path"`
15598    new_path="$unix_path"
15599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15601    new_path="$unix_path"
15602  fi
15603
15604
15605    new_path=`$WHICH "$new_path" 2> /dev/null`
15606    # bat and cmd files are not always considered executable in MSYS causing which
15607    # to not find them
15608    if test "x$new_path" = x \
15609        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15610        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15611      new_path="$path"
15612
15613  windows_path="$new_path"
15614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15615    unix_path=`$CYGPATH -u "$windows_path"`
15616    new_path="$unix_path"
15617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15619    new_path="$unix_path"
15620  fi
15621
15622    fi
15623
15624    if test "x$new_path" = x; then
15625      # It's still not found. Now this is an unrecoverable error.
15626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15627$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15628      has_space=`$ECHO "$complete" | $GREP " "`
15629      if test "x$has_space" != x; then
15630        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15631$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15632      fi
15633      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15634    fi
15635  fi
15636
15637  # Now new_path has a complete unix path to the binary
15638  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15639    # Keep paths in /bin as-is, but remove trailing .exe if any
15640    new_path="${new_path/%.exe/}"
15641    # Do not save /bin paths to all_fixpath_prefixes!
15642  else
15643    # Not in mixed or Windows style, start by that.
15644    new_path=`cmd //c echo $new_path`
15645
15646  input_path="$new_path"
15647  # Check if we need to convert this using DOS-style short mode. If the path
15648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15649  # take no chances and rewrite it.
15650  # Note: m4 eats our [], so we need to use [ and ] instead.
15651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15652  if test "x$has_forbidden_chars" != x; then
15653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15654    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15655  fi
15656
15657    # Output is in $new_path
15658
15659  windows_path="$new_path"
15660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15661    unix_path=`$CYGPATH -u "$windows_path"`
15662    new_path="$unix_path"
15663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15665    new_path="$unix_path"
15666  fi
15667
15668    # remove trailing .exe if any
15669    new_path="${new_path/%.exe/}"
15670
15671    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15672    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15673  fi
15674
15675  else
15676    # We're on a unix platform. Hooray! :)
15677    # First separate the path from the arguments. This will split at the first
15678    # space.
15679    complete="$FOUND_MAKE"
15680    path="${complete%% *}"
15681    tmp="$complete EOL"
15682    arguments="${tmp#* }"
15683
15684    # Cannot rely on the command "which" here since it doesn't always work.
15685    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15686    if test -z "$is_absolute_path"; then
15687      # Path to executable is not absolute. Find it.
15688      IFS_save="$IFS"
15689      IFS=:
15690      for p in $PATH; do
15691        if test -f "$p/$path" && test -x "$p/$path"; then
15692          new_path="$p/$path"
15693          break
15694        fi
15695      done
15696      IFS="$IFS_save"
15697    else
15698      # This is an absolute path, we can use it without further modifications.
15699      new_path="$path"
15700    fi
15701
15702    if test "x$new_path" = x; then
15703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15704$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15705      has_space=`$ECHO "$complete" | $GREP " "`
15706      if test "x$has_space" != x; then
15707        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15708$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15709      fi
15710      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15711    fi
15712  fi
15713
15714  # Now join together the path and the arguments once again
15715  if test "x$arguments" != xEOL; then
15716    new_complete="$new_path ${arguments% *}"
15717  else
15718    new_complete="$new_path"
15719  fi
15720
15721  if test "x$complete" != "x$new_complete"; then
15722    FOUND_MAKE="$new_complete"
15723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15724$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15725  fi
15726
15727        fi
15728      fi
15729    fi
15730  fi
15731
15732    if test "x$FOUND_MAKE" = x; then
15733      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15734    fi
15735  else
15736    # Try our hardest to locate a correct version of GNU make
15737    for ac_prog in gmake
15738do
15739  # Extract the first word of "$ac_prog", so it can be a program name with args.
15740set dummy $ac_prog; ac_word=$2
15741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15742$as_echo_n "checking for $ac_word... " >&6; }
15743if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15744  $as_echo_n "(cached) " >&6
15745else
15746  case $CHECK_GMAKE in
15747  [\\/]* | ?:[\\/]*)
15748  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15749  ;;
15750  *)
15751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15752for as_dir in $PATH
15753do
15754  IFS=$as_save_IFS
15755  test -z "$as_dir" && as_dir=.
15756    for ac_exec_ext in '' $ac_executable_extensions; do
15757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15758    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15760    break 2
15761  fi
15762done
15763  done
15764IFS=$as_save_IFS
15765
15766  ;;
15767esac
15768fi
15769CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15770if test -n "$CHECK_GMAKE"; then
15771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15772$as_echo "$CHECK_GMAKE" >&6; }
15773else
15774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15775$as_echo "no" >&6; }
15776fi
15777
15778
15779  test -n "$CHECK_GMAKE" && break
15780done
15781
15782
15783  MAKE_CANDIDATE=""$CHECK_GMAKE""
15784  DESCRIPTION="gmake in PATH"
15785  if test "x$MAKE_CANDIDATE" != x; then
15786    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15787$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15788    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15789    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15790    if test "x$IS_GNU_MAKE" = x; then
15791      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15792$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15793    else
15794      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15795      if test "x$IS_MODERN_MAKE" = x; then
15796        { $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
15797$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;}
15798      else
15799        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15800          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15801            MAKE_EXPECTED_ENV='cygwin'
15802          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15803            MAKE_EXPECTED_ENV='msys'
15804          else
15805            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15806          fi
15807          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15808          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15809        else
15810          # Not relevant for non-Windows
15811          IS_MAKE_CORRECT_ENV=true
15812        fi
15813        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15814          { $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
15815$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;}
15816        else
15817          FOUND_MAKE=$MAKE_CANDIDATE
15818
15819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15820
15821  # First separate the path from the arguments. This will split at the first
15822  # space.
15823  complete="$FOUND_MAKE"
15824  path="${complete%% *}"
15825  tmp="$complete EOL"
15826  arguments="${tmp#* }"
15827
15828  # Input might be given as Windows format, start by converting to
15829  # unix format.
15830  new_path=`$CYGPATH -u "$path"`
15831
15832  # Now try to locate executable using which
15833  new_path=`$WHICH "$new_path" 2> /dev/null`
15834  # bat and cmd files are not always considered executable in cygwin causing which
15835  # to not find them
15836  if test "x$new_path" = x \
15837      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15838      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15839    new_path=`$CYGPATH -u "$path"`
15840  fi
15841  if test "x$new_path" = x; then
15842    # Oops. Which didn't find the executable.
15843    # The splitting of arguments from the executable at a space might have been incorrect,
15844    # since paths with space are more likely in Windows. Give it another try with the whole
15845    # argument.
15846    path="$complete"
15847    arguments="EOL"
15848    new_path=`$CYGPATH -u "$path"`
15849    new_path=`$WHICH "$new_path" 2> /dev/null`
15850    # bat and cmd files are not always considered executable in cygwin causing which
15851    # to not find them
15852    if test "x$new_path" = x \
15853        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15854        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15855      new_path=`$CYGPATH -u "$path"`
15856    fi
15857    if test "x$new_path" = x; then
15858      # It's still not found. Now this is an unrecoverable error.
15859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15860$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15861      has_space=`$ECHO "$complete" | $GREP " "`
15862      if test "x$has_space" != x; then
15863        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15864$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15865      fi
15866      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15867    fi
15868  fi
15869
15870  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15871  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15872  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15873  # "foo.exe" is OK but "foo" is an error.
15874  #
15875  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15876  # It is also a way to make sure we got the proper file name for the real test later on.
15877  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15878  if test "x$test_shortpath" = x; then
15879    # Short path failed, file does not exist as specified.
15880    # Try adding .exe or .cmd
15881    if test -f "${new_path}.exe"; then
15882      input_to_shortpath="${new_path}.exe"
15883    elif test -f "${new_path}.cmd"; then
15884      input_to_shortpath="${new_path}.cmd"
15885    else
15886      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15887$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15888      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15889$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15890      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15891    fi
15892  else
15893    input_to_shortpath="$new_path"
15894  fi
15895
15896  # Call helper function which possibly converts this using DOS-style short mode.
15897  # If so, the updated path is stored in $new_path.
15898  new_path="$input_to_shortpath"
15899
15900  input_path="$input_to_shortpath"
15901  # Check if we need to convert this using DOS-style short mode. If the path
15902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15903  # take no chances and rewrite it.
15904  # Note: m4 eats our [], so we need to use [ and ] instead.
15905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15906  if test "x$has_forbidden_chars" != x; then
15907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15908    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15909    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15910    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15911      # Going to short mode and back again did indeed matter. Since short mode is
15912      # case insensitive, let's make it lowercase to improve readability.
15913      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15914      # Now convert it back to Unix-stile (cygpath)
15915      input_path=`$CYGPATH -u "$shortmode_path"`
15916      new_path="$input_path"
15917    fi
15918  fi
15919
15920  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15921  if test "x$test_cygdrive_prefix" = x; then
15922    # As a simple fix, exclude /usr/bin since it's not a real path.
15923    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15924      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15925      # a path prefixed by /cygdrive for fixpath to work.
15926      new_path="$CYGWIN_ROOT_PATH$input_path"
15927    fi
15928  fi
15929
15930  # remove trailing .exe if any
15931  new_path="${new_path/%.exe/}"
15932
15933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15934
15935  # First separate the path from the arguments. This will split at the first
15936  # space.
15937  complete="$FOUND_MAKE"
15938  path="${complete%% *}"
15939  tmp="$complete EOL"
15940  arguments="${tmp#* }"
15941
15942  # Input might be given as Windows format, start by converting to
15943  # unix format.
15944  new_path="$path"
15945
15946  windows_path="$new_path"
15947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15948    unix_path=`$CYGPATH -u "$windows_path"`
15949    new_path="$unix_path"
15950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15952    new_path="$unix_path"
15953  fi
15954
15955
15956  # Now try to locate executable using which
15957  new_path=`$WHICH "$new_path" 2> /dev/null`
15958
15959  if test "x$new_path" = x; then
15960    # Oops. Which didn't find the executable.
15961    # The splitting of arguments from the executable at a space might have been incorrect,
15962    # since paths with space are more likely in Windows. Give it another try with the whole
15963    # argument.
15964    path="$complete"
15965    arguments="EOL"
15966    new_path="$path"
15967
15968  windows_path="$new_path"
15969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15970    unix_path=`$CYGPATH -u "$windows_path"`
15971    new_path="$unix_path"
15972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15974    new_path="$unix_path"
15975  fi
15976
15977
15978    new_path=`$WHICH "$new_path" 2> /dev/null`
15979    # bat and cmd files are not always considered executable in MSYS causing which
15980    # to not find them
15981    if test "x$new_path" = x \
15982        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15983        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15984      new_path="$path"
15985
15986  windows_path="$new_path"
15987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15988    unix_path=`$CYGPATH -u "$windows_path"`
15989    new_path="$unix_path"
15990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15992    new_path="$unix_path"
15993  fi
15994
15995    fi
15996
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  # Now new_path has a complete unix path to the binary
16011  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16012    # Keep paths in /bin as-is, but remove trailing .exe if any
16013    new_path="${new_path/%.exe/}"
16014    # Do not save /bin paths to all_fixpath_prefixes!
16015  else
16016    # Not in mixed or Windows style, start by that.
16017    new_path=`cmd //c echo $new_path`
16018
16019  input_path="$new_path"
16020  # Check if we need to convert this using DOS-style short mode. If the path
16021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16022  # take no chances and rewrite it.
16023  # Note: m4 eats our [], so we need to use [ and ] instead.
16024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16025  if test "x$has_forbidden_chars" != x; then
16026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16027    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16028  fi
16029
16030    # Output is in $new_path
16031
16032  windows_path="$new_path"
16033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16034    unix_path=`$CYGPATH -u "$windows_path"`
16035    new_path="$unix_path"
16036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16038    new_path="$unix_path"
16039  fi
16040
16041    # remove trailing .exe if any
16042    new_path="${new_path/%.exe/}"
16043
16044    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16045    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16046  fi
16047
16048  else
16049    # We're on a unix platform. Hooray! :)
16050    # First separate the path from the arguments. This will split at the first
16051    # space.
16052    complete="$FOUND_MAKE"
16053    path="${complete%% *}"
16054    tmp="$complete EOL"
16055    arguments="${tmp#* }"
16056
16057    # Cannot rely on the command "which" here since it doesn't always work.
16058    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16059    if test -z "$is_absolute_path"; then
16060      # Path to executable is not absolute. Find it.
16061      IFS_save="$IFS"
16062      IFS=:
16063      for p in $PATH; do
16064        if test -f "$p/$path" && test -x "$p/$path"; then
16065          new_path="$p/$path"
16066          break
16067        fi
16068      done
16069      IFS="$IFS_save"
16070    else
16071      # This is an absolute path, we can use it without further modifications.
16072      new_path="$path"
16073    fi
16074
16075    if test "x$new_path" = x; then
16076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16077$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16078      has_space=`$ECHO "$complete" | $GREP " "`
16079      if test "x$has_space" != x; then
16080        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16081$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16082      fi
16083      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16084    fi
16085  fi
16086
16087  # Now join together the path and the arguments once again
16088  if test "x$arguments" != xEOL; then
16089    new_complete="$new_path ${arguments% *}"
16090  else
16091    new_complete="$new_path"
16092  fi
16093
16094  if test "x$complete" != "x$new_complete"; then
16095    FOUND_MAKE="$new_complete"
16096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16097$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16098  fi
16099
16100        fi
16101      fi
16102    fi
16103  fi
16104
16105
16106    if test "x$FOUND_MAKE" = x; then
16107      for ac_prog in make
16108do
16109  # Extract the first word of "$ac_prog", so it can be a program name with args.
16110set dummy $ac_prog; ac_word=$2
16111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16112$as_echo_n "checking for $ac_word... " >&6; }
16113if ${ac_cv_path_CHECK_MAKE+:} false; then :
16114  $as_echo_n "(cached) " >&6
16115else
16116  case $CHECK_MAKE in
16117  [\\/]* | ?:[\\/]*)
16118  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16119  ;;
16120  *)
16121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16122for as_dir in $PATH
16123do
16124  IFS=$as_save_IFS
16125  test -z "$as_dir" && as_dir=.
16126    for ac_exec_ext in '' $ac_executable_extensions; do
16127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16128    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16130    break 2
16131  fi
16132done
16133  done
16134IFS=$as_save_IFS
16135
16136  ;;
16137esac
16138fi
16139CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16140if test -n "$CHECK_MAKE"; then
16141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16142$as_echo "$CHECK_MAKE" >&6; }
16143else
16144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16145$as_echo "no" >&6; }
16146fi
16147
16148
16149  test -n "$CHECK_MAKE" && break
16150done
16151
16152
16153  MAKE_CANDIDATE=""$CHECK_MAKE""
16154  DESCRIPTION="make in PATH"
16155  if test "x$MAKE_CANDIDATE" != x; then
16156    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16157$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16158    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16159    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16160    if test "x$IS_GNU_MAKE" = x; then
16161      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16162$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16163    else
16164      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16165      if test "x$IS_MODERN_MAKE" = x; then
16166        { $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
16167$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;}
16168      else
16169        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16170          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16171            MAKE_EXPECTED_ENV='cygwin'
16172          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16173            MAKE_EXPECTED_ENV='msys'
16174          else
16175            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16176          fi
16177          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16178          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16179        else
16180          # Not relevant for non-Windows
16181          IS_MAKE_CORRECT_ENV=true
16182        fi
16183        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16184          { $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
16185$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;}
16186        else
16187          FOUND_MAKE=$MAKE_CANDIDATE
16188
16189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16190
16191  # First separate the path from the arguments. This will split at the first
16192  # space.
16193  complete="$FOUND_MAKE"
16194  path="${complete%% *}"
16195  tmp="$complete EOL"
16196  arguments="${tmp#* }"
16197
16198  # Input might be given as Windows format, start by converting to
16199  # unix format.
16200  new_path=`$CYGPATH -u "$path"`
16201
16202  # Now try to locate executable using which
16203  new_path=`$WHICH "$new_path" 2> /dev/null`
16204  # bat and cmd files are not always considered executable in cygwin causing which
16205  # to not find them
16206  if test "x$new_path" = x \
16207      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16208      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16209    new_path=`$CYGPATH -u "$path"`
16210  fi
16211  if test "x$new_path" = x; then
16212    # Oops. Which didn't find the executable.
16213    # The splitting of arguments from the executable at a space might have been incorrect,
16214    # since paths with space are more likely in Windows. Give it another try with the whole
16215    # argument.
16216    path="$complete"
16217    arguments="EOL"
16218    new_path=`$CYGPATH -u "$path"`
16219    new_path=`$WHICH "$new_path" 2> /dev/null`
16220    # bat and cmd files are not always considered executable in cygwin causing which
16221    # to not find them
16222    if test "x$new_path" = x \
16223        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16224        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16225      new_path=`$CYGPATH -u "$path"`
16226    fi
16227    if test "x$new_path" = x; then
16228      # It's still not found. Now this is an unrecoverable error.
16229      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16230$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16231      has_space=`$ECHO "$complete" | $GREP " "`
16232      if test "x$has_space" != x; then
16233        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16234$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16235      fi
16236      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16237    fi
16238  fi
16239
16240  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16241  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16242  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16243  # "foo.exe" is OK but "foo" is an error.
16244  #
16245  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16246  # It is also a way to make sure we got the proper file name for the real test later on.
16247  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16248  if test "x$test_shortpath" = x; then
16249    # Short path failed, file does not exist as specified.
16250    # Try adding .exe or .cmd
16251    if test -f "${new_path}.exe"; then
16252      input_to_shortpath="${new_path}.exe"
16253    elif test -f "${new_path}.cmd"; then
16254      input_to_shortpath="${new_path}.cmd"
16255    else
16256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16257$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16258      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16259$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16260      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16261    fi
16262  else
16263    input_to_shortpath="$new_path"
16264  fi
16265
16266  # Call helper function which possibly converts this using DOS-style short mode.
16267  # If so, the updated path is stored in $new_path.
16268  new_path="$input_to_shortpath"
16269
16270  input_path="$input_to_shortpath"
16271  # Check if we need to convert this using DOS-style short mode. If the path
16272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16273  # take no chances and rewrite it.
16274  # Note: m4 eats our [], so we need to use [ and ] instead.
16275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16276  if test "x$has_forbidden_chars" != x; then
16277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16278    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16279    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16280    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16281      # Going to short mode and back again did indeed matter. Since short mode is
16282      # case insensitive, let's make it lowercase to improve readability.
16283      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16284      # Now convert it back to Unix-stile (cygpath)
16285      input_path=`$CYGPATH -u "$shortmode_path"`
16286      new_path="$input_path"
16287    fi
16288  fi
16289
16290  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16291  if test "x$test_cygdrive_prefix" = x; then
16292    # As a simple fix, exclude /usr/bin since it's not a real path.
16293    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16294      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16295      # a path prefixed by /cygdrive for fixpath to work.
16296      new_path="$CYGWIN_ROOT_PATH$input_path"
16297    fi
16298  fi
16299
16300  # remove trailing .exe if any
16301  new_path="${new_path/%.exe/}"
16302
16303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16304
16305  # First separate the path from the arguments. This will split at the first
16306  # space.
16307  complete="$FOUND_MAKE"
16308  path="${complete%% *}"
16309  tmp="$complete EOL"
16310  arguments="${tmp#* }"
16311
16312  # Input might be given as Windows format, start by converting to
16313  # unix format.
16314  new_path="$path"
16315
16316  windows_path="$new_path"
16317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16318    unix_path=`$CYGPATH -u "$windows_path"`
16319    new_path="$unix_path"
16320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16322    new_path="$unix_path"
16323  fi
16324
16325
16326  # Now try to locate executable using which
16327  new_path=`$WHICH "$new_path" 2> /dev/null`
16328
16329  if test "x$new_path" = x; then
16330    # Oops. Which didn't find the executable.
16331    # The splitting of arguments from the executable at a space might have been incorrect,
16332    # since paths with space are more likely in Windows. Give it another try with the whole
16333    # argument.
16334    path="$complete"
16335    arguments="EOL"
16336    new_path="$path"
16337
16338  windows_path="$new_path"
16339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16340    unix_path=`$CYGPATH -u "$windows_path"`
16341    new_path="$unix_path"
16342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16344    new_path="$unix_path"
16345  fi
16346
16347
16348    new_path=`$WHICH "$new_path" 2> /dev/null`
16349    # bat and cmd files are not always considered executable in MSYS causing which
16350    # to not find them
16351    if test "x$new_path" = x \
16352        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16353        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16354      new_path="$path"
16355
16356  windows_path="$new_path"
16357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16358    unix_path=`$CYGPATH -u "$windows_path"`
16359    new_path="$unix_path"
16360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16362    new_path="$unix_path"
16363  fi
16364
16365    fi
16366
16367    if test "x$new_path" = x; then
16368      # It's still not found. Now this is an unrecoverable error.
16369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16370$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16371      has_space=`$ECHO "$complete" | $GREP " "`
16372      if test "x$has_space" != x; then
16373        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16374$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16375      fi
16376      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16377    fi
16378  fi
16379
16380  # Now new_path has a complete unix path to the binary
16381  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16382    # Keep paths in /bin as-is, but remove trailing .exe if any
16383    new_path="${new_path/%.exe/}"
16384    # Do not save /bin paths to all_fixpath_prefixes!
16385  else
16386    # Not in mixed or Windows style, start by that.
16387    new_path=`cmd //c echo $new_path`
16388
16389  input_path="$new_path"
16390  # Check if we need to convert this using DOS-style short mode. If the path
16391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16392  # take no chances and rewrite it.
16393  # Note: m4 eats our [], so we need to use [ and ] instead.
16394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16395  if test "x$has_forbidden_chars" != x; then
16396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16398  fi
16399
16400    # Output is in $new_path
16401
16402  windows_path="$new_path"
16403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16404    unix_path=`$CYGPATH -u "$windows_path"`
16405    new_path="$unix_path"
16406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16408    new_path="$unix_path"
16409  fi
16410
16411    # remove trailing .exe if any
16412    new_path="${new_path/%.exe/}"
16413
16414    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16415    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16416  fi
16417
16418  else
16419    # We're on a unix platform. Hooray! :)
16420    # First separate the path from the arguments. This will split at the first
16421    # space.
16422    complete="$FOUND_MAKE"
16423    path="${complete%% *}"
16424    tmp="$complete EOL"
16425    arguments="${tmp#* }"
16426
16427    # Cannot rely on the command "which" here since it doesn't always work.
16428    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16429    if test -z "$is_absolute_path"; then
16430      # Path to executable is not absolute. Find it.
16431      IFS_save="$IFS"
16432      IFS=:
16433      for p in $PATH; do
16434        if test -f "$p/$path" && test -x "$p/$path"; then
16435          new_path="$p/$path"
16436          break
16437        fi
16438      done
16439      IFS="$IFS_save"
16440    else
16441      # This is an absolute path, we can use it without further modifications.
16442      new_path="$path"
16443    fi
16444
16445    if test "x$new_path" = x; then
16446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16447$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16448      has_space=`$ECHO "$complete" | $GREP " "`
16449      if test "x$has_space" != x; then
16450        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16451$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16452      fi
16453      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16454    fi
16455  fi
16456
16457  # Now join together the path and the arguments once again
16458  if test "x$arguments" != xEOL; then
16459    new_complete="$new_path ${arguments% *}"
16460  else
16461    new_complete="$new_path"
16462  fi
16463
16464  if test "x$complete" != "x$new_complete"; then
16465    FOUND_MAKE="$new_complete"
16466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16467$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16468  fi
16469
16470        fi
16471      fi
16472    fi
16473  fi
16474
16475    fi
16476
16477    if test "x$FOUND_MAKE" = x; then
16478      if test "x$TOOLCHAIN_PATH" != x; then
16479        # We have a toolchain path, check that as well before giving up.
16480        OLD_PATH=$PATH
16481        PATH=$TOOLCHAIN_PATH:$PATH
16482        for ac_prog in gmake
16483do
16484  # Extract the first word of "$ac_prog", so it can be a program name with args.
16485set dummy $ac_prog; ac_word=$2
16486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16487$as_echo_n "checking for $ac_word... " >&6; }
16488if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16489  $as_echo_n "(cached) " >&6
16490else
16491  case $CHECK_TOOLSDIR_GMAKE in
16492  [\\/]* | ?:[\\/]*)
16493  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16494  ;;
16495  *)
16496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16497for as_dir in $PATH
16498do
16499  IFS=$as_save_IFS
16500  test -z "$as_dir" && as_dir=.
16501    for ac_exec_ext in '' $ac_executable_extensions; do
16502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16503    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16505    break 2
16506  fi
16507done
16508  done
16509IFS=$as_save_IFS
16510
16511  ;;
16512esac
16513fi
16514CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16515if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16517$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16518else
16519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16520$as_echo "no" >&6; }
16521fi
16522
16523
16524  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16525done
16526
16527
16528  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16529  DESCRIPTION="gmake in tools-dir"
16530  if test "x$MAKE_CANDIDATE" != x; then
16531    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16532$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16533    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16534    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16535    if test "x$IS_GNU_MAKE" = x; then
16536      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16537$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16538    else
16539      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16540      if test "x$IS_MODERN_MAKE" = x; then
16541        { $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
16542$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;}
16543      else
16544        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16545          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16546            MAKE_EXPECTED_ENV='cygwin'
16547          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16548            MAKE_EXPECTED_ENV='msys'
16549          else
16550            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16551          fi
16552          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16553          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16554        else
16555          # Not relevant for non-Windows
16556          IS_MAKE_CORRECT_ENV=true
16557        fi
16558        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16559          { $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
16560$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;}
16561        else
16562          FOUND_MAKE=$MAKE_CANDIDATE
16563
16564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16565
16566  # First separate the path from the arguments. This will split at the first
16567  # space.
16568  complete="$FOUND_MAKE"
16569  path="${complete%% *}"
16570  tmp="$complete EOL"
16571  arguments="${tmp#* }"
16572
16573  # Input might be given as Windows format, start by converting to
16574  # unix format.
16575  new_path=`$CYGPATH -u "$path"`
16576
16577  # Now try to locate executable using which
16578  new_path=`$WHICH "$new_path" 2> /dev/null`
16579  # bat and cmd files are not always considered executable in cygwin causing which
16580  # to not find them
16581  if test "x$new_path" = x \
16582      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16583      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16584    new_path=`$CYGPATH -u "$path"`
16585  fi
16586  if test "x$new_path" = x; then
16587    # Oops. Which didn't find the executable.
16588    # The splitting of arguments from the executable at a space might have been incorrect,
16589    # since paths with space are more likely in Windows. Give it another try with the whole
16590    # argument.
16591    path="$complete"
16592    arguments="EOL"
16593    new_path=`$CYGPATH -u "$path"`
16594    new_path=`$WHICH "$new_path" 2> /dev/null`
16595    # bat and cmd files are not always considered executable in cygwin causing which
16596    # to not find them
16597    if test "x$new_path" = x \
16598        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16599        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16600      new_path=`$CYGPATH -u "$path"`
16601    fi
16602    if test "x$new_path" = x; then
16603      # It's still not found. Now this is an unrecoverable error.
16604      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16605$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16606      has_space=`$ECHO "$complete" | $GREP " "`
16607      if test "x$has_space" != x; then
16608        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16609$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16610      fi
16611      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16612    fi
16613  fi
16614
16615  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16616  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16617  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16618  # "foo.exe" is OK but "foo" is an error.
16619  #
16620  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16621  # It is also a way to make sure we got the proper file name for the real test later on.
16622  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16623  if test "x$test_shortpath" = x; then
16624    # Short path failed, file does not exist as specified.
16625    # Try adding .exe or .cmd
16626    if test -f "${new_path}.exe"; then
16627      input_to_shortpath="${new_path}.exe"
16628    elif test -f "${new_path}.cmd"; then
16629      input_to_shortpath="${new_path}.cmd"
16630    else
16631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16632$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16633      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16634$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16635      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16636    fi
16637  else
16638    input_to_shortpath="$new_path"
16639  fi
16640
16641  # Call helper function which possibly converts this using DOS-style short mode.
16642  # If so, the updated path is stored in $new_path.
16643  new_path="$input_to_shortpath"
16644
16645  input_path="$input_to_shortpath"
16646  # Check if we need to convert this using DOS-style short mode. If the path
16647  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16648  # take no chances and rewrite it.
16649  # Note: m4 eats our [], so we need to use [ and ] instead.
16650  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16651  if test "x$has_forbidden_chars" != x; then
16652    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16653    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16654    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16655    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16656      # Going to short mode and back again did indeed matter. Since short mode is
16657      # case insensitive, let's make it lowercase to improve readability.
16658      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16659      # Now convert it back to Unix-stile (cygpath)
16660      input_path=`$CYGPATH -u "$shortmode_path"`
16661      new_path="$input_path"
16662    fi
16663  fi
16664
16665  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16666  if test "x$test_cygdrive_prefix" = x; then
16667    # As a simple fix, exclude /usr/bin since it's not a real path.
16668    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16669      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16670      # a path prefixed by /cygdrive for fixpath to work.
16671      new_path="$CYGWIN_ROOT_PATH$input_path"
16672    fi
16673  fi
16674
16675  # remove trailing .exe if any
16676  new_path="${new_path/%.exe/}"
16677
16678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16679
16680  # First separate the path from the arguments. This will split at the first
16681  # space.
16682  complete="$FOUND_MAKE"
16683  path="${complete%% *}"
16684  tmp="$complete EOL"
16685  arguments="${tmp#* }"
16686
16687  # Input might be given as Windows format, start by converting to
16688  # unix format.
16689  new_path="$path"
16690
16691  windows_path="$new_path"
16692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16693    unix_path=`$CYGPATH -u "$windows_path"`
16694    new_path="$unix_path"
16695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16697    new_path="$unix_path"
16698  fi
16699
16700
16701  # Now try to locate executable using which
16702  new_path=`$WHICH "$new_path" 2> /dev/null`
16703
16704  if test "x$new_path" = x; then
16705    # Oops. Which didn't find the executable.
16706    # The splitting of arguments from the executable at a space might have been incorrect,
16707    # since paths with space are more likely in Windows. Give it another try with the whole
16708    # argument.
16709    path="$complete"
16710    arguments="EOL"
16711    new_path="$path"
16712
16713  windows_path="$new_path"
16714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16715    unix_path=`$CYGPATH -u "$windows_path"`
16716    new_path="$unix_path"
16717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16719    new_path="$unix_path"
16720  fi
16721
16722
16723    new_path=`$WHICH "$new_path" 2> /dev/null`
16724    # bat and cmd files are not always considered executable in MSYS causing which
16725    # to not find them
16726    if test "x$new_path" = x \
16727        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16728        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16729      new_path="$path"
16730
16731  windows_path="$new_path"
16732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16733    unix_path=`$CYGPATH -u "$windows_path"`
16734    new_path="$unix_path"
16735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16737    new_path="$unix_path"
16738  fi
16739
16740    fi
16741
16742    if test "x$new_path" = x; then
16743      # It's still not found. Now this is an unrecoverable error.
16744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16745$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16746      has_space=`$ECHO "$complete" | $GREP " "`
16747      if test "x$has_space" != x; then
16748        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16749$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16750      fi
16751      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16752    fi
16753  fi
16754
16755  # Now new_path has a complete unix path to the binary
16756  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16757    # Keep paths in /bin as-is, but remove trailing .exe if any
16758    new_path="${new_path/%.exe/}"
16759    # Do not save /bin paths to all_fixpath_prefixes!
16760  else
16761    # Not in mixed or Windows style, start by that.
16762    new_path=`cmd //c echo $new_path`
16763
16764  input_path="$new_path"
16765  # Check if we need to convert this using DOS-style short mode. If the path
16766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16767  # take no chances and rewrite it.
16768  # Note: m4 eats our [], so we need to use [ and ] instead.
16769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16770  if test "x$has_forbidden_chars" != x; then
16771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16772    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16773  fi
16774
16775    # Output is in $new_path
16776
16777  windows_path="$new_path"
16778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16779    unix_path=`$CYGPATH -u "$windows_path"`
16780    new_path="$unix_path"
16781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16783    new_path="$unix_path"
16784  fi
16785
16786    # remove trailing .exe if any
16787    new_path="${new_path/%.exe/}"
16788
16789    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16790    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16791  fi
16792
16793  else
16794    # We're on a unix platform. Hooray! :)
16795    # First separate the path from the arguments. This will split at the first
16796    # space.
16797    complete="$FOUND_MAKE"
16798    path="${complete%% *}"
16799    tmp="$complete EOL"
16800    arguments="${tmp#* }"
16801
16802    # Cannot rely on the command "which" here since it doesn't always work.
16803    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16804    if test -z "$is_absolute_path"; then
16805      # Path to executable is not absolute. Find it.
16806      IFS_save="$IFS"
16807      IFS=:
16808      for p in $PATH; do
16809        if test -f "$p/$path" && test -x "$p/$path"; then
16810          new_path="$p/$path"
16811          break
16812        fi
16813      done
16814      IFS="$IFS_save"
16815    else
16816      # This is an absolute path, we can use it without further modifications.
16817      new_path="$path"
16818    fi
16819
16820    if test "x$new_path" = x; then
16821      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16822$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16823      has_space=`$ECHO "$complete" | $GREP " "`
16824      if test "x$has_space" != x; then
16825        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16826$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16827      fi
16828      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16829    fi
16830  fi
16831
16832  # Now join together the path and the arguments once again
16833  if test "x$arguments" != xEOL; then
16834    new_complete="$new_path ${arguments% *}"
16835  else
16836    new_complete="$new_path"
16837  fi
16838
16839  if test "x$complete" != "x$new_complete"; then
16840    FOUND_MAKE="$new_complete"
16841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16842$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16843  fi
16844
16845        fi
16846      fi
16847    fi
16848  fi
16849
16850        if test "x$FOUND_MAKE" = x; then
16851          for ac_prog in make
16852do
16853  # Extract the first word of "$ac_prog", so it can be a program name with args.
16854set dummy $ac_prog; ac_word=$2
16855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16856$as_echo_n "checking for $ac_word... " >&6; }
16857if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16858  $as_echo_n "(cached) " >&6
16859else
16860  case $CHECK_TOOLSDIR_MAKE in
16861  [\\/]* | ?:[\\/]*)
16862  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16863  ;;
16864  *)
16865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16866for as_dir in $PATH
16867do
16868  IFS=$as_save_IFS
16869  test -z "$as_dir" && as_dir=.
16870    for ac_exec_ext in '' $ac_executable_extensions; do
16871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16872    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16874    break 2
16875  fi
16876done
16877  done
16878IFS=$as_save_IFS
16879
16880  ;;
16881esac
16882fi
16883CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16884if test -n "$CHECK_TOOLSDIR_MAKE"; then
16885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16886$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16887else
16888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16889$as_echo "no" >&6; }
16890fi
16891
16892
16893  test -n "$CHECK_TOOLSDIR_MAKE" && break
16894done
16895
16896
16897  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16898  DESCRIPTION="make in tools-dir"
16899  if test "x$MAKE_CANDIDATE" != x; then
16900    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16901$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16902    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16903    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16904    if test "x$IS_GNU_MAKE" = x; then
16905      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16906$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16907    else
16908      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16909      if test "x$IS_MODERN_MAKE" = x; then
16910        { $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
16911$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;}
16912      else
16913        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16914          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16915            MAKE_EXPECTED_ENV='cygwin'
16916          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16917            MAKE_EXPECTED_ENV='msys'
16918          else
16919            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16920          fi
16921          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16922          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16923        else
16924          # Not relevant for non-Windows
16925          IS_MAKE_CORRECT_ENV=true
16926        fi
16927        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16928          { $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
16929$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;}
16930        else
16931          FOUND_MAKE=$MAKE_CANDIDATE
16932
16933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16934
16935  # First separate the path from the arguments. This will split at the first
16936  # space.
16937  complete="$FOUND_MAKE"
16938  path="${complete%% *}"
16939  tmp="$complete EOL"
16940  arguments="${tmp#* }"
16941
16942  # Input might be given as Windows format, start by converting to
16943  # unix format.
16944  new_path=`$CYGPATH -u "$path"`
16945
16946  # Now try to locate executable using which
16947  new_path=`$WHICH "$new_path" 2> /dev/null`
16948  # bat and cmd files are not always considered executable in cygwin causing which
16949  # to not find them
16950  if test "x$new_path" = x \
16951      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16952      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16953    new_path=`$CYGPATH -u "$path"`
16954  fi
16955  if test "x$new_path" = x; then
16956    # Oops. Which didn't find the executable.
16957    # The splitting of arguments from the executable at a space might have been incorrect,
16958    # since paths with space are more likely in Windows. Give it another try with the whole
16959    # argument.
16960    path="$complete"
16961    arguments="EOL"
16962    new_path=`$CYGPATH -u "$path"`
16963    new_path=`$WHICH "$new_path" 2> /dev/null`
16964    # bat and cmd files are not always considered executable in cygwin causing which
16965    # to not find them
16966    if test "x$new_path" = x \
16967        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16968        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16969      new_path=`$CYGPATH -u "$path"`
16970    fi
16971    if test "x$new_path" = x; then
16972      # It's still not found. Now this is an unrecoverable error.
16973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16974$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16975      has_space=`$ECHO "$complete" | $GREP " "`
16976      if test "x$has_space" != x; then
16977        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16978$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16979      fi
16980      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16981    fi
16982  fi
16983
16984  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16985  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16986  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16987  # "foo.exe" is OK but "foo" is an error.
16988  #
16989  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16990  # It is also a way to make sure we got the proper file name for the real test later on.
16991  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16992  if test "x$test_shortpath" = x; then
16993    # Short path failed, file does not exist as specified.
16994    # Try adding .exe or .cmd
16995    if test -f "${new_path}.exe"; then
16996      input_to_shortpath="${new_path}.exe"
16997    elif test -f "${new_path}.cmd"; then
16998      input_to_shortpath="${new_path}.cmd"
16999    else
17000      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17001$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17002      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17003$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17004      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17005    fi
17006  else
17007    input_to_shortpath="$new_path"
17008  fi
17009
17010  # Call helper function which possibly converts this using DOS-style short mode.
17011  # If so, the updated path is stored in $new_path.
17012  new_path="$input_to_shortpath"
17013
17014  input_path="$input_to_shortpath"
17015  # Check if we need to convert this using DOS-style short mode. If the path
17016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17017  # take no chances and rewrite it.
17018  # Note: m4 eats our [], so we need to use [ and ] instead.
17019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17020  if test "x$has_forbidden_chars" != x; then
17021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17022    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17023    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17024    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17025      # Going to short mode and back again did indeed matter. Since short mode is
17026      # case insensitive, let's make it lowercase to improve readability.
17027      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17028      # Now convert it back to Unix-stile (cygpath)
17029      input_path=`$CYGPATH -u "$shortmode_path"`
17030      new_path="$input_path"
17031    fi
17032  fi
17033
17034  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17035  if test "x$test_cygdrive_prefix" = x; then
17036    # As a simple fix, exclude /usr/bin since it's not a real path.
17037    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17038      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17039      # a path prefixed by /cygdrive for fixpath to work.
17040      new_path="$CYGWIN_ROOT_PATH$input_path"
17041    fi
17042  fi
17043
17044  # remove trailing .exe if any
17045  new_path="${new_path/%.exe/}"
17046
17047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17048
17049  # First separate the path from the arguments. This will split at the first
17050  # space.
17051  complete="$FOUND_MAKE"
17052  path="${complete%% *}"
17053  tmp="$complete EOL"
17054  arguments="${tmp#* }"
17055
17056  # Input might be given as Windows format, start by converting to
17057  # unix format.
17058  new_path="$path"
17059
17060  windows_path="$new_path"
17061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17062    unix_path=`$CYGPATH -u "$windows_path"`
17063    new_path="$unix_path"
17064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17066    new_path="$unix_path"
17067  fi
17068
17069
17070  # Now try to locate executable using which
17071  new_path=`$WHICH "$new_path" 2> /dev/null`
17072
17073  if test "x$new_path" = x; then
17074    # Oops. Which didn't find the executable.
17075    # The splitting of arguments from the executable at a space might have been incorrect,
17076    # since paths with space are more likely in Windows. Give it another try with the whole
17077    # argument.
17078    path="$complete"
17079    arguments="EOL"
17080    new_path="$path"
17081
17082  windows_path="$new_path"
17083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17084    unix_path=`$CYGPATH -u "$windows_path"`
17085    new_path="$unix_path"
17086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17088    new_path="$unix_path"
17089  fi
17090
17091
17092    new_path=`$WHICH "$new_path" 2> /dev/null`
17093    # bat and cmd files are not always considered executable in MSYS causing which
17094    # to not find them
17095    if test "x$new_path" = x \
17096        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17097        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17098      new_path="$path"
17099
17100  windows_path="$new_path"
17101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17102    unix_path=`$CYGPATH -u "$windows_path"`
17103    new_path="$unix_path"
17104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17106    new_path="$unix_path"
17107  fi
17108
17109    fi
17110
17111    if test "x$new_path" = x; then
17112      # It's still not found. Now this is an unrecoverable error.
17113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17114$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17115      has_space=`$ECHO "$complete" | $GREP " "`
17116      if test "x$has_space" != x; then
17117        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17118$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17119      fi
17120      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17121    fi
17122  fi
17123
17124  # Now new_path has a complete unix path to the binary
17125  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17126    # Keep paths in /bin as-is, but remove trailing .exe if any
17127    new_path="${new_path/%.exe/}"
17128    # Do not save /bin paths to all_fixpath_prefixes!
17129  else
17130    # Not in mixed or Windows style, start by that.
17131    new_path=`cmd //c echo $new_path`
17132
17133  input_path="$new_path"
17134  # Check if we need to convert this using DOS-style short mode. If the path
17135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17136  # take no chances and rewrite it.
17137  # Note: m4 eats our [], so we need to use [ and ] instead.
17138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17139  if test "x$has_forbidden_chars" != x; then
17140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17141    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17142  fi
17143
17144    # Output is in $new_path
17145
17146  windows_path="$new_path"
17147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17148    unix_path=`$CYGPATH -u "$windows_path"`
17149    new_path="$unix_path"
17150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17152    new_path="$unix_path"
17153  fi
17154
17155    # remove trailing .exe if any
17156    new_path="${new_path/%.exe/}"
17157
17158    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17159    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17160  fi
17161
17162  else
17163    # We're on a unix platform. Hooray! :)
17164    # First separate the path from the arguments. This will split at the first
17165    # space.
17166    complete="$FOUND_MAKE"
17167    path="${complete%% *}"
17168    tmp="$complete EOL"
17169    arguments="${tmp#* }"
17170
17171    # Cannot rely on the command "which" here since it doesn't always work.
17172    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17173    if test -z "$is_absolute_path"; then
17174      # Path to executable is not absolute. Find it.
17175      IFS_save="$IFS"
17176      IFS=:
17177      for p in $PATH; do
17178        if test -f "$p/$path" && test -x "$p/$path"; then
17179          new_path="$p/$path"
17180          break
17181        fi
17182      done
17183      IFS="$IFS_save"
17184    else
17185      # This is an absolute path, we can use it without further modifications.
17186      new_path="$path"
17187    fi
17188
17189    if test "x$new_path" = x; then
17190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17191$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17192      has_space=`$ECHO "$complete" | $GREP " "`
17193      if test "x$has_space" != x; then
17194        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17195$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17196      fi
17197      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17198    fi
17199  fi
17200
17201  # Now join together the path and the arguments once again
17202  if test "x$arguments" != xEOL; then
17203    new_complete="$new_path ${arguments% *}"
17204  else
17205    new_complete="$new_path"
17206  fi
17207
17208  if test "x$complete" != "x$new_complete"; then
17209    FOUND_MAKE="$new_complete"
17210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17211$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17212  fi
17213
17214        fi
17215      fi
17216    fi
17217  fi
17218
17219        fi
17220        PATH=$OLD_PATH
17221      fi
17222    fi
17223
17224    if test "x$FOUND_MAKE" = x; then
17225      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
17226    fi
17227  fi
17228
17229  MAKE=$FOUND_MAKE
17230
17231  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17232$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17233
17234
17235  # Check if make supports the output sync option and if so, setup using it.
17236  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17237$as_echo_n "checking if make --output-sync is supported... " >&6; }
17238  if $MAKE --version -O > /dev/null 2>&1; then
17239    OUTPUT_SYNC_SUPPORTED=true
17240    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17241$as_echo "yes" >&6; }
17242    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17243$as_echo_n "checking for output-sync value... " >&6; }
17244
17245# Check whether --with-output-sync was given.
17246if test "${with_output_sync+set}" = set; then :
17247  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17248fi
17249
17250    if test "x$OUTPUT_SYNC" = "x"; then
17251      OUTPUT_SYNC=none
17252    fi
17253    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17254$as_echo "$OUTPUT_SYNC" >&6; }
17255    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17256      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17257    fi
17258  else
17259    OUTPUT_SYNC_SUPPORTED=false
17260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17261$as_echo "no" >&6; }
17262  fi
17263
17264
17265
17266
17267
17268
17269  # Test if find supports -delete
17270  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17271$as_echo_n "checking if find supports -delete... " >&6; }
17272  FIND_DELETE="-delete"
17273
17274  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17275
17276  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17277
17278  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17279  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17280    # No, it does not.
17281    rm $DELETEDIR/TestIfFindSupportsDelete
17282    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17283      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17284      FIND_DELETE="-print | xargs rm"
17285    else
17286      FIND_DELETE="-exec rm \{\} \+"
17287    fi
17288    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17289$as_echo "no" >&6; }
17290  else
17291    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17292$as_echo "yes" >&6; }
17293  fi
17294  rmdir $DELETEDIR
17295
17296
17297
17298  # These tools might not be installed by default,
17299  # need hint on how to install them.
17300
17301
17302
17303  # Publish this variable in the help.
17304
17305
17306  if test "x$UNZIP" = x; then
17307    # The variable is not set by user, try to locate tool using the code snippet
17308    for ac_prog in unzip
17309do
17310  # Extract the first word of "$ac_prog", so it can be a program name with args.
17311set dummy $ac_prog; ac_word=$2
17312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17313$as_echo_n "checking for $ac_word... " >&6; }
17314if ${ac_cv_path_UNZIP+:} false; then :
17315  $as_echo_n "(cached) " >&6
17316else
17317  case $UNZIP in
17318  [\\/]* | ?:[\\/]*)
17319  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17320  ;;
17321  *)
17322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17323for as_dir in $PATH
17324do
17325  IFS=$as_save_IFS
17326  test -z "$as_dir" && as_dir=.
17327    for ac_exec_ext in '' $ac_executable_extensions; do
17328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17329    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17331    break 2
17332  fi
17333done
17334  done
17335IFS=$as_save_IFS
17336
17337  ;;
17338esac
17339fi
17340UNZIP=$ac_cv_path_UNZIP
17341if test -n "$UNZIP"; then
17342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17343$as_echo "$UNZIP" >&6; }
17344else
17345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17346$as_echo "no" >&6; }
17347fi
17348
17349
17350  test -n "$UNZIP" && break
17351done
17352
17353  else
17354    # The variable is set, but is it from the command line or the environment?
17355
17356    # Try to remove the string !UNZIP! from our list.
17357    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17358    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17359      # If it failed, the variable was not from the command line. Ignore it,
17360      # but warn the user (except for BASH, which is always set by the calling BASH).
17361      if test "xUNZIP" != xBASH; then
17362        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17363$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17364      fi
17365      # Try to locate tool using the code snippet
17366      for ac_prog in unzip
17367do
17368  # Extract the first word of "$ac_prog", so it can be a program name with args.
17369set dummy $ac_prog; ac_word=$2
17370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17371$as_echo_n "checking for $ac_word... " >&6; }
17372if ${ac_cv_path_UNZIP+:} false; then :
17373  $as_echo_n "(cached) " >&6
17374else
17375  case $UNZIP in
17376  [\\/]* | ?:[\\/]*)
17377  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17378  ;;
17379  *)
17380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17381for as_dir in $PATH
17382do
17383  IFS=$as_save_IFS
17384  test -z "$as_dir" && as_dir=.
17385    for ac_exec_ext in '' $ac_executable_extensions; do
17386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17387    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17389    break 2
17390  fi
17391done
17392  done
17393IFS=$as_save_IFS
17394
17395  ;;
17396esac
17397fi
17398UNZIP=$ac_cv_path_UNZIP
17399if test -n "$UNZIP"; then
17400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17401$as_echo "$UNZIP" >&6; }
17402else
17403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17404$as_echo "no" >&6; }
17405fi
17406
17407
17408  test -n "$UNZIP" && break
17409done
17410
17411    else
17412      # If it succeeded, then it was overridden by the user. We will use it
17413      # for the tool.
17414
17415      # First remove it from the list of overridden variables, so we can test
17416      # for unknown variables in the end.
17417      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17418
17419      # Check if the provided tool contains a complete path.
17420      tool_specified="$UNZIP"
17421      tool_basename="${tool_specified##*/}"
17422      if test "x$tool_basename" = "x$tool_specified"; then
17423        # A command without a complete path is provided, search $PATH.
17424        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17425$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17426        # Extract the first word of "$tool_basename", so it can be a program name with args.
17427set dummy $tool_basename; ac_word=$2
17428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17429$as_echo_n "checking for $ac_word... " >&6; }
17430if ${ac_cv_path_UNZIP+:} false; then :
17431  $as_echo_n "(cached) " >&6
17432else
17433  case $UNZIP in
17434  [\\/]* | ?:[\\/]*)
17435  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17436  ;;
17437  *)
17438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17439for as_dir in $PATH
17440do
17441  IFS=$as_save_IFS
17442  test -z "$as_dir" && as_dir=.
17443    for ac_exec_ext in '' $ac_executable_extensions; do
17444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17445    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17447    break 2
17448  fi
17449done
17450  done
17451IFS=$as_save_IFS
17452
17453  ;;
17454esac
17455fi
17456UNZIP=$ac_cv_path_UNZIP
17457if test -n "$UNZIP"; then
17458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17459$as_echo "$UNZIP" >&6; }
17460else
17461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17462$as_echo "no" >&6; }
17463fi
17464
17465
17466        if test "x$UNZIP" = x; then
17467          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17468        fi
17469      else
17470        # Otherwise we believe it is a complete path. Use it as it is.
17471        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17472$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17473        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17474$as_echo_n "checking for UNZIP... " >&6; }
17475        if test ! -x "$tool_specified"; then
17476          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17477$as_echo "not found" >&6; }
17478          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17479        fi
17480        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17481$as_echo "$tool_specified" >&6; }
17482      fi
17483    fi
17484  fi
17485
17486
17487
17488  if test "x$UNZIP" = x; then
17489    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17490  fi
17491
17492
17493
17494
17495
17496  # Publish this variable in the help.
17497
17498
17499  if test "x$ZIP" = x; then
17500    # The variable is not set by user, try to locate tool using the code snippet
17501    for ac_prog in zip
17502do
17503  # Extract the first word of "$ac_prog", so it can be a program name with args.
17504set dummy $ac_prog; ac_word=$2
17505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17506$as_echo_n "checking for $ac_word... " >&6; }
17507if ${ac_cv_path_ZIP+:} false; then :
17508  $as_echo_n "(cached) " >&6
17509else
17510  case $ZIP in
17511  [\\/]* | ?:[\\/]*)
17512  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17513  ;;
17514  *)
17515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17516for as_dir in $PATH
17517do
17518  IFS=$as_save_IFS
17519  test -z "$as_dir" && as_dir=.
17520    for ac_exec_ext in '' $ac_executable_extensions; do
17521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17522    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17524    break 2
17525  fi
17526done
17527  done
17528IFS=$as_save_IFS
17529
17530  ;;
17531esac
17532fi
17533ZIP=$ac_cv_path_ZIP
17534if test -n "$ZIP"; then
17535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17536$as_echo "$ZIP" >&6; }
17537else
17538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17539$as_echo "no" >&6; }
17540fi
17541
17542
17543  test -n "$ZIP" && break
17544done
17545
17546  else
17547    # The variable is set, but is it from the command line or the environment?
17548
17549    # Try to remove the string !ZIP! from our list.
17550    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17551    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17552      # If it failed, the variable was not from the command line. Ignore it,
17553      # but warn the user (except for BASH, which is always set by the calling BASH).
17554      if test "xZIP" != xBASH; then
17555        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17556$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17557      fi
17558      # Try to locate tool using the code snippet
17559      for ac_prog in zip
17560do
17561  # Extract the first word of "$ac_prog", so it can be a program name with args.
17562set dummy $ac_prog; ac_word=$2
17563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17564$as_echo_n "checking for $ac_word... " >&6; }
17565if ${ac_cv_path_ZIP+:} false; then :
17566  $as_echo_n "(cached) " >&6
17567else
17568  case $ZIP in
17569  [\\/]* | ?:[\\/]*)
17570  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17571  ;;
17572  *)
17573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17574for as_dir in $PATH
17575do
17576  IFS=$as_save_IFS
17577  test -z "$as_dir" && as_dir=.
17578    for ac_exec_ext in '' $ac_executable_extensions; do
17579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17580    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17582    break 2
17583  fi
17584done
17585  done
17586IFS=$as_save_IFS
17587
17588  ;;
17589esac
17590fi
17591ZIP=$ac_cv_path_ZIP
17592if test -n "$ZIP"; then
17593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17594$as_echo "$ZIP" >&6; }
17595else
17596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17597$as_echo "no" >&6; }
17598fi
17599
17600
17601  test -n "$ZIP" && break
17602done
17603
17604    else
17605      # If it succeeded, then it was overridden by the user. We will use it
17606      # for the tool.
17607
17608      # First remove it from the list of overridden variables, so we can test
17609      # for unknown variables in the end.
17610      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17611
17612      # Check if the provided tool contains a complete path.
17613      tool_specified="$ZIP"
17614      tool_basename="${tool_specified##*/}"
17615      if test "x$tool_basename" = "x$tool_specified"; then
17616        # A command without a complete path is provided, search $PATH.
17617        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17618$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17619        # Extract the first word of "$tool_basename", so it can be a program name with args.
17620set dummy $tool_basename; ac_word=$2
17621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17622$as_echo_n "checking for $ac_word... " >&6; }
17623if ${ac_cv_path_ZIP+:} false; then :
17624  $as_echo_n "(cached) " >&6
17625else
17626  case $ZIP in
17627  [\\/]* | ?:[\\/]*)
17628  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17629  ;;
17630  *)
17631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17632for as_dir in $PATH
17633do
17634  IFS=$as_save_IFS
17635  test -z "$as_dir" && as_dir=.
17636    for ac_exec_ext in '' $ac_executable_extensions; do
17637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17638    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17640    break 2
17641  fi
17642done
17643  done
17644IFS=$as_save_IFS
17645
17646  ;;
17647esac
17648fi
17649ZIP=$ac_cv_path_ZIP
17650if test -n "$ZIP"; then
17651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17652$as_echo "$ZIP" >&6; }
17653else
17654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17655$as_echo "no" >&6; }
17656fi
17657
17658
17659        if test "x$ZIP" = x; then
17660          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17661        fi
17662      else
17663        # Otherwise we believe it is a complete path. Use it as it is.
17664        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17665$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17666        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17667$as_echo_n "checking for ZIP... " >&6; }
17668        if test ! -x "$tool_specified"; then
17669          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17670$as_echo "not found" >&6; }
17671          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17672        fi
17673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17674$as_echo "$tool_specified" >&6; }
17675      fi
17676    fi
17677  fi
17678
17679
17680
17681  if test "x$ZIP" = x; then
17682    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17683  fi
17684
17685
17686
17687  # Non-required basic tools
17688
17689
17690
17691  # Publish this variable in the help.
17692
17693
17694  if test "x$LDD" = x; then
17695    # The variable is not set by user, try to locate tool using the code snippet
17696    for ac_prog in ldd
17697do
17698  # Extract the first word of "$ac_prog", so it can be a program name with args.
17699set dummy $ac_prog; ac_word=$2
17700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17701$as_echo_n "checking for $ac_word... " >&6; }
17702if ${ac_cv_path_LDD+:} false; then :
17703  $as_echo_n "(cached) " >&6
17704else
17705  case $LDD in
17706  [\\/]* | ?:[\\/]*)
17707  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17708  ;;
17709  *)
17710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17711for as_dir in $PATH
17712do
17713  IFS=$as_save_IFS
17714  test -z "$as_dir" && as_dir=.
17715    for ac_exec_ext in '' $ac_executable_extensions; do
17716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17717    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17719    break 2
17720  fi
17721done
17722  done
17723IFS=$as_save_IFS
17724
17725  ;;
17726esac
17727fi
17728LDD=$ac_cv_path_LDD
17729if test -n "$LDD"; then
17730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17731$as_echo "$LDD" >&6; }
17732else
17733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17734$as_echo "no" >&6; }
17735fi
17736
17737
17738  test -n "$LDD" && break
17739done
17740
17741  else
17742    # The variable is set, but is it from the command line or the environment?
17743
17744    # Try to remove the string !LDD! from our list.
17745    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17746    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17747      # If it failed, the variable was not from the command line. Ignore it,
17748      # but warn the user (except for BASH, which is always set by the calling BASH).
17749      if test "xLDD" != xBASH; then
17750        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17751$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17752      fi
17753      # Try to locate tool using the code snippet
17754      for ac_prog in ldd
17755do
17756  # Extract the first word of "$ac_prog", so it can be a program name with args.
17757set dummy $ac_prog; ac_word=$2
17758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17759$as_echo_n "checking for $ac_word... " >&6; }
17760if ${ac_cv_path_LDD+:} false; then :
17761  $as_echo_n "(cached) " >&6
17762else
17763  case $LDD in
17764  [\\/]* | ?:[\\/]*)
17765  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17766  ;;
17767  *)
17768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17769for as_dir in $PATH
17770do
17771  IFS=$as_save_IFS
17772  test -z "$as_dir" && as_dir=.
17773    for ac_exec_ext in '' $ac_executable_extensions; do
17774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17775    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17777    break 2
17778  fi
17779done
17780  done
17781IFS=$as_save_IFS
17782
17783  ;;
17784esac
17785fi
17786LDD=$ac_cv_path_LDD
17787if test -n "$LDD"; then
17788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17789$as_echo "$LDD" >&6; }
17790else
17791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17792$as_echo "no" >&6; }
17793fi
17794
17795
17796  test -n "$LDD" && break
17797done
17798
17799    else
17800      # If it succeeded, then it was overridden by the user. We will use it
17801      # for the tool.
17802
17803      # First remove it from the list of overridden variables, so we can test
17804      # for unknown variables in the end.
17805      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17806
17807      # Check if the provided tool contains a complete path.
17808      tool_specified="$LDD"
17809      tool_basename="${tool_specified##*/}"
17810      if test "x$tool_basename" = "x$tool_specified"; then
17811        # A command without a complete path is provided, search $PATH.
17812        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17813$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17814        # Extract the first word of "$tool_basename", so it can be a program name with args.
17815set dummy $tool_basename; ac_word=$2
17816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17817$as_echo_n "checking for $ac_word... " >&6; }
17818if ${ac_cv_path_LDD+:} false; then :
17819  $as_echo_n "(cached) " >&6
17820else
17821  case $LDD in
17822  [\\/]* | ?:[\\/]*)
17823  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17824  ;;
17825  *)
17826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17827for as_dir in $PATH
17828do
17829  IFS=$as_save_IFS
17830  test -z "$as_dir" && as_dir=.
17831    for ac_exec_ext in '' $ac_executable_extensions; do
17832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17833    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17835    break 2
17836  fi
17837done
17838  done
17839IFS=$as_save_IFS
17840
17841  ;;
17842esac
17843fi
17844LDD=$ac_cv_path_LDD
17845if test -n "$LDD"; then
17846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17847$as_echo "$LDD" >&6; }
17848else
17849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17850$as_echo "no" >&6; }
17851fi
17852
17853
17854        if test "x$LDD" = x; then
17855          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17856        fi
17857      else
17858        # Otherwise we believe it is a complete path. Use it as it is.
17859        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17860$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17861        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17862$as_echo_n "checking for LDD... " >&6; }
17863        if test ! -x "$tool_specified"; then
17864          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17865$as_echo "not found" >&6; }
17866          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17867        fi
17868        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17869$as_echo "$tool_specified" >&6; }
17870      fi
17871    fi
17872  fi
17873
17874
17875  if test "x$LDD" = "x"; then
17876    # List shared lib dependencies is used for
17877    # debug output and checking for forbidden dependencies.
17878    # We can build without it.
17879    LDD="true"
17880  fi
17881
17882
17883  # Publish this variable in the help.
17884
17885
17886  if test "x$OTOOL" = x; then
17887    # The variable is not set by user, try to locate tool using the code snippet
17888    for ac_prog in otool
17889do
17890  # Extract the first word of "$ac_prog", so it can be a program name with args.
17891set dummy $ac_prog; ac_word=$2
17892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17893$as_echo_n "checking for $ac_word... " >&6; }
17894if ${ac_cv_path_OTOOL+:} false; then :
17895  $as_echo_n "(cached) " >&6
17896else
17897  case $OTOOL in
17898  [\\/]* | ?:[\\/]*)
17899  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17900  ;;
17901  *)
17902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17903for as_dir in $PATH
17904do
17905  IFS=$as_save_IFS
17906  test -z "$as_dir" && as_dir=.
17907    for ac_exec_ext in '' $ac_executable_extensions; do
17908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17909    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17911    break 2
17912  fi
17913done
17914  done
17915IFS=$as_save_IFS
17916
17917  ;;
17918esac
17919fi
17920OTOOL=$ac_cv_path_OTOOL
17921if test -n "$OTOOL"; then
17922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17923$as_echo "$OTOOL" >&6; }
17924else
17925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17926$as_echo "no" >&6; }
17927fi
17928
17929
17930  test -n "$OTOOL" && break
17931done
17932
17933  else
17934    # The variable is set, but is it from the command line or the environment?
17935
17936    # Try to remove the string !OTOOL! from our list.
17937    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17938    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17939      # If it failed, the variable was not from the command line. Ignore it,
17940      # but warn the user (except for BASH, which is always set by the calling BASH).
17941      if test "xOTOOL" != xBASH; then
17942        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17943$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17944      fi
17945      # Try to locate tool using the code snippet
17946      for ac_prog in otool
17947do
17948  # Extract the first word of "$ac_prog", so it can be a program name with args.
17949set dummy $ac_prog; ac_word=$2
17950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17951$as_echo_n "checking for $ac_word... " >&6; }
17952if ${ac_cv_path_OTOOL+:} false; then :
17953  $as_echo_n "(cached) " >&6
17954else
17955  case $OTOOL in
17956  [\\/]* | ?:[\\/]*)
17957  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17958  ;;
17959  *)
17960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17961for as_dir in $PATH
17962do
17963  IFS=$as_save_IFS
17964  test -z "$as_dir" && as_dir=.
17965    for ac_exec_ext in '' $ac_executable_extensions; do
17966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17967    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17969    break 2
17970  fi
17971done
17972  done
17973IFS=$as_save_IFS
17974
17975  ;;
17976esac
17977fi
17978OTOOL=$ac_cv_path_OTOOL
17979if test -n "$OTOOL"; then
17980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17981$as_echo "$OTOOL" >&6; }
17982else
17983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17984$as_echo "no" >&6; }
17985fi
17986
17987
17988  test -n "$OTOOL" && break
17989done
17990
17991    else
17992      # If it succeeded, then it was overridden by the user. We will use it
17993      # for the tool.
17994
17995      # First remove it from the list of overridden variables, so we can test
17996      # for unknown variables in the end.
17997      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17998
17999      # Check if the provided tool contains a complete path.
18000      tool_specified="$OTOOL"
18001      tool_basename="${tool_specified##*/}"
18002      if test "x$tool_basename" = "x$tool_specified"; then
18003        # A command without a complete path is provided, search $PATH.
18004        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18005$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18006        # Extract the first word of "$tool_basename", so it can be a program name with args.
18007set dummy $tool_basename; ac_word=$2
18008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18009$as_echo_n "checking for $ac_word... " >&6; }
18010if ${ac_cv_path_OTOOL+:} false; then :
18011  $as_echo_n "(cached) " >&6
18012else
18013  case $OTOOL in
18014  [\\/]* | ?:[\\/]*)
18015  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18016  ;;
18017  *)
18018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18019for as_dir in $PATH
18020do
18021  IFS=$as_save_IFS
18022  test -z "$as_dir" && as_dir=.
18023    for ac_exec_ext in '' $ac_executable_extensions; do
18024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18025    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18027    break 2
18028  fi
18029done
18030  done
18031IFS=$as_save_IFS
18032
18033  ;;
18034esac
18035fi
18036OTOOL=$ac_cv_path_OTOOL
18037if test -n "$OTOOL"; then
18038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18039$as_echo "$OTOOL" >&6; }
18040else
18041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18042$as_echo "no" >&6; }
18043fi
18044
18045
18046        if test "x$OTOOL" = x; then
18047          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18048        fi
18049      else
18050        # Otherwise we believe it is a complete path. Use it as it is.
18051        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18052$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18053        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18054$as_echo_n "checking for OTOOL... " >&6; }
18055        if test ! -x "$tool_specified"; then
18056          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18057$as_echo "not found" >&6; }
18058          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18059        fi
18060        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18061$as_echo "$tool_specified" >&6; }
18062      fi
18063    fi
18064  fi
18065
18066
18067  if test "x$OTOOL" = "x"; then
18068    OTOOL="true"
18069  fi
18070
18071
18072  # Publish this variable in the help.
18073
18074
18075  if test "x$READELF" = x; then
18076    # The variable is not set by user, try to locate tool using the code snippet
18077    for ac_prog in greadelf readelf
18078do
18079  # Extract the first word of "$ac_prog", so it can be a program name with args.
18080set dummy $ac_prog; ac_word=$2
18081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18082$as_echo_n "checking for $ac_word... " >&6; }
18083if ${ac_cv_path_READELF+:} false; then :
18084  $as_echo_n "(cached) " >&6
18085else
18086  case $READELF in
18087  [\\/]* | ?:[\\/]*)
18088  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18089  ;;
18090  *)
18091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18092for as_dir in $PATH
18093do
18094  IFS=$as_save_IFS
18095  test -z "$as_dir" && as_dir=.
18096    for ac_exec_ext in '' $ac_executable_extensions; do
18097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18098    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18100    break 2
18101  fi
18102done
18103  done
18104IFS=$as_save_IFS
18105
18106  ;;
18107esac
18108fi
18109READELF=$ac_cv_path_READELF
18110if test -n "$READELF"; then
18111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18112$as_echo "$READELF" >&6; }
18113else
18114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18115$as_echo "no" >&6; }
18116fi
18117
18118
18119  test -n "$READELF" && break
18120done
18121
18122  else
18123    # The variable is set, but is it from the command line or the environment?
18124
18125    # Try to remove the string !READELF! from our list.
18126    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18127    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18128      # If it failed, the variable was not from the command line. Ignore it,
18129      # but warn the user (except for BASH, which is always set by the calling BASH).
18130      if test "xREADELF" != xBASH; then
18131        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18132$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18133      fi
18134      # Try to locate tool using the code snippet
18135      for ac_prog in greadelf readelf
18136do
18137  # Extract the first word of "$ac_prog", so it can be a program name with args.
18138set dummy $ac_prog; ac_word=$2
18139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18140$as_echo_n "checking for $ac_word... " >&6; }
18141if ${ac_cv_path_READELF+:} false; then :
18142  $as_echo_n "(cached) " >&6
18143else
18144  case $READELF in
18145  [\\/]* | ?:[\\/]*)
18146  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18147  ;;
18148  *)
18149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18150for as_dir in $PATH
18151do
18152  IFS=$as_save_IFS
18153  test -z "$as_dir" && as_dir=.
18154    for ac_exec_ext in '' $ac_executable_extensions; do
18155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18156    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18158    break 2
18159  fi
18160done
18161  done
18162IFS=$as_save_IFS
18163
18164  ;;
18165esac
18166fi
18167READELF=$ac_cv_path_READELF
18168if test -n "$READELF"; then
18169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18170$as_echo "$READELF" >&6; }
18171else
18172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18173$as_echo "no" >&6; }
18174fi
18175
18176
18177  test -n "$READELF" && break
18178done
18179
18180    else
18181      # If it succeeded, then it was overridden by the user. We will use it
18182      # for the tool.
18183
18184      # First remove it from the list of overridden variables, so we can test
18185      # for unknown variables in the end.
18186      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18187
18188      # Check if the provided tool contains a complete path.
18189      tool_specified="$READELF"
18190      tool_basename="${tool_specified##*/}"
18191      if test "x$tool_basename" = "x$tool_specified"; then
18192        # A command without a complete path is provided, search $PATH.
18193        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18194$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18195        # Extract the first word of "$tool_basename", so it can be a program name with args.
18196set dummy $tool_basename; ac_word=$2
18197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18198$as_echo_n "checking for $ac_word... " >&6; }
18199if ${ac_cv_path_READELF+:} false; then :
18200  $as_echo_n "(cached) " >&6
18201else
18202  case $READELF in
18203  [\\/]* | ?:[\\/]*)
18204  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18205  ;;
18206  *)
18207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18208for as_dir in $PATH
18209do
18210  IFS=$as_save_IFS
18211  test -z "$as_dir" && as_dir=.
18212    for ac_exec_ext in '' $ac_executable_extensions; do
18213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18214    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18216    break 2
18217  fi
18218done
18219  done
18220IFS=$as_save_IFS
18221
18222  ;;
18223esac
18224fi
18225READELF=$ac_cv_path_READELF
18226if test -n "$READELF"; then
18227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18228$as_echo "$READELF" >&6; }
18229else
18230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18231$as_echo "no" >&6; }
18232fi
18233
18234
18235        if test "x$READELF" = x; then
18236          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18237        fi
18238      else
18239        # Otherwise we believe it is a complete path. Use it as it is.
18240        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18241$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18242        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18243$as_echo_n "checking for READELF... " >&6; }
18244        if test ! -x "$tool_specified"; then
18245          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18246$as_echo "not found" >&6; }
18247          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18248        fi
18249        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18250$as_echo "$tool_specified" >&6; }
18251      fi
18252    fi
18253  fi
18254
18255
18256
18257
18258  # Publish this variable in the help.
18259
18260
18261  if test "x$HG" = x; then
18262    # The variable is not set by user, try to locate tool using the code snippet
18263    for ac_prog in hg
18264do
18265  # Extract the first word of "$ac_prog", so it can be a program name with args.
18266set dummy $ac_prog; ac_word=$2
18267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18268$as_echo_n "checking for $ac_word... " >&6; }
18269if ${ac_cv_path_HG+:} false; then :
18270  $as_echo_n "(cached) " >&6
18271else
18272  case $HG in
18273  [\\/]* | ?:[\\/]*)
18274  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18275  ;;
18276  *)
18277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18278for as_dir in $PATH
18279do
18280  IFS=$as_save_IFS
18281  test -z "$as_dir" && as_dir=.
18282    for ac_exec_ext in '' $ac_executable_extensions; do
18283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18284    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18286    break 2
18287  fi
18288done
18289  done
18290IFS=$as_save_IFS
18291
18292  ;;
18293esac
18294fi
18295HG=$ac_cv_path_HG
18296if test -n "$HG"; then
18297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18298$as_echo "$HG" >&6; }
18299else
18300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18301$as_echo "no" >&6; }
18302fi
18303
18304
18305  test -n "$HG" && break
18306done
18307
18308  else
18309    # The variable is set, but is it from the command line or the environment?
18310
18311    # Try to remove the string !HG! from our list.
18312    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18313    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18314      # If it failed, the variable was not from the command line. Ignore it,
18315      # but warn the user (except for BASH, which is always set by the calling BASH).
18316      if test "xHG" != xBASH; then
18317        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18318$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18319      fi
18320      # Try to locate tool using the code snippet
18321      for ac_prog in hg
18322do
18323  # Extract the first word of "$ac_prog", so it can be a program name with args.
18324set dummy $ac_prog; ac_word=$2
18325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18326$as_echo_n "checking for $ac_word... " >&6; }
18327if ${ac_cv_path_HG+:} false; then :
18328  $as_echo_n "(cached) " >&6
18329else
18330  case $HG in
18331  [\\/]* | ?:[\\/]*)
18332  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18333  ;;
18334  *)
18335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18336for as_dir in $PATH
18337do
18338  IFS=$as_save_IFS
18339  test -z "$as_dir" && as_dir=.
18340    for ac_exec_ext in '' $ac_executable_extensions; do
18341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18342    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18344    break 2
18345  fi
18346done
18347  done
18348IFS=$as_save_IFS
18349
18350  ;;
18351esac
18352fi
18353HG=$ac_cv_path_HG
18354if test -n "$HG"; then
18355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18356$as_echo "$HG" >&6; }
18357else
18358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18359$as_echo "no" >&6; }
18360fi
18361
18362
18363  test -n "$HG" && break
18364done
18365
18366    else
18367      # If it succeeded, then it was overridden by the user. We will use it
18368      # for the tool.
18369
18370      # First remove it from the list of overridden variables, so we can test
18371      # for unknown variables in the end.
18372      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18373
18374      # Check if the provided tool contains a complete path.
18375      tool_specified="$HG"
18376      tool_basename="${tool_specified##*/}"
18377      if test "x$tool_basename" = "x$tool_specified"; then
18378        # A command without a complete path is provided, search $PATH.
18379        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18380$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18381        # Extract the first word of "$tool_basename", so it can be a program name with args.
18382set dummy $tool_basename; ac_word=$2
18383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18384$as_echo_n "checking for $ac_word... " >&6; }
18385if ${ac_cv_path_HG+:} false; then :
18386  $as_echo_n "(cached) " >&6
18387else
18388  case $HG in
18389  [\\/]* | ?:[\\/]*)
18390  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18391  ;;
18392  *)
18393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18394for as_dir in $PATH
18395do
18396  IFS=$as_save_IFS
18397  test -z "$as_dir" && as_dir=.
18398    for ac_exec_ext in '' $ac_executable_extensions; do
18399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18400    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18402    break 2
18403  fi
18404done
18405  done
18406IFS=$as_save_IFS
18407
18408  ;;
18409esac
18410fi
18411HG=$ac_cv_path_HG
18412if test -n "$HG"; then
18413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18414$as_echo "$HG" >&6; }
18415else
18416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18417$as_echo "no" >&6; }
18418fi
18419
18420
18421        if test "x$HG" = x; then
18422          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18423        fi
18424      else
18425        # Otherwise we believe it is a complete path. Use it as it is.
18426        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18427$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18428        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18429$as_echo_n "checking for HG... " >&6; }
18430        if test ! -x "$tool_specified"; then
18431          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18432$as_echo "not found" >&6; }
18433          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18434        fi
18435        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18436$as_echo "$tool_specified" >&6; }
18437      fi
18438    fi
18439  fi
18440
18441
18442
18443
18444  # Publish this variable in the help.
18445
18446
18447  if test "x$STAT" = x; then
18448    # The variable is not set by user, try to locate tool using the code snippet
18449    for ac_prog in stat
18450do
18451  # Extract the first word of "$ac_prog", so it can be a program name with args.
18452set dummy $ac_prog; ac_word=$2
18453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18454$as_echo_n "checking for $ac_word... " >&6; }
18455if ${ac_cv_path_STAT+:} false; then :
18456  $as_echo_n "(cached) " >&6
18457else
18458  case $STAT in
18459  [\\/]* | ?:[\\/]*)
18460  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18461  ;;
18462  *)
18463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18464for as_dir in $PATH
18465do
18466  IFS=$as_save_IFS
18467  test -z "$as_dir" && as_dir=.
18468    for ac_exec_ext in '' $ac_executable_extensions; do
18469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18470    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18472    break 2
18473  fi
18474done
18475  done
18476IFS=$as_save_IFS
18477
18478  ;;
18479esac
18480fi
18481STAT=$ac_cv_path_STAT
18482if test -n "$STAT"; then
18483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18484$as_echo "$STAT" >&6; }
18485else
18486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18487$as_echo "no" >&6; }
18488fi
18489
18490
18491  test -n "$STAT" && break
18492done
18493
18494  else
18495    # The variable is set, but is it from the command line or the environment?
18496
18497    # Try to remove the string !STAT! from our list.
18498    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18499    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18500      # If it failed, the variable was not from the command line. Ignore it,
18501      # but warn the user (except for BASH, which is always set by the calling BASH).
18502      if test "xSTAT" != xBASH; then
18503        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18504$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18505      fi
18506      # Try to locate tool using the code snippet
18507      for ac_prog in stat
18508do
18509  # Extract the first word of "$ac_prog", so it can be a program name with args.
18510set dummy $ac_prog; ac_word=$2
18511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18512$as_echo_n "checking for $ac_word... " >&6; }
18513if ${ac_cv_path_STAT+:} false; then :
18514  $as_echo_n "(cached) " >&6
18515else
18516  case $STAT in
18517  [\\/]* | ?:[\\/]*)
18518  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18519  ;;
18520  *)
18521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18522for as_dir in $PATH
18523do
18524  IFS=$as_save_IFS
18525  test -z "$as_dir" && as_dir=.
18526    for ac_exec_ext in '' $ac_executable_extensions; do
18527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18528    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18530    break 2
18531  fi
18532done
18533  done
18534IFS=$as_save_IFS
18535
18536  ;;
18537esac
18538fi
18539STAT=$ac_cv_path_STAT
18540if test -n "$STAT"; then
18541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18542$as_echo "$STAT" >&6; }
18543else
18544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18545$as_echo "no" >&6; }
18546fi
18547
18548
18549  test -n "$STAT" && break
18550done
18551
18552    else
18553      # If it succeeded, then it was overridden by the user. We will use it
18554      # for the tool.
18555
18556      # First remove it from the list of overridden variables, so we can test
18557      # for unknown variables in the end.
18558      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18559
18560      # Check if the provided tool contains a complete path.
18561      tool_specified="$STAT"
18562      tool_basename="${tool_specified##*/}"
18563      if test "x$tool_basename" = "x$tool_specified"; then
18564        # A command without a complete path is provided, search $PATH.
18565        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18566$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18567        # Extract the first word of "$tool_basename", so it can be a program name with args.
18568set dummy $tool_basename; ac_word=$2
18569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18570$as_echo_n "checking for $ac_word... " >&6; }
18571if ${ac_cv_path_STAT+:} false; then :
18572  $as_echo_n "(cached) " >&6
18573else
18574  case $STAT in
18575  [\\/]* | ?:[\\/]*)
18576  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18577  ;;
18578  *)
18579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18580for as_dir in $PATH
18581do
18582  IFS=$as_save_IFS
18583  test -z "$as_dir" && as_dir=.
18584    for ac_exec_ext in '' $ac_executable_extensions; do
18585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18586    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18588    break 2
18589  fi
18590done
18591  done
18592IFS=$as_save_IFS
18593
18594  ;;
18595esac
18596fi
18597STAT=$ac_cv_path_STAT
18598if test -n "$STAT"; then
18599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18600$as_echo "$STAT" >&6; }
18601else
18602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18603$as_echo "no" >&6; }
18604fi
18605
18606
18607        if test "x$STAT" = x; then
18608          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18609        fi
18610      else
18611        # Otherwise we believe it is a complete path. Use it as it is.
18612        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18613$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18614        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18615$as_echo_n "checking for STAT... " >&6; }
18616        if test ! -x "$tool_specified"; then
18617          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18618$as_echo "not found" >&6; }
18619          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18620        fi
18621        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18622$as_echo "$tool_specified" >&6; }
18623      fi
18624    fi
18625  fi
18626
18627
18628
18629
18630  # Publish this variable in the help.
18631
18632
18633  if test "x$TIME" = x; then
18634    # The variable is not set by user, try to locate tool using the code snippet
18635    for ac_prog in time
18636do
18637  # Extract the first word of "$ac_prog", so it can be a program name with args.
18638set dummy $ac_prog; ac_word=$2
18639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18640$as_echo_n "checking for $ac_word... " >&6; }
18641if ${ac_cv_path_TIME+:} false; then :
18642  $as_echo_n "(cached) " >&6
18643else
18644  case $TIME in
18645  [\\/]* | ?:[\\/]*)
18646  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18647  ;;
18648  *)
18649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18650for as_dir in $PATH
18651do
18652  IFS=$as_save_IFS
18653  test -z "$as_dir" && as_dir=.
18654    for ac_exec_ext in '' $ac_executable_extensions; do
18655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18656    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18658    break 2
18659  fi
18660done
18661  done
18662IFS=$as_save_IFS
18663
18664  ;;
18665esac
18666fi
18667TIME=$ac_cv_path_TIME
18668if test -n "$TIME"; then
18669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18670$as_echo "$TIME" >&6; }
18671else
18672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18673$as_echo "no" >&6; }
18674fi
18675
18676
18677  test -n "$TIME" && break
18678done
18679
18680  else
18681    # The variable is set, but is it from the command line or the environment?
18682
18683    # Try to remove the string !TIME! from our list.
18684    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18685    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18686      # If it failed, the variable was not from the command line. Ignore it,
18687      # but warn the user (except for BASH, which is always set by the calling BASH).
18688      if test "xTIME" != xBASH; then
18689        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18690$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18691      fi
18692      # Try to locate tool using the code snippet
18693      for ac_prog in time
18694do
18695  # Extract the first word of "$ac_prog", so it can be a program name with args.
18696set dummy $ac_prog; ac_word=$2
18697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18698$as_echo_n "checking for $ac_word... " >&6; }
18699if ${ac_cv_path_TIME+:} false; then :
18700  $as_echo_n "(cached) " >&6
18701else
18702  case $TIME in
18703  [\\/]* | ?:[\\/]*)
18704  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18705  ;;
18706  *)
18707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18708for as_dir in $PATH
18709do
18710  IFS=$as_save_IFS
18711  test -z "$as_dir" && as_dir=.
18712    for ac_exec_ext in '' $ac_executable_extensions; do
18713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18714    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18716    break 2
18717  fi
18718done
18719  done
18720IFS=$as_save_IFS
18721
18722  ;;
18723esac
18724fi
18725TIME=$ac_cv_path_TIME
18726if test -n "$TIME"; then
18727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18728$as_echo "$TIME" >&6; }
18729else
18730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18731$as_echo "no" >&6; }
18732fi
18733
18734
18735  test -n "$TIME" && break
18736done
18737
18738    else
18739      # If it succeeded, then it was overridden by the user. We will use it
18740      # for the tool.
18741
18742      # First remove it from the list of overridden variables, so we can test
18743      # for unknown variables in the end.
18744      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18745
18746      # Check if the provided tool contains a complete path.
18747      tool_specified="$TIME"
18748      tool_basename="${tool_specified##*/}"
18749      if test "x$tool_basename" = "x$tool_specified"; then
18750        # A command without a complete path is provided, search $PATH.
18751        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18752$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18753        # Extract the first word of "$tool_basename", so it can be a program name with args.
18754set dummy $tool_basename; ac_word=$2
18755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18756$as_echo_n "checking for $ac_word... " >&6; }
18757if ${ac_cv_path_TIME+:} false; then :
18758  $as_echo_n "(cached) " >&6
18759else
18760  case $TIME in
18761  [\\/]* | ?:[\\/]*)
18762  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18763  ;;
18764  *)
18765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18766for as_dir in $PATH
18767do
18768  IFS=$as_save_IFS
18769  test -z "$as_dir" && as_dir=.
18770    for ac_exec_ext in '' $ac_executable_extensions; do
18771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18772    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18774    break 2
18775  fi
18776done
18777  done
18778IFS=$as_save_IFS
18779
18780  ;;
18781esac
18782fi
18783TIME=$ac_cv_path_TIME
18784if test -n "$TIME"; then
18785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18786$as_echo "$TIME" >&6; }
18787else
18788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18789$as_echo "no" >&6; }
18790fi
18791
18792
18793        if test "x$TIME" = x; then
18794          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18795        fi
18796      else
18797        # Otherwise we believe it is a complete path. Use it as it is.
18798        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18799$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18800        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18801$as_echo_n "checking for TIME... " >&6; }
18802        if test ! -x "$tool_specified"; then
18803          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18804$as_echo "not found" >&6; }
18805          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18806        fi
18807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18808$as_echo "$tool_specified" >&6; }
18809      fi
18810    fi
18811  fi
18812
18813
18814  # Check if it's GNU time
18815  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18816  if test "x$IS_GNU_TIME" != x; then
18817    IS_GNU_TIME=yes
18818  else
18819    IS_GNU_TIME=no
18820  fi
18821
18822
18823  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18824
18825
18826
18827  # Publish this variable in the help.
18828
18829
18830  if test "x$COMM" = x; then
18831    # The variable is not set by user, try to locate tool using the code snippet
18832    for ac_prog in comm
18833do
18834  # Extract the first word of "$ac_prog", so it can be a program name with args.
18835set dummy $ac_prog; ac_word=$2
18836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18837$as_echo_n "checking for $ac_word... " >&6; }
18838if ${ac_cv_path_COMM+:} false; then :
18839  $as_echo_n "(cached) " >&6
18840else
18841  case $COMM in
18842  [\\/]* | ?:[\\/]*)
18843  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18844  ;;
18845  *)
18846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18847for as_dir in $PATH
18848do
18849  IFS=$as_save_IFS
18850  test -z "$as_dir" && as_dir=.
18851    for ac_exec_ext in '' $ac_executable_extensions; do
18852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18853    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18855    break 2
18856  fi
18857done
18858  done
18859IFS=$as_save_IFS
18860
18861  ;;
18862esac
18863fi
18864COMM=$ac_cv_path_COMM
18865if test -n "$COMM"; then
18866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18867$as_echo "$COMM" >&6; }
18868else
18869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18870$as_echo "no" >&6; }
18871fi
18872
18873
18874  test -n "$COMM" && break
18875done
18876
18877  else
18878    # The variable is set, but is it from the command line or the environment?
18879
18880    # Try to remove the string !COMM! from our list.
18881    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18882    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18883      # If it failed, the variable was not from the command line. Ignore it,
18884      # but warn the user (except for BASH, which is always set by the calling BASH).
18885      if test "xCOMM" != xBASH; then
18886        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18887$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18888      fi
18889      # Try to locate tool using the code snippet
18890      for ac_prog in comm
18891do
18892  # Extract the first word of "$ac_prog", so it can be a program name with args.
18893set dummy $ac_prog; ac_word=$2
18894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18895$as_echo_n "checking for $ac_word... " >&6; }
18896if ${ac_cv_path_COMM+:} false; then :
18897  $as_echo_n "(cached) " >&6
18898else
18899  case $COMM in
18900  [\\/]* | ?:[\\/]*)
18901  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18902  ;;
18903  *)
18904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18905for as_dir in $PATH
18906do
18907  IFS=$as_save_IFS
18908  test -z "$as_dir" && as_dir=.
18909    for ac_exec_ext in '' $ac_executable_extensions; do
18910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18911    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18913    break 2
18914  fi
18915done
18916  done
18917IFS=$as_save_IFS
18918
18919  ;;
18920esac
18921fi
18922COMM=$ac_cv_path_COMM
18923if test -n "$COMM"; then
18924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18925$as_echo "$COMM" >&6; }
18926else
18927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18928$as_echo "no" >&6; }
18929fi
18930
18931
18932  test -n "$COMM" && break
18933done
18934
18935    else
18936      # If it succeeded, then it was overridden by the user. We will use it
18937      # for the tool.
18938
18939      # First remove it from the list of overridden variables, so we can test
18940      # for unknown variables in the end.
18941      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18942
18943      # Check if the provided tool contains a complete path.
18944      tool_specified="$COMM"
18945      tool_basename="${tool_specified##*/}"
18946      if test "x$tool_basename" = "x$tool_specified"; then
18947        # A command without a complete path is provided, search $PATH.
18948        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18949$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18950        # Extract the first word of "$tool_basename", so it can be a program name with args.
18951set dummy $tool_basename; ac_word=$2
18952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18953$as_echo_n "checking for $ac_word... " >&6; }
18954if ${ac_cv_path_COMM+:} false; then :
18955  $as_echo_n "(cached) " >&6
18956else
18957  case $COMM in
18958  [\\/]* | ?:[\\/]*)
18959  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18960  ;;
18961  *)
18962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18963for as_dir in $PATH
18964do
18965  IFS=$as_save_IFS
18966  test -z "$as_dir" && as_dir=.
18967    for ac_exec_ext in '' $ac_executable_extensions; do
18968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18969    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18971    break 2
18972  fi
18973done
18974  done
18975IFS=$as_save_IFS
18976
18977  ;;
18978esac
18979fi
18980COMM=$ac_cv_path_COMM
18981if test -n "$COMM"; then
18982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18983$as_echo "$COMM" >&6; }
18984else
18985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18986$as_echo "no" >&6; }
18987fi
18988
18989
18990        if test "x$COMM" = x; then
18991          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18992        fi
18993      else
18994        # Otherwise we believe it is a complete path. Use it as it is.
18995        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18996$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18997        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18998$as_echo_n "checking for COMM... " >&6; }
18999        if test ! -x "$tool_specified"; then
19000          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19001$as_echo "not found" >&6; }
19002          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
19003        fi
19004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19005$as_echo "$tool_specified" >&6; }
19006      fi
19007    fi
19008  fi
19009
19010
19011
19012  if test "x$COMM" = x; then
19013    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
19014  fi
19015
19016
19017  fi
19018
19019  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19020
19021
19022
19023  # Publish this variable in the help.
19024
19025
19026  if test "x$DSYMUTIL" = x; then
19027    # The variable is not set by user, try to locate tool using the code snippet
19028    for ac_prog in dsymutil
19029do
19030  # Extract the first word of "$ac_prog", so it can be a program name with args.
19031set dummy $ac_prog; ac_word=$2
19032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19033$as_echo_n "checking for $ac_word... " >&6; }
19034if ${ac_cv_path_DSYMUTIL+:} false; then :
19035  $as_echo_n "(cached) " >&6
19036else
19037  case $DSYMUTIL in
19038  [\\/]* | ?:[\\/]*)
19039  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19040  ;;
19041  *)
19042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19043for as_dir in $PATH
19044do
19045  IFS=$as_save_IFS
19046  test -z "$as_dir" && as_dir=.
19047    for ac_exec_ext in '' $ac_executable_extensions; do
19048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19049    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19051    break 2
19052  fi
19053done
19054  done
19055IFS=$as_save_IFS
19056
19057  ;;
19058esac
19059fi
19060DSYMUTIL=$ac_cv_path_DSYMUTIL
19061if test -n "$DSYMUTIL"; then
19062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19063$as_echo "$DSYMUTIL" >&6; }
19064else
19065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19066$as_echo "no" >&6; }
19067fi
19068
19069
19070  test -n "$DSYMUTIL" && break
19071done
19072
19073  else
19074    # The variable is set, but is it from the command line or the environment?
19075
19076    # Try to remove the string !DSYMUTIL! from our list.
19077    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19078    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19079      # If it failed, the variable was not from the command line. Ignore it,
19080      # but warn the user (except for BASH, which is always set by the calling BASH).
19081      if test "xDSYMUTIL" != xBASH; then
19082        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19083$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19084      fi
19085      # Try to locate tool using the code snippet
19086      for ac_prog in dsymutil
19087do
19088  # Extract the first word of "$ac_prog", so it can be a program name with args.
19089set dummy $ac_prog; ac_word=$2
19090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19091$as_echo_n "checking for $ac_word... " >&6; }
19092if ${ac_cv_path_DSYMUTIL+:} false; then :
19093  $as_echo_n "(cached) " >&6
19094else
19095  case $DSYMUTIL in
19096  [\\/]* | ?:[\\/]*)
19097  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19098  ;;
19099  *)
19100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19101for as_dir in $PATH
19102do
19103  IFS=$as_save_IFS
19104  test -z "$as_dir" && as_dir=.
19105    for ac_exec_ext in '' $ac_executable_extensions; do
19106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19107    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19109    break 2
19110  fi
19111done
19112  done
19113IFS=$as_save_IFS
19114
19115  ;;
19116esac
19117fi
19118DSYMUTIL=$ac_cv_path_DSYMUTIL
19119if test -n "$DSYMUTIL"; then
19120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19121$as_echo "$DSYMUTIL" >&6; }
19122else
19123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19124$as_echo "no" >&6; }
19125fi
19126
19127
19128  test -n "$DSYMUTIL" && break
19129done
19130
19131    else
19132      # If it succeeded, then it was overridden by the user. We will use it
19133      # for the tool.
19134
19135      # First remove it from the list of overridden variables, so we can test
19136      # for unknown variables in the end.
19137      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19138
19139      # Check if the provided tool contains a complete path.
19140      tool_specified="$DSYMUTIL"
19141      tool_basename="${tool_specified##*/}"
19142      if test "x$tool_basename" = "x$tool_specified"; then
19143        # A command without a complete path is provided, search $PATH.
19144        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19145$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19146        # Extract the first word of "$tool_basename", so it can be a program name with args.
19147set dummy $tool_basename; ac_word=$2
19148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19149$as_echo_n "checking for $ac_word... " >&6; }
19150if ${ac_cv_path_DSYMUTIL+:} false; then :
19151  $as_echo_n "(cached) " >&6
19152else
19153  case $DSYMUTIL in
19154  [\\/]* | ?:[\\/]*)
19155  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19156  ;;
19157  *)
19158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19159for as_dir in $PATH
19160do
19161  IFS=$as_save_IFS
19162  test -z "$as_dir" && as_dir=.
19163    for ac_exec_ext in '' $ac_executable_extensions; do
19164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19165    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19167    break 2
19168  fi
19169done
19170  done
19171IFS=$as_save_IFS
19172
19173  ;;
19174esac
19175fi
19176DSYMUTIL=$ac_cv_path_DSYMUTIL
19177if test -n "$DSYMUTIL"; then
19178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19179$as_echo "$DSYMUTIL" >&6; }
19180else
19181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19182$as_echo "no" >&6; }
19183fi
19184
19185
19186        if test "x$DSYMUTIL" = x; then
19187          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19188        fi
19189      else
19190        # Otherwise we believe it is a complete path. Use it as it is.
19191        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19192$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19193        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19194$as_echo_n "checking for DSYMUTIL... " >&6; }
19195        if test ! -x "$tool_specified"; then
19196          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19197$as_echo "not found" >&6; }
19198          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19199        fi
19200        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19201$as_echo "$tool_specified" >&6; }
19202      fi
19203    fi
19204  fi
19205
19206
19207
19208  if test "x$DSYMUTIL" = x; then
19209    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19210  fi
19211
19212
19213
19214
19215
19216  # Publish this variable in the help.
19217
19218
19219  if test "x$XATTR" = x; then
19220    # The variable is not set by user, try to locate tool using the code snippet
19221    for ac_prog in xattr
19222do
19223  # Extract the first word of "$ac_prog", so it can be a program name with args.
19224set dummy $ac_prog; ac_word=$2
19225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19226$as_echo_n "checking for $ac_word... " >&6; }
19227if ${ac_cv_path_XATTR+:} false; then :
19228  $as_echo_n "(cached) " >&6
19229else
19230  case $XATTR in
19231  [\\/]* | ?:[\\/]*)
19232  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19233  ;;
19234  *)
19235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19236for as_dir in $PATH
19237do
19238  IFS=$as_save_IFS
19239  test -z "$as_dir" && as_dir=.
19240    for ac_exec_ext in '' $ac_executable_extensions; do
19241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19242    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19244    break 2
19245  fi
19246done
19247  done
19248IFS=$as_save_IFS
19249
19250  ;;
19251esac
19252fi
19253XATTR=$ac_cv_path_XATTR
19254if test -n "$XATTR"; then
19255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19256$as_echo "$XATTR" >&6; }
19257else
19258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19259$as_echo "no" >&6; }
19260fi
19261
19262
19263  test -n "$XATTR" && break
19264done
19265
19266  else
19267    # The variable is set, but is it from the command line or the environment?
19268
19269    # Try to remove the string !XATTR! from our list.
19270    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19271    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19272      # If it failed, the variable was not from the command line. Ignore it,
19273      # but warn the user (except for BASH, which is always set by the calling BASH).
19274      if test "xXATTR" != xBASH; then
19275        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19276$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19277      fi
19278      # Try to locate tool using the code snippet
19279      for ac_prog in xattr
19280do
19281  # Extract the first word of "$ac_prog", so it can be a program name with args.
19282set dummy $ac_prog; ac_word=$2
19283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19284$as_echo_n "checking for $ac_word... " >&6; }
19285if ${ac_cv_path_XATTR+:} false; then :
19286  $as_echo_n "(cached) " >&6
19287else
19288  case $XATTR in
19289  [\\/]* | ?:[\\/]*)
19290  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19291  ;;
19292  *)
19293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19294for as_dir in $PATH
19295do
19296  IFS=$as_save_IFS
19297  test -z "$as_dir" && as_dir=.
19298    for ac_exec_ext in '' $ac_executable_extensions; do
19299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19300    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19302    break 2
19303  fi
19304done
19305  done
19306IFS=$as_save_IFS
19307
19308  ;;
19309esac
19310fi
19311XATTR=$ac_cv_path_XATTR
19312if test -n "$XATTR"; then
19313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19314$as_echo "$XATTR" >&6; }
19315else
19316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19317$as_echo "no" >&6; }
19318fi
19319
19320
19321  test -n "$XATTR" && break
19322done
19323
19324    else
19325      # If it succeeded, then it was overridden by the user. We will use it
19326      # for the tool.
19327
19328      # First remove it from the list of overridden variables, so we can test
19329      # for unknown variables in the end.
19330      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19331
19332      # Check if the provided tool contains a complete path.
19333      tool_specified="$XATTR"
19334      tool_basename="${tool_specified##*/}"
19335      if test "x$tool_basename" = "x$tool_specified"; then
19336        # A command without a complete path is provided, search $PATH.
19337        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19338$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19339        # Extract the first word of "$tool_basename", so it can be a program name with args.
19340set dummy $tool_basename; ac_word=$2
19341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19342$as_echo_n "checking for $ac_word... " >&6; }
19343if ${ac_cv_path_XATTR+:} false; then :
19344  $as_echo_n "(cached) " >&6
19345else
19346  case $XATTR in
19347  [\\/]* | ?:[\\/]*)
19348  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19349  ;;
19350  *)
19351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19352for as_dir in $PATH
19353do
19354  IFS=$as_save_IFS
19355  test -z "$as_dir" && as_dir=.
19356    for ac_exec_ext in '' $ac_executable_extensions; do
19357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19358    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19360    break 2
19361  fi
19362done
19363  done
19364IFS=$as_save_IFS
19365
19366  ;;
19367esac
19368fi
19369XATTR=$ac_cv_path_XATTR
19370if test -n "$XATTR"; then
19371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19372$as_echo "$XATTR" >&6; }
19373else
19374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19375$as_echo "no" >&6; }
19376fi
19377
19378
19379        if test "x$XATTR" = x; then
19380          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19381        fi
19382      else
19383        # Otherwise we believe it is a complete path. Use it as it is.
19384        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19385$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19386        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19387$as_echo_n "checking for XATTR... " >&6; }
19388        if test ! -x "$tool_specified"; then
19389          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19390$as_echo "not found" >&6; }
19391          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19392        fi
19393        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19394$as_echo "$tool_specified" >&6; }
19395      fi
19396    fi
19397  fi
19398
19399
19400
19401  if test "x$XATTR" = x; then
19402    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19403  fi
19404
19405
19406
19407
19408  # Publish this variable in the help.
19409
19410
19411  if test "x$CODESIGN" = x; then
19412    # The variable is not set by user, try to locate tool using the code snippet
19413    for ac_prog in codesign
19414do
19415  # Extract the first word of "$ac_prog", so it can be a program name with args.
19416set dummy $ac_prog; ac_word=$2
19417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19418$as_echo_n "checking for $ac_word... " >&6; }
19419if ${ac_cv_path_CODESIGN+:} false; then :
19420  $as_echo_n "(cached) " >&6
19421else
19422  case $CODESIGN in
19423  [\\/]* | ?:[\\/]*)
19424  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19425  ;;
19426  *)
19427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19428for as_dir in $PATH
19429do
19430  IFS=$as_save_IFS
19431  test -z "$as_dir" && as_dir=.
19432    for ac_exec_ext in '' $ac_executable_extensions; do
19433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19434    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19436    break 2
19437  fi
19438done
19439  done
19440IFS=$as_save_IFS
19441
19442  ;;
19443esac
19444fi
19445CODESIGN=$ac_cv_path_CODESIGN
19446if test -n "$CODESIGN"; then
19447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19448$as_echo "$CODESIGN" >&6; }
19449else
19450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19451$as_echo "no" >&6; }
19452fi
19453
19454
19455  test -n "$CODESIGN" && break
19456done
19457
19458  else
19459    # The variable is set, but is it from the command line or the environment?
19460
19461    # Try to remove the string !CODESIGN! from our list.
19462    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19463    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19464      # If it failed, the variable was not from the command line. Ignore it,
19465      # but warn the user (except for BASH, which is always set by the calling BASH).
19466      if test "xCODESIGN" != xBASH; then
19467        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19468$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19469      fi
19470      # Try to locate tool using the code snippet
19471      for ac_prog in codesign
19472do
19473  # Extract the first word of "$ac_prog", so it can be a program name with args.
19474set dummy $ac_prog; ac_word=$2
19475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19476$as_echo_n "checking for $ac_word... " >&6; }
19477if ${ac_cv_path_CODESIGN+:} false; then :
19478  $as_echo_n "(cached) " >&6
19479else
19480  case $CODESIGN in
19481  [\\/]* | ?:[\\/]*)
19482  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19483  ;;
19484  *)
19485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19486for as_dir in $PATH
19487do
19488  IFS=$as_save_IFS
19489  test -z "$as_dir" && as_dir=.
19490    for ac_exec_ext in '' $ac_executable_extensions; do
19491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19492    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19494    break 2
19495  fi
19496done
19497  done
19498IFS=$as_save_IFS
19499
19500  ;;
19501esac
19502fi
19503CODESIGN=$ac_cv_path_CODESIGN
19504if test -n "$CODESIGN"; then
19505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19506$as_echo "$CODESIGN" >&6; }
19507else
19508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19509$as_echo "no" >&6; }
19510fi
19511
19512
19513  test -n "$CODESIGN" && break
19514done
19515
19516    else
19517      # If it succeeded, then it was overridden by the user. We will use it
19518      # for the tool.
19519
19520      # First remove it from the list of overridden variables, so we can test
19521      # for unknown variables in the end.
19522      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19523
19524      # Check if the provided tool contains a complete path.
19525      tool_specified="$CODESIGN"
19526      tool_basename="${tool_specified##*/}"
19527      if test "x$tool_basename" = "x$tool_specified"; then
19528        # A command without a complete path is provided, search $PATH.
19529        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19530$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19531        # Extract the first word of "$tool_basename", so it can be a program name with args.
19532set dummy $tool_basename; ac_word=$2
19533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19534$as_echo_n "checking for $ac_word... " >&6; }
19535if ${ac_cv_path_CODESIGN+:} false; then :
19536  $as_echo_n "(cached) " >&6
19537else
19538  case $CODESIGN in
19539  [\\/]* | ?:[\\/]*)
19540  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19541  ;;
19542  *)
19543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19544for as_dir in $PATH
19545do
19546  IFS=$as_save_IFS
19547  test -z "$as_dir" && as_dir=.
19548    for ac_exec_ext in '' $ac_executable_extensions; do
19549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19550    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19552    break 2
19553  fi
19554done
19555  done
19556IFS=$as_save_IFS
19557
19558  ;;
19559esac
19560fi
19561CODESIGN=$ac_cv_path_CODESIGN
19562if test -n "$CODESIGN"; then
19563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19564$as_echo "$CODESIGN" >&6; }
19565else
19566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19567$as_echo "no" >&6; }
19568fi
19569
19570
19571        if test "x$CODESIGN" = x; then
19572          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19573        fi
19574      else
19575        # Otherwise we believe it is a complete path. Use it as it is.
19576        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19577$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19578        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19579$as_echo_n "checking for CODESIGN... " >&6; }
19580        if test ! -x "$tool_specified"; then
19581          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19582$as_echo "not found" >&6; }
19583          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19584        fi
19585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19586$as_echo "$tool_specified" >&6; }
19587      fi
19588    fi
19589  fi
19590
19591
19592    if test "x$CODESIGN" != "x"; then
19593      # Verify that the openjdk_codesign certificate is present
19594      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19595$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19596      rm -f codesign-testfile
19597      touch codesign-testfile
19598      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19599      rm -f codesign-testfile
19600      if test "x$CODESIGN" = x; then
19601        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19602$as_echo "no" >&6; }
19603      else
19604        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19605$as_echo "yes" >&6; }
19606      fi
19607    fi
19608  fi
19609
19610
19611# Check if pkg-config is available.
19612
19613
19614if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19615	if test -n "$ac_tool_prefix"; then
19616  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19617set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19619$as_echo_n "checking for $ac_word... " >&6; }
19620if ${ac_cv_path_PKG_CONFIG+:} false; then :
19621  $as_echo_n "(cached) " >&6
19622else
19623  case $PKG_CONFIG in
19624  [\\/]* | ?:[\\/]*)
19625  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19626  ;;
19627  *)
19628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19629for as_dir in $PATH
19630do
19631  IFS=$as_save_IFS
19632  test -z "$as_dir" && as_dir=.
19633    for ac_exec_ext in '' $ac_executable_extensions; do
19634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19635    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19637    break 2
19638  fi
19639done
19640  done
19641IFS=$as_save_IFS
19642
19643  ;;
19644esac
19645fi
19646PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19647if test -n "$PKG_CONFIG"; then
19648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19649$as_echo "$PKG_CONFIG" >&6; }
19650else
19651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19652$as_echo "no" >&6; }
19653fi
19654
19655
19656fi
19657if test -z "$ac_cv_path_PKG_CONFIG"; then
19658  ac_pt_PKG_CONFIG=$PKG_CONFIG
19659  # Extract the first word of "pkg-config", so it can be a program name with args.
19660set dummy pkg-config; ac_word=$2
19661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19662$as_echo_n "checking for $ac_word... " >&6; }
19663if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19664  $as_echo_n "(cached) " >&6
19665else
19666  case $ac_pt_PKG_CONFIG in
19667  [\\/]* | ?:[\\/]*)
19668  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19669  ;;
19670  *)
19671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19672for as_dir in $PATH
19673do
19674  IFS=$as_save_IFS
19675  test -z "$as_dir" && as_dir=.
19676    for ac_exec_ext in '' $ac_executable_extensions; do
19677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19678    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19680    break 2
19681  fi
19682done
19683  done
19684IFS=$as_save_IFS
19685
19686  ;;
19687esac
19688fi
19689ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19690if test -n "$ac_pt_PKG_CONFIG"; then
19691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19692$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19693else
19694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19695$as_echo "no" >&6; }
19696fi
19697
19698  if test "x$ac_pt_PKG_CONFIG" = x; then
19699    PKG_CONFIG=""
19700  else
19701    case $cross_compiling:$ac_tool_warned in
19702yes:)
19703{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19704$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19705ac_tool_warned=yes ;;
19706esac
19707    PKG_CONFIG=$ac_pt_PKG_CONFIG
19708  fi
19709else
19710  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19711fi
19712
19713fi
19714if test -n "$PKG_CONFIG"; then
19715	_pkg_min_version=0.9.0
19716	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19717$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19718	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19719		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19720$as_echo "yes" >&6; }
19721	else
19722		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19723$as_echo "no" >&6; }
19724		PKG_CONFIG=""
19725	fi
19726
19727fi
19728
19729# After basic tools have been setup, we can check build os specific details.
19730
19731  ###############################################################################
19732
19733  # Note that this is the build platform OS version!
19734
19735  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19736  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19737  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19738  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19739
19740
19741
19742
19743
19744# Setup builddeps, for automatic downloading of tools we need.
19745# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19746# boot-jdk setup, but we need to have basic tools setup first.
19747
19748
19749# Check whether --with-builddeps-conf was given.
19750if test "${with_builddeps_conf+set}" = set; then :
19751  withval=$with_builddeps_conf;
19752fi
19753
19754
19755
19756# Check whether --with-builddeps-server was given.
19757if test "${with_builddeps_server+set}" = set; then :
19758  withval=$with_builddeps_server;
19759fi
19760
19761
19762
19763# Check whether --with-builddeps-dir was given.
19764if test "${with_builddeps_dir+set}" = set; then :
19765  withval=$with_builddeps_dir;
19766else
19767  with_builddeps_dir=/localhome/builddeps
19768fi
19769
19770
19771
19772# Check whether --with-builddeps-group was given.
19773if test "${with_builddeps_group+set}" = set; then :
19774  withval=$with_builddeps_group;
19775fi
19776
19777
19778
19779
19780  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19781    if test "x$with_builddeps_conf" != x; then
19782      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19783$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19784      builddepsfile=$with_builddeps_conf
19785      if test -s $builddepsfile; then
19786        . $builddepsfile
19787        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19788$as_echo "loaded!" >&6; }
19789      else
19790        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19791      fi
19792    else
19793      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19794$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19795      builddepsfile=`mktemp`
19796      touch $builddepsfile
19797      # Put all found confs into a single file.
19798      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19799      # Source the file to acquire the variables
19800      if test -s $builddepsfile; then
19801        . $builddepsfile
19802        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19803$as_echo "found at least one!" >&6; }
19804      else
19805        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19806      fi
19807    fi
19808    # Create build and target names that use _ instead of "-" and ".".
19809    # This is necessary to use them in variable names.
19810    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19811    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19812    # Extract rewrite information for build and target
19813    eval rewritten_build=\${REWRITE_${build_var}}
19814    if test "x$rewritten_build" = x; then
19815      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19816      echo Build stays the same $rewritten_build
19817    else
19818      echo Rewriting build for builddeps into $rewritten_build
19819    fi
19820    eval rewritten_target=\${REWRITE_${target_var}}
19821    if test "x$rewritten_target" = x; then
19822      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19823      echo Target stays the same $rewritten_target
19824    else
19825      echo Rewriting target for builddeps into $rewritten_target
19826    fi
19827    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19828    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19829  fi
19830  for ac_prog in 7z unzip
19831do
19832  # Extract the first word of "$ac_prog", so it can be a program name with args.
19833set dummy $ac_prog; ac_word=$2
19834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19835$as_echo_n "checking for $ac_word... " >&6; }
19836if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19837  $as_echo_n "(cached) " >&6
19838else
19839  if test -n "$BDEPS_UNZIP"; then
19840  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19841else
19842as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19843for as_dir in $PATH
19844do
19845  IFS=$as_save_IFS
19846  test -z "$as_dir" && as_dir=.
19847    for ac_exec_ext in '' $ac_executable_extensions; do
19848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19849    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19851    break 2
19852  fi
19853done
19854  done
19855IFS=$as_save_IFS
19856
19857fi
19858fi
19859BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19860if test -n "$BDEPS_UNZIP"; then
19861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19862$as_echo "$BDEPS_UNZIP" >&6; }
19863else
19864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19865$as_echo "no" >&6; }
19866fi
19867
19868
19869  test -n "$BDEPS_UNZIP" && break
19870done
19871
19872  if test "x$BDEPS_UNZIP" = x7z; then
19873    BDEPS_UNZIP="7z x"
19874  fi
19875
19876  for ac_prog in wget lftp ftp
19877do
19878  # Extract the first word of "$ac_prog", so it can be a program name with args.
19879set dummy $ac_prog; ac_word=$2
19880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19881$as_echo_n "checking for $ac_word... " >&6; }
19882if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19883  $as_echo_n "(cached) " >&6
19884else
19885  if test -n "$BDEPS_FTP"; then
19886  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19887else
19888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19889for as_dir in $PATH
19890do
19891  IFS=$as_save_IFS
19892  test -z "$as_dir" && as_dir=.
19893    for ac_exec_ext in '' $ac_executable_extensions; do
19894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19895    ac_cv_prog_BDEPS_FTP="$ac_prog"
19896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19897    break 2
19898  fi
19899done
19900  done
19901IFS=$as_save_IFS
19902
19903fi
19904fi
19905BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19906if test -n "$BDEPS_FTP"; then
19907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19908$as_echo "$BDEPS_FTP" >&6; }
19909else
19910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19911$as_echo "no" >&6; }
19912fi
19913
19914
19915  test -n "$BDEPS_FTP" && break
19916done
19917
19918
19919
19920###############################################################################
19921#
19922# Determine OpenJDK variants, options and version numbers.
19923#
19924###############################################################################
19925
19926# We need build & target for this.
19927
19928
19929  ###############################################################################
19930  #
19931  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19932  # We always build headless support.
19933  #
19934  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19935$as_echo_n "checking headful support... " >&6; }
19936  # Check whether --enable-headful was given.
19937if test "${enable_headful+set}" = set; then :
19938  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19939else
19940  SUPPORT_HEADFUL=yes
19941fi
19942
19943
19944  SUPPORT_HEADLESS=yes
19945  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19946
19947  if test "x$SUPPORT_HEADFUL" = xyes; then
19948    # We are building both headful and headless.
19949    headful_msg="include support for both headful and headless"
19950  fi
19951
19952  if test "x$SUPPORT_HEADFUL" = xno; then
19953    # Thus we are building headless only.
19954    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19955    headful_msg="headless only"
19956  fi
19957
19958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19959$as_echo "$headful_msg" >&6; }
19960
19961
19962
19963
19964
19965  # Control wether Hotspot runs Queens test after build.
19966  # Check whether --enable-hotspot-test-in-build was given.
19967if test "${enable_hotspot_test_in_build+set}" = set; then :
19968  enableval=$enable_hotspot_test_in_build;
19969else
19970  enable_hotspot_test_in_build=no
19971fi
19972
19973  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19974    TEST_IN_BUILD=true
19975  else
19976    TEST_IN_BUILD=false
19977  fi
19978
19979
19980  ###############################################################################
19981  #
19982  # Choose cacerts source file
19983  #
19984
19985# Check whether --with-cacerts-file was given.
19986if test "${with_cacerts_file+set}" = set; then :
19987  withval=$with_cacerts_file;
19988fi
19989
19990  if test "x$with_cacerts_file" != x; then
19991    CACERTS_FILE=$with_cacerts_file
19992  fi
19993
19994
19995  ###############################################################################
19996  #
19997  # Enable or disable unlimited crypto
19998  #
19999  # Check whether --enable-unlimited-crypto was given.
20000if test "${enable_unlimited_crypto+set}" = set; then :
20001  enableval=$enable_unlimited_crypto;
20002else
20003  enable_unlimited_crypto=no
20004fi
20005
20006  if test "x$enable_unlimited_crypto" = "xyes"; then
20007    UNLIMITED_CRYPTO=true
20008  else
20009    UNLIMITED_CRYPTO=false
20010  fi
20011
20012
20013  ###############################################################################
20014  #
20015  # Enable or disable the elliptic curve crypto implementation
20016  #
20017
20018
20019  ###############################################################################
20020  #
20021  # --enable-rmiconnector-iiop
20022  #
20023  # Check whether --enable-rmiconnector-iiop was given.
20024if test "${enable_rmiconnector_iiop+set}" = set; then :
20025  enableval=$enable_rmiconnector_iiop;
20026fi
20027
20028  if test "x$enable_rmiconnector_iiop" = "xyes"; then
20029    RMICONNECTOR_IIOP=true
20030  else
20031    RMICONNECTOR_IIOP=false
20032  fi
20033
20034
20035  ###############################################################################
20036  #
20037  # Compress jars
20038  #
20039  COMPRESS_JARS=false
20040
20041
20042
20043
20044  # Source the version numbers
20045  . $AUTOCONF_DIR/version-numbers
20046
20047  # Get the settings from parameters
20048
20049# Check whether --with-milestone was given.
20050if test "${with_milestone+set}" = set; then :
20051  withval=$with_milestone;
20052fi
20053
20054  if test "x$with_milestone" = xyes; then
20055    as_fn_error $? "Milestone must have a value" "$LINENO" 5
20056  elif test "x$with_milestone" != x; then
20057    MILESTONE="$with_milestone"
20058  fi
20059  if test "x$MILESTONE" = x; then
20060    MILESTONE=internal
20061  fi
20062
20063
20064# Check whether --with-update-version was given.
20065if test "${with_update_version+set}" = set; then :
20066  withval=$with_update_version;
20067fi
20068
20069  if test "x$with_update_version" = xyes; then
20070    as_fn_error $? "Update version must have a value" "$LINENO" 5
20071  elif test "x$with_update_version" != x; then
20072    JDK_UPDATE_VERSION="$with_update_version"
20073    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20074    # to a bug in expr (which reduces it to just X). To work around this, we
20075    # always add a 0 to one digit update versions.
20076    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20077      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20078    fi
20079  fi
20080
20081
20082# Check whether --with-user-release-suffix was given.
20083if test "${with_user_release_suffix+set}" = set; then :
20084  withval=$with_user_release_suffix;
20085fi
20086
20087  if test "x$with_user_release_suffix" = xyes; then
20088    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20089  elif test "x$with_user_release_suffix" != x; then
20090    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20091  fi
20092
20093
20094# Check whether --with-build-number was given.
20095if test "${with_build_number+set}" = set; then :
20096  withval=$with_build_number;
20097fi
20098
20099  if test "x$with_build_number" = xyes; then
20100    as_fn_error $? "Build number must have a value" "$LINENO" 5
20101  elif test "x$with_build_number" != x; then
20102    JDK_BUILD_NUMBER="$with_build_number"
20103  fi
20104  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20105  if test "x$JDK_BUILD_NUMBER" = x; then
20106    JDK_BUILD_NUMBER=b00
20107    if test "x$USER_RELEASE_SUFFIX" = x; then
20108      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20109      # Avoid [:alnum:] since it depends on the locale.
20110      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20111      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20112    fi
20113  fi
20114
20115  # Now set the JDK version, milestone, build number etc.
20116
20117
20118
20119
20120
20121
20122
20123
20124
20125
20126
20127
20128
20129
20130
20131
20132# Check whether --with-copyright-year was given.
20133if test "${with_copyright_year+set}" = set; then :
20134  withval=$with_copyright_year;
20135fi
20136
20137  if test "x$with_copyright_year" = xyes; then
20138    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20139  elif test "x$with_copyright_year" != x; then
20140    COPYRIGHT_YEAR="$with_copyright_year"
20141  else
20142    COPYRIGHT_YEAR=`date +'%Y'`
20143  fi
20144
20145
20146  if test "x$JDK_UPDATE_VERSION" != x; then
20147    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20148  else
20149    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20150  fi
20151
20152
20153  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20154
20155
20156
20157###############################################################################
20158#
20159# Setup BootJDK, used to bootstrap the build.
20160#
20161###############################################################################
20162
20163
20164  BOOT_JDK_FOUND=no
20165
20166# Check whether --with-boot-jdk was given.
20167if test "${with_boot_jdk+set}" = set; then :
20168  withval=$with_boot_jdk;
20169fi
20170
20171
20172  # We look for the Boot JDK through various means, going from more certain to
20173  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20174  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20175  # must check if this is indeed valid; otherwise we'll continue looking.
20176
20177  # Test: Is bootjdk explicitely set by command line arguments?
20178
20179  if test "x$BOOT_JDK_FOUND" = xno; then
20180    # Now execute the test
20181
20182  if test "x$with_boot_jdk" != x; then
20183    BOOT_JDK=$with_boot_jdk
20184    BOOT_JDK_FOUND=maybe
20185    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20186$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20187  fi
20188
20189
20190    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20191    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20192      # Do we have a bin/java?
20193      if test ! -x "$BOOT_JDK/bin/java"; then
20194        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20195$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20196        BOOT_JDK_FOUND=no
20197      else
20198        # Do we have a bin/javac?
20199        if test ! -x "$BOOT_JDK/bin/javac"; then
20200          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20201$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20202          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20203$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20204          BOOT_JDK_FOUND=no
20205        else
20206          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20207          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20208            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20209$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20210            BOOT_JDK_FOUND=no
20211          else
20212            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20213            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20214
20215            # Extra M4 quote needed to protect [] in grep expression.
20216            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20217            if test "x$FOUND_CORRECT_VERSION" = x; then
20218              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20219$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20220              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20221$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20222              BOOT_JDK_FOUND=no
20223            else
20224              # We're done! :-)
20225              BOOT_JDK_FOUND=yes
20226
20227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20228
20229  # Input might be given as Windows format, start by converting to
20230  # unix format.
20231  path="$BOOT_JDK"
20232  new_path=`$CYGPATH -u "$path"`
20233
20234  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20235  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20236  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20237  # "foo.exe" is OK but "foo" is an error.
20238  #
20239  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20240  # It is also a way to make sure we got the proper file name for the real test later on.
20241  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20242  if test "x$test_shortpath" = x; then
20243    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20244$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20245    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20246  fi
20247
20248  # Call helper function which possibly converts this using DOS-style short mode.
20249  # If so, the updated path is stored in $new_path.
20250
20251  input_path="$new_path"
20252  # Check if we need to convert this using DOS-style short mode. If the path
20253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20254  # take no chances and rewrite it.
20255  # Note: m4 eats our [], so we need to use [ and ] instead.
20256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20257  if test "x$has_forbidden_chars" != x; then
20258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20259    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20260    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20261    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20262      # Going to short mode and back again did indeed matter. Since short mode is
20263      # case insensitive, let's make it lowercase to improve readability.
20264      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20265      # Now convert it back to Unix-stile (cygpath)
20266      input_path=`$CYGPATH -u "$shortmode_path"`
20267      new_path="$input_path"
20268    fi
20269  fi
20270
20271  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20272  if test "x$test_cygdrive_prefix" = x; then
20273    # As a simple fix, exclude /usr/bin since it's not a real path.
20274    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20275      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20276      # a path prefixed by /cygdrive for fixpath to work.
20277      new_path="$CYGWIN_ROOT_PATH$input_path"
20278    fi
20279  fi
20280
20281
20282  if test "x$path" != "x$new_path"; then
20283    BOOT_JDK="$new_path"
20284    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20285$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20286  fi
20287
20288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20289
20290  path="$BOOT_JDK"
20291  has_colon=`$ECHO $path | $GREP ^.:`
20292  new_path="$path"
20293  if test "x$has_colon" = x; then
20294    # Not in mixed or Windows style, start by that.
20295    new_path=`cmd //c echo $path`
20296  fi
20297
20298
20299  input_path="$new_path"
20300  # Check if we need to convert this using DOS-style short mode. If the path
20301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20302  # take no chances and rewrite it.
20303  # Note: m4 eats our [], so we need to use [ and ] instead.
20304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20305  if test "x$has_forbidden_chars" != x; then
20306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20307    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20308  fi
20309
20310
20311  windows_path="$new_path"
20312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20313    unix_path=`$CYGPATH -u "$windows_path"`
20314    new_path="$unix_path"
20315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20317    new_path="$unix_path"
20318  fi
20319
20320  if test "x$path" != "x$new_path"; then
20321    BOOT_JDK="$new_path"
20322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20323$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20324  fi
20325
20326  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20327  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20328
20329  else
20330    # We're on a unix platform. Hooray! :)
20331    path="$BOOT_JDK"
20332    has_space=`$ECHO "$path" | $GREP " "`
20333    if test "x$has_space" != x; then
20334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20335$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20336      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20337    fi
20338
20339    # Use eval to expand a potential ~
20340    eval path="$path"
20341    if test ! -f "$path" && test ! -d "$path"; then
20342      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20343    fi
20344
20345    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20346  fi
20347
20348              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20349$as_echo_n "checking for Boot JDK... " >&6; }
20350              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20351$as_echo "$BOOT_JDK" >&6; }
20352              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20353$as_echo_n "checking Boot JDK version... " >&6; }
20354              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20355              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20356$as_echo "$BOOT_JDK_VERSION" >&6; }
20357            fi # end check jdk version
20358          fi # end check rt.jar
20359        fi # end check javac
20360      fi # end check java
20361    fi # end check boot jdk found
20362  fi
20363
20364  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20365    # Having specified an argument which is incorrect will produce an instant failure;
20366    # we should not go on looking
20367    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20368  fi
20369
20370  # Test: Is bootjdk available from builddeps?
20371
20372  if test "x$BOOT_JDK_FOUND" = xno; then
20373    # Now execute the test
20374
20375
20376
20377  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20378    # Source the builddeps file again, to make sure it uses the latest variables!
20379    . $builddepsfile
20380    # Look for a target and build machine specific resource!
20381    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20382    if test "x$resource" = x; then
20383      # Ok, lets instead look for a target specific resource
20384      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20385    fi
20386    if test "x$resource" = x; then
20387      # Ok, lets instead look for a build specific resource
20388      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20389    fi
20390    if test "x$resource" = x; then
20391      # Ok, lets instead look for a generic resource
20392      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20393      resource=${builddep_bootjdk}
20394    fi
20395    if test "x$resource" != x; then
20396      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20397$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20398      # If the resource in the builddeps.conf file is an existing directory,
20399      # for example /java/linux/cups
20400      if test -d ${resource}; then
20401        depdir=${resource}
20402      else
20403
20404  # bootjdk is for example mymodule
20405  # $resource is for example libs/general/libmymod_1_2_3.zip
20406  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20407  # $with_builddeps_dir is for example /localhome/builddeps
20408  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20409  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20410  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20411  filename=`basename $resource`
20412  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20413  filebase=${filename%%.*}
20414  extension=${filename#*.}
20415  installdir=$with_builddeps_dir/$filebase
20416  if test ! -f $installdir/$filename.unpacked; then
20417    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20418$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20419    if test ! -d $installdir; then
20420      mkdir -p $installdir
20421    fi
20422    if test ! -d $installdir; then
20423      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20424    fi
20425    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20426    touch $tmpfile
20427    if test ! -f $tmpfile; then
20428      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20429    fi
20430
20431  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20432  # $tmpfile is the local file name for the downloaded file.
20433  VALID_TOOL=no
20434  if test "x$BDEPS_FTP" = xwget; then
20435    VALID_TOOL=yes
20436    wget -O $tmpfile $with_builddeps_server/$resource
20437  fi
20438  if test "x$BDEPS_FTP" = xlftp; then
20439    VALID_TOOL=yes
20440    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20441  fi
20442  if test "x$BDEPS_FTP" = xftp; then
20443    VALID_TOOL=yes
20444    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20445    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20446    FTPUSERPWD=${FTPSERVER%%@*}
20447    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20448      FTPUSER=${userpwd%%:*}
20449      FTPPWD=${userpwd#*@}
20450      FTPSERVER=${FTPSERVER#*@}
20451    else
20452      FTPUSER=ftp
20453      FTPPWD=ftp
20454    fi
20455    # the "pass" command does not work on some
20456    # ftp clients (read ftp.exe) but if it works,
20457    # passive mode is better!
20458    ( \
20459        echo "user $FTPUSER $FTPPWD"        ; \
20460        echo "pass"                         ; \
20461        echo "bin"                          ; \
20462        echo "get $FTPPATH $tmpfile"              ; \
20463    ) | ftp -in $FTPSERVER
20464  fi
20465  if test "x$VALID_TOOL" != xyes; then
20466    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20467  fi
20468
20469    mv $tmpfile $installdir/$filename
20470    if test ! -s $installdir/$filename; then
20471      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20472    fi
20473    case "$extension" in
20474      zip)  echo "Unzipping $installdir/$filename..."
20475        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20476        ;;
20477      tar.gz) echo "Untaring $installdir/$filename..."
20478        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20479        ;;
20480      tgz) echo "Untaring $installdir/$filename..."
20481        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20482        ;;
20483      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20484        ;;
20485    esac
20486  fi
20487  if test -f $installdir/$filename.unpacked; then
20488    depdir=$installdir
20489  fi
20490
20491      fi
20492      # Source the builddeps file again, because in the previous command, the depdir
20493      # was updated to point at the current build dependency install directory.
20494      . $builddepsfile
20495      # Now extract variables from the builddeps.conf files.
20496      theroot=${builddep_bootjdk_ROOT}
20497      thecflags=${builddep_bootjdk_CFLAGS}
20498      thelibs=${builddep_bootjdk_LIBS}
20499      if test "x$depdir" = x; then
20500        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20501      fi
20502      BOOT_JDK=$depdir
20503      if test "x$theroot" != x; then
20504        BOOT_JDK="$theroot"
20505      fi
20506      if test "x$thecflags" != x; then
20507        BOOT_JDK_CFLAGS="$thecflags"
20508      fi
20509      if test "x$thelibs" != x; then
20510        BOOT_JDK_LIBS="$thelibs"
20511      fi
20512      BOOT_JDK_FOUND=maybe
20513      else BOOT_JDK_FOUND=no
20514
20515    fi
20516    else BOOT_JDK_FOUND=no
20517
20518  fi
20519
20520
20521
20522    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20523    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20524      # Do we have a bin/java?
20525      if test ! -x "$BOOT_JDK/bin/java"; then
20526        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20527$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20528        BOOT_JDK_FOUND=no
20529      else
20530        # Do we have a bin/javac?
20531        if test ! -x "$BOOT_JDK/bin/javac"; then
20532          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20534          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20535$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20536          BOOT_JDK_FOUND=no
20537        else
20538          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20539          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20540            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20541$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20542            BOOT_JDK_FOUND=no
20543          else
20544            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20545            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20546
20547            # Extra M4 quote needed to protect [] in grep expression.
20548            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20549            if test "x$FOUND_CORRECT_VERSION" = x; then
20550              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20551$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20552              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20553$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20554              BOOT_JDK_FOUND=no
20555            else
20556              # We're done! :-)
20557              BOOT_JDK_FOUND=yes
20558
20559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20560
20561  # Input might be given as Windows format, start by converting to
20562  # unix format.
20563  path="$BOOT_JDK"
20564  new_path=`$CYGPATH -u "$path"`
20565
20566  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20567  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20568  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20569  # "foo.exe" is OK but "foo" is an error.
20570  #
20571  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20572  # It is also a way to make sure we got the proper file name for the real test later on.
20573  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20574  if test "x$test_shortpath" = x; then
20575    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20576$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20577    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20578  fi
20579
20580  # Call helper function which possibly converts this using DOS-style short mode.
20581  # If so, the updated path is stored in $new_path.
20582
20583  input_path="$new_path"
20584  # Check if we need to convert this using DOS-style short mode. If the path
20585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20586  # take no chances and rewrite it.
20587  # Note: m4 eats our [], so we need to use [ and ] instead.
20588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20589  if test "x$has_forbidden_chars" != x; then
20590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20591    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20592    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20593    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20594      # Going to short mode and back again did indeed matter. Since short mode is
20595      # case insensitive, let's make it lowercase to improve readability.
20596      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20597      # Now convert it back to Unix-stile (cygpath)
20598      input_path=`$CYGPATH -u "$shortmode_path"`
20599      new_path="$input_path"
20600    fi
20601  fi
20602
20603  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20604  if test "x$test_cygdrive_prefix" = x; then
20605    # As a simple fix, exclude /usr/bin since it's not a real path.
20606    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20607      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20608      # a path prefixed by /cygdrive for fixpath to work.
20609      new_path="$CYGWIN_ROOT_PATH$input_path"
20610    fi
20611  fi
20612
20613
20614  if test "x$path" != "x$new_path"; then
20615    BOOT_JDK="$new_path"
20616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20617$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20618  fi
20619
20620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20621
20622  path="$BOOT_JDK"
20623  has_colon=`$ECHO $path | $GREP ^.:`
20624  new_path="$path"
20625  if test "x$has_colon" = x; then
20626    # Not in mixed or Windows style, start by that.
20627    new_path=`cmd //c echo $path`
20628  fi
20629
20630
20631  input_path="$new_path"
20632  # Check if we need to convert this using DOS-style short mode. If the path
20633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20634  # take no chances and rewrite it.
20635  # Note: m4 eats our [], so we need to use [ and ] instead.
20636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20637  if test "x$has_forbidden_chars" != x; then
20638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20639    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20640  fi
20641
20642
20643  windows_path="$new_path"
20644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20645    unix_path=`$CYGPATH -u "$windows_path"`
20646    new_path="$unix_path"
20647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20649    new_path="$unix_path"
20650  fi
20651
20652  if test "x$path" != "x$new_path"; then
20653    BOOT_JDK="$new_path"
20654    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20655$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20656  fi
20657
20658  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20659  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20660
20661  else
20662    # We're on a unix platform. Hooray! :)
20663    path="$BOOT_JDK"
20664    has_space=`$ECHO "$path" | $GREP " "`
20665    if test "x$has_space" != x; then
20666      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20667$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20668      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20669    fi
20670
20671    # Use eval to expand a potential ~
20672    eval path="$path"
20673    if test ! -f "$path" && test ! -d "$path"; then
20674      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20675    fi
20676
20677    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20678  fi
20679
20680              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20681$as_echo_n "checking for Boot JDK... " >&6; }
20682              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20683$as_echo "$BOOT_JDK" >&6; }
20684              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20685$as_echo_n "checking Boot JDK version... " >&6; }
20686              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20687              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20688$as_echo "$BOOT_JDK_VERSION" >&6; }
20689            fi # end check jdk version
20690          fi # end check rt.jar
20691        fi # end check javac
20692      fi # end check java
20693    fi # end check boot jdk found
20694  fi
20695
20696
20697  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20698
20699  if test "x$BOOT_JDK_FOUND" = xno; then
20700    # Now execute the test
20701
20702  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20703    # First check at user selected default
20704
20705  if test "x$BOOT_JDK_FOUND" = xno; then
20706    # Now execute the test
20707
20708  if test -x /usr/libexec/java_home; then
20709    BOOT_JDK=`/usr/libexec/java_home `
20710    BOOT_JDK_FOUND=maybe
20711    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20712$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20713  fi
20714
20715
20716    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20717    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20718      # Do we have a bin/java?
20719      if test ! -x "$BOOT_JDK/bin/java"; then
20720        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20721$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20722        BOOT_JDK_FOUND=no
20723      else
20724        # Do we have a bin/javac?
20725        if test ! -x "$BOOT_JDK/bin/javac"; then
20726          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20728          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20729$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20730          BOOT_JDK_FOUND=no
20731        else
20732          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20733          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20734            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20735$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20736            BOOT_JDK_FOUND=no
20737          else
20738            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20739            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20740
20741            # Extra M4 quote needed to protect [] in grep expression.
20742            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20743            if test "x$FOUND_CORRECT_VERSION" = x; then
20744              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20745$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20746              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20747$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20748              BOOT_JDK_FOUND=no
20749            else
20750              # We're done! :-)
20751              BOOT_JDK_FOUND=yes
20752
20753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20754
20755  # Input might be given as Windows format, start by converting to
20756  # unix format.
20757  path="$BOOT_JDK"
20758  new_path=`$CYGPATH -u "$path"`
20759
20760  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20761  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20762  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20763  # "foo.exe" is OK but "foo" is an error.
20764  #
20765  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20766  # It is also a way to make sure we got the proper file name for the real test later on.
20767  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20768  if test "x$test_shortpath" = x; then
20769    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20770$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20771    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20772  fi
20773
20774  # Call helper function which possibly converts this using DOS-style short mode.
20775  # If so, the updated path is stored in $new_path.
20776
20777  input_path="$new_path"
20778  # Check if we need to convert this using DOS-style short mode. If the path
20779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20780  # take no chances and rewrite it.
20781  # Note: m4 eats our [], so we need to use [ and ] instead.
20782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20783  if test "x$has_forbidden_chars" != x; then
20784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20788      # Going to short mode and back again did indeed matter. Since short mode is
20789      # case insensitive, let's make it lowercase to improve readability.
20790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20791      # Now convert it back to Unix-stile (cygpath)
20792      input_path=`$CYGPATH -u "$shortmode_path"`
20793      new_path="$input_path"
20794    fi
20795  fi
20796
20797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20798  if test "x$test_cygdrive_prefix" = x; then
20799    # As a simple fix, exclude /usr/bin since it's not a real path.
20800    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20802      # a path prefixed by /cygdrive for fixpath to work.
20803      new_path="$CYGWIN_ROOT_PATH$input_path"
20804    fi
20805  fi
20806
20807
20808  if test "x$path" != "x$new_path"; then
20809    BOOT_JDK="$new_path"
20810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20811$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20812  fi
20813
20814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20815
20816  path="$BOOT_JDK"
20817  has_colon=`$ECHO $path | $GREP ^.:`
20818  new_path="$path"
20819  if test "x$has_colon" = x; then
20820    # Not in mixed or Windows style, start by that.
20821    new_path=`cmd //c echo $path`
20822  fi
20823
20824
20825  input_path="$new_path"
20826  # Check if we need to convert this using DOS-style short mode. If the path
20827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20828  # take no chances and rewrite it.
20829  # Note: m4 eats our [], so we need to use [ and ] instead.
20830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20831  if test "x$has_forbidden_chars" != x; then
20832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20834  fi
20835
20836
20837  windows_path="$new_path"
20838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20839    unix_path=`$CYGPATH -u "$windows_path"`
20840    new_path="$unix_path"
20841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20843    new_path="$unix_path"
20844  fi
20845
20846  if test "x$path" != "x$new_path"; then
20847    BOOT_JDK="$new_path"
20848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20849$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20850  fi
20851
20852  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20853  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20854
20855  else
20856    # We're on a unix platform. Hooray! :)
20857    path="$BOOT_JDK"
20858    has_space=`$ECHO "$path" | $GREP " "`
20859    if test "x$has_space" != x; then
20860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20861$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20862      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20863    fi
20864
20865    # Use eval to expand a potential ~
20866    eval path="$path"
20867    if test ! -f "$path" && test ! -d "$path"; then
20868      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20869    fi
20870
20871    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20872  fi
20873
20874              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20875$as_echo_n "checking for Boot JDK... " >&6; }
20876              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20877$as_echo "$BOOT_JDK" >&6; }
20878              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20879$as_echo_n "checking Boot JDK version... " >&6; }
20880              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20881              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20882$as_echo "$BOOT_JDK_VERSION" >&6; }
20883            fi # end check jdk version
20884          fi # end check rt.jar
20885        fi # end check javac
20886      fi # end check java
20887    fi # end check boot jdk found
20888  fi
20889
20890    # If that did not work out (e.g. too old), try explicit versions instead
20891
20892  if test "x$BOOT_JDK_FOUND" = xno; then
20893    # Now execute the test
20894
20895  if test -x /usr/libexec/java_home; then
20896    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20897    BOOT_JDK_FOUND=maybe
20898    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20899$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20900  fi
20901
20902
20903    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20904    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20905      # Do we have a bin/java?
20906      if test ! -x "$BOOT_JDK/bin/java"; then
20907        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20908$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20909        BOOT_JDK_FOUND=no
20910      else
20911        # Do we have a bin/javac?
20912        if test ! -x "$BOOT_JDK/bin/javac"; then
20913          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20914$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20915          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20916$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20917          BOOT_JDK_FOUND=no
20918        else
20919          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20920          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20921            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20922$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20923            BOOT_JDK_FOUND=no
20924          else
20925            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20926            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20927
20928            # Extra M4 quote needed to protect [] in grep expression.
20929            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20930            if test "x$FOUND_CORRECT_VERSION" = x; then
20931              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20932$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20933              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20934$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20935              BOOT_JDK_FOUND=no
20936            else
20937              # We're done! :-)
20938              BOOT_JDK_FOUND=yes
20939
20940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20941
20942  # Input might be given as Windows format, start by converting to
20943  # unix format.
20944  path="$BOOT_JDK"
20945  new_path=`$CYGPATH -u "$path"`
20946
20947  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20948  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20949  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20950  # "foo.exe" is OK but "foo" is an error.
20951  #
20952  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20953  # It is also a way to make sure we got the proper file name for the real test later on.
20954  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20955  if test "x$test_shortpath" = x; then
20956    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20957$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20958    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20959  fi
20960
20961  # Call helper function which possibly converts this using DOS-style short mode.
20962  # If so, the updated path is stored in $new_path.
20963
20964  input_path="$new_path"
20965  # Check if we need to convert this using DOS-style short mode. If the path
20966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20967  # take no chances and rewrite it.
20968  # Note: m4 eats our [], so we need to use [ and ] instead.
20969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20970  if test "x$has_forbidden_chars" != x; then
20971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20972    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20973    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20974    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20975      # Going to short mode and back again did indeed matter. Since short mode is
20976      # case insensitive, let's make it lowercase to improve readability.
20977      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20978      # Now convert it back to Unix-stile (cygpath)
20979      input_path=`$CYGPATH -u "$shortmode_path"`
20980      new_path="$input_path"
20981    fi
20982  fi
20983
20984  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20985  if test "x$test_cygdrive_prefix" = x; then
20986    # As a simple fix, exclude /usr/bin since it's not a real path.
20987    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20988      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20989      # a path prefixed by /cygdrive for fixpath to work.
20990      new_path="$CYGWIN_ROOT_PATH$input_path"
20991    fi
20992  fi
20993
20994
20995  if test "x$path" != "x$new_path"; then
20996    BOOT_JDK="$new_path"
20997    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20998$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20999  fi
21000
21001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21002
21003  path="$BOOT_JDK"
21004  has_colon=`$ECHO $path | $GREP ^.:`
21005  new_path="$path"
21006  if test "x$has_colon" = x; then
21007    # Not in mixed or Windows style, start by that.
21008    new_path=`cmd //c echo $path`
21009  fi
21010
21011
21012  input_path="$new_path"
21013  # Check if we need to convert this using DOS-style short mode. If the path
21014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21015  # take no chances and rewrite it.
21016  # Note: m4 eats our [], so we need to use [ and ] instead.
21017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21018  if test "x$has_forbidden_chars" != x; then
21019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21020    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21021  fi
21022
21023
21024  windows_path="$new_path"
21025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21026    unix_path=`$CYGPATH -u "$windows_path"`
21027    new_path="$unix_path"
21028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21030    new_path="$unix_path"
21031  fi
21032
21033  if test "x$path" != "x$new_path"; then
21034    BOOT_JDK="$new_path"
21035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21036$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21037  fi
21038
21039  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21040  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21041
21042  else
21043    # We're on a unix platform. Hooray! :)
21044    path="$BOOT_JDK"
21045    has_space=`$ECHO "$path" | $GREP " "`
21046    if test "x$has_space" != x; then
21047      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21048$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21049      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21050    fi
21051
21052    # Use eval to expand a potential ~
21053    eval path="$path"
21054    if test ! -f "$path" && test ! -d "$path"; then
21055      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21056    fi
21057
21058    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21059  fi
21060
21061              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21062$as_echo_n "checking for Boot JDK... " >&6; }
21063              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21064$as_echo "$BOOT_JDK" >&6; }
21065              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21066$as_echo_n "checking Boot JDK version... " >&6; }
21067              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21068              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21069$as_echo "$BOOT_JDK_VERSION" >&6; }
21070            fi # end check jdk version
21071          fi # end check rt.jar
21072        fi # end check javac
21073      fi # end check java
21074    fi # end check boot jdk found
21075  fi
21076
21077
21078  if test "x$BOOT_JDK_FOUND" = xno; then
21079    # Now execute the test
21080
21081  if test -x /usr/libexec/java_home; then
21082    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21083    BOOT_JDK_FOUND=maybe
21084    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21085$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21086  fi
21087
21088
21089    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21090    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21091      # Do we have a bin/java?
21092      if test ! -x "$BOOT_JDK/bin/java"; then
21093        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21094$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21095        BOOT_JDK_FOUND=no
21096      else
21097        # Do we have a bin/javac?
21098        if test ! -x "$BOOT_JDK/bin/javac"; then
21099          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21100$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21101          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21102$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21103          BOOT_JDK_FOUND=no
21104        else
21105          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21106          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21107            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21108$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21109            BOOT_JDK_FOUND=no
21110          else
21111            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21112            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21113
21114            # Extra M4 quote needed to protect [] in grep expression.
21115            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21116            if test "x$FOUND_CORRECT_VERSION" = x; then
21117              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21118$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21119              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21120$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21121              BOOT_JDK_FOUND=no
21122            else
21123              # We're done! :-)
21124              BOOT_JDK_FOUND=yes
21125
21126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21127
21128  # Input might be given as Windows format, start by converting to
21129  # unix format.
21130  path="$BOOT_JDK"
21131  new_path=`$CYGPATH -u "$path"`
21132
21133  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21134  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21135  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21136  # "foo.exe" is OK but "foo" is an error.
21137  #
21138  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21139  # It is also a way to make sure we got the proper file name for the real test later on.
21140  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21141  if test "x$test_shortpath" = x; then
21142    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21143$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21144    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21145  fi
21146
21147  # Call helper function which possibly converts this using DOS-style short mode.
21148  # If so, the updated path is stored in $new_path.
21149
21150  input_path="$new_path"
21151  # Check if we need to convert this using DOS-style short mode. If the path
21152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21153  # take no chances and rewrite it.
21154  # Note: m4 eats our [], so we need to use [ and ] instead.
21155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21156  if test "x$has_forbidden_chars" != x; then
21157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21158    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21159    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21160    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21161      # Going to short mode and back again did indeed matter. Since short mode is
21162      # case insensitive, let's make it lowercase to improve readability.
21163      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21164      # Now convert it back to Unix-stile (cygpath)
21165      input_path=`$CYGPATH -u "$shortmode_path"`
21166      new_path="$input_path"
21167    fi
21168  fi
21169
21170  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21171  if test "x$test_cygdrive_prefix" = x; then
21172    # As a simple fix, exclude /usr/bin since it's not a real path.
21173    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21174      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21175      # a path prefixed by /cygdrive for fixpath to work.
21176      new_path="$CYGWIN_ROOT_PATH$input_path"
21177    fi
21178  fi
21179
21180
21181  if test "x$path" != "x$new_path"; then
21182    BOOT_JDK="$new_path"
21183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21184$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21185  fi
21186
21187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21188
21189  path="$BOOT_JDK"
21190  has_colon=`$ECHO $path | $GREP ^.:`
21191  new_path="$path"
21192  if test "x$has_colon" = x; then
21193    # Not in mixed or Windows style, start by that.
21194    new_path=`cmd //c echo $path`
21195  fi
21196
21197
21198  input_path="$new_path"
21199  # Check if we need to convert this using DOS-style short mode. If the path
21200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21201  # take no chances and rewrite it.
21202  # Note: m4 eats our [], so we need to use [ and ] instead.
21203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21204  if test "x$has_forbidden_chars" != x; then
21205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21207  fi
21208
21209
21210  windows_path="$new_path"
21211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21212    unix_path=`$CYGPATH -u "$windows_path"`
21213    new_path="$unix_path"
21214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21216    new_path="$unix_path"
21217  fi
21218
21219  if test "x$path" != "x$new_path"; then
21220    BOOT_JDK="$new_path"
21221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21222$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21223  fi
21224
21225  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21226  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21227
21228  else
21229    # We're on a unix platform. Hooray! :)
21230    path="$BOOT_JDK"
21231    has_space=`$ECHO "$path" | $GREP " "`
21232    if test "x$has_space" != x; then
21233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21234$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21235      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21236    fi
21237
21238    # Use eval to expand a potential ~
21239    eval path="$path"
21240    if test ! -f "$path" && test ! -d "$path"; then
21241      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21242    fi
21243
21244    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21245  fi
21246
21247              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21248$as_echo_n "checking for Boot JDK... " >&6; }
21249              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21250$as_echo "$BOOT_JDK" >&6; }
21251              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21252$as_echo_n "checking Boot JDK version... " >&6; }
21253              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21254              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21255$as_echo "$BOOT_JDK_VERSION" >&6; }
21256            fi # end check jdk version
21257          fi # end check rt.jar
21258        fi # end check javac
21259      fi # end check java
21260    fi # end check boot jdk found
21261  fi
21262
21263
21264  if test "x$BOOT_JDK_FOUND" = xno; then
21265    # Now execute the test
21266
21267  if test -x /usr/libexec/java_home; then
21268    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21269    BOOT_JDK_FOUND=maybe
21270    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21271$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21272  fi
21273
21274
21275    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21276    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21277      # Do we have a bin/java?
21278      if test ! -x "$BOOT_JDK/bin/java"; then
21279        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21280$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21281        BOOT_JDK_FOUND=no
21282      else
21283        # Do we have a bin/javac?
21284        if test ! -x "$BOOT_JDK/bin/javac"; then
21285          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21286$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21287          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21288$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21289          BOOT_JDK_FOUND=no
21290        else
21291          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21292          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21293            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21294$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21295            BOOT_JDK_FOUND=no
21296          else
21297            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21298            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21299
21300            # Extra M4 quote needed to protect [] in grep expression.
21301            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21302            if test "x$FOUND_CORRECT_VERSION" = x; then
21303              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21304$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21305              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21306$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21307              BOOT_JDK_FOUND=no
21308            else
21309              # We're done! :-)
21310              BOOT_JDK_FOUND=yes
21311
21312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21313
21314  # Input might be given as Windows format, start by converting to
21315  # unix format.
21316  path="$BOOT_JDK"
21317  new_path=`$CYGPATH -u "$path"`
21318
21319  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21320  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21321  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21322  # "foo.exe" is OK but "foo" is an error.
21323  #
21324  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21325  # It is also a way to make sure we got the proper file name for the real test later on.
21326  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21327  if test "x$test_shortpath" = x; then
21328    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21329$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21330    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21331  fi
21332
21333  # Call helper function which possibly converts this using DOS-style short mode.
21334  # If so, the updated path is stored in $new_path.
21335
21336  input_path="$new_path"
21337  # Check if we need to convert this using DOS-style short mode. If the path
21338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21339  # take no chances and rewrite it.
21340  # Note: m4 eats our [], so we need to use [ and ] instead.
21341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21342  if test "x$has_forbidden_chars" != x; then
21343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21347      # Going to short mode and back again did indeed matter. Since short mode is
21348      # case insensitive, let's make it lowercase to improve readability.
21349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21350      # Now convert it back to Unix-stile (cygpath)
21351      input_path=`$CYGPATH -u "$shortmode_path"`
21352      new_path="$input_path"
21353    fi
21354  fi
21355
21356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21357  if test "x$test_cygdrive_prefix" = x; then
21358    # As a simple fix, exclude /usr/bin since it's not a real path.
21359    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21361      # a path prefixed by /cygdrive for fixpath to work.
21362      new_path="$CYGWIN_ROOT_PATH$input_path"
21363    fi
21364  fi
21365
21366
21367  if test "x$path" != "x$new_path"; then
21368    BOOT_JDK="$new_path"
21369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21370$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21371  fi
21372
21373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21374
21375  path="$BOOT_JDK"
21376  has_colon=`$ECHO $path | $GREP ^.:`
21377  new_path="$path"
21378  if test "x$has_colon" = x; then
21379    # Not in mixed or Windows style, start by that.
21380    new_path=`cmd //c echo $path`
21381  fi
21382
21383
21384  input_path="$new_path"
21385  # Check if we need to convert this using DOS-style short mode. If the path
21386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21387  # take no chances and rewrite it.
21388  # Note: m4 eats our [], so we need to use [ and ] instead.
21389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21390  if test "x$has_forbidden_chars" != x; then
21391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21393  fi
21394
21395
21396  windows_path="$new_path"
21397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21398    unix_path=`$CYGPATH -u "$windows_path"`
21399    new_path="$unix_path"
21400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21402    new_path="$unix_path"
21403  fi
21404
21405  if test "x$path" != "x$new_path"; then
21406    BOOT_JDK="$new_path"
21407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21408$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21409  fi
21410
21411  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21412  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21413
21414  else
21415    # We're on a unix platform. Hooray! :)
21416    path="$BOOT_JDK"
21417    has_space=`$ECHO "$path" | $GREP " "`
21418    if test "x$has_space" != x; then
21419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21420$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21421      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21422    fi
21423
21424    # Use eval to expand a potential ~
21425    eval path="$path"
21426    if test ! -f "$path" && test ! -d "$path"; then
21427      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21428    fi
21429
21430    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21431  fi
21432
21433              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21434$as_echo_n "checking for Boot JDK... " >&6; }
21435              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21436$as_echo "$BOOT_JDK" >&6; }
21437              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21438$as_echo_n "checking Boot JDK version... " >&6; }
21439              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21440              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21441$as_echo "$BOOT_JDK_VERSION" >&6; }
21442            fi # end check jdk version
21443          fi # end check rt.jar
21444        fi # end check javac
21445      fi # end check java
21446    fi # end check boot jdk found
21447  fi
21448
21449  fi
21450
21451
21452    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21453    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21454      # Do we have a bin/java?
21455      if test ! -x "$BOOT_JDK/bin/java"; then
21456        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21457$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21458        BOOT_JDK_FOUND=no
21459      else
21460        # Do we have a bin/javac?
21461        if test ! -x "$BOOT_JDK/bin/javac"; then
21462          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21463$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21464          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21465$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21466          BOOT_JDK_FOUND=no
21467        else
21468          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21469          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21470            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21471$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21472            BOOT_JDK_FOUND=no
21473          else
21474            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21475            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21476
21477            # Extra M4 quote needed to protect [] in grep expression.
21478            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21479            if test "x$FOUND_CORRECT_VERSION" = x; then
21480              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21481$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21482              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21483$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21484              BOOT_JDK_FOUND=no
21485            else
21486              # We're done! :-)
21487              BOOT_JDK_FOUND=yes
21488
21489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21490
21491  # Input might be given as Windows format, start by converting to
21492  # unix format.
21493  path="$BOOT_JDK"
21494  new_path=`$CYGPATH -u "$path"`
21495
21496  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21497  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21498  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21499  # "foo.exe" is OK but "foo" is an error.
21500  #
21501  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21502  # It is also a way to make sure we got the proper file name for the real test later on.
21503  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21504  if test "x$test_shortpath" = x; then
21505    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21506$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21507    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21508  fi
21509
21510  # Call helper function which possibly converts this using DOS-style short mode.
21511  # If so, the updated path is stored in $new_path.
21512
21513  input_path="$new_path"
21514  # Check if we need to convert this using DOS-style short mode. If the path
21515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21516  # take no chances and rewrite it.
21517  # Note: m4 eats our [], so we need to use [ and ] instead.
21518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21519  if test "x$has_forbidden_chars" != x; then
21520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21524      # Going to short mode and back again did indeed matter. Since short mode is
21525      # case insensitive, let's make it lowercase to improve readability.
21526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21527      # Now convert it back to Unix-stile (cygpath)
21528      input_path=`$CYGPATH -u "$shortmode_path"`
21529      new_path="$input_path"
21530    fi
21531  fi
21532
21533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21534  if test "x$test_cygdrive_prefix" = x; then
21535    # As a simple fix, exclude /usr/bin since it's not a real path.
21536    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21538      # a path prefixed by /cygdrive for fixpath to work.
21539      new_path="$CYGWIN_ROOT_PATH$input_path"
21540    fi
21541  fi
21542
21543
21544  if test "x$path" != "x$new_path"; then
21545    BOOT_JDK="$new_path"
21546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21547$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21548  fi
21549
21550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21551
21552  path="$BOOT_JDK"
21553  has_colon=`$ECHO $path | $GREP ^.:`
21554  new_path="$path"
21555  if test "x$has_colon" = x; then
21556    # Not in mixed or Windows style, start by that.
21557    new_path=`cmd //c echo $path`
21558  fi
21559
21560
21561  input_path="$new_path"
21562  # Check if we need to convert this using DOS-style short mode. If the path
21563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21564  # take no chances and rewrite it.
21565  # Note: m4 eats our [], so we need to use [ and ] instead.
21566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21567  if test "x$has_forbidden_chars" != x; then
21568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21569    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21570  fi
21571
21572
21573  windows_path="$new_path"
21574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21575    unix_path=`$CYGPATH -u "$windows_path"`
21576    new_path="$unix_path"
21577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21579    new_path="$unix_path"
21580  fi
21581
21582  if test "x$path" != "x$new_path"; then
21583    BOOT_JDK="$new_path"
21584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21585$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21586  fi
21587
21588  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21589  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21590
21591  else
21592    # We're on a unix platform. Hooray! :)
21593    path="$BOOT_JDK"
21594    has_space=`$ECHO "$path" | $GREP " "`
21595    if test "x$has_space" != x; then
21596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21597$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21598      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21599    fi
21600
21601    # Use eval to expand a potential ~
21602    eval path="$path"
21603    if test ! -f "$path" && test ! -d "$path"; then
21604      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21605    fi
21606
21607    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21608  fi
21609
21610              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21611$as_echo_n "checking for Boot JDK... " >&6; }
21612              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21613$as_echo "$BOOT_JDK" >&6; }
21614              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21615$as_echo_n "checking Boot JDK version... " >&6; }
21616              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21617              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21618$as_echo "$BOOT_JDK_VERSION" >&6; }
21619            fi # end check jdk version
21620          fi # end check rt.jar
21621        fi # end check javac
21622      fi # end check java
21623    fi # end check boot jdk found
21624  fi
21625
21626
21627  # Test: Is $JAVA_HOME set?
21628
21629  if test "x$BOOT_JDK_FOUND" = xno; then
21630    # Now execute the test
21631
21632  if test "x$JAVA_HOME" != x; then
21633    JAVA_HOME_PROCESSED="$JAVA_HOME"
21634
21635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21636
21637  # Input might be given as Windows format, start by converting to
21638  # unix format.
21639  path="$JAVA_HOME_PROCESSED"
21640  new_path=`$CYGPATH -u "$path"`
21641
21642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21645  # "foo.exe" is OK but "foo" is an error.
21646  #
21647  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21648  # It is also a way to make sure we got the proper file name for the real test later on.
21649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21650  if test "x$test_shortpath" = x; then
21651    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21652$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21653    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21654  fi
21655
21656  # Call helper function which possibly converts this using DOS-style short mode.
21657  # If so, the updated path is stored in $new_path.
21658
21659  input_path="$new_path"
21660  # Check if we need to convert this using DOS-style short mode. If the path
21661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21662  # take no chances and rewrite it.
21663  # Note: m4 eats our [], so we need to use [ and ] instead.
21664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21665  if test "x$has_forbidden_chars" != x; then
21666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21670      # Going to short mode and back again did indeed matter. Since short mode is
21671      # case insensitive, let's make it lowercase to improve readability.
21672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21673      # Now convert it back to Unix-stile (cygpath)
21674      input_path=`$CYGPATH -u "$shortmode_path"`
21675      new_path="$input_path"
21676    fi
21677  fi
21678
21679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21680  if test "x$test_cygdrive_prefix" = x; then
21681    # As a simple fix, exclude /usr/bin since it's not a real path.
21682    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21684      # a path prefixed by /cygdrive for fixpath to work.
21685      new_path="$CYGWIN_ROOT_PATH$input_path"
21686    fi
21687  fi
21688
21689
21690  if test "x$path" != "x$new_path"; then
21691    JAVA_HOME_PROCESSED="$new_path"
21692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21693$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21694  fi
21695
21696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21697
21698  path="$JAVA_HOME_PROCESSED"
21699  has_colon=`$ECHO $path | $GREP ^.:`
21700  new_path="$path"
21701  if test "x$has_colon" = x; then
21702    # Not in mixed or Windows style, start by that.
21703    new_path=`cmd //c echo $path`
21704  fi
21705
21706
21707  input_path="$new_path"
21708  # Check if we need to convert this using DOS-style short mode. If the path
21709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21710  # take no chances and rewrite it.
21711  # Note: m4 eats our [], so we need to use [ and ] instead.
21712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21713  if test "x$has_forbidden_chars" != x; then
21714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21716  fi
21717
21718
21719  windows_path="$new_path"
21720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21721    unix_path=`$CYGPATH -u "$windows_path"`
21722    new_path="$unix_path"
21723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21725    new_path="$unix_path"
21726  fi
21727
21728  if test "x$path" != "x$new_path"; then
21729    JAVA_HOME_PROCESSED="$new_path"
21730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21731$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21732  fi
21733
21734  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21735  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21736
21737  else
21738    # We're on a unix platform. Hooray! :)
21739    path="$JAVA_HOME_PROCESSED"
21740    has_space=`$ECHO "$path" | $GREP " "`
21741    if test "x$has_space" != x; then
21742      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21743$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21744      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21745    fi
21746
21747    # Use eval to expand a potential ~
21748    eval path="$path"
21749    if test ! -f "$path" && test ! -d "$path"; then
21750      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21751    fi
21752
21753    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21754  fi
21755
21756    if test ! -d "$JAVA_HOME_PROCESSED"; then
21757      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21758$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21759    else
21760      # Aha, the user has set a JAVA_HOME
21761      # let us use that as the Boot JDK.
21762      BOOT_JDK="$JAVA_HOME_PROCESSED"
21763      BOOT_JDK_FOUND=maybe
21764      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21765$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21766    fi
21767  fi
21768
21769
21770    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21771    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21772      # Do we have a bin/java?
21773      if test ! -x "$BOOT_JDK/bin/java"; then
21774        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21775$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21776        BOOT_JDK_FOUND=no
21777      else
21778        # Do we have a bin/javac?
21779        if test ! -x "$BOOT_JDK/bin/javac"; then
21780          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21781$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21782          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21783$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21784          BOOT_JDK_FOUND=no
21785        else
21786          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21787          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21788            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21790            BOOT_JDK_FOUND=no
21791          else
21792            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21793            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21794
21795            # Extra M4 quote needed to protect [] in grep expression.
21796            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21797            if test "x$FOUND_CORRECT_VERSION" = x; then
21798              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21799$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21800              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21801$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21802              BOOT_JDK_FOUND=no
21803            else
21804              # We're done! :-)
21805              BOOT_JDK_FOUND=yes
21806
21807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21808
21809  # Input might be given as Windows format, start by converting to
21810  # unix format.
21811  path="$BOOT_JDK"
21812  new_path=`$CYGPATH -u "$path"`
21813
21814  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21815  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21816  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21817  # "foo.exe" is OK but "foo" is an error.
21818  #
21819  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21820  # It is also a way to make sure we got the proper file name for the real test later on.
21821  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21822  if test "x$test_shortpath" = x; then
21823    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21824$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21825    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21826  fi
21827
21828  # Call helper function which possibly converts this using DOS-style short mode.
21829  # If so, the updated path is stored in $new_path.
21830
21831  input_path="$new_path"
21832  # Check if we need to convert this using DOS-style short mode. If the path
21833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21834  # take no chances and rewrite it.
21835  # Note: m4 eats our [], so we need to use [ and ] instead.
21836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21837  if test "x$has_forbidden_chars" != x; then
21838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21842      # Going to short mode and back again did indeed matter. Since short mode is
21843      # case insensitive, let's make it lowercase to improve readability.
21844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21845      # Now convert it back to Unix-stile (cygpath)
21846      input_path=`$CYGPATH -u "$shortmode_path"`
21847      new_path="$input_path"
21848    fi
21849  fi
21850
21851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21852  if test "x$test_cygdrive_prefix" = x; then
21853    # As a simple fix, exclude /usr/bin since it's not a real path.
21854    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21856      # a path prefixed by /cygdrive for fixpath to work.
21857      new_path="$CYGWIN_ROOT_PATH$input_path"
21858    fi
21859  fi
21860
21861
21862  if test "x$path" != "x$new_path"; then
21863    BOOT_JDK="$new_path"
21864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21865$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21866  fi
21867
21868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21869
21870  path="$BOOT_JDK"
21871  has_colon=`$ECHO $path | $GREP ^.:`
21872  new_path="$path"
21873  if test "x$has_colon" = x; then
21874    # Not in mixed or Windows style, start by that.
21875    new_path=`cmd //c echo $path`
21876  fi
21877
21878
21879  input_path="$new_path"
21880  # Check if we need to convert this using DOS-style short mode. If the path
21881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21882  # take no chances and rewrite it.
21883  # Note: m4 eats our [], so we need to use [ and ] instead.
21884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21885  if test "x$has_forbidden_chars" != x; then
21886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21888  fi
21889
21890
21891  windows_path="$new_path"
21892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21893    unix_path=`$CYGPATH -u "$windows_path"`
21894    new_path="$unix_path"
21895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21897    new_path="$unix_path"
21898  fi
21899
21900  if test "x$path" != "x$new_path"; then
21901    BOOT_JDK="$new_path"
21902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21903$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21904  fi
21905
21906  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21907  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21908
21909  else
21910    # We're on a unix platform. Hooray! :)
21911    path="$BOOT_JDK"
21912    has_space=`$ECHO "$path" | $GREP " "`
21913    if test "x$has_space" != x; then
21914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21915$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21916      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21917    fi
21918
21919    # Use eval to expand a potential ~
21920    eval path="$path"
21921    if test ! -f "$path" && test ! -d "$path"; then
21922      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21923    fi
21924
21925    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21926  fi
21927
21928              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21929$as_echo_n "checking for Boot JDK... " >&6; }
21930              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21931$as_echo "$BOOT_JDK" >&6; }
21932              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21933$as_echo_n "checking Boot JDK version... " >&6; }
21934              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21935              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21936$as_echo "$BOOT_JDK_VERSION" >&6; }
21937            fi # end check jdk version
21938          fi # end check rt.jar
21939        fi # end check javac
21940      fi # end check java
21941    fi # end check boot jdk found
21942  fi
21943
21944
21945  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21946
21947  if test "x$BOOT_JDK_FOUND" = xno; then
21948    # Now execute the test
21949
21950  # Extract the first word of "javac", so it can be a program name with args.
21951set dummy javac; ac_word=$2
21952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21953$as_echo_n "checking for $ac_word... " >&6; }
21954if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21955  $as_echo_n "(cached) " >&6
21956else
21957  case $JAVAC_CHECK in
21958  [\\/]* | ?:[\\/]*)
21959  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21960  ;;
21961  *)
21962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21963for as_dir in $PATH
21964do
21965  IFS=$as_save_IFS
21966  test -z "$as_dir" && as_dir=.
21967    for ac_exec_ext in '' $ac_executable_extensions; do
21968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21969    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21971    break 2
21972  fi
21973done
21974  done
21975IFS=$as_save_IFS
21976
21977  ;;
21978esac
21979fi
21980JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21981if test -n "$JAVAC_CHECK"; then
21982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21983$as_echo "$JAVAC_CHECK" >&6; }
21984else
21985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21986$as_echo "no" >&6; }
21987fi
21988
21989
21990  # Extract the first word of "java", so it can be a program name with args.
21991set dummy java; ac_word=$2
21992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21993$as_echo_n "checking for $ac_word... " >&6; }
21994if ${ac_cv_path_JAVA_CHECK+:} false; then :
21995  $as_echo_n "(cached) " >&6
21996else
21997  case $JAVA_CHECK in
21998  [\\/]* | ?:[\\/]*)
21999  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22000  ;;
22001  *)
22002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22003for as_dir in $PATH
22004do
22005  IFS=$as_save_IFS
22006  test -z "$as_dir" && as_dir=.
22007    for ac_exec_ext in '' $ac_executable_extensions; do
22008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22009    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22011    break 2
22012  fi
22013done
22014  done
22015IFS=$as_save_IFS
22016
22017  ;;
22018esac
22019fi
22020JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22021if test -n "$JAVA_CHECK"; then
22022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22023$as_echo "$JAVA_CHECK" >&6; }
22024else
22025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22026$as_echo "no" >&6; }
22027fi
22028
22029
22030  BINARY="$JAVAC_CHECK"
22031  if test "x$JAVAC_CHECK" = x; then
22032    BINARY="$JAVA_CHECK"
22033  fi
22034  if test "x$BINARY" != x; then
22035    # So there is a java(c) binary, it might be part of a JDK.
22036    # Lets find the JDK/JRE directory by following symbolic links.
22037    # Linux/GNU systems often have links from /usr/bin/java to
22038    # /etc/alternatives/java to the real JDK binary.
22039
22040  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22041    # Follow a chain of symbolic links. Use readlink
22042    # where it exists, else fall back to horribly
22043    # complicated shell code.
22044    if test "x$READLINK_TESTED" != yes; then
22045      # On MacOSX there is a readlink tool with a different
22046      # purpose than the GNU readlink tool. Check the found readlink.
22047      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22048      if test "x$ISGNU" = x; then
22049        # A readlink that we do not know how to use.
22050        # Are there other non-GNU readlinks out there?
22051        READLINK_TESTED=yes
22052        READLINK=
22053      fi
22054    fi
22055
22056    if test "x$READLINK" != x; then
22057      BINARY=`$READLINK -f $BINARY`
22058    else
22059      # Save the current directory for restoring afterwards
22060      STARTDIR=$PWD
22061      COUNTER=0
22062      sym_link_dir=`$DIRNAME $BINARY`
22063      sym_link_file=`$BASENAME $BINARY`
22064      cd $sym_link_dir
22065      # Use -P flag to resolve symlinks in directories.
22066      cd `$THEPWDCMD -P`
22067      sym_link_dir=`$THEPWDCMD -P`
22068      # Resolve file symlinks
22069      while test $COUNTER -lt 20; do
22070        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22071        if test "x$ISLINK" == x; then
22072          # This is not a symbolic link! We are done!
22073          break
22074        fi
22075        # Again resolve directory symlinks since the target of the just found
22076        # link could be in a different directory
22077        cd `$DIRNAME $ISLINK`
22078        sym_link_dir=`$THEPWDCMD -P`
22079        sym_link_file=`$BASENAME $ISLINK`
22080        let COUNTER=COUNTER+1
22081      done
22082      cd $STARTDIR
22083      BINARY=$sym_link_dir/$sym_link_file
22084    fi
22085  fi
22086
22087    BOOT_JDK=`dirname "$BINARY"`
22088    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22089    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22090      # Looks like we found ourselves an JDK
22091      BOOT_JDK_FOUND=maybe
22092      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22093$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22094    fi
22095  fi
22096
22097
22098    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22099    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22100      # Do we have a bin/java?
22101      if test ! -x "$BOOT_JDK/bin/java"; then
22102        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22103$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22104        BOOT_JDK_FOUND=no
22105      else
22106        # Do we have a bin/javac?
22107        if test ! -x "$BOOT_JDK/bin/javac"; then
22108          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22109$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22110          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22111$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22112          BOOT_JDK_FOUND=no
22113        else
22114          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22115          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22116            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22117$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22118            BOOT_JDK_FOUND=no
22119          else
22120            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22121            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22122
22123            # Extra M4 quote needed to protect [] in grep expression.
22124            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22125            if test "x$FOUND_CORRECT_VERSION" = x; then
22126              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22127$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22128              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22129$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22130              BOOT_JDK_FOUND=no
22131            else
22132              # We're done! :-)
22133              BOOT_JDK_FOUND=yes
22134
22135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22136
22137  # Input might be given as Windows format, start by converting to
22138  # unix format.
22139  path="$BOOT_JDK"
22140  new_path=`$CYGPATH -u "$path"`
22141
22142  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22143  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22144  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22145  # "foo.exe" is OK but "foo" is an error.
22146  #
22147  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22148  # It is also a way to make sure we got the proper file name for the real test later on.
22149  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22150  if test "x$test_shortpath" = x; then
22151    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22152$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22153    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22154  fi
22155
22156  # Call helper function which possibly converts this using DOS-style short mode.
22157  # If so, the updated path is stored in $new_path.
22158
22159  input_path="$new_path"
22160  # Check if we need to convert this using DOS-style short mode. If the path
22161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22162  # take no chances and rewrite it.
22163  # Note: m4 eats our [], so we need to use [ and ] instead.
22164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22165  if test "x$has_forbidden_chars" != x; then
22166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22167    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22168    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22169    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22170      # Going to short mode and back again did indeed matter. Since short mode is
22171      # case insensitive, let's make it lowercase to improve readability.
22172      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22173      # Now convert it back to Unix-stile (cygpath)
22174      input_path=`$CYGPATH -u "$shortmode_path"`
22175      new_path="$input_path"
22176    fi
22177  fi
22178
22179  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22180  if test "x$test_cygdrive_prefix" = x; then
22181    # As a simple fix, exclude /usr/bin since it's not a real path.
22182    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22183      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22184      # a path prefixed by /cygdrive for fixpath to work.
22185      new_path="$CYGWIN_ROOT_PATH$input_path"
22186    fi
22187  fi
22188
22189
22190  if test "x$path" != "x$new_path"; then
22191    BOOT_JDK="$new_path"
22192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22193$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22194  fi
22195
22196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22197
22198  path="$BOOT_JDK"
22199  has_colon=`$ECHO $path | $GREP ^.:`
22200  new_path="$path"
22201  if test "x$has_colon" = x; then
22202    # Not in mixed or Windows style, start by that.
22203    new_path=`cmd //c echo $path`
22204  fi
22205
22206
22207  input_path="$new_path"
22208  # Check if we need to convert this using DOS-style short mode. If the path
22209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22210  # take no chances and rewrite it.
22211  # Note: m4 eats our [], so we need to use [ and ] instead.
22212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22213  if test "x$has_forbidden_chars" != x; then
22214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22215    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22216  fi
22217
22218
22219  windows_path="$new_path"
22220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22221    unix_path=`$CYGPATH -u "$windows_path"`
22222    new_path="$unix_path"
22223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22225    new_path="$unix_path"
22226  fi
22227
22228  if test "x$path" != "x$new_path"; then
22229    BOOT_JDK="$new_path"
22230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22231$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22232  fi
22233
22234  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22235  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22236
22237  else
22238    # We're on a unix platform. Hooray! :)
22239    path="$BOOT_JDK"
22240    has_space=`$ECHO "$path" | $GREP " "`
22241    if test "x$has_space" != x; then
22242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22243$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22244      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22245    fi
22246
22247    # Use eval to expand a potential ~
22248    eval path="$path"
22249    if test ! -f "$path" && test ! -d "$path"; then
22250      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22251    fi
22252
22253    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22254  fi
22255
22256              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22257$as_echo_n "checking for Boot JDK... " >&6; }
22258              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22259$as_echo "$BOOT_JDK" >&6; }
22260              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22261$as_echo_n "checking Boot JDK version... " >&6; }
22262              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22263              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22264$as_echo "$BOOT_JDK_VERSION" >&6; }
22265            fi # end check jdk version
22266          fi # end check rt.jar
22267        fi # end check javac
22268      fi # end check java
22269    fi # end check boot jdk found
22270  fi
22271
22272
22273  # Test: Is there a JDK installed in default, well-known locations?
22274
22275  if test "x$BOOT_JDK_FOUND" = xno; then
22276    # Now execute the test
22277
22278  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22279
22280  if test "x$BOOT_JDK_FOUND" = xno; then
22281    # Now execute the test
22282
22283  if test "x$ProgramW6432" != x; then
22284    VIRTUAL_DIR="$ProgramW6432/Java"
22285
22286  windows_path="$VIRTUAL_DIR"
22287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22288    unix_path=`$CYGPATH -u "$windows_path"`
22289    VIRTUAL_DIR="$unix_path"
22290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22292    VIRTUAL_DIR="$unix_path"
22293  fi
22294
22295
22296  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22297  BOOT_JDK_SUFFIX=""
22298  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22299  if test "x$ALL_JDKS_FOUND" != x; then
22300    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22301
22302  if test "x$BOOT_JDK_FOUND" = xno; then
22303    # Now execute the test
22304
22305        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22306        if test -d "$BOOT_JDK"; then
22307          BOOT_JDK_FOUND=maybe
22308          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22309$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22310        fi
22311
22312
22313    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22314    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22315      # Do we have a bin/java?
22316      if test ! -x "$BOOT_JDK/bin/java"; then
22317        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22318$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22319        BOOT_JDK_FOUND=no
22320      else
22321        # Do we have a bin/javac?
22322        if test ! -x "$BOOT_JDK/bin/javac"; then
22323          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22325          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22326$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22327          BOOT_JDK_FOUND=no
22328        else
22329          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22330          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22331            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22332$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22333            BOOT_JDK_FOUND=no
22334          else
22335            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22336            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22337
22338            # Extra M4 quote needed to protect [] in grep expression.
22339            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22340            if test "x$FOUND_CORRECT_VERSION" = x; then
22341              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22342$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22343              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22344$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22345              BOOT_JDK_FOUND=no
22346            else
22347              # We're done! :-)
22348              BOOT_JDK_FOUND=yes
22349
22350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22351
22352  # Input might be given as Windows format, start by converting to
22353  # unix format.
22354  path="$BOOT_JDK"
22355  new_path=`$CYGPATH -u "$path"`
22356
22357  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22358  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22359  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22360  # "foo.exe" is OK but "foo" is an error.
22361  #
22362  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22363  # It is also a way to make sure we got the proper file name for the real test later on.
22364  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22365  if test "x$test_shortpath" = x; then
22366    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22367$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22368    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22369  fi
22370
22371  # Call helper function which possibly converts this using DOS-style short mode.
22372  # If so, the updated path is stored in $new_path.
22373
22374  input_path="$new_path"
22375  # Check if we need to convert this using DOS-style short mode. If the path
22376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22377  # take no chances and rewrite it.
22378  # Note: m4 eats our [], so we need to use [ and ] instead.
22379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22380  if test "x$has_forbidden_chars" != x; then
22381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22385      # Going to short mode and back again did indeed matter. Since short mode is
22386      # case insensitive, let's make it lowercase to improve readability.
22387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22388      # Now convert it back to Unix-stile (cygpath)
22389      input_path=`$CYGPATH -u "$shortmode_path"`
22390      new_path="$input_path"
22391    fi
22392  fi
22393
22394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22395  if test "x$test_cygdrive_prefix" = x; then
22396    # As a simple fix, exclude /usr/bin since it's not a real path.
22397    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22399      # a path prefixed by /cygdrive for fixpath to work.
22400      new_path="$CYGWIN_ROOT_PATH$input_path"
22401    fi
22402  fi
22403
22404
22405  if test "x$path" != "x$new_path"; then
22406    BOOT_JDK="$new_path"
22407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22408$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22409  fi
22410
22411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22412
22413  path="$BOOT_JDK"
22414  has_colon=`$ECHO $path | $GREP ^.:`
22415  new_path="$path"
22416  if test "x$has_colon" = x; then
22417    # Not in mixed or Windows style, start by that.
22418    new_path=`cmd //c echo $path`
22419  fi
22420
22421
22422  input_path="$new_path"
22423  # Check if we need to convert this using DOS-style short mode. If the path
22424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22425  # take no chances and rewrite it.
22426  # Note: m4 eats our [], so we need to use [ and ] instead.
22427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22428  if test "x$has_forbidden_chars" != x; then
22429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22430    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22431  fi
22432
22433
22434  windows_path="$new_path"
22435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22436    unix_path=`$CYGPATH -u "$windows_path"`
22437    new_path="$unix_path"
22438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22440    new_path="$unix_path"
22441  fi
22442
22443  if test "x$path" != "x$new_path"; then
22444    BOOT_JDK="$new_path"
22445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22446$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22447  fi
22448
22449  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22450  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22451
22452  else
22453    # We're on a unix platform. Hooray! :)
22454    path="$BOOT_JDK"
22455    has_space=`$ECHO "$path" | $GREP " "`
22456    if test "x$has_space" != x; then
22457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22458$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22459      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22460    fi
22461
22462    # Use eval to expand a potential ~
22463    eval path="$path"
22464    if test ! -f "$path" && test ! -d "$path"; then
22465      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22466    fi
22467
22468    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22469  fi
22470
22471              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22472$as_echo_n "checking for Boot JDK... " >&6; }
22473              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22474$as_echo "$BOOT_JDK" >&6; }
22475              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22476$as_echo_n "checking Boot JDK version... " >&6; }
22477              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22478              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22479$as_echo "$BOOT_JDK_VERSION" >&6; }
22480            fi # end check jdk version
22481          fi # end check rt.jar
22482        fi # end check javac
22483      fi # end check java
22484    fi # end check boot jdk found
22485  fi
22486
22487    done
22488  fi
22489
22490  fi
22491
22492
22493    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22494    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22495      # Do we have a bin/java?
22496      if test ! -x "$BOOT_JDK/bin/java"; then
22497        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22498$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22499        BOOT_JDK_FOUND=no
22500      else
22501        # Do we have a bin/javac?
22502        if test ! -x "$BOOT_JDK/bin/javac"; then
22503          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22504$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22505          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22506$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22507          BOOT_JDK_FOUND=no
22508        else
22509          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22510          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22511            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22513            BOOT_JDK_FOUND=no
22514          else
22515            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22516            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22517
22518            # Extra M4 quote needed to protect [] in grep expression.
22519            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22520            if test "x$FOUND_CORRECT_VERSION" = x; then
22521              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22522$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22523              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22524$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22525              BOOT_JDK_FOUND=no
22526            else
22527              # We're done! :-)
22528              BOOT_JDK_FOUND=yes
22529
22530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22531
22532  # Input might be given as Windows format, start by converting to
22533  # unix format.
22534  path="$BOOT_JDK"
22535  new_path=`$CYGPATH -u "$path"`
22536
22537  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22538  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22539  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22540  # "foo.exe" is OK but "foo" is an error.
22541  #
22542  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22543  # It is also a way to make sure we got the proper file name for the real test later on.
22544  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22545  if test "x$test_shortpath" = x; then
22546    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22547$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22548    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22549  fi
22550
22551  # Call helper function which possibly converts this using DOS-style short mode.
22552  # If so, the updated path is stored in $new_path.
22553
22554  input_path="$new_path"
22555  # Check if we need to convert this using DOS-style short mode. If the path
22556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22557  # take no chances and rewrite it.
22558  # Note: m4 eats our [], so we need to use [ and ] instead.
22559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22560  if test "x$has_forbidden_chars" != x; then
22561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22562    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22563    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22564    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22565      # Going to short mode and back again did indeed matter. Since short mode is
22566      # case insensitive, let's make it lowercase to improve readability.
22567      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22568      # Now convert it back to Unix-stile (cygpath)
22569      input_path=`$CYGPATH -u "$shortmode_path"`
22570      new_path="$input_path"
22571    fi
22572  fi
22573
22574  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22575  if test "x$test_cygdrive_prefix" = x; then
22576    # As a simple fix, exclude /usr/bin since it's not a real path.
22577    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22578      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22579      # a path prefixed by /cygdrive for fixpath to work.
22580      new_path="$CYGWIN_ROOT_PATH$input_path"
22581    fi
22582  fi
22583
22584
22585  if test "x$path" != "x$new_path"; then
22586    BOOT_JDK="$new_path"
22587    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22588$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22589  fi
22590
22591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22592
22593  path="$BOOT_JDK"
22594  has_colon=`$ECHO $path | $GREP ^.:`
22595  new_path="$path"
22596  if test "x$has_colon" = x; then
22597    # Not in mixed or Windows style, start by that.
22598    new_path=`cmd //c echo $path`
22599  fi
22600
22601
22602  input_path="$new_path"
22603  # Check if we need to convert this using DOS-style short mode. If the path
22604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22605  # take no chances and rewrite it.
22606  # Note: m4 eats our [], so we need to use [ and ] instead.
22607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22608  if test "x$has_forbidden_chars" != x; then
22609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22610    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22611  fi
22612
22613
22614  windows_path="$new_path"
22615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22616    unix_path=`$CYGPATH -u "$windows_path"`
22617    new_path="$unix_path"
22618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22620    new_path="$unix_path"
22621  fi
22622
22623  if test "x$path" != "x$new_path"; then
22624    BOOT_JDK="$new_path"
22625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22626$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22627  fi
22628
22629  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22630  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22631
22632  else
22633    # We're on a unix platform. Hooray! :)
22634    path="$BOOT_JDK"
22635    has_space=`$ECHO "$path" | $GREP " "`
22636    if test "x$has_space" != x; then
22637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22638$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22639      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22640    fi
22641
22642    # Use eval to expand a potential ~
22643    eval path="$path"
22644    if test ! -f "$path" && test ! -d "$path"; then
22645      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22646    fi
22647
22648    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22649  fi
22650
22651              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22652$as_echo_n "checking for Boot JDK... " >&6; }
22653              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22654$as_echo "$BOOT_JDK" >&6; }
22655              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22656$as_echo_n "checking Boot JDK version... " >&6; }
22657              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22658              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22659$as_echo "$BOOT_JDK_VERSION" >&6; }
22660            fi # end check jdk version
22661          fi # end check rt.jar
22662        fi # end check javac
22663      fi # end check java
22664    fi # end check boot jdk found
22665  fi
22666
22667
22668  if test "x$BOOT_JDK_FOUND" = xno; then
22669    # Now execute the test
22670
22671  if test "x$PROGRAMW6432" != x; then
22672    VIRTUAL_DIR="$PROGRAMW6432/Java"
22673
22674  windows_path="$VIRTUAL_DIR"
22675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22676    unix_path=`$CYGPATH -u "$windows_path"`
22677    VIRTUAL_DIR="$unix_path"
22678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22680    VIRTUAL_DIR="$unix_path"
22681  fi
22682
22683
22684  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22685  BOOT_JDK_SUFFIX=""
22686  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22687  if test "x$ALL_JDKS_FOUND" != x; then
22688    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22689
22690  if test "x$BOOT_JDK_FOUND" = xno; then
22691    # Now execute the test
22692
22693        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22694        if test -d "$BOOT_JDK"; then
22695          BOOT_JDK_FOUND=maybe
22696          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22697$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22698        fi
22699
22700
22701    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22702    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22703      # Do we have a bin/java?
22704      if test ! -x "$BOOT_JDK/bin/java"; then
22705        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22706$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22707        BOOT_JDK_FOUND=no
22708      else
22709        # Do we have a bin/javac?
22710        if test ! -x "$BOOT_JDK/bin/javac"; then
22711          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22712$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22713          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22714$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22715          BOOT_JDK_FOUND=no
22716        else
22717          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22718          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22719            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22720$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22721            BOOT_JDK_FOUND=no
22722          else
22723            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22724            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22725
22726            # Extra M4 quote needed to protect [] in grep expression.
22727            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22728            if test "x$FOUND_CORRECT_VERSION" = x; then
22729              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22730$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22731              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22732$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22733              BOOT_JDK_FOUND=no
22734            else
22735              # We're done! :-)
22736              BOOT_JDK_FOUND=yes
22737
22738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22739
22740  # Input might be given as Windows format, start by converting to
22741  # unix format.
22742  path="$BOOT_JDK"
22743  new_path=`$CYGPATH -u "$path"`
22744
22745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22748  # "foo.exe" is OK but "foo" is an error.
22749  #
22750  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22751  # It is also a way to make sure we got the proper file name for the real test later on.
22752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22753  if test "x$test_shortpath" = x; then
22754    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22755$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22756    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22757  fi
22758
22759  # Call helper function which possibly converts this using DOS-style short mode.
22760  # If so, the updated path is stored in $new_path.
22761
22762  input_path="$new_path"
22763  # Check if we need to convert this using DOS-style short mode. If the path
22764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22765  # take no chances and rewrite it.
22766  # Note: m4 eats our [], so we need to use [ and ] instead.
22767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22768  if test "x$has_forbidden_chars" != x; then
22769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22773      # Going to short mode and back again did indeed matter. Since short mode is
22774      # case insensitive, let's make it lowercase to improve readability.
22775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22776      # Now convert it back to Unix-stile (cygpath)
22777      input_path=`$CYGPATH -u "$shortmode_path"`
22778      new_path="$input_path"
22779    fi
22780  fi
22781
22782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22783  if test "x$test_cygdrive_prefix" = x; then
22784    # As a simple fix, exclude /usr/bin since it's not a real path.
22785    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22787      # a path prefixed by /cygdrive for fixpath to work.
22788      new_path="$CYGWIN_ROOT_PATH$input_path"
22789    fi
22790  fi
22791
22792
22793  if test "x$path" != "x$new_path"; then
22794    BOOT_JDK="$new_path"
22795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22796$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22797  fi
22798
22799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22800
22801  path="$BOOT_JDK"
22802  has_colon=`$ECHO $path | $GREP ^.:`
22803  new_path="$path"
22804  if test "x$has_colon" = x; then
22805    # Not in mixed or Windows style, start by that.
22806    new_path=`cmd //c echo $path`
22807  fi
22808
22809
22810  input_path="$new_path"
22811  # Check if we need to convert this using DOS-style short mode. If the path
22812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22813  # take no chances and rewrite it.
22814  # Note: m4 eats our [], so we need to use [ and ] instead.
22815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22816  if test "x$has_forbidden_chars" != x; then
22817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22818    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22819  fi
22820
22821
22822  windows_path="$new_path"
22823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22824    unix_path=`$CYGPATH -u "$windows_path"`
22825    new_path="$unix_path"
22826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22828    new_path="$unix_path"
22829  fi
22830
22831  if test "x$path" != "x$new_path"; then
22832    BOOT_JDK="$new_path"
22833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22834$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22835  fi
22836
22837  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22838  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22839
22840  else
22841    # We're on a unix platform. Hooray! :)
22842    path="$BOOT_JDK"
22843    has_space=`$ECHO "$path" | $GREP " "`
22844    if test "x$has_space" != x; then
22845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22846$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22847      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22848    fi
22849
22850    # Use eval to expand a potential ~
22851    eval path="$path"
22852    if test ! -f "$path" && test ! -d "$path"; then
22853      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22854    fi
22855
22856    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22857  fi
22858
22859              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22860$as_echo_n "checking for Boot JDK... " >&6; }
22861              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22862$as_echo "$BOOT_JDK" >&6; }
22863              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22864$as_echo_n "checking Boot JDK version... " >&6; }
22865              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22866              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22867$as_echo "$BOOT_JDK_VERSION" >&6; }
22868            fi # end check jdk version
22869          fi # end check rt.jar
22870        fi # end check javac
22871      fi # end check java
22872    fi # end check boot jdk found
22873  fi
22874
22875    done
22876  fi
22877
22878  fi
22879
22880
22881    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22882    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22883      # Do we have a bin/java?
22884      if test ! -x "$BOOT_JDK/bin/java"; then
22885        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22886$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22887        BOOT_JDK_FOUND=no
22888      else
22889        # Do we have a bin/javac?
22890        if test ! -x "$BOOT_JDK/bin/javac"; then
22891          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22893          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22894$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22895          BOOT_JDK_FOUND=no
22896        else
22897          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22898          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22899            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22900$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22901            BOOT_JDK_FOUND=no
22902          else
22903            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22904            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22905
22906            # Extra M4 quote needed to protect [] in grep expression.
22907            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22908            if test "x$FOUND_CORRECT_VERSION" = x; then
22909              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22910$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22911              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22912$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22913              BOOT_JDK_FOUND=no
22914            else
22915              # We're done! :-)
22916              BOOT_JDK_FOUND=yes
22917
22918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22919
22920  # Input might be given as Windows format, start by converting to
22921  # unix format.
22922  path="$BOOT_JDK"
22923  new_path=`$CYGPATH -u "$path"`
22924
22925  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22926  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22927  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22928  # "foo.exe" is OK but "foo" is an error.
22929  #
22930  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22931  # It is also a way to make sure we got the proper file name for the real test later on.
22932  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22933  if test "x$test_shortpath" = x; then
22934    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22935$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22936    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22937  fi
22938
22939  # Call helper function which possibly converts this using DOS-style short mode.
22940  # If so, the updated path is stored in $new_path.
22941
22942  input_path="$new_path"
22943  # Check if we need to convert this using DOS-style short mode. If the path
22944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22945  # take no chances and rewrite it.
22946  # Note: m4 eats our [], so we need to use [ and ] instead.
22947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22948  if test "x$has_forbidden_chars" != x; then
22949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22950    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22951    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22952    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22953      # Going to short mode and back again did indeed matter. Since short mode is
22954      # case insensitive, let's make it lowercase to improve readability.
22955      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22956      # Now convert it back to Unix-stile (cygpath)
22957      input_path=`$CYGPATH -u "$shortmode_path"`
22958      new_path="$input_path"
22959    fi
22960  fi
22961
22962  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22963  if test "x$test_cygdrive_prefix" = x; then
22964    # As a simple fix, exclude /usr/bin since it's not a real path.
22965    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22966      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22967      # a path prefixed by /cygdrive for fixpath to work.
22968      new_path="$CYGWIN_ROOT_PATH$input_path"
22969    fi
22970  fi
22971
22972
22973  if test "x$path" != "x$new_path"; then
22974    BOOT_JDK="$new_path"
22975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22976$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22977  fi
22978
22979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22980
22981  path="$BOOT_JDK"
22982  has_colon=`$ECHO $path | $GREP ^.:`
22983  new_path="$path"
22984  if test "x$has_colon" = x; then
22985    # Not in mixed or Windows style, start by that.
22986    new_path=`cmd //c echo $path`
22987  fi
22988
22989
22990  input_path="$new_path"
22991  # Check if we need to convert this using DOS-style short mode. If the path
22992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22993  # take no chances and rewrite it.
22994  # Note: m4 eats our [], so we need to use [ and ] instead.
22995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22996  if test "x$has_forbidden_chars" != x; then
22997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22998    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22999  fi
23000
23001
23002  windows_path="$new_path"
23003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23004    unix_path=`$CYGPATH -u "$windows_path"`
23005    new_path="$unix_path"
23006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23008    new_path="$unix_path"
23009  fi
23010
23011  if test "x$path" != "x$new_path"; then
23012    BOOT_JDK="$new_path"
23013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23014$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23015  fi
23016
23017  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23018  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23019
23020  else
23021    # We're on a unix platform. Hooray! :)
23022    path="$BOOT_JDK"
23023    has_space=`$ECHO "$path" | $GREP " "`
23024    if test "x$has_space" != x; then
23025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23026$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23027      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23028    fi
23029
23030    # Use eval to expand a potential ~
23031    eval path="$path"
23032    if test ! -f "$path" && test ! -d "$path"; then
23033      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23034    fi
23035
23036    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23037  fi
23038
23039              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23040$as_echo_n "checking for Boot JDK... " >&6; }
23041              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23042$as_echo "$BOOT_JDK" >&6; }
23043              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23044$as_echo_n "checking Boot JDK version... " >&6; }
23045              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23046              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23047$as_echo "$BOOT_JDK_VERSION" >&6; }
23048            fi # end check jdk version
23049          fi # end check rt.jar
23050        fi # end check javac
23051      fi # end check java
23052    fi # end check boot jdk found
23053  fi
23054
23055
23056  if test "x$BOOT_JDK_FOUND" = xno; then
23057    # Now execute the test
23058
23059  if test "x$PROGRAMFILES" != x; then
23060    VIRTUAL_DIR="$PROGRAMFILES/Java"
23061
23062  windows_path="$VIRTUAL_DIR"
23063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23064    unix_path=`$CYGPATH -u "$windows_path"`
23065    VIRTUAL_DIR="$unix_path"
23066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23068    VIRTUAL_DIR="$unix_path"
23069  fi
23070
23071
23072  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23073  BOOT_JDK_SUFFIX=""
23074  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23075  if test "x$ALL_JDKS_FOUND" != x; then
23076    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23077
23078  if test "x$BOOT_JDK_FOUND" = xno; then
23079    # Now execute the test
23080
23081        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23082        if test -d "$BOOT_JDK"; then
23083          BOOT_JDK_FOUND=maybe
23084          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23085$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23086        fi
23087
23088
23089    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23090    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23091      # Do we have a bin/java?
23092      if test ! -x "$BOOT_JDK/bin/java"; then
23093        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23094$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23095        BOOT_JDK_FOUND=no
23096      else
23097        # Do we have a bin/javac?
23098        if test ! -x "$BOOT_JDK/bin/javac"; then
23099          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23100$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23101          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23102$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23103          BOOT_JDK_FOUND=no
23104        else
23105          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23106          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23107            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23108$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23109            BOOT_JDK_FOUND=no
23110          else
23111            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23112            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23113
23114            # Extra M4 quote needed to protect [] in grep expression.
23115            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23116            if test "x$FOUND_CORRECT_VERSION" = x; then
23117              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23118$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23119              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23120$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23121              BOOT_JDK_FOUND=no
23122            else
23123              # We're done! :-)
23124              BOOT_JDK_FOUND=yes
23125
23126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23127
23128  # Input might be given as Windows format, start by converting to
23129  # unix format.
23130  path="$BOOT_JDK"
23131  new_path=`$CYGPATH -u "$path"`
23132
23133  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23134  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23135  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23136  # "foo.exe" is OK but "foo" is an error.
23137  #
23138  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23139  # It is also a way to make sure we got the proper file name for the real test later on.
23140  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23141  if test "x$test_shortpath" = x; then
23142    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23143$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23144    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23145  fi
23146
23147  # Call helper function which possibly converts this using DOS-style short mode.
23148  # If so, the updated path is stored in $new_path.
23149
23150  input_path="$new_path"
23151  # Check if we need to convert this using DOS-style short mode. If the path
23152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23153  # take no chances and rewrite it.
23154  # Note: m4 eats our [], so we need to use [ and ] instead.
23155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23156  if test "x$has_forbidden_chars" != x; then
23157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23158    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23159    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23160    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23161      # Going to short mode and back again did indeed matter. Since short mode is
23162      # case insensitive, let's make it lowercase to improve readability.
23163      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23164      # Now convert it back to Unix-stile (cygpath)
23165      input_path=`$CYGPATH -u "$shortmode_path"`
23166      new_path="$input_path"
23167    fi
23168  fi
23169
23170  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23171  if test "x$test_cygdrive_prefix" = x; then
23172    # As a simple fix, exclude /usr/bin since it's not a real path.
23173    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23174      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23175      # a path prefixed by /cygdrive for fixpath to work.
23176      new_path="$CYGWIN_ROOT_PATH$input_path"
23177    fi
23178  fi
23179
23180
23181  if test "x$path" != "x$new_path"; then
23182    BOOT_JDK="$new_path"
23183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23184$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23185  fi
23186
23187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23188
23189  path="$BOOT_JDK"
23190  has_colon=`$ECHO $path | $GREP ^.:`
23191  new_path="$path"
23192  if test "x$has_colon" = x; then
23193    # Not in mixed or Windows style, start by that.
23194    new_path=`cmd //c echo $path`
23195  fi
23196
23197
23198  input_path="$new_path"
23199  # Check if we need to convert this using DOS-style short mode. If the path
23200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23201  # take no chances and rewrite it.
23202  # Note: m4 eats our [], so we need to use [ and ] instead.
23203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23204  if test "x$has_forbidden_chars" != x; then
23205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23207  fi
23208
23209
23210  windows_path="$new_path"
23211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23212    unix_path=`$CYGPATH -u "$windows_path"`
23213    new_path="$unix_path"
23214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23216    new_path="$unix_path"
23217  fi
23218
23219  if test "x$path" != "x$new_path"; then
23220    BOOT_JDK="$new_path"
23221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23222$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23223  fi
23224
23225  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23226  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23227
23228  else
23229    # We're on a unix platform. Hooray! :)
23230    path="$BOOT_JDK"
23231    has_space=`$ECHO "$path" | $GREP " "`
23232    if test "x$has_space" != x; then
23233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23234$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23235      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23236    fi
23237
23238    # Use eval to expand a potential ~
23239    eval path="$path"
23240    if test ! -f "$path" && test ! -d "$path"; then
23241      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23242    fi
23243
23244    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23245  fi
23246
23247              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23248$as_echo_n "checking for Boot JDK... " >&6; }
23249              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23250$as_echo "$BOOT_JDK" >&6; }
23251              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23252$as_echo_n "checking Boot JDK version... " >&6; }
23253              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23254              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23255$as_echo "$BOOT_JDK_VERSION" >&6; }
23256            fi # end check jdk version
23257          fi # end check rt.jar
23258        fi # end check javac
23259      fi # end check java
23260    fi # end check boot jdk found
23261  fi
23262
23263    done
23264  fi
23265
23266  fi
23267
23268
23269    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23270    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23271      # Do we have a bin/java?
23272      if test ! -x "$BOOT_JDK/bin/java"; then
23273        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23274$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23275        BOOT_JDK_FOUND=no
23276      else
23277        # Do we have a bin/javac?
23278        if test ! -x "$BOOT_JDK/bin/javac"; then
23279          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23280$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23281          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23282$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23283          BOOT_JDK_FOUND=no
23284        else
23285          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23286          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23287            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23288$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23289            BOOT_JDK_FOUND=no
23290          else
23291            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23292            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23293
23294            # Extra M4 quote needed to protect [] in grep expression.
23295            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23296            if test "x$FOUND_CORRECT_VERSION" = x; then
23297              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23298$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23299              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23300$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23301              BOOT_JDK_FOUND=no
23302            else
23303              # We're done! :-)
23304              BOOT_JDK_FOUND=yes
23305
23306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23307
23308  # Input might be given as Windows format, start by converting to
23309  # unix format.
23310  path="$BOOT_JDK"
23311  new_path=`$CYGPATH -u "$path"`
23312
23313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23316  # "foo.exe" is OK but "foo" is an error.
23317  #
23318  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23319  # It is also a way to make sure we got the proper file name for the real test later on.
23320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23321  if test "x$test_shortpath" = x; then
23322    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23323$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23324    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23325  fi
23326
23327  # Call helper function which possibly converts this using DOS-style short mode.
23328  # If so, the updated path is stored in $new_path.
23329
23330  input_path="$new_path"
23331  # Check if we need to convert this using DOS-style short mode. If the path
23332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23333  # take no chances and rewrite it.
23334  # Note: m4 eats our [], so we need to use [ and ] instead.
23335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23336  if test "x$has_forbidden_chars" != x; then
23337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23338    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23339    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23340    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23341      # Going to short mode and back again did indeed matter. Since short mode is
23342      # case insensitive, let's make it lowercase to improve readability.
23343      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23344      # Now convert it back to Unix-stile (cygpath)
23345      input_path=`$CYGPATH -u "$shortmode_path"`
23346      new_path="$input_path"
23347    fi
23348  fi
23349
23350  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23351  if test "x$test_cygdrive_prefix" = x; then
23352    # As a simple fix, exclude /usr/bin since it's not a real path.
23353    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23354      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23355      # a path prefixed by /cygdrive for fixpath to work.
23356      new_path="$CYGWIN_ROOT_PATH$input_path"
23357    fi
23358  fi
23359
23360
23361  if test "x$path" != "x$new_path"; then
23362    BOOT_JDK="$new_path"
23363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23364$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23365  fi
23366
23367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23368
23369  path="$BOOT_JDK"
23370  has_colon=`$ECHO $path | $GREP ^.:`
23371  new_path="$path"
23372  if test "x$has_colon" = x; then
23373    # Not in mixed or Windows style, start by that.
23374    new_path=`cmd //c echo $path`
23375  fi
23376
23377
23378  input_path="$new_path"
23379  # Check if we need to convert this using DOS-style short mode. If the path
23380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23381  # take no chances and rewrite it.
23382  # Note: m4 eats our [], so we need to use [ and ] instead.
23383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23384  if test "x$has_forbidden_chars" != x; then
23385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23387  fi
23388
23389
23390  windows_path="$new_path"
23391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23392    unix_path=`$CYGPATH -u "$windows_path"`
23393    new_path="$unix_path"
23394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23396    new_path="$unix_path"
23397  fi
23398
23399  if test "x$path" != "x$new_path"; then
23400    BOOT_JDK="$new_path"
23401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23402$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23403  fi
23404
23405  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23406  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23407
23408  else
23409    # We're on a unix platform. Hooray! :)
23410    path="$BOOT_JDK"
23411    has_space=`$ECHO "$path" | $GREP " "`
23412    if test "x$has_space" != x; then
23413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23414$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23415      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23416    fi
23417
23418    # Use eval to expand a potential ~
23419    eval path="$path"
23420    if test ! -f "$path" && test ! -d "$path"; then
23421      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23422    fi
23423
23424    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23425  fi
23426
23427              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23428$as_echo_n "checking for Boot JDK... " >&6; }
23429              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23430$as_echo "$BOOT_JDK" >&6; }
23431              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23432$as_echo_n "checking Boot JDK version... " >&6; }
23433              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23434              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23435$as_echo "$BOOT_JDK_VERSION" >&6; }
23436            fi # end check jdk version
23437          fi # end check rt.jar
23438        fi # end check javac
23439      fi # end check java
23440    fi # end check boot jdk found
23441  fi
23442
23443
23444  if test "x$BOOT_JDK_FOUND" = xno; then
23445    # Now execute the test
23446
23447  if test "x$ProgramFiles" != x; then
23448    VIRTUAL_DIR="$ProgramFiles/Java"
23449
23450  windows_path="$VIRTUAL_DIR"
23451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23452    unix_path=`$CYGPATH -u "$windows_path"`
23453    VIRTUAL_DIR="$unix_path"
23454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23456    VIRTUAL_DIR="$unix_path"
23457  fi
23458
23459
23460  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23461  BOOT_JDK_SUFFIX=""
23462  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23463  if test "x$ALL_JDKS_FOUND" != x; then
23464    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23465
23466  if test "x$BOOT_JDK_FOUND" = xno; then
23467    # Now execute the test
23468
23469        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23470        if test -d "$BOOT_JDK"; then
23471          BOOT_JDK_FOUND=maybe
23472          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23473$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23474        fi
23475
23476
23477    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23478    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23479      # Do we have a bin/java?
23480      if test ! -x "$BOOT_JDK/bin/java"; then
23481        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23482$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23483        BOOT_JDK_FOUND=no
23484      else
23485        # Do we have a bin/javac?
23486        if test ! -x "$BOOT_JDK/bin/javac"; then
23487          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23488$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23489          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23490$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23491          BOOT_JDK_FOUND=no
23492        else
23493          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23494          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23495            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23496$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23497            BOOT_JDK_FOUND=no
23498          else
23499            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23500            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23501
23502            # Extra M4 quote needed to protect [] in grep expression.
23503            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23504            if test "x$FOUND_CORRECT_VERSION" = x; then
23505              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23506$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23507              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23508$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23509              BOOT_JDK_FOUND=no
23510            else
23511              # We're done! :-)
23512              BOOT_JDK_FOUND=yes
23513
23514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23515
23516  # Input might be given as Windows format, start by converting to
23517  # unix format.
23518  path="$BOOT_JDK"
23519  new_path=`$CYGPATH -u "$path"`
23520
23521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23524  # "foo.exe" is OK but "foo" is an error.
23525  #
23526  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23527  # It is also a way to make sure we got the proper file name for the real test later on.
23528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23529  if test "x$test_shortpath" = x; then
23530    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23531$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23532    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23533  fi
23534
23535  # Call helper function which possibly converts this using DOS-style short mode.
23536  # If so, the updated path is stored in $new_path.
23537
23538  input_path="$new_path"
23539  # Check if we need to convert this using DOS-style short mode. If the path
23540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23541  # take no chances and rewrite it.
23542  # Note: m4 eats our [], so we need to use [ and ] instead.
23543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23544  if test "x$has_forbidden_chars" != x; then
23545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23549      # Going to short mode and back again did indeed matter. Since short mode is
23550      # case insensitive, let's make it lowercase to improve readability.
23551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23552      # Now convert it back to Unix-stile (cygpath)
23553      input_path=`$CYGPATH -u "$shortmode_path"`
23554      new_path="$input_path"
23555    fi
23556  fi
23557
23558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23559  if test "x$test_cygdrive_prefix" = x; then
23560    # As a simple fix, exclude /usr/bin since it's not a real path.
23561    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23563      # a path prefixed by /cygdrive for fixpath to work.
23564      new_path="$CYGWIN_ROOT_PATH$input_path"
23565    fi
23566  fi
23567
23568
23569  if test "x$path" != "x$new_path"; then
23570    BOOT_JDK="$new_path"
23571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23572$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23573  fi
23574
23575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23576
23577  path="$BOOT_JDK"
23578  has_colon=`$ECHO $path | $GREP ^.:`
23579  new_path="$path"
23580  if test "x$has_colon" = x; then
23581    # Not in mixed or Windows style, start by that.
23582    new_path=`cmd //c echo $path`
23583  fi
23584
23585
23586  input_path="$new_path"
23587  # Check if we need to convert this using DOS-style short mode. If the path
23588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23589  # take no chances and rewrite it.
23590  # Note: m4 eats our [], so we need to use [ and ] instead.
23591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23592  if test "x$has_forbidden_chars" != x; then
23593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23594    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23595  fi
23596
23597
23598  windows_path="$new_path"
23599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23600    unix_path=`$CYGPATH -u "$windows_path"`
23601    new_path="$unix_path"
23602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23604    new_path="$unix_path"
23605  fi
23606
23607  if test "x$path" != "x$new_path"; then
23608    BOOT_JDK="$new_path"
23609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23610$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23611  fi
23612
23613  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23614  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23615
23616  else
23617    # We're on a unix platform. Hooray! :)
23618    path="$BOOT_JDK"
23619    has_space=`$ECHO "$path" | $GREP " "`
23620    if test "x$has_space" != x; then
23621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23622$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23623      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23624    fi
23625
23626    # Use eval to expand a potential ~
23627    eval path="$path"
23628    if test ! -f "$path" && test ! -d "$path"; then
23629      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23630    fi
23631
23632    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23633  fi
23634
23635              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23636$as_echo_n "checking for Boot JDK... " >&6; }
23637              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23638$as_echo "$BOOT_JDK" >&6; }
23639              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23640$as_echo_n "checking Boot JDK version... " >&6; }
23641              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23642              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23643$as_echo "$BOOT_JDK_VERSION" >&6; }
23644            fi # end check jdk version
23645          fi # end check rt.jar
23646        fi # end check javac
23647      fi # end check java
23648    fi # end check boot jdk found
23649  fi
23650
23651    done
23652  fi
23653
23654  fi
23655
23656
23657    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23658    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23659      # Do we have a bin/java?
23660      if test ! -x "$BOOT_JDK/bin/java"; then
23661        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23662$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23663        BOOT_JDK_FOUND=no
23664      else
23665        # Do we have a bin/javac?
23666        if test ! -x "$BOOT_JDK/bin/javac"; then
23667          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23668$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23669          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23670$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23671          BOOT_JDK_FOUND=no
23672        else
23673          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23674          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23675            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23676$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23677            BOOT_JDK_FOUND=no
23678          else
23679            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23680            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23681
23682            # Extra M4 quote needed to protect [] in grep expression.
23683            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23684            if test "x$FOUND_CORRECT_VERSION" = x; then
23685              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23686$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23687              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23688$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23689              BOOT_JDK_FOUND=no
23690            else
23691              # We're done! :-)
23692              BOOT_JDK_FOUND=yes
23693
23694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23695
23696  # Input might be given as Windows format, start by converting to
23697  # unix format.
23698  path="$BOOT_JDK"
23699  new_path=`$CYGPATH -u "$path"`
23700
23701  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23702  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23703  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23704  # "foo.exe" is OK but "foo" is an error.
23705  #
23706  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23707  # It is also a way to make sure we got the proper file name for the real test later on.
23708  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23709  if test "x$test_shortpath" = x; then
23710    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23711$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23712    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23713  fi
23714
23715  # Call helper function which possibly converts this using DOS-style short mode.
23716  # If so, the updated path is stored in $new_path.
23717
23718  input_path="$new_path"
23719  # Check if we need to convert this using DOS-style short mode. If the path
23720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23721  # take no chances and rewrite it.
23722  # Note: m4 eats our [], so we need to use [ and ] instead.
23723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23724  if test "x$has_forbidden_chars" != x; then
23725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23726    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23727    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23728    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23729      # Going to short mode and back again did indeed matter. Since short mode is
23730      # case insensitive, let's make it lowercase to improve readability.
23731      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23732      # Now convert it back to Unix-stile (cygpath)
23733      input_path=`$CYGPATH -u "$shortmode_path"`
23734      new_path="$input_path"
23735    fi
23736  fi
23737
23738  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23739  if test "x$test_cygdrive_prefix" = x; then
23740    # As a simple fix, exclude /usr/bin since it's not a real path.
23741    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23742      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23743      # a path prefixed by /cygdrive for fixpath to work.
23744      new_path="$CYGWIN_ROOT_PATH$input_path"
23745    fi
23746  fi
23747
23748
23749  if test "x$path" != "x$new_path"; then
23750    BOOT_JDK="$new_path"
23751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23752$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23753  fi
23754
23755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23756
23757  path="$BOOT_JDK"
23758  has_colon=`$ECHO $path | $GREP ^.:`
23759  new_path="$path"
23760  if test "x$has_colon" = x; then
23761    # Not in mixed or Windows style, start by that.
23762    new_path=`cmd //c echo $path`
23763  fi
23764
23765
23766  input_path="$new_path"
23767  # Check if we need to convert this using DOS-style short mode. If the path
23768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23769  # take no chances and rewrite it.
23770  # Note: m4 eats our [], so we need to use [ and ] instead.
23771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23772  if test "x$has_forbidden_chars" != x; then
23773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23774    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23775  fi
23776
23777
23778  windows_path="$new_path"
23779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23780    unix_path=`$CYGPATH -u "$windows_path"`
23781    new_path="$unix_path"
23782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23784    new_path="$unix_path"
23785  fi
23786
23787  if test "x$path" != "x$new_path"; then
23788    BOOT_JDK="$new_path"
23789    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23790$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23791  fi
23792
23793  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23794  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23795
23796  else
23797    # We're on a unix platform. Hooray! :)
23798    path="$BOOT_JDK"
23799    has_space=`$ECHO "$path" | $GREP " "`
23800    if test "x$has_space" != x; then
23801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23802$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23803      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23804    fi
23805
23806    # Use eval to expand a potential ~
23807    eval path="$path"
23808    if test ! -f "$path" && test ! -d "$path"; then
23809      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23810    fi
23811
23812    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23813  fi
23814
23815              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23816$as_echo_n "checking for Boot JDK... " >&6; }
23817              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23818$as_echo "$BOOT_JDK" >&6; }
23819              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23820$as_echo_n "checking Boot JDK version... " >&6; }
23821              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23822              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23823$as_echo "$BOOT_JDK_VERSION" >&6; }
23824            fi # end check jdk version
23825          fi # end check rt.jar
23826        fi # end check javac
23827      fi # end check java
23828    fi # end check boot jdk found
23829  fi
23830
23831
23832  if test "x$BOOT_JDK_FOUND" = xno; then
23833    # Now execute the test
23834
23835  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23836  BOOT_JDK_SUFFIX=""
23837  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23838  if test "x$ALL_JDKS_FOUND" != x; then
23839    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23840
23841  if test "x$BOOT_JDK_FOUND" = xno; then
23842    # Now execute the test
23843
23844        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23845        if test -d "$BOOT_JDK"; then
23846          BOOT_JDK_FOUND=maybe
23847          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23848$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23849        fi
23850
23851
23852    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23853    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23854      # Do we have a bin/java?
23855      if test ! -x "$BOOT_JDK/bin/java"; then
23856        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23857$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23858        BOOT_JDK_FOUND=no
23859      else
23860        # Do we have a bin/javac?
23861        if test ! -x "$BOOT_JDK/bin/javac"; then
23862          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23863$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23864          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23865$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23866          BOOT_JDK_FOUND=no
23867        else
23868          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23869          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23870            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23871$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23872            BOOT_JDK_FOUND=no
23873          else
23874            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23875            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23876
23877            # Extra M4 quote needed to protect [] in grep expression.
23878            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23879            if test "x$FOUND_CORRECT_VERSION" = x; then
23880              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23882              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23883$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23884              BOOT_JDK_FOUND=no
23885            else
23886              # We're done! :-)
23887              BOOT_JDK_FOUND=yes
23888
23889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23890
23891  # Input might be given as Windows format, start by converting to
23892  # unix format.
23893  path="$BOOT_JDK"
23894  new_path=`$CYGPATH -u "$path"`
23895
23896  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23897  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23898  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23899  # "foo.exe" is OK but "foo" is an error.
23900  #
23901  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23902  # It is also a way to make sure we got the proper file name for the real test later on.
23903  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23904  if test "x$test_shortpath" = x; then
23905    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23906$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23907    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23908  fi
23909
23910  # Call helper function which possibly converts this using DOS-style short mode.
23911  # If so, the updated path is stored in $new_path.
23912
23913  input_path="$new_path"
23914  # Check if we need to convert this using DOS-style short mode. If the path
23915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23916  # take no chances and rewrite it.
23917  # Note: m4 eats our [], so we need to use [ and ] instead.
23918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23919  if test "x$has_forbidden_chars" != x; then
23920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23921    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23922    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23923    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23924      # Going to short mode and back again did indeed matter. Since short mode is
23925      # case insensitive, let's make it lowercase to improve readability.
23926      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23927      # Now convert it back to Unix-stile (cygpath)
23928      input_path=`$CYGPATH -u "$shortmode_path"`
23929      new_path="$input_path"
23930    fi
23931  fi
23932
23933  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23934  if test "x$test_cygdrive_prefix" = x; then
23935    # As a simple fix, exclude /usr/bin since it's not a real path.
23936    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23937      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23938      # a path prefixed by /cygdrive for fixpath to work.
23939      new_path="$CYGWIN_ROOT_PATH$input_path"
23940    fi
23941  fi
23942
23943
23944  if test "x$path" != "x$new_path"; then
23945    BOOT_JDK="$new_path"
23946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23947$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23948  fi
23949
23950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23951
23952  path="$BOOT_JDK"
23953  has_colon=`$ECHO $path | $GREP ^.:`
23954  new_path="$path"
23955  if test "x$has_colon" = x; then
23956    # Not in mixed or Windows style, start by that.
23957    new_path=`cmd //c echo $path`
23958  fi
23959
23960
23961  input_path="$new_path"
23962  # Check if we need to convert this using DOS-style short mode. If the path
23963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23964  # take no chances and rewrite it.
23965  # Note: m4 eats our [], so we need to use [ and ] instead.
23966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23967  if test "x$has_forbidden_chars" != x; then
23968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23969    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23970  fi
23971
23972
23973  windows_path="$new_path"
23974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23975    unix_path=`$CYGPATH -u "$windows_path"`
23976    new_path="$unix_path"
23977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23979    new_path="$unix_path"
23980  fi
23981
23982  if test "x$path" != "x$new_path"; then
23983    BOOT_JDK="$new_path"
23984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23985$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23986  fi
23987
23988  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23989  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23990
23991  else
23992    # We're on a unix platform. Hooray! :)
23993    path="$BOOT_JDK"
23994    has_space=`$ECHO "$path" | $GREP " "`
23995    if test "x$has_space" != x; then
23996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23997$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23998      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23999    fi
24000
24001    # Use eval to expand a potential ~
24002    eval path="$path"
24003    if test ! -f "$path" && test ! -d "$path"; then
24004      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24005    fi
24006
24007    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24008  fi
24009
24010              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24011$as_echo_n "checking for Boot JDK... " >&6; }
24012              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24013$as_echo "$BOOT_JDK" >&6; }
24014              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24015$as_echo_n "checking Boot JDK version... " >&6; }
24016              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24017              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24018$as_echo "$BOOT_JDK_VERSION" >&6; }
24019            fi # end check jdk version
24020          fi # end check rt.jar
24021        fi # end check javac
24022      fi # end check java
24023    fi # end check boot jdk found
24024  fi
24025
24026    done
24027  fi
24028
24029
24030    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24031    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24032      # Do we have a bin/java?
24033      if test ! -x "$BOOT_JDK/bin/java"; then
24034        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24035$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24036        BOOT_JDK_FOUND=no
24037      else
24038        # Do we have a bin/javac?
24039        if test ! -x "$BOOT_JDK/bin/javac"; then
24040          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24041$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24042          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24043$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24044          BOOT_JDK_FOUND=no
24045        else
24046          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24047          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24048            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24049$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24050            BOOT_JDK_FOUND=no
24051          else
24052            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24053            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24054
24055            # Extra M4 quote needed to protect [] in grep expression.
24056            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24057            if test "x$FOUND_CORRECT_VERSION" = x; then
24058              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24059$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24060              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24061$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24062              BOOT_JDK_FOUND=no
24063            else
24064              # We're done! :-)
24065              BOOT_JDK_FOUND=yes
24066
24067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24068
24069  # Input might be given as Windows format, start by converting to
24070  # unix format.
24071  path="$BOOT_JDK"
24072  new_path=`$CYGPATH -u "$path"`
24073
24074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24077  # "foo.exe" is OK but "foo" is an error.
24078  #
24079  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24080  # It is also a way to make sure we got the proper file name for the real test later on.
24081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24082  if test "x$test_shortpath" = x; then
24083    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24084$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24085    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24086  fi
24087
24088  # Call helper function which possibly converts this using DOS-style short mode.
24089  # If so, the updated path is stored in $new_path.
24090
24091  input_path="$new_path"
24092  # Check if we need to convert this using DOS-style short mode. If the path
24093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24094  # take no chances and rewrite it.
24095  # Note: m4 eats our [], so we need to use [ and ] instead.
24096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24097  if test "x$has_forbidden_chars" != x; then
24098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24102      # Going to short mode and back again did indeed matter. Since short mode is
24103      # case insensitive, let's make it lowercase to improve readability.
24104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24105      # Now convert it back to Unix-stile (cygpath)
24106      input_path=`$CYGPATH -u "$shortmode_path"`
24107      new_path="$input_path"
24108    fi
24109  fi
24110
24111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24112  if test "x$test_cygdrive_prefix" = x; then
24113    # As a simple fix, exclude /usr/bin since it's not a real path.
24114    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24116      # a path prefixed by /cygdrive for fixpath to work.
24117      new_path="$CYGWIN_ROOT_PATH$input_path"
24118    fi
24119  fi
24120
24121
24122  if test "x$path" != "x$new_path"; then
24123    BOOT_JDK="$new_path"
24124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24125$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24126  fi
24127
24128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24129
24130  path="$BOOT_JDK"
24131  has_colon=`$ECHO $path | $GREP ^.:`
24132  new_path="$path"
24133  if test "x$has_colon" = x; then
24134    # Not in mixed or Windows style, start by that.
24135    new_path=`cmd //c echo $path`
24136  fi
24137
24138
24139  input_path="$new_path"
24140  # Check if we need to convert this using DOS-style short mode. If the path
24141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24142  # take no chances and rewrite it.
24143  # Note: m4 eats our [], so we need to use [ and ] instead.
24144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24145  if test "x$has_forbidden_chars" != x; then
24146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24147    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24148  fi
24149
24150
24151  windows_path="$new_path"
24152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24153    unix_path=`$CYGPATH -u "$windows_path"`
24154    new_path="$unix_path"
24155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24157    new_path="$unix_path"
24158  fi
24159
24160  if test "x$path" != "x$new_path"; then
24161    BOOT_JDK="$new_path"
24162    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24163$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24164  fi
24165
24166  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24167  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24168
24169  else
24170    # We're on a unix platform. Hooray! :)
24171    path="$BOOT_JDK"
24172    has_space=`$ECHO "$path" | $GREP " "`
24173    if test "x$has_space" != x; then
24174      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24175$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24176      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24177    fi
24178
24179    # Use eval to expand a potential ~
24180    eval path="$path"
24181    if test ! -f "$path" && test ! -d "$path"; then
24182      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24183    fi
24184
24185    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24186  fi
24187
24188              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24189$as_echo_n "checking for Boot JDK... " >&6; }
24190              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24191$as_echo "$BOOT_JDK" >&6; }
24192              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24193$as_echo_n "checking Boot JDK version... " >&6; }
24194              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24195              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24196$as_echo "$BOOT_JDK_VERSION" >&6; }
24197            fi # end check jdk version
24198          fi # end check rt.jar
24199        fi # end check javac
24200      fi # end check java
24201    fi # end check boot jdk found
24202  fi
24203
24204  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24205
24206  if test "x$BOOT_JDK_FOUND" = xno; then
24207    # Now execute the test
24208
24209  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24210  BOOT_JDK_SUFFIX="/Contents/Home"
24211  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24212  if test "x$ALL_JDKS_FOUND" != x; then
24213    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24214
24215  if test "x$BOOT_JDK_FOUND" = xno; then
24216    # Now execute the test
24217
24218        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24219        if test -d "$BOOT_JDK"; then
24220          BOOT_JDK_FOUND=maybe
24221          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24222$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24223        fi
24224
24225
24226    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24227    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24228      # Do we have a bin/java?
24229      if test ! -x "$BOOT_JDK/bin/java"; then
24230        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24231$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24232        BOOT_JDK_FOUND=no
24233      else
24234        # Do we have a bin/javac?
24235        if test ! -x "$BOOT_JDK/bin/javac"; then
24236          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24237$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24238          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24239$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24240          BOOT_JDK_FOUND=no
24241        else
24242          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24243          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24244            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24245$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24246            BOOT_JDK_FOUND=no
24247          else
24248            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24249            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24250
24251            # Extra M4 quote needed to protect [] in grep expression.
24252            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24253            if test "x$FOUND_CORRECT_VERSION" = x; then
24254              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24255$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24256              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24257$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24258              BOOT_JDK_FOUND=no
24259            else
24260              # We're done! :-)
24261              BOOT_JDK_FOUND=yes
24262
24263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24264
24265  # Input might be given as Windows format, start by converting to
24266  # unix format.
24267  path="$BOOT_JDK"
24268  new_path=`$CYGPATH -u "$path"`
24269
24270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24273  # "foo.exe" is OK but "foo" is an error.
24274  #
24275  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24276  # It is also a way to make sure we got the proper file name for the real test later on.
24277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24278  if test "x$test_shortpath" = x; then
24279    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24280$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24281    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24282  fi
24283
24284  # Call helper function which possibly converts this using DOS-style short mode.
24285  # If so, the updated path is stored in $new_path.
24286
24287  input_path="$new_path"
24288  # Check if we need to convert this using DOS-style short mode. If the path
24289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24290  # take no chances and rewrite it.
24291  # Note: m4 eats our [], so we need to use [ and ] instead.
24292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24293  if test "x$has_forbidden_chars" != x; then
24294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24298      # Going to short mode and back again did indeed matter. Since short mode is
24299      # case insensitive, let's make it lowercase to improve readability.
24300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24301      # Now convert it back to Unix-stile (cygpath)
24302      input_path=`$CYGPATH -u "$shortmode_path"`
24303      new_path="$input_path"
24304    fi
24305  fi
24306
24307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24308  if test "x$test_cygdrive_prefix" = x; then
24309    # As a simple fix, exclude /usr/bin since it's not a real path.
24310    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24312      # a path prefixed by /cygdrive for fixpath to work.
24313      new_path="$CYGWIN_ROOT_PATH$input_path"
24314    fi
24315  fi
24316
24317
24318  if test "x$path" != "x$new_path"; then
24319    BOOT_JDK="$new_path"
24320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24321$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24322  fi
24323
24324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24325
24326  path="$BOOT_JDK"
24327  has_colon=`$ECHO $path | $GREP ^.:`
24328  new_path="$path"
24329  if test "x$has_colon" = x; then
24330    # Not in mixed or Windows style, start by that.
24331    new_path=`cmd //c echo $path`
24332  fi
24333
24334
24335  input_path="$new_path"
24336  # Check if we need to convert this using DOS-style short mode. If the path
24337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24338  # take no chances and rewrite it.
24339  # Note: m4 eats our [], so we need to use [ and ] instead.
24340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24341  if test "x$has_forbidden_chars" != x; then
24342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24343    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24344  fi
24345
24346
24347  windows_path="$new_path"
24348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24349    unix_path=`$CYGPATH -u "$windows_path"`
24350    new_path="$unix_path"
24351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24353    new_path="$unix_path"
24354  fi
24355
24356  if test "x$path" != "x$new_path"; then
24357    BOOT_JDK="$new_path"
24358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24359$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24360  fi
24361
24362  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24363  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24364
24365  else
24366    # We're on a unix platform. Hooray! :)
24367    path="$BOOT_JDK"
24368    has_space=`$ECHO "$path" | $GREP " "`
24369    if test "x$has_space" != x; then
24370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24371$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24372      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24373    fi
24374
24375    # Use eval to expand a potential ~
24376    eval path="$path"
24377    if test ! -f "$path" && test ! -d "$path"; then
24378      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24379    fi
24380
24381    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24382  fi
24383
24384              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24385$as_echo_n "checking for Boot JDK... " >&6; }
24386              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24387$as_echo "$BOOT_JDK" >&6; }
24388              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24389$as_echo_n "checking Boot JDK version... " >&6; }
24390              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24391              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24392$as_echo "$BOOT_JDK_VERSION" >&6; }
24393            fi # end check jdk version
24394          fi # end check rt.jar
24395        fi # end check javac
24396      fi # end check java
24397    fi # end check boot jdk found
24398  fi
24399
24400    done
24401  fi
24402
24403
24404    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24405    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24406      # Do we have a bin/java?
24407      if test ! -x "$BOOT_JDK/bin/java"; then
24408        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24410        BOOT_JDK_FOUND=no
24411      else
24412        # Do we have a bin/javac?
24413        if test ! -x "$BOOT_JDK/bin/javac"; then
24414          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24416          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24417$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24418          BOOT_JDK_FOUND=no
24419        else
24420          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24421          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24422            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24423$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24424            BOOT_JDK_FOUND=no
24425          else
24426            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24427            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24428
24429            # Extra M4 quote needed to protect [] in grep expression.
24430            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24431            if test "x$FOUND_CORRECT_VERSION" = x; then
24432              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24433$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24434              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24435$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24436              BOOT_JDK_FOUND=no
24437            else
24438              # We're done! :-)
24439              BOOT_JDK_FOUND=yes
24440
24441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24442
24443  # Input might be given as Windows format, start by converting to
24444  # unix format.
24445  path="$BOOT_JDK"
24446  new_path=`$CYGPATH -u "$path"`
24447
24448  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24449  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24450  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24451  # "foo.exe" is OK but "foo" is an error.
24452  #
24453  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24454  # It is also a way to make sure we got the proper file name for the real test later on.
24455  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24456  if test "x$test_shortpath" = x; then
24457    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24458$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24459    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24460  fi
24461
24462  # Call helper function which possibly converts this using DOS-style short mode.
24463  # If so, the updated path is stored in $new_path.
24464
24465  input_path="$new_path"
24466  # Check if we need to convert this using DOS-style short mode. If the path
24467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24468  # take no chances and rewrite it.
24469  # Note: m4 eats our [], so we need to use [ and ] instead.
24470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24471  if test "x$has_forbidden_chars" != x; then
24472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24473    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24474    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24475    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24476      # Going to short mode and back again did indeed matter. Since short mode is
24477      # case insensitive, let's make it lowercase to improve readability.
24478      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24479      # Now convert it back to Unix-stile (cygpath)
24480      input_path=`$CYGPATH -u "$shortmode_path"`
24481      new_path="$input_path"
24482    fi
24483  fi
24484
24485  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24486  if test "x$test_cygdrive_prefix" = x; then
24487    # As a simple fix, exclude /usr/bin since it's not a real path.
24488    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24489      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24490      # a path prefixed by /cygdrive for fixpath to work.
24491      new_path="$CYGWIN_ROOT_PATH$input_path"
24492    fi
24493  fi
24494
24495
24496  if test "x$path" != "x$new_path"; then
24497    BOOT_JDK="$new_path"
24498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24499$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24500  fi
24501
24502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24503
24504  path="$BOOT_JDK"
24505  has_colon=`$ECHO $path | $GREP ^.:`
24506  new_path="$path"
24507  if test "x$has_colon" = x; then
24508    # Not in mixed or Windows style, start by that.
24509    new_path=`cmd //c echo $path`
24510  fi
24511
24512
24513  input_path="$new_path"
24514  # Check if we need to convert this using DOS-style short mode. If the path
24515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24516  # take no chances and rewrite it.
24517  # Note: m4 eats our [], so we need to use [ and ] instead.
24518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24519  if test "x$has_forbidden_chars" != x; then
24520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24521    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24522  fi
24523
24524
24525  windows_path="$new_path"
24526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24527    unix_path=`$CYGPATH -u "$windows_path"`
24528    new_path="$unix_path"
24529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24531    new_path="$unix_path"
24532  fi
24533
24534  if test "x$path" != "x$new_path"; then
24535    BOOT_JDK="$new_path"
24536    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24537$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24538  fi
24539
24540  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24541  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24542
24543  else
24544    # We're on a unix platform. Hooray! :)
24545    path="$BOOT_JDK"
24546    has_space=`$ECHO "$path" | $GREP " "`
24547    if test "x$has_space" != x; then
24548      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24549$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24550      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24551    fi
24552
24553    # Use eval to expand a potential ~
24554    eval path="$path"
24555    if test ! -f "$path" && test ! -d "$path"; then
24556      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24557    fi
24558
24559    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24560  fi
24561
24562              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24563$as_echo_n "checking for Boot JDK... " >&6; }
24564              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24565$as_echo "$BOOT_JDK" >&6; }
24566              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24567$as_echo_n "checking Boot JDK version... " >&6; }
24568              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24569              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24570$as_echo "$BOOT_JDK_VERSION" >&6; }
24571            fi # end check jdk version
24572          fi # end check rt.jar
24573        fi # end check javac
24574      fi # end check java
24575    fi # end check boot jdk found
24576  fi
24577
24578
24579  if test "x$BOOT_JDK_FOUND" = xno; then
24580    # Now execute the test
24581
24582  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24583  BOOT_JDK_SUFFIX="/Contents/Home"
24584  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24585  if test "x$ALL_JDKS_FOUND" != x; then
24586    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24587
24588  if test "x$BOOT_JDK_FOUND" = xno; then
24589    # Now execute the test
24590
24591        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24592        if test -d "$BOOT_JDK"; then
24593          BOOT_JDK_FOUND=maybe
24594          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24595$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24596        fi
24597
24598
24599    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24600    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24601      # Do we have a bin/java?
24602      if test ! -x "$BOOT_JDK/bin/java"; then
24603        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24604$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24605        BOOT_JDK_FOUND=no
24606      else
24607        # Do we have a bin/javac?
24608        if test ! -x "$BOOT_JDK/bin/javac"; then
24609          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24610$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24611          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24612$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24613          BOOT_JDK_FOUND=no
24614        else
24615          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24616          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24617            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24618$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24619            BOOT_JDK_FOUND=no
24620          else
24621            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24622            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24623
24624            # Extra M4 quote needed to protect [] in grep expression.
24625            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24626            if test "x$FOUND_CORRECT_VERSION" = x; then
24627              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24628$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24629              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24630$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24631              BOOT_JDK_FOUND=no
24632            else
24633              # We're done! :-)
24634              BOOT_JDK_FOUND=yes
24635
24636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24637
24638  # Input might be given as Windows format, start by converting to
24639  # unix format.
24640  path="$BOOT_JDK"
24641  new_path=`$CYGPATH -u "$path"`
24642
24643  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24644  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24645  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24646  # "foo.exe" is OK but "foo" is an error.
24647  #
24648  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24649  # It is also a way to make sure we got the proper file name for the real test later on.
24650  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24651  if test "x$test_shortpath" = x; then
24652    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24653$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24654    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24655  fi
24656
24657  # Call helper function which possibly converts this using DOS-style short mode.
24658  # If so, the updated path is stored in $new_path.
24659
24660  input_path="$new_path"
24661  # Check if we need to convert this using DOS-style short mode. If the path
24662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24663  # take no chances and rewrite it.
24664  # Note: m4 eats our [], so we need to use [ and ] instead.
24665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24666  if test "x$has_forbidden_chars" != x; then
24667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24671      # Going to short mode and back again did indeed matter. Since short mode is
24672      # case insensitive, let's make it lowercase to improve readability.
24673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24674      # Now convert it back to Unix-stile (cygpath)
24675      input_path=`$CYGPATH -u "$shortmode_path"`
24676      new_path="$input_path"
24677    fi
24678  fi
24679
24680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24681  if test "x$test_cygdrive_prefix" = x; then
24682    # As a simple fix, exclude /usr/bin since it's not a real path.
24683    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24685      # a path prefixed by /cygdrive for fixpath to work.
24686      new_path="$CYGWIN_ROOT_PATH$input_path"
24687    fi
24688  fi
24689
24690
24691  if test "x$path" != "x$new_path"; then
24692    BOOT_JDK="$new_path"
24693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24694$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24695  fi
24696
24697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24698
24699  path="$BOOT_JDK"
24700  has_colon=`$ECHO $path | $GREP ^.:`
24701  new_path="$path"
24702  if test "x$has_colon" = x; then
24703    # Not in mixed or Windows style, start by that.
24704    new_path=`cmd //c echo $path`
24705  fi
24706
24707
24708  input_path="$new_path"
24709  # Check if we need to convert this using DOS-style short mode. If the path
24710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24711  # take no chances and rewrite it.
24712  # Note: m4 eats our [], so we need to use [ and ] instead.
24713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24714  if test "x$has_forbidden_chars" != x; then
24715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24716    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24717  fi
24718
24719
24720  windows_path="$new_path"
24721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24722    unix_path=`$CYGPATH -u "$windows_path"`
24723    new_path="$unix_path"
24724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24726    new_path="$unix_path"
24727  fi
24728
24729  if test "x$path" != "x$new_path"; then
24730    BOOT_JDK="$new_path"
24731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24732$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24733  fi
24734
24735  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24736  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24737
24738  else
24739    # We're on a unix platform. Hooray! :)
24740    path="$BOOT_JDK"
24741    has_space=`$ECHO "$path" | $GREP " "`
24742    if test "x$has_space" != x; then
24743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24744$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24745      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24746    fi
24747
24748    # Use eval to expand a potential ~
24749    eval path="$path"
24750    if test ! -f "$path" && test ! -d "$path"; then
24751      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24752    fi
24753
24754    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24755  fi
24756
24757              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24758$as_echo_n "checking for Boot JDK... " >&6; }
24759              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24760$as_echo "$BOOT_JDK" >&6; }
24761              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24762$as_echo_n "checking Boot JDK version... " >&6; }
24763              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24764              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24765$as_echo "$BOOT_JDK_VERSION" >&6; }
24766            fi # end check jdk version
24767          fi # end check rt.jar
24768        fi # end check javac
24769      fi # end check java
24770    fi # end check boot jdk found
24771  fi
24772
24773    done
24774  fi
24775
24776
24777    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24778    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24779      # Do we have a bin/java?
24780      if test ! -x "$BOOT_JDK/bin/java"; then
24781        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24782$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24783        BOOT_JDK_FOUND=no
24784      else
24785        # Do we have a bin/javac?
24786        if test ! -x "$BOOT_JDK/bin/javac"; then
24787          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24789          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24790$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24791          BOOT_JDK_FOUND=no
24792        else
24793          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24794          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24795            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24796$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24797            BOOT_JDK_FOUND=no
24798          else
24799            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24800            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24801
24802            # Extra M4 quote needed to protect [] in grep expression.
24803            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24804            if test "x$FOUND_CORRECT_VERSION" = x; then
24805              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24807              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24808$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24809              BOOT_JDK_FOUND=no
24810            else
24811              # We're done! :-)
24812              BOOT_JDK_FOUND=yes
24813
24814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24815
24816  # Input might be given as Windows format, start by converting to
24817  # unix format.
24818  path="$BOOT_JDK"
24819  new_path=`$CYGPATH -u "$path"`
24820
24821  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24822  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24823  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24824  # "foo.exe" is OK but "foo" is an error.
24825  #
24826  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24827  # It is also a way to make sure we got the proper file name for the real test later on.
24828  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24829  if test "x$test_shortpath" = x; then
24830    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24831$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24832    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24833  fi
24834
24835  # Call helper function which possibly converts this using DOS-style short mode.
24836  # If so, the updated path is stored in $new_path.
24837
24838  input_path="$new_path"
24839  # Check if we need to convert this using DOS-style short mode. If the path
24840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24841  # take no chances and rewrite it.
24842  # Note: m4 eats our [], so we need to use [ and ] instead.
24843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24844  if test "x$has_forbidden_chars" != x; then
24845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24846    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24847    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24848    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24849      # Going to short mode and back again did indeed matter. Since short mode is
24850      # case insensitive, let's make it lowercase to improve readability.
24851      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24852      # Now convert it back to Unix-stile (cygpath)
24853      input_path=`$CYGPATH -u "$shortmode_path"`
24854      new_path="$input_path"
24855    fi
24856  fi
24857
24858  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24859  if test "x$test_cygdrive_prefix" = x; then
24860    # As a simple fix, exclude /usr/bin since it's not a real path.
24861    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24862      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24863      # a path prefixed by /cygdrive for fixpath to work.
24864      new_path="$CYGWIN_ROOT_PATH$input_path"
24865    fi
24866  fi
24867
24868
24869  if test "x$path" != "x$new_path"; then
24870    BOOT_JDK="$new_path"
24871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24872$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24873  fi
24874
24875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24876
24877  path="$BOOT_JDK"
24878  has_colon=`$ECHO $path | $GREP ^.:`
24879  new_path="$path"
24880  if test "x$has_colon" = x; then
24881    # Not in mixed or Windows style, start by that.
24882    new_path=`cmd //c echo $path`
24883  fi
24884
24885
24886  input_path="$new_path"
24887  # Check if we need to convert this using DOS-style short mode. If the path
24888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24889  # take no chances and rewrite it.
24890  # Note: m4 eats our [], so we need to use [ and ] instead.
24891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24892  if test "x$has_forbidden_chars" != x; then
24893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24894    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24895  fi
24896
24897
24898  windows_path="$new_path"
24899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24900    unix_path=`$CYGPATH -u "$windows_path"`
24901    new_path="$unix_path"
24902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24904    new_path="$unix_path"
24905  fi
24906
24907  if test "x$path" != "x$new_path"; then
24908    BOOT_JDK="$new_path"
24909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24910$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24911  fi
24912
24913  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24914  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24915
24916  else
24917    # We're on a unix platform. Hooray! :)
24918    path="$BOOT_JDK"
24919    has_space=`$ECHO "$path" | $GREP " "`
24920    if test "x$has_space" != x; then
24921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24922$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24923      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24924    fi
24925
24926    # Use eval to expand a potential ~
24927    eval path="$path"
24928    if test ! -f "$path" && test ! -d "$path"; then
24929      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24930    fi
24931
24932    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24933  fi
24934
24935              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24936$as_echo_n "checking for Boot JDK... " >&6; }
24937              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24938$as_echo "$BOOT_JDK" >&6; }
24939              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24940$as_echo_n "checking Boot JDK version... " >&6; }
24941              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24942              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24943$as_echo "$BOOT_JDK_VERSION" >&6; }
24944            fi # end check jdk version
24945          fi # end check rt.jar
24946        fi # end check javac
24947      fi # end check java
24948    fi # end check boot jdk found
24949  fi
24950
24951  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24952
24953  if test "x$BOOT_JDK_FOUND" = xno; then
24954    # Now execute the test
24955
24956  BOOT_JDK_PREFIX="/usr/lib/jvm"
24957  BOOT_JDK_SUFFIX=""
24958  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24959  if test "x$ALL_JDKS_FOUND" != x; then
24960    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24961
24962  if test "x$BOOT_JDK_FOUND" = xno; then
24963    # Now execute the test
24964
24965        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24966        if test -d "$BOOT_JDK"; then
24967          BOOT_JDK_FOUND=maybe
24968          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24969$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24970        fi
24971
24972
24973    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24974    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24975      # Do we have a bin/java?
24976      if test ! -x "$BOOT_JDK/bin/java"; then
24977        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24978$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24979        BOOT_JDK_FOUND=no
24980      else
24981        # Do we have a bin/javac?
24982        if test ! -x "$BOOT_JDK/bin/javac"; then
24983          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24984$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24985          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24986$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24987          BOOT_JDK_FOUND=no
24988        else
24989          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24990          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24991            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24992$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24993            BOOT_JDK_FOUND=no
24994          else
24995            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24996            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24997
24998            # Extra M4 quote needed to protect [] in grep expression.
24999            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25000            if test "x$FOUND_CORRECT_VERSION" = x; then
25001              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25003              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25004$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25005              BOOT_JDK_FOUND=no
25006            else
25007              # We're done! :-)
25008              BOOT_JDK_FOUND=yes
25009
25010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25011
25012  # Input might be given as Windows format, start by converting to
25013  # unix format.
25014  path="$BOOT_JDK"
25015  new_path=`$CYGPATH -u "$path"`
25016
25017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25020  # "foo.exe" is OK but "foo" is an error.
25021  #
25022  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25023  # It is also a way to make sure we got the proper file name for the real test later on.
25024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25025  if test "x$test_shortpath" = x; then
25026    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25027$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25028    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25029  fi
25030
25031  # Call helper function which possibly converts this using DOS-style short mode.
25032  # If so, the updated path is stored in $new_path.
25033
25034  input_path="$new_path"
25035  # Check if we need to convert this using DOS-style short mode. If the path
25036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25037  # take no chances and rewrite it.
25038  # Note: m4 eats our [], so we need to use [ and ] instead.
25039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25040  if test "x$has_forbidden_chars" != x; then
25041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25042    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25043    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25044    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25045      # Going to short mode and back again did indeed matter. Since short mode is
25046      # case insensitive, let's make it lowercase to improve readability.
25047      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25048      # Now convert it back to Unix-stile (cygpath)
25049      input_path=`$CYGPATH -u "$shortmode_path"`
25050      new_path="$input_path"
25051    fi
25052  fi
25053
25054  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25055  if test "x$test_cygdrive_prefix" = x; then
25056    # As a simple fix, exclude /usr/bin since it's not a real path.
25057    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25058      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25059      # a path prefixed by /cygdrive for fixpath to work.
25060      new_path="$CYGWIN_ROOT_PATH$input_path"
25061    fi
25062  fi
25063
25064
25065  if test "x$path" != "x$new_path"; then
25066    BOOT_JDK="$new_path"
25067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25068$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25069  fi
25070
25071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25072
25073  path="$BOOT_JDK"
25074  has_colon=`$ECHO $path | $GREP ^.:`
25075  new_path="$path"
25076  if test "x$has_colon" = x; then
25077    # Not in mixed or Windows style, start by that.
25078    new_path=`cmd //c echo $path`
25079  fi
25080
25081
25082  input_path="$new_path"
25083  # Check if we need to convert this using DOS-style short mode. If the path
25084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25085  # take no chances and rewrite it.
25086  # Note: m4 eats our [], so we need to use [ and ] instead.
25087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25088  if test "x$has_forbidden_chars" != x; then
25089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25091  fi
25092
25093
25094  windows_path="$new_path"
25095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25096    unix_path=`$CYGPATH -u "$windows_path"`
25097    new_path="$unix_path"
25098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25100    new_path="$unix_path"
25101  fi
25102
25103  if test "x$path" != "x$new_path"; then
25104    BOOT_JDK="$new_path"
25105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25106$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25107  fi
25108
25109  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25110  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25111
25112  else
25113    # We're on a unix platform. Hooray! :)
25114    path="$BOOT_JDK"
25115    has_space=`$ECHO "$path" | $GREP " "`
25116    if test "x$has_space" != x; then
25117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25118$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25119      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25120    fi
25121
25122    # Use eval to expand a potential ~
25123    eval path="$path"
25124    if test ! -f "$path" && test ! -d "$path"; then
25125      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25126    fi
25127
25128    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25129  fi
25130
25131              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25132$as_echo_n "checking for Boot JDK... " >&6; }
25133              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25134$as_echo "$BOOT_JDK" >&6; }
25135              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25136$as_echo_n "checking Boot JDK version... " >&6; }
25137              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25138              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25139$as_echo "$BOOT_JDK_VERSION" >&6; }
25140            fi # end check jdk version
25141          fi # end check rt.jar
25142        fi # end check javac
25143      fi # end check java
25144    fi # end check boot jdk found
25145  fi
25146
25147    done
25148  fi
25149
25150
25151    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25152    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25153      # Do we have a bin/java?
25154      if test ! -x "$BOOT_JDK/bin/java"; then
25155        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25156$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25157        BOOT_JDK_FOUND=no
25158      else
25159        # Do we have a bin/javac?
25160        if test ! -x "$BOOT_JDK/bin/javac"; then
25161          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25162$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25163          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25164$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25165          BOOT_JDK_FOUND=no
25166        else
25167          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25168          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25169            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25171            BOOT_JDK_FOUND=no
25172          else
25173            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25174            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25175
25176            # Extra M4 quote needed to protect [] in grep expression.
25177            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25178            if test "x$FOUND_CORRECT_VERSION" = x; then
25179              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25180$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25181              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25182$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25183              BOOT_JDK_FOUND=no
25184            else
25185              # We're done! :-)
25186              BOOT_JDK_FOUND=yes
25187
25188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25189
25190  # Input might be given as Windows format, start by converting to
25191  # unix format.
25192  path="$BOOT_JDK"
25193  new_path=`$CYGPATH -u "$path"`
25194
25195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25198  # "foo.exe" is OK but "foo" is an error.
25199  #
25200  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25201  # It is also a way to make sure we got the proper file name for the real test later on.
25202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25203  if test "x$test_shortpath" = x; then
25204    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25205$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25206    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25207  fi
25208
25209  # Call helper function which possibly converts this using DOS-style short mode.
25210  # If so, the updated path is stored in $new_path.
25211
25212  input_path="$new_path"
25213  # Check if we need to convert this using DOS-style short mode. If the path
25214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25215  # take no chances and rewrite it.
25216  # Note: m4 eats our [], so we need to use [ and ] instead.
25217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25218  if test "x$has_forbidden_chars" != x; then
25219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25220    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25221    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25222    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25223      # Going to short mode and back again did indeed matter. Since short mode is
25224      # case insensitive, let's make it lowercase to improve readability.
25225      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25226      # Now convert it back to Unix-stile (cygpath)
25227      input_path=`$CYGPATH -u "$shortmode_path"`
25228      new_path="$input_path"
25229    fi
25230  fi
25231
25232  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25233  if test "x$test_cygdrive_prefix" = x; then
25234    # As a simple fix, exclude /usr/bin since it's not a real path.
25235    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25236      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25237      # a path prefixed by /cygdrive for fixpath to work.
25238      new_path="$CYGWIN_ROOT_PATH$input_path"
25239    fi
25240  fi
25241
25242
25243  if test "x$path" != "x$new_path"; then
25244    BOOT_JDK="$new_path"
25245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25246$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25247  fi
25248
25249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25250
25251  path="$BOOT_JDK"
25252  has_colon=`$ECHO $path | $GREP ^.:`
25253  new_path="$path"
25254  if test "x$has_colon" = x; then
25255    # Not in mixed or Windows style, start by that.
25256    new_path=`cmd //c echo $path`
25257  fi
25258
25259
25260  input_path="$new_path"
25261  # Check if we need to convert this using DOS-style short mode. If the path
25262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25263  # take no chances and rewrite it.
25264  # Note: m4 eats our [], so we need to use [ and ] instead.
25265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25266  if test "x$has_forbidden_chars" != x; then
25267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25268    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25269  fi
25270
25271
25272  windows_path="$new_path"
25273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25274    unix_path=`$CYGPATH -u "$windows_path"`
25275    new_path="$unix_path"
25276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25278    new_path="$unix_path"
25279  fi
25280
25281  if test "x$path" != "x$new_path"; then
25282    BOOT_JDK="$new_path"
25283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25284$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25285  fi
25286
25287  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25288  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25289
25290  else
25291    # We're on a unix platform. Hooray! :)
25292    path="$BOOT_JDK"
25293    has_space=`$ECHO "$path" | $GREP " "`
25294    if test "x$has_space" != x; then
25295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25296$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25297      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25298    fi
25299
25300    # Use eval to expand a potential ~
25301    eval path="$path"
25302    if test ! -f "$path" && test ! -d "$path"; then
25303      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25304    fi
25305
25306    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25307  fi
25308
25309              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25310$as_echo_n "checking for Boot JDK... " >&6; }
25311              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25312$as_echo "$BOOT_JDK" >&6; }
25313              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25314$as_echo_n "checking Boot JDK version... " >&6; }
25315              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25316              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25317$as_echo "$BOOT_JDK_VERSION" >&6; }
25318            fi # end check jdk version
25319          fi # end check rt.jar
25320        fi # end check javac
25321      fi # end check java
25322    fi # end check boot jdk found
25323  fi
25324
25325  fi
25326
25327
25328    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25329    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25330      # Do we have a bin/java?
25331      if test ! -x "$BOOT_JDK/bin/java"; then
25332        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25333$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25334        BOOT_JDK_FOUND=no
25335      else
25336        # Do we have a bin/javac?
25337        if test ! -x "$BOOT_JDK/bin/javac"; then
25338          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25339$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25340          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25341$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25342          BOOT_JDK_FOUND=no
25343        else
25344          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25345          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25346            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25347$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25348            BOOT_JDK_FOUND=no
25349          else
25350            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25351            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25352
25353            # Extra M4 quote needed to protect [] in grep expression.
25354            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25355            if test "x$FOUND_CORRECT_VERSION" = x; then
25356              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25357$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25358              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25359$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25360              BOOT_JDK_FOUND=no
25361            else
25362              # We're done! :-)
25363              BOOT_JDK_FOUND=yes
25364
25365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25366
25367  # Input might be given as Windows format, start by converting to
25368  # unix format.
25369  path="$BOOT_JDK"
25370  new_path=`$CYGPATH -u "$path"`
25371
25372  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25373  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25374  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25375  # "foo.exe" is OK but "foo" is an error.
25376  #
25377  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25378  # It is also a way to make sure we got the proper file name for the real test later on.
25379  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25380  if test "x$test_shortpath" = x; then
25381    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25382$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25383    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25384  fi
25385
25386  # Call helper function which possibly converts this using DOS-style short mode.
25387  # If so, the updated path is stored in $new_path.
25388
25389  input_path="$new_path"
25390  # Check if we need to convert this using DOS-style short mode. If the path
25391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25392  # take no chances and rewrite it.
25393  # Note: m4 eats our [], so we need to use [ and ] instead.
25394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25395  if test "x$has_forbidden_chars" != x; then
25396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25397    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25398    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25399    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25400      # Going to short mode and back again did indeed matter. Since short mode is
25401      # case insensitive, let's make it lowercase to improve readability.
25402      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25403      # Now convert it back to Unix-stile (cygpath)
25404      input_path=`$CYGPATH -u "$shortmode_path"`
25405      new_path="$input_path"
25406    fi
25407  fi
25408
25409  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25410  if test "x$test_cygdrive_prefix" = x; then
25411    # As a simple fix, exclude /usr/bin since it's not a real path.
25412    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25413      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25414      # a path prefixed by /cygdrive for fixpath to work.
25415      new_path="$CYGWIN_ROOT_PATH$input_path"
25416    fi
25417  fi
25418
25419
25420  if test "x$path" != "x$new_path"; then
25421    BOOT_JDK="$new_path"
25422    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25423$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25424  fi
25425
25426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25427
25428  path="$BOOT_JDK"
25429  has_colon=`$ECHO $path | $GREP ^.:`
25430  new_path="$path"
25431  if test "x$has_colon" = x; then
25432    # Not in mixed or Windows style, start by that.
25433    new_path=`cmd //c echo $path`
25434  fi
25435
25436
25437  input_path="$new_path"
25438  # Check if we need to convert this using DOS-style short mode. If the path
25439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25440  # take no chances and rewrite it.
25441  # Note: m4 eats our [], so we need to use [ and ] instead.
25442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25443  if test "x$has_forbidden_chars" != x; then
25444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25446  fi
25447
25448
25449  windows_path="$new_path"
25450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25451    unix_path=`$CYGPATH -u "$windows_path"`
25452    new_path="$unix_path"
25453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25455    new_path="$unix_path"
25456  fi
25457
25458  if test "x$path" != "x$new_path"; then
25459    BOOT_JDK="$new_path"
25460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25461$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25462  fi
25463
25464  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25465  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25466
25467  else
25468    # We're on a unix platform. Hooray! :)
25469    path="$BOOT_JDK"
25470    has_space=`$ECHO "$path" | $GREP " "`
25471    if test "x$has_space" != x; then
25472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25473$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25474      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25475    fi
25476
25477    # Use eval to expand a potential ~
25478    eval path="$path"
25479    if test ! -f "$path" && test ! -d "$path"; then
25480      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25481    fi
25482
25483    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25484  fi
25485
25486              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25487$as_echo_n "checking for Boot JDK... " >&6; }
25488              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25489$as_echo "$BOOT_JDK" >&6; }
25490              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25491$as_echo_n "checking Boot JDK version... " >&6; }
25492              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25493              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25494$as_echo "$BOOT_JDK_VERSION" >&6; }
25495            fi # end check jdk version
25496          fi # end check rt.jar
25497        fi # end check javac
25498      fi # end check java
25499    fi # end check boot jdk found
25500  fi
25501
25502
25503  # If we haven't found anything yet, we've truly lost. Give up.
25504  if test "x$BOOT_JDK_FOUND" = xno; then
25505
25506  # Print a helpful message on how to acquire the necessary build dependency.
25507  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25508  MISSING_DEPENDENCY=openjdk
25509
25510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25511    cygwin_help $MISSING_DEPENDENCY
25512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25513    msys_help $MISSING_DEPENDENCY
25514  else
25515    PKGHANDLER_COMMAND=
25516
25517    case $PKGHANDLER in
25518      apt-get)
25519        apt_help     $MISSING_DEPENDENCY ;;
25520      yum)
25521        yum_help     $MISSING_DEPENDENCY ;;
25522      port)
25523        port_help    $MISSING_DEPENDENCY ;;
25524      pkgutil)
25525        pkgutil_help $MISSING_DEPENDENCY ;;
25526      pkgadd)
25527        pkgadd_help  $MISSING_DEPENDENCY ;;
25528    esac
25529
25530    if test "x$PKGHANDLER_COMMAND" != x; then
25531      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25532    fi
25533  fi
25534
25535    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25536$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25537    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25538$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25539    as_fn_error $? "Cannot continue" "$LINENO" 5
25540  fi
25541
25542
25543
25544  # Setup tools from the Boot JDK.
25545
25546  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25547
25548  # Publish this variable in the help.
25549
25550
25551  if test "x$JAVA" = x; then
25552    # The variable is not set by user, try to locate tool using the code snippet
25553
25554      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25555$as_echo_n "checking for java in Boot JDK... " >&6; }
25556      JAVA=$BOOT_JDK/bin/java
25557      if test ! -x $JAVA; then
25558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25559$as_echo "not found" >&6; }
25560        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25561$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25562        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25563      fi
25564      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25565$as_echo "ok" >&6; }
25566
25567
25568  else
25569    # The variable is set, but is it from the command line or the environment?
25570
25571    # Try to remove the string !JAVA! from our list.
25572    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25573    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25574      # If it failed, the variable was not from the command line. Ignore it,
25575      # but warn the user (except for BASH, which is always set by the calling BASH).
25576      if test "xJAVA" != xBASH; then
25577        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25578$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25579      fi
25580      # Try to locate tool using the code snippet
25581
25582      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25583$as_echo_n "checking for java in Boot JDK... " >&6; }
25584      JAVA=$BOOT_JDK/bin/java
25585      if test ! -x $JAVA; then
25586        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25587$as_echo "not found" >&6; }
25588        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25589$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25590        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25591      fi
25592      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25593$as_echo "ok" >&6; }
25594
25595
25596    else
25597      # If it succeeded, then it was overridden by the user. We will use it
25598      # for the tool.
25599
25600      # First remove it from the list of overridden variables, so we can test
25601      # for unknown variables in the end.
25602      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25603
25604      # Check if the provided tool contains a complete path.
25605      tool_specified="$JAVA"
25606      tool_basename="${tool_specified##*/}"
25607      if test "x$tool_basename" = "x$tool_specified"; then
25608        # A command without a complete path is provided, search $PATH.
25609        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25610$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25611        # Extract the first word of "$tool_basename", so it can be a program name with args.
25612set dummy $tool_basename; ac_word=$2
25613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25614$as_echo_n "checking for $ac_word... " >&6; }
25615if ${ac_cv_path_JAVA+:} false; then :
25616  $as_echo_n "(cached) " >&6
25617else
25618  case $JAVA in
25619  [\\/]* | ?:[\\/]*)
25620  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25621  ;;
25622  *)
25623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25624for as_dir in $PATH
25625do
25626  IFS=$as_save_IFS
25627  test -z "$as_dir" && as_dir=.
25628    for ac_exec_ext in '' $ac_executable_extensions; do
25629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25630    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25632    break 2
25633  fi
25634done
25635  done
25636IFS=$as_save_IFS
25637
25638  ;;
25639esac
25640fi
25641JAVA=$ac_cv_path_JAVA
25642if test -n "$JAVA"; then
25643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25644$as_echo "$JAVA" >&6; }
25645else
25646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25647$as_echo "no" >&6; }
25648fi
25649
25650
25651        if test "x$JAVA" = x; then
25652          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25653        fi
25654      else
25655        # Otherwise we believe it is a complete path. Use it as it is.
25656        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25657$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25658        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25659$as_echo_n "checking for JAVA... " >&6; }
25660        if test ! -x "$tool_specified"; then
25661          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25662$as_echo "not found" >&6; }
25663          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25664        fi
25665        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25666$as_echo "$tool_specified" >&6; }
25667      fi
25668    fi
25669  fi
25670
25671
25672
25673  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25674
25675  # Publish this variable in the help.
25676
25677
25678  if test "x$JAVAC" = x; then
25679    # The variable is not set by user, try to locate tool using the code snippet
25680
25681      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25682$as_echo_n "checking for javac in Boot JDK... " >&6; }
25683      JAVAC=$BOOT_JDK/bin/javac
25684      if test ! -x $JAVAC; then
25685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25686$as_echo "not found" >&6; }
25687        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25688$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25689        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25690      fi
25691      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25692$as_echo "ok" >&6; }
25693
25694
25695  else
25696    # The variable is set, but is it from the command line or the environment?
25697
25698    # Try to remove the string !JAVAC! from our list.
25699    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25700    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25701      # If it failed, the variable was not from the command line. Ignore it,
25702      # but warn the user (except for BASH, which is always set by the calling BASH).
25703      if test "xJAVAC" != xBASH; then
25704        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25705$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25706      fi
25707      # Try to locate tool using the code snippet
25708
25709      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25710$as_echo_n "checking for javac in Boot JDK... " >&6; }
25711      JAVAC=$BOOT_JDK/bin/javac
25712      if test ! -x $JAVAC; then
25713        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25714$as_echo "not found" >&6; }
25715        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25716$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25717        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25718      fi
25719      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25720$as_echo "ok" >&6; }
25721
25722
25723    else
25724      # If it succeeded, then it was overridden by the user. We will use it
25725      # for the tool.
25726
25727      # First remove it from the list of overridden variables, so we can test
25728      # for unknown variables in the end.
25729      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25730
25731      # Check if the provided tool contains a complete path.
25732      tool_specified="$JAVAC"
25733      tool_basename="${tool_specified##*/}"
25734      if test "x$tool_basename" = "x$tool_specified"; then
25735        # A command without a complete path is provided, search $PATH.
25736        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25737$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25738        # Extract the first word of "$tool_basename", so it can be a program name with args.
25739set dummy $tool_basename; ac_word=$2
25740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25741$as_echo_n "checking for $ac_word... " >&6; }
25742if ${ac_cv_path_JAVAC+:} false; then :
25743  $as_echo_n "(cached) " >&6
25744else
25745  case $JAVAC in
25746  [\\/]* | ?:[\\/]*)
25747  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25748  ;;
25749  *)
25750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25751for as_dir in $PATH
25752do
25753  IFS=$as_save_IFS
25754  test -z "$as_dir" && as_dir=.
25755    for ac_exec_ext in '' $ac_executable_extensions; do
25756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25757    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25759    break 2
25760  fi
25761done
25762  done
25763IFS=$as_save_IFS
25764
25765  ;;
25766esac
25767fi
25768JAVAC=$ac_cv_path_JAVAC
25769if test -n "$JAVAC"; then
25770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25771$as_echo "$JAVAC" >&6; }
25772else
25773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25774$as_echo "no" >&6; }
25775fi
25776
25777
25778        if test "x$JAVAC" = x; then
25779          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25780        fi
25781      else
25782        # Otherwise we believe it is a complete path. Use it as it is.
25783        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25784$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25785        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25786$as_echo_n "checking for JAVAC... " >&6; }
25787        if test ! -x "$tool_specified"; then
25788          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25789$as_echo "not found" >&6; }
25790          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25791        fi
25792        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25793$as_echo "$tool_specified" >&6; }
25794      fi
25795    fi
25796  fi
25797
25798
25799
25800  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25801
25802  # Publish this variable in the help.
25803
25804
25805  if test "x$JAVAH" = x; then
25806    # The variable is not set by user, try to locate tool using the code snippet
25807
25808      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25809$as_echo_n "checking for javah in Boot JDK... " >&6; }
25810      JAVAH=$BOOT_JDK/bin/javah
25811      if test ! -x $JAVAH; then
25812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25813$as_echo "not found" >&6; }
25814        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25815$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25816        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25817      fi
25818      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25819$as_echo "ok" >&6; }
25820
25821
25822  else
25823    # The variable is set, but is it from the command line or the environment?
25824
25825    # Try to remove the string !JAVAH! from our list.
25826    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25827    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25828      # If it failed, the variable was not from the command line. Ignore it,
25829      # but warn the user (except for BASH, which is always set by the calling BASH).
25830      if test "xJAVAH" != xBASH; then
25831        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25832$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25833      fi
25834      # Try to locate tool using the code snippet
25835
25836      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25837$as_echo_n "checking for javah in Boot JDK... " >&6; }
25838      JAVAH=$BOOT_JDK/bin/javah
25839      if test ! -x $JAVAH; then
25840        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25841$as_echo "not found" >&6; }
25842        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25843$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25844        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25845      fi
25846      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25847$as_echo "ok" >&6; }
25848
25849
25850    else
25851      # If it succeeded, then it was overridden by the user. We will use it
25852      # for the tool.
25853
25854      # First remove it from the list of overridden variables, so we can test
25855      # for unknown variables in the end.
25856      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25857
25858      # Check if the provided tool contains a complete path.
25859      tool_specified="$JAVAH"
25860      tool_basename="${tool_specified##*/}"
25861      if test "x$tool_basename" = "x$tool_specified"; then
25862        # A command without a complete path is provided, search $PATH.
25863        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25864$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25865        # Extract the first word of "$tool_basename", so it can be a program name with args.
25866set dummy $tool_basename; ac_word=$2
25867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25868$as_echo_n "checking for $ac_word... " >&6; }
25869if ${ac_cv_path_JAVAH+:} false; then :
25870  $as_echo_n "(cached) " >&6
25871else
25872  case $JAVAH in
25873  [\\/]* | ?:[\\/]*)
25874  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25875  ;;
25876  *)
25877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25878for as_dir in $PATH
25879do
25880  IFS=$as_save_IFS
25881  test -z "$as_dir" && as_dir=.
25882    for ac_exec_ext in '' $ac_executable_extensions; do
25883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25884    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25886    break 2
25887  fi
25888done
25889  done
25890IFS=$as_save_IFS
25891
25892  ;;
25893esac
25894fi
25895JAVAH=$ac_cv_path_JAVAH
25896if test -n "$JAVAH"; then
25897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25898$as_echo "$JAVAH" >&6; }
25899else
25900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25901$as_echo "no" >&6; }
25902fi
25903
25904
25905        if test "x$JAVAH" = x; then
25906          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25907        fi
25908      else
25909        # Otherwise we believe it is a complete path. Use it as it is.
25910        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25911$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25912        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25913$as_echo_n "checking for JAVAH... " >&6; }
25914        if test ! -x "$tool_specified"; then
25915          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25916$as_echo "not found" >&6; }
25917          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25918        fi
25919        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25920$as_echo "$tool_specified" >&6; }
25921      fi
25922    fi
25923  fi
25924
25925
25926
25927  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25928
25929  # Publish this variable in the help.
25930
25931
25932  if test "x$JAR" = x; then
25933    # The variable is not set by user, try to locate tool using the code snippet
25934
25935      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25936$as_echo_n "checking for jar in Boot JDK... " >&6; }
25937      JAR=$BOOT_JDK/bin/jar
25938      if test ! -x $JAR; then
25939        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25940$as_echo "not found" >&6; }
25941        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25942$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25943        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25944      fi
25945      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25946$as_echo "ok" >&6; }
25947
25948
25949  else
25950    # The variable is set, but is it from the command line or the environment?
25951
25952    # Try to remove the string !JAR! from our list.
25953    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25954    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25955      # If it failed, the variable was not from the command line. Ignore it,
25956      # but warn the user (except for BASH, which is always set by the calling BASH).
25957      if test "xJAR" != xBASH; then
25958        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25959$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25960      fi
25961      # Try to locate tool using the code snippet
25962
25963      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25964$as_echo_n "checking for jar in Boot JDK... " >&6; }
25965      JAR=$BOOT_JDK/bin/jar
25966      if test ! -x $JAR; then
25967        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25968$as_echo "not found" >&6; }
25969        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25970$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25971        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25972      fi
25973      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25974$as_echo "ok" >&6; }
25975
25976
25977    else
25978      # If it succeeded, then it was overridden by the user. We will use it
25979      # for the tool.
25980
25981      # First remove it from the list of overridden variables, so we can test
25982      # for unknown variables in the end.
25983      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25984
25985      # Check if the provided tool contains a complete path.
25986      tool_specified="$JAR"
25987      tool_basename="${tool_specified##*/}"
25988      if test "x$tool_basename" = "x$tool_specified"; then
25989        # A command without a complete path is provided, search $PATH.
25990        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25991$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25992        # Extract the first word of "$tool_basename", so it can be a program name with args.
25993set dummy $tool_basename; ac_word=$2
25994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25995$as_echo_n "checking for $ac_word... " >&6; }
25996if ${ac_cv_path_JAR+:} false; then :
25997  $as_echo_n "(cached) " >&6
25998else
25999  case $JAR in
26000  [\\/]* | ?:[\\/]*)
26001  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26002  ;;
26003  *)
26004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26005for as_dir in $PATH
26006do
26007  IFS=$as_save_IFS
26008  test -z "$as_dir" && as_dir=.
26009    for ac_exec_ext in '' $ac_executable_extensions; do
26010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26011    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26013    break 2
26014  fi
26015done
26016  done
26017IFS=$as_save_IFS
26018
26019  ;;
26020esac
26021fi
26022JAR=$ac_cv_path_JAR
26023if test -n "$JAR"; then
26024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26025$as_echo "$JAR" >&6; }
26026else
26027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26028$as_echo "no" >&6; }
26029fi
26030
26031
26032        if test "x$JAR" = x; then
26033          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26034        fi
26035      else
26036        # Otherwise we believe it is a complete path. Use it as it is.
26037        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26038$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26039        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26040$as_echo_n "checking for JAR... " >&6; }
26041        if test ! -x "$tool_specified"; then
26042          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26043$as_echo "not found" >&6; }
26044          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26045        fi
26046        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26047$as_echo "$tool_specified" >&6; }
26048      fi
26049    fi
26050  fi
26051
26052
26053
26054  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26055
26056  # Publish this variable in the help.
26057
26058
26059  if test "x$NATIVE2ASCII" = x; then
26060    # The variable is not set by user, try to locate tool using the code snippet
26061
26062      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
26063$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
26064      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
26065      if test ! -x $NATIVE2ASCII; then
26066        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26067$as_echo "not found" >&6; }
26068        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26069$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26070        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
26071      fi
26072      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26073$as_echo "ok" >&6; }
26074
26075
26076  else
26077    # The variable is set, but is it from the command line or the environment?
26078
26079    # Try to remove the string !NATIVE2ASCII! from our list.
26080    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
26081    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26082      # If it failed, the variable was not from the command line. Ignore it,
26083      # but warn the user (except for BASH, which is always set by the calling BASH).
26084      if test "xNATIVE2ASCII" != xBASH; then
26085        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
26086$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
26087      fi
26088      # Try to locate tool using the code snippet
26089
26090      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
26091$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
26092      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
26093      if test ! -x $NATIVE2ASCII; then
26094        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26095$as_echo "not found" >&6; }
26096        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26097$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26098        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
26099      fi
26100      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26101$as_echo "ok" >&6; }
26102
26103
26104    else
26105      # If it succeeded, then it was overridden by the user. We will use it
26106      # for the tool.
26107
26108      # First remove it from the list of overridden variables, so we can test
26109      # for unknown variables in the end.
26110      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26111
26112      # Check if the provided tool contains a complete path.
26113      tool_specified="$NATIVE2ASCII"
26114      tool_basename="${tool_specified##*/}"
26115      if test "x$tool_basename" = "x$tool_specified"; then
26116        # A command without a complete path is provided, search $PATH.
26117        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
26118$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
26119        # Extract the first word of "$tool_basename", so it can be a program name with args.
26120set dummy $tool_basename; ac_word=$2
26121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26122$as_echo_n "checking for $ac_word... " >&6; }
26123if ${ac_cv_path_NATIVE2ASCII+:} false; then :
26124  $as_echo_n "(cached) " >&6
26125else
26126  case $NATIVE2ASCII in
26127  [\\/]* | ?:[\\/]*)
26128  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
26129  ;;
26130  *)
26131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26132for as_dir in $PATH
26133do
26134  IFS=$as_save_IFS
26135  test -z "$as_dir" && as_dir=.
26136    for ac_exec_ext in '' $ac_executable_extensions; do
26137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26138    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
26139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26140    break 2
26141  fi
26142done
26143  done
26144IFS=$as_save_IFS
26145
26146  ;;
26147esac
26148fi
26149NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
26150if test -n "$NATIVE2ASCII"; then
26151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
26152$as_echo "$NATIVE2ASCII" >&6; }
26153else
26154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26155$as_echo "no" >&6; }
26156fi
26157
26158
26159        if test "x$NATIVE2ASCII" = x; then
26160          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26161        fi
26162      else
26163        # Otherwise we believe it is a complete path. Use it as it is.
26164        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
26165$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
26166        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
26167$as_echo_n "checking for NATIVE2ASCII... " >&6; }
26168        if test ! -x "$tool_specified"; then
26169          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26170$as_echo "not found" >&6; }
26171          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
26172        fi
26173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26174$as_echo "$tool_specified" >&6; }
26175      fi
26176    fi
26177  fi
26178
26179
26180
26181  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26182
26183  # Publish this variable in the help.
26184
26185
26186  if test "x$JARSIGNER" = x; then
26187    # The variable is not set by user, try to locate tool using the code snippet
26188
26189      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26190$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26191      JARSIGNER=$BOOT_JDK/bin/jarsigner
26192      if test ! -x $JARSIGNER; then
26193        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26194$as_echo "not found" >&6; }
26195        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26196$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26197        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26198      fi
26199      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26200$as_echo "ok" >&6; }
26201
26202
26203  else
26204    # The variable is set, but is it from the command line or the environment?
26205
26206    # Try to remove the string !JARSIGNER! from our list.
26207    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26208    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26209      # If it failed, the variable was not from the command line. Ignore it,
26210      # but warn the user (except for BASH, which is always set by the calling BASH).
26211      if test "xJARSIGNER" != xBASH; then
26212        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26213$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26214      fi
26215      # Try to locate tool using the code snippet
26216
26217      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26218$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26219      JARSIGNER=$BOOT_JDK/bin/jarsigner
26220      if test ! -x $JARSIGNER; then
26221        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26222$as_echo "not found" >&6; }
26223        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26224$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26225        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26226      fi
26227      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26228$as_echo "ok" >&6; }
26229
26230
26231    else
26232      # If it succeeded, then it was overridden by the user. We will use it
26233      # for the tool.
26234
26235      # First remove it from the list of overridden variables, so we can test
26236      # for unknown variables in the end.
26237      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26238
26239      # Check if the provided tool contains a complete path.
26240      tool_specified="$JARSIGNER"
26241      tool_basename="${tool_specified##*/}"
26242      if test "x$tool_basename" = "x$tool_specified"; then
26243        # A command without a complete path is provided, search $PATH.
26244        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26245$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26246        # Extract the first word of "$tool_basename", so it can be a program name with args.
26247set dummy $tool_basename; ac_word=$2
26248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26249$as_echo_n "checking for $ac_word... " >&6; }
26250if ${ac_cv_path_JARSIGNER+:} false; then :
26251  $as_echo_n "(cached) " >&6
26252else
26253  case $JARSIGNER in
26254  [\\/]* | ?:[\\/]*)
26255  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26256  ;;
26257  *)
26258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26259for as_dir in $PATH
26260do
26261  IFS=$as_save_IFS
26262  test -z "$as_dir" && as_dir=.
26263    for ac_exec_ext in '' $ac_executable_extensions; do
26264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26265    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26267    break 2
26268  fi
26269done
26270  done
26271IFS=$as_save_IFS
26272
26273  ;;
26274esac
26275fi
26276JARSIGNER=$ac_cv_path_JARSIGNER
26277if test -n "$JARSIGNER"; then
26278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26279$as_echo "$JARSIGNER" >&6; }
26280else
26281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26282$as_echo "no" >&6; }
26283fi
26284
26285
26286        if test "x$JARSIGNER" = x; then
26287          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26288        fi
26289      else
26290        # Otherwise we believe it is a complete path. Use it as it is.
26291        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26292$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26293        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26294$as_echo_n "checking for JARSIGNER... " >&6; }
26295        if test ! -x "$tool_specified"; then
26296          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26297$as_echo "not found" >&6; }
26298          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26299        fi
26300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26301$as_echo "$tool_specified" >&6; }
26302      fi
26303    fi
26304  fi
26305
26306
26307
26308  # Finally, set some other options...
26309
26310  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26311  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26312
26313
26314
26315
26316###############################################################################
26317#
26318# Configure the sources to use. We can add or override individual directories.
26319#
26320###############################################################################
26321
26322
26323  # Where are the sources. Any of these can be overridden
26324  # using --with-override-corba and the likes.
26325  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26326  CORBA_TOPDIR="$SRC_ROOT/corba"
26327  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26328  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26329  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26330  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26331  JDK_TOPDIR="$SRC_ROOT/jdk"
26332
26333
26334
26335
26336
26337
26338
26339
26340
26341
26342  ###############################################################################
26343  #
26344  # Pickup additional source for a component from outside of the source root
26345  # or override source for a component.
26346  #
26347
26348# Check whether --with-add-source-root was given.
26349if test "${with_add_source_root+set}" = set; then :
26350  withval=$with_add_source_root;
26351fi
26352
26353
26354
26355# Check whether --with-override-source-root was given.
26356if test "${with_override_source_root+set}" = set; then :
26357  withval=$with_override_source_root;
26358fi
26359
26360
26361
26362# Check whether --with-adds-and-overrides was given.
26363if test "${with_adds_and_overrides+set}" = set; then :
26364  withval=$with_adds_and_overrides;
26365fi
26366
26367
26368  if test "x$with_adds_and_overrides" != x; then
26369    with_add_source_root="$with_adds_and_overrides/adds"
26370    with_override_source_root="$with_adds_and_overrides/overrides"
26371  fi
26372
26373  if test "x$with_add_source_root" != x; then
26374    if ! test -d $with_add_source_root; then
26375      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26376    fi
26377    CURDIR="$PWD"
26378    cd "$with_add_source_root"
26379    ADD_SRC_ROOT="`pwd`"
26380    cd "$CURDIR"
26381    # Verify that the addon source root does not have any root makefiles.
26382    # If it does, then it is usually an error, prevent this.
26383    if test -f $with_add_source_root/langtools/make/Makefile; then
26384      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
26385    fi
26386    if test -f $with_add_source_root/corba/make/Makefile; then
26387      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
26388    fi
26389    if test -f $with_add_source_root/jaxp/make/Makefile; then
26390      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
26391    fi
26392    if test -f $with_add_source_root/jaxws/make/Makefile; then
26393      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
26394    fi
26395    if test -f $with_add_source_root/hotspot/make/Makefile; then
26396      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
26397    fi
26398    if test -f $with_add_source_root/nashorn/make/Makefile; then
26399      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
26400    fi
26401    if test -f $with_add_source_root/jdk/make/Makefile; then
26402      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
26403    fi
26404  fi
26405
26406
26407  if test "x$with_override_source_root" != x; then
26408    if ! test -d $with_override_source_root; then
26409      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26410    fi
26411    CURDIR="$PWD"
26412    cd "$with_override_source_root"
26413    OVERRIDE_SRC_ROOT="`pwd`"
26414    cd "$CURDIR"
26415    if test -f $with_override_source_root/langtools/make/Makefile; then
26416      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
26417    fi
26418    if test -f $with_override_source_root/corba/make/Makefile; then
26419      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
26420    fi
26421    if test -f $with_override_source_root/jaxp/make/Makefile; then
26422      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
26423    fi
26424    if test -f $with_override_source_root/jaxws/make/Makefile; then
26425      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
26426    fi
26427    if test -f $with_override_source_root/hotspot/make/Makefile; then
26428      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
26429    fi
26430    if test -f $with_override_source_root/nashorn/make/Makefile; then
26431      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
26432    fi
26433    if test -f $with_override_source_root/jdk/make/Makefile; then
26434      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
26435    fi
26436  fi
26437
26438
26439  ###############################################################################
26440  #
26441  # Override a repo completely, this is used for example when you have 3 small
26442  # development sandboxes of the langtools sources and want to avoid having 3 full
26443  # OpenJDK sources checked out on disk.
26444  #
26445  # Assuming that the 3 langtools sandboxes are located here:
26446  # /home/fredrik/sandbox1/langtools
26447  # /home/fredrik/sandbox2/langtools
26448  # /home/fredrik/sandbox3/langtools
26449  #
26450  # From the source root you create build subdirs manually:
26451  #     mkdir -p build1 build2 build3
26452  # in each build directory run:
26453  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26454  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26455  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26456  #
26457
26458
26459# Check whether --with-override-langtools was given.
26460if test "${with_override_langtools+set}" = set; then :
26461  withval=$with_override_langtools;
26462fi
26463
26464
26465
26466# Check whether --with-override-corba was given.
26467if test "${with_override_corba+set}" = set; then :
26468  withval=$with_override_corba;
26469fi
26470
26471
26472
26473# Check whether --with-override-jaxp was given.
26474if test "${with_override_jaxp+set}" = set; then :
26475  withval=$with_override_jaxp;
26476fi
26477
26478
26479
26480# Check whether --with-override-jaxws was given.
26481if test "${with_override_jaxws+set}" = set; then :
26482  withval=$with_override_jaxws;
26483fi
26484
26485
26486
26487# Check whether --with-override-hotspot was given.
26488if test "${with_override_hotspot+set}" = set; then :
26489  withval=$with_override_hotspot;
26490fi
26491
26492
26493
26494# Check whether --with-override-nashorn was given.
26495if test "${with_override_nashorn+set}" = set; then :
26496  withval=$with_override_nashorn;
26497fi
26498
26499
26500
26501# Check whether --with-override-jdk was given.
26502if test "${with_override_jdk+set}" = set; then :
26503  withval=$with_override_jdk;
26504fi
26505
26506
26507  if test "x$with_override_langtools" != x; then
26508    CURDIR="$PWD"
26509    cd "$with_override_langtools"
26510    LANGTOOLS_TOPDIR="`pwd`"
26511    cd "$CURDIR"
26512    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26513      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26514    fi
26515    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26516$as_echo_n "checking if langtools should be overridden... " >&6; }
26517    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26518$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26519  fi
26520  if test "x$with_override_corba" != x; then
26521    CURDIR="$PWD"
26522    cd "$with_override_corba"
26523    CORBA_TOPDIR="`pwd`"
26524    cd "$CURDIR"
26525    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26526      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26527    fi
26528    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26529$as_echo_n "checking if corba should be overridden... " >&6; }
26530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26531$as_echo "yes with $CORBA_TOPDIR" >&6; }
26532  fi
26533  if test "x$with_override_jaxp" != x; then
26534    CURDIR="$PWD"
26535    cd "$with_override_jaxp"
26536    JAXP_TOPDIR="`pwd`"
26537    cd "$CURDIR"
26538    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26539      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26540    fi
26541    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26542$as_echo_n "checking if jaxp should be overridden... " >&6; }
26543    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26544$as_echo "yes with $JAXP_TOPDIR" >&6; }
26545  fi
26546  if test "x$with_override_jaxws" != x; then
26547    CURDIR="$PWD"
26548    cd "$with_override_jaxws"
26549    JAXWS_TOPDIR="`pwd`"
26550    cd "$CURDIR"
26551    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26552      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26553    fi
26554    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26555$as_echo_n "checking if jaxws should be overridden... " >&6; }
26556    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26557$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26558  fi
26559  if test "x$with_override_hotspot" != x; then
26560    CURDIR="$PWD"
26561    cd "$with_override_hotspot"
26562    HOTSPOT_TOPDIR="`pwd`"
26563    cd "$CURDIR"
26564    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26565      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26566    fi
26567    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26568$as_echo_n "checking if hotspot should be overridden... " >&6; }
26569    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26570$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26571  fi
26572  if test "x$with_override_nashorn" != x; then
26573    CURDIR="$PWD"
26574    cd "$with_override_nashorn"
26575    NASHORN_TOPDIR="`pwd`"
26576    cd "$CURDIR"
26577    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26578      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26579    fi
26580    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26581$as_echo_n "checking if nashorn should be overridden... " >&6; }
26582    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26583$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26584  fi
26585  if test "x$with_override_jdk" != x; then
26586    CURDIR="$PWD"
26587    cd "$with_override_jdk"
26588    JDK_TOPDIR="`pwd`"
26589    cd "$CURDIR"
26590    if ! test -f $JDK_TOPDIR/make/Makefile; then
26591      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26592    fi
26593    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26594$as_echo_n "checking if JDK should be overridden... " >&6; }
26595    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26596$as_echo "yes with $JDK_TOPDIR" >&6; }
26597  fi
26598
26599
26600  BUILD_OUTPUT="$OUTPUT_ROOT"
26601
26602
26603  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26604  BUILD_HOTSPOT=true
26605
26606
26607
26608# Check whether --with-import-hotspot was given.
26609if test "${with_import_hotspot+set}" = set; then :
26610  withval=$with_import_hotspot;
26611fi
26612
26613  if test "x$with_import_hotspot" != x; then
26614    CURDIR="$PWD"
26615    cd "$with_import_hotspot"
26616    HOTSPOT_DIST="`pwd`"
26617    cd "$CURDIR"
26618    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26619      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26620    fi
26621    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26622$as_echo_n "checking if hotspot should be imported... " >&6; }
26623    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26624$as_echo "yes from $HOTSPOT_DIST" >&6; }
26625    BUILD_HOTSPOT=false
26626  fi
26627
26628  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26629
26630
26631###############################################################################
26632#
26633# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26634# native code.
26635#
26636###############################################################################
26637
26638# First determine the toolchain type (compiler family)
26639
26640
26641# Check whether --with-toolchain-type was given.
26642if test "${with_toolchain_type+set}" = set; then :
26643  withval=$with_toolchain_type;
26644fi
26645
26646
26647  # Use indirect variable referencing
26648  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26649  VALID_TOOLCHAINS=${!toolchain_var_name}
26650
26651  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26652    if test -n "$XCODEBUILD"; then
26653      # On Mac OS X, default toolchain to clang after Xcode 5
26654      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26655      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26656      if test $? -ne 0; then
26657        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26658      fi
26659      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26660          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26661          $CUT -f 1 -d .`
26662      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26663$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26664      if test $XCODE_MAJOR_VERSION -ge 5; then
26665          DEFAULT_TOOLCHAIN="clang"
26666      else
26667          DEFAULT_TOOLCHAIN="gcc"
26668      fi
26669    else
26670      # If Xcode is not installed, but the command line tools are
26671      # then we can't run xcodebuild. On these systems we should
26672      # default to clang
26673      DEFAULT_TOOLCHAIN="clang"
26674    fi
26675  else
26676    # First toolchain type in the list is the default
26677    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26678  fi
26679
26680  if test "x$with_toolchain_type" = xlist; then
26681    # List all toolchains
26682    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26683$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26684    for toolchain in $VALID_TOOLCHAINS; do
26685      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26686      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26687      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26688    done
26689
26690    exit 0
26691  elif test "x$with_toolchain_type" != x; then
26692    # User override; check that it is valid
26693    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26694      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26695$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26696      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26697$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26698      as_fn_error $? "Cannot continue." "$LINENO" 5
26699    fi
26700    TOOLCHAIN_TYPE=$with_toolchain_type
26701  else
26702    # No flag given, use default
26703    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26704  fi
26705
26706
26707  TOOLCHAIN_CC_BINARY_clang="clang"
26708  TOOLCHAIN_CC_BINARY_gcc="gcc"
26709  TOOLCHAIN_CC_BINARY_microsoft="cl"
26710  TOOLCHAIN_CC_BINARY_solstudio="cc"
26711  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26712
26713  TOOLCHAIN_CXX_BINARY_clang="clang++"
26714  TOOLCHAIN_CXX_BINARY_gcc="g++"
26715  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26716  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26717  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26718
26719  # Use indirect variable referencing
26720  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26721  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26722  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26723  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26724  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26725  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26726
26727
26728  # Define filename patterns
26729  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26730    LIBRARY_PREFIX=
26731    SHARED_LIBRARY_SUFFIX='.dll'
26732    STATIC_LIBRARY_SUFFIX='.lib'
26733    SHARED_LIBRARY='$1.dll'
26734    STATIC_LIBRARY='$1.lib'
26735    OBJ_SUFFIX='.obj'
26736    EXE_SUFFIX='.exe'
26737  else
26738    LIBRARY_PREFIX=lib
26739    SHARED_LIBRARY_SUFFIX='.so'
26740    STATIC_LIBRARY_SUFFIX='.a'
26741    SHARED_LIBRARY='lib$1.so'
26742    STATIC_LIBRARY='lib$1.a'
26743    OBJ_SUFFIX='.o'
26744    EXE_SUFFIX=''
26745    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26746      SHARED_LIBRARY='lib$1.dylib'
26747      SHARED_LIBRARY_SUFFIX='.dylib'
26748    fi
26749  fi
26750
26751
26752
26753
26754
26755
26756
26757
26758
26759
26760  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26761    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26762$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26763  else
26764    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26765$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26766  fi
26767
26768
26769# Then detect the actual binaries needed
26770
26771  # FIXME: Is this needed?
26772  ac_ext=cpp
26773ac_cpp='$CXXCPP $CPPFLAGS'
26774ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26775ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26776ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26777
26778
26779  # Store the CFLAGS etc passed to the configure script.
26780  ORG_CFLAGS="$CFLAGS"
26781  ORG_CXXFLAGS="$CXXFLAGS"
26782  ORG_OBJCFLAGS="$OBJCFLAGS"
26783
26784  # On Windows, we need to detect the visual studio installation first.
26785  # This will change the PATH, but we need to keep that new PATH even
26786  # after toolchain detection is done, since the compiler (on x86) uses
26787  # it for DLL resolution in runtime.
26788  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26789
26790  # Store path to cygwin link.exe to help excluding it when searching for
26791  # VS linker. This must be done before changing the PATH when looking for VS.
26792  # Extract the first word of "link", so it can be a program name with args.
26793set dummy link; ac_word=$2
26794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26795$as_echo_n "checking for $ac_word... " >&6; }
26796if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26797  $as_echo_n "(cached) " >&6
26798else
26799  case $CYGWIN_LINK in
26800  [\\/]* | ?:[\\/]*)
26801  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26802  ;;
26803  *)
26804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26805for as_dir in $PATH
26806do
26807  IFS=$as_save_IFS
26808  test -z "$as_dir" && as_dir=.
26809    for ac_exec_ext in '' $ac_executable_extensions; do
26810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26811    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26813    break 2
26814  fi
26815done
26816  done
26817IFS=$as_save_IFS
26818
26819  ;;
26820esac
26821fi
26822CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26823if test -n "$CYGWIN_LINK"; then
26824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26825$as_echo "$CYGWIN_LINK" >&6; }
26826else
26827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26828$as_echo "no" >&6; }
26829fi
26830
26831
26832  if test "x$CYGWIN_LINK" != x; then
26833    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26834$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26835    "$CYGWIN_LINK" --version > /dev/null
26836    if test $? -eq 0 ; then
26837      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26838$as_echo "yes" >&6; }
26839    else
26840      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26841$as_echo "no" >&6; }
26842      # This might be the VS linker. Don't exclude it later on.
26843      CYGWIN_LINK=""
26844    fi
26845  fi
26846
26847  # First-hand choice is to locate and run the vsvars bat file.
26848
26849  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26850    VCVARSFILE="vc/bin/vcvars32.bat"
26851  else
26852    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26853  fi
26854
26855  VS_ENV_CMD=""
26856  VS_ENV_ARGS=""
26857  if test "x$with_toolsdir" != x; then
26858
26859  if test "x$VS_ENV_CMD" = x; then
26860    VS100BASE="$with_toolsdir/../.."
26861    METHOD="--with-tools-dir"
26862
26863  windows_path="$VS100BASE"
26864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26865    unix_path=`$CYGPATH -u "$windows_path"`
26866    VS100BASE="$unix_path"
26867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26869    VS100BASE="$unix_path"
26870  fi
26871
26872    if test -d "$VS100BASE"; then
26873      if test -f "$VS100BASE/$VCVARSFILE"; then
26874        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26875$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26876        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26877        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26878        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26879        # TODO: improve detection for other versions of VS
26880        PLATFORM_TOOLSET="v100"
26881      else
26882        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26883$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26884        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26885$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26886      fi
26887    fi
26888  fi
26889
26890  fi
26891
26892  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26893    # Having specified an argument which is incorrect will produce an instant failure;
26894    # we should not go on looking
26895    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26896$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26897    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26898$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26899    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26900  fi
26901
26902  if test "x$VS100COMNTOOLS" != x; then
26903
26904  if test "x$VS_ENV_CMD" = x; then
26905    VS100BASE="$VS100COMNTOOLS/../.."
26906    METHOD="VS100COMNTOOLS variable"
26907
26908  windows_path="$VS100BASE"
26909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26910    unix_path=`$CYGPATH -u "$windows_path"`
26911    VS100BASE="$unix_path"
26912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26914    VS100BASE="$unix_path"
26915  fi
26916
26917    if test -d "$VS100BASE"; then
26918      if test -f "$VS100BASE/$VCVARSFILE"; then
26919        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26920$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26921        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26922        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26923        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26924        # TODO: improve detection for other versions of VS
26925        PLATFORM_TOOLSET="v100"
26926      else
26927        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26928$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26929        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26930$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26931      fi
26932    fi
26933  fi
26934
26935  fi
26936  if test "x$PROGRAMFILES" != x; then
26937
26938  if test "x$VS_ENV_CMD" = x; then
26939    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26940    METHOD="well-known name"
26941
26942  windows_path="$VS100BASE"
26943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26944    unix_path=`$CYGPATH -u "$windows_path"`
26945    VS100BASE="$unix_path"
26946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26948    VS100BASE="$unix_path"
26949  fi
26950
26951    if test -d "$VS100BASE"; then
26952      if test -f "$VS100BASE/$VCVARSFILE"; then
26953        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26954$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26955        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26956        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26957        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26958        # TODO: improve detection for other versions of VS
26959        PLATFORM_TOOLSET="v100"
26960      else
26961        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26962$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26963        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26964$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26965      fi
26966    fi
26967  fi
26968
26969  fi
26970
26971  if test "x$VS_ENV_CMD" = x; then
26972    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26973    METHOD="well-known name"
26974
26975  windows_path="$VS100BASE"
26976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26977    unix_path=`$CYGPATH -u "$windows_path"`
26978    VS100BASE="$unix_path"
26979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26981    VS100BASE="$unix_path"
26982  fi
26983
26984    if test -d "$VS100BASE"; then
26985      if test -f "$VS100BASE/$VCVARSFILE"; then
26986        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26987$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26988        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26989        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26990        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26991        # TODO: improve detection for other versions of VS
26992        PLATFORM_TOOLSET="v100"
26993      else
26994        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26995$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26996        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26997$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26998      fi
26999    fi
27000  fi
27001
27002
27003  if test "x$VS_ENV_CMD" = x; then
27004    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
27005    METHOD="well-known name"
27006
27007  windows_path="$VS100BASE"
27008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27009    unix_path=`$CYGPATH -u "$windows_path"`
27010    VS100BASE="$unix_path"
27011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27013    VS100BASE="$unix_path"
27014  fi
27015
27016    if test -d "$VS100BASE"; then
27017      if test -f "$VS100BASE/$VCVARSFILE"; then
27018        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27019$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27020        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27021        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27022        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27023        # TODO: improve detection for other versions of VS
27024        PLATFORM_TOOLSET="v100"
27025      else
27026        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27027$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27028        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27029$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27030      fi
27031    fi
27032  fi
27033
27034
27035  if test "x$ProgramW6432" != x; then
27036
27037  if test "x$VS_ENV_CMD" = x; then
27038    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
27039    METHOD="well-known name"
27040
27041  windows_path="$WIN_SDK_BASE"
27042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27043    unix_path=`$CYGPATH -u "$windows_path"`
27044    WIN_SDK_BASE="$unix_path"
27045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27047    WIN_SDK_BASE="$unix_path"
27048  fi
27049
27050    if test -d "$WIN_SDK_BASE"; then
27051      # There have been cases of partial or broken SDK installations. A missing
27052      # lib dir is not going to work.
27053      if test ! -d "$WIN_SDK_BASE/../lib"; then
27054        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27055$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27056        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27057$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27058      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27059        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27060$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27061        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27062        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27063          VS_ENV_ARGS="/x86"
27064        else
27065          VS_ENV_ARGS="/x64"
27066        fi
27067        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27068        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27069        # TODO: improve detection for other versions of SDK
27070        PLATFORM_TOOLSET="Windows7.1SDK"
27071      else
27072        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27073$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27074        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27075$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27076      fi
27077    fi
27078  fi
27079
27080  fi
27081  if test "x$PROGRAMW6432" != x; then
27082
27083  if test "x$VS_ENV_CMD" = x; then
27084    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
27085    METHOD="well-known name"
27086
27087  windows_path="$WIN_SDK_BASE"
27088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27089    unix_path=`$CYGPATH -u "$windows_path"`
27090    WIN_SDK_BASE="$unix_path"
27091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27093    WIN_SDK_BASE="$unix_path"
27094  fi
27095
27096    if test -d "$WIN_SDK_BASE"; then
27097      # There have been cases of partial or broken SDK installations. A missing
27098      # lib dir is not going to work.
27099      if test ! -d "$WIN_SDK_BASE/../lib"; then
27100        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27101$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27102        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27103$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27104      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27105        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27106$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27107        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27108        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27109          VS_ENV_ARGS="/x86"
27110        else
27111          VS_ENV_ARGS="/x64"
27112        fi
27113        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27114        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27115        # TODO: improve detection for other versions of SDK
27116        PLATFORM_TOOLSET="Windows7.1SDK"
27117      else
27118        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27119$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27120        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27121$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27122      fi
27123    fi
27124  fi
27125
27126  fi
27127  if test "x$PROGRAMFILES" != x; then
27128
27129  if test "x$VS_ENV_CMD" = x; then
27130    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
27131    METHOD="well-known name"
27132
27133  windows_path="$WIN_SDK_BASE"
27134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27135    unix_path=`$CYGPATH -u "$windows_path"`
27136    WIN_SDK_BASE="$unix_path"
27137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27139    WIN_SDK_BASE="$unix_path"
27140  fi
27141
27142    if test -d "$WIN_SDK_BASE"; then
27143      # There have been cases of partial or broken SDK installations. A missing
27144      # lib dir is not going to work.
27145      if test ! -d "$WIN_SDK_BASE/../lib"; then
27146        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27147$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27148        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27149$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27150      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27151        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27152$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27153        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27154        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27155          VS_ENV_ARGS="/x86"
27156        else
27157          VS_ENV_ARGS="/x64"
27158        fi
27159        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27160        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27161        # TODO: improve detection for other versions of SDK
27162        PLATFORM_TOOLSET="Windows7.1SDK"
27163      else
27164        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27165$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27166        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27167$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27168      fi
27169    fi
27170  fi
27171
27172  fi
27173
27174  if test "x$VS_ENV_CMD" = x; then
27175    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
27176    METHOD="well-known name"
27177
27178  windows_path="$WIN_SDK_BASE"
27179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27180    unix_path=`$CYGPATH -u "$windows_path"`
27181    WIN_SDK_BASE="$unix_path"
27182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27184    WIN_SDK_BASE="$unix_path"
27185  fi
27186
27187    if test -d "$WIN_SDK_BASE"; then
27188      # There have been cases of partial or broken SDK installations. A missing
27189      # lib dir is not going to work.
27190      if test ! -d "$WIN_SDK_BASE/../lib"; then
27191        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27192$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27193        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27194$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27195      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27196        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27197$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27198        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27199        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27200          VS_ENV_ARGS="/x86"
27201        else
27202          VS_ENV_ARGS="/x64"
27203        fi
27204        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27205        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27206        # TODO: improve detection for other versions of SDK
27207        PLATFORM_TOOLSET="Windows7.1SDK"
27208      else
27209        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27210$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27211        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27212$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27213      fi
27214    fi
27215  fi
27216
27217
27218  if test "x$VS_ENV_CMD" = x; then
27219    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
27220    METHOD="well-known name"
27221
27222  windows_path="$WIN_SDK_BASE"
27223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27224    unix_path=`$CYGPATH -u "$windows_path"`
27225    WIN_SDK_BASE="$unix_path"
27226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27228    WIN_SDK_BASE="$unix_path"
27229  fi
27230
27231    if test -d "$WIN_SDK_BASE"; then
27232      # There have been cases of partial or broken SDK installations. A missing
27233      # lib dir is not going to work.
27234      if test ! -d "$WIN_SDK_BASE/../lib"; then
27235        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27236$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27237        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27238$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27239      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27240        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27241$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27242        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27243        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27244          VS_ENV_ARGS="/x86"
27245        else
27246          VS_ENV_ARGS="/x64"
27247        fi
27248        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27249        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27250        # TODO: improve detection for other versions of SDK
27251        PLATFORM_TOOLSET="Windows7.1SDK"
27252      else
27253        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27254$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27255        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27256$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27257      fi
27258    fi
27259  fi
27260
27261
27262  if test "x$VS_ENV_CMD" != x; then
27263    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27264
27265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27266
27267  # First separate the path from the arguments. This will split at the first
27268  # space.
27269  complete="$VS_ENV_CMD"
27270  path="${complete%% *}"
27271  tmp="$complete EOL"
27272  arguments="${tmp#* }"
27273
27274  # Input might be given as Windows format, start by converting to
27275  # unix format.
27276  new_path=`$CYGPATH -u "$path"`
27277
27278  # Now try to locate executable using which
27279  new_path=`$WHICH "$new_path" 2> /dev/null`
27280  # bat and cmd files are not always considered executable in cygwin causing which
27281  # to not find them
27282  if test "x$new_path" = x \
27283      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27284      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27285    new_path=`$CYGPATH -u "$path"`
27286  fi
27287  if test "x$new_path" = x; then
27288    # Oops. Which didn't find the executable.
27289    # The splitting of arguments from the executable at a space might have been incorrect,
27290    # since paths with space are more likely in Windows. Give it another try with the whole
27291    # argument.
27292    path="$complete"
27293    arguments="EOL"
27294    new_path=`$CYGPATH -u "$path"`
27295    new_path=`$WHICH "$new_path" 2> /dev/null`
27296    # bat and cmd files are not always considered executable in cygwin causing which
27297    # to not find them
27298    if test "x$new_path" = x \
27299        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27300        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27301      new_path=`$CYGPATH -u "$path"`
27302    fi
27303    if test "x$new_path" = x; then
27304      # It's still not found. Now this is an unrecoverable error.
27305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27306$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27307      has_space=`$ECHO "$complete" | $GREP " "`
27308      if test "x$has_space" != x; then
27309        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27310$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27311      fi
27312      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27313    fi
27314  fi
27315
27316  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27317  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27318  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27319  # "foo.exe" is OK but "foo" is an error.
27320  #
27321  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27322  # It is also a way to make sure we got the proper file name for the real test later on.
27323  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27324  if test "x$test_shortpath" = x; then
27325    # Short path failed, file does not exist as specified.
27326    # Try adding .exe or .cmd
27327    if test -f "${new_path}.exe"; then
27328      input_to_shortpath="${new_path}.exe"
27329    elif test -f "${new_path}.cmd"; then
27330      input_to_shortpath="${new_path}.cmd"
27331    else
27332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27333$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27334      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27335$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27336      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27337    fi
27338  else
27339    input_to_shortpath="$new_path"
27340  fi
27341
27342  # Call helper function which possibly converts this using DOS-style short mode.
27343  # If so, the updated path is stored in $new_path.
27344  new_path="$input_to_shortpath"
27345
27346  input_path="$input_to_shortpath"
27347  # Check if we need to convert this using DOS-style short mode. If the path
27348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27349  # take no chances and rewrite it.
27350  # Note: m4 eats our [], so we need to use [ and ] instead.
27351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27352  if test "x$has_forbidden_chars" != x; then
27353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27354    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27355    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27356    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27357      # Going to short mode and back again did indeed matter. Since short mode is
27358      # case insensitive, let's make it lowercase to improve readability.
27359      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27360      # Now convert it back to Unix-stile (cygpath)
27361      input_path=`$CYGPATH -u "$shortmode_path"`
27362      new_path="$input_path"
27363    fi
27364  fi
27365
27366  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27367  if test "x$test_cygdrive_prefix" = x; then
27368    # As a simple fix, exclude /usr/bin since it's not a real path.
27369    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27370      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27371      # a path prefixed by /cygdrive for fixpath to work.
27372      new_path="$CYGWIN_ROOT_PATH$input_path"
27373    fi
27374  fi
27375
27376  # remove trailing .exe if any
27377  new_path="${new_path/%.exe/}"
27378
27379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27380
27381  # First separate the path from the arguments. This will split at the first
27382  # space.
27383  complete="$VS_ENV_CMD"
27384  path="${complete%% *}"
27385  tmp="$complete EOL"
27386  arguments="${tmp#* }"
27387
27388  # Input might be given as Windows format, start by converting to
27389  # unix format.
27390  new_path="$path"
27391
27392  windows_path="$new_path"
27393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27394    unix_path=`$CYGPATH -u "$windows_path"`
27395    new_path="$unix_path"
27396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27398    new_path="$unix_path"
27399  fi
27400
27401
27402  # Now try to locate executable using which
27403  new_path=`$WHICH "$new_path" 2> /dev/null`
27404
27405  if test "x$new_path" = x; then
27406    # Oops. Which didn't find the executable.
27407    # The splitting of arguments from the executable at a space might have been incorrect,
27408    # since paths with space are more likely in Windows. Give it another try with the whole
27409    # argument.
27410    path="$complete"
27411    arguments="EOL"
27412    new_path="$path"
27413
27414  windows_path="$new_path"
27415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27416    unix_path=`$CYGPATH -u "$windows_path"`
27417    new_path="$unix_path"
27418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27420    new_path="$unix_path"
27421  fi
27422
27423
27424    new_path=`$WHICH "$new_path" 2> /dev/null`
27425    # bat and cmd files are not always considered executable in MSYS causing which
27426    # to not find them
27427    if test "x$new_path" = x \
27428        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27429        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27430      new_path="$path"
27431
27432  windows_path="$new_path"
27433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27434    unix_path=`$CYGPATH -u "$windows_path"`
27435    new_path="$unix_path"
27436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27438    new_path="$unix_path"
27439  fi
27440
27441    fi
27442
27443    if test "x$new_path" = x; then
27444      # It's still not found. Now this is an unrecoverable error.
27445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27446$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27447      has_space=`$ECHO "$complete" | $GREP " "`
27448      if test "x$has_space" != x; then
27449        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27450$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27451      fi
27452      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27453    fi
27454  fi
27455
27456  # Now new_path has a complete unix path to the binary
27457  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27458    # Keep paths in /bin as-is, but remove trailing .exe if any
27459    new_path="${new_path/%.exe/}"
27460    # Do not save /bin paths to all_fixpath_prefixes!
27461  else
27462    # Not in mixed or Windows style, start by that.
27463    new_path=`cmd //c echo $new_path`
27464
27465  input_path="$new_path"
27466  # Check if we need to convert this using DOS-style short mode. If the path
27467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27468  # take no chances and rewrite it.
27469  # Note: m4 eats our [], so we need to use [ and ] instead.
27470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27471  if test "x$has_forbidden_chars" != x; then
27472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27473    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27474  fi
27475
27476    # Output is in $new_path
27477
27478  windows_path="$new_path"
27479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27480    unix_path=`$CYGPATH -u "$windows_path"`
27481    new_path="$unix_path"
27482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27484    new_path="$unix_path"
27485  fi
27486
27487    # remove trailing .exe if any
27488    new_path="${new_path/%.exe/}"
27489
27490    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27491    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27492  fi
27493
27494  else
27495    # We're on a unix platform. Hooray! :)
27496    # First separate the path from the arguments. This will split at the first
27497    # space.
27498    complete="$VS_ENV_CMD"
27499    path="${complete%% *}"
27500    tmp="$complete EOL"
27501    arguments="${tmp#* }"
27502
27503    # Cannot rely on the command "which" here since it doesn't always work.
27504    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27505    if test -z "$is_absolute_path"; then
27506      # Path to executable is not absolute. Find it.
27507      IFS_save="$IFS"
27508      IFS=:
27509      for p in $PATH; do
27510        if test -f "$p/$path" && test -x "$p/$path"; then
27511          new_path="$p/$path"
27512          break
27513        fi
27514      done
27515      IFS="$IFS_save"
27516    else
27517      # This is an absolute path, we can use it without further modifications.
27518      new_path="$path"
27519    fi
27520
27521    if test "x$new_path" = x; then
27522      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27523$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27524      has_space=`$ECHO "$complete" | $GREP " "`
27525      if test "x$has_space" != x; then
27526        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27527$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27528      fi
27529      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27530    fi
27531  fi
27532
27533  # Now join together the path and the arguments once again
27534  if test "x$arguments" != xEOL; then
27535    new_complete="$new_path ${arguments% *}"
27536  else
27537    new_complete="$new_path"
27538  fi
27539
27540  if test "x$complete" != "x$new_complete"; then
27541    VS_ENV_CMD="$new_complete"
27542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27543$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27544  fi
27545
27546
27547    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27548    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27549$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27550
27551    # We need to create a couple of temporary files.
27552    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27553    $MKDIR -p $VS_ENV_TMP_DIR
27554
27555    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27556    # Instead create a shell script which will set the relevant variables when run.
27557    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27558
27559  unix_path="$WINPATH_VS_ENV_CMD"
27560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27561    windows_path=`$CYGPATH -m "$unix_path"`
27562    WINPATH_VS_ENV_CMD="$windows_path"
27563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27564    windows_path=`cmd //c echo $unix_path`
27565    WINPATH_VS_ENV_CMD="$windows_path"
27566  fi
27567
27568    WINPATH_BASH="$BASH"
27569
27570  unix_path="$WINPATH_BASH"
27571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27572    windows_path=`$CYGPATH -m "$unix_path"`
27573    WINPATH_BASH="$windows_path"
27574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27575    windows_path=`cmd //c echo $unix_path`
27576    WINPATH_BASH="$windows_path"
27577  fi
27578
27579
27580    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27581    # script (executable by bash) that will setup the important variables.
27582    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27583    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27584    # This will end up something like:
27585    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27586    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27587    # These will end up something like:
27588    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27589    # The trailing space for everyone except PATH is no typo, but is needed due
27590    # to trailing \ in the Windows paths. These will be stripped later.
27591    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27592    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27593    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27594    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27595    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27596    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27597
27598    # Now execute the newly created bat file.
27599    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27600    # Change directory so we don't need to mess with Windows paths in redirects.
27601    cd $VS_ENV_TMP_DIR
27602    cmd /c extract-vs-env.bat | $CAT
27603    cd $CURDIR
27604
27605    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27606      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27607$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27608      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27609$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27610      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27611$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27612      as_fn_error $? "Cannot continue" "$LINENO" 5
27613    fi
27614
27615    # Now set all paths and other env variables. This will allow the rest of
27616    # the configure script to find and run the compiler in the proper way.
27617    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27618$as_echo "$as_me: Setting extracted environment variables" >&6;}
27619    . $VS_ENV_TMP_DIR/set-vs-env.sh
27620    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27621    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27622  else
27623    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27624    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27625$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27626  fi
27627
27628  # At this point, we should have correct variables in the environment, or we can't continue.
27629  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27630$as_echo_n "checking for Visual Studio variables... " >&6; }
27631
27632  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27633    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27634      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27635$as_echo "present but broken" >&6; }
27636      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27637    else
27638      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27639$as_echo "ok" >&6; }
27640      # Remove any trailing "\" and " " from the variables.
27641      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27642      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27643      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27644      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27645      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27646      # Remove any paths containing # (typically F#) as that messes up make. This
27647      # is needed if visual studio was installed with F# support.
27648      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27649
27650
27651
27652
27653    fi
27654  else
27655    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27656$as_echo "not found" >&6; }
27657
27658    if test "x$VS_ENV_CMD" = x; then
27659      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27660$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27661      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27662$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27663    else
27664      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27665$as_echo "$as_me: Running the extraction script failed." >&6;}
27666    fi
27667    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27668$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27669    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27670$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27671    as_fn_error $? "Cannot continue" "$LINENO" 5
27672  fi
27673
27674    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27675    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27676    PATH="$VS_PATH"
27677    # The microsoft toolchain also requires INCLUDE and LIB to be set.
27678    export INCLUDE="$VS_INCLUDE"
27679    export LIB="$VS_LIB"
27680  fi
27681
27682  # autoconf magic only relies on PATH, so update it if tools dir is specified
27683  OLD_PATH="$PATH"
27684
27685  # For solaris we really need solaris tools, and not the GNU equivalent.
27686  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27687  # so add that to path before starting to probe.
27688  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27689  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27690    PATH="/usr/ccs/bin:$PATH"
27691  fi
27692
27693  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27694  # override all other locations.
27695  if test "x$TOOLCHAIN_PATH" != x; then
27696    PATH=$TOOLCHAIN_PATH:$PATH
27697  fi
27698
27699
27700  #
27701  # Setup the compilers (CC and CXX)
27702  #
27703
27704  COMPILER_NAME=C
27705  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27706
27707  if test "x$CC" != x; then
27708    # User has supplied compiler name already, always let that override.
27709    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27710$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27711    if test "x`basename $CC`" = "x$CC"; then
27712      # A command without a complete path is provided, search $PATH.
27713
27714      for ac_prog in $CC
27715do
27716  # Extract the first word of "$ac_prog", so it can be a program name with args.
27717set dummy $ac_prog; ac_word=$2
27718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27719$as_echo_n "checking for $ac_word... " >&6; }
27720if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27721  $as_echo_n "(cached) " >&6
27722else
27723  case $POTENTIAL_CC in
27724  [\\/]* | ?:[\\/]*)
27725  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27726  ;;
27727  *)
27728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27729for as_dir in $PATH
27730do
27731  IFS=$as_save_IFS
27732  test -z "$as_dir" && as_dir=.
27733    for ac_exec_ext in '' $ac_executable_extensions; do
27734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27735    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27737    break 2
27738  fi
27739done
27740  done
27741IFS=$as_save_IFS
27742
27743  ;;
27744esac
27745fi
27746POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27747if test -n "$POTENTIAL_CC"; then
27748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27749$as_echo "$POTENTIAL_CC" >&6; }
27750else
27751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27752$as_echo "no" >&6; }
27753fi
27754
27755
27756  test -n "$POTENTIAL_CC" && break
27757done
27758
27759      if test "x$POTENTIAL_CC" != x; then
27760        CC=$POTENTIAL_CC
27761      else
27762        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27763      fi
27764    else
27765      # Otherwise it might already be a complete path
27766      if test ! -x "$CC"; then
27767        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27768      fi
27769    fi
27770  else
27771    # No user supplied value. Locate compiler ourselves.
27772
27773    # If we are cross compiling, assume cross compilation tools follows the
27774    # cross compilation standard where they are prefixed with the autoconf
27775    # standard name for the target. For example the binary
27776    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27777    # If we are not cross compiling, then the default compiler name will be
27778    # used.
27779
27780    CC=
27781    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27782    # before checking the rest of the PATH.
27783    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27784    # step, this should not be necessary.
27785    if test -n "$TOOLCHAIN_PATH"; then
27786      PATH_save="$PATH"
27787      PATH="$TOOLCHAIN_PATH"
27788      for ac_prog in $SEARCH_LIST
27789do
27790  # Extract the first word of "$ac_prog", so it can be a program name with args.
27791set dummy $ac_prog; ac_word=$2
27792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27793$as_echo_n "checking for $ac_word... " >&6; }
27794if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27795  $as_echo_n "(cached) " >&6
27796else
27797  case $TOOLCHAIN_PATH_CC in
27798  [\\/]* | ?:[\\/]*)
27799  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27800  ;;
27801  *)
27802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27803for as_dir in $PATH
27804do
27805  IFS=$as_save_IFS
27806  test -z "$as_dir" && as_dir=.
27807    for ac_exec_ext in '' $ac_executable_extensions; do
27808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27809    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27811    break 2
27812  fi
27813done
27814  done
27815IFS=$as_save_IFS
27816
27817  ;;
27818esac
27819fi
27820TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27821if test -n "$TOOLCHAIN_PATH_CC"; then
27822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27823$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27824else
27825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27826$as_echo "no" >&6; }
27827fi
27828
27829
27830  test -n "$TOOLCHAIN_PATH_CC" && break
27831done
27832
27833      CC=$TOOLCHAIN_PATH_CC
27834      PATH="$PATH_save"
27835    fi
27836
27837    # AC_PATH_PROGS can't be run multiple times with the same variable,
27838    # so create a new name for this run.
27839    if test "x$CC" = x; then
27840      for ac_prog in $SEARCH_LIST
27841do
27842  # Extract the first word of "$ac_prog", so it can be a program name with args.
27843set dummy $ac_prog; ac_word=$2
27844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27845$as_echo_n "checking for $ac_word... " >&6; }
27846if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27847  $as_echo_n "(cached) " >&6
27848else
27849  case $POTENTIAL_CC in
27850  [\\/]* | ?:[\\/]*)
27851  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27852  ;;
27853  *)
27854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27855for as_dir in $PATH
27856do
27857  IFS=$as_save_IFS
27858  test -z "$as_dir" && as_dir=.
27859    for ac_exec_ext in '' $ac_executable_extensions; do
27860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27861    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27863    break 2
27864  fi
27865done
27866  done
27867IFS=$as_save_IFS
27868
27869  ;;
27870esac
27871fi
27872POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27873if test -n "$POTENTIAL_CC"; then
27874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27875$as_echo "$POTENTIAL_CC" >&6; }
27876else
27877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27878$as_echo "no" >&6; }
27879fi
27880
27881
27882  test -n "$POTENTIAL_CC" && break
27883done
27884
27885      CC=$POTENTIAL_CC
27886    fi
27887
27888    if test "x$CC" = x; then
27889
27890  # Print a helpful message on how to acquire the necessary build dependency.
27891  # devkit is the help tag: freetype, cups, pulse, alsa etc
27892  MISSING_DEPENDENCY=devkit
27893
27894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27895    cygwin_help $MISSING_DEPENDENCY
27896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27897    msys_help $MISSING_DEPENDENCY
27898  else
27899    PKGHANDLER_COMMAND=
27900
27901    case $PKGHANDLER in
27902      apt-get)
27903        apt_help     $MISSING_DEPENDENCY ;;
27904      yum)
27905        yum_help     $MISSING_DEPENDENCY ;;
27906      port)
27907        port_help    $MISSING_DEPENDENCY ;;
27908      pkgutil)
27909        pkgutil_help $MISSING_DEPENDENCY ;;
27910      pkgadd)
27911        pkgadd_help  $MISSING_DEPENDENCY ;;
27912    esac
27913
27914    if test "x$PKGHANDLER_COMMAND" != x; then
27915      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27916    fi
27917  fi
27918
27919      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27920    fi
27921  fi
27922
27923  # Now we have a compiler binary in CC. Make sure it's okay.
27924
27925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27926
27927  # First separate the path from the arguments. This will split at the first
27928  # space.
27929  complete="$CC"
27930  path="${complete%% *}"
27931  tmp="$complete EOL"
27932  arguments="${tmp#* }"
27933
27934  # Input might be given as Windows format, start by converting to
27935  # unix format.
27936  new_path=`$CYGPATH -u "$path"`
27937
27938  # Now try to locate executable using which
27939  new_path=`$WHICH "$new_path" 2> /dev/null`
27940  # bat and cmd files are not always considered executable in cygwin causing which
27941  # to not find them
27942  if test "x$new_path" = x \
27943      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27944      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27945    new_path=`$CYGPATH -u "$path"`
27946  fi
27947  if test "x$new_path" = x; then
27948    # Oops. Which didn't find the executable.
27949    # The splitting of arguments from the executable at a space might have been incorrect,
27950    # since paths with space are more likely in Windows. Give it another try with the whole
27951    # argument.
27952    path="$complete"
27953    arguments="EOL"
27954    new_path=`$CYGPATH -u "$path"`
27955    new_path=`$WHICH "$new_path" 2> /dev/null`
27956    # bat and cmd files are not always considered executable in cygwin causing which
27957    # to not find them
27958    if test "x$new_path" = x \
27959        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27960        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27961      new_path=`$CYGPATH -u "$path"`
27962    fi
27963    if test "x$new_path" = x; then
27964      # It's still not found. Now this is an unrecoverable error.
27965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27966$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27967      has_space=`$ECHO "$complete" | $GREP " "`
27968      if test "x$has_space" != x; then
27969        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27970$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27971      fi
27972      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27973    fi
27974  fi
27975
27976  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27977  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27978  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27979  # "foo.exe" is OK but "foo" is an error.
27980  #
27981  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27982  # It is also a way to make sure we got the proper file name for the real test later on.
27983  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27984  if test "x$test_shortpath" = x; then
27985    # Short path failed, file does not exist as specified.
27986    # Try adding .exe or .cmd
27987    if test -f "${new_path}.exe"; then
27988      input_to_shortpath="${new_path}.exe"
27989    elif test -f "${new_path}.cmd"; then
27990      input_to_shortpath="${new_path}.cmd"
27991    else
27992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27993$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27994      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27995$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27996      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27997    fi
27998  else
27999    input_to_shortpath="$new_path"
28000  fi
28001
28002  # Call helper function which possibly converts this using DOS-style short mode.
28003  # If so, the updated path is stored in $new_path.
28004  new_path="$input_to_shortpath"
28005
28006  input_path="$input_to_shortpath"
28007  # Check if we need to convert this using DOS-style short mode. If the path
28008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28009  # take no chances and rewrite it.
28010  # Note: m4 eats our [], so we need to use [ and ] instead.
28011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28012  if test "x$has_forbidden_chars" != x; then
28013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28014    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28015    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28016    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28017      # Going to short mode and back again did indeed matter. Since short mode is
28018      # case insensitive, let's make it lowercase to improve readability.
28019      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28020      # Now convert it back to Unix-stile (cygpath)
28021      input_path=`$CYGPATH -u "$shortmode_path"`
28022      new_path="$input_path"
28023    fi
28024  fi
28025
28026  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28027  if test "x$test_cygdrive_prefix" = x; then
28028    # As a simple fix, exclude /usr/bin since it's not a real path.
28029    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28030      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28031      # a path prefixed by /cygdrive for fixpath to work.
28032      new_path="$CYGWIN_ROOT_PATH$input_path"
28033    fi
28034  fi
28035
28036  # remove trailing .exe if any
28037  new_path="${new_path/%.exe/}"
28038
28039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28040
28041  # First separate the path from the arguments. This will split at the first
28042  # space.
28043  complete="$CC"
28044  path="${complete%% *}"
28045  tmp="$complete EOL"
28046  arguments="${tmp#* }"
28047
28048  # Input might be given as Windows format, start by converting to
28049  # unix format.
28050  new_path="$path"
28051
28052  windows_path="$new_path"
28053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28054    unix_path=`$CYGPATH -u "$windows_path"`
28055    new_path="$unix_path"
28056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28058    new_path="$unix_path"
28059  fi
28060
28061
28062  # Now try to locate executable using which
28063  new_path=`$WHICH "$new_path" 2> /dev/null`
28064
28065  if test "x$new_path" = x; then
28066    # Oops. Which didn't find the executable.
28067    # The splitting of arguments from the executable at a space might have been incorrect,
28068    # since paths with space are more likely in Windows. Give it another try with the whole
28069    # argument.
28070    path="$complete"
28071    arguments="EOL"
28072    new_path="$path"
28073
28074  windows_path="$new_path"
28075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28076    unix_path=`$CYGPATH -u "$windows_path"`
28077    new_path="$unix_path"
28078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28080    new_path="$unix_path"
28081  fi
28082
28083
28084    new_path=`$WHICH "$new_path" 2> /dev/null`
28085    # bat and cmd files are not always considered executable in MSYS causing which
28086    # to not find them
28087    if test "x$new_path" = x \
28088        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28089        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28090      new_path="$path"
28091
28092  windows_path="$new_path"
28093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28094    unix_path=`$CYGPATH -u "$windows_path"`
28095    new_path="$unix_path"
28096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28098    new_path="$unix_path"
28099  fi
28100
28101    fi
28102
28103    if test "x$new_path" = x; then
28104      # It's still not found. Now this is an unrecoverable error.
28105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28106$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28107      has_space=`$ECHO "$complete" | $GREP " "`
28108      if test "x$has_space" != x; then
28109        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28110$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28111      fi
28112      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28113    fi
28114  fi
28115
28116  # Now new_path has a complete unix path to the binary
28117  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28118    # Keep paths in /bin as-is, but remove trailing .exe if any
28119    new_path="${new_path/%.exe/}"
28120    # Do not save /bin paths to all_fixpath_prefixes!
28121  else
28122    # Not in mixed or Windows style, start by that.
28123    new_path=`cmd //c echo $new_path`
28124
28125  input_path="$new_path"
28126  # Check if we need to convert this using DOS-style short mode. If the path
28127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28128  # take no chances and rewrite it.
28129  # Note: m4 eats our [], so we need to use [ and ] instead.
28130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28131  if test "x$has_forbidden_chars" != x; then
28132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28133    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28134  fi
28135
28136    # Output is in $new_path
28137
28138  windows_path="$new_path"
28139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28140    unix_path=`$CYGPATH -u "$windows_path"`
28141    new_path="$unix_path"
28142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28144    new_path="$unix_path"
28145  fi
28146
28147    # remove trailing .exe if any
28148    new_path="${new_path/%.exe/}"
28149
28150    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28151    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28152  fi
28153
28154  else
28155    # We're on a unix platform. Hooray! :)
28156    # First separate the path from the arguments. This will split at the first
28157    # space.
28158    complete="$CC"
28159    path="${complete%% *}"
28160    tmp="$complete EOL"
28161    arguments="${tmp#* }"
28162
28163    # Cannot rely on the command "which" here since it doesn't always work.
28164    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28165    if test -z "$is_absolute_path"; then
28166      # Path to executable is not absolute. Find it.
28167      IFS_save="$IFS"
28168      IFS=:
28169      for p in $PATH; do
28170        if test -f "$p/$path" && test -x "$p/$path"; then
28171          new_path="$p/$path"
28172          break
28173        fi
28174      done
28175      IFS="$IFS_save"
28176    else
28177      # This is an absolute path, we can use it without further modifications.
28178      new_path="$path"
28179    fi
28180
28181    if test "x$new_path" = x; then
28182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28183$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28184      has_space=`$ECHO "$complete" | $GREP " "`
28185      if test "x$has_space" != x; then
28186        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28187$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28188      fi
28189      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28190    fi
28191  fi
28192
28193  # Now join together the path and the arguments once again
28194  if test "x$arguments" != xEOL; then
28195    new_complete="$new_path ${arguments% *}"
28196  else
28197    new_complete="$new_path"
28198  fi
28199
28200  if test "x$complete" != "x$new_complete"; then
28201    CC="$new_complete"
28202    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28203$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28204  fi
28205
28206  TEST_COMPILER="$CC"
28207  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28208  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28209  if test "x$OPENJDK_BUILD_OS" != xaix; then
28210    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28211    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28212$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28213
28214  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28215    # Follow a chain of symbolic links. Use readlink
28216    # where it exists, else fall back to horribly
28217    # complicated shell code.
28218    if test "x$READLINK_TESTED" != yes; then
28219      # On MacOSX there is a readlink tool with a different
28220      # purpose than the GNU readlink tool. Check the found readlink.
28221      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28222      if test "x$ISGNU" = x; then
28223        # A readlink that we do not know how to use.
28224        # Are there other non-GNU readlinks out there?
28225        READLINK_TESTED=yes
28226        READLINK=
28227      fi
28228    fi
28229
28230    if test "x$READLINK" != x; then
28231      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28232    else
28233      # Save the current directory for restoring afterwards
28234      STARTDIR=$PWD
28235      COUNTER=0
28236      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28237      sym_link_file=`$BASENAME $TEST_COMPILER`
28238      cd $sym_link_dir
28239      # Use -P flag to resolve symlinks in directories.
28240      cd `$THEPWDCMD -P`
28241      sym_link_dir=`$THEPWDCMD -P`
28242      # Resolve file symlinks
28243      while test $COUNTER -lt 20; do
28244        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28245        if test "x$ISLINK" == x; then
28246          # This is not a symbolic link! We are done!
28247          break
28248        fi
28249        # Again resolve directory symlinks since the target of the just found
28250        # link could be in a different directory
28251        cd `$DIRNAME $ISLINK`
28252        sym_link_dir=`$THEPWDCMD -P`
28253        sym_link_file=`$BASENAME $ISLINK`
28254        let COUNTER=COUNTER+1
28255      done
28256      cd $STARTDIR
28257      TEST_COMPILER=$sym_link_dir/$sym_link_file
28258    fi
28259  fi
28260
28261    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28262$as_echo "$TEST_COMPILER" >&6; }
28263  fi
28264  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28265$as_echo_n "checking if CC is disguised ccache... " >&6; }
28266
28267  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28268  if test "x$COMPILER_BASENAME" = "xccache"; then
28269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28270$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28271    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28272    # We want to control ccache invocation ourselves, so ignore this cc and try
28273    # searching again.
28274
28275    # Remove the path to the fake ccache cc from the PATH
28276    RETRY_COMPILER_SAVED_PATH="$PATH"
28277    COMPILER_DIRNAME=`$DIRNAME $CC`
28278    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28279
28280    # Try again looking for our compiler
28281    if test -n "$ac_tool_prefix"; then
28282  for ac_prog in $TOOLCHAIN_CC_BINARY
28283  do
28284    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28285set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28287$as_echo_n "checking for $ac_word... " >&6; }
28288if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28289  $as_echo_n "(cached) " >&6
28290else
28291  if test -n "$PROPER_COMPILER_CC"; then
28292  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28293else
28294as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28295for as_dir in $PATH
28296do
28297  IFS=$as_save_IFS
28298  test -z "$as_dir" && as_dir=.
28299    for ac_exec_ext in '' $ac_executable_extensions; do
28300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28301    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28303    break 2
28304  fi
28305done
28306  done
28307IFS=$as_save_IFS
28308
28309fi
28310fi
28311PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28312if test -n "$PROPER_COMPILER_CC"; then
28313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28314$as_echo "$PROPER_COMPILER_CC" >&6; }
28315else
28316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28317$as_echo "no" >&6; }
28318fi
28319
28320
28321    test -n "$PROPER_COMPILER_CC" && break
28322  done
28323fi
28324if test -z "$PROPER_COMPILER_CC"; then
28325  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28326  for ac_prog in $TOOLCHAIN_CC_BINARY
28327do
28328  # Extract the first word of "$ac_prog", so it can be a program name with args.
28329set dummy $ac_prog; ac_word=$2
28330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28331$as_echo_n "checking for $ac_word... " >&6; }
28332if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28333  $as_echo_n "(cached) " >&6
28334else
28335  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28336  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28337else
28338as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28339for as_dir in $PATH
28340do
28341  IFS=$as_save_IFS
28342  test -z "$as_dir" && as_dir=.
28343    for ac_exec_ext in '' $ac_executable_extensions; do
28344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28345    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28347    break 2
28348  fi
28349done
28350  done
28351IFS=$as_save_IFS
28352
28353fi
28354fi
28355ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28356if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28358$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28359else
28360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28361$as_echo "no" >&6; }
28362fi
28363
28364
28365  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28366done
28367
28368  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28369    PROPER_COMPILER_CC=""
28370  else
28371    case $cross_compiling:$ac_tool_warned in
28372yes:)
28373{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28374$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28375ac_tool_warned=yes ;;
28376esac
28377    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28378  fi
28379fi
28380
28381
28382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28383
28384  # First separate the path from the arguments. This will split at the first
28385  # space.
28386  complete="$PROPER_COMPILER_CC"
28387  path="${complete%% *}"
28388  tmp="$complete EOL"
28389  arguments="${tmp#* }"
28390
28391  # Input might be given as Windows format, start by converting to
28392  # unix format.
28393  new_path=`$CYGPATH -u "$path"`
28394
28395  # Now try to locate executable using which
28396  new_path=`$WHICH "$new_path" 2> /dev/null`
28397  # bat and cmd files are not always considered executable in cygwin causing which
28398  # to not find them
28399  if test "x$new_path" = x \
28400      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28401      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28402    new_path=`$CYGPATH -u "$path"`
28403  fi
28404  if test "x$new_path" = x; then
28405    # Oops. Which didn't find the executable.
28406    # The splitting of arguments from the executable at a space might have been incorrect,
28407    # since paths with space are more likely in Windows. Give it another try with the whole
28408    # argument.
28409    path="$complete"
28410    arguments="EOL"
28411    new_path=`$CYGPATH -u "$path"`
28412    new_path=`$WHICH "$new_path" 2> /dev/null`
28413    # bat and cmd files are not always considered executable in cygwin causing which
28414    # to not find them
28415    if test "x$new_path" = x \
28416        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28417        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28418      new_path=`$CYGPATH -u "$path"`
28419    fi
28420    if test "x$new_path" = x; then
28421      # It's still not found. Now this is an unrecoverable error.
28422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28423$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28424      has_space=`$ECHO "$complete" | $GREP " "`
28425      if test "x$has_space" != x; then
28426        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28427$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28428      fi
28429      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28430    fi
28431  fi
28432
28433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28436  # "foo.exe" is OK but "foo" is an error.
28437  #
28438  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28439  # It is also a way to make sure we got the proper file name for the real test later on.
28440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28441  if test "x$test_shortpath" = x; then
28442    # Short path failed, file does not exist as specified.
28443    # Try adding .exe or .cmd
28444    if test -f "${new_path}.exe"; then
28445      input_to_shortpath="${new_path}.exe"
28446    elif test -f "${new_path}.cmd"; then
28447      input_to_shortpath="${new_path}.cmd"
28448    else
28449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28450$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28451      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28452$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28453      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28454    fi
28455  else
28456    input_to_shortpath="$new_path"
28457  fi
28458
28459  # Call helper function which possibly converts this using DOS-style short mode.
28460  # If so, the updated path is stored in $new_path.
28461  new_path="$input_to_shortpath"
28462
28463  input_path="$input_to_shortpath"
28464  # Check if we need to convert this using DOS-style short mode. If the path
28465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28466  # take no chances and rewrite it.
28467  # Note: m4 eats our [], so we need to use [ and ] instead.
28468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28469  if test "x$has_forbidden_chars" != x; then
28470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28471    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28472    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28473    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28474      # Going to short mode and back again did indeed matter. Since short mode is
28475      # case insensitive, let's make it lowercase to improve readability.
28476      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28477      # Now convert it back to Unix-stile (cygpath)
28478      input_path=`$CYGPATH -u "$shortmode_path"`
28479      new_path="$input_path"
28480    fi
28481  fi
28482
28483  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28484  if test "x$test_cygdrive_prefix" = x; then
28485    # As a simple fix, exclude /usr/bin since it's not a real path.
28486    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28487      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28488      # a path prefixed by /cygdrive for fixpath to work.
28489      new_path="$CYGWIN_ROOT_PATH$input_path"
28490    fi
28491  fi
28492
28493  # remove trailing .exe if any
28494  new_path="${new_path/%.exe/}"
28495
28496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28497
28498  # First separate the path from the arguments. This will split at the first
28499  # space.
28500  complete="$PROPER_COMPILER_CC"
28501  path="${complete%% *}"
28502  tmp="$complete EOL"
28503  arguments="${tmp#* }"
28504
28505  # Input might be given as Windows format, start by converting to
28506  # unix format.
28507  new_path="$path"
28508
28509  windows_path="$new_path"
28510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28511    unix_path=`$CYGPATH -u "$windows_path"`
28512    new_path="$unix_path"
28513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28515    new_path="$unix_path"
28516  fi
28517
28518
28519  # Now try to locate executable using which
28520  new_path=`$WHICH "$new_path" 2> /dev/null`
28521
28522  if test "x$new_path" = x; then
28523    # Oops. Which didn't find the executable.
28524    # The splitting of arguments from the executable at a space might have been incorrect,
28525    # since paths with space are more likely in Windows. Give it another try with the whole
28526    # argument.
28527    path="$complete"
28528    arguments="EOL"
28529    new_path="$path"
28530
28531  windows_path="$new_path"
28532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28533    unix_path=`$CYGPATH -u "$windows_path"`
28534    new_path="$unix_path"
28535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28537    new_path="$unix_path"
28538  fi
28539
28540
28541    new_path=`$WHICH "$new_path" 2> /dev/null`
28542    # bat and cmd files are not always considered executable in MSYS causing which
28543    # to not find them
28544    if test "x$new_path" = x \
28545        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28546        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28547      new_path="$path"
28548
28549  windows_path="$new_path"
28550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28551    unix_path=`$CYGPATH -u "$windows_path"`
28552    new_path="$unix_path"
28553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28555    new_path="$unix_path"
28556  fi
28557
28558    fi
28559
28560    if test "x$new_path" = x; then
28561      # It's still not found. Now this is an unrecoverable error.
28562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28563$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28564      has_space=`$ECHO "$complete" | $GREP " "`
28565      if test "x$has_space" != x; then
28566        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28567$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28568      fi
28569      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28570    fi
28571  fi
28572
28573  # Now new_path has a complete unix path to the binary
28574  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28575    # Keep paths in /bin as-is, but remove trailing .exe if any
28576    new_path="${new_path/%.exe/}"
28577    # Do not save /bin paths to all_fixpath_prefixes!
28578  else
28579    # Not in mixed or Windows style, start by that.
28580    new_path=`cmd //c echo $new_path`
28581
28582  input_path="$new_path"
28583  # Check if we need to convert this using DOS-style short mode. If the path
28584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28585  # take no chances and rewrite it.
28586  # Note: m4 eats our [], so we need to use [ and ] instead.
28587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28588  if test "x$has_forbidden_chars" != x; then
28589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28590    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28591  fi
28592
28593    # Output is in $new_path
28594
28595  windows_path="$new_path"
28596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28597    unix_path=`$CYGPATH -u "$windows_path"`
28598    new_path="$unix_path"
28599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28601    new_path="$unix_path"
28602  fi
28603
28604    # remove trailing .exe if any
28605    new_path="${new_path/%.exe/}"
28606
28607    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28608    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28609  fi
28610
28611  else
28612    # We're on a unix platform. Hooray! :)
28613    # First separate the path from the arguments. This will split at the first
28614    # space.
28615    complete="$PROPER_COMPILER_CC"
28616    path="${complete%% *}"
28617    tmp="$complete EOL"
28618    arguments="${tmp#* }"
28619
28620    # Cannot rely on the command "which" here since it doesn't always work.
28621    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28622    if test -z "$is_absolute_path"; then
28623      # Path to executable is not absolute. Find it.
28624      IFS_save="$IFS"
28625      IFS=:
28626      for p in $PATH; do
28627        if test -f "$p/$path" && test -x "$p/$path"; then
28628          new_path="$p/$path"
28629          break
28630        fi
28631      done
28632      IFS="$IFS_save"
28633    else
28634      # This is an absolute path, we can use it without further modifications.
28635      new_path="$path"
28636    fi
28637
28638    if test "x$new_path" = x; then
28639      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28640$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28641      has_space=`$ECHO "$complete" | $GREP " "`
28642      if test "x$has_space" != x; then
28643        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28644$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28645      fi
28646      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28647    fi
28648  fi
28649
28650  # Now join together the path and the arguments once again
28651  if test "x$arguments" != xEOL; then
28652    new_complete="$new_path ${arguments% *}"
28653  else
28654    new_complete="$new_path"
28655  fi
28656
28657  if test "x$complete" != "x$new_complete"; then
28658    PROPER_COMPILER_CC="$new_complete"
28659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28660$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28661  fi
28662
28663    PATH="$RETRY_COMPILER_SAVED_PATH"
28664
28665    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28666$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28667
28668  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28669    # Follow a chain of symbolic links. Use readlink
28670    # where it exists, else fall back to horribly
28671    # complicated shell code.
28672    if test "x$READLINK_TESTED" != yes; then
28673      # On MacOSX there is a readlink tool with a different
28674      # purpose than the GNU readlink tool. Check the found readlink.
28675      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28676      if test "x$ISGNU" = x; then
28677        # A readlink that we do not know how to use.
28678        # Are there other non-GNU readlinks out there?
28679        READLINK_TESTED=yes
28680        READLINK=
28681      fi
28682    fi
28683
28684    if test "x$READLINK" != x; then
28685      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28686    else
28687      # Save the current directory for restoring afterwards
28688      STARTDIR=$PWD
28689      COUNTER=0
28690      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28691      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28692      cd $sym_link_dir
28693      # Use -P flag to resolve symlinks in directories.
28694      cd `$THEPWDCMD -P`
28695      sym_link_dir=`$THEPWDCMD -P`
28696      # Resolve file symlinks
28697      while test $COUNTER -lt 20; do
28698        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28699        if test "x$ISLINK" == x; then
28700          # This is not a symbolic link! We are done!
28701          break
28702        fi
28703        # Again resolve directory symlinks since the target of the just found
28704        # link could be in a different directory
28705        cd `$DIRNAME $ISLINK`
28706        sym_link_dir=`$THEPWDCMD -P`
28707        sym_link_file=`$BASENAME $ISLINK`
28708        let COUNTER=COUNTER+1
28709      done
28710      cd $STARTDIR
28711      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28712    fi
28713  fi
28714
28715    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28716$as_echo "$PROPER_COMPILER_CC" >&6; }
28717    CC="$PROPER_COMPILER_CC"
28718  else
28719    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28720$as_echo "no, keeping CC" >&6; }
28721  fi
28722
28723
28724  COMPILER=$CC
28725  COMPILER_NAME=$COMPILER_NAME
28726
28727  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28728    # cc -V output typically looks like
28729    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28730    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28731    # Check that this is likely to be the Solaris Studio cc.
28732    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28733    if test $? -ne 0; then
28734      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28735      { $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
28736$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28737      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28738$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28739      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28740$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28741      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28742    fi
28743    # Remove usage instructions (if present), and
28744    # collapse compiler output into a single line
28745    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28746        $SED -e 's/ *[Uu]sage:.*//'`
28747    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28748        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28749  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28750    # xlc -qversion output typically looks like
28751    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28752    #     Version: 11.01.0000.0015
28753    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28754    # Check that this is likely to be the IBM XL C compiler.
28755    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28756    if test $? -ne 0; then
28757      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28758      { $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
28759$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28760      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28761$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28762      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28763$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28764      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28765    fi
28766    # Collapse compiler output into a single line
28767    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28768    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28769        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28770  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28771    # There is no specific version flag, but all output starts with a version string.
28772    # First line typically looks something like:
28773    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28774    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28775    # Check that this is likely to be Microsoft CL.EXE.
28776    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28777    if test $? -ne 0; then
28778      { $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
28779$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28780      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28781$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28782      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28783    fi
28784    # Collapse compiler output into a single line
28785    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28786    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28787        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28788  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28789    # gcc --version output typically looks like
28790    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28791    #     Copyright (C) 2013 Free Software Foundation, Inc.
28792    #     This is free software; see the source for copying conditions.  There is NO
28793    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28794    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28795    # Check that this is likely to be GCC.
28796    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28797    if test $? -ne 0; then
28798      { $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
28799$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28800      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28801$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28802      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28803    fi
28804    # Remove Copyright and legalese from version string, and
28805    # collapse into a single line
28806    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28807        $SED -e 's/ *Copyright .*//'`
28808    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28809        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28810  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28811    # clang --version output typically looks like
28812    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28813    #    clang version 3.3 (tags/RELEASE_33/final)
28814    # or
28815    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28816    #    Target: x86_64-pc-linux-gnu
28817    #    Thread model: posix
28818    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28819    # Check that this is likely to be clang
28820    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28821    if test $? -ne 0; then
28822      { $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
28823$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28824      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28825$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28826      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28827    fi
28828    # Collapse compiler output into a single line
28829    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28830    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28831        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28832  else
28833      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28834  fi
28835  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28836  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28837  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28838  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28839
28840  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28841$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28842
28843
28844  # Now that we have resolved CC ourself, let autoconf have its go at it
28845  ac_ext=c
28846ac_cpp='$CPP $CPPFLAGS'
28847ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28848ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28849ac_compiler_gnu=$ac_cv_c_compiler_gnu
28850if test -n "$ac_tool_prefix"; then
28851  for ac_prog in $CC
28852  do
28853    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28854set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28856$as_echo_n "checking for $ac_word... " >&6; }
28857if ${ac_cv_prog_CC+:} false; then :
28858  $as_echo_n "(cached) " >&6
28859else
28860  if test -n "$CC"; then
28861  ac_cv_prog_CC="$CC" # Let the user override the test.
28862else
28863as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28864for as_dir in $PATH
28865do
28866  IFS=$as_save_IFS
28867  test -z "$as_dir" && as_dir=.
28868    for ac_exec_ext in '' $ac_executable_extensions; do
28869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28870    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28872    break 2
28873  fi
28874done
28875  done
28876IFS=$as_save_IFS
28877
28878fi
28879fi
28880CC=$ac_cv_prog_CC
28881if test -n "$CC"; then
28882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28883$as_echo "$CC" >&6; }
28884else
28885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28886$as_echo "no" >&6; }
28887fi
28888
28889
28890    test -n "$CC" && break
28891  done
28892fi
28893if test -z "$CC"; then
28894  ac_ct_CC=$CC
28895  for ac_prog in $CC
28896do
28897  # Extract the first word of "$ac_prog", so it can be a program name with args.
28898set dummy $ac_prog; ac_word=$2
28899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28900$as_echo_n "checking for $ac_word... " >&6; }
28901if ${ac_cv_prog_ac_ct_CC+:} false; then :
28902  $as_echo_n "(cached) " >&6
28903else
28904  if test -n "$ac_ct_CC"; then
28905  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28906else
28907as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28908for as_dir in $PATH
28909do
28910  IFS=$as_save_IFS
28911  test -z "$as_dir" && as_dir=.
28912    for ac_exec_ext in '' $ac_executable_extensions; do
28913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28914    ac_cv_prog_ac_ct_CC="$ac_prog"
28915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28916    break 2
28917  fi
28918done
28919  done
28920IFS=$as_save_IFS
28921
28922fi
28923fi
28924ac_ct_CC=$ac_cv_prog_ac_ct_CC
28925if test -n "$ac_ct_CC"; then
28926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28927$as_echo "$ac_ct_CC" >&6; }
28928else
28929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28930$as_echo "no" >&6; }
28931fi
28932
28933
28934  test -n "$ac_ct_CC" && break
28935done
28936
28937  if test "x$ac_ct_CC" = x; then
28938    CC=""
28939  else
28940    case $cross_compiling:$ac_tool_warned in
28941yes:)
28942{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28943$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28944ac_tool_warned=yes ;;
28945esac
28946    CC=$ac_ct_CC
28947  fi
28948fi
28949
28950
28951test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28952$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28953as_fn_error $? "no acceptable C compiler found in \$PATH
28954See \`config.log' for more details" "$LINENO" 5; }
28955
28956# Provide some information about the compiler.
28957$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28958set X $ac_compile
28959ac_compiler=$2
28960for ac_option in --version -v -V -qversion; do
28961  { { ac_try="$ac_compiler $ac_option >&5"
28962case "(($ac_try" in
28963  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28964  *) ac_try_echo=$ac_try;;
28965esac
28966eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28967$as_echo "$ac_try_echo"; } >&5
28968  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28969  ac_status=$?
28970  if test -s conftest.err; then
28971    sed '10a\
28972... rest of stderr output deleted ...
28973         10q' conftest.err >conftest.er1
28974    cat conftest.er1 >&5
28975  fi
28976  rm -f conftest.er1 conftest.err
28977  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28978  test $ac_status = 0; }
28979done
28980
28981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28982/* end confdefs.h.  */
28983
28984int
28985main ()
28986{
28987
28988  ;
28989  return 0;
28990}
28991_ACEOF
28992ac_clean_files_save=$ac_clean_files
28993ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28994# Try to create an executable without -o first, disregard a.out.
28995# It will help us diagnose broken compilers, and finding out an intuition
28996# of exeext.
28997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28998$as_echo_n "checking whether the C compiler works... " >&6; }
28999ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29000
29001# The possible output files:
29002ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29003
29004ac_rmfiles=
29005for ac_file in $ac_files
29006do
29007  case $ac_file in
29008    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29009    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29010  esac
29011done
29012rm -f $ac_rmfiles
29013
29014if { { ac_try="$ac_link_default"
29015case "(($ac_try" in
29016  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29017  *) ac_try_echo=$ac_try;;
29018esac
29019eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29020$as_echo "$ac_try_echo"; } >&5
29021  (eval "$ac_link_default") 2>&5
29022  ac_status=$?
29023  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29024  test $ac_status = 0; }; then :
29025  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29026# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29027# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29028# so that the user can short-circuit this test for compilers unknown to
29029# Autoconf.
29030for ac_file in $ac_files ''
29031do
29032  test -f "$ac_file" || continue
29033  case $ac_file in
29034    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29035	;;
29036    [ab].out )
29037	# We found the default executable, but exeext='' is most
29038	# certainly right.
29039	break;;
29040    *.* )
29041	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29042	then :; else
29043	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29044	fi
29045	# We set ac_cv_exeext here because the later test for it is not
29046	# safe: cross compilers may not add the suffix if given an `-o'
29047	# argument, so we may need to know it at that point already.
29048	# Even if this section looks crufty: it has the advantage of
29049	# actually working.
29050	break;;
29051    * )
29052	break;;
29053  esac
29054done
29055test "$ac_cv_exeext" = no && ac_cv_exeext=
29056
29057else
29058  ac_file=''
29059fi
29060if test -z "$ac_file"; then :
29061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29062$as_echo "no" >&6; }
29063$as_echo "$as_me: failed program was:" >&5
29064sed 's/^/| /' conftest.$ac_ext >&5
29065
29066{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29067$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29068as_fn_error 77 "C compiler cannot create executables
29069See \`config.log' for more details" "$LINENO" 5; }
29070else
29071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29072$as_echo "yes" >&6; }
29073fi
29074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29075$as_echo_n "checking for C compiler default output file name... " >&6; }
29076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29077$as_echo "$ac_file" >&6; }
29078ac_exeext=$ac_cv_exeext
29079
29080rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29081ac_clean_files=$ac_clean_files_save
29082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29083$as_echo_n "checking for suffix of executables... " >&6; }
29084if { { ac_try="$ac_link"
29085case "(($ac_try" in
29086  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29087  *) ac_try_echo=$ac_try;;
29088esac
29089eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29090$as_echo "$ac_try_echo"; } >&5
29091  (eval "$ac_link") 2>&5
29092  ac_status=$?
29093  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29094  test $ac_status = 0; }; then :
29095  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29096# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29097# work properly (i.e., refer to `conftest.exe'), while it won't with
29098# `rm'.
29099for ac_file in conftest.exe conftest conftest.*; do
29100  test -f "$ac_file" || continue
29101  case $ac_file in
29102    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29103    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29104	  break;;
29105    * ) break;;
29106  esac
29107done
29108else
29109  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29110$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29111as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29112See \`config.log' for more details" "$LINENO" 5; }
29113fi
29114rm -f conftest conftest$ac_cv_exeext
29115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29116$as_echo "$ac_cv_exeext" >&6; }
29117
29118rm -f conftest.$ac_ext
29119EXEEXT=$ac_cv_exeext
29120ac_exeext=$EXEEXT
29121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29122/* end confdefs.h.  */
29123#include <stdio.h>
29124int
29125main ()
29126{
29127FILE *f = fopen ("conftest.out", "w");
29128 return ferror (f) || fclose (f) != 0;
29129
29130  ;
29131  return 0;
29132}
29133_ACEOF
29134ac_clean_files="$ac_clean_files conftest.out"
29135# Check that the compiler produces executables we can run.  If not, either
29136# the compiler is broken, or we cross compile.
29137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29138$as_echo_n "checking whether we are cross compiling... " >&6; }
29139if test "$cross_compiling" != yes; then
29140  { { ac_try="$ac_link"
29141case "(($ac_try" in
29142  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29143  *) ac_try_echo=$ac_try;;
29144esac
29145eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29146$as_echo "$ac_try_echo"; } >&5
29147  (eval "$ac_link") 2>&5
29148  ac_status=$?
29149  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29150  test $ac_status = 0; }
29151  if { ac_try='./conftest$ac_cv_exeext'
29152  { { case "(($ac_try" in
29153  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29154  *) ac_try_echo=$ac_try;;
29155esac
29156eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29157$as_echo "$ac_try_echo"; } >&5
29158  (eval "$ac_try") 2>&5
29159  ac_status=$?
29160  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29161  test $ac_status = 0; }; }; then
29162    cross_compiling=no
29163  else
29164    if test "$cross_compiling" = maybe; then
29165	cross_compiling=yes
29166    else
29167	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29168$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29169as_fn_error $? "cannot run C compiled programs.
29170If you meant to cross compile, use \`--host'.
29171See \`config.log' for more details" "$LINENO" 5; }
29172    fi
29173  fi
29174fi
29175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29176$as_echo "$cross_compiling" >&6; }
29177
29178rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29179ac_clean_files=$ac_clean_files_save
29180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29181$as_echo_n "checking for suffix of object files... " >&6; }
29182if ${ac_cv_objext+:} false; then :
29183  $as_echo_n "(cached) " >&6
29184else
29185  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29186/* end confdefs.h.  */
29187
29188int
29189main ()
29190{
29191
29192  ;
29193  return 0;
29194}
29195_ACEOF
29196rm -f conftest.o conftest.obj
29197if { { ac_try="$ac_compile"
29198case "(($ac_try" in
29199  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29200  *) ac_try_echo=$ac_try;;
29201esac
29202eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29203$as_echo "$ac_try_echo"; } >&5
29204  (eval "$ac_compile") 2>&5
29205  ac_status=$?
29206  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29207  test $ac_status = 0; }; then :
29208  for ac_file in conftest.o conftest.obj conftest.*; do
29209  test -f "$ac_file" || continue;
29210  case $ac_file in
29211    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29212    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29213       break;;
29214  esac
29215done
29216else
29217  $as_echo "$as_me: failed program was:" >&5
29218sed 's/^/| /' conftest.$ac_ext >&5
29219
29220{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29221$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29222as_fn_error $? "cannot compute suffix of object files: cannot compile
29223See \`config.log' for more details" "$LINENO" 5; }
29224fi
29225rm -f conftest.$ac_cv_objext conftest.$ac_ext
29226fi
29227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29228$as_echo "$ac_cv_objext" >&6; }
29229OBJEXT=$ac_cv_objext
29230ac_objext=$OBJEXT
29231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29232$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29233if ${ac_cv_c_compiler_gnu+:} false; then :
29234  $as_echo_n "(cached) " >&6
29235else
29236  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29237/* end confdefs.h.  */
29238
29239int
29240main ()
29241{
29242#ifndef __GNUC__
29243       choke me
29244#endif
29245
29246  ;
29247  return 0;
29248}
29249_ACEOF
29250if ac_fn_c_try_compile "$LINENO"; then :
29251  ac_compiler_gnu=yes
29252else
29253  ac_compiler_gnu=no
29254fi
29255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29256ac_cv_c_compiler_gnu=$ac_compiler_gnu
29257
29258fi
29259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29260$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29261if test $ac_compiler_gnu = yes; then
29262  GCC=yes
29263else
29264  GCC=
29265fi
29266ac_test_CFLAGS=${CFLAGS+set}
29267ac_save_CFLAGS=$CFLAGS
29268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29269$as_echo_n "checking whether $CC accepts -g... " >&6; }
29270if ${ac_cv_prog_cc_g+:} false; then :
29271  $as_echo_n "(cached) " >&6
29272else
29273  ac_save_c_werror_flag=$ac_c_werror_flag
29274   ac_c_werror_flag=yes
29275   ac_cv_prog_cc_g=no
29276   CFLAGS="-g"
29277   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29278/* end confdefs.h.  */
29279
29280int
29281main ()
29282{
29283
29284  ;
29285  return 0;
29286}
29287_ACEOF
29288if ac_fn_c_try_compile "$LINENO"; then :
29289  ac_cv_prog_cc_g=yes
29290else
29291  CFLAGS=""
29292      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29293/* end confdefs.h.  */
29294
29295int
29296main ()
29297{
29298
29299  ;
29300  return 0;
29301}
29302_ACEOF
29303if ac_fn_c_try_compile "$LINENO"; then :
29304
29305else
29306  ac_c_werror_flag=$ac_save_c_werror_flag
29307	 CFLAGS="-g"
29308	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29309/* end confdefs.h.  */
29310
29311int
29312main ()
29313{
29314
29315  ;
29316  return 0;
29317}
29318_ACEOF
29319if ac_fn_c_try_compile "$LINENO"; then :
29320  ac_cv_prog_cc_g=yes
29321fi
29322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29323fi
29324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29325fi
29326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29327   ac_c_werror_flag=$ac_save_c_werror_flag
29328fi
29329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29330$as_echo "$ac_cv_prog_cc_g" >&6; }
29331if test "$ac_test_CFLAGS" = set; then
29332  CFLAGS=$ac_save_CFLAGS
29333elif test $ac_cv_prog_cc_g = yes; then
29334  if test "$GCC" = yes; then
29335    CFLAGS="-g -O2"
29336  else
29337    CFLAGS="-g"
29338  fi
29339else
29340  if test "$GCC" = yes; then
29341    CFLAGS="-O2"
29342  else
29343    CFLAGS=
29344  fi
29345fi
29346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29347$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29348if ${ac_cv_prog_cc_c89+:} false; then :
29349  $as_echo_n "(cached) " >&6
29350else
29351  ac_cv_prog_cc_c89=no
29352ac_save_CC=$CC
29353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29354/* end confdefs.h.  */
29355#include <stdarg.h>
29356#include <stdio.h>
29357struct stat;
29358/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29359struct buf { int x; };
29360FILE * (*rcsopen) (struct buf *, struct stat *, int);
29361static char *e (p, i)
29362     char **p;
29363     int i;
29364{
29365  return p[i];
29366}
29367static char *f (char * (*g) (char **, int), char **p, ...)
29368{
29369  char *s;
29370  va_list v;
29371  va_start (v,p);
29372  s = g (p, va_arg (v,int));
29373  va_end (v);
29374  return s;
29375}
29376
29377/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29378   function prototypes and stuff, but not '\xHH' hex character constants.
29379   These don't provoke an error unfortunately, instead are silently treated
29380   as 'x'.  The following induces an error, until -std is added to get
29381   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29382   array size at least.  It's necessary to write '\x00'==0 to get something
29383   that's true only with -std.  */
29384int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29385
29386/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29387   inside strings and character constants.  */
29388#define FOO(x) 'x'
29389int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29390
29391int test (int i, double x);
29392struct s1 {int (*f) (int a);};
29393struct s2 {int (*f) (double a);};
29394int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29395int argc;
29396char **argv;
29397int
29398main ()
29399{
29400return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29401  ;
29402  return 0;
29403}
29404_ACEOF
29405for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29406	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29407do
29408  CC="$ac_save_CC $ac_arg"
29409  if ac_fn_c_try_compile "$LINENO"; then :
29410  ac_cv_prog_cc_c89=$ac_arg
29411fi
29412rm -f core conftest.err conftest.$ac_objext
29413  test "x$ac_cv_prog_cc_c89" != "xno" && break
29414done
29415rm -f conftest.$ac_ext
29416CC=$ac_save_CC
29417
29418fi
29419# AC_CACHE_VAL
29420case "x$ac_cv_prog_cc_c89" in
29421  x)
29422    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29423$as_echo "none needed" >&6; } ;;
29424  xno)
29425    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29426$as_echo "unsupported" >&6; } ;;
29427  *)
29428    CC="$CC $ac_cv_prog_cc_c89"
29429    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29430$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29431esac
29432if test "x$ac_cv_prog_cc_c89" != xno; then :
29433
29434fi
29435
29436ac_ext=cpp
29437ac_cpp='$CXXCPP $CPPFLAGS'
29438ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29439ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29440ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29441
29442
29443
29444  COMPILER_NAME=C++
29445  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29446
29447  if test "x$CXX" != x; then
29448    # User has supplied compiler name already, always let that override.
29449    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29450$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29451    if test "x`basename $CXX`" = "x$CXX"; then
29452      # A command without a complete path is provided, search $PATH.
29453
29454      for ac_prog in $CXX
29455do
29456  # Extract the first word of "$ac_prog", so it can be a program name with args.
29457set dummy $ac_prog; ac_word=$2
29458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29459$as_echo_n "checking for $ac_word... " >&6; }
29460if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29461  $as_echo_n "(cached) " >&6
29462else
29463  case $POTENTIAL_CXX in
29464  [\\/]* | ?:[\\/]*)
29465  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29466  ;;
29467  *)
29468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29469for as_dir in $PATH
29470do
29471  IFS=$as_save_IFS
29472  test -z "$as_dir" && as_dir=.
29473    for ac_exec_ext in '' $ac_executable_extensions; do
29474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29475    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29477    break 2
29478  fi
29479done
29480  done
29481IFS=$as_save_IFS
29482
29483  ;;
29484esac
29485fi
29486POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29487if test -n "$POTENTIAL_CXX"; then
29488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29489$as_echo "$POTENTIAL_CXX" >&6; }
29490else
29491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29492$as_echo "no" >&6; }
29493fi
29494
29495
29496  test -n "$POTENTIAL_CXX" && break
29497done
29498
29499      if test "x$POTENTIAL_CXX" != x; then
29500        CXX=$POTENTIAL_CXX
29501      else
29502        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29503      fi
29504    else
29505      # Otherwise it might already be a complete path
29506      if test ! -x "$CXX"; then
29507        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29508      fi
29509    fi
29510  else
29511    # No user supplied value. Locate compiler ourselves.
29512
29513    # If we are cross compiling, assume cross compilation tools follows the
29514    # cross compilation standard where they are prefixed with the autoconf
29515    # standard name for the target. For example the binary
29516    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29517    # If we are not cross compiling, then the default compiler name will be
29518    # used.
29519
29520    CXX=
29521    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29522    # before checking the rest of the PATH.
29523    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29524    # step, this should not be necessary.
29525    if test -n "$TOOLCHAIN_PATH"; then
29526      PATH_save="$PATH"
29527      PATH="$TOOLCHAIN_PATH"
29528      for ac_prog in $SEARCH_LIST
29529do
29530  # Extract the first word of "$ac_prog", so it can be a program name with args.
29531set dummy $ac_prog; ac_word=$2
29532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29533$as_echo_n "checking for $ac_word... " >&6; }
29534if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29535  $as_echo_n "(cached) " >&6
29536else
29537  case $TOOLCHAIN_PATH_CXX in
29538  [\\/]* | ?:[\\/]*)
29539  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29540  ;;
29541  *)
29542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29543for as_dir in $PATH
29544do
29545  IFS=$as_save_IFS
29546  test -z "$as_dir" && as_dir=.
29547    for ac_exec_ext in '' $ac_executable_extensions; do
29548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29549    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29551    break 2
29552  fi
29553done
29554  done
29555IFS=$as_save_IFS
29556
29557  ;;
29558esac
29559fi
29560TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29561if test -n "$TOOLCHAIN_PATH_CXX"; then
29562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29563$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29564else
29565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29566$as_echo "no" >&6; }
29567fi
29568
29569
29570  test -n "$TOOLCHAIN_PATH_CXX" && break
29571done
29572
29573      CXX=$TOOLCHAIN_PATH_CXX
29574      PATH="$PATH_save"
29575    fi
29576
29577    # AC_PATH_PROGS can't be run multiple times with the same variable,
29578    # so create a new name for this run.
29579    if test "x$CXX" = x; then
29580      for ac_prog in $SEARCH_LIST
29581do
29582  # Extract the first word of "$ac_prog", so it can be a program name with args.
29583set dummy $ac_prog; ac_word=$2
29584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29585$as_echo_n "checking for $ac_word... " >&6; }
29586if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29587  $as_echo_n "(cached) " >&6
29588else
29589  case $POTENTIAL_CXX in
29590  [\\/]* | ?:[\\/]*)
29591  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29592  ;;
29593  *)
29594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29595for as_dir in $PATH
29596do
29597  IFS=$as_save_IFS
29598  test -z "$as_dir" && as_dir=.
29599    for ac_exec_ext in '' $ac_executable_extensions; do
29600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29601    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29603    break 2
29604  fi
29605done
29606  done
29607IFS=$as_save_IFS
29608
29609  ;;
29610esac
29611fi
29612POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29613if test -n "$POTENTIAL_CXX"; then
29614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29615$as_echo "$POTENTIAL_CXX" >&6; }
29616else
29617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29618$as_echo "no" >&6; }
29619fi
29620
29621
29622  test -n "$POTENTIAL_CXX" && break
29623done
29624
29625      CXX=$POTENTIAL_CXX
29626    fi
29627
29628    if test "x$CXX" = x; then
29629
29630  # Print a helpful message on how to acquire the necessary build dependency.
29631  # devkit is the help tag: freetype, cups, pulse, alsa etc
29632  MISSING_DEPENDENCY=devkit
29633
29634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29635    cygwin_help $MISSING_DEPENDENCY
29636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29637    msys_help $MISSING_DEPENDENCY
29638  else
29639    PKGHANDLER_COMMAND=
29640
29641    case $PKGHANDLER in
29642      apt-get)
29643        apt_help     $MISSING_DEPENDENCY ;;
29644      yum)
29645        yum_help     $MISSING_DEPENDENCY ;;
29646      port)
29647        port_help    $MISSING_DEPENDENCY ;;
29648      pkgutil)
29649        pkgutil_help $MISSING_DEPENDENCY ;;
29650      pkgadd)
29651        pkgadd_help  $MISSING_DEPENDENCY ;;
29652    esac
29653
29654    if test "x$PKGHANDLER_COMMAND" != x; then
29655      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29656    fi
29657  fi
29658
29659      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29660    fi
29661  fi
29662
29663  # Now we have a compiler binary in CXX. Make sure it's okay.
29664
29665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29666
29667  # First separate the path from the arguments. This will split at the first
29668  # space.
29669  complete="$CXX"
29670  path="${complete%% *}"
29671  tmp="$complete EOL"
29672  arguments="${tmp#* }"
29673
29674  # Input might be given as Windows format, start by converting to
29675  # unix format.
29676  new_path=`$CYGPATH -u "$path"`
29677
29678  # Now try to locate executable using which
29679  new_path=`$WHICH "$new_path" 2> /dev/null`
29680  # bat and cmd files are not always considered executable in cygwin causing which
29681  # to not find them
29682  if test "x$new_path" = x \
29683      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29684      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29685    new_path=`$CYGPATH -u "$path"`
29686  fi
29687  if test "x$new_path" = x; then
29688    # Oops. Which didn't find the executable.
29689    # The splitting of arguments from the executable at a space might have been incorrect,
29690    # since paths with space are more likely in Windows. Give it another try with the whole
29691    # argument.
29692    path="$complete"
29693    arguments="EOL"
29694    new_path=`$CYGPATH -u "$path"`
29695    new_path=`$WHICH "$new_path" 2> /dev/null`
29696    # bat and cmd files are not always considered executable in cygwin causing which
29697    # to not find them
29698    if test "x$new_path" = x \
29699        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29700        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29701      new_path=`$CYGPATH -u "$path"`
29702    fi
29703    if test "x$new_path" = x; then
29704      # It's still not found. Now this is an unrecoverable error.
29705      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29706$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29707      has_space=`$ECHO "$complete" | $GREP " "`
29708      if test "x$has_space" != x; then
29709        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29710$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29711      fi
29712      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29713    fi
29714  fi
29715
29716  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29717  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29718  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29719  # "foo.exe" is OK but "foo" is an error.
29720  #
29721  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29722  # It is also a way to make sure we got the proper file name for the real test later on.
29723  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29724  if test "x$test_shortpath" = x; then
29725    # Short path failed, file does not exist as specified.
29726    # Try adding .exe or .cmd
29727    if test -f "${new_path}.exe"; then
29728      input_to_shortpath="${new_path}.exe"
29729    elif test -f "${new_path}.cmd"; then
29730      input_to_shortpath="${new_path}.cmd"
29731    else
29732      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29733$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29734      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29735$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29736      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29737    fi
29738  else
29739    input_to_shortpath="$new_path"
29740  fi
29741
29742  # Call helper function which possibly converts this using DOS-style short mode.
29743  # If so, the updated path is stored in $new_path.
29744  new_path="$input_to_shortpath"
29745
29746  input_path="$input_to_shortpath"
29747  # Check if we need to convert this using DOS-style short mode. If the path
29748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29749  # take no chances and rewrite it.
29750  # Note: m4 eats our [], so we need to use [ and ] instead.
29751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29752  if test "x$has_forbidden_chars" != x; then
29753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29754    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29755    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29756    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29757      # Going to short mode and back again did indeed matter. Since short mode is
29758      # case insensitive, let's make it lowercase to improve readability.
29759      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29760      # Now convert it back to Unix-stile (cygpath)
29761      input_path=`$CYGPATH -u "$shortmode_path"`
29762      new_path="$input_path"
29763    fi
29764  fi
29765
29766  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29767  if test "x$test_cygdrive_prefix" = x; then
29768    # As a simple fix, exclude /usr/bin since it's not a real path.
29769    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29770      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29771      # a path prefixed by /cygdrive for fixpath to work.
29772      new_path="$CYGWIN_ROOT_PATH$input_path"
29773    fi
29774  fi
29775
29776  # remove trailing .exe if any
29777  new_path="${new_path/%.exe/}"
29778
29779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29780
29781  # First separate the path from the arguments. This will split at the first
29782  # space.
29783  complete="$CXX"
29784  path="${complete%% *}"
29785  tmp="$complete EOL"
29786  arguments="${tmp#* }"
29787
29788  # Input might be given as Windows format, start by converting to
29789  # unix format.
29790  new_path="$path"
29791
29792  windows_path="$new_path"
29793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29794    unix_path=`$CYGPATH -u "$windows_path"`
29795    new_path="$unix_path"
29796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29798    new_path="$unix_path"
29799  fi
29800
29801
29802  # Now try to locate executable using which
29803  new_path=`$WHICH "$new_path" 2> /dev/null`
29804
29805  if test "x$new_path" = x; then
29806    # Oops. Which didn't find the executable.
29807    # The splitting of arguments from the executable at a space might have been incorrect,
29808    # since paths with space are more likely in Windows. Give it another try with the whole
29809    # argument.
29810    path="$complete"
29811    arguments="EOL"
29812    new_path="$path"
29813
29814  windows_path="$new_path"
29815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29816    unix_path=`$CYGPATH -u "$windows_path"`
29817    new_path="$unix_path"
29818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29820    new_path="$unix_path"
29821  fi
29822
29823
29824    new_path=`$WHICH "$new_path" 2> /dev/null`
29825    # bat and cmd files are not always considered executable in MSYS causing which
29826    # to not find them
29827    if test "x$new_path" = x \
29828        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29829        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29830      new_path="$path"
29831
29832  windows_path="$new_path"
29833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29834    unix_path=`$CYGPATH -u "$windows_path"`
29835    new_path="$unix_path"
29836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29838    new_path="$unix_path"
29839  fi
29840
29841    fi
29842
29843    if test "x$new_path" = x; then
29844      # It's still not found. Now this is an unrecoverable error.
29845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29846$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29847      has_space=`$ECHO "$complete" | $GREP " "`
29848      if test "x$has_space" != x; then
29849        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29850$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29851      fi
29852      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29853    fi
29854  fi
29855
29856  # Now new_path has a complete unix path to the binary
29857  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29858    # Keep paths in /bin as-is, but remove trailing .exe if any
29859    new_path="${new_path/%.exe/}"
29860    # Do not save /bin paths to all_fixpath_prefixes!
29861  else
29862    # Not in mixed or Windows style, start by that.
29863    new_path=`cmd //c echo $new_path`
29864
29865  input_path="$new_path"
29866  # Check if we need to convert this using DOS-style short mode. If the path
29867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29868  # take no chances and rewrite it.
29869  # Note: m4 eats our [], so we need to use [ and ] instead.
29870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29871  if test "x$has_forbidden_chars" != x; then
29872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29873    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29874  fi
29875
29876    # Output is in $new_path
29877
29878  windows_path="$new_path"
29879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29880    unix_path=`$CYGPATH -u "$windows_path"`
29881    new_path="$unix_path"
29882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29884    new_path="$unix_path"
29885  fi
29886
29887    # remove trailing .exe if any
29888    new_path="${new_path/%.exe/}"
29889
29890    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29891    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29892  fi
29893
29894  else
29895    # We're on a unix platform. Hooray! :)
29896    # First separate the path from the arguments. This will split at the first
29897    # space.
29898    complete="$CXX"
29899    path="${complete%% *}"
29900    tmp="$complete EOL"
29901    arguments="${tmp#* }"
29902
29903    # Cannot rely on the command "which" here since it doesn't always work.
29904    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29905    if test -z "$is_absolute_path"; then
29906      # Path to executable is not absolute. Find it.
29907      IFS_save="$IFS"
29908      IFS=:
29909      for p in $PATH; do
29910        if test -f "$p/$path" && test -x "$p/$path"; then
29911          new_path="$p/$path"
29912          break
29913        fi
29914      done
29915      IFS="$IFS_save"
29916    else
29917      # This is an absolute path, we can use it without further modifications.
29918      new_path="$path"
29919    fi
29920
29921    if test "x$new_path" = x; then
29922      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29923$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29924      has_space=`$ECHO "$complete" | $GREP " "`
29925      if test "x$has_space" != x; then
29926        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29927$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29928      fi
29929      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29930    fi
29931  fi
29932
29933  # Now join together the path and the arguments once again
29934  if test "x$arguments" != xEOL; then
29935    new_complete="$new_path ${arguments% *}"
29936  else
29937    new_complete="$new_path"
29938  fi
29939
29940  if test "x$complete" != "x$new_complete"; then
29941    CXX="$new_complete"
29942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29943$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29944  fi
29945
29946  TEST_COMPILER="$CXX"
29947  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29948  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29949  if test "x$OPENJDK_BUILD_OS" != xaix; then
29950    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29951    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29952$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29953
29954  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29955    # Follow a chain of symbolic links. Use readlink
29956    # where it exists, else fall back to horribly
29957    # complicated shell code.
29958    if test "x$READLINK_TESTED" != yes; then
29959      # On MacOSX there is a readlink tool with a different
29960      # purpose than the GNU readlink tool. Check the found readlink.
29961      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29962      if test "x$ISGNU" = x; then
29963        # A readlink that we do not know how to use.
29964        # Are there other non-GNU readlinks out there?
29965        READLINK_TESTED=yes
29966        READLINK=
29967      fi
29968    fi
29969
29970    if test "x$READLINK" != x; then
29971      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29972    else
29973      # Save the current directory for restoring afterwards
29974      STARTDIR=$PWD
29975      COUNTER=0
29976      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29977      sym_link_file=`$BASENAME $TEST_COMPILER`
29978      cd $sym_link_dir
29979      # Use -P flag to resolve symlinks in directories.
29980      cd `$THEPWDCMD -P`
29981      sym_link_dir=`$THEPWDCMD -P`
29982      # Resolve file symlinks
29983      while test $COUNTER -lt 20; do
29984        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29985        if test "x$ISLINK" == x; then
29986          # This is not a symbolic link! We are done!
29987          break
29988        fi
29989        # Again resolve directory symlinks since the target of the just found
29990        # link could be in a different directory
29991        cd `$DIRNAME $ISLINK`
29992        sym_link_dir=`$THEPWDCMD -P`
29993        sym_link_file=`$BASENAME $ISLINK`
29994        let COUNTER=COUNTER+1
29995      done
29996      cd $STARTDIR
29997      TEST_COMPILER=$sym_link_dir/$sym_link_file
29998    fi
29999  fi
30000
30001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30002$as_echo "$TEST_COMPILER" >&6; }
30003  fi
30004  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30005$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30006
30007  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30008  if test "x$COMPILER_BASENAME" = "xccache"; then
30009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30010$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30011    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30012    # We want to control ccache invocation ourselves, so ignore this cc and try
30013    # searching again.
30014
30015    # Remove the path to the fake ccache cc from the PATH
30016    RETRY_COMPILER_SAVED_PATH="$PATH"
30017    COMPILER_DIRNAME=`$DIRNAME $CXX`
30018    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30019
30020    # Try again looking for our compiler
30021    if test -n "$ac_tool_prefix"; then
30022  for ac_prog in $TOOLCHAIN_CXX_BINARY
30023  do
30024    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30025set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30027$as_echo_n "checking for $ac_word... " >&6; }
30028if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30029  $as_echo_n "(cached) " >&6
30030else
30031  if test -n "$PROPER_COMPILER_CXX"; then
30032  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30033else
30034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30035for as_dir in $PATH
30036do
30037  IFS=$as_save_IFS
30038  test -z "$as_dir" && as_dir=.
30039    for ac_exec_ext in '' $ac_executable_extensions; do
30040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30041    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30043    break 2
30044  fi
30045done
30046  done
30047IFS=$as_save_IFS
30048
30049fi
30050fi
30051PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30052if test -n "$PROPER_COMPILER_CXX"; then
30053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30054$as_echo "$PROPER_COMPILER_CXX" >&6; }
30055else
30056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30057$as_echo "no" >&6; }
30058fi
30059
30060
30061    test -n "$PROPER_COMPILER_CXX" && break
30062  done
30063fi
30064if test -z "$PROPER_COMPILER_CXX"; then
30065  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30066  for ac_prog in $TOOLCHAIN_CXX_BINARY
30067do
30068  # Extract the first word of "$ac_prog", so it can be a program name with args.
30069set dummy $ac_prog; ac_word=$2
30070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30071$as_echo_n "checking for $ac_word... " >&6; }
30072if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30073  $as_echo_n "(cached) " >&6
30074else
30075  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30076  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30077else
30078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30079for as_dir in $PATH
30080do
30081  IFS=$as_save_IFS
30082  test -z "$as_dir" && as_dir=.
30083    for ac_exec_ext in '' $ac_executable_extensions; do
30084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30085    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30087    break 2
30088  fi
30089done
30090  done
30091IFS=$as_save_IFS
30092
30093fi
30094fi
30095ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30096if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30098$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30099else
30100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30101$as_echo "no" >&6; }
30102fi
30103
30104
30105  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30106done
30107
30108  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30109    PROPER_COMPILER_CXX=""
30110  else
30111    case $cross_compiling:$ac_tool_warned in
30112yes:)
30113{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30114$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30115ac_tool_warned=yes ;;
30116esac
30117    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30118  fi
30119fi
30120
30121
30122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30123
30124  # First separate the path from the arguments. This will split at the first
30125  # space.
30126  complete="$PROPER_COMPILER_CXX"
30127  path="${complete%% *}"
30128  tmp="$complete EOL"
30129  arguments="${tmp#* }"
30130
30131  # Input might be given as Windows format, start by converting to
30132  # unix format.
30133  new_path=`$CYGPATH -u "$path"`
30134
30135  # Now try to locate executable using which
30136  new_path=`$WHICH "$new_path" 2> /dev/null`
30137  # bat and cmd files are not always considered executable in cygwin causing which
30138  # to not find them
30139  if test "x$new_path" = x \
30140      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30141      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30142    new_path=`$CYGPATH -u "$path"`
30143  fi
30144  if test "x$new_path" = x; then
30145    # Oops. Which didn't find the executable.
30146    # The splitting of arguments from the executable at a space might have been incorrect,
30147    # since paths with space are more likely in Windows. Give it another try with the whole
30148    # argument.
30149    path="$complete"
30150    arguments="EOL"
30151    new_path=`$CYGPATH -u "$path"`
30152    new_path=`$WHICH "$new_path" 2> /dev/null`
30153    # bat and cmd files are not always considered executable in cygwin causing which
30154    # to not find them
30155    if test "x$new_path" = x \
30156        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30157        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30158      new_path=`$CYGPATH -u "$path"`
30159    fi
30160    if test "x$new_path" = x; then
30161      # It's still not found. Now this is an unrecoverable error.
30162      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30163$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30164      has_space=`$ECHO "$complete" | $GREP " "`
30165      if test "x$has_space" != x; then
30166        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30167$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30168      fi
30169      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30170    fi
30171  fi
30172
30173  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30174  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30175  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30176  # "foo.exe" is OK but "foo" is an error.
30177  #
30178  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30179  # It is also a way to make sure we got the proper file name for the real test later on.
30180  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30181  if test "x$test_shortpath" = x; then
30182    # Short path failed, file does not exist as specified.
30183    # Try adding .exe or .cmd
30184    if test -f "${new_path}.exe"; then
30185      input_to_shortpath="${new_path}.exe"
30186    elif test -f "${new_path}.cmd"; then
30187      input_to_shortpath="${new_path}.cmd"
30188    else
30189      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30190$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30191      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30192$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30193      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30194    fi
30195  else
30196    input_to_shortpath="$new_path"
30197  fi
30198
30199  # Call helper function which possibly converts this using DOS-style short mode.
30200  # If so, the updated path is stored in $new_path.
30201  new_path="$input_to_shortpath"
30202
30203  input_path="$input_to_shortpath"
30204  # Check if we need to convert this using DOS-style short mode. If the path
30205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30206  # take no chances and rewrite it.
30207  # Note: m4 eats our [], so we need to use [ and ] instead.
30208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30209  if test "x$has_forbidden_chars" != x; then
30210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30211    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30212    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30213    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30214      # Going to short mode and back again did indeed matter. Since short mode is
30215      # case insensitive, let's make it lowercase to improve readability.
30216      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30217      # Now convert it back to Unix-stile (cygpath)
30218      input_path=`$CYGPATH -u "$shortmode_path"`
30219      new_path="$input_path"
30220    fi
30221  fi
30222
30223  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30224  if test "x$test_cygdrive_prefix" = x; then
30225    # As a simple fix, exclude /usr/bin since it's not a real path.
30226    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30227      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30228      # a path prefixed by /cygdrive for fixpath to work.
30229      new_path="$CYGWIN_ROOT_PATH$input_path"
30230    fi
30231  fi
30232
30233  # remove trailing .exe if any
30234  new_path="${new_path/%.exe/}"
30235
30236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30237
30238  # First separate the path from the arguments. This will split at the first
30239  # space.
30240  complete="$PROPER_COMPILER_CXX"
30241  path="${complete%% *}"
30242  tmp="$complete EOL"
30243  arguments="${tmp#* }"
30244
30245  # Input might be given as Windows format, start by converting to
30246  # unix format.
30247  new_path="$path"
30248
30249  windows_path="$new_path"
30250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30251    unix_path=`$CYGPATH -u "$windows_path"`
30252    new_path="$unix_path"
30253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30255    new_path="$unix_path"
30256  fi
30257
30258
30259  # Now try to locate executable using which
30260  new_path=`$WHICH "$new_path" 2> /dev/null`
30261
30262  if test "x$new_path" = x; then
30263    # Oops. Which didn't find the executable.
30264    # The splitting of arguments from the executable at a space might have been incorrect,
30265    # since paths with space are more likely in Windows. Give it another try with the whole
30266    # argument.
30267    path="$complete"
30268    arguments="EOL"
30269    new_path="$path"
30270
30271  windows_path="$new_path"
30272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30273    unix_path=`$CYGPATH -u "$windows_path"`
30274    new_path="$unix_path"
30275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30277    new_path="$unix_path"
30278  fi
30279
30280
30281    new_path=`$WHICH "$new_path" 2> /dev/null`
30282    # bat and cmd files are not always considered executable in MSYS causing which
30283    # to not find them
30284    if test "x$new_path" = x \
30285        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30286        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30287      new_path="$path"
30288
30289  windows_path="$new_path"
30290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30291    unix_path=`$CYGPATH -u "$windows_path"`
30292    new_path="$unix_path"
30293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30295    new_path="$unix_path"
30296  fi
30297
30298    fi
30299
30300    if test "x$new_path" = x; then
30301      # It's still not found. Now this is an unrecoverable error.
30302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30303$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30304      has_space=`$ECHO "$complete" | $GREP " "`
30305      if test "x$has_space" != x; then
30306        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30307$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30308      fi
30309      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30310    fi
30311  fi
30312
30313  # Now new_path has a complete unix path to the binary
30314  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30315    # Keep paths in /bin as-is, but remove trailing .exe if any
30316    new_path="${new_path/%.exe/}"
30317    # Do not save /bin paths to all_fixpath_prefixes!
30318  else
30319    # Not in mixed or Windows style, start by that.
30320    new_path=`cmd //c echo $new_path`
30321
30322  input_path="$new_path"
30323  # Check if we need to convert this using DOS-style short mode. If the path
30324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30325  # take no chances and rewrite it.
30326  # Note: m4 eats our [], so we need to use [ and ] instead.
30327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30328  if test "x$has_forbidden_chars" != x; then
30329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30330    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30331  fi
30332
30333    # Output is in $new_path
30334
30335  windows_path="$new_path"
30336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30337    unix_path=`$CYGPATH -u "$windows_path"`
30338    new_path="$unix_path"
30339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30341    new_path="$unix_path"
30342  fi
30343
30344    # remove trailing .exe if any
30345    new_path="${new_path/%.exe/}"
30346
30347    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30348    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30349  fi
30350
30351  else
30352    # We're on a unix platform. Hooray! :)
30353    # First separate the path from the arguments. This will split at the first
30354    # space.
30355    complete="$PROPER_COMPILER_CXX"
30356    path="${complete%% *}"
30357    tmp="$complete EOL"
30358    arguments="${tmp#* }"
30359
30360    # Cannot rely on the command "which" here since it doesn't always work.
30361    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30362    if test -z "$is_absolute_path"; then
30363      # Path to executable is not absolute. Find it.
30364      IFS_save="$IFS"
30365      IFS=:
30366      for p in $PATH; do
30367        if test -f "$p/$path" && test -x "$p/$path"; then
30368          new_path="$p/$path"
30369          break
30370        fi
30371      done
30372      IFS="$IFS_save"
30373    else
30374      # This is an absolute path, we can use it without further modifications.
30375      new_path="$path"
30376    fi
30377
30378    if test "x$new_path" = x; then
30379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30380$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30381      has_space=`$ECHO "$complete" | $GREP " "`
30382      if test "x$has_space" != x; then
30383        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30384$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30385      fi
30386      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30387    fi
30388  fi
30389
30390  # Now join together the path and the arguments once again
30391  if test "x$arguments" != xEOL; then
30392    new_complete="$new_path ${arguments% *}"
30393  else
30394    new_complete="$new_path"
30395  fi
30396
30397  if test "x$complete" != "x$new_complete"; then
30398    PROPER_COMPILER_CXX="$new_complete"
30399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30400$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30401  fi
30402
30403    PATH="$RETRY_COMPILER_SAVED_PATH"
30404
30405    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30406$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30407
30408  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30409    # Follow a chain of symbolic links. Use readlink
30410    # where it exists, else fall back to horribly
30411    # complicated shell code.
30412    if test "x$READLINK_TESTED" != yes; then
30413      # On MacOSX there is a readlink tool with a different
30414      # purpose than the GNU readlink tool. Check the found readlink.
30415      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30416      if test "x$ISGNU" = x; then
30417        # A readlink that we do not know how to use.
30418        # Are there other non-GNU readlinks out there?
30419        READLINK_TESTED=yes
30420        READLINK=
30421      fi
30422    fi
30423
30424    if test "x$READLINK" != x; then
30425      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30426    else
30427      # Save the current directory for restoring afterwards
30428      STARTDIR=$PWD
30429      COUNTER=0
30430      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30431      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30432      cd $sym_link_dir
30433      # Use -P flag to resolve symlinks in directories.
30434      cd `$THEPWDCMD -P`
30435      sym_link_dir=`$THEPWDCMD -P`
30436      # Resolve file symlinks
30437      while test $COUNTER -lt 20; do
30438        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30439        if test "x$ISLINK" == x; then
30440          # This is not a symbolic link! We are done!
30441          break
30442        fi
30443        # Again resolve directory symlinks since the target of the just found
30444        # link could be in a different directory
30445        cd `$DIRNAME $ISLINK`
30446        sym_link_dir=`$THEPWDCMD -P`
30447        sym_link_file=`$BASENAME $ISLINK`
30448        let COUNTER=COUNTER+1
30449      done
30450      cd $STARTDIR
30451      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30452    fi
30453  fi
30454
30455    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30456$as_echo "$PROPER_COMPILER_CXX" >&6; }
30457    CXX="$PROPER_COMPILER_CXX"
30458  else
30459    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30460$as_echo "no, keeping CXX" >&6; }
30461  fi
30462
30463
30464  COMPILER=$CXX
30465  COMPILER_NAME=$COMPILER_NAME
30466
30467  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30468    # cc -V output typically looks like
30469    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30470    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30471    # Check that this is likely to be the Solaris Studio cc.
30472    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30473    if test $? -ne 0; then
30474      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30475      { $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
30476$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30477      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30478$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30479      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30480$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30481      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30482    fi
30483    # Remove usage instructions (if present), and
30484    # collapse compiler output into a single line
30485    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30486        $SED -e 's/ *[Uu]sage:.*//'`
30487    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30488        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30489  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30490    # xlc -qversion output typically looks like
30491    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30492    #     Version: 11.01.0000.0015
30493    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30494    # Check that this is likely to be the IBM XL C compiler.
30495    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30496    if test $? -ne 0; then
30497      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30498      { $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
30499$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30500      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30501$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30502      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30503$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30504      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30505    fi
30506    # Collapse compiler output into a single line
30507    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30508    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30509        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30510  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30511    # There is no specific version flag, but all output starts with a version string.
30512    # First line typically looks something like:
30513    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30514    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30515    # Check that this is likely to be Microsoft CL.EXE.
30516    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30517    if test $? -ne 0; then
30518      { $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
30519$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30520      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30521$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30522      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30523    fi
30524    # Collapse compiler output into a single line
30525    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30526    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30527        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30528  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30529    # gcc --version output typically looks like
30530    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30531    #     Copyright (C) 2013 Free Software Foundation, Inc.
30532    #     This is free software; see the source for copying conditions.  There is NO
30533    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30534    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30535    # Check that this is likely to be GCC.
30536    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30537    if test $? -ne 0; then
30538      { $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
30539$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30540      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30541$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30542      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30543    fi
30544    # Remove Copyright and legalese from version string, and
30545    # collapse into a single line
30546    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30547        $SED -e 's/ *Copyright .*//'`
30548    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30549        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30550  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30551    # clang --version output typically looks like
30552    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30553    #    clang version 3.3 (tags/RELEASE_33/final)
30554    # or
30555    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30556    #    Target: x86_64-pc-linux-gnu
30557    #    Thread model: posix
30558    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30559    # Check that this is likely to be clang
30560    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30561    if test $? -ne 0; then
30562      { $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
30563$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30564      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30565$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30566      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30567    fi
30568    # Collapse compiler output into a single line
30569    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30570    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30571        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30572  else
30573      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30574  fi
30575  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30576  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30577  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30578  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30579
30580  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30581$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30582
30583
30584  # Now that we have resolved CXX ourself, let autoconf have its go at it
30585  ac_ext=cpp
30586ac_cpp='$CXXCPP $CPPFLAGS'
30587ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30588ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30589ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30590if test -z "$CXX"; then
30591  if test -n "$CCC"; then
30592    CXX=$CCC
30593  else
30594    if test -n "$ac_tool_prefix"; then
30595  for ac_prog in $CXX
30596  do
30597    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30598set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30600$as_echo_n "checking for $ac_word... " >&6; }
30601if ${ac_cv_prog_CXX+:} false; then :
30602  $as_echo_n "(cached) " >&6
30603else
30604  if test -n "$CXX"; then
30605  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30606else
30607as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30608for as_dir in $PATH
30609do
30610  IFS=$as_save_IFS
30611  test -z "$as_dir" && as_dir=.
30612    for ac_exec_ext in '' $ac_executable_extensions; do
30613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30614    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30616    break 2
30617  fi
30618done
30619  done
30620IFS=$as_save_IFS
30621
30622fi
30623fi
30624CXX=$ac_cv_prog_CXX
30625if test -n "$CXX"; then
30626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30627$as_echo "$CXX" >&6; }
30628else
30629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30630$as_echo "no" >&6; }
30631fi
30632
30633
30634    test -n "$CXX" && break
30635  done
30636fi
30637if test -z "$CXX"; then
30638  ac_ct_CXX=$CXX
30639  for ac_prog in $CXX
30640do
30641  # Extract the first word of "$ac_prog", so it can be a program name with args.
30642set dummy $ac_prog; ac_word=$2
30643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30644$as_echo_n "checking for $ac_word... " >&6; }
30645if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30646  $as_echo_n "(cached) " >&6
30647else
30648  if test -n "$ac_ct_CXX"; then
30649  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30650else
30651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30652for as_dir in $PATH
30653do
30654  IFS=$as_save_IFS
30655  test -z "$as_dir" && as_dir=.
30656    for ac_exec_ext in '' $ac_executable_extensions; do
30657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30658    ac_cv_prog_ac_ct_CXX="$ac_prog"
30659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30660    break 2
30661  fi
30662done
30663  done
30664IFS=$as_save_IFS
30665
30666fi
30667fi
30668ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30669if test -n "$ac_ct_CXX"; then
30670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30671$as_echo "$ac_ct_CXX" >&6; }
30672else
30673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30674$as_echo "no" >&6; }
30675fi
30676
30677
30678  test -n "$ac_ct_CXX" && break
30679done
30680
30681  if test "x$ac_ct_CXX" = x; then
30682    CXX="g++"
30683  else
30684    case $cross_compiling:$ac_tool_warned in
30685yes:)
30686{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30687$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30688ac_tool_warned=yes ;;
30689esac
30690    CXX=$ac_ct_CXX
30691  fi
30692fi
30693
30694  fi
30695fi
30696# Provide some information about the compiler.
30697$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30698set X $ac_compile
30699ac_compiler=$2
30700for ac_option in --version -v -V -qversion; do
30701  { { ac_try="$ac_compiler $ac_option >&5"
30702case "(($ac_try" in
30703  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30704  *) ac_try_echo=$ac_try;;
30705esac
30706eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30707$as_echo "$ac_try_echo"; } >&5
30708  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30709  ac_status=$?
30710  if test -s conftest.err; then
30711    sed '10a\
30712... rest of stderr output deleted ...
30713         10q' conftest.err >conftest.er1
30714    cat conftest.er1 >&5
30715  fi
30716  rm -f conftest.er1 conftest.err
30717  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30718  test $ac_status = 0; }
30719done
30720
30721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30722$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30723if ${ac_cv_cxx_compiler_gnu+:} false; then :
30724  $as_echo_n "(cached) " >&6
30725else
30726  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30727/* end confdefs.h.  */
30728
30729int
30730main ()
30731{
30732#ifndef __GNUC__
30733       choke me
30734#endif
30735
30736  ;
30737  return 0;
30738}
30739_ACEOF
30740if ac_fn_cxx_try_compile "$LINENO"; then :
30741  ac_compiler_gnu=yes
30742else
30743  ac_compiler_gnu=no
30744fi
30745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30746ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30747
30748fi
30749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30750$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30751if test $ac_compiler_gnu = yes; then
30752  GXX=yes
30753else
30754  GXX=
30755fi
30756ac_test_CXXFLAGS=${CXXFLAGS+set}
30757ac_save_CXXFLAGS=$CXXFLAGS
30758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30759$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30760if ${ac_cv_prog_cxx_g+:} false; then :
30761  $as_echo_n "(cached) " >&6
30762else
30763  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30764   ac_cxx_werror_flag=yes
30765   ac_cv_prog_cxx_g=no
30766   CXXFLAGS="-g"
30767   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30768/* end confdefs.h.  */
30769
30770int
30771main ()
30772{
30773
30774  ;
30775  return 0;
30776}
30777_ACEOF
30778if ac_fn_cxx_try_compile "$LINENO"; then :
30779  ac_cv_prog_cxx_g=yes
30780else
30781  CXXFLAGS=""
30782      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30783/* end confdefs.h.  */
30784
30785int
30786main ()
30787{
30788
30789  ;
30790  return 0;
30791}
30792_ACEOF
30793if ac_fn_cxx_try_compile "$LINENO"; then :
30794
30795else
30796  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30797	 CXXFLAGS="-g"
30798	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30799/* end confdefs.h.  */
30800
30801int
30802main ()
30803{
30804
30805  ;
30806  return 0;
30807}
30808_ACEOF
30809if ac_fn_cxx_try_compile "$LINENO"; then :
30810  ac_cv_prog_cxx_g=yes
30811fi
30812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30813fi
30814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30815fi
30816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30817   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30818fi
30819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30820$as_echo "$ac_cv_prog_cxx_g" >&6; }
30821if test "$ac_test_CXXFLAGS" = set; then
30822  CXXFLAGS=$ac_save_CXXFLAGS
30823elif test $ac_cv_prog_cxx_g = yes; then
30824  if test "$GXX" = yes; then
30825    CXXFLAGS="-g -O2"
30826  else
30827    CXXFLAGS="-g"
30828  fi
30829else
30830  if test "$GXX" = yes; then
30831    CXXFLAGS="-O2"
30832  else
30833    CXXFLAGS=
30834  fi
30835fi
30836ac_ext=cpp
30837ac_cpp='$CXXCPP $CPPFLAGS'
30838ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30839ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30840ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30841
30842
30843  #
30844  # Setup the preprocessor (CPP and CXXCPP)
30845  #
30846  ac_ext=c
30847ac_cpp='$CPP $CPPFLAGS'
30848ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30849ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30850ac_compiler_gnu=$ac_cv_c_compiler_gnu
30851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30852$as_echo_n "checking how to run the C preprocessor... " >&6; }
30853# On Suns, sometimes $CPP names a directory.
30854if test -n "$CPP" && test -d "$CPP"; then
30855  CPP=
30856fi
30857if test -z "$CPP"; then
30858  if ${ac_cv_prog_CPP+:} false; then :
30859  $as_echo_n "(cached) " >&6
30860else
30861      # Double quotes because CPP needs to be expanded
30862    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30863    do
30864      ac_preproc_ok=false
30865for ac_c_preproc_warn_flag in '' yes
30866do
30867  # Use a header file that comes with gcc, so configuring glibc
30868  # with a fresh cross-compiler works.
30869  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30870  # <limits.h> exists even on freestanding compilers.
30871  # On the NeXT, cc -E runs the code through the compiler's parser,
30872  # not just through cpp. "Syntax error" is here to catch this case.
30873  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30874/* end confdefs.h.  */
30875#ifdef __STDC__
30876# include <limits.h>
30877#else
30878# include <assert.h>
30879#endif
30880		     Syntax error
30881_ACEOF
30882if ac_fn_c_try_cpp "$LINENO"; then :
30883
30884else
30885  # Broken: fails on valid input.
30886continue
30887fi
30888rm -f conftest.err conftest.i conftest.$ac_ext
30889
30890  # OK, works on sane cases.  Now check whether nonexistent headers
30891  # can be detected and how.
30892  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30893/* end confdefs.h.  */
30894#include <ac_nonexistent.h>
30895_ACEOF
30896if ac_fn_c_try_cpp "$LINENO"; then :
30897  # Broken: success on invalid input.
30898continue
30899else
30900  # Passes both tests.
30901ac_preproc_ok=:
30902break
30903fi
30904rm -f conftest.err conftest.i conftest.$ac_ext
30905
30906done
30907# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30908rm -f conftest.i conftest.err conftest.$ac_ext
30909if $ac_preproc_ok; then :
30910  break
30911fi
30912
30913    done
30914    ac_cv_prog_CPP=$CPP
30915
30916fi
30917  CPP=$ac_cv_prog_CPP
30918else
30919  ac_cv_prog_CPP=$CPP
30920fi
30921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30922$as_echo "$CPP" >&6; }
30923ac_preproc_ok=false
30924for ac_c_preproc_warn_flag in '' yes
30925do
30926  # Use a header file that comes with gcc, so configuring glibc
30927  # with a fresh cross-compiler works.
30928  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30929  # <limits.h> exists even on freestanding compilers.
30930  # On the NeXT, cc -E runs the code through the compiler's parser,
30931  # not just through cpp. "Syntax error" is here to catch this case.
30932  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30933/* end confdefs.h.  */
30934#ifdef __STDC__
30935# include <limits.h>
30936#else
30937# include <assert.h>
30938#endif
30939		     Syntax error
30940_ACEOF
30941if ac_fn_c_try_cpp "$LINENO"; then :
30942
30943else
30944  # Broken: fails on valid input.
30945continue
30946fi
30947rm -f conftest.err conftest.i conftest.$ac_ext
30948
30949  # OK, works on sane cases.  Now check whether nonexistent headers
30950  # can be detected and how.
30951  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30952/* end confdefs.h.  */
30953#include <ac_nonexistent.h>
30954_ACEOF
30955if ac_fn_c_try_cpp "$LINENO"; then :
30956  # Broken: success on invalid input.
30957continue
30958else
30959  # Passes both tests.
30960ac_preproc_ok=:
30961break
30962fi
30963rm -f conftest.err conftest.i conftest.$ac_ext
30964
30965done
30966# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30967rm -f conftest.i conftest.err conftest.$ac_ext
30968if $ac_preproc_ok; then :
30969
30970else
30971  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30972$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30973as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30974See \`config.log' for more details" "$LINENO" 5; }
30975fi
30976
30977ac_ext=cpp
30978ac_cpp='$CXXCPP $CPPFLAGS'
30979ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30980ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30981ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30982
30983
30984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30985
30986  # First separate the path from the arguments. This will split at the first
30987  # space.
30988  complete="$CPP"
30989  path="${complete%% *}"
30990  tmp="$complete EOL"
30991  arguments="${tmp#* }"
30992
30993  # Input might be given as Windows format, start by converting to
30994  # unix format.
30995  new_path=`$CYGPATH -u "$path"`
30996
30997  # Now try to locate executable using which
30998  new_path=`$WHICH "$new_path" 2> /dev/null`
30999  # bat and cmd files are not always considered executable in cygwin causing which
31000  # to not find them
31001  if test "x$new_path" = x \
31002      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31003      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31004    new_path=`$CYGPATH -u "$path"`
31005  fi
31006  if test "x$new_path" = x; then
31007    # Oops. Which didn't find the executable.
31008    # The splitting of arguments from the executable at a space might have been incorrect,
31009    # since paths with space are more likely in Windows. Give it another try with the whole
31010    # argument.
31011    path="$complete"
31012    arguments="EOL"
31013    new_path=`$CYGPATH -u "$path"`
31014    new_path=`$WHICH "$new_path" 2> /dev/null`
31015    # bat and cmd files are not always considered executable in cygwin causing which
31016    # to not find them
31017    if test "x$new_path" = x \
31018        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31019        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31020      new_path=`$CYGPATH -u "$path"`
31021    fi
31022    if test "x$new_path" = x; then
31023      # It's still not found. Now this is an unrecoverable error.
31024      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31025$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31026      has_space=`$ECHO "$complete" | $GREP " "`
31027      if test "x$has_space" != x; then
31028        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31029$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31030      fi
31031      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31032    fi
31033  fi
31034
31035  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31036  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31037  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31038  # "foo.exe" is OK but "foo" is an error.
31039  #
31040  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31041  # It is also a way to make sure we got the proper file name for the real test later on.
31042  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31043  if test "x$test_shortpath" = x; then
31044    # Short path failed, file does not exist as specified.
31045    # Try adding .exe or .cmd
31046    if test -f "${new_path}.exe"; then
31047      input_to_shortpath="${new_path}.exe"
31048    elif test -f "${new_path}.cmd"; then
31049      input_to_shortpath="${new_path}.cmd"
31050    else
31051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31052$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31053      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31054$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31055      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31056    fi
31057  else
31058    input_to_shortpath="$new_path"
31059  fi
31060
31061  # Call helper function which possibly converts this using DOS-style short mode.
31062  # If so, the updated path is stored in $new_path.
31063  new_path="$input_to_shortpath"
31064
31065  input_path="$input_to_shortpath"
31066  # Check if we need to convert this using DOS-style short mode. If the path
31067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31068  # take no chances and rewrite it.
31069  # Note: m4 eats our [], so we need to use [ and ] instead.
31070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31071  if test "x$has_forbidden_chars" != x; then
31072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31073    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31074    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31075    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31076      # Going to short mode and back again did indeed matter. Since short mode is
31077      # case insensitive, let's make it lowercase to improve readability.
31078      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31079      # Now convert it back to Unix-stile (cygpath)
31080      input_path=`$CYGPATH -u "$shortmode_path"`
31081      new_path="$input_path"
31082    fi
31083  fi
31084
31085  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31086  if test "x$test_cygdrive_prefix" = x; then
31087    # As a simple fix, exclude /usr/bin since it's not a real path.
31088    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31089      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31090      # a path prefixed by /cygdrive for fixpath to work.
31091      new_path="$CYGWIN_ROOT_PATH$input_path"
31092    fi
31093  fi
31094
31095  # remove trailing .exe if any
31096  new_path="${new_path/%.exe/}"
31097
31098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31099
31100  # First separate the path from the arguments. This will split at the first
31101  # space.
31102  complete="$CPP"
31103  path="${complete%% *}"
31104  tmp="$complete EOL"
31105  arguments="${tmp#* }"
31106
31107  # Input might be given as Windows format, start by converting to
31108  # unix format.
31109  new_path="$path"
31110
31111  windows_path="$new_path"
31112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31113    unix_path=`$CYGPATH -u "$windows_path"`
31114    new_path="$unix_path"
31115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31117    new_path="$unix_path"
31118  fi
31119
31120
31121  # Now try to locate executable using which
31122  new_path=`$WHICH "$new_path" 2> /dev/null`
31123
31124  if test "x$new_path" = x; then
31125    # Oops. Which didn't find the executable.
31126    # The splitting of arguments from the executable at a space might have been incorrect,
31127    # since paths with space are more likely in Windows. Give it another try with the whole
31128    # argument.
31129    path="$complete"
31130    arguments="EOL"
31131    new_path="$path"
31132
31133  windows_path="$new_path"
31134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31135    unix_path=`$CYGPATH -u "$windows_path"`
31136    new_path="$unix_path"
31137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31139    new_path="$unix_path"
31140  fi
31141
31142
31143    new_path=`$WHICH "$new_path" 2> /dev/null`
31144    # bat and cmd files are not always considered executable in MSYS causing which
31145    # to not find them
31146    if test "x$new_path" = x \
31147        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31148        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31149      new_path="$path"
31150
31151  windows_path="$new_path"
31152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31153    unix_path=`$CYGPATH -u "$windows_path"`
31154    new_path="$unix_path"
31155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31157    new_path="$unix_path"
31158  fi
31159
31160    fi
31161
31162    if test "x$new_path" = x; then
31163      # It's still not found. Now this is an unrecoverable error.
31164      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31165$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31166      has_space=`$ECHO "$complete" | $GREP " "`
31167      if test "x$has_space" != x; then
31168        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31169$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31170      fi
31171      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31172    fi
31173  fi
31174
31175  # Now new_path has a complete unix path to the binary
31176  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31177    # Keep paths in /bin as-is, but remove trailing .exe if any
31178    new_path="${new_path/%.exe/}"
31179    # Do not save /bin paths to all_fixpath_prefixes!
31180  else
31181    # Not in mixed or Windows style, start by that.
31182    new_path=`cmd //c echo $new_path`
31183
31184  input_path="$new_path"
31185  # Check if we need to convert this using DOS-style short mode. If the path
31186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31187  # take no chances and rewrite it.
31188  # Note: m4 eats our [], so we need to use [ and ] instead.
31189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31190  if test "x$has_forbidden_chars" != x; then
31191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31192    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31193  fi
31194
31195    # Output is in $new_path
31196
31197  windows_path="$new_path"
31198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31199    unix_path=`$CYGPATH -u "$windows_path"`
31200    new_path="$unix_path"
31201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31203    new_path="$unix_path"
31204  fi
31205
31206    # remove trailing .exe if any
31207    new_path="${new_path/%.exe/}"
31208
31209    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31210    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31211  fi
31212
31213  else
31214    # We're on a unix platform. Hooray! :)
31215    # First separate the path from the arguments. This will split at the first
31216    # space.
31217    complete="$CPP"
31218    path="${complete%% *}"
31219    tmp="$complete EOL"
31220    arguments="${tmp#* }"
31221
31222    # Cannot rely on the command "which" here since it doesn't always work.
31223    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31224    if test -z "$is_absolute_path"; then
31225      # Path to executable is not absolute. Find it.
31226      IFS_save="$IFS"
31227      IFS=:
31228      for p in $PATH; do
31229        if test -f "$p/$path" && test -x "$p/$path"; then
31230          new_path="$p/$path"
31231          break
31232        fi
31233      done
31234      IFS="$IFS_save"
31235    else
31236      # This is an absolute path, we can use it without further modifications.
31237      new_path="$path"
31238    fi
31239
31240    if test "x$new_path" = x; then
31241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31242$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31243      has_space=`$ECHO "$complete" | $GREP " "`
31244      if test "x$has_space" != x; then
31245        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31246$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31247      fi
31248      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31249    fi
31250  fi
31251
31252  # Now join together the path and the arguments once again
31253  if test "x$arguments" != xEOL; then
31254    new_complete="$new_path ${arguments% *}"
31255  else
31256    new_complete="$new_path"
31257  fi
31258
31259  if test "x$complete" != "x$new_complete"; then
31260    CPP="$new_complete"
31261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31262$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31263  fi
31264
31265  ac_ext=cpp
31266ac_cpp='$CXXCPP $CPPFLAGS'
31267ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31268ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31269ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31271$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31272if test -z "$CXXCPP"; then
31273  if ${ac_cv_prog_CXXCPP+:} false; then :
31274  $as_echo_n "(cached) " >&6
31275else
31276      # Double quotes because CXXCPP needs to be expanded
31277    for CXXCPP in "$CXX -E" "/lib/cpp"
31278    do
31279      ac_preproc_ok=false
31280for ac_cxx_preproc_warn_flag in '' yes
31281do
31282  # Use a header file that comes with gcc, so configuring glibc
31283  # with a fresh cross-compiler works.
31284  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31285  # <limits.h> exists even on freestanding compilers.
31286  # On the NeXT, cc -E runs the code through the compiler's parser,
31287  # not just through cpp. "Syntax error" is here to catch this case.
31288  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31289/* end confdefs.h.  */
31290#ifdef __STDC__
31291# include <limits.h>
31292#else
31293# include <assert.h>
31294#endif
31295		     Syntax error
31296_ACEOF
31297if ac_fn_cxx_try_cpp "$LINENO"; then :
31298
31299else
31300  # Broken: fails on valid input.
31301continue
31302fi
31303rm -f conftest.err conftest.i conftest.$ac_ext
31304
31305  # OK, works on sane cases.  Now check whether nonexistent headers
31306  # can be detected and how.
31307  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31308/* end confdefs.h.  */
31309#include <ac_nonexistent.h>
31310_ACEOF
31311if ac_fn_cxx_try_cpp "$LINENO"; then :
31312  # Broken: success on invalid input.
31313continue
31314else
31315  # Passes both tests.
31316ac_preproc_ok=:
31317break
31318fi
31319rm -f conftest.err conftest.i conftest.$ac_ext
31320
31321done
31322# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31323rm -f conftest.i conftest.err conftest.$ac_ext
31324if $ac_preproc_ok; then :
31325  break
31326fi
31327
31328    done
31329    ac_cv_prog_CXXCPP=$CXXCPP
31330
31331fi
31332  CXXCPP=$ac_cv_prog_CXXCPP
31333else
31334  ac_cv_prog_CXXCPP=$CXXCPP
31335fi
31336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31337$as_echo "$CXXCPP" >&6; }
31338ac_preproc_ok=false
31339for ac_cxx_preproc_warn_flag in '' yes
31340do
31341  # Use a header file that comes with gcc, so configuring glibc
31342  # with a fresh cross-compiler works.
31343  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31344  # <limits.h> exists even on freestanding compilers.
31345  # On the NeXT, cc -E runs the code through the compiler's parser,
31346  # not just through cpp. "Syntax error" is here to catch this case.
31347  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31348/* end confdefs.h.  */
31349#ifdef __STDC__
31350# include <limits.h>
31351#else
31352# include <assert.h>
31353#endif
31354		     Syntax error
31355_ACEOF
31356if ac_fn_cxx_try_cpp "$LINENO"; then :
31357
31358else
31359  # Broken: fails on valid input.
31360continue
31361fi
31362rm -f conftest.err conftest.i conftest.$ac_ext
31363
31364  # OK, works on sane cases.  Now check whether nonexistent headers
31365  # can be detected and how.
31366  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31367/* end confdefs.h.  */
31368#include <ac_nonexistent.h>
31369_ACEOF
31370if ac_fn_cxx_try_cpp "$LINENO"; then :
31371  # Broken: success on invalid input.
31372continue
31373else
31374  # Passes both tests.
31375ac_preproc_ok=:
31376break
31377fi
31378rm -f conftest.err conftest.i conftest.$ac_ext
31379
31380done
31381# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31382rm -f conftest.i conftest.err conftest.$ac_ext
31383if $ac_preproc_ok; then :
31384
31385else
31386  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31387$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31388as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31389See \`config.log' for more details" "$LINENO" 5; }
31390fi
31391
31392ac_ext=cpp
31393ac_cpp='$CXXCPP $CPPFLAGS'
31394ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31395ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31396ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31397
31398
31399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31400
31401  # First separate the path from the arguments. This will split at the first
31402  # space.
31403  complete="$CXXCPP"
31404  path="${complete%% *}"
31405  tmp="$complete EOL"
31406  arguments="${tmp#* }"
31407
31408  # Input might be given as Windows format, start by converting to
31409  # unix format.
31410  new_path=`$CYGPATH -u "$path"`
31411
31412  # Now try to locate executable using which
31413  new_path=`$WHICH "$new_path" 2> /dev/null`
31414  # bat and cmd files are not always considered executable in cygwin causing which
31415  # to not find them
31416  if test "x$new_path" = x \
31417      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31418      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31419    new_path=`$CYGPATH -u "$path"`
31420  fi
31421  if test "x$new_path" = x; then
31422    # Oops. Which didn't find the executable.
31423    # The splitting of arguments from the executable at a space might have been incorrect,
31424    # since paths with space are more likely in Windows. Give it another try with the whole
31425    # argument.
31426    path="$complete"
31427    arguments="EOL"
31428    new_path=`$CYGPATH -u "$path"`
31429    new_path=`$WHICH "$new_path" 2> /dev/null`
31430    # bat and cmd files are not always considered executable in cygwin causing which
31431    # to not find them
31432    if test "x$new_path" = x \
31433        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31434        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31435      new_path=`$CYGPATH -u "$path"`
31436    fi
31437    if test "x$new_path" = x; then
31438      # It's still not found. Now this is an unrecoverable error.
31439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31440$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31441      has_space=`$ECHO "$complete" | $GREP " "`
31442      if test "x$has_space" != x; then
31443        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31444$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31445      fi
31446      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31447    fi
31448  fi
31449
31450  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31451  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31452  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31453  # "foo.exe" is OK but "foo" is an error.
31454  #
31455  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31456  # It is also a way to make sure we got the proper file name for the real test later on.
31457  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31458  if test "x$test_shortpath" = x; then
31459    # Short path failed, file does not exist as specified.
31460    # Try adding .exe or .cmd
31461    if test -f "${new_path}.exe"; then
31462      input_to_shortpath="${new_path}.exe"
31463    elif test -f "${new_path}.cmd"; then
31464      input_to_shortpath="${new_path}.cmd"
31465    else
31466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31467$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31468      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31469$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31470      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31471    fi
31472  else
31473    input_to_shortpath="$new_path"
31474  fi
31475
31476  # Call helper function which possibly converts this using DOS-style short mode.
31477  # If so, the updated path is stored in $new_path.
31478  new_path="$input_to_shortpath"
31479
31480  input_path="$input_to_shortpath"
31481  # Check if we need to convert this using DOS-style short mode. If the path
31482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31483  # take no chances and rewrite it.
31484  # Note: m4 eats our [], so we need to use [ and ] instead.
31485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31486  if test "x$has_forbidden_chars" != x; then
31487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31488    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31489    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31490    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31491      # Going to short mode and back again did indeed matter. Since short mode is
31492      # case insensitive, let's make it lowercase to improve readability.
31493      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31494      # Now convert it back to Unix-stile (cygpath)
31495      input_path=`$CYGPATH -u "$shortmode_path"`
31496      new_path="$input_path"
31497    fi
31498  fi
31499
31500  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31501  if test "x$test_cygdrive_prefix" = x; then
31502    # As a simple fix, exclude /usr/bin since it's not a real path.
31503    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31504      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31505      # a path prefixed by /cygdrive for fixpath to work.
31506      new_path="$CYGWIN_ROOT_PATH$input_path"
31507    fi
31508  fi
31509
31510  # remove trailing .exe if any
31511  new_path="${new_path/%.exe/}"
31512
31513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31514
31515  # First separate the path from the arguments. This will split at the first
31516  # space.
31517  complete="$CXXCPP"
31518  path="${complete%% *}"
31519  tmp="$complete EOL"
31520  arguments="${tmp#* }"
31521
31522  # Input might be given as Windows format, start by converting to
31523  # unix format.
31524  new_path="$path"
31525
31526  windows_path="$new_path"
31527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31528    unix_path=`$CYGPATH -u "$windows_path"`
31529    new_path="$unix_path"
31530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31532    new_path="$unix_path"
31533  fi
31534
31535
31536  # Now try to locate executable using which
31537  new_path=`$WHICH "$new_path" 2> /dev/null`
31538
31539  if test "x$new_path" = x; then
31540    # Oops. Which didn't find the executable.
31541    # The splitting of arguments from the executable at a space might have been incorrect,
31542    # since paths with space are more likely in Windows. Give it another try with the whole
31543    # argument.
31544    path="$complete"
31545    arguments="EOL"
31546    new_path="$path"
31547
31548  windows_path="$new_path"
31549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31550    unix_path=`$CYGPATH -u "$windows_path"`
31551    new_path="$unix_path"
31552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31554    new_path="$unix_path"
31555  fi
31556
31557
31558    new_path=`$WHICH "$new_path" 2> /dev/null`
31559    # bat and cmd files are not always considered executable in MSYS causing which
31560    # to not find them
31561    if test "x$new_path" = x \
31562        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31563        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31564      new_path="$path"
31565
31566  windows_path="$new_path"
31567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31568    unix_path=`$CYGPATH -u "$windows_path"`
31569    new_path="$unix_path"
31570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31572    new_path="$unix_path"
31573  fi
31574
31575    fi
31576
31577    if test "x$new_path" = x; then
31578      # It's still not found. Now this is an unrecoverable error.
31579      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31580$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31581      has_space=`$ECHO "$complete" | $GREP " "`
31582      if test "x$has_space" != x; then
31583        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31584$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31585      fi
31586      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31587    fi
31588  fi
31589
31590  # Now new_path has a complete unix path to the binary
31591  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31592    # Keep paths in /bin as-is, but remove trailing .exe if any
31593    new_path="${new_path/%.exe/}"
31594    # Do not save /bin paths to all_fixpath_prefixes!
31595  else
31596    # Not in mixed or Windows style, start by that.
31597    new_path=`cmd //c echo $new_path`
31598
31599  input_path="$new_path"
31600  # Check if we need to convert this using DOS-style short mode. If the path
31601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31602  # take no chances and rewrite it.
31603  # Note: m4 eats our [], so we need to use [ and ] instead.
31604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31605  if test "x$has_forbidden_chars" != x; then
31606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31607    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31608  fi
31609
31610    # Output is in $new_path
31611
31612  windows_path="$new_path"
31613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31614    unix_path=`$CYGPATH -u "$windows_path"`
31615    new_path="$unix_path"
31616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31618    new_path="$unix_path"
31619  fi
31620
31621    # remove trailing .exe if any
31622    new_path="${new_path/%.exe/}"
31623
31624    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31625    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31626  fi
31627
31628  else
31629    # We're on a unix platform. Hooray! :)
31630    # First separate the path from the arguments. This will split at the first
31631    # space.
31632    complete="$CXXCPP"
31633    path="${complete%% *}"
31634    tmp="$complete EOL"
31635    arguments="${tmp#* }"
31636
31637    # Cannot rely on the command "which" here since it doesn't always work.
31638    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31639    if test -z "$is_absolute_path"; then
31640      # Path to executable is not absolute. Find it.
31641      IFS_save="$IFS"
31642      IFS=:
31643      for p in $PATH; do
31644        if test -f "$p/$path" && test -x "$p/$path"; then
31645          new_path="$p/$path"
31646          break
31647        fi
31648      done
31649      IFS="$IFS_save"
31650    else
31651      # This is an absolute path, we can use it without further modifications.
31652      new_path="$path"
31653    fi
31654
31655    if test "x$new_path" = x; then
31656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31657$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31658      has_space=`$ECHO "$complete" | $GREP " "`
31659      if test "x$has_space" != x; then
31660        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31661$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31662      fi
31663      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31664    fi
31665  fi
31666
31667  # Now join together the path and the arguments once again
31668  if test "x$arguments" != xEOL; then
31669    new_complete="$new_path ${arguments% *}"
31670  else
31671    new_complete="$new_path"
31672  fi
31673
31674  if test "x$complete" != "x$new_complete"; then
31675    CXXCPP="$new_complete"
31676    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31677$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31678  fi
31679
31680
31681  #
31682  # Setup the linker (LD)
31683  #
31684  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31685    # In the Microsoft toolchain we have a separate LD command "link".
31686    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31687    # a cygwin program for something completely different.
31688    # Extract the first word of "link", so it can be a program name with args.
31689set dummy link; ac_word=$2
31690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31691$as_echo_n "checking for $ac_word... " >&6; }
31692if ${ac_cv_prog_LD+:} false; then :
31693  $as_echo_n "(cached) " >&6
31694else
31695  if test -n "$LD"; then
31696  ac_cv_prog_LD="$LD" # Let the user override the test.
31697else
31698  ac_prog_rejected=no
31699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31700for as_dir in $PATH
31701do
31702  IFS=$as_save_IFS
31703  test -z "$as_dir" && as_dir=.
31704    for ac_exec_ext in '' $ac_executable_extensions; do
31705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31706    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31707       ac_prog_rejected=yes
31708       continue
31709     fi
31710    ac_cv_prog_LD="link"
31711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31712    break 2
31713  fi
31714done
31715  done
31716IFS=$as_save_IFS
31717
31718if test $ac_prog_rejected = yes; then
31719  # We found a bogon in the path, so make sure we never use it.
31720  set dummy $ac_cv_prog_LD
31721  shift
31722  if test $# != 0; then
31723    # We chose a different compiler from the bogus one.
31724    # However, it has the same basename, so the bogon will be chosen
31725    # first if we set LD to just the basename; use the full file name.
31726    shift
31727    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31728  fi
31729fi
31730fi
31731fi
31732LD=$ac_cv_prog_LD
31733if test -n "$LD"; then
31734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31735$as_echo "$LD" >&6; }
31736else
31737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31738$as_echo "no" >&6; }
31739fi
31740
31741
31742
31743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31744
31745  # First separate the path from the arguments. This will split at the first
31746  # space.
31747  complete="$LD"
31748  path="${complete%% *}"
31749  tmp="$complete EOL"
31750  arguments="${tmp#* }"
31751
31752  # Input might be given as Windows format, start by converting to
31753  # unix format.
31754  new_path=`$CYGPATH -u "$path"`
31755
31756  # Now try to locate executable using which
31757  new_path=`$WHICH "$new_path" 2> /dev/null`
31758  # bat and cmd files are not always considered executable in cygwin causing which
31759  # to not find them
31760  if test "x$new_path" = x \
31761      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31762      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31763    new_path=`$CYGPATH -u "$path"`
31764  fi
31765  if test "x$new_path" = x; then
31766    # Oops. Which didn't find the executable.
31767    # The splitting of arguments from the executable at a space might have been incorrect,
31768    # since paths with space are more likely in Windows. Give it another try with the whole
31769    # argument.
31770    path="$complete"
31771    arguments="EOL"
31772    new_path=`$CYGPATH -u "$path"`
31773    new_path=`$WHICH "$new_path" 2> /dev/null`
31774    # bat and cmd files are not always considered executable in cygwin causing which
31775    # to not find them
31776    if test "x$new_path" = x \
31777        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31778        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31779      new_path=`$CYGPATH -u "$path"`
31780    fi
31781    if test "x$new_path" = x; then
31782      # It's still not found. Now this is an unrecoverable error.
31783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31784$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31785      has_space=`$ECHO "$complete" | $GREP " "`
31786      if test "x$has_space" != x; then
31787        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31788$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31789      fi
31790      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31791    fi
31792  fi
31793
31794  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31795  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31796  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31797  # "foo.exe" is OK but "foo" is an error.
31798  #
31799  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31800  # It is also a way to make sure we got the proper file name for the real test later on.
31801  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31802  if test "x$test_shortpath" = x; then
31803    # Short path failed, file does not exist as specified.
31804    # Try adding .exe or .cmd
31805    if test -f "${new_path}.exe"; then
31806      input_to_shortpath="${new_path}.exe"
31807    elif test -f "${new_path}.cmd"; then
31808      input_to_shortpath="${new_path}.cmd"
31809    else
31810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31811$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31812      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31813$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31814      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31815    fi
31816  else
31817    input_to_shortpath="$new_path"
31818  fi
31819
31820  # Call helper function which possibly converts this using DOS-style short mode.
31821  # If so, the updated path is stored in $new_path.
31822  new_path="$input_to_shortpath"
31823
31824  input_path="$input_to_shortpath"
31825  # Check if we need to convert this using DOS-style short mode. If the path
31826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31827  # take no chances and rewrite it.
31828  # Note: m4 eats our [], so we need to use [ and ] instead.
31829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31830  if test "x$has_forbidden_chars" != x; then
31831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31835      # Going to short mode and back again did indeed matter. Since short mode is
31836      # case insensitive, let's make it lowercase to improve readability.
31837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31838      # Now convert it back to Unix-stile (cygpath)
31839      input_path=`$CYGPATH -u "$shortmode_path"`
31840      new_path="$input_path"
31841    fi
31842  fi
31843
31844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31845  if test "x$test_cygdrive_prefix" = x; then
31846    # As a simple fix, exclude /usr/bin since it's not a real path.
31847    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31849      # a path prefixed by /cygdrive for fixpath to work.
31850      new_path="$CYGWIN_ROOT_PATH$input_path"
31851    fi
31852  fi
31853
31854  # remove trailing .exe if any
31855  new_path="${new_path/%.exe/}"
31856
31857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31858
31859  # First separate the path from the arguments. This will split at the first
31860  # space.
31861  complete="$LD"
31862  path="${complete%% *}"
31863  tmp="$complete EOL"
31864  arguments="${tmp#* }"
31865
31866  # Input might be given as Windows format, start by converting to
31867  # unix format.
31868  new_path="$path"
31869
31870  windows_path="$new_path"
31871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31872    unix_path=`$CYGPATH -u "$windows_path"`
31873    new_path="$unix_path"
31874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31876    new_path="$unix_path"
31877  fi
31878
31879
31880  # Now try to locate executable using which
31881  new_path=`$WHICH "$new_path" 2> /dev/null`
31882
31883  if test "x$new_path" = x; then
31884    # Oops. Which didn't find the executable.
31885    # The splitting of arguments from the executable at a space might have been incorrect,
31886    # since paths with space are more likely in Windows. Give it another try with the whole
31887    # argument.
31888    path="$complete"
31889    arguments="EOL"
31890    new_path="$path"
31891
31892  windows_path="$new_path"
31893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31894    unix_path=`$CYGPATH -u "$windows_path"`
31895    new_path="$unix_path"
31896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31898    new_path="$unix_path"
31899  fi
31900
31901
31902    new_path=`$WHICH "$new_path" 2> /dev/null`
31903    # bat and cmd files are not always considered executable in MSYS causing which
31904    # to not find them
31905    if test "x$new_path" = x \
31906        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31907        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31908      new_path="$path"
31909
31910  windows_path="$new_path"
31911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31912    unix_path=`$CYGPATH -u "$windows_path"`
31913    new_path="$unix_path"
31914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31916    new_path="$unix_path"
31917  fi
31918
31919    fi
31920
31921    if test "x$new_path" = x; then
31922      # It's still not found. Now this is an unrecoverable error.
31923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31924$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31925      has_space=`$ECHO "$complete" | $GREP " "`
31926      if test "x$has_space" != x; then
31927        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31928$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31929      fi
31930      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31931    fi
31932  fi
31933
31934  # Now new_path has a complete unix path to the binary
31935  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31936    # Keep paths in /bin as-is, but remove trailing .exe if any
31937    new_path="${new_path/%.exe/}"
31938    # Do not save /bin paths to all_fixpath_prefixes!
31939  else
31940    # Not in mixed or Windows style, start by that.
31941    new_path=`cmd //c echo $new_path`
31942
31943  input_path="$new_path"
31944  # Check if we need to convert this using DOS-style short mode. If the path
31945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31946  # take no chances and rewrite it.
31947  # Note: m4 eats our [], so we need to use [ and ] instead.
31948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31949  if test "x$has_forbidden_chars" != x; then
31950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31951    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31952  fi
31953
31954    # Output is in $new_path
31955
31956  windows_path="$new_path"
31957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31958    unix_path=`$CYGPATH -u "$windows_path"`
31959    new_path="$unix_path"
31960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31962    new_path="$unix_path"
31963  fi
31964
31965    # remove trailing .exe if any
31966    new_path="${new_path/%.exe/}"
31967
31968    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31969    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31970  fi
31971
31972  else
31973    # We're on a unix platform. Hooray! :)
31974    # First separate the path from the arguments. This will split at the first
31975    # space.
31976    complete="$LD"
31977    path="${complete%% *}"
31978    tmp="$complete EOL"
31979    arguments="${tmp#* }"
31980
31981    # Cannot rely on the command "which" here since it doesn't always work.
31982    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31983    if test -z "$is_absolute_path"; then
31984      # Path to executable is not absolute. Find it.
31985      IFS_save="$IFS"
31986      IFS=:
31987      for p in $PATH; do
31988        if test -f "$p/$path" && test -x "$p/$path"; then
31989          new_path="$p/$path"
31990          break
31991        fi
31992      done
31993      IFS="$IFS_save"
31994    else
31995      # This is an absolute path, we can use it without further modifications.
31996      new_path="$path"
31997    fi
31998
31999    if test "x$new_path" = x; then
32000      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32001$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32002      has_space=`$ECHO "$complete" | $GREP " "`
32003      if test "x$has_space" != x; then
32004        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32005$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32006      fi
32007      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32008    fi
32009  fi
32010
32011  # Now join together the path and the arguments once again
32012  if test "x$arguments" != xEOL; then
32013    new_complete="$new_path ${arguments% *}"
32014  else
32015    new_complete="$new_path"
32016  fi
32017
32018  if test "x$complete" != "x$new_complete"; then
32019    LD="$new_complete"
32020    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32021$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32022  fi
32023
32024    # Verify that we indeed succeeded with this trick.
32025    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32026$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32027    "$LD" --version > /dev/null
32028    if test $? -eq 0 ; then
32029      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32030$as_echo "no" >&6; }
32031      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32032    else
32033      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32034$as_echo "yes" >&6; }
32035    fi
32036    LDCXX="$LD"
32037  else
32038    # All other toolchains use the compiler to link.
32039    LD="$CC"
32040    LDCXX="$CXX"
32041  fi
32042
32043  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32044
32045
32046  #
32047  # Setup the assembler (AS)
32048  #
32049  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32050    # FIXME: should this really be solaris, or solstudio?
32051
32052
32053  # Publish this variable in the help.
32054
32055
32056  if test "x$AS" = x; then
32057    # The variable is not set by user, try to locate tool using the code snippet
32058    for ac_prog in as
32059do
32060  # Extract the first word of "$ac_prog", so it can be a program name with args.
32061set dummy $ac_prog; ac_word=$2
32062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32063$as_echo_n "checking for $ac_word... " >&6; }
32064if ${ac_cv_path_AS+:} false; then :
32065  $as_echo_n "(cached) " >&6
32066else
32067  case $AS in
32068  [\\/]* | ?:[\\/]*)
32069  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32070  ;;
32071  *)
32072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32073for as_dir in $PATH
32074do
32075  IFS=$as_save_IFS
32076  test -z "$as_dir" && as_dir=.
32077    for ac_exec_ext in '' $ac_executable_extensions; do
32078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32079    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32081    break 2
32082  fi
32083done
32084  done
32085IFS=$as_save_IFS
32086
32087  ;;
32088esac
32089fi
32090AS=$ac_cv_path_AS
32091if test -n "$AS"; then
32092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32093$as_echo "$AS" >&6; }
32094else
32095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32096$as_echo "no" >&6; }
32097fi
32098
32099
32100  test -n "$AS" && break
32101done
32102
32103  else
32104    # The variable is set, but is it from the command line or the environment?
32105
32106    # Try to remove the string !AS! from our list.
32107    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32108    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32109      # If it failed, the variable was not from the command line. Ignore it,
32110      # but warn the user (except for BASH, which is always set by the calling BASH).
32111      if test "xAS" != xBASH; then
32112        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32113$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32114      fi
32115      # Try to locate tool using the code snippet
32116      for ac_prog in as
32117do
32118  # Extract the first word of "$ac_prog", so it can be a program name with args.
32119set dummy $ac_prog; ac_word=$2
32120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32121$as_echo_n "checking for $ac_word... " >&6; }
32122if ${ac_cv_path_AS+:} false; then :
32123  $as_echo_n "(cached) " >&6
32124else
32125  case $AS in
32126  [\\/]* | ?:[\\/]*)
32127  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32128  ;;
32129  *)
32130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32131for as_dir in $PATH
32132do
32133  IFS=$as_save_IFS
32134  test -z "$as_dir" && as_dir=.
32135    for ac_exec_ext in '' $ac_executable_extensions; do
32136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32137    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32139    break 2
32140  fi
32141done
32142  done
32143IFS=$as_save_IFS
32144
32145  ;;
32146esac
32147fi
32148AS=$ac_cv_path_AS
32149if test -n "$AS"; then
32150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32151$as_echo "$AS" >&6; }
32152else
32153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32154$as_echo "no" >&6; }
32155fi
32156
32157
32158  test -n "$AS" && break
32159done
32160
32161    else
32162      # If it succeeded, then it was overridden by the user. We will use it
32163      # for the tool.
32164
32165      # First remove it from the list of overridden variables, so we can test
32166      # for unknown variables in the end.
32167      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32168
32169      # Check if the provided tool contains a complete path.
32170      tool_specified="$AS"
32171      tool_basename="${tool_specified##*/}"
32172      if test "x$tool_basename" = "x$tool_specified"; then
32173        # A command without a complete path is provided, search $PATH.
32174        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32175$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32176        # Extract the first word of "$tool_basename", so it can be a program name with args.
32177set dummy $tool_basename; ac_word=$2
32178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32179$as_echo_n "checking for $ac_word... " >&6; }
32180if ${ac_cv_path_AS+:} false; then :
32181  $as_echo_n "(cached) " >&6
32182else
32183  case $AS in
32184  [\\/]* | ?:[\\/]*)
32185  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32186  ;;
32187  *)
32188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32189for as_dir in $PATH
32190do
32191  IFS=$as_save_IFS
32192  test -z "$as_dir" && as_dir=.
32193    for ac_exec_ext in '' $ac_executable_extensions; do
32194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32195    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32197    break 2
32198  fi
32199done
32200  done
32201IFS=$as_save_IFS
32202
32203  ;;
32204esac
32205fi
32206AS=$ac_cv_path_AS
32207if test -n "$AS"; then
32208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32209$as_echo "$AS" >&6; }
32210else
32211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32212$as_echo "no" >&6; }
32213fi
32214
32215
32216        if test "x$AS" = x; then
32217          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32218        fi
32219      else
32220        # Otherwise we believe it is a complete path. Use it as it is.
32221        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32222$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32223        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32224$as_echo_n "checking for AS... " >&6; }
32225        if test ! -x "$tool_specified"; then
32226          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32227$as_echo "not found" >&6; }
32228          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32229        fi
32230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32231$as_echo "$tool_specified" >&6; }
32232      fi
32233    fi
32234  fi
32235
32236
32237
32238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32239
32240  # First separate the path from the arguments. This will split at the first
32241  # space.
32242  complete="$AS"
32243  path="${complete%% *}"
32244  tmp="$complete EOL"
32245  arguments="${tmp#* }"
32246
32247  # Input might be given as Windows format, start by converting to
32248  # unix format.
32249  new_path=`$CYGPATH -u "$path"`
32250
32251  # Now try to locate executable using which
32252  new_path=`$WHICH "$new_path" 2> /dev/null`
32253  # bat and cmd files are not always considered executable in cygwin causing which
32254  # to not find them
32255  if test "x$new_path" = x \
32256      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32257      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32258    new_path=`$CYGPATH -u "$path"`
32259  fi
32260  if test "x$new_path" = x; then
32261    # Oops. Which didn't find the executable.
32262    # The splitting of arguments from the executable at a space might have been incorrect,
32263    # since paths with space are more likely in Windows. Give it another try with the whole
32264    # argument.
32265    path="$complete"
32266    arguments="EOL"
32267    new_path=`$CYGPATH -u "$path"`
32268    new_path=`$WHICH "$new_path" 2> /dev/null`
32269    # bat and cmd files are not always considered executable in cygwin causing which
32270    # to not find them
32271    if test "x$new_path" = x \
32272        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32273        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32274      new_path=`$CYGPATH -u "$path"`
32275    fi
32276    if test "x$new_path" = x; then
32277      # It's still not found. Now this is an unrecoverable error.
32278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32279$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32280      has_space=`$ECHO "$complete" | $GREP " "`
32281      if test "x$has_space" != x; then
32282        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32283$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32284      fi
32285      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32286    fi
32287  fi
32288
32289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32292  # "foo.exe" is OK but "foo" is an error.
32293  #
32294  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32295  # It is also a way to make sure we got the proper file name for the real test later on.
32296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32297  if test "x$test_shortpath" = x; then
32298    # Short path failed, file does not exist as specified.
32299    # Try adding .exe or .cmd
32300    if test -f "${new_path}.exe"; then
32301      input_to_shortpath="${new_path}.exe"
32302    elif test -f "${new_path}.cmd"; then
32303      input_to_shortpath="${new_path}.cmd"
32304    else
32305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32306$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32307      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32308$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32309      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32310    fi
32311  else
32312    input_to_shortpath="$new_path"
32313  fi
32314
32315  # Call helper function which possibly converts this using DOS-style short mode.
32316  # If so, the updated path is stored in $new_path.
32317  new_path="$input_to_shortpath"
32318
32319  input_path="$input_to_shortpath"
32320  # Check if we need to convert this using DOS-style short mode. If the path
32321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32322  # take no chances and rewrite it.
32323  # Note: m4 eats our [], so we need to use [ and ] instead.
32324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32325  if test "x$has_forbidden_chars" != x; then
32326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32330      # Going to short mode and back again did indeed matter. Since short mode is
32331      # case insensitive, let's make it lowercase to improve readability.
32332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32333      # Now convert it back to Unix-stile (cygpath)
32334      input_path=`$CYGPATH -u "$shortmode_path"`
32335      new_path="$input_path"
32336    fi
32337  fi
32338
32339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32340  if test "x$test_cygdrive_prefix" = x; then
32341    # As a simple fix, exclude /usr/bin since it's not a real path.
32342    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32344      # a path prefixed by /cygdrive for fixpath to work.
32345      new_path="$CYGWIN_ROOT_PATH$input_path"
32346    fi
32347  fi
32348
32349  # remove trailing .exe if any
32350  new_path="${new_path/%.exe/}"
32351
32352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32353
32354  # First separate the path from the arguments. This will split at the first
32355  # space.
32356  complete="$AS"
32357  path="${complete%% *}"
32358  tmp="$complete EOL"
32359  arguments="${tmp#* }"
32360
32361  # Input might be given as Windows format, start by converting to
32362  # unix format.
32363  new_path="$path"
32364
32365  windows_path="$new_path"
32366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32367    unix_path=`$CYGPATH -u "$windows_path"`
32368    new_path="$unix_path"
32369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32371    new_path="$unix_path"
32372  fi
32373
32374
32375  # Now try to locate executable using which
32376  new_path=`$WHICH "$new_path" 2> /dev/null`
32377
32378  if test "x$new_path" = x; then
32379    # Oops. Which didn't find the executable.
32380    # The splitting of arguments from the executable at a space might have been incorrect,
32381    # since paths with space are more likely in Windows. Give it another try with the whole
32382    # argument.
32383    path="$complete"
32384    arguments="EOL"
32385    new_path="$path"
32386
32387  windows_path="$new_path"
32388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32389    unix_path=`$CYGPATH -u "$windows_path"`
32390    new_path="$unix_path"
32391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32393    new_path="$unix_path"
32394  fi
32395
32396
32397    new_path=`$WHICH "$new_path" 2> /dev/null`
32398    # bat and cmd files are not always considered executable in MSYS causing which
32399    # to not find them
32400    if test "x$new_path" = x \
32401        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32402        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32403      new_path="$path"
32404
32405  windows_path="$new_path"
32406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32407    unix_path=`$CYGPATH -u "$windows_path"`
32408    new_path="$unix_path"
32409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32411    new_path="$unix_path"
32412  fi
32413
32414    fi
32415
32416    if test "x$new_path" = x; then
32417      # It's still not found. Now this is an unrecoverable error.
32418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32419$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32420      has_space=`$ECHO "$complete" | $GREP " "`
32421      if test "x$has_space" != x; then
32422        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32423$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32424      fi
32425      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32426    fi
32427  fi
32428
32429  # Now new_path has a complete unix path to the binary
32430  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32431    # Keep paths in /bin as-is, but remove trailing .exe if any
32432    new_path="${new_path/%.exe/}"
32433    # Do not save /bin paths to all_fixpath_prefixes!
32434  else
32435    # Not in mixed or Windows style, start by that.
32436    new_path=`cmd //c echo $new_path`
32437
32438  input_path="$new_path"
32439  # Check if we need to convert this using DOS-style short mode. If the path
32440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32441  # take no chances and rewrite it.
32442  # Note: m4 eats our [], so we need to use [ and ] instead.
32443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32444  if test "x$has_forbidden_chars" != x; then
32445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32447  fi
32448
32449    # Output is in $new_path
32450
32451  windows_path="$new_path"
32452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32453    unix_path=`$CYGPATH -u "$windows_path"`
32454    new_path="$unix_path"
32455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32457    new_path="$unix_path"
32458  fi
32459
32460    # remove trailing .exe if any
32461    new_path="${new_path/%.exe/}"
32462
32463    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32464    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32465  fi
32466
32467  else
32468    # We're on a unix platform. Hooray! :)
32469    # First separate the path from the arguments. This will split at the first
32470    # space.
32471    complete="$AS"
32472    path="${complete%% *}"
32473    tmp="$complete EOL"
32474    arguments="${tmp#* }"
32475
32476    # Cannot rely on the command "which" here since it doesn't always work.
32477    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32478    if test -z "$is_absolute_path"; then
32479      # Path to executable is not absolute. Find it.
32480      IFS_save="$IFS"
32481      IFS=:
32482      for p in $PATH; do
32483        if test -f "$p/$path" && test -x "$p/$path"; then
32484          new_path="$p/$path"
32485          break
32486        fi
32487      done
32488      IFS="$IFS_save"
32489    else
32490      # This is an absolute path, we can use it without further modifications.
32491      new_path="$path"
32492    fi
32493
32494    if test "x$new_path" = x; then
32495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32496$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32497      has_space=`$ECHO "$complete" | $GREP " "`
32498      if test "x$has_space" != x; then
32499        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32500$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32501      fi
32502      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32503    fi
32504  fi
32505
32506  # Now join together the path and the arguments once again
32507  if test "x$arguments" != xEOL; then
32508    new_complete="$new_path ${arguments% *}"
32509  else
32510    new_complete="$new_path"
32511  fi
32512
32513  if test "x$complete" != "x$new_complete"; then
32514    AS="$new_complete"
32515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32516$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32517  fi
32518
32519  else
32520    # FIXME: is this correct for microsoft?
32521    AS="$CC -c"
32522  fi
32523
32524
32525  #
32526  # Setup the archiver (AR)
32527  #
32528  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32529    # The corresponding ar tool is lib.exe (used to create static libraries)
32530    # Extract the first word of "lib", so it can be a program name with args.
32531set dummy lib; ac_word=$2
32532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32533$as_echo_n "checking for $ac_word... " >&6; }
32534if ${ac_cv_prog_AR+:} false; then :
32535  $as_echo_n "(cached) " >&6
32536else
32537  if test -n "$AR"; then
32538  ac_cv_prog_AR="$AR" # Let the user override the test.
32539else
32540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32541for as_dir in $PATH
32542do
32543  IFS=$as_save_IFS
32544  test -z "$as_dir" && as_dir=.
32545    for ac_exec_ext in '' $ac_executable_extensions; do
32546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32547    ac_cv_prog_AR="lib"
32548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32549    break 2
32550  fi
32551done
32552  done
32553IFS=$as_save_IFS
32554
32555fi
32556fi
32557AR=$ac_cv_prog_AR
32558if test -n "$AR"; then
32559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32560$as_echo "$AR" >&6; }
32561else
32562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32563$as_echo "no" >&6; }
32564fi
32565
32566
32567  else
32568
32569
32570  # Publish this variable in the help.
32571
32572
32573  if test "x$AR" = x; then
32574    # The variable is not set by user, try to locate tool using the code snippet
32575    if test -n "$ac_tool_prefix"; then
32576  for ac_prog in ar
32577  do
32578    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32579set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32581$as_echo_n "checking for $ac_word... " >&6; }
32582if ${ac_cv_prog_AR+:} false; then :
32583  $as_echo_n "(cached) " >&6
32584else
32585  if test -n "$AR"; then
32586  ac_cv_prog_AR="$AR" # Let the user override the test.
32587else
32588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32589for as_dir in $PATH
32590do
32591  IFS=$as_save_IFS
32592  test -z "$as_dir" && as_dir=.
32593    for ac_exec_ext in '' $ac_executable_extensions; do
32594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32595    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32597    break 2
32598  fi
32599done
32600  done
32601IFS=$as_save_IFS
32602
32603fi
32604fi
32605AR=$ac_cv_prog_AR
32606if test -n "$AR"; then
32607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32608$as_echo "$AR" >&6; }
32609else
32610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32611$as_echo "no" >&6; }
32612fi
32613
32614
32615    test -n "$AR" && break
32616  done
32617fi
32618if test -z "$AR"; then
32619  ac_ct_AR=$AR
32620  for ac_prog in ar
32621do
32622  # Extract the first word of "$ac_prog", so it can be a program name with args.
32623set dummy $ac_prog; ac_word=$2
32624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32625$as_echo_n "checking for $ac_word... " >&6; }
32626if ${ac_cv_prog_ac_ct_AR+:} false; then :
32627  $as_echo_n "(cached) " >&6
32628else
32629  if test -n "$ac_ct_AR"; then
32630  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32631else
32632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32633for as_dir in $PATH
32634do
32635  IFS=$as_save_IFS
32636  test -z "$as_dir" && as_dir=.
32637    for ac_exec_ext in '' $ac_executable_extensions; do
32638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32639    ac_cv_prog_ac_ct_AR="$ac_prog"
32640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32641    break 2
32642  fi
32643done
32644  done
32645IFS=$as_save_IFS
32646
32647fi
32648fi
32649ac_ct_AR=$ac_cv_prog_ac_ct_AR
32650if test -n "$ac_ct_AR"; then
32651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32652$as_echo "$ac_ct_AR" >&6; }
32653else
32654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32655$as_echo "no" >&6; }
32656fi
32657
32658
32659  test -n "$ac_ct_AR" && break
32660done
32661
32662  if test "x$ac_ct_AR" = x; then
32663    AR=""
32664  else
32665    case $cross_compiling:$ac_tool_warned in
32666yes:)
32667{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32668$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32669ac_tool_warned=yes ;;
32670esac
32671    AR=$ac_ct_AR
32672  fi
32673fi
32674
32675  else
32676    # The variable is set, but is it from the command line or the environment?
32677
32678    # Try to remove the string !AR! from our list.
32679    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32680    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32681      # If it failed, the variable was not from the command line. Ignore it,
32682      # but warn the user (except for BASH, which is always set by the calling BASH).
32683      if test "xAR" != xBASH; then
32684        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32685$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32686      fi
32687      # Try to locate tool using the code snippet
32688      if test -n "$ac_tool_prefix"; then
32689  for ac_prog in ar
32690  do
32691    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32692set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32694$as_echo_n "checking for $ac_word... " >&6; }
32695if ${ac_cv_prog_AR+:} false; then :
32696  $as_echo_n "(cached) " >&6
32697else
32698  if test -n "$AR"; then
32699  ac_cv_prog_AR="$AR" # Let the user override the test.
32700else
32701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32702for as_dir in $PATH
32703do
32704  IFS=$as_save_IFS
32705  test -z "$as_dir" && as_dir=.
32706    for ac_exec_ext in '' $ac_executable_extensions; do
32707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32708    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32710    break 2
32711  fi
32712done
32713  done
32714IFS=$as_save_IFS
32715
32716fi
32717fi
32718AR=$ac_cv_prog_AR
32719if test -n "$AR"; then
32720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32721$as_echo "$AR" >&6; }
32722else
32723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32724$as_echo "no" >&6; }
32725fi
32726
32727
32728    test -n "$AR" && break
32729  done
32730fi
32731if test -z "$AR"; then
32732  ac_ct_AR=$AR
32733  for ac_prog in ar
32734do
32735  # Extract the first word of "$ac_prog", so it can be a program name with args.
32736set dummy $ac_prog; ac_word=$2
32737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32738$as_echo_n "checking for $ac_word... " >&6; }
32739if ${ac_cv_prog_ac_ct_AR+:} false; then :
32740  $as_echo_n "(cached) " >&6
32741else
32742  if test -n "$ac_ct_AR"; then
32743  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32744else
32745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32746for as_dir in $PATH
32747do
32748  IFS=$as_save_IFS
32749  test -z "$as_dir" && as_dir=.
32750    for ac_exec_ext in '' $ac_executable_extensions; do
32751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32752    ac_cv_prog_ac_ct_AR="$ac_prog"
32753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32754    break 2
32755  fi
32756done
32757  done
32758IFS=$as_save_IFS
32759
32760fi
32761fi
32762ac_ct_AR=$ac_cv_prog_ac_ct_AR
32763if test -n "$ac_ct_AR"; then
32764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32765$as_echo "$ac_ct_AR" >&6; }
32766else
32767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32768$as_echo "no" >&6; }
32769fi
32770
32771
32772  test -n "$ac_ct_AR" && break
32773done
32774
32775  if test "x$ac_ct_AR" = x; then
32776    AR=""
32777  else
32778    case $cross_compiling:$ac_tool_warned in
32779yes:)
32780{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32781$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32782ac_tool_warned=yes ;;
32783esac
32784    AR=$ac_ct_AR
32785  fi
32786fi
32787
32788    else
32789      # If it succeeded, then it was overridden by the user. We will use it
32790      # for the tool.
32791
32792      # First remove it from the list of overridden variables, so we can test
32793      # for unknown variables in the end.
32794      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32795
32796      # Check if the provided tool contains a complete path.
32797      tool_specified="$AR"
32798      tool_basename="${tool_specified##*/}"
32799      if test "x$tool_basename" = "x$tool_specified"; then
32800        # A command without a complete path is provided, search $PATH.
32801        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32802$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32803        # Extract the first word of "$tool_basename", so it can be a program name with args.
32804set dummy $tool_basename; ac_word=$2
32805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32806$as_echo_n "checking for $ac_word... " >&6; }
32807if ${ac_cv_path_AR+:} false; then :
32808  $as_echo_n "(cached) " >&6
32809else
32810  case $AR in
32811  [\\/]* | ?:[\\/]*)
32812  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32813  ;;
32814  *)
32815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32816for as_dir in $PATH
32817do
32818  IFS=$as_save_IFS
32819  test -z "$as_dir" && as_dir=.
32820    for ac_exec_ext in '' $ac_executable_extensions; do
32821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32822    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32824    break 2
32825  fi
32826done
32827  done
32828IFS=$as_save_IFS
32829
32830  ;;
32831esac
32832fi
32833AR=$ac_cv_path_AR
32834if test -n "$AR"; then
32835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32836$as_echo "$AR" >&6; }
32837else
32838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32839$as_echo "no" >&6; }
32840fi
32841
32842
32843        if test "x$AR" = x; then
32844          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32845        fi
32846      else
32847        # Otherwise we believe it is a complete path. Use it as it is.
32848        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32849$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32850        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32851$as_echo_n "checking for AR... " >&6; }
32852        if test ! -x "$tool_specified"; then
32853          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32854$as_echo "not found" >&6; }
32855          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32856        fi
32857        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32858$as_echo "$tool_specified" >&6; }
32859      fi
32860    fi
32861  fi
32862
32863
32864  fi
32865
32866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32867
32868  # First separate the path from the arguments. This will split at the first
32869  # space.
32870  complete="$AR"
32871  path="${complete%% *}"
32872  tmp="$complete EOL"
32873  arguments="${tmp#* }"
32874
32875  # Input might be given as Windows format, start by converting to
32876  # unix format.
32877  new_path=`$CYGPATH -u "$path"`
32878
32879  # Now try to locate executable using which
32880  new_path=`$WHICH "$new_path" 2> /dev/null`
32881  # bat and cmd files are not always considered executable in cygwin causing which
32882  # to not find them
32883  if test "x$new_path" = x \
32884      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32885      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32886    new_path=`$CYGPATH -u "$path"`
32887  fi
32888  if test "x$new_path" = x; then
32889    # Oops. Which didn't find the executable.
32890    # The splitting of arguments from the executable at a space might have been incorrect,
32891    # since paths with space are more likely in Windows. Give it another try with the whole
32892    # argument.
32893    path="$complete"
32894    arguments="EOL"
32895    new_path=`$CYGPATH -u "$path"`
32896    new_path=`$WHICH "$new_path" 2> /dev/null`
32897    # bat and cmd files are not always considered executable in cygwin causing which
32898    # to not find them
32899    if test "x$new_path" = x \
32900        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32901        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32902      new_path=`$CYGPATH -u "$path"`
32903    fi
32904    if test "x$new_path" = x; then
32905      # It's still not found. Now this is an unrecoverable error.
32906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32907$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32908      has_space=`$ECHO "$complete" | $GREP " "`
32909      if test "x$has_space" != x; then
32910        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32911$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32912      fi
32913      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32914    fi
32915  fi
32916
32917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32920  # "foo.exe" is OK but "foo" is an error.
32921  #
32922  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32923  # It is also a way to make sure we got the proper file name for the real test later on.
32924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32925  if test "x$test_shortpath" = x; then
32926    # Short path failed, file does not exist as specified.
32927    # Try adding .exe or .cmd
32928    if test -f "${new_path}.exe"; then
32929      input_to_shortpath="${new_path}.exe"
32930    elif test -f "${new_path}.cmd"; then
32931      input_to_shortpath="${new_path}.cmd"
32932    else
32933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32934$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32935      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32936$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32937      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32938    fi
32939  else
32940    input_to_shortpath="$new_path"
32941  fi
32942
32943  # Call helper function which possibly converts this using DOS-style short mode.
32944  # If so, the updated path is stored in $new_path.
32945  new_path="$input_to_shortpath"
32946
32947  input_path="$input_to_shortpath"
32948  # Check if we need to convert this using DOS-style short mode. If the path
32949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32950  # take no chances and rewrite it.
32951  # Note: m4 eats our [], so we need to use [ and ] instead.
32952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32953  if test "x$has_forbidden_chars" != x; then
32954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32958      # Going to short mode and back again did indeed matter. Since short mode is
32959      # case insensitive, let's make it lowercase to improve readability.
32960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32961      # Now convert it back to Unix-stile (cygpath)
32962      input_path=`$CYGPATH -u "$shortmode_path"`
32963      new_path="$input_path"
32964    fi
32965  fi
32966
32967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32968  if test "x$test_cygdrive_prefix" = x; then
32969    # As a simple fix, exclude /usr/bin since it's not a real path.
32970    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32972      # a path prefixed by /cygdrive for fixpath to work.
32973      new_path="$CYGWIN_ROOT_PATH$input_path"
32974    fi
32975  fi
32976
32977  # remove trailing .exe if any
32978  new_path="${new_path/%.exe/}"
32979
32980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32981
32982  # First separate the path from the arguments. This will split at the first
32983  # space.
32984  complete="$AR"
32985  path="${complete%% *}"
32986  tmp="$complete EOL"
32987  arguments="${tmp#* }"
32988
32989  # Input might be given as Windows format, start by converting to
32990  # unix format.
32991  new_path="$path"
32992
32993  windows_path="$new_path"
32994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32995    unix_path=`$CYGPATH -u "$windows_path"`
32996    new_path="$unix_path"
32997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32999    new_path="$unix_path"
33000  fi
33001
33002
33003  # Now try to locate executable using which
33004  new_path=`$WHICH "$new_path" 2> /dev/null`
33005
33006  if test "x$new_path" = x; then
33007    # Oops. Which didn't find the executable.
33008    # The splitting of arguments from the executable at a space might have been incorrect,
33009    # since paths with space are more likely in Windows. Give it another try with the whole
33010    # argument.
33011    path="$complete"
33012    arguments="EOL"
33013    new_path="$path"
33014
33015  windows_path="$new_path"
33016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33017    unix_path=`$CYGPATH -u "$windows_path"`
33018    new_path="$unix_path"
33019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33021    new_path="$unix_path"
33022  fi
33023
33024
33025    new_path=`$WHICH "$new_path" 2> /dev/null`
33026    # bat and cmd files are not always considered executable in MSYS causing which
33027    # to not find them
33028    if test "x$new_path" = x \
33029        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33030        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33031      new_path="$path"
33032
33033  windows_path="$new_path"
33034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33035    unix_path=`$CYGPATH -u "$windows_path"`
33036    new_path="$unix_path"
33037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33039    new_path="$unix_path"
33040  fi
33041
33042    fi
33043
33044    if test "x$new_path" = x; then
33045      # It's still not found. Now this is an unrecoverable error.
33046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33047$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33048      has_space=`$ECHO "$complete" | $GREP " "`
33049      if test "x$has_space" != x; then
33050        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33051$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33052      fi
33053      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33054    fi
33055  fi
33056
33057  # Now new_path has a complete unix path to the binary
33058  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33059    # Keep paths in /bin as-is, but remove trailing .exe if any
33060    new_path="${new_path/%.exe/}"
33061    # Do not save /bin paths to all_fixpath_prefixes!
33062  else
33063    # Not in mixed or Windows style, start by that.
33064    new_path=`cmd //c echo $new_path`
33065
33066  input_path="$new_path"
33067  # Check if we need to convert this using DOS-style short mode. If the path
33068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33069  # take no chances and rewrite it.
33070  # Note: m4 eats our [], so we need to use [ and ] instead.
33071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33072  if test "x$has_forbidden_chars" != x; then
33073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33074    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33075  fi
33076
33077    # Output is in $new_path
33078
33079  windows_path="$new_path"
33080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33081    unix_path=`$CYGPATH -u "$windows_path"`
33082    new_path="$unix_path"
33083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33085    new_path="$unix_path"
33086  fi
33087
33088    # remove trailing .exe if any
33089    new_path="${new_path/%.exe/}"
33090
33091    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33092    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33093  fi
33094
33095  else
33096    # We're on a unix platform. Hooray! :)
33097    # First separate the path from the arguments. This will split at the first
33098    # space.
33099    complete="$AR"
33100    path="${complete%% *}"
33101    tmp="$complete EOL"
33102    arguments="${tmp#* }"
33103
33104    # Cannot rely on the command "which" here since it doesn't always work.
33105    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33106    if test -z "$is_absolute_path"; then
33107      # Path to executable is not absolute. Find it.
33108      IFS_save="$IFS"
33109      IFS=:
33110      for p in $PATH; do
33111        if test -f "$p/$path" && test -x "$p/$path"; then
33112          new_path="$p/$path"
33113          break
33114        fi
33115      done
33116      IFS="$IFS_save"
33117    else
33118      # This is an absolute path, we can use it without further modifications.
33119      new_path="$path"
33120    fi
33121
33122    if test "x$new_path" = x; then
33123      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33124$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33125      has_space=`$ECHO "$complete" | $GREP " "`
33126      if test "x$has_space" != x; then
33127        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33128$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33129      fi
33130      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33131    fi
33132  fi
33133
33134  # Now join together the path and the arguments once again
33135  if test "x$arguments" != xEOL; then
33136    new_complete="$new_path ${arguments% *}"
33137  else
33138    new_complete="$new_path"
33139  fi
33140
33141  if test "x$complete" != "x$new_complete"; then
33142    AR="$new_complete"
33143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33144$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33145  fi
33146
33147
33148
33149  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33150    ac_ext=m
33151ac_cpp='$OBJCPP $CPPFLAGS'
33152ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33153ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33154ac_compiler_gnu=$ac_cv_objc_compiler_gnu
33155if test -n "$ac_tool_prefix"; then
33156  for ac_prog in gcc objcc objc cc CC
33157  do
33158    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33159set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33161$as_echo_n "checking for $ac_word... " >&6; }
33162if ${ac_cv_prog_OBJC+:} false; then :
33163  $as_echo_n "(cached) " >&6
33164else
33165  if test -n "$OBJC"; then
33166  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
33167else
33168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33169for as_dir in $PATH
33170do
33171  IFS=$as_save_IFS
33172  test -z "$as_dir" && as_dir=.
33173    for ac_exec_ext in '' $ac_executable_extensions; do
33174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33175    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
33176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33177    break 2
33178  fi
33179done
33180  done
33181IFS=$as_save_IFS
33182
33183fi
33184fi
33185OBJC=$ac_cv_prog_OBJC
33186if test -n "$OBJC"; then
33187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
33188$as_echo "$OBJC" >&6; }
33189else
33190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33191$as_echo "no" >&6; }
33192fi
33193
33194
33195    test -n "$OBJC" && break
33196  done
33197fi
33198if test -z "$OBJC"; then
33199  ac_ct_OBJC=$OBJC
33200  for ac_prog in gcc objcc objc cc CC
33201do
33202  # Extract the first word of "$ac_prog", so it can be a program name with args.
33203set dummy $ac_prog; ac_word=$2
33204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33205$as_echo_n "checking for $ac_word... " >&6; }
33206if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
33207  $as_echo_n "(cached) " >&6
33208else
33209  if test -n "$ac_ct_OBJC"; then
33210  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
33211else
33212as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33213for as_dir in $PATH
33214do
33215  IFS=$as_save_IFS
33216  test -z "$as_dir" && as_dir=.
33217    for ac_exec_ext in '' $ac_executable_extensions; do
33218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33219    ac_cv_prog_ac_ct_OBJC="$ac_prog"
33220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33221    break 2
33222  fi
33223done
33224  done
33225IFS=$as_save_IFS
33226
33227fi
33228fi
33229ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
33230if test -n "$ac_ct_OBJC"; then
33231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
33232$as_echo "$ac_ct_OBJC" >&6; }
33233else
33234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33235$as_echo "no" >&6; }
33236fi
33237
33238
33239  test -n "$ac_ct_OBJC" && break
33240done
33241
33242  if test "x$ac_ct_OBJC" = x; then
33243    OBJC="gcc"
33244  else
33245    case $cross_compiling:$ac_tool_warned in
33246yes:)
33247{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33248$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33249ac_tool_warned=yes ;;
33250esac
33251    OBJC=$ac_ct_OBJC
33252  fi
33253fi
33254
33255# Provide some information about the compiler.
33256$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
33257set X $ac_compile
33258ac_compiler=$2
33259for ac_option in --version -v -V -qversion; do
33260  { { ac_try="$ac_compiler $ac_option >&5"
33261case "(($ac_try" in
33262  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33263  *) ac_try_echo=$ac_try;;
33264esac
33265eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33266$as_echo "$ac_try_echo"; } >&5
33267  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33268  ac_status=$?
33269  if test -s conftest.err; then
33270    sed '10a\
33271... rest of stderr output deleted ...
33272         10q' conftest.err >conftest.er1
33273    cat conftest.er1 >&5
33274  fi
33275  rm -f conftest.er1 conftest.err
33276  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33277  test $ac_status = 0; }
33278done
33279
33280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33281$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33282if ${ac_cv_objc_compiler_gnu+:} false; then :
33283  $as_echo_n "(cached) " >&6
33284else
33285  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33286/* end confdefs.h.  */
33287
33288int
33289main ()
33290{
33291#ifndef __GNUC__
33292       choke me
33293#endif
33294
33295  ;
33296  return 0;
33297}
33298_ACEOF
33299if ac_fn_objc_try_compile "$LINENO"; then :
33300  ac_compiler_gnu=yes
33301else
33302  ac_compiler_gnu=no
33303fi
33304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33305ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33306
33307fi
33308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33309$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33310if test $ac_compiler_gnu = yes; then
33311  GOBJC=yes
33312else
33313  GOBJC=
33314fi
33315ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33316ac_save_OBJCFLAGS=$OBJCFLAGS
33317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33318$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33319if ${ac_cv_prog_objc_g+:} false; then :
33320  $as_echo_n "(cached) " >&6
33321else
33322  ac_save_objc_werror_flag=$ac_objc_werror_flag
33323   ac_objc_werror_flag=yes
33324   ac_cv_prog_objc_g=no
33325   OBJCFLAGS="-g"
33326   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33327/* end confdefs.h.  */
33328
33329int
33330main ()
33331{
33332
33333  ;
33334  return 0;
33335}
33336_ACEOF
33337if ac_fn_objc_try_compile "$LINENO"; then :
33338  ac_cv_prog_objc_g=yes
33339else
33340  OBJCFLAGS=""
33341      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33342/* end confdefs.h.  */
33343
33344int
33345main ()
33346{
33347
33348  ;
33349  return 0;
33350}
33351_ACEOF
33352if ac_fn_objc_try_compile "$LINENO"; then :
33353
33354else
33355  ac_objc_werror_flag=$ac_save_objc_werror_flag
33356	 OBJCFLAGS="-g"
33357	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33358/* end confdefs.h.  */
33359
33360int
33361main ()
33362{
33363
33364  ;
33365  return 0;
33366}
33367_ACEOF
33368if ac_fn_objc_try_compile "$LINENO"; then :
33369  ac_cv_prog_objc_g=yes
33370fi
33371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33372fi
33373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33374fi
33375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33376   ac_objc_werror_flag=$ac_save_objc_werror_flag
33377fi
33378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33379$as_echo "$ac_cv_prog_objc_g" >&6; }
33380if test "$ac_test_OBJCFLAGS" = set; then
33381  OBJCFLAGS=$ac_save_OBJCFLAGS
33382elif test $ac_cv_prog_objc_g = yes; then
33383  if test "$GOBJC" = yes; then
33384    OBJCFLAGS="-g -O2"
33385  else
33386    OBJCFLAGS="-g"
33387  fi
33388else
33389  if test "$GOBJC" = yes; then
33390    OBJCFLAGS="-O2"
33391  else
33392    OBJCFLAGS=
33393  fi
33394fi
33395ac_ext=cpp
33396ac_cpp='$CXXCPP $CPPFLAGS'
33397ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33398ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33399ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33400
33401
33402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33403
33404  # First separate the path from the arguments. This will split at the first
33405  # space.
33406  complete="$OBJC"
33407  path="${complete%% *}"
33408  tmp="$complete EOL"
33409  arguments="${tmp#* }"
33410
33411  # Input might be given as Windows format, start by converting to
33412  # unix format.
33413  new_path=`$CYGPATH -u "$path"`
33414
33415  # Now try to locate executable using which
33416  new_path=`$WHICH "$new_path" 2> /dev/null`
33417  # bat and cmd files are not always considered executable in cygwin causing which
33418  # to not find them
33419  if test "x$new_path" = x \
33420      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33421      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33422    new_path=`$CYGPATH -u "$path"`
33423  fi
33424  if test "x$new_path" = x; then
33425    # Oops. Which didn't find the executable.
33426    # The splitting of arguments from the executable at a space might have been incorrect,
33427    # since paths with space are more likely in Windows. Give it another try with the whole
33428    # argument.
33429    path="$complete"
33430    arguments="EOL"
33431    new_path=`$CYGPATH -u "$path"`
33432    new_path=`$WHICH "$new_path" 2> /dev/null`
33433    # bat and cmd files are not always considered executable in cygwin causing which
33434    # to not find them
33435    if test "x$new_path" = x \
33436        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33437        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33438      new_path=`$CYGPATH -u "$path"`
33439    fi
33440    if test "x$new_path" = x; then
33441      # It's still not found. Now this is an unrecoverable error.
33442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33443$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33444      has_space=`$ECHO "$complete" | $GREP " "`
33445      if test "x$has_space" != x; then
33446        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33447$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33448      fi
33449      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33450    fi
33451  fi
33452
33453  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33454  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33455  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33456  # "foo.exe" is OK but "foo" is an error.
33457  #
33458  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33459  # It is also a way to make sure we got the proper file name for the real test later on.
33460  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33461  if test "x$test_shortpath" = x; then
33462    # Short path failed, file does not exist as specified.
33463    # Try adding .exe or .cmd
33464    if test -f "${new_path}.exe"; then
33465      input_to_shortpath="${new_path}.exe"
33466    elif test -f "${new_path}.cmd"; then
33467      input_to_shortpath="${new_path}.cmd"
33468    else
33469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33470$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33471      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33472$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33473      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33474    fi
33475  else
33476    input_to_shortpath="$new_path"
33477  fi
33478
33479  # Call helper function which possibly converts this using DOS-style short mode.
33480  # If so, the updated path is stored in $new_path.
33481  new_path="$input_to_shortpath"
33482
33483  input_path="$input_to_shortpath"
33484  # Check if we need to convert this using DOS-style short mode. If the path
33485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33486  # take no chances and rewrite it.
33487  # Note: m4 eats our [], so we need to use [ and ] instead.
33488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33489  if test "x$has_forbidden_chars" != x; then
33490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33494      # Going to short mode and back again did indeed matter. Since short mode is
33495      # case insensitive, let's make it lowercase to improve readability.
33496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33497      # Now convert it back to Unix-stile (cygpath)
33498      input_path=`$CYGPATH -u "$shortmode_path"`
33499      new_path="$input_path"
33500    fi
33501  fi
33502
33503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33504  if test "x$test_cygdrive_prefix" = x; then
33505    # As a simple fix, exclude /usr/bin since it's not a real path.
33506    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33508      # a path prefixed by /cygdrive for fixpath to work.
33509      new_path="$CYGWIN_ROOT_PATH$input_path"
33510    fi
33511  fi
33512
33513  # remove trailing .exe if any
33514  new_path="${new_path/%.exe/}"
33515
33516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33517
33518  # First separate the path from the arguments. This will split at the first
33519  # space.
33520  complete="$OBJC"
33521  path="${complete%% *}"
33522  tmp="$complete EOL"
33523  arguments="${tmp#* }"
33524
33525  # Input might be given as Windows format, start by converting to
33526  # unix format.
33527  new_path="$path"
33528
33529  windows_path="$new_path"
33530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33531    unix_path=`$CYGPATH -u "$windows_path"`
33532    new_path="$unix_path"
33533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33535    new_path="$unix_path"
33536  fi
33537
33538
33539  # Now try to locate executable using which
33540  new_path=`$WHICH "$new_path" 2> /dev/null`
33541
33542  if test "x$new_path" = x; then
33543    # Oops. Which didn't find the executable.
33544    # The splitting of arguments from the executable at a space might have been incorrect,
33545    # since paths with space are more likely in Windows. Give it another try with the whole
33546    # argument.
33547    path="$complete"
33548    arguments="EOL"
33549    new_path="$path"
33550
33551  windows_path="$new_path"
33552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33553    unix_path=`$CYGPATH -u "$windows_path"`
33554    new_path="$unix_path"
33555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33557    new_path="$unix_path"
33558  fi
33559
33560
33561    new_path=`$WHICH "$new_path" 2> /dev/null`
33562    # bat and cmd files are not always considered executable in MSYS causing which
33563    # to not find them
33564    if test "x$new_path" = x \
33565        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33566        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33567      new_path="$path"
33568
33569  windows_path="$new_path"
33570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33571    unix_path=`$CYGPATH -u "$windows_path"`
33572    new_path="$unix_path"
33573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33575    new_path="$unix_path"
33576  fi
33577
33578    fi
33579
33580    if test "x$new_path" = x; then
33581      # It's still not found. Now this is an unrecoverable error.
33582      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33583$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33584      has_space=`$ECHO "$complete" | $GREP " "`
33585      if test "x$has_space" != x; then
33586        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33587$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33588      fi
33589      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33590    fi
33591  fi
33592
33593  # Now new_path has a complete unix path to the binary
33594  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33595    # Keep paths in /bin as-is, but remove trailing .exe if any
33596    new_path="${new_path/%.exe/}"
33597    # Do not save /bin paths to all_fixpath_prefixes!
33598  else
33599    # Not in mixed or Windows style, start by that.
33600    new_path=`cmd //c echo $new_path`
33601
33602  input_path="$new_path"
33603  # Check if we need to convert this using DOS-style short mode. If the path
33604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33605  # take no chances and rewrite it.
33606  # Note: m4 eats our [], so we need to use [ and ] instead.
33607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33608  if test "x$has_forbidden_chars" != x; then
33609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33610    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33611  fi
33612
33613    # Output is in $new_path
33614
33615  windows_path="$new_path"
33616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33617    unix_path=`$CYGPATH -u "$windows_path"`
33618    new_path="$unix_path"
33619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33621    new_path="$unix_path"
33622  fi
33623
33624    # remove trailing .exe if any
33625    new_path="${new_path/%.exe/}"
33626
33627    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33628    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33629  fi
33630
33631  else
33632    # We're on a unix platform. Hooray! :)
33633    # First separate the path from the arguments. This will split at the first
33634    # space.
33635    complete="$OBJC"
33636    path="${complete%% *}"
33637    tmp="$complete EOL"
33638    arguments="${tmp#* }"
33639
33640    # Cannot rely on the command "which" here since it doesn't always work.
33641    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33642    if test -z "$is_absolute_path"; then
33643      # Path to executable is not absolute. Find it.
33644      IFS_save="$IFS"
33645      IFS=:
33646      for p in $PATH; do
33647        if test -f "$p/$path" && test -x "$p/$path"; then
33648          new_path="$p/$path"
33649          break
33650        fi
33651      done
33652      IFS="$IFS_save"
33653    else
33654      # This is an absolute path, we can use it without further modifications.
33655      new_path="$path"
33656    fi
33657
33658    if test "x$new_path" = x; then
33659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33660$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33661      has_space=`$ECHO "$complete" | $GREP " "`
33662      if test "x$has_space" != x; then
33663        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33664$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33665      fi
33666      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33667    fi
33668  fi
33669
33670  # Now join together the path and the arguments once again
33671  if test "x$arguments" != xEOL; then
33672    new_complete="$new_path ${arguments% *}"
33673  else
33674    new_complete="$new_path"
33675  fi
33676
33677  if test "x$complete" != "x$new_complete"; then
33678    OBJC="$new_complete"
33679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33680$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33681  fi
33682
33683
33684
33685  # Publish this variable in the help.
33686
33687
33688  if test "x$LIPO" = x; then
33689    # The variable is not set by user, try to locate tool using the code snippet
33690    for ac_prog in lipo
33691do
33692  # Extract the first word of "$ac_prog", so it can be a program name with args.
33693set dummy $ac_prog; ac_word=$2
33694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33695$as_echo_n "checking for $ac_word... " >&6; }
33696if ${ac_cv_path_LIPO+:} false; then :
33697  $as_echo_n "(cached) " >&6
33698else
33699  case $LIPO in
33700  [\\/]* | ?:[\\/]*)
33701  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33702  ;;
33703  *)
33704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33705for as_dir in $PATH
33706do
33707  IFS=$as_save_IFS
33708  test -z "$as_dir" && as_dir=.
33709    for ac_exec_ext in '' $ac_executable_extensions; do
33710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33711    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33713    break 2
33714  fi
33715done
33716  done
33717IFS=$as_save_IFS
33718
33719  ;;
33720esac
33721fi
33722LIPO=$ac_cv_path_LIPO
33723if test -n "$LIPO"; then
33724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33725$as_echo "$LIPO" >&6; }
33726else
33727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33728$as_echo "no" >&6; }
33729fi
33730
33731
33732  test -n "$LIPO" && break
33733done
33734
33735  else
33736    # The variable is set, but is it from the command line or the environment?
33737
33738    # Try to remove the string !LIPO! from our list.
33739    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33740    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33741      # If it failed, the variable was not from the command line. Ignore it,
33742      # but warn the user (except for BASH, which is always set by the calling BASH).
33743      if test "xLIPO" != xBASH; then
33744        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33745$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33746      fi
33747      # Try to locate tool using the code snippet
33748      for ac_prog in lipo
33749do
33750  # Extract the first word of "$ac_prog", so it can be a program name with args.
33751set dummy $ac_prog; ac_word=$2
33752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33753$as_echo_n "checking for $ac_word... " >&6; }
33754if ${ac_cv_path_LIPO+:} false; then :
33755  $as_echo_n "(cached) " >&6
33756else
33757  case $LIPO in
33758  [\\/]* | ?:[\\/]*)
33759  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33760  ;;
33761  *)
33762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33763for as_dir in $PATH
33764do
33765  IFS=$as_save_IFS
33766  test -z "$as_dir" && as_dir=.
33767    for ac_exec_ext in '' $ac_executable_extensions; do
33768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33769    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33771    break 2
33772  fi
33773done
33774  done
33775IFS=$as_save_IFS
33776
33777  ;;
33778esac
33779fi
33780LIPO=$ac_cv_path_LIPO
33781if test -n "$LIPO"; then
33782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33783$as_echo "$LIPO" >&6; }
33784else
33785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33786$as_echo "no" >&6; }
33787fi
33788
33789
33790  test -n "$LIPO" && break
33791done
33792
33793    else
33794      # If it succeeded, then it was overridden by the user. We will use it
33795      # for the tool.
33796
33797      # First remove it from the list of overridden variables, so we can test
33798      # for unknown variables in the end.
33799      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33800
33801      # Check if the provided tool contains a complete path.
33802      tool_specified="$LIPO"
33803      tool_basename="${tool_specified##*/}"
33804      if test "x$tool_basename" = "x$tool_specified"; then
33805        # A command without a complete path is provided, search $PATH.
33806        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33807$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33808        # Extract the first word of "$tool_basename", so it can be a program name with args.
33809set dummy $tool_basename; ac_word=$2
33810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33811$as_echo_n "checking for $ac_word... " >&6; }
33812if ${ac_cv_path_LIPO+:} false; then :
33813  $as_echo_n "(cached) " >&6
33814else
33815  case $LIPO in
33816  [\\/]* | ?:[\\/]*)
33817  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33818  ;;
33819  *)
33820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33821for as_dir in $PATH
33822do
33823  IFS=$as_save_IFS
33824  test -z "$as_dir" && as_dir=.
33825    for ac_exec_ext in '' $ac_executable_extensions; do
33826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33827    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33829    break 2
33830  fi
33831done
33832  done
33833IFS=$as_save_IFS
33834
33835  ;;
33836esac
33837fi
33838LIPO=$ac_cv_path_LIPO
33839if test -n "$LIPO"; then
33840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33841$as_echo "$LIPO" >&6; }
33842else
33843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33844$as_echo "no" >&6; }
33845fi
33846
33847
33848        if test "x$LIPO" = x; then
33849          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33850        fi
33851      else
33852        # Otherwise we believe it is a complete path. Use it as it is.
33853        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33854$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33855        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33856$as_echo_n "checking for LIPO... " >&6; }
33857        if test ! -x "$tool_specified"; then
33858          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33859$as_echo "not found" >&6; }
33860          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33861        fi
33862        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33863$as_echo "$tool_specified" >&6; }
33864      fi
33865    fi
33866  fi
33867
33868
33869
33870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33871
33872  # First separate the path from the arguments. This will split at the first
33873  # space.
33874  complete="$LIPO"
33875  path="${complete%% *}"
33876  tmp="$complete EOL"
33877  arguments="${tmp#* }"
33878
33879  # Input might be given as Windows format, start by converting to
33880  # unix format.
33881  new_path=`$CYGPATH -u "$path"`
33882
33883  # Now try to locate executable using which
33884  new_path=`$WHICH "$new_path" 2> /dev/null`
33885  # bat and cmd files are not always considered executable in cygwin causing which
33886  # to not find them
33887  if test "x$new_path" = x \
33888      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33889      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33890    new_path=`$CYGPATH -u "$path"`
33891  fi
33892  if test "x$new_path" = x; then
33893    # Oops. Which didn't find the executable.
33894    # The splitting of arguments from the executable at a space might have been incorrect,
33895    # since paths with space are more likely in Windows. Give it another try with the whole
33896    # argument.
33897    path="$complete"
33898    arguments="EOL"
33899    new_path=`$CYGPATH -u "$path"`
33900    new_path=`$WHICH "$new_path" 2> /dev/null`
33901    # bat and cmd files are not always considered executable in cygwin causing which
33902    # to not find them
33903    if test "x$new_path" = x \
33904        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33905        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33906      new_path=`$CYGPATH -u "$path"`
33907    fi
33908    if test "x$new_path" = x; then
33909      # It's still not found. Now this is an unrecoverable error.
33910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33911$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33912      has_space=`$ECHO "$complete" | $GREP " "`
33913      if test "x$has_space" != x; then
33914        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33915$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33916      fi
33917      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33918    fi
33919  fi
33920
33921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33924  # "foo.exe" is OK but "foo" is an error.
33925  #
33926  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33927  # It is also a way to make sure we got the proper file name for the real test later on.
33928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33929  if test "x$test_shortpath" = x; then
33930    # Short path failed, file does not exist as specified.
33931    # Try adding .exe or .cmd
33932    if test -f "${new_path}.exe"; then
33933      input_to_shortpath="${new_path}.exe"
33934    elif test -f "${new_path}.cmd"; then
33935      input_to_shortpath="${new_path}.cmd"
33936    else
33937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33938$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33939      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33940$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33941      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33942    fi
33943  else
33944    input_to_shortpath="$new_path"
33945  fi
33946
33947  # Call helper function which possibly converts this using DOS-style short mode.
33948  # If so, the updated path is stored in $new_path.
33949  new_path="$input_to_shortpath"
33950
33951  input_path="$input_to_shortpath"
33952  # Check if we need to convert this using DOS-style short mode. If the path
33953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33954  # take no chances and rewrite it.
33955  # Note: m4 eats our [], so we need to use [ and ] instead.
33956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33957  if test "x$has_forbidden_chars" != x; then
33958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33962      # Going to short mode and back again did indeed matter. Since short mode is
33963      # case insensitive, let's make it lowercase to improve readability.
33964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33965      # Now convert it back to Unix-stile (cygpath)
33966      input_path=`$CYGPATH -u "$shortmode_path"`
33967      new_path="$input_path"
33968    fi
33969  fi
33970
33971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33972  if test "x$test_cygdrive_prefix" = x; then
33973    # As a simple fix, exclude /usr/bin since it's not a real path.
33974    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33976      # a path prefixed by /cygdrive for fixpath to work.
33977      new_path="$CYGWIN_ROOT_PATH$input_path"
33978    fi
33979  fi
33980
33981  # remove trailing .exe if any
33982  new_path="${new_path/%.exe/}"
33983
33984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33985
33986  # First separate the path from the arguments. This will split at the first
33987  # space.
33988  complete="$LIPO"
33989  path="${complete%% *}"
33990  tmp="$complete EOL"
33991  arguments="${tmp#* }"
33992
33993  # Input might be given as Windows format, start by converting to
33994  # unix format.
33995  new_path="$path"
33996
33997  windows_path="$new_path"
33998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33999    unix_path=`$CYGPATH -u "$windows_path"`
34000    new_path="$unix_path"
34001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34003    new_path="$unix_path"
34004  fi
34005
34006
34007  # Now try to locate executable using which
34008  new_path=`$WHICH "$new_path" 2> /dev/null`
34009
34010  if test "x$new_path" = x; then
34011    # Oops. Which didn't find the executable.
34012    # The splitting of arguments from the executable at a space might have been incorrect,
34013    # since paths with space are more likely in Windows. Give it another try with the whole
34014    # argument.
34015    path="$complete"
34016    arguments="EOL"
34017    new_path="$path"
34018
34019  windows_path="$new_path"
34020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34021    unix_path=`$CYGPATH -u "$windows_path"`
34022    new_path="$unix_path"
34023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34025    new_path="$unix_path"
34026  fi
34027
34028
34029    new_path=`$WHICH "$new_path" 2> /dev/null`
34030    # bat and cmd files are not always considered executable in MSYS causing which
34031    # to not find them
34032    if test "x$new_path" = x \
34033        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34034        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34035      new_path="$path"
34036
34037  windows_path="$new_path"
34038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34039    unix_path=`$CYGPATH -u "$windows_path"`
34040    new_path="$unix_path"
34041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34043    new_path="$unix_path"
34044  fi
34045
34046    fi
34047
34048    if test "x$new_path" = x; then
34049      # It's still not found. Now this is an unrecoverable error.
34050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34051$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34052      has_space=`$ECHO "$complete" | $GREP " "`
34053      if test "x$has_space" != x; then
34054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34056      fi
34057      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34058    fi
34059  fi
34060
34061  # Now new_path has a complete unix path to the binary
34062  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34063    # Keep paths in /bin as-is, but remove trailing .exe if any
34064    new_path="${new_path/%.exe/}"
34065    # Do not save /bin paths to all_fixpath_prefixes!
34066  else
34067    # Not in mixed or Windows style, start by that.
34068    new_path=`cmd //c echo $new_path`
34069
34070  input_path="$new_path"
34071  # Check if we need to convert this using DOS-style short mode. If the path
34072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34073  # take no chances and rewrite it.
34074  # Note: m4 eats our [], so we need to use [ and ] instead.
34075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34076  if test "x$has_forbidden_chars" != x; then
34077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34078    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34079  fi
34080
34081    # Output is in $new_path
34082
34083  windows_path="$new_path"
34084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34085    unix_path=`$CYGPATH -u "$windows_path"`
34086    new_path="$unix_path"
34087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34089    new_path="$unix_path"
34090  fi
34091
34092    # remove trailing .exe if any
34093    new_path="${new_path/%.exe/}"
34094
34095    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34096    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34097  fi
34098
34099  else
34100    # We're on a unix platform. Hooray! :)
34101    # First separate the path from the arguments. This will split at the first
34102    # space.
34103    complete="$LIPO"
34104    path="${complete%% *}"
34105    tmp="$complete EOL"
34106    arguments="${tmp#* }"
34107
34108    # Cannot rely on the command "which" here since it doesn't always work.
34109    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34110    if test -z "$is_absolute_path"; then
34111      # Path to executable is not absolute. Find it.
34112      IFS_save="$IFS"
34113      IFS=:
34114      for p in $PATH; do
34115        if test -f "$p/$path" && test -x "$p/$path"; then
34116          new_path="$p/$path"
34117          break
34118        fi
34119      done
34120      IFS="$IFS_save"
34121    else
34122      # This is an absolute path, we can use it without further modifications.
34123      new_path="$path"
34124    fi
34125
34126    if test "x$new_path" = x; then
34127      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34128$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34129      has_space=`$ECHO "$complete" | $GREP " "`
34130      if test "x$has_space" != x; then
34131        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34132$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34133      fi
34134      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34135    fi
34136  fi
34137
34138  # Now join together the path and the arguments once again
34139  if test "x$arguments" != xEOL; then
34140    new_complete="$new_path ${arguments% *}"
34141  else
34142    new_complete="$new_path"
34143  fi
34144
34145  if test "x$complete" != "x$new_complete"; then
34146    LIPO="$new_complete"
34147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34148$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34149  fi
34150
34151  else
34152    OBJC=
34153  fi
34154
34155  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34156    # Extract the first word of "mt", so it can be a program name with args.
34157set dummy mt; ac_word=$2
34158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34159$as_echo_n "checking for $ac_word... " >&6; }
34160if ${ac_cv_prog_MT+:} false; then :
34161  $as_echo_n "(cached) " >&6
34162else
34163  if test -n "$MT"; then
34164  ac_cv_prog_MT="$MT" # Let the user override the test.
34165else
34166  ac_prog_rejected=no
34167as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34168for as_dir in $PATH
34169do
34170  IFS=$as_save_IFS
34171  test -z "$as_dir" && as_dir=.
34172    for ac_exec_ext in '' $ac_executable_extensions; do
34173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34174    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34175       ac_prog_rejected=yes
34176       continue
34177     fi
34178    ac_cv_prog_MT="mt"
34179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34180    break 2
34181  fi
34182done
34183  done
34184IFS=$as_save_IFS
34185
34186if test $ac_prog_rejected = yes; then
34187  # We found a bogon in the path, so make sure we never use it.
34188  set dummy $ac_cv_prog_MT
34189  shift
34190  if test $# != 0; then
34191    # We chose a different compiler from the bogus one.
34192    # However, it has the same basename, so the bogon will be chosen
34193    # first if we set MT to just the basename; use the full file name.
34194    shift
34195    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34196  fi
34197fi
34198fi
34199fi
34200MT=$ac_cv_prog_MT
34201if test -n "$MT"; then
34202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34203$as_echo "$MT" >&6; }
34204else
34205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34206$as_echo "no" >&6; }
34207fi
34208
34209
34210
34211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34212
34213  # First separate the path from the arguments. This will split at the first
34214  # space.
34215  complete="$MT"
34216  path="${complete%% *}"
34217  tmp="$complete EOL"
34218  arguments="${tmp#* }"
34219
34220  # Input might be given as Windows format, start by converting to
34221  # unix format.
34222  new_path=`$CYGPATH -u "$path"`
34223
34224  # Now try to locate executable using which
34225  new_path=`$WHICH "$new_path" 2> /dev/null`
34226  # bat and cmd files are not always considered executable in cygwin causing which
34227  # to not find them
34228  if test "x$new_path" = x \
34229      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34230      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34231    new_path=`$CYGPATH -u "$path"`
34232  fi
34233  if test "x$new_path" = x; then
34234    # Oops. Which didn't find the executable.
34235    # The splitting of arguments from the executable at a space might have been incorrect,
34236    # since paths with space are more likely in Windows. Give it another try with the whole
34237    # argument.
34238    path="$complete"
34239    arguments="EOL"
34240    new_path=`$CYGPATH -u "$path"`
34241    new_path=`$WHICH "$new_path" 2> /dev/null`
34242    # bat and cmd files are not always considered executable in cygwin causing which
34243    # to not find them
34244    if test "x$new_path" = x \
34245        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34246        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34247      new_path=`$CYGPATH -u "$path"`
34248    fi
34249    if test "x$new_path" = x; then
34250      # It's still not found. Now this is an unrecoverable error.
34251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34252$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34253      has_space=`$ECHO "$complete" | $GREP " "`
34254      if test "x$has_space" != x; then
34255        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34256$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34257      fi
34258      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34259    fi
34260  fi
34261
34262  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34263  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34264  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34265  # "foo.exe" is OK but "foo" is an error.
34266  #
34267  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34268  # It is also a way to make sure we got the proper file name for the real test later on.
34269  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34270  if test "x$test_shortpath" = x; then
34271    # Short path failed, file does not exist as specified.
34272    # Try adding .exe or .cmd
34273    if test -f "${new_path}.exe"; then
34274      input_to_shortpath="${new_path}.exe"
34275    elif test -f "${new_path}.cmd"; then
34276      input_to_shortpath="${new_path}.cmd"
34277    else
34278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34279$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34280      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34281$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34282      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34283    fi
34284  else
34285    input_to_shortpath="$new_path"
34286  fi
34287
34288  # Call helper function which possibly converts this using DOS-style short mode.
34289  # If so, the updated path is stored in $new_path.
34290  new_path="$input_to_shortpath"
34291
34292  input_path="$input_to_shortpath"
34293  # Check if we need to convert this using DOS-style short mode. If the path
34294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34295  # take no chances and rewrite it.
34296  # Note: m4 eats our [], so we need to use [ and ] instead.
34297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34298  if test "x$has_forbidden_chars" != x; then
34299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34303      # Going to short mode and back again did indeed matter. Since short mode is
34304      # case insensitive, let's make it lowercase to improve readability.
34305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34306      # Now convert it back to Unix-stile (cygpath)
34307      input_path=`$CYGPATH -u "$shortmode_path"`
34308      new_path="$input_path"
34309    fi
34310  fi
34311
34312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34313  if test "x$test_cygdrive_prefix" = x; then
34314    # As a simple fix, exclude /usr/bin since it's not a real path.
34315    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34317      # a path prefixed by /cygdrive for fixpath to work.
34318      new_path="$CYGWIN_ROOT_PATH$input_path"
34319    fi
34320  fi
34321
34322  # remove trailing .exe if any
34323  new_path="${new_path/%.exe/}"
34324
34325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34326
34327  # First separate the path from the arguments. This will split at the first
34328  # space.
34329  complete="$MT"
34330  path="${complete%% *}"
34331  tmp="$complete EOL"
34332  arguments="${tmp#* }"
34333
34334  # Input might be given as Windows format, start by converting to
34335  # unix format.
34336  new_path="$path"
34337
34338  windows_path="$new_path"
34339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34340    unix_path=`$CYGPATH -u "$windows_path"`
34341    new_path="$unix_path"
34342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34344    new_path="$unix_path"
34345  fi
34346
34347
34348  # Now try to locate executable using which
34349  new_path=`$WHICH "$new_path" 2> /dev/null`
34350
34351  if test "x$new_path" = x; then
34352    # Oops. Which didn't find the executable.
34353    # The splitting of arguments from the executable at a space might have been incorrect,
34354    # since paths with space are more likely in Windows. Give it another try with the whole
34355    # argument.
34356    path="$complete"
34357    arguments="EOL"
34358    new_path="$path"
34359
34360  windows_path="$new_path"
34361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34362    unix_path=`$CYGPATH -u "$windows_path"`
34363    new_path="$unix_path"
34364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34366    new_path="$unix_path"
34367  fi
34368
34369
34370    new_path=`$WHICH "$new_path" 2> /dev/null`
34371    # bat and cmd files are not always considered executable in MSYS causing which
34372    # to not find them
34373    if test "x$new_path" = x \
34374        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34375        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34376      new_path="$path"
34377
34378  windows_path="$new_path"
34379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34380    unix_path=`$CYGPATH -u "$windows_path"`
34381    new_path="$unix_path"
34382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34384    new_path="$unix_path"
34385  fi
34386
34387    fi
34388
34389    if test "x$new_path" = x; then
34390      # It's still not found. Now this is an unrecoverable error.
34391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34392$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34393      has_space=`$ECHO "$complete" | $GREP " "`
34394      if test "x$has_space" != x; then
34395        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34396$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34397      fi
34398      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34399    fi
34400  fi
34401
34402  # Now new_path has a complete unix path to the binary
34403  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34404    # Keep paths in /bin as-is, but remove trailing .exe if any
34405    new_path="${new_path/%.exe/}"
34406    # Do not save /bin paths to all_fixpath_prefixes!
34407  else
34408    # Not in mixed or Windows style, start by that.
34409    new_path=`cmd //c echo $new_path`
34410
34411  input_path="$new_path"
34412  # Check if we need to convert this using DOS-style short mode. If the path
34413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34414  # take no chances and rewrite it.
34415  # Note: m4 eats our [], so we need to use [ and ] instead.
34416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34417  if test "x$has_forbidden_chars" != x; then
34418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34420  fi
34421
34422    # Output is in $new_path
34423
34424  windows_path="$new_path"
34425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34426    unix_path=`$CYGPATH -u "$windows_path"`
34427    new_path="$unix_path"
34428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34430    new_path="$unix_path"
34431  fi
34432
34433    # remove trailing .exe if any
34434    new_path="${new_path/%.exe/}"
34435
34436    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34437    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34438  fi
34439
34440  else
34441    # We're on a unix platform. Hooray! :)
34442    # First separate the path from the arguments. This will split at the first
34443    # space.
34444    complete="$MT"
34445    path="${complete%% *}"
34446    tmp="$complete EOL"
34447    arguments="${tmp#* }"
34448
34449    # Cannot rely on the command "which" here since it doesn't always work.
34450    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34451    if test -z "$is_absolute_path"; then
34452      # Path to executable is not absolute. Find it.
34453      IFS_save="$IFS"
34454      IFS=:
34455      for p in $PATH; do
34456        if test -f "$p/$path" && test -x "$p/$path"; then
34457          new_path="$p/$path"
34458          break
34459        fi
34460      done
34461      IFS="$IFS_save"
34462    else
34463      # This is an absolute path, we can use it without further modifications.
34464      new_path="$path"
34465    fi
34466
34467    if test "x$new_path" = x; then
34468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34469$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34470      has_space=`$ECHO "$complete" | $GREP " "`
34471      if test "x$has_space" != x; then
34472        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34473$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34474      fi
34475      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34476    fi
34477  fi
34478
34479  # Now join together the path and the arguments once again
34480  if test "x$arguments" != xEOL; then
34481    new_complete="$new_path ${arguments% *}"
34482  else
34483    new_complete="$new_path"
34484  fi
34485
34486  if test "x$complete" != "x$new_complete"; then
34487    MT="$new_complete"
34488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34489$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34490  fi
34491
34492    # Setup the resource compiler (RC)
34493    # Extract the first word of "rc", so it can be a program name with args.
34494set dummy rc; ac_word=$2
34495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34496$as_echo_n "checking for $ac_word... " >&6; }
34497if ${ac_cv_prog_RC+:} false; then :
34498  $as_echo_n "(cached) " >&6
34499else
34500  if test -n "$RC"; then
34501  ac_cv_prog_RC="$RC" # Let the user override the test.
34502else
34503  ac_prog_rejected=no
34504as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34505for as_dir in $PATH
34506do
34507  IFS=$as_save_IFS
34508  test -z "$as_dir" && as_dir=.
34509    for ac_exec_ext in '' $ac_executable_extensions; do
34510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34511    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34512       ac_prog_rejected=yes
34513       continue
34514     fi
34515    ac_cv_prog_RC="rc"
34516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34517    break 2
34518  fi
34519done
34520  done
34521IFS=$as_save_IFS
34522
34523if test $ac_prog_rejected = yes; then
34524  # We found a bogon in the path, so make sure we never use it.
34525  set dummy $ac_cv_prog_RC
34526  shift
34527  if test $# != 0; then
34528    # We chose a different compiler from the bogus one.
34529    # However, it has the same basename, so the bogon will be chosen
34530    # first if we set RC to just the basename; use the full file name.
34531    shift
34532    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34533  fi
34534fi
34535fi
34536fi
34537RC=$ac_cv_prog_RC
34538if test -n "$RC"; then
34539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34540$as_echo "$RC" >&6; }
34541else
34542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34543$as_echo "no" >&6; }
34544fi
34545
34546
34547
34548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34549
34550  # First separate the path from the arguments. This will split at the first
34551  # space.
34552  complete="$RC"
34553  path="${complete%% *}"
34554  tmp="$complete EOL"
34555  arguments="${tmp#* }"
34556
34557  # Input might be given as Windows format, start by converting to
34558  # unix format.
34559  new_path=`$CYGPATH -u "$path"`
34560
34561  # Now try to locate executable using which
34562  new_path=`$WHICH "$new_path" 2> /dev/null`
34563  # bat and cmd files are not always considered executable in cygwin causing which
34564  # to not find them
34565  if test "x$new_path" = x \
34566      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34567      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34568    new_path=`$CYGPATH -u "$path"`
34569  fi
34570  if test "x$new_path" = x; then
34571    # Oops. Which didn't find the executable.
34572    # The splitting of arguments from the executable at a space might have been incorrect,
34573    # since paths with space are more likely in Windows. Give it another try with the whole
34574    # argument.
34575    path="$complete"
34576    arguments="EOL"
34577    new_path=`$CYGPATH -u "$path"`
34578    new_path=`$WHICH "$new_path" 2> /dev/null`
34579    # bat and cmd files are not always considered executable in cygwin causing which
34580    # to not find them
34581    if test "x$new_path" = x \
34582        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34583        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34584      new_path=`$CYGPATH -u "$path"`
34585    fi
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 RC, which resolves as \"$complete\", is not found." >&5
34589$as_echo "$as_me: The path of RC, 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 RC" "$LINENO" 5
34596    fi
34597  fi
34598
34599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34602  # "foo.exe" is OK but "foo" is an error.
34603  #
34604  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34605  # It is also a way to make sure we got the proper file name for the real test later on.
34606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34607  if test "x$test_shortpath" = x; then
34608    # Short path failed, file does not exist as specified.
34609    # Try adding .exe or .cmd
34610    if test -f "${new_path}.exe"; then
34611      input_to_shortpath="${new_path}.exe"
34612    elif test -f "${new_path}.cmd"; then
34613      input_to_shortpath="${new_path}.cmd"
34614    else
34615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34616$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34617      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34618$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34619      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34620    fi
34621  else
34622    input_to_shortpath="$new_path"
34623  fi
34624
34625  # Call helper function which possibly converts this using DOS-style short mode.
34626  # If so, the updated path is stored in $new_path.
34627  new_path="$input_to_shortpath"
34628
34629  input_path="$input_to_shortpath"
34630  # Check if we need to convert this using DOS-style short mode. If the path
34631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34632  # take no chances and rewrite it.
34633  # Note: m4 eats our [], so we need to use [ and ] instead.
34634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34635  if test "x$has_forbidden_chars" != x; then
34636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34640      # Going to short mode and back again did indeed matter. Since short mode is
34641      # case insensitive, let's make it lowercase to improve readability.
34642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34643      # Now convert it back to Unix-stile (cygpath)
34644      input_path=`$CYGPATH -u "$shortmode_path"`
34645      new_path="$input_path"
34646    fi
34647  fi
34648
34649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34650  if test "x$test_cygdrive_prefix" = x; then
34651    # As a simple fix, exclude /usr/bin since it's not a real path.
34652    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34654      # a path prefixed by /cygdrive for fixpath to work.
34655      new_path="$CYGWIN_ROOT_PATH$input_path"
34656    fi
34657  fi
34658
34659  # remove trailing .exe if any
34660  new_path="${new_path/%.exe/}"
34661
34662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34663
34664  # First separate the path from the arguments. This will split at the first
34665  # space.
34666  complete="$RC"
34667  path="${complete%% *}"
34668  tmp="$complete EOL"
34669  arguments="${tmp#* }"
34670
34671  # Input might be given as Windows format, start by converting to
34672  # unix format.
34673  new_path="$path"
34674
34675  windows_path="$new_path"
34676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34677    unix_path=`$CYGPATH -u "$windows_path"`
34678    new_path="$unix_path"
34679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34681    new_path="$unix_path"
34682  fi
34683
34684
34685  # Now try to locate executable using which
34686  new_path=`$WHICH "$new_path" 2> /dev/null`
34687
34688  if test "x$new_path" = x; then
34689    # Oops. Which didn't find the executable.
34690    # The splitting of arguments from the executable at a space might have been incorrect,
34691    # since paths with space are more likely in Windows. Give it another try with the whole
34692    # argument.
34693    path="$complete"
34694    arguments="EOL"
34695    new_path="$path"
34696
34697  windows_path="$new_path"
34698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34699    unix_path=`$CYGPATH -u "$windows_path"`
34700    new_path="$unix_path"
34701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34703    new_path="$unix_path"
34704  fi
34705
34706
34707    new_path=`$WHICH "$new_path" 2> /dev/null`
34708    # bat and cmd files are not always considered executable in MSYS causing which
34709    # to not find them
34710    if test "x$new_path" = x \
34711        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34712        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34713      new_path="$path"
34714
34715  windows_path="$new_path"
34716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34717    unix_path=`$CYGPATH -u "$windows_path"`
34718    new_path="$unix_path"
34719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34721    new_path="$unix_path"
34722  fi
34723
34724    fi
34725
34726    if test "x$new_path" = x; then
34727      # It's still not found. Now this is an unrecoverable error.
34728      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34729$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34730      has_space=`$ECHO "$complete" | $GREP " "`
34731      if test "x$has_space" != x; then
34732        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34733$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34734      fi
34735      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34736    fi
34737  fi
34738
34739  # Now new_path has a complete unix path to the binary
34740  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34741    # Keep paths in /bin as-is, but remove trailing .exe if any
34742    new_path="${new_path/%.exe/}"
34743    # Do not save /bin paths to all_fixpath_prefixes!
34744  else
34745    # Not in mixed or Windows style, start by that.
34746    new_path=`cmd //c echo $new_path`
34747
34748  input_path="$new_path"
34749  # Check if we need to convert this using DOS-style short mode. If the path
34750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34751  # take no chances and rewrite it.
34752  # Note: m4 eats our [], so we need to use [ and ] instead.
34753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34754  if test "x$has_forbidden_chars" != x; then
34755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34756    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34757  fi
34758
34759    # Output is in $new_path
34760
34761  windows_path="$new_path"
34762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34763    unix_path=`$CYGPATH -u "$windows_path"`
34764    new_path="$unix_path"
34765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34767    new_path="$unix_path"
34768  fi
34769
34770    # remove trailing .exe if any
34771    new_path="${new_path/%.exe/}"
34772
34773    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34774    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34775  fi
34776
34777  else
34778    # We're on a unix platform. Hooray! :)
34779    # First separate the path from the arguments. This will split at the first
34780    # space.
34781    complete="$RC"
34782    path="${complete%% *}"
34783    tmp="$complete EOL"
34784    arguments="${tmp#* }"
34785
34786    # Cannot rely on the command "which" here since it doesn't always work.
34787    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34788    if test -z "$is_absolute_path"; then
34789      # Path to executable is not absolute. Find it.
34790      IFS_save="$IFS"
34791      IFS=:
34792      for p in $PATH; do
34793        if test -f "$p/$path" && test -x "$p/$path"; then
34794          new_path="$p/$path"
34795          break
34796        fi
34797      done
34798      IFS="$IFS_save"
34799    else
34800      # This is an absolute path, we can use it without further modifications.
34801      new_path="$path"
34802    fi
34803
34804    if test "x$new_path" = x; then
34805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34806$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34807      has_space=`$ECHO "$complete" | $GREP " "`
34808      if test "x$has_space" != x; then
34809        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34810$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34811      fi
34812      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34813    fi
34814  fi
34815
34816  # Now join together the path and the arguments once again
34817  if test "x$arguments" != xEOL; then
34818    new_complete="$new_path ${arguments% *}"
34819  else
34820    new_complete="$new_path"
34821  fi
34822
34823  if test "x$complete" != "x$new_complete"; then
34824    RC="$new_complete"
34825    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34826$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34827  fi
34828
34829    # Extract the first word of "dumpbin", so it can be a program name with args.
34830set dummy dumpbin; ac_word=$2
34831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34832$as_echo_n "checking for $ac_word... " >&6; }
34833if ${ac_cv_prog_DUMPBIN+:} false; then :
34834  $as_echo_n "(cached) " >&6
34835else
34836  if test -n "$DUMPBIN"; then
34837  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34838else
34839as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34840for as_dir in $PATH
34841do
34842  IFS=$as_save_IFS
34843  test -z "$as_dir" && as_dir=.
34844    for ac_exec_ext in '' $ac_executable_extensions; do
34845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34846    ac_cv_prog_DUMPBIN="dumpbin"
34847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34848    break 2
34849  fi
34850done
34851  done
34852IFS=$as_save_IFS
34853
34854fi
34855fi
34856DUMPBIN=$ac_cv_prog_DUMPBIN
34857if test -n "$DUMPBIN"; then
34858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34859$as_echo "$DUMPBIN" >&6; }
34860else
34861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34862$as_echo "no" >&6; }
34863fi
34864
34865
34866
34867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34868
34869  # First separate the path from the arguments. This will split at the first
34870  # space.
34871  complete="$DUMPBIN"
34872  path="${complete%% *}"
34873  tmp="$complete EOL"
34874  arguments="${tmp#* }"
34875
34876  # Input might be given as Windows format, start by converting to
34877  # unix format.
34878  new_path=`$CYGPATH -u "$path"`
34879
34880  # Now try to locate executable using which
34881  new_path=`$WHICH "$new_path" 2> /dev/null`
34882  # bat and cmd files are not always considered executable in cygwin causing which
34883  # to not find them
34884  if test "x$new_path" = x \
34885      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34886      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34887    new_path=`$CYGPATH -u "$path"`
34888  fi
34889  if test "x$new_path" = x; then
34890    # Oops. Which didn't find the executable.
34891    # The splitting of arguments from the executable at a space might have been incorrect,
34892    # since paths with space are more likely in Windows. Give it another try with the whole
34893    # argument.
34894    path="$complete"
34895    arguments="EOL"
34896    new_path=`$CYGPATH -u "$path"`
34897    new_path=`$WHICH "$new_path" 2> /dev/null`
34898    # bat and cmd files are not always considered executable in cygwin causing which
34899    # to not find them
34900    if test "x$new_path" = x \
34901        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34902        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34903      new_path=`$CYGPATH -u "$path"`
34904    fi
34905    if test "x$new_path" = x; then
34906      # It's still not found. Now this is an unrecoverable error.
34907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34908$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34909      has_space=`$ECHO "$complete" | $GREP " "`
34910      if test "x$has_space" != x; then
34911        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34912$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34913      fi
34914      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34915    fi
34916  fi
34917
34918  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34919  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34920  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34921  # "foo.exe" is OK but "foo" is an error.
34922  #
34923  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34924  # It is also a way to make sure we got the proper file name for the real test later on.
34925  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34926  if test "x$test_shortpath" = x; then
34927    # Short path failed, file does not exist as specified.
34928    # Try adding .exe or .cmd
34929    if test -f "${new_path}.exe"; then
34930      input_to_shortpath="${new_path}.exe"
34931    elif test -f "${new_path}.cmd"; then
34932      input_to_shortpath="${new_path}.cmd"
34933    else
34934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34935$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34936      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34937$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34938      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34939    fi
34940  else
34941    input_to_shortpath="$new_path"
34942  fi
34943
34944  # Call helper function which possibly converts this using DOS-style short mode.
34945  # If so, the updated path is stored in $new_path.
34946  new_path="$input_to_shortpath"
34947
34948  input_path="$input_to_shortpath"
34949  # Check if we need to convert this using DOS-style short mode. If the path
34950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34951  # take no chances and rewrite it.
34952  # Note: m4 eats our [], so we need to use [ and ] instead.
34953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34954  if test "x$has_forbidden_chars" != x; then
34955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34956    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34957    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34958    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34959      # Going to short mode and back again did indeed matter. Since short mode is
34960      # case insensitive, let's make it lowercase to improve readability.
34961      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34962      # Now convert it back to Unix-stile (cygpath)
34963      input_path=`$CYGPATH -u "$shortmode_path"`
34964      new_path="$input_path"
34965    fi
34966  fi
34967
34968  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34969  if test "x$test_cygdrive_prefix" = x; then
34970    # As a simple fix, exclude /usr/bin since it's not a real path.
34971    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34972      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34973      # a path prefixed by /cygdrive for fixpath to work.
34974      new_path="$CYGWIN_ROOT_PATH$input_path"
34975    fi
34976  fi
34977
34978  # remove trailing .exe if any
34979  new_path="${new_path/%.exe/}"
34980
34981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34982
34983  # First separate the path from the arguments. This will split at the first
34984  # space.
34985  complete="$DUMPBIN"
34986  path="${complete%% *}"
34987  tmp="$complete EOL"
34988  arguments="${tmp#* }"
34989
34990  # Input might be given as Windows format, start by converting to
34991  # unix format.
34992  new_path="$path"
34993
34994  windows_path="$new_path"
34995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34996    unix_path=`$CYGPATH -u "$windows_path"`
34997    new_path="$unix_path"
34998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35000    new_path="$unix_path"
35001  fi
35002
35003
35004  # Now try to locate executable using which
35005  new_path=`$WHICH "$new_path" 2> /dev/null`
35006
35007  if test "x$new_path" = x; then
35008    # Oops. Which didn't find the executable.
35009    # The splitting of arguments from the executable at a space might have been incorrect,
35010    # since paths with space are more likely in Windows. Give it another try with the whole
35011    # argument.
35012    path="$complete"
35013    arguments="EOL"
35014    new_path="$path"
35015
35016  windows_path="$new_path"
35017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35018    unix_path=`$CYGPATH -u "$windows_path"`
35019    new_path="$unix_path"
35020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35022    new_path="$unix_path"
35023  fi
35024
35025
35026    new_path=`$WHICH "$new_path" 2> /dev/null`
35027    # bat and cmd files are not always considered executable in MSYS causing which
35028    # to not find them
35029    if test "x$new_path" = x \
35030        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35031        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35032      new_path="$path"
35033
35034  windows_path="$new_path"
35035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35036    unix_path=`$CYGPATH -u "$windows_path"`
35037    new_path="$unix_path"
35038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35040    new_path="$unix_path"
35041  fi
35042
35043    fi
35044
35045    if test "x$new_path" = x; then
35046      # It's still not found. Now this is an unrecoverable error.
35047      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35048$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35049      has_space=`$ECHO "$complete" | $GREP " "`
35050      if test "x$has_space" != x; then
35051        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35052$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35053      fi
35054      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35055    fi
35056  fi
35057
35058  # Now new_path has a complete unix path to the binary
35059  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35060    # Keep paths in /bin as-is, but remove trailing .exe if any
35061    new_path="${new_path/%.exe/}"
35062    # Do not save /bin paths to all_fixpath_prefixes!
35063  else
35064    # Not in mixed or Windows style, start by that.
35065    new_path=`cmd //c echo $new_path`
35066
35067  input_path="$new_path"
35068  # Check if we need to convert this using DOS-style short mode. If the path
35069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35070  # take no chances and rewrite it.
35071  # Note: m4 eats our [], so we need to use [ and ] instead.
35072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35073  if test "x$has_forbidden_chars" != x; then
35074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35075    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35076  fi
35077
35078    # Output is in $new_path
35079
35080  windows_path="$new_path"
35081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35082    unix_path=`$CYGPATH -u "$windows_path"`
35083    new_path="$unix_path"
35084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35086    new_path="$unix_path"
35087  fi
35088
35089    # remove trailing .exe if any
35090    new_path="${new_path/%.exe/}"
35091
35092    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35093    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35094  fi
35095
35096  else
35097    # We're on a unix platform. Hooray! :)
35098    # First separate the path from the arguments. This will split at the first
35099    # space.
35100    complete="$DUMPBIN"
35101    path="${complete%% *}"
35102    tmp="$complete EOL"
35103    arguments="${tmp#* }"
35104
35105    # Cannot rely on the command "which" here since it doesn't always work.
35106    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35107    if test -z "$is_absolute_path"; then
35108      # Path to executable is not absolute. Find it.
35109      IFS_save="$IFS"
35110      IFS=:
35111      for p in $PATH; do
35112        if test -f "$p/$path" && test -x "$p/$path"; then
35113          new_path="$p/$path"
35114          break
35115        fi
35116      done
35117      IFS="$IFS_save"
35118    else
35119      # This is an absolute path, we can use it without further modifications.
35120      new_path="$path"
35121    fi
35122
35123    if test "x$new_path" = x; then
35124      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35125$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35126      has_space=`$ECHO "$complete" | $GREP " "`
35127      if test "x$has_space" != x; then
35128        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35129$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35130      fi
35131      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35132    fi
35133  fi
35134
35135  # Now join together the path and the arguments once again
35136  if test "x$arguments" != xEOL; then
35137    new_complete="$new_path ${arguments% *}"
35138  else
35139    new_complete="$new_path"
35140  fi
35141
35142  if test "x$complete" != "x$new_complete"; then
35143    DUMPBIN="$new_complete"
35144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35145$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35146  fi
35147
35148    # We need to check for 'msbuild.exe' because at the place where we expect to
35149    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35150    # won't find the 'msbuild.exe' executable in that case (and the
35151    # 'ac_executable_extensions' is unusable due to performance reasons).
35152    # Notice that we intentionally don't fix up the path to MSBUILD because we
35153    # will call it in a DOS shell during freetype detection on Windows (see
35154    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35155    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35156set dummy msbuild.exe; ac_word=$2
35157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35158$as_echo_n "checking for $ac_word... " >&6; }
35159if ${ac_cv_prog_MSBUILD+:} false; then :
35160  $as_echo_n "(cached) " >&6
35161else
35162  if test -n "$MSBUILD"; then
35163  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35164else
35165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35166for as_dir in $PATH
35167do
35168  IFS=$as_save_IFS
35169  test -z "$as_dir" && as_dir=.
35170    for ac_exec_ext in '' $ac_executable_extensions; do
35171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35172    ac_cv_prog_MSBUILD="msbuild.exe"
35173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35174    break 2
35175  fi
35176done
35177  done
35178IFS=$as_save_IFS
35179
35180fi
35181fi
35182MSBUILD=$ac_cv_prog_MSBUILD
35183if test -n "$MSBUILD"; then
35184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35185$as_echo "$MSBUILD" >&6; }
35186else
35187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35188$as_echo "no" >&6; }
35189fi
35190
35191
35192  fi
35193
35194  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35195
35196
35197  # Publish this variable in the help.
35198
35199
35200  if test "x$STRIP" = x; then
35201    # The variable is not set by user, try to locate tool using the code snippet
35202    for ac_prog in strip
35203do
35204  # Extract the first word of "$ac_prog", so it can be a program name with args.
35205set dummy $ac_prog; ac_word=$2
35206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35207$as_echo_n "checking for $ac_word... " >&6; }
35208if ${ac_cv_path_STRIP+:} false; then :
35209  $as_echo_n "(cached) " >&6
35210else
35211  case $STRIP in
35212  [\\/]* | ?:[\\/]*)
35213  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35214  ;;
35215  *)
35216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35217for as_dir in $PATH
35218do
35219  IFS=$as_save_IFS
35220  test -z "$as_dir" && as_dir=.
35221    for ac_exec_ext in '' $ac_executable_extensions; do
35222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35223    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35225    break 2
35226  fi
35227done
35228  done
35229IFS=$as_save_IFS
35230
35231  ;;
35232esac
35233fi
35234STRIP=$ac_cv_path_STRIP
35235if test -n "$STRIP"; then
35236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35237$as_echo "$STRIP" >&6; }
35238else
35239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35240$as_echo "no" >&6; }
35241fi
35242
35243
35244  test -n "$STRIP" && break
35245done
35246
35247  else
35248    # The variable is set, but is it from the command line or the environment?
35249
35250    # Try to remove the string !STRIP! from our list.
35251    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35252    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35253      # If it failed, the variable was not from the command line. Ignore it,
35254      # but warn the user (except for BASH, which is always set by the calling BASH).
35255      if test "xSTRIP" != xBASH; then
35256        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35257$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35258      fi
35259      # Try to locate tool using the code snippet
35260      for ac_prog in strip
35261do
35262  # Extract the first word of "$ac_prog", so it can be a program name with args.
35263set dummy $ac_prog; ac_word=$2
35264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35265$as_echo_n "checking for $ac_word... " >&6; }
35266if ${ac_cv_path_STRIP+:} false; then :
35267  $as_echo_n "(cached) " >&6
35268else
35269  case $STRIP in
35270  [\\/]* | ?:[\\/]*)
35271  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35272  ;;
35273  *)
35274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35275for as_dir in $PATH
35276do
35277  IFS=$as_save_IFS
35278  test -z "$as_dir" && as_dir=.
35279    for ac_exec_ext in '' $ac_executable_extensions; do
35280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35281    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35283    break 2
35284  fi
35285done
35286  done
35287IFS=$as_save_IFS
35288
35289  ;;
35290esac
35291fi
35292STRIP=$ac_cv_path_STRIP
35293if test -n "$STRIP"; then
35294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35295$as_echo "$STRIP" >&6; }
35296else
35297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35298$as_echo "no" >&6; }
35299fi
35300
35301
35302  test -n "$STRIP" && break
35303done
35304
35305    else
35306      # If it succeeded, then it was overridden by the user. We will use it
35307      # for the tool.
35308
35309      # First remove it from the list of overridden variables, so we can test
35310      # for unknown variables in the end.
35311      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35312
35313      # Check if the provided tool contains a complete path.
35314      tool_specified="$STRIP"
35315      tool_basename="${tool_specified##*/}"
35316      if test "x$tool_basename" = "x$tool_specified"; then
35317        # A command without a complete path is provided, search $PATH.
35318        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35319$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35320        # Extract the first word of "$tool_basename", so it can be a program name with args.
35321set dummy $tool_basename; ac_word=$2
35322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35323$as_echo_n "checking for $ac_word... " >&6; }
35324if ${ac_cv_path_STRIP+:} false; then :
35325  $as_echo_n "(cached) " >&6
35326else
35327  case $STRIP in
35328  [\\/]* | ?:[\\/]*)
35329  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35330  ;;
35331  *)
35332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35333for as_dir in $PATH
35334do
35335  IFS=$as_save_IFS
35336  test -z "$as_dir" && as_dir=.
35337    for ac_exec_ext in '' $ac_executable_extensions; do
35338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35339    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35341    break 2
35342  fi
35343done
35344  done
35345IFS=$as_save_IFS
35346
35347  ;;
35348esac
35349fi
35350STRIP=$ac_cv_path_STRIP
35351if test -n "$STRIP"; then
35352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35353$as_echo "$STRIP" >&6; }
35354else
35355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35356$as_echo "no" >&6; }
35357fi
35358
35359
35360        if test "x$STRIP" = x; then
35361          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35362        fi
35363      else
35364        # Otherwise we believe it is a complete path. Use it as it is.
35365        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35366$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35367        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35368$as_echo_n "checking for STRIP... " >&6; }
35369        if test ! -x "$tool_specified"; then
35370          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35371$as_echo "not found" >&6; }
35372          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35373        fi
35374        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35375$as_echo "$tool_specified" >&6; }
35376      fi
35377    fi
35378  fi
35379
35380
35381
35382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35383
35384  # First separate the path from the arguments. This will split at the first
35385  # space.
35386  complete="$STRIP"
35387  path="${complete%% *}"
35388  tmp="$complete EOL"
35389  arguments="${tmp#* }"
35390
35391  # Input might be given as Windows format, start by converting to
35392  # unix format.
35393  new_path=`$CYGPATH -u "$path"`
35394
35395  # Now try to locate executable using which
35396  new_path=`$WHICH "$new_path" 2> /dev/null`
35397  # bat and cmd files are not always considered executable in cygwin causing which
35398  # to not find them
35399  if test "x$new_path" = x \
35400      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35401      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35402    new_path=`$CYGPATH -u "$path"`
35403  fi
35404  if test "x$new_path" = x; then
35405    # Oops. Which didn't find the executable.
35406    # The splitting of arguments from the executable at a space might have been incorrect,
35407    # since paths with space are more likely in Windows. Give it another try with the whole
35408    # argument.
35409    path="$complete"
35410    arguments="EOL"
35411    new_path=`$CYGPATH -u "$path"`
35412    new_path=`$WHICH "$new_path" 2> /dev/null`
35413    # bat and cmd files are not always considered executable in cygwin causing which
35414    # to not find them
35415    if test "x$new_path" = x \
35416        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35417        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35418      new_path=`$CYGPATH -u "$path"`
35419    fi
35420    if test "x$new_path" = x; then
35421      # It's still not found. Now this is an unrecoverable error.
35422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35423$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35424      has_space=`$ECHO "$complete" | $GREP " "`
35425      if test "x$has_space" != x; then
35426        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35427$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35428      fi
35429      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35430    fi
35431  fi
35432
35433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35436  # "foo.exe" is OK but "foo" is an error.
35437  #
35438  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35439  # It is also a way to make sure we got the proper file name for the real test later on.
35440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35441  if test "x$test_shortpath" = x; then
35442    # Short path failed, file does not exist as specified.
35443    # Try adding .exe or .cmd
35444    if test -f "${new_path}.exe"; then
35445      input_to_shortpath="${new_path}.exe"
35446    elif test -f "${new_path}.cmd"; then
35447      input_to_shortpath="${new_path}.cmd"
35448    else
35449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35450$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35451      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35452$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35453      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35454    fi
35455  else
35456    input_to_shortpath="$new_path"
35457  fi
35458
35459  # Call helper function which possibly converts this using DOS-style short mode.
35460  # If so, the updated path is stored in $new_path.
35461  new_path="$input_to_shortpath"
35462
35463  input_path="$input_to_shortpath"
35464  # Check if we need to convert this using DOS-style short mode. If the path
35465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35466  # take no chances and rewrite it.
35467  # Note: m4 eats our [], so we need to use [ and ] instead.
35468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35469  if test "x$has_forbidden_chars" != x; then
35470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35471    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35472    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35473    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35474      # Going to short mode and back again did indeed matter. Since short mode is
35475      # case insensitive, let's make it lowercase to improve readability.
35476      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35477      # Now convert it back to Unix-stile (cygpath)
35478      input_path=`$CYGPATH -u "$shortmode_path"`
35479      new_path="$input_path"
35480    fi
35481  fi
35482
35483  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35484  if test "x$test_cygdrive_prefix" = x; then
35485    # As a simple fix, exclude /usr/bin since it's not a real path.
35486    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35487      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35488      # a path prefixed by /cygdrive for fixpath to work.
35489      new_path="$CYGWIN_ROOT_PATH$input_path"
35490    fi
35491  fi
35492
35493  # remove trailing .exe if any
35494  new_path="${new_path/%.exe/}"
35495
35496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35497
35498  # First separate the path from the arguments. This will split at the first
35499  # space.
35500  complete="$STRIP"
35501  path="${complete%% *}"
35502  tmp="$complete EOL"
35503  arguments="${tmp#* }"
35504
35505  # Input might be given as Windows format, start by converting to
35506  # unix format.
35507  new_path="$path"
35508
35509  windows_path="$new_path"
35510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35511    unix_path=`$CYGPATH -u "$windows_path"`
35512    new_path="$unix_path"
35513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35515    new_path="$unix_path"
35516  fi
35517
35518
35519  # Now try to locate executable using which
35520  new_path=`$WHICH "$new_path" 2> /dev/null`
35521
35522  if test "x$new_path" = x; then
35523    # Oops. Which didn't find the executable.
35524    # The splitting of arguments from the executable at a space might have been incorrect,
35525    # since paths with space are more likely in Windows. Give it another try with the whole
35526    # argument.
35527    path="$complete"
35528    arguments="EOL"
35529    new_path="$path"
35530
35531  windows_path="$new_path"
35532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35533    unix_path=`$CYGPATH -u "$windows_path"`
35534    new_path="$unix_path"
35535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35537    new_path="$unix_path"
35538  fi
35539
35540
35541    new_path=`$WHICH "$new_path" 2> /dev/null`
35542    # bat and cmd files are not always considered executable in MSYS causing which
35543    # to not find them
35544    if test "x$new_path" = x \
35545        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35546        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35547      new_path="$path"
35548
35549  windows_path="$new_path"
35550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35551    unix_path=`$CYGPATH -u "$windows_path"`
35552    new_path="$unix_path"
35553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35555    new_path="$unix_path"
35556  fi
35557
35558    fi
35559
35560    if test "x$new_path" = x; then
35561      # It's still not found. Now this is an unrecoverable error.
35562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35563$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35564      has_space=`$ECHO "$complete" | $GREP " "`
35565      if test "x$has_space" != x; then
35566        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35567$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35568      fi
35569      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35570    fi
35571  fi
35572
35573  # Now new_path has a complete unix path to the binary
35574  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35575    # Keep paths in /bin as-is, but remove trailing .exe if any
35576    new_path="${new_path/%.exe/}"
35577    # Do not save /bin paths to all_fixpath_prefixes!
35578  else
35579    # Not in mixed or Windows style, start by that.
35580    new_path=`cmd //c echo $new_path`
35581
35582  input_path="$new_path"
35583  # Check if we need to convert this using DOS-style short mode. If the path
35584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35585  # take no chances and rewrite it.
35586  # Note: m4 eats our [], so we need to use [ and ] instead.
35587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35588  if test "x$has_forbidden_chars" != x; then
35589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35590    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35591  fi
35592
35593    # Output is in $new_path
35594
35595  windows_path="$new_path"
35596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35597    unix_path=`$CYGPATH -u "$windows_path"`
35598    new_path="$unix_path"
35599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35601    new_path="$unix_path"
35602  fi
35603
35604    # remove trailing .exe if any
35605    new_path="${new_path/%.exe/}"
35606
35607    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35608    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35609  fi
35610
35611  else
35612    # We're on a unix platform. Hooray! :)
35613    # First separate the path from the arguments. This will split at the first
35614    # space.
35615    complete="$STRIP"
35616    path="${complete%% *}"
35617    tmp="$complete EOL"
35618    arguments="${tmp#* }"
35619
35620    # Cannot rely on the command "which" here since it doesn't always work.
35621    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35622    if test -z "$is_absolute_path"; then
35623      # Path to executable is not absolute. Find it.
35624      IFS_save="$IFS"
35625      IFS=:
35626      for p in $PATH; do
35627        if test -f "$p/$path" && test -x "$p/$path"; then
35628          new_path="$p/$path"
35629          break
35630        fi
35631      done
35632      IFS="$IFS_save"
35633    else
35634      # This is an absolute path, we can use it without further modifications.
35635      new_path="$path"
35636    fi
35637
35638    if test "x$new_path" = x; then
35639      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35640$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35641      has_space=`$ECHO "$complete" | $GREP " "`
35642      if test "x$has_space" != x; then
35643        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35644$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35645      fi
35646      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35647    fi
35648  fi
35649
35650  # Now join together the path and the arguments once again
35651  if test "x$arguments" != xEOL; then
35652    new_complete="$new_path ${arguments% *}"
35653  else
35654    new_complete="$new_path"
35655  fi
35656
35657  if test "x$complete" != "x$new_complete"; then
35658    STRIP="$new_complete"
35659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35660$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35661  fi
35662
35663
35664
35665  # Publish this variable in the help.
35666
35667
35668  if test "x$NM" = x; then
35669    # The variable is not set by user, try to locate tool using the code snippet
35670    for ac_prog in nm
35671do
35672  # Extract the first word of "$ac_prog", so it can be a program name with args.
35673set dummy $ac_prog; ac_word=$2
35674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35675$as_echo_n "checking for $ac_word... " >&6; }
35676if ${ac_cv_path_NM+:} false; then :
35677  $as_echo_n "(cached) " >&6
35678else
35679  case $NM in
35680  [\\/]* | ?:[\\/]*)
35681  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35682  ;;
35683  *)
35684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35685for as_dir in $PATH
35686do
35687  IFS=$as_save_IFS
35688  test -z "$as_dir" && as_dir=.
35689    for ac_exec_ext in '' $ac_executable_extensions; do
35690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35691    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35693    break 2
35694  fi
35695done
35696  done
35697IFS=$as_save_IFS
35698
35699  ;;
35700esac
35701fi
35702NM=$ac_cv_path_NM
35703if test -n "$NM"; then
35704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35705$as_echo "$NM" >&6; }
35706else
35707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35708$as_echo "no" >&6; }
35709fi
35710
35711
35712  test -n "$NM" && break
35713done
35714
35715  else
35716    # The variable is set, but is it from the command line or the environment?
35717
35718    # Try to remove the string !NM! from our list.
35719    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35720    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35721      # If it failed, the variable was not from the command line. Ignore it,
35722      # but warn the user (except for BASH, which is always set by the calling BASH).
35723      if test "xNM" != xBASH; then
35724        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35725$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35726      fi
35727      # Try to locate tool using the code snippet
35728      for ac_prog in nm
35729do
35730  # Extract the first word of "$ac_prog", so it can be a program name with args.
35731set dummy $ac_prog; ac_word=$2
35732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35733$as_echo_n "checking for $ac_word... " >&6; }
35734if ${ac_cv_path_NM+:} false; then :
35735  $as_echo_n "(cached) " >&6
35736else
35737  case $NM in
35738  [\\/]* | ?:[\\/]*)
35739  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35740  ;;
35741  *)
35742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35743for as_dir in $PATH
35744do
35745  IFS=$as_save_IFS
35746  test -z "$as_dir" && as_dir=.
35747    for ac_exec_ext in '' $ac_executable_extensions; do
35748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35749    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35751    break 2
35752  fi
35753done
35754  done
35755IFS=$as_save_IFS
35756
35757  ;;
35758esac
35759fi
35760NM=$ac_cv_path_NM
35761if test -n "$NM"; then
35762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35763$as_echo "$NM" >&6; }
35764else
35765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35766$as_echo "no" >&6; }
35767fi
35768
35769
35770  test -n "$NM" && break
35771done
35772
35773    else
35774      # If it succeeded, then it was overridden by the user. We will use it
35775      # for the tool.
35776
35777      # First remove it from the list of overridden variables, so we can test
35778      # for unknown variables in the end.
35779      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35780
35781      # Check if the provided tool contains a complete path.
35782      tool_specified="$NM"
35783      tool_basename="${tool_specified##*/}"
35784      if test "x$tool_basename" = "x$tool_specified"; then
35785        # A command without a complete path is provided, search $PATH.
35786        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35787$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35788        # Extract the first word of "$tool_basename", so it can be a program name with args.
35789set dummy $tool_basename; ac_word=$2
35790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35791$as_echo_n "checking for $ac_word... " >&6; }
35792if ${ac_cv_path_NM+:} false; then :
35793  $as_echo_n "(cached) " >&6
35794else
35795  case $NM in
35796  [\\/]* | ?:[\\/]*)
35797  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35798  ;;
35799  *)
35800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35801for as_dir in $PATH
35802do
35803  IFS=$as_save_IFS
35804  test -z "$as_dir" && as_dir=.
35805    for ac_exec_ext in '' $ac_executable_extensions; do
35806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35807    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35809    break 2
35810  fi
35811done
35812  done
35813IFS=$as_save_IFS
35814
35815  ;;
35816esac
35817fi
35818NM=$ac_cv_path_NM
35819if test -n "$NM"; then
35820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35821$as_echo "$NM" >&6; }
35822else
35823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35824$as_echo "no" >&6; }
35825fi
35826
35827
35828        if test "x$NM" = x; then
35829          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35830        fi
35831      else
35832        # Otherwise we believe it is a complete path. Use it as it is.
35833        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35834$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35835        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35836$as_echo_n "checking for NM... " >&6; }
35837        if test ! -x "$tool_specified"; then
35838          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35839$as_echo "not found" >&6; }
35840          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35841        fi
35842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35843$as_echo "$tool_specified" >&6; }
35844      fi
35845    fi
35846  fi
35847
35848
35849
35850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35851
35852  # First separate the path from the arguments. This will split at the first
35853  # space.
35854  complete="$NM"
35855  path="${complete%% *}"
35856  tmp="$complete EOL"
35857  arguments="${tmp#* }"
35858
35859  # Input might be given as Windows format, start by converting to
35860  # unix format.
35861  new_path=`$CYGPATH -u "$path"`
35862
35863  # Now try to locate executable using which
35864  new_path=`$WHICH "$new_path" 2> /dev/null`
35865  # bat and cmd files are not always considered executable in cygwin causing which
35866  # to not find them
35867  if test "x$new_path" = x \
35868      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35869      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35870    new_path=`$CYGPATH -u "$path"`
35871  fi
35872  if test "x$new_path" = x; then
35873    # Oops. Which didn't find the executable.
35874    # The splitting of arguments from the executable at a space might have been incorrect,
35875    # since paths with space are more likely in Windows. Give it another try with the whole
35876    # argument.
35877    path="$complete"
35878    arguments="EOL"
35879    new_path=`$CYGPATH -u "$path"`
35880    new_path=`$WHICH "$new_path" 2> /dev/null`
35881    # bat and cmd files are not always considered executable in cygwin causing which
35882    # to not find them
35883    if test "x$new_path" = x \
35884        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35885        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35886      new_path=`$CYGPATH -u "$path"`
35887    fi
35888    if test "x$new_path" = x; then
35889      # It's still not found. Now this is an unrecoverable error.
35890      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35891$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35892      has_space=`$ECHO "$complete" | $GREP " "`
35893      if test "x$has_space" != x; then
35894        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35895$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35896      fi
35897      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35898    fi
35899  fi
35900
35901  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35902  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35903  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35904  # "foo.exe" is OK but "foo" is an error.
35905  #
35906  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35907  # It is also a way to make sure we got the proper file name for the real test later on.
35908  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35909  if test "x$test_shortpath" = x; then
35910    # Short path failed, file does not exist as specified.
35911    # Try adding .exe or .cmd
35912    if test -f "${new_path}.exe"; then
35913      input_to_shortpath="${new_path}.exe"
35914    elif test -f "${new_path}.cmd"; then
35915      input_to_shortpath="${new_path}.cmd"
35916    else
35917      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35918$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35919      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35920$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35921      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35922    fi
35923  else
35924    input_to_shortpath="$new_path"
35925  fi
35926
35927  # Call helper function which possibly converts this using DOS-style short mode.
35928  # If so, the updated path is stored in $new_path.
35929  new_path="$input_to_shortpath"
35930
35931  input_path="$input_to_shortpath"
35932  # Check if we need to convert this using DOS-style short mode. If the path
35933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35934  # take no chances and rewrite it.
35935  # Note: m4 eats our [], so we need to use [ and ] instead.
35936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35937  if test "x$has_forbidden_chars" != x; then
35938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35939    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35940    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35941    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35942      # Going to short mode and back again did indeed matter. Since short mode is
35943      # case insensitive, let's make it lowercase to improve readability.
35944      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35945      # Now convert it back to Unix-stile (cygpath)
35946      input_path=`$CYGPATH -u "$shortmode_path"`
35947      new_path="$input_path"
35948    fi
35949  fi
35950
35951  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35952  if test "x$test_cygdrive_prefix" = x; then
35953    # As a simple fix, exclude /usr/bin since it's not a real path.
35954    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35955      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35956      # a path prefixed by /cygdrive for fixpath to work.
35957      new_path="$CYGWIN_ROOT_PATH$input_path"
35958    fi
35959  fi
35960
35961  # remove trailing .exe if any
35962  new_path="${new_path/%.exe/}"
35963
35964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35965
35966  # First separate the path from the arguments. This will split at the first
35967  # space.
35968  complete="$NM"
35969  path="${complete%% *}"
35970  tmp="$complete EOL"
35971  arguments="${tmp#* }"
35972
35973  # Input might be given as Windows format, start by converting to
35974  # unix format.
35975  new_path="$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
35987  # Now try to locate executable using which
35988  new_path=`$WHICH "$new_path" 2> /dev/null`
35989
35990  if test "x$new_path" = x; then
35991    # Oops. Which didn't find the executable.
35992    # The splitting of arguments from the executable at a space might have been incorrect,
35993    # since paths with space are more likely in Windows. Give it another try with the whole
35994    # argument.
35995    path="$complete"
35996    arguments="EOL"
35997    new_path="$path"
35998
35999  windows_path="$new_path"
36000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36001    unix_path=`$CYGPATH -u "$windows_path"`
36002    new_path="$unix_path"
36003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36005    new_path="$unix_path"
36006  fi
36007
36008
36009    new_path=`$WHICH "$new_path" 2> /dev/null`
36010    # bat and cmd files are not always considered executable in MSYS causing which
36011    # to not find them
36012    if test "x$new_path" = x \
36013        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36014        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36015      new_path="$path"
36016
36017  windows_path="$new_path"
36018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36019    unix_path=`$CYGPATH -u "$windows_path"`
36020    new_path="$unix_path"
36021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36023    new_path="$unix_path"
36024  fi
36025
36026    fi
36027
36028    if test "x$new_path" = x; then
36029      # It's still not found. Now this is an unrecoverable error.
36030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36031$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36032      has_space=`$ECHO "$complete" | $GREP " "`
36033      if test "x$has_space" != x; then
36034        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36035$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36036      fi
36037      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36038    fi
36039  fi
36040
36041  # Now new_path has a complete unix path to the binary
36042  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36043    # Keep paths in /bin as-is, but remove trailing .exe if any
36044    new_path="${new_path/%.exe/}"
36045    # Do not save /bin paths to all_fixpath_prefixes!
36046  else
36047    # Not in mixed or Windows style, start by that.
36048    new_path=`cmd //c echo $new_path`
36049
36050  input_path="$new_path"
36051  # Check if we need to convert this using DOS-style short mode. If the path
36052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36053  # take no chances and rewrite it.
36054  # Note: m4 eats our [], so we need to use [ and ] instead.
36055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36056  if test "x$has_forbidden_chars" != x; then
36057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36058    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36059  fi
36060
36061    # Output is in $new_path
36062
36063  windows_path="$new_path"
36064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36065    unix_path=`$CYGPATH -u "$windows_path"`
36066    new_path="$unix_path"
36067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36069    new_path="$unix_path"
36070  fi
36071
36072    # remove trailing .exe if any
36073    new_path="${new_path/%.exe/}"
36074
36075    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36076    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36077  fi
36078
36079  else
36080    # We're on a unix platform. Hooray! :)
36081    # First separate the path from the arguments. This will split at the first
36082    # space.
36083    complete="$NM"
36084    path="${complete%% *}"
36085    tmp="$complete EOL"
36086    arguments="${tmp#* }"
36087
36088    # Cannot rely on the command "which" here since it doesn't always work.
36089    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36090    if test -z "$is_absolute_path"; then
36091      # Path to executable is not absolute. Find it.
36092      IFS_save="$IFS"
36093      IFS=:
36094      for p in $PATH; do
36095        if test -f "$p/$path" && test -x "$p/$path"; then
36096          new_path="$p/$path"
36097          break
36098        fi
36099      done
36100      IFS="$IFS_save"
36101    else
36102      # This is an absolute path, we can use it without further modifications.
36103      new_path="$path"
36104    fi
36105
36106    if test "x$new_path" = x; then
36107      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36108$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36109      has_space=`$ECHO "$complete" | $GREP " "`
36110      if test "x$has_space" != x; then
36111        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36112$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36113      fi
36114      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36115    fi
36116  fi
36117
36118  # Now join together the path and the arguments once again
36119  if test "x$arguments" != xEOL; then
36120    new_complete="$new_path ${arguments% *}"
36121  else
36122    new_complete="$new_path"
36123  fi
36124
36125  if test "x$complete" != "x$new_complete"; then
36126    NM="$new_complete"
36127    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36128$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36129  fi
36130
36131
36132
36133  # Publish this variable in the help.
36134
36135
36136  if test "x$GNM" = x; then
36137    # The variable is not set by user, try to locate tool using the code snippet
36138    for ac_prog in gnm
36139do
36140  # Extract the first word of "$ac_prog", so it can be a program name with args.
36141set dummy $ac_prog; ac_word=$2
36142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36143$as_echo_n "checking for $ac_word... " >&6; }
36144if ${ac_cv_path_GNM+:} false; then :
36145  $as_echo_n "(cached) " >&6
36146else
36147  case $GNM in
36148  [\\/]* | ?:[\\/]*)
36149  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36150  ;;
36151  *)
36152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36153for as_dir in $PATH
36154do
36155  IFS=$as_save_IFS
36156  test -z "$as_dir" && as_dir=.
36157    for ac_exec_ext in '' $ac_executable_extensions; do
36158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36159    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36161    break 2
36162  fi
36163done
36164  done
36165IFS=$as_save_IFS
36166
36167  ;;
36168esac
36169fi
36170GNM=$ac_cv_path_GNM
36171if test -n "$GNM"; then
36172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36173$as_echo "$GNM" >&6; }
36174else
36175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36176$as_echo "no" >&6; }
36177fi
36178
36179
36180  test -n "$GNM" && break
36181done
36182
36183  else
36184    # The variable is set, but is it from the command line or the environment?
36185
36186    # Try to remove the string !GNM! from our list.
36187    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36188    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36189      # If it failed, the variable was not from the command line. Ignore it,
36190      # but warn the user (except for BASH, which is always set by the calling BASH).
36191      if test "xGNM" != xBASH; then
36192        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36193$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36194      fi
36195      # Try to locate tool using the code snippet
36196      for ac_prog in gnm
36197do
36198  # Extract the first word of "$ac_prog", so it can be a program name with args.
36199set dummy $ac_prog; ac_word=$2
36200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36201$as_echo_n "checking for $ac_word... " >&6; }
36202if ${ac_cv_path_GNM+:} false; then :
36203  $as_echo_n "(cached) " >&6
36204else
36205  case $GNM in
36206  [\\/]* | ?:[\\/]*)
36207  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36208  ;;
36209  *)
36210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36211for as_dir in $PATH
36212do
36213  IFS=$as_save_IFS
36214  test -z "$as_dir" && as_dir=.
36215    for ac_exec_ext in '' $ac_executable_extensions; do
36216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36217    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36219    break 2
36220  fi
36221done
36222  done
36223IFS=$as_save_IFS
36224
36225  ;;
36226esac
36227fi
36228GNM=$ac_cv_path_GNM
36229if test -n "$GNM"; then
36230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36231$as_echo "$GNM" >&6; }
36232else
36233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36234$as_echo "no" >&6; }
36235fi
36236
36237
36238  test -n "$GNM" && break
36239done
36240
36241    else
36242      # If it succeeded, then it was overridden by the user. We will use it
36243      # for the tool.
36244
36245      # First remove it from the list of overridden variables, so we can test
36246      # for unknown variables in the end.
36247      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36248
36249      # Check if the provided tool contains a complete path.
36250      tool_specified="$GNM"
36251      tool_basename="${tool_specified##*/}"
36252      if test "x$tool_basename" = "x$tool_specified"; then
36253        # A command without a complete path is provided, search $PATH.
36254        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36255$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36256        # Extract the first word of "$tool_basename", so it can be a program name with args.
36257set dummy $tool_basename; ac_word=$2
36258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36259$as_echo_n "checking for $ac_word... " >&6; }
36260if ${ac_cv_path_GNM+:} false; then :
36261  $as_echo_n "(cached) " >&6
36262else
36263  case $GNM in
36264  [\\/]* | ?:[\\/]*)
36265  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36266  ;;
36267  *)
36268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36269for as_dir in $PATH
36270do
36271  IFS=$as_save_IFS
36272  test -z "$as_dir" && as_dir=.
36273    for ac_exec_ext in '' $ac_executable_extensions; do
36274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36275    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36277    break 2
36278  fi
36279done
36280  done
36281IFS=$as_save_IFS
36282
36283  ;;
36284esac
36285fi
36286GNM=$ac_cv_path_GNM
36287if test -n "$GNM"; then
36288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36289$as_echo "$GNM" >&6; }
36290else
36291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36292$as_echo "no" >&6; }
36293fi
36294
36295
36296        if test "x$GNM" = x; then
36297          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36298        fi
36299      else
36300        # Otherwise we believe it is a complete path. Use it as it is.
36301        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36302$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36303        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36304$as_echo_n "checking for GNM... " >&6; }
36305        if test ! -x "$tool_specified"; then
36306          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36307$as_echo "not found" >&6; }
36308          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36309        fi
36310        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36311$as_echo "$tool_specified" >&6; }
36312      fi
36313    fi
36314  fi
36315
36316
36317
36318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36319
36320  # First separate the path from the arguments. This will split at the first
36321  # space.
36322  complete="$GNM"
36323  path="${complete%% *}"
36324  tmp="$complete EOL"
36325  arguments="${tmp#* }"
36326
36327  # Input might be given as Windows format, start by converting to
36328  # unix format.
36329  new_path=`$CYGPATH -u "$path"`
36330
36331  # Now try to locate executable using which
36332  new_path=`$WHICH "$new_path" 2> /dev/null`
36333  # bat and cmd files are not always considered executable in cygwin causing which
36334  # to not find them
36335  if test "x$new_path" = x \
36336      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36337      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36338    new_path=`$CYGPATH -u "$path"`
36339  fi
36340  if test "x$new_path" = x; then
36341    # Oops. Which didn't find the executable.
36342    # The splitting of arguments from the executable at a space might have been incorrect,
36343    # since paths with space are more likely in Windows. Give it another try with the whole
36344    # argument.
36345    path="$complete"
36346    arguments="EOL"
36347    new_path=`$CYGPATH -u "$path"`
36348    new_path=`$WHICH "$new_path" 2> /dev/null`
36349    # bat and cmd files are not always considered executable in cygwin causing which
36350    # to not find them
36351    if test "x$new_path" = x \
36352        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36353        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36354      new_path=`$CYGPATH -u "$path"`
36355    fi
36356    if test "x$new_path" = x; then
36357      # It's still not found. Now this is an unrecoverable error.
36358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36359$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36360      has_space=`$ECHO "$complete" | $GREP " "`
36361      if test "x$has_space" != x; then
36362        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36363$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36364      fi
36365      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36366    fi
36367  fi
36368
36369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36372  # "foo.exe" is OK but "foo" is an error.
36373  #
36374  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36375  # It is also a way to make sure we got the proper file name for the real test later on.
36376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36377  if test "x$test_shortpath" = x; then
36378    # Short path failed, file does not exist as specified.
36379    # Try adding .exe or .cmd
36380    if test -f "${new_path}.exe"; then
36381      input_to_shortpath="${new_path}.exe"
36382    elif test -f "${new_path}.cmd"; then
36383      input_to_shortpath="${new_path}.cmd"
36384    else
36385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36386$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36387      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36388$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36389      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36390    fi
36391  else
36392    input_to_shortpath="$new_path"
36393  fi
36394
36395  # Call helper function which possibly converts this using DOS-style short mode.
36396  # If so, the updated path is stored in $new_path.
36397  new_path="$input_to_shortpath"
36398
36399  input_path="$input_to_shortpath"
36400  # Check if we need to convert this using DOS-style short mode. If the path
36401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36402  # take no chances and rewrite it.
36403  # Note: m4 eats our [], so we need to use [ and ] instead.
36404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36405  if test "x$has_forbidden_chars" != x; then
36406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36410      # Going to short mode and back again did indeed matter. Since short mode is
36411      # case insensitive, let's make it lowercase to improve readability.
36412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36413      # Now convert it back to Unix-stile (cygpath)
36414      input_path=`$CYGPATH -u "$shortmode_path"`
36415      new_path="$input_path"
36416    fi
36417  fi
36418
36419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36420  if test "x$test_cygdrive_prefix" = x; then
36421    # As a simple fix, exclude /usr/bin since it's not a real path.
36422    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36424      # a path prefixed by /cygdrive for fixpath to work.
36425      new_path="$CYGWIN_ROOT_PATH$input_path"
36426    fi
36427  fi
36428
36429  # remove trailing .exe if any
36430  new_path="${new_path/%.exe/}"
36431
36432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36433
36434  # First separate the path from the arguments. This will split at the first
36435  # space.
36436  complete="$GNM"
36437  path="${complete%% *}"
36438  tmp="$complete EOL"
36439  arguments="${tmp#* }"
36440
36441  # Input might be given as Windows format, start by converting to
36442  # unix format.
36443  new_path="$path"
36444
36445  windows_path="$new_path"
36446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36447    unix_path=`$CYGPATH -u "$windows_path"`
36448    new_path="$unix_path"
36449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36451    new_path="$unix_path"
36452  fi
36453
36454
36455  # Now try to locate executable using which
36456  new_path=`$WHICH "$new_path" 2> /dev/null`
36457
36458  if test "x$new_path" = x; then
36459    # Oops. Which didn't find the executable.
36460    # The splitting of arguments from the executable at a space might have been incorrect,
36461    # since paths with space are more likely in Windows. Give it another try with the whole
36462    # argument.
36463    path="$complete"
36464    arguments="EOL"
36465    new_path="$path"
36466
36467  windows_path="$new_path"
36468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36469    unix_path=`$CYGPATH -u "$windows_path"`
36470    new_path="$unix_path"
36471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36473    new_path="$unix_path"
36474  fi
36475
36476
36477    new_path=`$WHICH "$new_path" 2> /dev/null`
36478    # bat and cmd files are not always considered executable in MSYS causing which
36479    # to not find them
36480    if test "x$new_path" = x \
36481        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36482        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36483      new_path="$path"
36484
36485  windows_path="$new_path"
36486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36487    unix_path=`$CYGPATH -u "$windows_path"`
36488    new_path="$unix_path"
36489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36491    new_path="$unix_path"
36492  fi
36493
36494    fi
36495
36496    if test "x$new_path" = x; then
36497      # It's still not found. Now this is an unrecoverable error.
36498      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36499$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36500      has_space=`$ECHO "$complete" | $GREP " "`
36501      if test "x$has_space" != x; then
36502        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36503$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36504      fi
36505      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36506    fi
36507  fi
36508
36509  # Now new_path has a complete unix path to the binary
36510  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36511    # Keep paths in /bin as-is, but remove trailing .exe if any
36512    new_path="${new_path/%.exe/}"
36513    # Do not save /bin paths to all_fixpath_prefixes!
36514  else
36515    # Not in mixed or Windows style, start by that.
36516    new_path=`cmd //c echo $new_path`
36517
36518  input_path="$new_path"
36519  # Check if we need to convert this using DOS-style short mode. If the path
36520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36521  # take no chances and rewrite it.
36522  # Note: m4 eats our [], so we need to use [ and ] instead.
36523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36524  if test "x$has_forbidden_chars" != x; then
36525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36526    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36527  fi
36528
36529    # Output is in $new_path
36530
36531  windows_path="$new_path"
36532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36533    unix_path=`$CYGPATH -u "$windows_path"`
36534    new_path="$unix_path"
36535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36537    new_path="$unix_path"
36538  fi
36539
36540    # remove trailing .exe if any
36541    new_path="${new_path/%.exe/}"
36542
36543    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36544    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36545  fi
36546
36547  else
36548    # We're on a unix platform. Hooray! :)
36549    # First separate the path from the arguments. This will split at the first
36550    # space.
36551    complete="$GNM"
36552    path="${complete%% *}"
36553    tmp="$complete EOL"
36554    arguments="${tmp#* }"
36555
36556    # Cannot rely on the command "which" here since it doesn't always work.
36557    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36558    if test -z "$is_absolute_path"; then
36559      # Path to executable is not absolute. Find it.
36560      IFS_save="$IFS"
36561      IFS=:
36562      for p in $PATH; do
36563        if test -f "$p/$path" && test -x "$p/$path"; then
36564          new_path="$p/$path"
36565          break
36566        fi
36567      done
36568      IFS="$IFS_save"
36569    else
36570      # This is an absolute path, we can use it without further modifications.
36571      new_path="$path"
36572    fi
36573
36574    if test "x$new_path" = x; then
36575      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36576$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36577      has_space=`$ECHO "$complete" | $GREP " "`
36578      if test "x$has_space" != x; then
36579        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36580$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36581      fi
36582      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36583    fi
36584  fi
36585
36586  # Now join together the path and the arguments once again
36587  if test "x$arguments" != xEOL; then
36588    new_complete="$new_path ${arguments% *}"
36589  else
36590    new_complete="$new_path"
36591  fi
36592
36593  if test "x$complete" != "x$new_complete"; then
36594    GNM="$new_complete"
36595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36596$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36597  fi
36598
36599
36600
36601
36602  # Publish this variable in the help.
36603
36604
36605  if test "x$MCS" = x; then
36606    # The variable is not set by user, try to locate tool using the code snippet
36607    for ac_prog in mcs
36608do
36609  # Extract the first word of "$ac_prog", so it can be a program name with args.
36610set dummy $ac_prog; ac_word=$2
36611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36612$as_echo_n "checking for $ac_word... " >&6; }
36613if ${ac_cv_path_MCS+:} false; then :
36614  $as_echo_n "(cached) " >&6
36615else
36616  case $MCS in
36617  [\\/]* | ?:[\\/]*)
36618  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36619  ;;
36620  *)
36621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36622for as_dir in $PATH
36623do
36624  IFS=$as_save_IFS
36625  test -z "$as_dir" && as_dir=.
36626    for ac_exec_ext in '' $ac_executable_extensions; do
36627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36628    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36630    break 2
36631  fi
36632done
36633  done
36634IFS=$as_save_IFS
36635
36636  ;;
36637esac
36638fi
36639MCS=$ac_cv_path_MCS
36640if test -n "$MCS"; then
36641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36642$as_echo "$MCS" >&6; }
36643else
36644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36645$as_echo "no" >&6; }
36646fi
36647
36648
36649  test -n "$MCS" && break
36650done
36651
36652  else
36653    # The variable is set, but is it from the command line or the environment?
36654
36655    # Try to remove the string !MCS! from our list.
36656    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36657    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36658      # If it failed, the variable was not from the command line. Ignore it,
36659      # but warn the user (except for BASH, which is always set by the calling BASH).
36660      if test "xMCS" != xBASH; then
36661        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36662$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36663      fi
36664      # Try to locate tool using the code snippet
36665      for ac_prog in mcs
36666do
36667  # Extract the first word of "$ac_prog", so it can be a program name with args.
36668set dummy $ac_prog; ac_word=$2
36669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36670$as_echo_n "checking for $ac_word... " >&6; }
36671if ${ac_cv_path_MCS+:} false; then :
36672  $as_echo_n "(cached) " >&6
36673else
36674  case $MCS in
36675  [\\/]* | ?:[\\/]*)
36676  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36677  ;;
36678  *)
36679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36680for as_dir in $PATH
36681do
36682  IFS=$as_save_IFS
36683  test -z "$as_dir" && as_dir=.
36684    for ac_exec_ext in '' $ac_executable_extensions; do
36685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36686    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36688    break 2
36689  fi
36690done
36691  done
36692IFS=$as_save_IFS
36693
36694  ;;
36695esac
36696fi
36697MCS=$ac_cv_path_MCS
36698if test -n "$MCS"; then
36699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36700$as_echo "$MCS" >&6; }
36701else
36702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36703$as_echo "no" >&6; }
36704fi
36705
36706
36707  test -n "$MCS" && break
36708done
36709
36710    else
36711      # If it succeeded, then it was overridden by the user. We will use it
36712      # for the tool.
36713
36714      # First remove it from the list of overridden variables, so we can test
36715      # for unknown variables in the end.
36716      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36717
36718      # Check if the provided tool contains a complete path.
36719      tool_specified="$MCS"
36720      tool_basename="${tool_specified##*/}"
36721      if test "x$tool_basename" = "x$tool_specified"; then
36722        # A command without a complete path is provided, search $PATH.
36723        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36724$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36725        # Extract the first word of "$tool_basename", so it can be a program name with args.
36726set dummy $tool_basename; ac_word=$2
36727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36728$as_echo_n "checking for $ac_word... " >&6; }
36729if ${ac_cv_path_MCS+:} false; then :
36730  $as_echo_n "(cached) " >&6
36731else
36732  case $MCS in
36733  [\\/]* | ?:[\\/]*)
36734  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36735  ;;
36736  *)
36737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36738for as_dir in $PATH
36739do
36740  IFS=$as_save_IFS
36741  test -z "$as_dir" && as_dir=.
36742    for ac_exec_ext in '' $ac_executable_extensions; do
36743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36744    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36746    break 2
36747  fi
36748done
36749  done
36750IFS=$as_save_IFS
36751
36752  ;;
36753esac
36754fi
36755MCS=$ac_cv_path_MCS
36756if test -n "$MCS"; then
36757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36758$as_echo "$MCS" >&6; }
36759else
36760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36761$as_echo "no" >&6; }
36762fi
36763
36764
36765        if test "x$MCS" = x; then
36766          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36767        fi
36768      else
36769        # Otherwise we believe it is a complete path. Use it as it is.
36770        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36771$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36772        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36773$as_echo_n "checking for MCS... " >&6; }
36774        if test ! -x "$tool_specified"; then
36775          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36776$as_echo "not found" >&6; }
36777          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36778        fi
36779        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36780$as_echo "$tool_specified" >&6; }
36781      fi
36782    fi
36783  fi
36784
36785
36786
36787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36788
36789  # First separate the path from the arguments. This will split at the first
36790  # space.
36791  complete="$MCS"
36792  path="${complete%% *}"
36793  tmp="$complete EOL"
36794  arguments="${tmp#* }"
36795
36796  # Input might be given as Windows format, start by converting to
36797  # unix format.
36798  new_path=`$CYGPATH -u "$path"`
36799
36800  # Now try to locate executable using which
36801  new_path=`$WHICH "$new_path" 2> /dev/null`
36802  # bat and cmd files are not always considered executable in cygwin causing which
36803  # to not find them
36804  if test "x$new_path" = x \
36805      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36806      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36807    new_path=`$CYGPATH -u "$path"`
36808  fi
36809  if test "x$new_path" = x; then
36810    # Oops. Which didn't find the executable.
36811    # The splitting of arguments from the executable at a space might have been incorrect,
36812    # since paths with space are more likely in Windows. Give it another try with the whole
36813    # argument.
36814    path="$complete"
36815    arguments="EOL"
36816    new_path=`$CYGPATH -u "$path"`
36817    new_path=`$WHICH "$new_path" 2> /dev/null`
36818    # bat and cmd files are not always considered executable in cygwin causing which
36819    # to not find them
36820    if test "x$new_path" = x \
36821        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36822        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36823      new_path=`$CYGPATH -u "$path"`
36824    fi
36825    if test "x$new_path" = x; then
36826      # It's still not found. Now this is an unrecoverable error.
36827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36828$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36829      has_space=`$ECHO "$complete" | $GREP " "`
36830      if test "x$has_space" != x; then
36831        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36832$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36833      fi
36834      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36835    fi
36836  fi
36837
36838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36841  # "foo.exe" is OK but "foo" is an error.
36842  #
36843  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36844  # It is also a way to make sure we got the proper file name for the real test later on.
36845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36846  if test "x$test_shortpath" = x; then
36847    # Short path failed, file does not exist as specified.
36848    # Try adding .exe or .cmd
36849    if test -f "${new_path}.exe"; then
36850      input_to_shortpath="${new_path}.exe"
36851    elif test -f "${new_path}.cmd"; then
36852      input_to_shortpath="${new_path}.cmd"
36853    else
36854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36855$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36856      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36857$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36858      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36859    fi
36860  else
36861    input_to_shortpath="$new_path"
36862  fi
36863
36864  # Call helper function which possibly converts this using DOS-style short mode.
36865  # If so, the updated path is stored in $new_path.
36866  new_path="$input_to_shortpath"
36867
36868  input_path="$input_to_shortpath"
36869  # Check if we need to convert this using DOS-style short mode. If the path
36870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36871  # take no chances and rewrite it.
36872  # Note: m4 eats our [], so we need to use [ and ] instead.
36873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36874  if test "x$has_forbidden_chars" != x; then
36875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36876    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36877    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36878    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36879      # Going to short mode and back again did indeed matter. Since short mode is
36880      # case insensitive, let's make it lowercase to improve readability.
36881      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36882      # Now convert it back to Unix-stile (cygpath)
36883      input_path=`$CYGPATH -u "$shortmode_path"`
36884      new_path="$input_path"
36885    fi
36886  fi
36887
36888  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36889  if test "x$test_cygdrive_prefix" = x; then
36890    # As a simple fix, exclude /usr/bin since it's not a real path.
36891    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36892      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36893      # a path prefixed by /cygdrive for fixpath to work.
36894      new_path="$CYGWIN_ROOT_PATH$input_path"
36895    fi
36896  fi
36897
36898  # remove trailing .exe if any
36899  new_path="${new_path/%.exe/}"
36900
36901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36902
36903  # First separate the path from the arguments. This will split at the first
36904  # space.
36905  complete="$MCS"
36906  path="${complete%% *}"
36907  tmp="$complete EOL"
36908  arguments="${tmp#* }"
36909
36910  # Input might be given as Windows format, start by converting to
36911  # unix format.
36912  new_path="$path"
36913
36914  windows_path="$new_path"
36915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36916    unix_path=`$CYGPATH -u "$windows_path"`
36917    new_path="$unix_path"
36918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36920    new_path="$unix_path"
36921  fi
36922
36923
36924  # Now try to locate executable using which
36925  new_path=`$WHICH "$new_path" 2> /dev/null`
36926
36927  if test "x$new_path" = x; then
36928    # Oops. Which didn't find the executable.
36929    # The splitting of arguments from the executable at a space might have been incorrect,
36930    # since paths with space are more likely in Windows. Give it another try with the whole
36931    # argument.
36932    path="$complete"
36933    arguments="EOL"
36934    new_path="$path"
36935
36936  windows_path="$new_path"
36937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36938    unix_path=`$CYGPATH -u "$windows_path"`
36939    new_path="$unix_path"
36940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36942    new_path="$unix_path"
36943  fi
36944
36945
36946    new_path=`$WHICH "$new_path" 2> /dev/null`
36947    # bat and cmd files are not always considered executable in MSYS causing which
36948    # to not find them
36949    if test "x$new_path" = x \
36950        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36951        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36952      new_path="$path"
36953
36954  windows_path="$new_path"
36955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36956    unix_path=`$CYGPATH -u "$windows_path"`
36957    new_path="$unix_path"
36958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36960    new_path="$unix_path"
36961  fi
36962
36963    fi
36964
36965    if test "x$new_path" = x; then
36966      # It's still not found. Now this is an unrecoverable error.
36967      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36968$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36969      has_space=`$ECHO "$complete" | $GREP " "`
36970      if test "x$has_space" != x; then
36971        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36972$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36973      fi
36974      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36975    fi
36976  fi
36977
36978  # Now new_path has a complete unix path to the binary
36979  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36980    # Keep paths in /bin as-is, but remove trailing .exe if any
36981    new_path="${new_path/%.exe/}"
36982    # Do not save /bin paths to all_fixpath_prefixes!
36983  else
36984    # Not in mixed or Windows style, start by that.
36985    new_path=`cmd //c echo $new_path`
36986
36987  input_path="$new_path"
36988  # Check if we need to convert this using DOS-style short mode. If the path
36989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36990  # take no chances and rewrite it.
36991  # Note: m4 eats our [], so we need to use [ and ] instead.
36992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36993  if test "x$has_forbidden_chars" != x; then
36994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36996  fi
36997
36998    # Output is in $new_path
36999
37000  windows_path="$new_path"
37001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37002    unix_path=`$CYGPATH -u "$windows_path"`
37003    new_path="$unix_path"
37004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37006    new_path="$unix_path"
37007  fi
37008
37009    # remove trailing .exe if any
37010    new_path="${new_path/%.exe/}"
37011
37012    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37013    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37014  fi
37015
37016  else
37017    # We're on a unix platform. Hooray! :)
37018    # First separate the path from the arguments. This will split at the first
37019    # space.
37020    complete="$MCS"
37021    path="${complete%% *}"
37022    tmp="$complete EOL"
37023    arguments="${tmp#* }"
37024
37025    # Cannot rely on the command "which" here since it doesn't always work.
37026    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37027    if test -z "$is_absolute_path"; then
37028      # Path to executable is not absolute. Find it.
37029      IFS_save="$IFS"
37030      IFS=:
37031      for p in $PATH; do
37032        if test -f "$p/$path" && test -x "$p/$path"; then
37033          new_path="$p/$path"
37034          break
37035        fi
37036      done
37037      IFS="$IFS_save"
37038    else
37039      # This is an absolute path, we can use it without further modifications.
37040      new_path="$path"
37041    fi
37042
37043    if test "x$new_path" = x; then
37044      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37045$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37046      has_space=`$ECHO "$complete" | $GREP " "`
37047      if test "x$has_space" != x; then
37048        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37049$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37050      fi
37051      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37052    fi
37053  fi
37054
37055  # Now join together the path and the arguments once again
37056  if test "x$arguments" != xEOL; then
37057    new_complete="$new_path ${arguments% *}"
37058  else
37059    new_complete="$new_path"
37060  fi
37061
37062  if test "x$complete" != "x$new_complete"; then
37063    MCS="$new_complete"
37064    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
37065$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
37066  fi
37067
37068  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
37069    # FIXME: we should unify this with the solaris case above.
37070
37071
37072  # Publish this variable in the help.
37073
37074
37075  if test "x$STRIP" = x; then
37076    # The variable is not set by user, try to locate tool using the code snippet
37077    if test -n "$ac_tool_prefix"; then
37078  for ac_prog in strip
37079  do
37080    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37081set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37083$as_echo_n "checking for $ac_word... " >&6; }
37084if ${ac_cv_prog_STRIP+:} false; then :
37085  $as_echo_n "(cached) " >&6
37086else
37087  if test -n "$STRIP"; then
37088  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37089else
37090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37091for as_dir in $PATH
37092do
37093  IFS=$as_save_IFS
37094  test -z "$as_dir" && as_dir=.
37095    for ac_exec_ext in '' $ac_executable_extensions; do
37096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37097    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37099    break 2
37100  fi
37101done
37102  done
37103IFS=$as_save_IFS
37104
37105fi
37106fi
37107STRIP=$ac_cv_prog_STRIP
37108if test -n "$STRIP"; then
37109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37110$as_echo "$STRIP" >&6; }
37111else
37112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37113$as_echo "no" >&6; }
37114fi
37115
37116
37117    test -n "$STRIP" && break
37118  done
37119fi
37120if test -z "$STRIP"; then
37121  ac_ct_STRIP=$STRIP
37122  for ac_prog in strip
37123do
37124  # Extract the first word of "$ac_prog", so it can be a program name with args.
37125set dummy $ac_prog; ac_word=$2
37126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37127$as_echo_n "checking for $ac_word... " >&6; }
37128if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37129  $as_echo_n "(cached) " >&6
37130else
37131  if test -n "$ac_ct_STRIP"; then
37132  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37133else
37134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37135for as_dir in $PATH
37136do
37137  IFS=$as_save_IFS
37138  test -z "$as_dir" && as_dir=.
37139    for ac_exec_ext in '' $ac_executable_extensions; do
37140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37141    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37143    break 2
37144  fi
37145done
37146  done
37147IFS=$as_save_IFS
37148
37149fi
37150fi
37151ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37152if test -n "$ac_ct_STRIP"; then
37153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37154$as_echo "$ac_ct_STRIP" >&6; }
37155else
37156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37157$as_echo "no" >&6; }
37158fi
37159
37160
37161  test -n "$ac_ct_STRIP" && break
37162done
37163
37164  if test "x$ac_ct_STRIP" = x; then
37165    STRIP=""
37166  else
37167    case $cross_compiling:$ac_tool_warned in
37168yes:)
37169{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37170$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37171ac_tool_warned=yes ;;
37172esac
37173    STRIP=$ac_ct_STRIP
37174  fi
37175fi
37176
37177  else
37178    # The variable is set, but is it from the command line or the environment?
37179
37180    # Try to remove the string !STRIP! from our list.
37181    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37182    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37183      # If it failed, the variable was not from the command line. Ignore it,
37184      # but warn the user (except for BASH, which is always set by the calling BASH).
37185      if test "xSTRIP" != xBASH; then
37186        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37187$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37188      fi
37189      # Try to locate tool using the code snippet
37190      if test -n "$ac_tool_prefix"; then
37191  for ac_prog in strip
37192  do
37193    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37194set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37196$as_echo_n "checking for $ac_word... " >&6; }
37197if ${ac_cv_prog_STRIP+:} false; then :
37198  $as_echo_n "(cached) " >&6
37199else
37200  if test -n "$STRIP"; then
37201  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37202else
37203as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37204for as_dir in $PATH
37205do
37206  IFS=$as_save_IFS
37207  test -z "$as_dir" && as_dir=.
37208    for ac_exec_ext in '' $ac_executable_extensions; do
37209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37210    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37212    break 2
37213  fi
37214done
37215  done
37216IFS=$as_save_IFS
37217
37218fi
37219fi
37220STRIP=$ac_cv_prog_STRIP
37221if test -n "$STRIP"; then
37222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37223$as_echo "$STRIP" >&6; }
37224else
37225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37226$as_echo "no" >&6; }
37227fi
37228
37229
37230    test -n "$STRIP" && break
37231  done
37232fi
37233if test -z "$STRIP"; then
37234  ac_ct_STRIP=$STRIP
37235  for ac_prog in strip
37236do
37237  # Extract the first word of "$ac_prog", so it can be a program name with args.
37238set dummy $ac_prog; ac_word=$2
37239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37240$as_echo_n "checking for $ac_word... " >&6; }
37241if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37242  $as_echo_n "(cached) " >&6
37243else
37244  if test -n "$ac_ct_STRIP"; then
37245  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37246else
37247as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37248for as_dir in $PATH
37249do
37250  IFS=$as_save_IFS
37251  test -z "$as_dir" && as_dir=.
37252    for ac_exec_ext in '' $ac_executable_extensions; do
37253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37254    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37256    break 2
37257  fi
37258done
37259  done
37260IFS=$as_save_IFS
37261
37262fi
37263fi
37264ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37265if test -n "$ac_ct_STRIP"; then
37266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37267$as_echo "$ac_ct_STRIP" >&6; }
37268else
37269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37270$as_echo "no" >&6; }
37271fi
37272
37273
37274  test -n "$ac_ct_STRIP" && break
37275done
37276
37277  if test "x$ac_ct_STRIP" = x; then
37278    STRIP=""
37279  else
37280    case $cross_compiling:$ac_tool_warned in
37281yes:)
37282{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37283$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37284ac_tool_warned=yes ;;
37285esac
37286    STRIP=$ac_ct_STRIP
37287  fi
37288fi
37289
37290    else
37291      # If it succeeded, then it was overridden by the user. We will use it
37292      # for the tool.
37293
37294      # First remove it from the list of overridden variables, so we can test
37295      # for unknown variables in the end.
37296      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37297
37298      # Check if the provided tool contains a complete path.
37299      tool_specified="$STRIP"
37300      tool_basename="${tool_specified##*/}"
37301      if test "x$tool_basename" = "x$tool_specified"; then
37302        # A command without a complete path is provided, search $PATH.
37303        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37304$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37305        # Extract the first word of "$tool_basename", so it can be a program name with args.
37306set dummy $tool_basename; ac_word=$2
37307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37308$as_echo_n "checking for $ac_word... " >&6; }
37309if ${ac_cv_path_STRIP+:} false; then :
37310  $as_echo_n "(cached) " >&6
37311else
37312  case $STRIP in
37313  [\\/]* | ?:[\\/]*)
37314  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37315  ;;
37316  *)
37317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37318for as_dir in $PATH
37319do
37320  IFS=$as_save_IFS
37321  test -z "$as_dir" && as_dir=.
37322    for ac_exec_ext in '' $ac_executable_extensions; do
37323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37324    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37326    break 2
37327  fi
37328done
37329  done
37330IFS=$as_save_IFS
37331
37332  ;;
37333esac
37334fi
37335STRIP=$ac_cv_path_STRIP
37336if test -n "$STRIP"; then
37337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37338$as_echo "$STRIP" >&6; }
37339else
37340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37341$as_echo "no" >&6; }
37342fi
37343
37344
37345        if test "x$STRIP" = x; then
37346          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37347        fi
37348      else
37349        # Otherwise we believe it is a complete path. Use it as it is.
37350        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37351$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37352        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37353$as_echo_n "checking for STRIP... " >&6; }
37354        if test ! -x "$tool_specified"; then
37355          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37356$as_echo "not found" >&6; }
37357          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37358        fi
37359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37360$as_echo "$tool_specified" >&6; }
37361      fi
37362    fi
37363  fi
37364
37365
37366
37367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37368
37369  # First separate the path from the arguments. This will split at the first
37370  # space.
37371  complete="$STRIP"
37372  path="${complete%% *}"
37373  tmp="$complete EOL"
37374  arguments="${tmp#* }"
37375
37376  # Input might be given as Windows format, start by converting to
37377  # unix format.
37378  new_path=`$CYGPATH -u "$path"`
37379
37380  # Now try to locate executable using which
37381  new_path=`$WHICH "$new_path" 2> /dev/null`
37382  # bat and cmd files are not always considered executable in cygwin causing which
37383  # to not find them
37384  if test "x$new_path" = x \
37385      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37386      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37387    new_path=`$CYGPATH -u "$path"`
37388  fi
37389  if test "x$new_path" = x; then
37390    # Oops. Which didn't find the executable.
37391    # The splitting of arguments from the executable at a space might have been incorrect,
37392    # since paths with space are more likely in Windows. Give it another try with the whole
37393    # argument.
37394    path="$complete"
37395    arguments="EOL"
37396    new_path=`$CYGPATH -u "$path"`
37397    new_path=`$WHICH "$new_path" 2> /dev/null`
37398    # bat and cmd files are not always considered executable in cygwin causing which
37399    # to not find them
37400    if test "x$new_path" = x \
37401        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37402        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37403      new_path=`$CYGPATH -u "$path"`
37404    fi
37405    if test "x$new_path" = x; then
37406      # It's still not found. Now this is an unrecoverable error.
37407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37408$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37409      has_space=`$ECHO "$complete" | $GREP " "`
37410      if test "x$has_space" != x; then
37411        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37412$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37413      fi
37414      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37415    fi
37416  fi
37417
37418  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37419  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37420  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37421  # "foo.exe" is OK but "foo" is an error.
37422  #
37423  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37424  # It is also a way to make sure we got the proper file name for the real test later on.
37425  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37426  if test "x$test_shortpath" = x; then
37427    # Short path failed, file does not exist as specified.
37428    # Try adding .exe or .cmd
37429    if test -f "${new_path}.exe"; then
37430      input_to_shortpath="${new_path}.exe"
37431    elif test -f "${new_path}.cmd"; then
37432      input_to_shortpath="${new_path}.cmd"
37433    else
37434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37435$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37436      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37437$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37438      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37439    fi
37440  else
37441    input_to_shortpath="$new_path"
37442  fi
37443
37444  # Call helper function which possibly converts this using DOS-style short mode.
37445  # If so, the updated path is stored in $new_path.
37446  new_path="$input_to_shortpath"
37447
37448  input_path="$input_to_shortpath"
37449  # Check if we need to convert this using DOS-style short mode. If the path
37450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37451  # take no chances and rewrite it.
37452  # Note: m4 eats our [], so we need to use [ and ] instead.
37453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37454  if test "x$has_forbidden_chars" != x; then
37455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37456    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37457    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37458    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37459      # Going to short mode and back again did indeed matter. Since short mode is
37460      # case insensitive, let's make it lowercase to improve readability.
37461      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37462      # Now convert it back to Unix-stile (cygpath)
37463      input_path=`$CYGPATH -u "$shortmode_path"`
37464      new_path="$input_path"
37465    fi
37466  fi
37467
37468  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37469  if test "x$test_cygdrive_prefix" = x; then
37470    # As a simple fix, exclude /usr/bin since it's not a real path.
37471    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37472      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37473      # a path prefixed by /cygdrive for fixpath to work.
37474      new_path="$CYGWIN_ROOT_PATH$input_path"
37475    fi
37476  fi
37477
37478  # remove trailing .exe if any
37479  new_path="${new_path/%.exe/}"
37480
37481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37482
37483  # First separate the path from the arguments. This will split at the first
37484  # space.
37485  complete="$STRIP"
37486  path="${complete%% *}"
37487  tmp="$complete EOL"
37488  arguments="${tmp#* }"
37489
37490  # Input might be given as Windows format, start by converting to
37491  # unix format.
37492  new_path="$path"
37493
37494  windows_path="$new_path"
37495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37496    unix_path=`$CYGPATH -u "$windows_path"`
37497    new_path="$unix_path"
37498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37500    new_path="$unix_path"
37501  fi
37502
37503
37504  # Now try to locate executable using which
37505  new_path=`$WHICH "$new_path" 2> /dev/null`
37506
37507  if test "x$new_path" = x; then
37508    # Oops. Which didn't find the executable.
37509    # The splitting of arguments from the executable at a space might have been incorrect,
37510    # since paths with space are more likely in Windows. Give it another try with the whole
37511    # argument.
37512    path="$complete"
37513    arguments="EOL"
37514    new_path="$path"
37515
37516  windows_path="$new_path"
37517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37518    unix_path=`$CYGPATH -u "$windows_path"`
37519    new_path="$unix_path"
37520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37522    new_path="$unix_path"
37523  fi
37524
37525
37526    new_path=`$WHICH "$new_path" 2> /dev/null`
37527    # bat and cmd files are not always considered executable in MSYS causing which
37528    # to not find them
37529    if test "x$new_path" = x \
37530        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37531        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37532      new_path="$path"
37533
37534  windows_path="$new_path"
37535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37536    unix_path=`$CYGPATH -u "$windows_path"`
37537    new_path="$unix_path"
37538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37540    new_path="$unix_path"
37541  fi
37542
37543    fi
37544
37545    if test "x$new_path" = x; then
37546      # It's still not found. Now this is an unrecoverable error.
37547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37548$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37549      has_space=`$ECHO "$complete" | $GREP " "`
37550      if test "x$has_space" != x; then
37551        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37552$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37553      fi
37554      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37555    fi
37556  fi
37557
37558  # Now new_path has a complete unix path to the binary
37559  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37560    # Keep paths in /bin as-is, but remove trailing .exe if any
37561    new_path="${new_path/%.exe/}"
37562    # Do not save /bin paths to all_fixpath_prefixes!
37563  else
37564    # Not in mixed or Windows style, start by that.
37565    new_path=`cmd //c echo $new_path`
37566
37567  input_path="$new_path"
37568  # Check if we need to convert this using DOS-style short mode. If the path
37569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37570  # take no chances and rewrite it.
37571  # Note: m4 eats our [], so we need to use [ and ] instead.
37572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37573  if test "x$has_forbidden_chars" != x; then
37574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37575    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37576  fi
37577
37578    # Output is in $new_path
37579
37580  windows_path="$new_path"
37581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37582    unix_path=`$CYGPATH -u "$windows_path"`
37583    new_path="$unix_path"
37584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37586    new_path="$unix_path"
37587  fi
37588
37589    # remove trailing .exe if any
37590    new_path="${new_path/%.exe/}"
37591
37592    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37593    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37594  fi
37595
37596  else
37597    # We're on a unix platform. Hooray! :)
37598    # First separate the path from the arguments. This will split at the first
37599    # space.
37600    complete="$STRIP"
37601    path="${complete%% *}"
37602    tmp="$complete EOL"
37603    arguments="${tmp#* }"
37604
37605    # Cannot rely on the command "which" here since it doesn't always work.
37606    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37607    if test -z "$is_absolute_path"; then
37608      # Path to executable is not absolute. Find it.
37609      IFS_save="$IFS"
37610      IFS=:
37611      for p in $PATH; do
37612        if test -f "$p/$path" && test -x "$p/$path"; then
37613          new_path="$p/$path"
37614          break
37615        fi
37616      done
37617      IFS="$IFS_save"
37618    else
37619      # This is an absolute path, we can use it without further modifications.
37620      new_path="$path"
37621    fi
37622
37623    if test "x$new_path" = x; then
37624      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37625$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37626      has_space=`$ECHO "$complete" | $GREP " "`
37627      if test "x$has_space" != x; then
37628        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37629$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37630      fi
37631      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37632    fi
37633  fi
37634
37635  # Now join together the path and the arguments once again
37636  if test "x$arguments" != xEOL; then
37637    new_complete="$new_path ${arguments% *}"
37638  else
37639    new_complete="$new_path"
37640  fi
37641
37642  if test "x$complete" != "x$new_complete"; then
37643    STRIP="$new_complete"
37644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37645$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37646  fi
37647
37648
37649
37650  # Publish this variable in the help.
37651
37652
37653  if test "x$NM" = x; then
37654    # The variable is not set by user, try to locate tool using the code snippet
37655    if test -n "$ac_tool_prefix"; then
37656  for ac_prog in nm
37657  do
37658    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37659set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37661$as_echo_n "checking for $ac_word... " >&6; }
37662if ${ac_cv_prog_NM+:} false; then :
37663  $as_echo_n "(cached) " >&6
37664else
37665  if test -n "$NM"; then
37666  ac_cv_prog_NM="$NM" # Let the user override the test.
37667else
37668as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37669for as_dir in $PATH
37670do
37671  IFS=$as_save_IFS
37672  test -z "$as_dir" && as_dir=.
37673    for ac_exec_ext in '' $ac_executable_extensions; do
37674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37675    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37677    break 2
37678  fi
37679done
37680  done
37681IFS=$as_save_IFS
37682
37683fi
37684fi
37685NM=$ac_cv_prog_NM
37686if test -n "$NM"; then
37687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37688$as_echo "$NM" >&6; }
37689else
37690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37691$as_echo "no" >&6; }
37692fi
37693
37694
37695    test -n "$NM" && break
37696  done
37697fi
37698if test -z "$NM"; then
37699  ac_ct_NM=$NM
37700  for ac_prog in nm
37701do
37702  # Extract the first word of "$ac_prog", so it can be a program name with args.
37703set dummy $ac_prog; ac_word=$2
37704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37705$as_echo_n "checking for $ac_word... " >&6; }
37706if ${ac_cv_prog_ac_ct_NM+:} false; then :
37707  $as_echo_n "(cached) " >&6
37708else
37709  if test -n "$ac_ct_NM"; then
37710  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37711else
37712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37713for as_dir in $PATH
37714do
37715  IFS=$as_save_IFS
37716  test -z "$as_dir" && as_dir=.
37717    for ac_exec_ext in '' $ac_executable_extensions; do
37718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37719    ac_cv_prog_ac_ct_NM="$ac_prog"
37720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37721    break 2
37722  fi
37723done
37724  done
37725IFS=$as_save_IFS
37726
37727fi
37728fi
37729ac_ct_NM=$ac_cv_prog_ac_ct_NM
37730if test -n "$ac_ct_NM"; then
37731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37732$as_echo "$ac_ct_NM" >&6; }
37733else
37734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37735$as_echo "no" >&6; }
37736fi
37737
37738
37739  test -n "$ac_ct_NM" && break
37740done
37741
37742  if test "x$ac_ct_NM" = x; then
37743    NM=""
37744  else
37745    case $cross_compiling:$ac_tool_warned in
37746yes:)
37747{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37748$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37749ac_tool_warned=yes ;;
37750esac
37751    NM=$ac_ct_NM
37752  fi
37753fi
37754
37755  else
37756    # The variable is set, but is it from the command line or the environment?
37757
37758    # Try to remove the string !NM! from our list.
37759    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37760    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37761      # If it failed, the variable was not from the command line. Ignore it,
37762      # but warn the user (except for BASH, which is always set by the calling BASH).
37763      if test "xNM" != xBASH; then
37764        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37765$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37766      fi
37767      # Try to locate tool using the code snippet
37768      if test -n "$ac_tool_prefix"; then
37769  for ac_prog in nm
37770  do
37771    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37772set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37774$as_echo_n "checking for $ac_word... " >&6; }
37775if ${ac_cv_prog_NM+:} false; then :
37776  $as_echo_n "(cached) " >&6
37777else
37778  if test -n "$NM"; then
37779  ac_cv_prog_NM="$NM" # Let the user override the test.
37780else
37781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37782for as_dir in $PATH
37783do
37784  IFS=$as_save_IFS
37785  test -z "$as_dir" && as_dir=.
37786    for ac_exec_ext in '' $ac_executable_extensions; do
37787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37788    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37790    break 2
37791  fi
37792done
37793  done
37794IFS=$as_save_IFS
37795
37796fi
37797fi
37798NM=$ac_cv_prog_NM
37799if test -n "$NM"; then
37800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37801$as_echo "$NM" >&6; }
37802else
37803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37804$as_echo "no" >&6; }
37805fi
37806
37807
37808    test -n "$NM" && break
37809  done
37810fi
37811if test -z "$NM"; then
37812  ac_ct_NM=$NM
37813  for ac_prog in nm
37814do
37815  # Extract the first word of "$ac_prog", so it can be a program name with args.
37816set dummy $ac_prog; ac_word=$2
37817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37818$as_echo_n "checking for $ac_word... " >&6; }
37819if ${ac_cv_prog_ac_ct_NM+:} false; then :
37820  $as_echo_n "(cached) " >&6
37821else
37822  if test -n "$ac_ct_NM"; then
37823  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37824else
37825as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37826for as_dir in $PATH
37827do
37828  IFS=$as_save_IFS
37829  test -z "$as_dir" && as_dir=.
37830    for ac_exec_ext in '' $ac_executable_extensions; do
37831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37832    ac_cv_prog_ac_ct_NM="$ac_prog"
37833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37834    break 2
37835  fi
37836done
37837  done
37838IFS=$as_save_IFS
37839
37840fi
37841fi
37842ac_ct_NM=$ac_cv_prog_ac_ct_NM
37843if test -n "$ac_ct_NM"; then
37844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37845$as_echo "$ac_ct_NM" >&6; }
37846else
37847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37848$as_echo "no" >&6; }
37849fi
37850
37851
37852  test -n "$ac_ct_NM" && break
37853done
37854
37855  if test "x$ac_ct_NM" = x; then
37856    NM=""
37857  else
37858    case $cross_compiling:$ac_tool_warned in
37859yes:)
37860{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37861$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37862ac_tool_warned=yes ;;
37863esac
37864    NM=$ac_ct_NM
37865  fi
37866fi
37867
37868    else
37869      # If it succeeded, then it was overridden by the user. We will use it
37870      # for the tool.
37871
37872      # First remove it from the list of overridden variables, so we can test
37873      # for unknown variables in the end.
37874      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37875
37876      # Check if the provided tool contains a complete path.
37877      tool_specified="$NM"
37878      tool_basename="${tool_specified##*/}"
37879      if test "x$tool_basename" = "x$tool_specified"; then
37880        # A command without a complete path is provided, search $PATH.
37881        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37882$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37883        # Extract the first word of "$tool_basename", so it can be a program name with args.
37884set dummy $tool_basename; ac_word=$2
37885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37886$as_echo_n "checking for $ac_word... " >&6; }
37887if ${ac_cv_path_NM+:} false; then :
37888  $as_echo_n "(cached) " >&6
37889else
37890  case $NM in
37891  [\\/]* | ?:[\\/]*)
37892  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37893  ;;
37894  *)
37895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37896for as_dir in $PATH
37897do
37898  IFS=$as_save_IFS
37899  test -z "$as_dir" && as_dir=.
37900    for ac_exec_ext in '' $ac_executable_extensions; do
37901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37902    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37904    break 2
37905  fi
37906done
37907  done
37908IFS=$as_save_IFS
37909
37910  ;;
37911esac
37912fi
37913NM=$ac_cv_path_NM
37914if test -n "$NM"; then
37915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37916$as_echo "$NM" >&6; }
37917else
37918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37919$as_echo "no" >&6; }
37920fi
37921
37922
37923        if test "x$NM" = x; then
37924          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37925        fi
37926      else
37927        # Otherwise we believe it is a complete path. Use it as it is.
37928        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37929$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37930        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37931$as_echo_n "checking for NM... " >&6; }
37932        if test ! -x "$tool_specified"; then
37933          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37934$as_echo "not found" >&6; }
37935          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37936        fi
37937        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37938$as_echo "$tool_specified" >&6; }
37939      fi
37940    fi
37941  fi
37942
37943
37944
37945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37946
37947  # First separate the path from the arguments. This will split at the first
37948  # space.
37949  complete="$NM"
37950  path="${complete%% *}"
37951  tmp="$complete EOL"
37952  arguments="${tmp#* }"
37953
37954  # Input might be given as Windows format, start by converting to
37955  # unix format.
37956  new_path=`$CYGPATH -u "$path"`
37957
37958  # Now try to locate executable using which
37959  new_path=`$WHICH "$new_path" 2> /dev/null`
37960  # bat and cmd files are not always considered executable in cygwin causing which
37961  # to not find them
37962  if test "x$new_path" = x \
37963      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37964      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37965    new_path=`$CYGPATH -u "$path"`
37966  fi
37967  if test "x$new_path" = x; then
37968    # Oops. Which didn't find the executable.
37969    # The splitting of arguments from the executable at a space might have been incorrect,
37970    # since paths with space are more likely in Windows. Give it another try with the whole
37971    # argument.
37972    path="$complete"
37973    arguments="EOL"
37974    new_path=`$CYGPATH -u "$path"`
37975    new_path=`$WHICH "$new_path" 2> /dev/null`
37976    # bat and cmd files are not always considered executable in cygwin causing which
37977    # to not find them
37978    if test "x$new_path" = x \
37979        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37980        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37981      new_path=`$CYGPATH -u "$path"`
37982    fi
37983    if test "x$new_path" = x; then
37984      # It's still not found. Now this is an unrecoverable error.
37985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37986$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37987      has_space=`$ECHO "$complete" | $GREP " "`
37988      if test "x$has_space" != x; then
37989        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37990$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37991      fi
37992      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37993    fi
37994  fi
37995
37996  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37997  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37998  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37999  # "foo.exe" is OK but "foo" is an error.
38000  #
38001  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38002  # It is also a way to make sure we got the proper file name for the real test later on.
38003  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38004  if test "x$test_shortpath" = x; then
38005    # Short path failed, file does not exist as specified.
38006    # Try adding .exe or .cmd
38007    if test -f "${new_path}.exe"; then
38008      input_to_shortpath="${new_path}.exe"
38009    elif test -f "${new_path}.cmd"; then
38010      input_to_shortpath="${new_path}.cmd"
38011    else
38012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38013$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38014      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38015$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38016      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38017    fi
38018  else
38019    input_to_shortpath="$new_path"
38020  fi
38021
38022  # Call helper function which possibly converts this using DOS-style short mode.
38023  # If so, the updated path is stored in $new_path.
38024  new_path="$input_to_shortpath"
38025
38026  input_path="$input_to_shortpath"
38027  # Check if we need to convert this using DOS-style short mode. If the path
38028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38029  # take no chances and rewrite it.
38030  # Note: m4 eats our [], so we need to use [ and ] instead.
38031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38032  if test "x$has_forbidden_chars" != x; then
38033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38037      # Going to short mode and back again did indeed matter. Since short mode is
38038      # case insensitive, let's make it lowercase to improve readability.
38039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38040      # Now convert it back to Unix-stile (cygpath)
38041      input_path=`$CYGPATH -u "$shortmode_path"`
38042      new_path="$input_path"
38043    fi
38044  fi
38045
38046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38047  if test "x$test_cygdrive_prefix" = x; then
38048    # As a simple fix, exclude /usr/bin since it's not a real path.
38049    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38051      # a path prefixed by /cygdrive for fixpath to work.
38052      new_path="$CYGWIN_ROOT_PATH$input_path"
38053    fi
38054  fi
38055
38056  # remove trailing .exe if any
38057  new_path="${new_path/%.exe/}"
38058
38059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38060
38061  # First separate the path from the arguments. This will split at the first
38062  # space.
38063  complete="$NM"
38064  path="${complete%% *}"
38065  tmp="$complete EOL"
38066  arguments="${tmp#* }"
38067
38068  # Input might be given as Windows format, start by converting to
38069  # unix format.
38070  new_path="$path"
38071
38072  windows_path="$new_path"
38073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38074    unix_path=`$CYGPATH -u "$windows_path"`
38075    new_path="$unix_path"
38076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38078    new_path="$unix_path"
38079  fi
38080
38081
38082  # Now try to locate executable using which
38083  new_path=`$WHICH "$new_path" 2> /dev/null`
38084
38085  if test "x$new_path" = x; then
38086    # Oops. Which didn't find the executable.
38087    # The splitting of arguments from the executable at a space might have been incorrect,
38088    # since paths with space are more likely in Windows. Give it another try with the whole
38089    # argument.
38090    path="$complete"
38091    arguments="EOL"
38092    new_path="$path"
38093
38094  windows_path="$new_path"
38095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38096    unix_path=`$CYGPATH -u "$windows_path"`
38097    new_path="$unix_path"
38098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38100    new_path="$unix_path"
38101  fi
38102
38103
38104    new_path=`$WHICH "$new_path" 2> /dev/null`
38105    # bat and cmd files are not always considered executable in MSYS causing which
38106    # to not find them
38107    if test "x$new_path" = x \
38108        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38109        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38110      new_path="$path"
38111
38112  windows_path="$new_path"
38113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38114    unix_path=`$CYGPATH -u "$windows_path"`
38115    new_path="$unix_path"
38116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38118    new_path="$unix_path"
38119  fi
38120
38121    fi
38122
38123    if test "x$new_path" = x; then
38124      # It's still not found. Now this is an unrecoverable error.
38125      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38126$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38127      has_space=`$ECHO "$complete" | $GREP " "`
38128      if test "x$has_space" != x; then
38129        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38130$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38131      fi
38132      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38133    fi
38134  fi
38135
38136  # Now new_path has a complete unix path to the binary
38137  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38138    # Keep paths in /bin as-is, but remove trailing .exe if any
38139    new_path="${new_path/%.exe/}"
38140    # Do not save /bin paths to all_fixpath_prefixes!
38141  else
38142    # Not in mixed or Windows style, start by that.
38143    new_path=`cmd //c echo $new_path`
38144
38145  input_path="$new_path"
38146  # Check if we need to convert this using DOS-style short mode. If the path
38147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38148  # take no chances and rewrite it.
38149  # Note: m4 eats our [], so we need to use [ and ] instead.
38150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38151  if test "x$has_forbidden_chars" != x; then
38152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38153    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38154  fi
38155
38156    # Output is in $new_path
38157
38158  windows_path="$new_path"
38159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38160    unix_path=`$CYGPATH -u "$windows_path"`
38161    new_path="$unix_path"
38162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38164    new_path="$unix_path"
38165  fi
38166
38167    # remove trailing .exe if any
38168    new_path="${new_path/%.exe/}"
38169
38170    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38171    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38172  fi
38173
38174  else
38175    # We're on a unix platform. Hooray! :)
38176    # First separate the path from the arguments. This will split at the first
38177    # space.
38178    complete="$NM"
38179    path="${complete%% *}"
38180    tmp="$complete EOL"
38181    arguments="${tmp#* }"
38182
38183    # Cannot rely on the command "which" here since it doesn't always work.
38184    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38185    if test -z "$is_absolute_path"; then
38186      # Path to executable is not absolute. Find it.
38187      IFS_save="$IFS"
38188      IFS=:
38189      for p in $PATH; do
38190        if test -f "$p/$path" && test -x "$p/$path"; then
38191          new_path="$p/$path"
38192          break
38193        fi
38194      done
38195      IFS="$IFS_save"
38196    else
38197      # This is an absolute path, we can use it without further modifications.
38198      new_path="$path"
38199    fi
38200
38201    if test "x$new_path" = x; then
38202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38203$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38204      has_space=`$ECHO "$complete" | $GREP " "`
38205      if test "x$has_space" != x; then
38206        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38207$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38208      fi
38209      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38210    fi
38211  fi
38212
38213  # Now join together the path and the arguments once again
38214  if test "x$arguments" != xEOL; then
38215    new_complete="$new_path ${arguments% *}"
38216  else
38217    new_complete="$new_path"
38218  fi
38219
38220  if test "x$complete" != "x$new_complete"; then
38221    NM="$new_complete"
38222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38223$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38224  fi
38225
38226    GNM="$NM"
38227
38228  fi
38229
38230  # objcopy is used for moving debug symbols to separate files when
38231  # full debug symbols are enabled.
38232  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38233
38234
38235  # Publish this variable in the help.
38236
38237
38238  if test "x$OBJCOPY" = x; then
38239    # The variable is not set by user, try to locate tool using the code snippet
38240    if test -n "$ac_tool_prefix"; then
38241  for ac_prog in gobjcopy objcopy
38242  do
38243    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38244set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38246$as_echo_n "checking for $ac_word... " >&6; }
38247if ${ac_cv_prog_OBJCOPY+:} false; then :
38248  $as_echo_n "(cached) " >&6
38249else
38250  if test -n "$OBJCOPY"; then
38251  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38252else
38253as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38254for as_dir in $PATH
38255do
38256  IFS=$as_save_IFS
38257  test -z "$as_dir" && as_dir=.
38258    for ac_exec_ext in '' $ac_executable_extensions; do
38259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38260    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38262    break 2
38263  fi
38264done
38265  done
38266IFS=$as_save_IFS
38267
38268fi
38269fi
38270OBJCOPY=$ac_cv_prog_OBJCOPY
38271if test -n "$OBJCOPY"; then
38272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38273$as_echo "$OBJCOPY" >&6; }
38274else
38275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38276$as_echo "no" >&6; }
38277fi
38278
38279
38280    test -n "$OBJCOPY" && break
38281  done
38282fi
38283if test -z "$OBJCOPY"; then
38284  ac_ct_OBJCOPY=$OBJCOPY
38285  for ac_prog in gobjcopy objcopy
38286do
38287  # Extract the first word of "$ac_prog", so it can be a program name with args.
38288set dummy $ac_prog; ac_word=$2
38289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38290$as_echo_n "checking for $ac_word... " >&6; }
38291if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38292  $as_echo_n "(cached) " >&6
38293else
38294  if test -n "$ac_ct_OBJCOPY"; then
38295  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38296else
38297as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38298for as_dir in $PATH
38299do
38300  IFS=$as_save_IFS
38301  test -z "$as_dir" && as_dir=.
38302    for ac_exec_ext in '' $ac_executable_extensions; do
38303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38304    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38306    break 2
38307  fi
38308done
38309  done
38310IFS=$as_save_IFS
38311
38312fi
38313fi
38314ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38315if test -n "$ac_ct_OBJCOPY"; then
38316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38317$as_echo "$ac_ct_OBJCOPY" >&6; }
38318else
38319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38320$as_echo "no" >&6; }
38321fi
38322
38323
38324  test -n "$ac_ct_OBJCOPY" && break
38325done
38326
38327  if test "x$ac_ct_OBJCOPY" = x; then
38328    OBJCOPY=""
38329  else
38330    case $cross_compiling:$ac_tool_warned in
38331yes:)
38332{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38333$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38334ac_tool_warned=yes ;;
38335esac
38336    OBJCOPY=$ac_ct_OBJCOPY
38337  fi
38338fi
38339
38340  else
38341    # The variable is set, but is it from the command line or the environment?
38342
38343    # Try to remove the string !OBJCOPY! from our list.
38344    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38345    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38346      # If it failed, the variable was not from the command line. Ignore it,
38347      # but warn the user (except for BASH, which is always set by the calling BASH).
38348      if test "xOBJCOPY" != xBASH; then
38349        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38350$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38351      fi
38352      # Try to locate tool using the code snippet
38353      if test -n "$ac_tool_prefix"; then
38354  for ac_prog in gobjcopy objcopy
38355  do
38356    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38357set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38359$as_echo_n "checking for $ac_word... " >&6; }
38360if ${ac_cv_prog_OBJCOPY+:} false; then :
38361  $as_echo_n "(cached) " >&6
38362else
38363  if test -n "$OBJCOPY"; then
38364  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38365else
38366as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38367for as_dir in $PATH
38368do
38369  IFS=$as_save_IFS
38370  test -z "$as_dir" && as_dir=.
38371    for ac_exec_ext in '' $ac_executable_extensions; do
38372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38373    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38375    break 2
38376  fi
38377done
38378  done
38379IFS=$as_save_IFS
38380
38381fi
38382fi
38383OBJCOPY=$ac_cv_prog_OBJCOPY
38384if test -n "$OBJCOPY"; then
38385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38386$as_echo "$OBJCOPY" >&6; }
38387else
38388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38389$as_echo "no" >&6; }
38390fi
38391
38392
38393    test -n "$OBJCOPY" && break
38394  done
38395fi
38396if test -z "$OBJCOPY"; then
38397  ac_ct_OBJCOPY=$OBJCOPY
38398  for ac_prog in gobjcopy objcopy
38399do
38400  # Extract the first word of "$ac_prog", so it can be a program name with args.
38401set dummy $ac_prog; ac_word=$2
38402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38403$as_echo_n "checking for $ac_word... " >&6; }
38404if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38405  $as_echo_n "(cached) " >&6
38406else
38407  if test -n "$ac_ct_OBJCOPY"; then
38408  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38409else
38410as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38411for as_dir in $PATH
38412do
38413  IFS=$as_save_IFS
38414  test -z "$as_dir" && as_dir=.
38415    for ac_exec_ext in '' $ac_executable_extensions; do
38416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38417    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38419    break 2
38420  fi
38421done
38422  done
38423IFS=$as_save_IFS
38424
38425fi
38426fi
38427ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38428if test -n "$ac_ct_OBJCOPY"; then
38429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38430$as_echo "$ac_ct_OBJCOPY" >&6; }
38431else
38432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38433$as_echo "no" >&6; }
38434fi
38435
38436
38437  test -n "$ac_ct_OBJCOPY" && break
38438done
38439
38440  if test "x$ac_ct_OBJCOPY" = x; then
38441    OBJCOPY=""
38442  else
38443    case $cross_compiling:$ac_tool_warned in
38444yes:)
38445{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38446$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38447ac_tool_warned=yes ;;
38448esac
38449    OBJCOPY=$ac_ct_OBJCOPY
38450  fi
38451fi
38452
38453    else
38454      # If it succeeded, then it was overridden by the user. We will use it
38455      # for the tool.
38456
38457      # First remove it from the list of overridden variables, so we can test
38458      # for unknown variables in the end.
38459      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38460
38461      # Check if the provided tool contains a complete path.
38462      tool_specified="$OBJCOPY"
38463      tool_basename="${tool_specified##*/}"
38464      if test "x$tool_basename" = "x$tool_specified"; then
38465        # A command without a complete path is provided, search $PATH.
38466        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38467$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38468        # Extract the first word of "$tool_basename", so it can be a program name with args.
38469set dummy $tool_basename; ac_word=$2
38470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38471$as_echo_n "checking for $ac_word... " >&6; }
38472if ${ac_cv_path_OBJCOPY+:} false; then :
38473  $as_echo_n "(cached) " >&6
38474else
38475  case $OBJCOPY in
38476  [\\/]* | ?:[\\/]*)
38477  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38478  ;;
38479  *)
38480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38481for as_dir in $PATH
38482do
38483  IFS=$as_save_IFS
38484  test -z "$as_dir" && as_dir=.
38485    for ac_exec_ext in '' $ac_executable_extensions; do
38486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38487    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38489    break 2
38490  fi
38491done
38492  done
38493IFS=$as_save_IFS
38494
38495  ;;
38496esac
38497fi
38498OBJCOPY=$ac_cv_path_OBJCOPY
38499if test -n "$OBJCOPY"; then
38500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38501$as_echo "$OBJCOPY" >&6; }
38502else
38503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38504$as_echo "no" >&6; }
38505fi
38506
38507
38508        if test "x$OBJCOPY" = x; then
38509          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38510        fi
38511      else
38512        # Otherwise we believe it is a complete path. Use it as it is.
38513        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38514$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38515        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38516$as_echo_n "checking for OBJCOPY... " >&6; }
38517        if test ! -x "$tool_specified"; then
38518          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38519$as_echo "not found" >&6; }
38520          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38521        fi
38522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38523$as_echo "$tool_specified" >&6; }
38524      fi
38525    fi
38526  fi
38527
38528
38529    # Only call fixup if objcopy was found.
38530    if test -n "$OBJCOPY"; then
38531
38532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38533
38534  # First separate the path from the arguments. This will split at the first
38535  # space.
38536  complete="$OBJCOPY"
38537  path="${complete%% *}"
38538  tmp="$complete EOL"
38539  arguments="${tmp#* }"
38540
38541  # Input might be given as Windows format, start by converting to
38542  # unix format.
38543  new_path=`$CYGPATH -u "$path"`
38544
38545  # Now try to locate executable using which
38546  new_path=`$WHICH "$new_path" 2> /dev/null`
38547  # bat and cmd files are not always considered executable in cygwin causing which
38548  # to not find them
38549  if test "x$new_path" = x \
38550      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38551      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38552    new_path=`$CYGPATH -u "$path"`
38553  fi
38554  if test "x$new_path" = x; then
38555    # Oops. Which didn't find the executable.
38556    # The splitting of arguments from the executable at a space might have been incorrect,
38557    # since paths with space are more likely in Windows. Give it another try with the whole
38558    # argument.
38559    path="$complete"
38560    arguments="EOL"
38561    new_path=`$CYGPATH -u "$path"`
38562    new_path=`$WHICH "$new_path" 2> /dev/null`
38563    # bat and cmd files are not always considered executable in cygwin causing which
38564    # to not find them
38565    if test "x$new_path" = x \
38566        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38567        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38568      new_path=`$CYGPATH -u "$path"`
38569    fi
38570    if test "x$new_path" = x; then
38571      # It's still not found. Now this is an unrecoverable error.
38572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38573$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38574      has_space=`$ECHO "$complete" | $GREP " "`
38575      if test "x$has_space" != x; then
38576        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38577$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38578      fi
38579      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38580    fi
38581  fi
38582
38583  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38584  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38585  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38586  # "foo.exe" is OK but "foo" is an error.
38587  #
38588  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38589  # It is also a way to make sure we got the proper file name for the real test later on.
38590  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38591  if test "x$test_shortpath" = x; then
38592    # Short path failed, file does not exist as specified.
38593    # Try adding .exe or .cmd
38594    if test -f "${new_path}.exe"; then
38595      input_to_shortpath="${new_path}.exe"
38596    elif test -f "${new_path}.cmd"; then
38597      input_to_shortpath="${new_path}.cmd"
38598    else
38599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38600$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38601      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38602$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38603      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38604    fi
38605  else
38606    input_to_shortpath="$new_path"
38607  fi
38608
38609  # Call helper function which possibly converts this using DOS-style short mode.
38610  # If so, the updated path is stored in $new_path.
38611  new_path="$input_to_shortpath"
38612
38613  input_path="$input_to_shortpath"
38614  # Check if we need to convert this using DOS-style short mode. If the path
38615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38616  # take no chances and rewrite it.
38617  # Note: m4 eats our [], so we need to use [ and ] instead.
38618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38619  if test "x$has_forbidden_chars" != x; then
38620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38624      # Going to short mode and back again did indeed matter. Since short mode is
38625      # case insensitive, let's make it lowercase to improve readability.
38626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38627      # Now convert it back to Unix-stile (cygpath)
38628      input_path=`$CYGPATH -u "$shortmode_path"`
38629      new_path="$input_path"
38630    fi
38631  fi
38632
38633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38634  if test "x$test_cygdrive_prefix" = x; then
38635    # As a simple fix, exclude /usr/bin since it's not a real path.
38636    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38638      # a path prefixed by /cygdrive for fixpath to work.
38639      new_path="$CYGWIN_ROOT_PATH$input_path"
38640    fi
38641  fi
38642
38643  # remove trailing .exe if any
38644  new_path="${new_path/%.exe/}"
38645
38646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38647
38648  # First separate the path from the arguments. This will split at the first
38649  # space.
38650  complete="$OBJCOPY"
38651  path="${complete%% *}"
38652  tmp="$complete EOL"
38653  arguments="${tmp#* }"
38654
38655  # Input might be given as Windows format, start by converting to
38656  # unix format.
38657  new_path="$path"
38658
38659  windows_path="$new_path"
38660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38661    unix_path=`$CYGPATH -u "$windows_path"`
38662    new_path="$unix_path"
38663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38665    new_path="$unix_path"
38666  fi
38667
38668
38669  # Now try to locate executable using which
38670  new_path=`$WHICH "$new_path" 2> /dev/null`
38671
38672  if test "x$new_path" = x; then
38673    # Oops. Which didn't find the executable.
38674    # The splitting of arguments from the executable at a space might have been incorrect,
38675    # since paths with space are more likely in Windows. Give it another try with the whole
38676    # argument.
38677    path="$complete"
38678    arguments="EOL"
38679    new_path="$path"
38680
38681  windows_path="$new_path"
38682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38683    unix_path=`$CYGPATH -u "$windows_path"`
38684    new_path="$unix_path"
38685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38687    new_path="$unix_path"
38688  fi
38689
38690
38691    new_path=`$WHICH "$new_path" 2> /dev/null`
38692    # bat and cmd files are not always considered executable in MSYS causing which
38693    # to not find them
38694    if test "x$new_path" = x \
38695        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38696        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38697      new_path="$path"
38698
38699  windows_path="$new_path"
38700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38701    unix_path=`$CYGPATH -u "$windows_path"`
38702    new_path="$unix_path"
38703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38705    new_path="$unix_path"
38706  fi
38707
38708    fi
38709
38710    if test "x$new_path" = x; then
38711      # It's still not found. Now this is an unrecoverable error.
38712      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38713$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38714      has_space=`$ECHO "$complete" | $GREP " "`
38715      if test "x$has_space" != x; then
38716        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38717$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38718      fi
38719      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38720    fi
38721  fi
38722
38723  # Now new_path has a complete unix path to the binary
38724  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38725    # Keep paths in /bin as-is, but remove trailing .exe if any
38726    new_path="${new_path/%.exe/}"
38727    # Do not save /bin paths to all_fixpath_prefixes!
38728  else
38729    # Not in mixed or Windows style, start by that.
38730    new_path=`cmd //c echo $new_path`
38731
38732  input_path="$new_path"
38733  # Check if we need to convert this using DOS-style short mode. If the path
38734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38735  # take no chances and rewrite it.
38736  # Note: m4 eats our [], so we need to use [ and ] instead.
38737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38738  if test "x$has_forbidden_chars" != x; then
38739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38741  fi
38742
38743    # Output is in $new_path
38744
38745  windows_path="$new_path"
38746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38747    unix_path=`$CYGPATH -u "$windows_path"`
38748    new_path="$unix_path"
38749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38751    new_path="$unix_path"
38752  fi
38753
38754    # remove trailing .exe if any
38755    new_path="${new_path/%.exe/}"
38756
38757    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38758    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38759  fi
38760
38761  else
38762    # We're on a unix platform. Hooray! :)
38763    # First separate the path from the arguments. This will split at the first
38764    # space.
38765    complete="$OBJCOPY"
38766    path="${complete%% *}"
38767    tmp="$complete EOL"
38768    arguments="${tmp#* }"
38769
38770    # Cannot rely on the command "which" here since it doesn't always work.
38771    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38772    if test -z "$is_absolute_path"; then
38773      # Path to executable is not absolute. Find it.
38774      IFS_save="$IFS"
38775      IFS=:
38776      for p in $PATH; do
38777        if test -f "$p/$path" && test -x "$p/$path"; then
38778          new_path="$p/$path"
38779          break
38780        fi
38781      done
38782      IFS="$IFS_save"
38783    else
38784      # This is an absolute path, we can use it without further modifications.
38785      new_path="$path"
38786    fi
38787
38788    if test "x$new_path" = x; then
38789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38790$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38791      has_space=`$ECHO "$complete" | $GREP " "`
38792      if test "x$has_space" != x; then
38793        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38794$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38795      fi
38796      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38797    fi
38798  fi
38799
38800  # Now join together the path and the arguments once again
38801  if test "x$arguments" != xEOL; then
38802    new_complete="$new_path ${arguments% *}"
38803  else
38804    new_complete="$new_path"
38805  fi
38806
38807  if test "x$complete" != "x$new_complete"; then
38808    OBJCOPY="$new_complete"
38809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38810$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38811  fi
38812
38813    fi
38814  fi
38815
38816
38817
38818  # Publish this variable in the help.
38819
38820
38821  if test "x$OBJDUMP" = x; then
38822    # The variable is not set by user, try to locate tool using the code snippet
38823    if test -n "$ac_tool_prefix"; then
38824  for ac_prog in gobjdump objdump
38825  do
38826    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38827set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38829$as_echo_n "checking for $ac_word... " >&6; }
38830if ${ac_cv_prog_OBJDUMP+:} false; then :
38831  $as_echo_n "(cached) " >&6
38832else
38833  if test -n "$OBJDUMP"; then
38834  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38835else
38836as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38837for as_dir in $PATH
38838do
38839  IFS=$as_save_IFS
38840  test -z "$as_dir" && as_dir=.
38841    for ac_exec_ext in '' $ac_executable_extensions; do
38842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38843    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38845    break 2
38846  fi
38847done
38848  done
38849IFS=$as_save_IFS
38850
38851fi
38852fi
38853OBJDUMP=$ac_cv_prog_OBJDUMP
38854if test -n "$OBJDUMP"; then
38855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38856$as_echo "$OBJDUMP" >&6; }
38857else
38858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38859$as_echo "no" >&6; }
38860fi
38861
38862
38863    test -n "$OBJDUMP" && break
38864  done
38865fi
38866if test -z "$OBJDUMP"; then
38867  ac_ct_OBJDUMP=$OBJDUMP
38868  for ac_prog in gobjdump objdump
38869do
38870  # Extract the first word of "$ac_prog", so it can be a program name with args.
38871set dummy $ac_prog; ac_word=$2
38872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38873$as_echo_n "checking for $ac_word... " >&6; }
38874if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38875  $as_echo_n "(cached) " >&6
38876else
38877  if test -n "$ac_ct_OBJDUMP"; then
38878  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38879else
38880as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38881for as_dir in $PATH
38882do
38883  IFS=$as_save_IFS
38884  test -z "$as_dir" && as_dir=.
38885    for ac_exec_ext in '' $ac_executable_extensions; do
38886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38887    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38889    break 2
38890  fi
38891done
38892  done
38893IFS=$as_save_IFS
38894
38895fi
38896fi
38897ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38898if test -n "$ac_ct_OBJDUMP"; then
38899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38900$as_echo "$ac_ct_OBJDUMP" >&6; }
38901else
38902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38903$as_echo "no" >&6; }
38904fi
38905
38906
38907  test -n "$ac_ct_OBJDUMP" && break
38908done
38909
38910  if test "x$ac_ct_OBJDUMP" = x; then
38911    OBJDUMP=""
38912  else
38913    case $cross_compiling:$ac_tool_warned in
38914yes:)
38915{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38916$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38917ac_tool_warned=yes ;;
38918esac
38919    OBJDUMP=$ac_ct_OBJDUMP
38920  fi
38921fi
38922
38923  else
38924    # The variable is set, but is it from the command line or the environment?
38925
38926    # Try to remove the string !OBJDUMP! from our list.
38927    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38928    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38929      # If it failed, the variable was not from the command line. Ignore it,
38930      # but warn the user (except for BASH, which is always set by the calling BASH).
38931      if test "xOBJDUMP" != xBASH; then
38932        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38933$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38934      fi
38935      # Try to locate tool using the code snippet
38936      if test -n "$ac_tool_prefix"; then
38937  for ac_prog in gobjdump objdump
38938  do
38939    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38940set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38942$as_echo_n "checking for $ac_word... " >&6; }
38943if ${ac_cv_prog_OBJDUMP+:} false; then :
38944  $as_echo_n "(cached) " >&6
38945else
38946  if test -n "$OBJDUMP"; then
38947  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38948else
38949as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38950for as_dir in $PATH
38951do
38952  IFS=$as_save_IFS
38953  test -z "$as_dir" && as_dir=.
38954    for ac_exec_ext in '' $ac_executable_extensions; do
38955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38956    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38958    break 2
38959  fi
38960done
38961  done
38962IFS=$as_save_IFS
38963
38964fi
38965fi
38966OBJDUMP=$ac_cv_prog_OBJDUMP
38967if test -n "$OBJDUMP"; then
38968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38969$as_echo "$OBJDUMP" >&6; }
38970else
38971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38972$as_echo "no" >&6; }
38973fi
38974
38975
38976    test -n "$OBJDUMP" && break
38977  done
38978fi
38979if test -z "$OBJDUMP"; then
38980  ac_ct_OBJDUMP=$OBJDUMP
38981  for ac_prog in gobjdump objdump
38982do
38983  # Extract the first word of "$ac_prog", so it can be a program name with args.
38984set dummy $ac_prog; ac_word=$2
38985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38986$as_echo_n "checking for $ac_word... " >&6; }
38987if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38988  $as_echo_n "(cached) " >&6
38989else
38990  if test -n "$ac_ct_OBJDUMP"; then
38991  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38992else
38993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38994for as_dir in $PATH
38995do
38996  IFS=$as_save_IFS
38997  test -z "$as_dir" && as_dir=.
38998    for ac_exec_ext in '' $ac_executable_extensions; do
38999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39000    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39002    break 2
39003  fi
39004done
39005  done
39006IFS=$as_save_IFS
39007
39008fi
39009fi
39010ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39011if test -n "$ac_ct_OBJDUMP"; then
39012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39013$as_echo "$ac_ct_OBJDUMP" >&6; }
39014else
39015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39016$as_echo "no" >&6; }
39017fi
39018
39019
39020  test -n "$ac_ct_OBJDUMP" && break
39021done
39022
39023  if test "x$ac_ct_OBJDUMP" = x; then
39024    OBJDUMP=""
39025  else
39026    case $cross_compiling:$ac_tool_warned in
39027yes:)
39028{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39029$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39030ac_tool_warned=yes ;;
39031esac
39032    OBJDUMP=$ac_ct_OBJDUMP
39033  fi
39034fi
39035
39036    else
39037      # If it succeeded, then it was overridden by the user. We will use it
39038      # for the tool.
39039
39040      # First remove it from the list of overridden variables, so we can test
39041      # for unknown variables in the end.
39042      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39043
39044      # Check if the provided tool contains a complete path.
39045      tool_specified="$OBJDUMP"
39046      tool_basename="${tool_specified##*/}"
39047      if test "x$tool_basename" = "x$tool_specified"; then
39048        # A command without a complete path is provided, search $PATH.
39049        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
39050$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
39051        # Extract the first word of "$tool_basename", so it can be a program name with args.
39052set dummy $tool_basename; ac_word=$2
39053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39054$as_echo_n "checking for $ac_word... " >&6; }
39055if ${ac_cv_path_OBJDUMP+:} false; then :
39056  $as_echo_n "(cached) " >&6
39057else
39058  case $OBJDUMP in
39059  [\\/]* | ?:[\\/]*)
39060  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
39061  ;;
39062  *)
39063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39064for as_dir in $PATH
39065do
39066  IFS=$as_save_IFS
39067  test -z "$as_dir" && as_dir=.
39068    for ac_exec_ext in '' $ac_executable_extensions; do
39069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39070    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39072    break 2
39073  fi
39074done
39075  done
39076IFS=$as_save_IFS
39077
39078  ;;
39079esac
39080fi
39081OBJDUMP=$ac_cv_path_OBJDUMP
39082if test -n "$OBJDUMP"; then
39083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39084$as_echo "$OBJDUMP" >&6; }
39085else
39086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39087$as_echo "no" >&6; }
39088fi
39089
39090
39091        if test "x$OBJDUMP" = x; then
39092          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39093        fi
39094      else
39095        # Otherwise we believe it is a complete path. Use it as it is.
39096        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39097$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39098        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39099$as_echo_n "checking for OBJDUMP... " >&6; }
39100        if test ! -x "$tool_specified"; then
39101          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39102$as_echo "not found" >&6; }
39103          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39104        fi
39105        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39106$as_echo "$tool_specified" >&6; }
39107      fi
39108    fi
39109  fi
39110
39111
39112  if test "x$OBJDUMP" != x; then
39113    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39114    # bails if argument is missing.
39115
39116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39117
39118  # First separate the path from the arguments. This will split at the first
39119  # space.
39120  complete="$OBJDUMP"
39121  path="${complete%% *}"
39122  tmp="$complete EOL"
39123  arguments="${tmp#* }"
39124
39125  # Input might be given as Windows format, start by converting to
39126  # unix format.
39127  new_path=`$CYGPATH -u "$path"`
39128
39129  # Now try to locate executable using which
39130  new_path=`$WHICH "$new_path" 2> /dev/null`
39131  # bat and cmd files are not always considered executable in cygwin causing which
39132  # to not find them
39133  if test "x$new_path" = x \
39134      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39135      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39136    new_path=`$CYGPATH -u "$path"`
39137  fi
39138  if test "x$new_path" = x; then
39139    # Oops. Which didn't find the executable.
39140    # The splitting of arguments from the executable at a space might have been incorrect,
39141    # since paths with space are more likely in Windows. Give it another try with the whole
39142    # argument.
39143    path="$complete"
39144    arguments="EOL"
39145    new_path=`$CYGPATH -u "$path"`
39146    new_path=`$WHICH "$new_path" 2> /dev/null`
39147    # bat and cmd files are not always considered executable in cygwin causing which
39148    # to not find them
39149    if test "x$new_path" = x \
39150        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39151        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39152      new_path=`$CYGPATH -u "$path"`
39153    fi
39154    if test "x$new_path" = x; then
39155      # It's still not found. Now this is an unrecoverable error.
39156      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39157$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39158      has_space=`$ECHO "$complete" | $GREP " "`
39159      if test "x$has_space" != x; then
39160        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39161$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39162      fi
39163      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39164    fi
39165  fi
39166
39167  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39168  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39169  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39170  # "foo.exe" is OK but "foo" is an error.
39171  #
39172  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39173  # It is also a way to make sure we got the proper file name for the real test later on.
39174  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39175  if test "x$test_shortpath" = x; then
39176    # Short path failed, file does not exist as specified.
39177    # Try adding .exe or .cmd
39178    if test -f "${new_path}.exe"; then
39179      input_to_shortpath="${new_path}.exe"
39180    elif test -f "${new_path}.cmd"; then
39181      input_to_shortpath="${new_path}.cmd"
39182    else
39183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39184$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39185      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39186$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39187      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39188    fi
39189  else
39190    input_to_shortpath="$new_path"
39191  fi
39192
39193  # Call helper function which possibly converts this using DOS-style short mode.
39194  # If so, the updated path is stored in $new_path.
39195  new_path="$input_to_shortpath"
39196
39197  input_path="$input_to_shortpath"
39198  # Check if we need to convert this using DOS-style short mode. If the path
39199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39200  # take no chances and rewrite it.
39201  # Note: m4 eats our [], so we need to use [ and ] instead.
39202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39203  if test "x$has_forbidden_chars" != x; then
39204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39208      # Going to short mode and back again did indeed matter. Since short mode is
39209      # case insensitive, let's make it lowercase to improve readability.
39210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39211      # Now convert it back to Unix-stile (cygpath)
39212      input_path=`$CYGPATH -u "$shortmode_path"`
39213      new_path="$input_path"
39214    fi
39215  fi
39216
39217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39218  if test "x$test_cygdrive_prefix" = x; then
39219    # As a simple fix, exclude /usr/bin since it's not a real path.
39220    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39222      # a path prefixed by /cygdrive for fixpath to work.
39223      new_path="$CYGWIN_ROOT_PATH$input_path"
39224    fi
39225  fi
39226
39227  # remove trailing .exe if any
39228  new_path="${new_path/%.exe/}"
39229
39230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39231
39232  # First separate the path from the arguments. This will split at the first
39233  # space.
39234  complete="$OBJDUMP"
39235  path="${complete%% *}"
39236  tmp="$complete EOL"
39237  arguments="${tmp#* }"
39238
39239  # Input might be given as Windows format, start by converting to
39240  # unix format.
39241  new_path="$path"
39242
39243  windows_path="$new_path"
39244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39245    unix_path=`$CYGPATH -u "$windows_path"`
39246    new_path="$unix_path"
39247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39249    new_path="$unix_path"
39250  fi
39251
39252
39253  # Now try to locate executable using which
39254  new_path=`$WHICH "$new_path" 2> /dev/null`
39255
39256  if test "x$new_path" = x; then
39257    # Oops. Which didn't find the executable.
39258    # The splitting of arguments from the executable at a space might have been incorrect,
39259    # since paths with space are more likely in Windows. Give it another try with the whole
39260    # argument.
39261    path="$complete"
39262    arguments="EOL"
39263    new_path="$path"
39264
39265  windows_path="$new_path"
39266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39267    unix_path=`$CYGPATH -u "$windows_path"`
39268    new_path="$unix_path"
39269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39271    new_path="$unix_path"
39272  fi
39273
39274
39275    new_path=`$WHICH "$new_path" 2> /dev/null`
39276    # bat and cmd files are not always considered executable in MSYS causing which
39277    # to not find them
39278    if test "x$new_path" = x \
39279        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39280        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39281      new_path="$path"
39282
39283  windows_path="$new_path"
39284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39285    unix_path=`$CYGPATH -u "$windows_path"`
39286    new_path="$unix_path"
39287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39289    new_path="$unix_path"
39290  fi
39291
39292    fi
39293
39294    if test "x$new_path" = x; then
39295      # It's still not found. Now this is an unrecoverable error.
39296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39297$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39298      has_space=`$ECHO "$complete" | $GREP " "`
39299      if test "x$has_space" != x; then
39300        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39301$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39302      fi
39303      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39304    fi
39305  fi
39306
39307  # Now new_path has a complete unix path to the binary
39308  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39309    # Keep paths in /bin as-is, but remove trailing .exe if any
39310    new_path="${new_path/%.exe/}"
39311    # Do not save /bin paths to all_fixpath_prefixes!
39312  else
39313    # Not in mixed or Windows style, start by that.
39314    new_path=`cmd //c echo $new_path`
39315
39316  input_path="$new_path"
39317  # Check if we need to convert this using DOS-style short mode. If the path
39318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39319  # take no chances and rewrite it.
39320  # Note: m4 eats our [], so we need to use [ and ] instead.
39321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39322  if test "x$has_forbidden_chars" != x; then
39323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39324    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39325  fi
39326
39327    # Output is in $new_path
39328
39329  windows_path="$new_path"
39330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39331    unix_path=`$CYGPATH -u "$windows_path"`
39332    new_path="$unix_path"
39333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39335    new_path="$unix_path"
39336  fi
39337
39338    # remove trailing .exe if any
39339    new_path="${new_path/%.exe/}"
39340
39341    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39342    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39343  fi
39344
39345  else
39346    # We're on a unix platform. Hooray! :)
39347    # First separate the path from the arguments. This will split at the first
39348    # space.
39349    complete="$OBJDUMP"
39350    path="${complete%% *}"
39351    tmp="$complete EOL"
39352    arguments="${tmp#* }"
39353
39354    # Cannot rely on the command "which" here since it doesn't always work.
39355    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39356    if test -z "$is_absolute_path"; then
39357      # Path to executable is not absolute. Find it.
39358      IFS_save="$IFS"
39359      IFS=:
39360      for p in $PATH; do
39361        if test -f "$p/$path" && test -x "$p/$path"; then
39362          new_path="$p/$path"
39363          break
39364        fi
39365      done
39366      IFS="$IFS_save"
39367    else
39368      # This is an absolute path, we can use it without further modifications.
39369      new_path="$path"
39370    fi
39371
39372    if test "x$new_path" = x; then
39373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39374$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39375      has_space=`$ECHO "$complete" | $GREP " "`
39376      if test "x$has_space" != x; then
39377        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39378$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39379      fi
39380      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39381    fi
39382  fi
39383
39384  # Now join together the path and the arguments once again
39385  if test "x$arguments" != xEOL; then
39386    new_complete="$new_path ${arguments% *}"
39387  else
39388    new_complete="$new_path"
39389  fi
39390
39391  if test "x$complete" != "x$new_complete"; then
39392    OBJDUMP="$new_complete"
39393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39394$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39395  fi
39396
39397  fi
39398
39399
39400  # Restore old path.
39401  PATH="$OLD_PATH"
39402
39403  # Restore the flags to the user specified values.
39404  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39405  CFLAGS="$ORG_CFLAGS"
39406  CXXFLAGS="$ORG_CXXFLAGS"
39407  OBJCFLAGS="$ORG_OBJCFLAGS"
39408
39409
39410# Finally do some processing after the detection phase
39411
39412  if test "x$COMPILE_TYPE" = "xcross"; then
39413    # Now we need to find a C/C++ compiler that can build executables for the
39414    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39415    # used once. Also, we need to do this without adding a tools dir to the
39416    # path, otherwise we might pick up cross-compilers which don't use standard
39417    # naming.
39418
39419    # FIXME: we should list the discovered compilers as an exclude pattern!
39420    # If we do that, we can do this detection before POST_DETECTION, and still
39421    # find the build compilers in the tools dir, if needed.
39422
39423
39424  # Publish this variable in the help.
39425
39426
39427  if test "x$BUILD_CC" = x; then
39428    # The variable is not set by user, try to locate tool using the code snippet
39429    for ac_prog in cl cc gcc
39430do
39431  # Extract the first word of "$ac_prog", so it can be a program name with args.
39432set dummy $ac_prog; ac_word=$2
39433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39434$as_echo_n "checking for $ac_word... " >&6; }
39435if ${ac_cv_path_BUILD_CC+:} false; then :
39436  $as_echo_n "(cached) " >&6
39437else
39438  case $BUILD_CC in
39439  [\\/]* | ?:[\\/]*)
39440  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39441  ;;
39442  *)
39443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39444for as_dir in $PATH
39445do
39446  IFS=$as_save_IFS
39447  test -z "$as_dir" && as_dir=.
39448    for ac_exec_ext in '' $ac_executable_extensions; do
39449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39450    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39452    break 2
39453  fi
39454done
39455  done
39456IFS=$as_save_IFS
39457
39458  ;;
39459esac
39460fi
39461BUILD_CC=$ac_cv_path_BUILD_CC
39462if test -n "$BUILD_CC"; then
39463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39464$as_echo "$BUILD_CC" >&6; }
39465else
39466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39467$as_echo "no" >&6; }
39468fi
39469
39470
39471  test -n "$BUILD_CC" && break
39472done
39473
39474  else
39475    # The variable is set, but is it from the command line or the environment?
39476
39477    # Try to remove the string !BUILD_CC! from our list.
39478    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39479    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39480      # If it failed, the variable was not from the command line. Ignore it,
39481      # but warn the user (except for BASH, which is always set by the calling BASH).
39482      if test "xBUILD_CC" != xBASH; then
39483        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39484$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39485      fi
39486      # Try to locate tool using the code snippet
39487      for ac_prog in cl cc gcc
39488do
39489  # Extract the first word of "$ac_prog", so it can be a program name with args.
39490set dummy $ac_prog; ac_word=$2
39491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39492$as_echo_n "checking for $ac_word... " >&6; }
39493if ${ac_cv_path_BUILD_CC+:} false; then :
39494  $as_echo_n "(cached) " >&6
39495else
39496  case $BUILD_CC in
39497  [\\/]* | ?:[\\/]*)
39498  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39499  ;;
39500  *)
39501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39502for as_dir in $PATH
39503do
39504  IFS=$as_save_IFS
39505  test -z "$as_dir" && as_dir=.
39506    for ac_exec_ext in '' $ac_executable_extensions; do
39507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39508    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39510    break 2
39511  fi
39512done
39513  done
39514IFS=$as_save_IFS
39515
39516  ;;
39517esac
39518fi
39519BUILD_CC=$ac_cv_path_BUILD_CC
39520if test -n "$BUILD_CC"; then
39521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39522$as_echo "$BUILD_CC" >&6; }
39523else
39524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39525$as_echo "no" >&6; }
39526fi
39527
39528
39529  test -n "$BUILD_CC" && break
39530done
39531
39532    else
39533      # If it succeeded, then it was overridden by the user. We will use it
39534      # for the tool.
39535
39536      # First remove it from the list of overridden variables, so we can test
39537      # for unknown variables in the end.
39538      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39539
39540      # Check if the provided tool contains a complete path.
39541      tool_specified="$BUILD_CC"
39542      tool_basename="${tool_specified##*/}"
39543      if test "x$tool_basename" = "x$tool_specified"; then
39544        # A command without a complete path is provided, search $PATH.
39545        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39546$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39547        # Extract the first word of "$tool_basename", so it can be a program name with args.
39548set dummy $tool_basename; ac_word=$2
39549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39550$as_echo_n "checking for $ac_word... " >&6; }
39551if ${ac_cv_path_BUILD_CC+:} false; then :
39552  $as_echo_n "(cached) " >&6
39553else
39554  case $BUILD_CC in
39555  [\\/]* | ?:[\\/]*)
39556  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39557  ;;
39558  *)
39559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39560for as_dir in $PATH
39561do
39562  IFS=$as_save_IFS
39563  test -z "$as_dir" && as_dir=.
39564    for ac_exec_ext in '' $ac_executable_extensions; do
39565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39566    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39568    break 2
39569  fi
39570done
39571  done
39572IFS=$as_save_IFS
39573
39574  ;;
39575esac
39576fi
39577BUILD_CC=$ac_cv_path_BUILD_CC
39578if test -n "$BUILD_CC"; then
39579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39580$as_echo "$BUILD_CC" >&6; }
39581else
39582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39583$as_echo "no" >&6; }
39584fi
39585
39586
39587        if test "x$BUILD_CC" = x; then
39588          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39589        fi
39590      else
39591        # Otherwise we believe it is a complete path. Use it as it is.
39592        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39593$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39594        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39595$as_echo_n "checking for BUILD_CC... " >&6; }
39596        if test ! -x "$tool_specified"; then
39597          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39598$as_echo "not found" >&6; }
39599          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39600        fi
39601        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39602$as_echo "$tool_specified" >&6; }
39603      fi
39604    fi
39605  fi
39606
39607
39608
39609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39610
39611  # First separate the path from the arguments. This will split at the first
39612  # space.
39613  complete="$BUILD_CC"
39614  path="${complete%% *}"
39615  tmp="$complete EOL"
39616  arguments="${tmp#* }"
39617
39618  # Input might be given as Windows format, start by converting to
39619  # unix format.
39620  new_path=`$CYGPATH -u "$path"`
39621
39622  # Now try to locate executable using which
39623  new_path=`$WHICH "$new_path" 2> /dev/null`
39624  # bat and cmd files are not always considered executable in cygwin causing which
39625  # to not find them
39626  if test "x$new_path" = x \
39627      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39628      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39629    new_path=`$CYGPATH -u "$path"`
39630  fi
39631  if test "x$new_path" = x; then
39632    # Oops. Which didn't find the executable.
39633    # The splitting of arguments from the executable at a space might have been incorrect,
39634    # since paths with space are more likely in Windows. Give it another try with the whole
39635    # argument.
39636    path="$complete"
39637    arguments="EOL"
39638    new_path=`$CYGPATH -u "$path"`
39639    new_path=`$WHICH "$new_path" 2> /dev/null`
39640    # bat and cmd files are not always considered executable in cygwin causing which
39641    # to not find them
39642    if test "x$new_path" = x \
39643        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39644        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39645      new_path=`$CYGPATH -u "$path"`
39646    fi
39647    if test "x$new_path" = x; then
39648      # It's still not found. Now this is an unrecoverable error.
39649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39650$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39651      has_space=`$ECHO "$complete" | $GREP " "`
39652      if test "x$has_space" != x; then
39653        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39654$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39655      fi
39656      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39657    fi
39658  fi
39659
39660  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39661  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39662  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39663  # "foo.exe" is OK but "foo" is an error.
39664  #
39665  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39666  # It is also a way to make sure we got the proper file name for the real test later on.
39667  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39668  if test "x$test_shortpath" = x; then
39669    # Short path failed, file does not exist as specified.
39670    # Try adding .exe or .cmd
39671    if test -f "${new_path}.exe"; then
39672      input_to_shortpath="${new_path}.exe"
39673    elif test -f "${new_path}.cmd"; then
39674      input_to_shortpath="${new_path}.cmd"
39675    else
39676      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39677$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39678      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39679$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39680      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39681    fi
39682  else
39683    input_to_shortpath="$new_path"
39684  fi
39685
39686  # Call helper function which possibly converts this using DOS-style short mode.
39687  # If so, the updated path is stored in $new_path.
39688  new_path="$input_to_shortpath"
39689
39690  input_path="$input_to_shortpath"
39691  # Check if we need to convert this using DOS-style short mode. If the path
39692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39693  # take no chances and rewrite it.
39694  # Note: m4 eats our [], so we need to use [ and ] instead.
39695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39696  if test "x$has_forbidden_chars" != x; then
39697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39698    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39699    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39700    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39701      # Going to short mode and back again did indeed matter. Since short mode is
39702      # case insensitive, let's make it lowercase to improve readability.
39703      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39704      # Now convert it back to Unix-stile (cygpath)
39705      input_path=`$CYGPATH -u "$shortmode_path"`
39706      new_path="$input_path"
39707    fi
39708  fi
39709
39710  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39711  if test "x$test_cygdrive_prefix" = x; then
39712    # As a simple fix, exclude /usr/bin since it's not a real path.
39713    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39714      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39715      # a path prefixed by /cygdrive for fixpath to work.
39716      new_path="$CYGWIN_ROOT_PATH$input_path"
39717    fi
39718  fi
39719
39720  # remove trailing .exe if any
39721  new_path="${new_path/%.exe/}"
39722
39723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39724
39725  # First separate the path from the arguments. This will split at the first
39726  # space.
39727  complete="$BUILD_CC"
39728  path="${complete%% *}"
39729  tmp="$complete EOL"
39730  arguments="${tmp#* }"
39731
39732  # Input might be given as Windows format, start by converting to
39733  # unix format.
39734  new_path="$path"
39735
39736  windows_path="$new_path"
39737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39738    unix_path=`$CYGPATH -u "$windows_path"`
39739    new_path="$unix_path"
39740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39742    new_path="$unix_path"
39743  fi
39744
39745
39746  # Now try to locate executable using which
39747  new_path=`$WHICH "$new_path" 2> /dev/null`
39748
39749  if test "x$new_path" = x; then
39750    # Oops. Which didn't find the executable.
39751    # The splitting of arguments from the executable at a space might have been incorrect,
39752    # since paths with space are more likely in Windows. Give it another try with the whole
39753    # argument.
39754    path="$complete"
39755    arguments="EOL"
39756    new_path="$path"
39757
39758  windows_path="$new_path"
39759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39760    unix_path=`$CYGPATH -u "$windows_path"`
39761    new_path="$unix_path"
39762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39764    new_path="$unix_path"
39765  fi
39766
39767
39768    new_path=`$WHICH "$new_path" 2> /dev/null`
39769    # bat and cmd files are not always considered executable in MSYS causing which
39770    # to not find them
39771    if test "x$new_path" = x \
39772        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39773        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39774      new_path="$path"
39775
39776  windows_path="$new_path"
39777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39778    unix_path=`$CYGPATH -u "$windows_path"`
39779    new_path="$unix_path"
39780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39782    new_path="$unix_path"
39783  fi
39784
39785    fi
39786
39787    if test "x$new_path" = x; then
39788      # It's still not found. Now this is an unrecoverable error.
39789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39790$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39791      has_space=`$ECHO "$complete" | $GREP " "`
39792      if test "x$has_space" != x; then
39793        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39794$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39795      fi
39796      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39797    fi
39798  fi
39799
39800  # Now new_path has a complete unix path to the binary
39801  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39802    # Keep paths in /bin as-is, but remove trailing .exe if any
39803    new_path="${new_path/%.exe/}"
39804    # Do not save /bin paths to all_fixpath_prefixes!
39805  else
39806    # Not in mixed or Windows style, start by that.
39807    new_path=`cmd //c echo $new_path`
39808
39809  input_path="$new_path"
39810  # Check if we need to convert this using DOS-style short mode. If the path
39811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39812  # take no chances and rewrite it.
39813  # Note: m4 eats our [], so we need to use [ and ] instead.
39814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39815  if test "x$has_forbidden_chars" != x; then
39816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39817    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39818  fi
39819
39820    # Output is in $new_path
39821
39822  windows_path="$new_path"
39823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39824    unix_path=`$CYGPATH -u "$windows_path"`
39825    new_path="$unix_path"
39826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39828    new_path="$unix_path"
39829  fi
39830
39831    # remove trailing .exe if any
39832    new_path="${new_path/%.exe/}"
39833
39834    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39835    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39836  fi
39837
39838  else
39839    # We're on a unix platform. Hooray! :)
39840    # First separate the path from the arguments. This will split at the first
39841    # space.
39842    complete="$BUILD_CC"
39843    path="${complete%% *}"
39844    tmp="$complete EOL"
39845    arguments="${tmp#* }"
39846
39847    # Cannot rely on the command "which" here since it doesn't always work.
39848    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39849    if test -z "$is_absolute_path"; then
39850      # Path to executable is not absolute. Find it.
39851      IFS_save="$IFS"
39852      IFS=:
39853      for p in $PATH; do
39854        if test -f "$p/$path" && test -x "$p/$path"; then
39855          new_path="$p/$path"
39856          break
39857        fi
39858      done
39859      IFS="$IFS_save"
39860    else
39861      # This is an absolute path, we can use it without further modifications.
39862      new_path="$path"
39863    fi
39864
39865    if test "x$new_path" = x; then
39866      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39867$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39868      has_space=`$ECHO "$complete" | $GREP " "`
39869      if test "x$has_space" != x; then
39870        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39871$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39872      fi
39873      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39874    fi
39875  fi
39876
39877  # Now join together the path and the arguments once again
39878  if test "x$arguments" != xEOL; then
39879    new_complete="$new_path ${arguments% *}"
39880  else
39881    new_complete="$new_path"
39882  fi
39883
39884  if test "x$complete" != "x$new_complete"; then
39885    BUILD_CC="$new_complete"
39886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39887$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39888  fi
39889
39890
39891
39892  # Publish this variable in the help.
39893
39894
39895  if test "x$BUILD_CXX" = x; then
39896    # The variable is not set by user, try to locate tool using the code snippet
39897    for ac_prog in cl CC g++
39898do
39899  # Extract the first word of "$ac_prog", so it can be a program name with args.
39900set dummy $ac_prog; ac_word=$2
39901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39902$as_echo_n "checking for $ac_word... " >&6; }
39903if ${ac_cv_path_BUILD_CXX+:} false; then :
39904  $as_echo_n "(cached) " >&6
39905else
39906  case $BUILD_CXX in
39907  [\\/]* | ?:[\\/]*)
39908  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39909  ;;
39910  *)
39911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39912for as_dir in $PATH
39913do
39914  IFS=$as_save_IFS
39915  test -z "$as_dir" && as_dir=.
39916    for ac_exec_ext in '' $ac_executable_extensions; do
39917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39918    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39920    break 2
39921  fi
39922done
39923  done
39924IFS=$as_save_IFS
39925
39926  ;;
39927esac
39928fi
39929BUILD_CXX=$ac_cv_path_BUILD_CXX
39930if test -n "$BUILD_CXX"; then
39931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39932$as_echo "$BUILD_CXX" >&6; }
39933else
39934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39935$as_echo "no" >&6; }
39936fi
39937
39938
39939  test -n "$BUILD_CXX" && break
39940done
39941
39942  else
39943    # The variable is set, but is it from the command line or the environment?
39944
39945    # Try to remove the string !BUILD_CXX! from our list.
39946    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39947    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39948      # If it failed, the variable was not from the command line. Ignore it,
39949      # but warn the user (except for BASH, which is always set by the calling BASH).
39950      if test "xBUILD_CXX" != xBASH; then
39951        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39952$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39953      fi
39954      # Try to locate tool using the code snippet
39955      for ac_prog in cl CC g++
39956do
39957  # Extract the first word of "$ac_prog", so it can be a program name with args.
39958set dummy $ac_prog; ac_word=$2
39959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39960$as_echo_n "checking for $ac_word... " >&6; }
39961if ${ac_cv_path_BUILD_CXX+:} false; then :
39962  $as_echo_n "(cached) " >&6
39963else
39964  case $BUILD_CXX in
39965  [\\/]* | ?:[\\/]*)
39966  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39967  ;;
39968  *)
39969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39970for as_dir in $PATH
39971do
39972  IFS=$as_save_IFS
39973  test -z "$as_dir" && as_dir=.
39974    for ac_exec_ext in '' $ac_executable_extensions; do
39975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39976    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39978    break 2
39979  fi
39980done
39981  done
39982IFS=$as_save_IFS
39983
39984  ;;
39985esac
39986fi
39987BUILD_CXX=$ac_cv_path_BUILD_CXX
39988if test -n "$BUILD_CXX"; then
39989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39990$as_echo "$BUILD_CXX" >&6; }
39991else
39992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39993$as_echo "no" >&6; }
39994fi
39995
39996
39997  test -n "$BUILD_CXX" && break
39998done
39999
40000    else
40001      # If it succeeded, then it was overridden by the user. We will use it
40002      # for the tool.
40003
40004      # First remove it from the list of overridden variables, so we can test
40005      # for unknown variables in the end.
40006      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40007
40008      # Check if the provided tool contains a complete path.
40009      tool_specified="$BUILD_CXX"
40010      tool_basename="${tool_specified##*/}"
40011      if test "x$tool_basename" = "x$tool_specified"; then
40012        # A command without a complete path is provided, search $PATH.
40013        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
40014$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
40015        # Extract the first word of "$tool_basename", so it can be a program name with args.
40016set dummy $tool_basename; ac_word=$2
40017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40018$as_echo_n "checking for $ac_word... " >&6; }
40019if ${ac_cv_path_BUILD_CXX+:} false; then :
40020  $as_echo_n "(cached) " >&6
40021else
40022  case $BUILD_CXX in
40023  [\\/]* | ?:[\\/]*)
40024  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40025  ;;
40026  *)
40027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40028for as_dir in $PATH
40029do
40030  IFS=$as_save_IFS
40031  test -z "$as_dir" && as_dir=.
40032    for ac_exec_ext in '' $ac_executable_extensions; do
40033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40034    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40036    break 2
40037  fi
40038done
40039  done
40040IFS=$as_save_IFS
40041
40042  ;;
40043esac
40044fi
40045BUILD_CXX=$ac_cv_path_BUILD_CXX
40046if test -n "$BUILD_CXX"; then
40047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40048$as_echo "$BUILD_CXX" >&6; }
40049else
40050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40051$as_echo "no" >&6; }
40052fi
40053
40054
40055        if test "x$BUILD_CXX" = x; then
40056          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40057        fi
40058      else
40059        # Otherwise we believe it is a complete path. Use it as it is.
40060        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
40061$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40062        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40063$as_echo_n "checking for BUILD_CXX... " >&6; }
40064        if test ! -x "$tool_specified"; then
40065          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40066$as_echo "not found" >&6; }
40067          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40068        fi
40069        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40070$as_echo "$tool_specified" >&6; }
40071      fi
40072    fi
40073  fi
40074
40075
40076
40077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40078
40079  # First separate the path from the arguments. This will split at the first
40080  # space.
40081  complete="$BUILD_CXX"
40082  path="${complete%% *}"
40083  tmp="$complete EOL"
40084  arguments="${tmp#* }"
40085
40086  # Input might be given as Windows format, start by converting to
40087  # unix format.
40088  new_path=`$CYGPATH -u "$path"`
40089
40090  # Now try to locate executable using which
40091  new_path=`$WHICH "$new_path" 2> /dev/null`
40092  # bat and cmd files are not always considered executable in cygwin causing which
40093  # to not find them
40094  if test "x$new_path" = x \
40095      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40096      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40097    new_path=`$CYGPATH -u "$path"`
40098  fi
40099  if test "x$new_path" = x; then
40100    # Oops. Which didn't find the executable.
40101    # The splitting of arguments from the executable at a space might have been incorrect,
40102    # since paths with space are more likely in Windows. Give it another try with the whole
40103    # argument.
40104    path="$complete"
40105    arguments="EOL"
40106    new_path=`$CYGPATH -u "$path"`
40107    new_path=`$WHICH "$new_path" 2> /dev/null`
40108    # bat and cmd files are not always considered executable in cygwin causing which
40109    # to not find them
40110    if test "x$new_path" = x \
40111        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40112        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40113      new_path=`$CYGPATH -u "$path"`
40114    fi
40115    if test "x$new_path" = x; then
40116      # It's still not found. Now this is an unrecoverable error.
40117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40118$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40119      has_space=`$ECHO "$complete" | $GREP " "`
40120      if test "x$has_space" != x; then
40121        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40122$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40123      fi
40124      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40125    fi
40126  fi
40127
40128  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40129  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40130  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40131  # "foo.exe" is OK but "foo" is an error.
40132  #
40133  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40134  # It is also a way to make sure we got the proper file name for the real test later on.
40135  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40136  if test "x$test_shortpath" = x; then
40137    # Short path failed, file does not exist as specified.
40138    # Try adding .exe or .cmd
40139    if test -f "${new_path}.exe"; then
40140      input_to_shortpath="${new_path}.exe"
40141    elif test -f "${new_path}.cmd"; then
40142      input_to_shortpath="${new_path}.cmd"
40143    else
40144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40145$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40146      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40147$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40148      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40149    fi
40150  else
40151    input_to_shortpath="$new_path"
40152  fi
40153
40154  # Call helper function which possibly converts this using DOS-style short mode.
40155  # If so, the updated path is stored in $new_path.
40156  new_path="$input_to_shortpath"
40157
40158  input_path="$input_to_shortpath"
40159  # Check if we need to convert this using DOS-style short mode. If the path
40160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40161  # take no chances and rewrite it.
40162  # Note: m4 eats our [], so we need to use [ and ] instead.
40163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40164  if test "x$has_forbidden_chars" != x; then
40165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40166    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40167    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40168    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40169      # Going to short mode and back again did indeed matter. Since short mode is
40170      # case insensitive, let's make it lowercase to improve readability.
40171      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40172      # Now convert it back to Unix-stile (cygpath)
40173      input_path=`$CYGPATH -u "$shortmode_path"`
40174      new_path="$input_path"
40175    fi
40176  fi
40177
40178  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40179  if test "x$test_cygdrive_prefix" = x; then
40180    # As a simple fix, exclude /usr/bin since it's not a real path.
40181    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40182      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40183      # a path prefixed by /cygdrive for fixpath to work.
40184      new_path="$CYGWIN_ROOT_PATH$input_path"
40185    fi
40186  fi
40187
40188  # remove trailing .exe if any
40189  new_path="${new_path/%.exe/}"
40190
40191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40192
40193  # First separate the path from the arguments. This will split at the first
40194  # space.
40195  complete="$BUILD_CXX"
40196  path="${complete%% *}"
40197  tmp="$complete EOL"
40198  arguments="${tmp#* }"
40199
40200  # Input might be given as Windows format, start by converting to
40201  # unix format.
40202  new_path="$path"
40203
40204  windows_path="$new_path"
40205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40206    unix_path=`$CYGPATH -u "$windows_path"`
40207    new_path="$unix_path"
40208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40210    new_path="$unix_path"
40211  fi
40212
40213
40214  # Now try to locate executable using which
40215  new_path=`$WHICH "$new_path" 2> /dev/null`
40216
40217  if test "x$new_path" = x; then
40218    # Oops. Which didn't find the executable.
40219    # The splitting of arguments from the executable at a space might have been incorrect,
40220    # since paths with space are more likely in Windows. Give it another try with the whole
40221    # argument.
40222    path="$complete"
40223    arguments="EOL"
40224    new_path="$path"
40225
40226  windows_path="$new_path"
40227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40228    unix_path=`$CYGPATH -u "$windows_path"`
40229    new_path="$unix_path"
40230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40232    new_path="$unix_path"
40233  fi
40234
40235
40236    new_path=`$WHICH "$new_path" 2> /dev/null`
40237    # bat and cmd files are not always considered executable in MSYS causing which
40238    # to not find them
40239    if test "x$new_path" = x \
40240        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40241        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40242      new_path="$path"
40243
40244  windows_path="$new_path"
40245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40246    unix_path=`$CYGPATH -u "$windows_path"`
40247    new_path="$unix_path"
40248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40250    new_path="$unix_path"
40251  fi
40252
40253    fi
40254
40255    if test "x$new_path" = x; then
40256      # It's still not found. Now this is an unrecoverable error.
40257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40258$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40259      has_space=`$ECHO "$complete" | $GREP " "`
40260      if test "x$has_space" != x; then
40261        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40262$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40263      fi
40264      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40265    fi
40266  fi
40267
40268  # Now new_path has a complete unix path to the binary
40269  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40270    # Keep paths in /bin as-is, but remove trailing .exe if any
40271    new_path="${new_path/%.exe/}"
40272    # Do not save /bin paths to all_fixpath_prefixes!
40273  else
40274    # Not in mixed or Windows style, start by that.
40275    new_path=`cmd //c echo $new_path`
40276
40277  input_path="$new_path"
40278  # Check if we need to convert this using DOS-style short mode. If the path
40279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40280  # take no chances and rewrite it.
40281  # Note: m4 eats our [], so we need to use [ and ] instead.
40282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40283  if test "x$has_forbidden_chars" != x; then
40284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40285    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40286  fi
40287
40288    # Output is in $new_path
40289
40290  windows_path="$new_path"
40291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40292    unix_path=`$CYGPATH -u "$windows_path"`
40293    new_path="$unix_path"
40294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40296    new_path="$unix_path"
40297  fi
40298
40299    # remove trailing .exe if any
40300    new_path="${new_path/%.exe/}"
40301
40302    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40303    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40304  fi
40305
40306  else
40307    # We're on a unix platform. Hooray! :)
40308    # First separate the path from the arguments. This will split at the first
40309    # space.
40310    complete="$BUILD_CXX"
40311    path="${complete%% *}"
40312    tmp="$complete EOL"
40313    arguments="${tmp#* }"
40314
40315    # Cannot rely on the command "which" here since it doesn't always work.
40316    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40317    if test -z "$is_absolute_path"; then
40318      # Path to executable is not absolute. Find it.
40319      IFS_save="$IFS"
40320      IFS=:
40321      for p in $PATH; do
40322        if test -f "$p/$path" && test -x "$p/$path"; then
40323          new_path="$p/$path"
40324          break
40325        fi
40326      done
40327      IFS="$IFS_save"
40328    else
40329      # This is an absolute path, we can use it without further modifications.
40330      new_path="$path"
40331    fi
40332
40333    if test "x$new_path" = x; then
40334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40335$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40336      has_space=`$ECHO "$complete" | $GREP " "`
40337      if test "x$has_space" != x; then
40338        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40339$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40340      fi
40341      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40342    fi
40343  fi
40344
40345  # Now join together the path and the arguments once again
40346  if test "x$arguments" != xEOL; then
40347    new_complete="$new_path ${arguments% *}"
40348  else
40349    new_complete="$new_path"
40350  fi
40351
40352  if test "x$complete" != "x$new_complete"; then
40353    BUILD_CXX="$new_complete"
40354    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40355$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40356  fi
40357
40358
40359
40360  # Publish this variable in the help.
40361
40362
40363  if test "x$BUILD_LD" = x; then
40364    # The variable is not set by user, try to locate tool using the code snippet
40365    for ac_prog in ld
40366do
40367  # Extract the first word of "$ac_prog", so it can be a program name with args.
40368set dummy $ac_prog; ac_word=$2
40369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40370$as_echo_n "checking for $ac_word... " >&6; }
40371if ${ac_cv_path_BUILD_LD+:} false; then :
40372  $as_echo_n "(cached) " >&6
40373else
40374  case $BUILD_LD in
40375  [\\/]* | ?:[\\/]*)
40376  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40377  ;;
40378  *)
40379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40380for as_dir in $PATH
40381do
40382  IFS=$as_save_IFS
40383  test -z "$as_dir" && as_dir=.
40384    for ac_exec_ext in '' $ac_executable_extensions; do
40385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40386    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40388    break 2
40389  fi
40390done
40391  done
40392IFS=$as_save_IFS
40393
40394  ;;
40395esac
40396fi
40397BUILD_LD=$ac_cv_path_BUILD_LD
40398if test -n "$BUILD_LD"; then
40399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40400$as_echo "$BUILD_LD" >&6; }
40401else
40402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40403$as_echo "no" >&6; }
40404fi
40405
40406
40407  test -n "$BUILD_LD" && break
40408done
40409
40410  else
40411    # The variable is set, but is it from the command line or the environment?
40412
40413    # Try to remove the string !BUILD_LD! from our list.
40414    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40415    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40416      # If it failed, the variable was not from the command line. Ignore it,
40417      # but warn the user (except for BASH, which is always set by the calling BASH).
40418      if test "xBUILD_LD" != xBASH; then
40419        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40420$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40421      fi
40422      # Try to locate tool using the code snippet
40423      for ac_prog in ld
40424do
40425  # Extract the first word of "$ac_prog", so it can be a program name with args.
40426set dummy $ac_prog; ac_word=$2
40427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40428$as_echo_n "checking for $ac_word... " >&6; }
40429if ${ac_cv_path_BUILD_LD+:} false; then :
40430  $as_echo_n "(cached) " >&6
40431else
40432  case $BUILD_LD in
40433  [\\/]* | ?:[\\/]*)
40434  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40435  ;;
40436  *)
40437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40438for as_dir in $PATH
40439do
40440  IFS=$as_save_IFS
40441  test -z "$as_dir" && as_dir=.
40442    for ac_exec_ext in '' $ac_executable_extensions; do
40443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40444    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40446    break 2
40447  fi
40448done
40449  done
40450IFS=$as_save_IFS
40451
40452  ;;
40453esac
40454fi
40455BUILD_LD=$ac_cv_path_BUILD_LD
40456if test -n "$BUILD_LD"; then
40457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40458$as_echo "$BUILD_LD" >&6; }
40459else
40460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40461$as_echo "no" >&6; }
40462fi
40463
40464
40465  test -n "$BUILD_LD" && break
40466done
40467
40468    else
40469      # If it succeeded, then it was overridden by the user. We will use it
40470      # for the tool.
40471
40472      # First remove it from the list of overridden variables, so we can test
40473      # for unknown variables in the end.
40474      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40475
40476      # Check if the provided tool contains a complete path.
40477      tool_specified="$BUILD_LD"
40478      tool_basename="${tool_specified##*/}"
40479      if test "x$tool_basename" = "x$tool_specified"; then
40480        # A command without a complete path is provided, search $PATH.
40481        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40482$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40483        # Extract the first word of "$tool_basename", so it can be a program name with args.
40484set dummy $tool_basename; ac_word=$2
40485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40486$as_echo_n "checking for $ac_word... " >&6; }
40487if ${ac_cv_path_BUILD_LD+:} false; then :
40488  $as_echo_n "(cached) " >&6
40489else
40490  case $BUILD_LD in
40491  [\\/]* | ?:[\\/]*)
40492  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40493  ;;
40494  *)
40495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40496for as_dir in $PATH
40497do
40498  IFS=$as_save_IFS
40499  test -z "$as_dir" && as_dir=.
40500    for ac_exec_ext in '' $ac_executable_extensions; do
40501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40502    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40504    break 2
40505  fi
40506done
40507  done
40508IFS=$as_save_IFS
40509
40510  ;;
40511esac
40512fi
40513BUILD_LD=$ac_cv_path_BUILD_LD
40514if test -n "$BUILD_LD"; then
40515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40516$as_echo "$BUILD_LD" >&6; }
40517else
40518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40519$as_echo "no" >&6; }
40520fi
40521
40522
40523        if test "x$BUILD_LD" = x; then
40524          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40525        fi
40526      else
40527        # Otherwise we believe it is a complete path. Use it as it is.
40528        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40529$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40530        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40531$as_echo_n "checking for BUILD_LD... " >&6; }
40532        if test ! -x "$tool_specified"; then
40533          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40534$as_echo "not found" >&6; }
40535          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40536        fi
40537        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40538$as_echo "$tool_specified" >&6; }
40539      fi
40540    fi
40541  fi
40542
40543
40544
40545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40546
40547  # First separate the path from the arguments. This will split at the first
40548  # space.
40549  complete="$BUILD_LD"
40550  path="${complete%% *}"
40551  tmp="$complete EOL"
40552  arguments="${tmp#* }"
40553
40554  # Input might be given as Windows format, start by converting to
40555  # unix format.
40556  new_path=`$CYGPATH -u "$path"`
40557
40558  # Now try to locate executable using which
40559  new_path=`$WHICH "$new_path" 2> /dev/null`
40560  # bat and cmd files are not always considered executable in cygwin causing which
40561  # to not find them
40562  if test "x$new_path" = x \
40563      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40564      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40565    new_path=`$CYGPATH -u "$path"`
40566  fi
40567  if test "x$new_path" = x; then
40568    # Oops. Which didn't find the executable.
40569    # The splitting of arguments from the executable at a space might have been incorrect,
40570    # since paths with space are more likely in Windows. Give it another try with the whole
40571    # argument.
40572    path="$complete"
40573    arguments="EOL"
40574    new_path=`$CYGPATH -u "$path"`
40575    new_path=`$WHICH "$new_path" 2> /dev/null`
40576    # bat and cmd files are not always considered executable in cygwin causing which
40577    # to not find them
40578    if test "x$new_path" = x \
40579        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40580        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40581      new_path=`$CYGPATH -u "$path"`
40582    fi
40583    if test "x$new_path" = x; then
40584      # It's still not found. Now this is an unrecoverable error.
40585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40586$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40587      has_space=`$ECHO "$complete" | $GREP " "`
40588      if test "x$has_space" != x; then
40589        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40590$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40591      fi
40592      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40593    fi
40594  fi
40595
40596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40599  # "foo.exe" is OK but "foo" is an error.
40600  #
40601  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40602  # It is also a way to make sure we got the proper file name for the real test later on.
40603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40604  if test "x$test_shortpath" = x; then
40605    # Short path failed, file does not exist as specified.
40606    # Try adding .exe or .cmd
40607    if test -f "${new_path}.exe"; then
40608      input_to_shortpath="${new_path}.exe"
40609    elif test -f "${new_path}.cmd"; then
40610      input_to_shortpath="${new_path}.cmd"
40611    else
40612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40613$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40614      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40615$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40616      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40617    fi
40618  else
40619    input_to_shortpath="$new_path"
40620  fi
40621
40622  # Call helper function which possibly converts this using DOS-style short mode.
40623  # If so, the updated path is stored in $new_path.
40624  new_path="$input_to_shortpath"
40625
40626  input_path="$input_to_shortpath"
40627  # Check if we need to convert this using DOS-style short mode. If the path
40628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40629  # take no chances and rewrite it.
40630  # Note: m4 eats our [], so we need to use [ and ] instead.
40631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40632  if test "x$has_forbidden_chars" != x; then
40633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40634    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40635    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40636    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40637      # Going to short mode and back again did indeed matter. Since short mode is
40638      # case insensitive, let's make it lowercase to improve readability.
40639      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40640      # Now convert it back to Unix-stile (cygpath)
40641      input_path=`$CYGPATH -u "$shortmode_path"`
40642      new_path="$input_path"
40643    fi
40644  fi
40645
40646  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40647  if test "x$test_cygdrive_prefix" = x; then
40648    # As a simple fix, exclude /usr/bin since it's not a real path.
40649    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40650      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40651      # a path prefixed by /cygdrive for fixpath to work.
40652      new_path="$CYGWIN_ROOT_PATH$input_path"
40653    fi
40654  fi
40655
40656  # remove trailing .exe if any
40657  new_path="${new_path/%.exe/}"
40658
40659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40660
40661  # First separate the path from the arguments. This will split at the first
40662  # space.
40663  complete="$BUILD_LD"
40664  path="${complete%% *}"
40665  tmp="$complete EOL"
40666  arguments="${tmp#* }"
40667
40668  # Input might be given as Windows format, start by converting to
40669  # unix format.
40670  new_path="$path"
40671
40672  windows_path="$new_path"
40673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40674    unix_path=`$CYGPATH -u "$windows_path"`
40675    new_path="$unix_path"
40676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40678    new_path="$unix_path"
40679  fi
40680
40681
40682  # Now try to locate executable using which
40683  new_path=`$WHICH "$new_path" 2> /dev/null`
40684
40685  if test "x$new_path" = x; then
40686    # Oops. Which didn't find the executable.
40687    # The splitting of arguments from the executable at a space might have been incorrect,
40688    # since paths with space are more likely in Windows. Give it another try with the whole
40689    # argument.
40690    path="$complete"
40691    arguments="EOL"
40692    new_path="$path"
40693
40694  windows_path="$new_path"
40695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40696    unix_path=`$CYGPATH -u "$windows_path"`
40697    new_path="$unix_path"
40698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40700    new_path="$unix_path"
40701  fi
40702
40703
40704    new_path=`$WHICH "$new_path" 2> /dev/null`
40705    # bat and cmd files are not always considered executable in MSYS causing which
40706    # to not find them
40707    if test "x$new_path" = x \
40708        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40709        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40710      new_path="$path"
40711
40712  windows_path="$new_path"
40713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40714    unix_path=`$CYGPATH -u "$windows_path"`
40715    new_path="$unix_path"
40716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40718    new_path="$unix_path"
40719  fi
40720
40721    fi
40722
40723    if test "x$new_path" = x; then
40724      # It's still not found. Now this is an unrecoverable error.
40725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40726$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40727      has_space=`$ECHO "$complete" | $GREP " "`
40728      if test "x$has_space" != x; then
40729        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40730$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40731      fi
40732      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40733    fi
40734  fi
40735
40736  # Now new_path has a complete unix path to the binary
40737  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40738    # Keep paths in /bin as-is, but remove trailing .exe if any
40739    new_path="${new_path/%.exe/}"
40740    # Do not save /bin paths to all_fixpath_prefixes!
40741  else
40742    # Not in mixed or Windows style, start by that.
40743    new_path=`cmd //c echo $new_path`
40744
40745  input_path="$new_path"
40746  # Check if we need to convert this using DOS-style short mode. If the path
40747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40748  # take no chances and rewrite it.
40749  # Note: m4 eats our [], so we need to use [ and ] instead.
40750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40751  if test "x$has_forbidden_chars" != x; then
40752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40753    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40754  fi
40755
40756    # Output is in $new_path
40757
40758  windows_path="$new_path"
40759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40760    unix_path=`$CYGPATH -u "$windows_path"`
40761    new_path="$unix_path"
40762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40764    new_path="$unix_path"
40765  fi
40766
40767    # remove trailing .exe if any
40768    new_path="${new_path/%.exe/}"
40769
40770    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40771    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40772  fi
40773
40774  else
40775    # We're on a unix platform. Hooray! :)
40776    # First separate the path from the arguments. This will split at the first
40777    # space.
40778    complete="$BUILD_LD"
40779    path="${complete%% *}"
40780    tmp="$complete EOL"
40781    arguments="${tmp#* }"
40782
40783    # Cannot rely on the command "which" here since it doesn't always work.
40784    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40785    if test -z "$is_absolute_path"; then
40786      # Path to executable is not absolute. Find it.
40787      IFS_save="$IFS"
40788      IFS=:
40789      for p in $PATH; do
40790        if test -f "$p/$path" && test -x "$p/$path"; then
40791          new_path="$p/$path"
40792          break
40793        fi
40794      done
40795      IFS="$IFS_save"
40796    else
40797      # This is an absolute path, we can use it without further modifications.
40798      new_path="$path"
40799    fi
40800
40801    if test "x$new_path" = x; then
40802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40803$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40804      has_space=`$ECHO "$complete" | $GREP " "`
40805      if test "x$has_space" != x; then
40806        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40807$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40808      fi
40809      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40810    fi
40811  fi
40812
40813  # Now join together the path and the arguments once again
40814  if test "x$arguments" != xEOL; then
40815    new_complete="$new_path ${arguments% *}"
40816  else
40817    new_complete="$new_path"
40818  fi
40819
40820  if test "x$complete" != "x$new_complete"; then
40821    BUILD_LD="$new_complete"
40822    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40823$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40824  fi
40825
40826  else
40827    # If we are not cross compiling, use the normal target compilers for
40828    # building the build platform executables.
40829    BUILD_CC="$CC"
40830    BUILD_CXX="$CXX"
40831    BUILD_LD="$LD"
40832  fi
40833
40834
40835
40836
40837
40838
40839  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40840    # For hotspot, we need these in Windows mixed path,
40841    # so rewrite them all. Need added .exe suffix.
40842    HOTSPOT_CXX="$CXX.exe"
40843    HOTSPOT_LD="$LD.exe"
40844    HOTSPOT_MT="$MT.exe"
40845    HOTSPOT_RC="$RC.exe"
40846
40847  unix_path="$HOTSPOT_CXX"
40848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40849    windows_path=`$CYGPATH -m "$unix_path"`
40850    HOTSPOT_CXX="$windows_path"
40851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40852    windows_path=`cmd //c echo $unix_path`
40853    HOTSPOT_CXX="$windows_path"
40854  fi
40855
40856
40857  unix_path="$HOTSPOT_LD"
40858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40859    windows_path=`$CYGPATH -m "$unix_path"`
40860    HOTSPOT_LD="$windows_path"
40861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40862    windows_path=`cmd //c echo $unix_path`
40863    HOTSPOT_LD="$windows_path"
40864  fi
40865
40866
40867  unix_path="$HOTSPOT_MT"
40868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40869    windows_path=`$CYGPATH -m "$unix_path"`
40870    HOTSPOT_MT="$windows_path"
40871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40872    windows_path=`cmd //c echo $unix_path`
40873    HOTSPOT_MT="$windows_path"
40874  fi
40875
40876
40877  unix_path="$HOTSPOT_RC"
40878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40879    windows_path=`$CYGPATH -m "$unix_path"`
40880    HOTSPOT_RC="$windows_path"
40881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40882    windows_path=`cmd //c echo $unix_path`
40883    HOTSPOT_RC="$windows_path"
40884  fi
40885
40886
40887
40888  else
40889    HOTSPOT_CXX="$CXX"
40890    HOTSPOT_LD="$LD"
40891  fi
40892
40893
40894
40895  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40896    USE_CLANG=true
40897  fi
40898
40899
40900  # LDEXE is the linker to use, when creating executables. Not really used.
40901  # FIXME: These should just be removed!
40902  LDEXE="$LD"
40903  LDEXECXX="$LDCXX"
40904
40905
40906
40907
40908
40909
40910  # The package path is used only on macosx?
40911  # FIXME: clean this up, and/or move it elsewhere.
40912  PACKAGE_PATH=/opt/local
40913
40914
40915  # Check for extra potential brokenness.
40916  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40917    # On Windows, double-check that we got the right compiler.
40918    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40919    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40920    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40921      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40922        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40923      fi
40924    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40925      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40926        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40927      fi
40928    fi
40929  fi
40930
40931  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40932    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40933    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40934    # This is later checked when setting flags.
40935
40936    # "-Og" suppported for GCC 4.8 and later
40937    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40938
40939  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40940$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40941  supports=yes
40942
40943  saved_cflags="$CFLAGS"
40944  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40945  ac_ext=c
40946ac_cpp='$CPP $CPPFLAGS'
40947ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40948ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40949ac_compiler_gnu=$ac_cv_c_compiler_gnu
40950
40951  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40952/* end confdefs.h.  */
40953int i;
40954_ACEOF
40955if ac_fn_c_try_compile "$LINENO"; then :
40956
40957else
40958  supports=no
40959fi
40960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40961  ac_ext=cpp
40962ac_cpp='$CXXCPP $CPPFLAGS'
40963ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40964ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40965ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40966
40967  CFLAGS="$saved_cflags"
40968
40969  saved_cxxflags="$CXXFLAGS"
40970  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40971  ac_ext=cpp
40972ac_cpp='$CXXCPP $CPPFLAGS'
40973ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40974ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40975ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40976
40977  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40978/* end confdefs.h.  */
40979int i;
40980_ACEOF
40981if ac_fn_cxx_try_compile "$LINENO"; then :
40982
40983else
40984  supports=no
40985fi
40986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40987  ac_ext=cpp
40988ac_cpp='$CXXCPP $CPPFLAGS'
40989ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40990ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40991ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40992
40993  CXXFLAGS="$saved_cxxflags"
40994
40995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40996$as_echo "$supports" >&6; }
40997  if test "x$supports" = "xyes" ; then
40998    HAS_CFLAG_OPTIMIZE_DEBUG=true
40999  else
41000    HAS_CFLAG_OPTIMIZE_DEBUG=false
41001  fi
41002
41003
41004    # "-z relro" supported in GNU binutils 2.17 and later
41005    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
41006
41007  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
41008$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
41009  supports=yes
41010
41011  saved_ldflags="$LDFLAGS"
41012  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
41013  ac_ext=c
41014ac_cpp='$CPP $CPPFLAGS'
41015ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41016ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41017ac_compiler_gnu=$ac_cv_c_compiler_gnu
41018
41019  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41020/* end confdefs.h.  */
41021
41022int
41023main ()
41024{
41025
41026  ;
41027  return 0;
41028}
41029_ACEOF
41030if ac_fn_c_try_link "$LINENO"; then :
41031
41032else
41033  supports=no
41034fi
41035rm -f core conftest.err conftest.$ac_objext \
41036    conftest$ac_exeext conftest.$ac_ext
41037  ac_ext=cpp
41038ac_cpp='$CXXCPP $CPPFLAGS'
41039ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41040ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41041ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41042
41043  LDFLAGS="$saved_ldflags"
41044
41045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41046$as_echo "$supports" >&6; }
41047  if test "x$supports" = "xyes" ; then
41048    HAS_LINKER_RELRO=true
41049  else
41050    HAS_LINKER_RELRO=false
41051  fi
41052
41053
41054    # "-z now" supported in GNU binutils 2.11 and later
41055    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41056
41057  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41058$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41059  supports=yes
41060
41061  saved_ldflags="$LDFLAGS"
41062  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41063  ac_ext=c
41064ac_cpp='$CPP $CPPFLAGS'
41065ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41066ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41067ac_compiler_gnu=$ac_cv_c_compiler_gnu
41068
41069  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41070/* end confdefs.h.  */
41071
41072int
41073main ()
41074{
41075
41076  ;
41077  return 0;
41078}
41079_ACEOF
41080if ac_fn_c_try_link "$LINENO"; then :
41081
41082else
41083  supports=no
41084fi
41085rm -f core conftest.err conftest.$ac_objext \
41086    conftest$ac_exeext conftest.$ac_ext
41087  ac_ext=cpp
41088ac_cpp='$CXXCPP $CPPFLAGS'
41089ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41090ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41091ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41092
41093  LDFLAGS="$saved_ldflags"
41094
41095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41096$as_echo "$supports" >&6; }
41097  if test "x$supports" = "xyes" ; then
41098    HAS_LINKER_NOW=true
41099  else
41100    HAS_LINKER_NOW=false
41101  fi
41102
41103  fi
41104
41105  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41106  # in executable.'
41107  USING_BROKEN_SUSE_LD=no
41108  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41109    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41110$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41111    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41112    $ECHO "int main() { }" > main.c
41113    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41114      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41115$as_echo "no" >&6; }
41116      USING_BROKEN_SUSE_LD=no
41117    else
41118      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41119$as_echo "yes" >&6; }
41120      USING_BROKEN_SUSE_LD=yes
41121    fi
41122    rm -rf version-script.map main.c a.out
41123  fi
41124
41125
41126
41127# Setup the JTReg Regression Test Harness.
41128
41129
41130# Check whether --with-jtreg was given.
41131if test "${with_jtreg+set}" = set; then :
41132  withval=$with_jtreg;
41133else
41134  with_jtreg=no
41135fi
41136
41137
41138  if test "x$with_jtreg" = xno; then
41139    # jtreg disabled
41140    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41141$as_echo_n "checking for jtreg... " >&6; }
41142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41143$as_echo "no" >&6; }
41144  else
41145    if test "x$with_jtreg" != xyes; then
41146      # with path specified.
41147      JT_HOME="$with_jtreg"
41148    fi
41149
41150    if test "x$JT_HOME" != x; then
41151      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41152$as_echo_n "checking for jtreg... " >&6; }
41153
41154      # use JT_HOME enviroment var.
41155
41156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41157
41158  # Input might be given as Windows format, start by converting to
41159  # unix format.
41160  path="$JT_HOME"
41161  new_path=`$CYGPATH -u "$path"`
41162
41163  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41164  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41165  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41166  # "foo.exe" is OK but "foo" is an error.
41167  #
41168  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41169  # It is also a way to make sure we got the proper file name for the real test later on.
41170  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41171  if test "x$test_shortpath" = x; then
41172    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41173$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41174    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41175  fi
41176
41177  # Call helper function which possibly converts this using DOS-style short mode.
41178  # If so, the updated path is stored in $new_path.
41179
41180  input_path="$new_path"
41181  # Check if we need to convert this using DOS-style short mode. If the path
41182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41183  # take no chances and rewrite it.
41184  # Note: m4 eats our [], so we need to use [ and ] instead.
41185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41186  if test "x$has_forbidden_chars" != x; then
41187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41191      # Going to short mode and back again did indeed matter. Since short mode is
41192      # case insensitive, let's make it lowercase to improve readability.
41193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41194      # Now convert it back to Unix-stile (cygpath)
41195      input_path=`$CYGPATH -u "$shortmode_path"`
41196      new_path="$input_path"
41197    fi
41198  fi
41199
41200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41201  if test "x$test_cygdrive_prefix" = x; then
41202    # As a simple fix, exclude /usr/bin since it's not a real path.
41203    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41205      # a path prefixed by /cygdrive for fixpath to work.
41206      new_path="$CYGWIN_ROOT_PATH$input_path"
41207    fi
41208  fi
41209
41210
41211  if test "x$path" != "x$new_path"; then
41212    JT_HOME="$new_path"
41213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41214$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41215  fi
41216
41217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41218
41219  path="$JT_HOME"
41220  has_colon=`$ECHO $path | $GREP ^.:`
41221  new_path="$path"
41222  if test "x$has_colon" = x; then
41223    # Not in mixed or Windows style, start by that.
41224    new_path=`cmd //c echo $path`
41225  fi
41226
41227
41228  input_path="$new_path"
41229  # Check if we need to convert this using DOS-style short mode. If the path
41230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41231  # take no chances and rewrite it.
41232  # Note: m4 eats our [], so we need to use [ and ] instead.
41233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41234  if test "x$has_forbidden_chars" != x; then
41235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41236    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41237  fi
41238
41239
41240  windows_path="$new_path"
41241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41242    unix_path=`$CYGPATH -u "$windows_path"`
41243    new_path="$unix_path"
41244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41246    new_path="$unix_path"
41247  fi
41248
41249  if test "x$path" != "x$new_path"; then
41250    JT_HOME="$new_path"
41251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41252$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41253  fi
41254
41255  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41256  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41257
41258  else
41259    # We're on a unix platform. Hooray! :)
41260    path="$JT_HOME"
41261    has_space=`$ECHO "$path" | $GREP " "`
41262    if test "x$has_space" != x; then
41263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41264$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41265      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41266    fi
41267
41268    # Use eval to expand a potential ~
41269    eval path="$path"
41270    if test ! -f "$path" && test ! -d "$path"; then
41271      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41272    fi
41273
41274    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41275  fi
41276
41277
41278      # jtreg win32 script works for everybody
41279      JTREGEXE="$JT_HOME/win32/bin/jtreg"
41280
41281      if test ! -f "$JTREGEXE"; then
41282        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41283      fi
41284
41285      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41286$as_echo "$JTREGEXE" >&6; }
41287    else
41288      # try to find jtreg on path
41289
41290
41291
41292  # Publish this variable in the help.
41293
41294
41295  if test "x$JTREGEXE" = x; then
41296    # The variable is not set by user, try to locate tool using the code snippet
41297    for ac_prog in jtreg
41298do
41299  # Extract the first word of "$ac_prog", so it can be a program name with args.
41300set dummy $ac_prog; ac_word=$2
41301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41302$as_echo_n "checking for $ac_word... " >&6; }
41303if ${ac_cv_path_JTREGEXE+:} false; then :
41304  $as_echo_n "(cached) " >&6
41305else
41306  case $JTREGEXE in
41307  [\\/]* | ?:[\\/]*)
41308  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41309  ;;
41310  *)
41311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41312for as_dir in $PATH
41313do
41314  IFS=$as_save_IFS
41315  test -z "$as_dir" && as_dir=.
41316    for ac_exec_ext in '' $ac_executable_extensions; do
41317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41318    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41320    break 2
41321  fi
41322done
41323  done
41324IFS=$as_save_IFS
41325
41326  ;;
41327esac
41328fi
41329JTREGEXE=$ac_cv_path_JTREGEXE
41330if test -n "$JTREGEXE"; then
41331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41332$as_echo "$JTREGEXE" >&6; }
41333else
41334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41335$as_echo "no" >&6; }
41336fi
41337
41338
41339  test -n "$JTREGEXE" && break
41340done
41341
41342  else
41343    # The variable is set, but is it from the command line or the environment?
41344
41345    # Try to remove the string !JTREGEXE! from our list.
41346    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41347    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41348      # If it failed, the variable was not from the command line. Ignore it,
41349      # but warn the user (except for BASH, which is always set by the calling BASH).
41350      if test "xJTREGEXE" != xBASH; then
41351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41352$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41353      fi
41354      # Try to locate tool using the code snippet
41355      for ac_prog in jtreg
41356do
41357  # Extract the first word of "$ac_prog", so it can be a program name with args.
41358set dummy $ac_prog; ac_word=$2
41359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41360$as_echo_n "checking for $ac_word... " >&6; }
41361if ${ac_cv_path_JTREGEXE+:} false; then :
41362  $as_echo_n "(cached) " >&6
41363else
41364  case $JTREGEXE in
41365  [\\/]* | ?:[\\/]*)
41366  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41367  ;;
41368  *)
41369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41370for as_dir in $PATH
41371do
41372  IFS=$as_save_IFS
41373  test -z "$as_dir" && as_dir=.
41374    for ac_exec_ext in '' $ac_executable_extensions; do
41375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41376    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41378    break 2
41379  fi
41380done
41381  done
41382IFS=$as_save_IFS
41383
41384  ;;
41385esac
41386fi
41387JTREGEXE=$ac_cv_path_JTREGEXE
41388if test -n "$JTREGEXE"; then
41389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41390$as_echo "$JTREGEXE" >&6; }
41391else
41392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41393$as_echo "no" >&6; }
41394fi
41395
41396
41397  test -n "$JTREGEXE" && break
41398done
41399
41400    else
41401      # If it succeeded, then it was overridden by the user. We will use it
41402      # for the tool.
41403
41404      # First remove it from the list of overridden variables, so we can test
41405      # for unknown variables in the end.
41406      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41407
41408      # Check if the provided tool contains a complete path.
41409      tool_specified="$JTREGEXE"
41410      tool_basename="${tool_specified##*/}"
41411      if test "x$tool_basename" = "x$tool_specified"; then
41412        # A command without a complete path is provided, search $PATH.
41413        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41414$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41415        # Extract the first word of "$tool_basename", so it can be a program name with args.
41416set dummy $tool_basename; ac_word=$2
41417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41418$as_echo_n "checking for $ac_word... " >&6; }
41419if ${ac_cv_path_JTREGEXE+:} false; then :
41420  $as_echo_n "(cached) " >&6
41421else
41422  case $JTREGEXE in
41423  [\\/]* | ?:[\\/]*)
41424  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41425  ;;
41426  *)
41427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41428for as_dir in $PATH
41429do
41430  IFS=$as_save_IFS
41431  test -z "$as_dir" && as_dir=.
41432    for ac_exec_ext in '' $ac_executable_extensions; do
41433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41434    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41436    break 2
41437  fi
41438done
41439  done
41440IFS=$as_save_IFS
41441
41442  ;;
41443esac
41444fi
41445JTREGEXE=$ac_cv_path_JTREGEXE
41446if test -n "$JTREGEXE"; then
41447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41448$as_echo "$JTREGEXE" >&6; }
41449else
41450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41451$as_echo "no" >&6; }
41452fi
41453
41454
41455        if test "x$JTREGEXE" = x; then
41456          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41457        fi
41458      else
41459        # Otherwise we believe it is a complete path. Use it as it is.
41460        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41461$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41462        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41463$as_echo_n "checking for JTREGEXE... " >&6; }
41464        if test ! -x "$tool_specified"; then
41465          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41466$as_echo "not found" >&6; }
41467          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41468        fi
41469        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41470$as_echo "$tool_specified" >&6; }
41471      fi
41472    fi
41473  fi
41474
41475
41476
41477  if test "x$JTREGEXE" = x; then
41478    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41479  fi
41480
41481
41482      JT_HOME="`$DIRNAME $JTREGEXE`"
41483    fi
41484  fi
41485
41486
41487
41488
41489
41490
41491  # Option used to tell the compiler whether to create 32- or 64-bit executables
41492  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41493    COMPILER_TARGET_BITS_FLAG="-q"
41494  else
41495    COMPILER_TARGET_BITS_FLAG="-m"
41496  fi
41497
41498
41499  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41500  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41501    ARFLAGS="-r"
41502  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41503    ARFLAGS="-X64"
41504  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41505    # lib.exe is used as AR to create static libraries.
41506    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41507  else
41508    ARFLAGS=""
41509  fi
41510
41511
41512  ## Setup strip.
41513  # FIXME: should this really be per platform, or should it be per toolchain type?
41514  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41515  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41516  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41517    STRIPFLAGS="-g"
41518  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41519    STRIPFLAGS="-x"
41520  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41521    STRIPFLAGS="-S"
41522  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41523    STRIPFLAGS="-X32_64"
41524  fi
41525
41526  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41527    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41528  fi
41529
41530
41531  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41532    # FIXME: break out into MCSFLAGS
41533    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41534  fi
41535
41536
41537  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41538    CC_OUT_OPTION=-Fo
41539    EXE_OUT_OPTION=-out:
41540    LD_OUT_OPTION=-out:
41541    AR_OUT_OPTION=-out:
41542  else
41543    # The option used to specify the target .o,.a or .so file.
41544    # When compiling, how to specify the to be created object file.
41545    CC_OUT_OPTION='-o$(SPACE)'
41546    # When linking, how to specify the to be created executable.
41547    EXE_OUT_OPTION='-o$(SPACE)'
41548    # When linking, how to specify the to be created dynamically linkable library.
41549    LD_OUT_OPTION='-o$(SPACE)'
41550    # When archiving, how to specify the to be create static archive for object files.
41551    AR_OUT_OPTION='rcs$(SPACE)'
41552  fi
41553
41554
41555
41556
41557
41558  # On Windows, we need to set RC flags.
41559  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41560    RC_FLAGS="-nologo -l0x409"
41561    if test "x$VARIANT" = xOPT; then
41562      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41563    fi
41564
41565    # The version variables used to create RC_FLAGS may be overridden
41566    # in a custom configure script, or possibly the command line.
41567    # Let those variables be expanded at make time in spec.gmk.
41568    # The \$ are escaped to the shell, and the $(...) variables
41569    # are evaluated by make.
41570    RC_FLAGS="$RC_FLAGS \
41571        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41572        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41573        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41574        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41575        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41576        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41577        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41578  fi
41579
41580
41581  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41582    # silence copyright notice and other headers.
41583    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41584  fi
41585
41586  if test "x$SYSROOT" != "x"; then
41587    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41588      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41589        # Solaris Studio does not have a concept of sysroot. Instead we must
41590        # make sure the default include and lib dirs are appended to each
41591        # compile and link command line.
41592        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41593        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41594            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41595            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41596      fi
41597    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41598      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41599      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41600      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41601    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41602      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41603      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41604    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41605      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41606      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41607    fi
41608    # Propagate the sysroot args to hotspot
41609    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41610    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41611    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41612  fi
41613
41614  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41615  # set this here so it doesn't have to be peppered throughout the forest
41616  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41617    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41618    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41619  fi
41620
41621
41622
41623
41624
41625# FIXME: Currently we must test this after toolchain but before flags. Fix!
41626
41627# Now we can test some aspects on the target using configure macros.
41628
41629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41630$as_echo_n "checking for ANSI C header files... " >&6; }
41631if ${ac_cv_header_stdc+:} false; then :
41632  $as_echo_n "(cached) " >&6
41633else
41634  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41635/* end confdefs.h.  */
41636#include <stdlib.h>
41637#include <stdarg.h>
41638#include <string.h>
41639#include <float.h>
41640
41641int
41642main ()
41643{
41644
41645  ;
41646  return 0;
41647}
41648_ACEOF
41649if ac_fn_cxx_try_compile "$LINENO"; then :
41650  ac_cv_header_stdc=yes
41651else
41652  ac_cv_header_stdc=no
41653fi
41654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41655
41656if test $ac_cv_header_stdc = yes; then
41657  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41658  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41659/* end confdefs.h.  */
41660#include <string.h>
41661
41662_ACEOF
41663if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41664  $EGREP "memchr" >/dev/null 2>&1; then :
41665
41666else
41667  ac_cv_header_stdc=no
41668fi
41669rm -f conftest*
41670
41671fi
41672
41673if test $ac_cv_header_stdc = yes; then
41674  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41675  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41676/* end confdefs.h.  */
41677#include <stdlib.h>
41678
41679_ACEOF
41680if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41681  $EGREP "free" >/dev/null 2>&1; then :
41682
41683else
41684  ac_cv_header_stdc=no
41685fi
41686rm -f conftest*
41687
41688fi
41689
41690if test $ac_cv_header_stdc = yes; then
41691  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41692  if test "$cross_compiling" = yes; then :
41693  :
41694else
41695  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41696/* end confdefs.h.  */
41697#include <ctype.h>
41698#include <stdlib.h>
41699#if ((' ' & 0x0FF) == 0x020)
41700# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41701# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41702#else
41703# define ISLOWER(c) \
41704		   (('a' <= (c) && (c) <= 'i') \
41705		     || ('j' <= (c) && (c) <= 'r') \
41706		     || ('s' <= (c) && (c) <= 'z'))
41707# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41708#endif
41709
41710#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41711int
41712main ()
41713{
41714  int i;
41715  for (i = 0; i < 256; i++)
41716    if (XOR (islower (i), ISLOWER (i))
41717	|| toupper (i) != TOUPPER (i))
41718      return 2;
41719  return 0;
41720}
41721_ACEOF
41722if ac_fn_cxx_try_run "$LINENO"; then :
41723
41724else
41725  ac_cv_header_stdc=no
41726fi
41727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41728  conftest.$ac_objext conftest.beam conftest.$ac_ext
41729fi
41730
41731fi
41732fi
41733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41734$as_echo "$ac_cv_header_stdc" >&6; }
41735if test $ac_cv_header_stdc = yes; then
41736
41737$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41738
41739fi
41740
41741# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41742for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41743		  inttypes.h stdint.h unistd.h
41744do :
41745  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41746ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41747"
41748if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41749  cat >>confdefs.h <<_ACEOF
41750#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41751_ACEOF
41752
41753fi
41754
41755done
41756
41757
41758
41759  ###############################################################################
41760  #
41761  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41762  # (The JVM can use 32 or 64 bit Java pointers but that decision
41763  # is made at runtime.)
41764  #
41765
41766  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41767    # Always specify -m flag on Solaris
41768    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41769
41770  # When we add flags to the "official" CFLAGS etc, we need to
41771  # keep track of these additions in ADDED_CFLAGS etc. These
41772  # will later be checked to make sure only controlled additions
41773  # have been made to CFLAGS etc.
41774  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41775  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41776  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41777
41778  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41779  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41780  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41781
41782  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41783  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41784  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41785
41786  elif test "x$COMPILE_TYPE" = xreduced; then
41787    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41788      # Specify -m if running reduced on unix platforms
41789
41790  # When we add flags to the "official" CFLAGS etc, we need to
41791  # keep track of these additions in ADDED_CFLAGS etc. These
41792  # will later be checked to make sure only controlled additions
41793  # have been made to CFLAGS etc.
41794  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41795  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41796  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41797
41798  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41799  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41800  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41801
41802  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41803  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41804  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41805
41806    fi
41807  fi
41808
41809  # Make compilation sanity check
41810  for ac_header in stdio.h
41811do :
41812  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41813if test "x$ac_cv_header_stdio_h" = xyes; then :
41814  cat >>confdefs.h <<_ACEOF
41815#define HAVE_STDIO_H 1
41816_ACEOF
41817
41818else
41819
41820    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41821$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41822    if test "x$COMPILE_TYPE" = xreduced; then
41823      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41824$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41825    elif test "x$COMPILE_TYPE" = xcross; then
41826      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41827$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41828    fi
41829    as_fn_error $? "Cannot continue." "$LINENO" 5
41830
41831fi
41832
41833done
41834
41835
41836  # The cast to long int works around a bug in the HP C Compiler
41837# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41838# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41839# This bug is HP SR number 8606223364.
41840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41841$as_echo_n "checking size of int *... " >&6; }
41842if ${ac_cv_sizeof_int_p+:} false; then :
41843  $as_echo_n "(cached) " >&6
41844else
41845  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41846
41847else
41848  if test "$ac_cv_type_int_p" = yes; then
41849     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41850$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41851as_fn_error 77 "cannot compute sizeof (int *)
41852See \`config.log' for more details" "$LINENO" 5; }
41853   else
41854     ac_cv_sizeof_int_p=0
41855   fi
41856fi
41857
41858fi
41859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41860$as_echo "$ac_cv_sizeof_int_p" >&6; }
41861
41862
41863
41864cat >>confdefs.h <<_ACEOF
41865#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41866_ACEOF
41867
41868
41869
41870  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41871  if test "x$ac_cv_sizeof_int_p" = x; then
41872    # The test failed, lets stick to the assumed value.
41873    { $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
41874$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41875  else
41876    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41877
41878    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41879      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41880      # Let's try to implicitely set the compilers target architecture and retry the test
41881      { $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
41882$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;}
41883      { $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
41884$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;}
41885
41886  # When we add flags to the "official" CFLAGS etc, we need to
41887  # keep track of these additions in ADDED_CFLAGS etc. These
41888  # will later be checked to make sure only controlled additions
41889  # have been made to CFLAGS etc.
41890  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41891  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41892  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41893
41894  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41895  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41896  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41897
41898  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41899  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41900  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41901
41902
41903      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41904      unset ac_cv_sizeof_int_p
41905      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41906      cat >>confdefs.h <<_ACEOF
41907#undef SIZEOF_INT_P
41908_ACEOF
41909
41910      # The cast to long int works around a bug in the HP C Compiler
41911# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41912# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41913# This bug is HP SR number 8606223364.
41914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41915$as_echo_n "checking size of int *... " >&6; }
41916if ${ac_cv_sizeof_int_p+:} false; then :
41917  $as_echo_n "(cached) " >&6
41918else
41919  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41920
41921else
41922  if test "$ac_cv_type_int_p" = yes; then
41923     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41924$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41925as_fn_error 77 "cannot compute sizeof (int *)
41926See \`config.log' for more details" "$LINENO" 5; }
41927   else
41928     ac_cv_sizeof_int_p=0
41929   fi
41930fi
41931
41932fi
41933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41934$as_echo "$ac_cv_sizeof_int_p" >&6; }
41935
41936
41937
41938cat >>confdefs.h <<_ACEOF
41939#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41940_ACEOF
41941
41942
41943
41944      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41945
41946      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41947        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
41948      fi
41949    fi
41950  fi
41951
41952  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41953$as_echo_n "checking for target address size... " >&6; }
41954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41955$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41956
41957
41958  ###############################################################################
41959  #
41960  # Is the target little of big endian?
41961  #
41962   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41963$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41964if ${ac_cv_c_bigendian+:} false; then :
41965  $as_echo_n "(cached) " >&6
41966else
41967  ac_cv_c_bigendian=unknown
41968    # See if we're dealing with a universal compiler.
41969    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41970/* end confdefs.h.  */
41971#ifndef __APPLE_CC__
41972	       not a universal capable compiler
41973	     #endif
41974	     typedef int dummy;
41975
41976_ACEOF
41977if ac_fn_cxx_try_compile "$LINENO"; then :
41978
41979	# Check for potential -arch flags.  It is not universal unless
41980	# there are at least two -arch flags with different values.
41981	ac_arch=
41982	ac_prev=
41983	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41984	 if test -n "$ac_prev"; then
41985	   case $ac_word in
41986	     i?86 | x86_64 | ppc | ppc64)
41987	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41988		 ac_arch=$ac_word
41989	       else
41990		 ac_cv_c_bigendian=universal
41991		 break
41992	       fi
41993	       ;;
41994	   esac
41995	   ac_prev=
41996	 elif test "x$ac_word" = "x-arch"; then
41997	   ac_prev=arch
41998	 fi
41999       done
42000fi
42001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42002    if test $ac_cv_c_bigendian = unknown; then
42003      # See if sys/param.h defines the BYTE_ORDER macro.
42004      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42005/* end confdefs.h.  */
42006#include <sys/types.h>
42007	     #include <sys/param.h>
42008
42009int
42010main ()
42011{
42012#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42013		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42014		     && LITTLE_ENDIAN)
42015	      bogus endian macros
42016	     #endif
42017
42018  ;
42019  return 0;
42020}
42021_ACEOF
42022if ac_fn_cxx_try_compile "$LINENO"; then :
42023  # It does; now see whether it defined to BIG_ENDIAN or not.
42024	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42025/* end confdefs.h.  */
42026#include <sys/types.h>
42027		#include <sys/param.h>
42028
42029int
42030main ()
42031{
42032#if BYTE_ORDER != BIG_ENDIAN
42033		 not big endian
42034		#endif
42035
42036  ;
42037  return 0;
42038}
42039_ACEOF
42040if ac_fn_cxx_try_compile "$LINENO"; then :
42041  ac_cv_c_bigendian=yes
42042else
42043  ac_cv_c_bigendian=no
42044fi
42045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42046fi
42047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42048    fi
42049    if test $ac_cv_c_bigendian = unknown; then
42050      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42051      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42052/* end confdefs.h.  */
42053#include <limits.h>
42054
42055int
42056main ()
42057{
42058#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42059	      bogus endian macros
42060	     #endif
42061
42062  ;
42063  return 0;
42064}
42065_ACEOF
42066if ac_fn_cxx_try_compile "$LINENO"; then :
42067  # It does; now see whether it defined to _BIG_ENDIAN or not.
42068	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42069/* end confdefs.h.  */
42070#include <limits.h>
42071
42072int
42073main ()
42074{
42075#ifndef _BIG_ENDIAN
42076		 not big endian
42077		#endif
42078
42079  ;
42080  return 0;
42081}
42082_ACEOF
42083if ac_fn_cxx_try_compile "$LINENO"; then :
42084  ac_cv_c_bigendian=yes
42085else
42086  ac_cv_c_bigendian=no
42087fi
42088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42089fi
42090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42091    fi
42092    if test $ac_cv_c_bigendian = unknown; then
42093      # Compile a test program.
42094      if test "$cross_compiling" = yes; then :
42095  # Try to guess by grepping values from an object file.
42096	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42097/* end confdefs.h.  */
42098short int ascii_mm[] =
42099		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42100		short int ascii_ii[] =
42101		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42102		int use_ascii (int i) {
42103		  return ascii_mm[i] + ascii_ii[i];
42104		}
42105		short int ebcdic_ii[] =
42106		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42107		short int ebcdic_mm[] =
42108		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42109		int use_ebcdic (int i) {
42110		  return ebcdic_mm[i] + ebcdic_ii[i];
42111		}
42112		extern int foo;
42113
42114int
42115main ()
42116{
42117return use_ascii (foo) == use_ebcdic (foo);
42118  ;
42119  return 0;
42120}
42121_ACEOF
42122if ac_fn_cxx_try_compile "$LINENO"; then :
42123  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42124	      ac_cv_c_bigendian=yes
42125	    fi
42126	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42127	      if test "$ac_cv_c_bigendian" = unknown; then
42128		ac_cv_c_bigendian=no
42129	      else
42130		# finding both strings is unlikely to happen, but who knows?
42131		ac_cv_c_bigendian=unknown
42132	      fi
42133	    fi
42134fi
42135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42136else
42137  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42138/* end confdefs.h.  */
42139$ac_includes_default
42140int
42141main ()
42142{
42143
42144	     /* Are we little or big endian?  From Harbison&Steele.  */
42145	     union
42146	     {
42147	       long int l;
42148	       char c[sizeof (long int)];
42149	     } u;
42150	     u.l = 1;
42151	     return u.c[sizeof (long int) - 1] == 1;
42152
42153  ;
42154  return 0;
42155}
42156_ACEOF
42157if ac_fn_cxx_try_run "$LINENO"; then :
42158  ac_cv_c_bigendian=no
42159else
42160  ac_cv_c_bigendian=yes
42161fi
42162rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42163  conftest.$ac_objext conftest.beam conftest.$ac_ext
42164fi
42165
42166    fi
42167fi
42168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42169$as_echo "$ac_cv_c_bigendian" >&6; }
42170 case $ac_cv_c_bigendian in #(
42171   yes)
42172     ENDIAN="big";; #(
42173   no)
42174     ENDIAN="little" ;; #(
42175   universal)
42176     ENDIAN="universal_endianness"
42177     ;; #(
42178   *)
42179     ENDIAN="unknown" ;;
42180 esac
42181
42182
42183  if test "x$ENDIAN" = xuniversal_endianness; then
42184    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42185  fi
42186  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42187    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
42188  fi
42189
42190
42191# Configure flags for the tools
42192
42193  ###############################################################################
42194  #
42195  # How to compile shared libraries.
42196  #
42197
42198  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42199    PICFLAG="-fPIC"
42200    C_FLAG_REORDER=''
42201    CXX_FLAG_REORDER=''
42202
42203    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42204      # Linking is different on MacOSX
42205      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42206      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42207      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42208      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42209      SET_SHARED_LIBRARY_MAPFILE=''
42210    else
42211      # Default works for linux, might work on other platforms as well.
42212      SHARED_LIBRARY_FLAGS='-shared'
42213      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42214      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42215      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42216      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42217    fi
42218  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42219    PICFLAG=''
42220    C_FLAG_REORDER=''
42221    CXX_FLAG_REORDER=''
42222
42223    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42224      # Linking is different on MacOSX
42225      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42226      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42227      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42228      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42229      SET_SHARED_LIBRARY_MAPFILE=''
42230    else
42231      # Default works for linux, might work on other platforms as well.
42232      SHARED_LIBRARY_FLAGS='-shared'
42233      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42234      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42235      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42236      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42237    fi
42238  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42239    PICFLAG="-KPIC"
42240    C_FLAG_REORDER='-xF'
42241    CXX_FLAG_REORDER='-xF'
42242    SHARED_LIBRARY_FLAGS="-G"
42243    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42244    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42245    SET_SHARED_LIBRARY_NAME=''
42246    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42247  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42248    PICFLAG="-qpic=large"
42249    C_FLAG_REORDER=''
42250    CXX_FLAG_REORDER=''
42251    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42252    SET_EXECUTABLE_ORIGIN=""
42253    SET_SHARED_LIBRARY_ORIGIN=''
42254    SET_SHARED_LIBRARY_NAME=''
42255    SET_SHARED_LIBRARY_MAPFILE=''
42256  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42257    PICFLAG=""
42258    C_FLAG_REORDER=''
42259    CXX_FLAG_REORDER=''
42260    SHARED_LIBRARY_FLAGS="-LD"
42261    SET_EXECUTABLE_ORIGIN=''
42262    SET_SHARED_LIBRARY_ORIGIN=''
42263    SET_SHARED_LIBRARY_NAME=''
42264    SET_SHARED_LIBRARY_MAPFILE=''
42265  fi
42266
42267
42268
42269
42270
42271
42272
42273
42274
42275  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42276    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42277    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42278    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42279  fi
42280  # The (cross) compiler is now configured, we can now test capabilities
42281  # of the target platform.
42282
42283
42284
42285  ###############################################################################
42286  #
42287  # Setup the opt flags for different compilers
42288  # and different operating systems.
42289  #
42290
42291  # FIXME: this was indirectly the old default, but just inherited.
42292  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42293  #   C_FLAG_DEPS="-MMD -MF"
42294  # fi
42295
42296  # Generate make dependency files
42297  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42298    C_FLAG_DEPS="-MMD -MF"
42299  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42300    C_FLAG_DEPS="-MMD -MF"
42301  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42302    C_FLAG_DEPS="-xMMD -xMF"
42303  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42304    C_FLAG_DEPS="-qmakedep=gcc -MF"
42305  fi
42306  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42307
42308
42309
42310  # Debug symbols
42311  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42312    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42313      # reduce from default "-g2" option to save space
42314      CFLAGS_DEBUG_SYMBOLS="-g1"
42315      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42316    else
42317      CFLAGS_DEBUG_SYMBOLS="-g"
42318      CXXFLAGS_DEBUG_SYMBOLS="-g"
42319    fi
42320  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42321    CFLAGS_DEBUG_SYMBOLS="-g"
42322    CXXFLAGS_DEBUG_SYMBOLS="-g"
42323  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42324    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42325    # FIXME: likely a bug, this disables debug symbols rather than enables them
42326    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42327  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42328    CFLAGS_DEBUG_SYMBOLS="-g"
42329    CXXFLAGS_DEBUG_SYMBOLS="-g"
42330  fi
42331
42332
42333
42334  # bounds, memory and behavior checking options
42335  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42336    case $DEBUG_LEVEL in
42337    release )
42338      # no adjustment
42339      ;;
42340    fastdebug )
42341      # no adjustment
42342      ;;
42343    slowdebug )
42344      # Add runtime stack smashing and undefined behavior checks
42345      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42346      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42347      ;;
42348    esac
42349  fi
42350
42351
42352
42353  # Optimization levels
42354  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42355    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42356
42357    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42358      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42359      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42360      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42361      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42362      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42363      C_O_FLAG_NONE="-xregs=no%frameptr"
42364      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42365      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42366      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42367      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42368      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42369      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42370        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42371        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42372      fi
42373    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42374      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42375      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42376      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42377      C_O_FLAG_DEBUG=""
42378      C_O_FLAG_NONE=""
42379      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42380      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42381      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42382      C_O_FLAG_DEBUG=""
42383      CXX_O_FLAG_NONE=""
42384    fi
42385  else
42386    # The remaining toolchains share opt flags between CC and CXX;
42387    # setup for C and duplicate afterwards.
42388    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42389      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42390        # On MacOSX we optimize for size, something
42391        # we should do for all platforms?
42392        C_O_FLAG_HIGHEST="-Os"
42393        C_O_FLAG_HI="-Os"
42394        C_O_FLAG_NORM="-Os"
42395      else
42396        C_O_FLAG_HIGHEST="-O3"
42397        C_O_FLAG_HI="-O3"
42398        C_O_FLAG_NORM="-O2"
42399      fi
42400      C_O_FLAG_DEBUG="-O0"
42401      C_O_FLAG_NONE="-O0"
42402    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42403      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42404        # On MacOSX we optimize for size, something
42405        # we should do for all platforms?
42406        C_O_FLAG_HIGHEST="-Os"
42407        C_O_FLAG_HI="-Os"
42408        C_O_FLAG_NORM="-Os"
42409      else
42410        C_O_FLAG_HIGHEST="-O3"
42411        C_O_FLAG_HI="-O3"
42412        C_O_FLAG_NORM="-O2"
42413      fi
42414      C_O_FLAG_DEBUG="-O0"
42415      C_O_FLAG_NONE="-O0"
42416    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42417      C_O_FLAG_HIGHEST="-O3"
42418      C_O_FLAG_HI="-O3 -qstrict"
42419      C_O_FLAG_NORM="-O2"
42420      C_O_FLAG_DEBUG="-qnoopt"
42421      C_O_FLAG_NONE="-qnoop"
42422    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42423      C_O_FLAG_HIGHEST="-O2"
42424      C_O_FLAG_HI="-O1"
42425      C_O_FLAG_NORM="-O1"
42426      C_O_FLAG_DEBUG="-Od"
42427      C_O_FLAG_NONE="-Od"
42428    fi
42429    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42430    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42431    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42432    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42433    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42434  fi
42435
42436  # Adjust optimization flags according to debug level.
42437  case $DEBUG_LEVEL in
42438    release )
42439      # no adjustment
42440      ;;
42441    fastdebug )
42442      # Not quite so much optimization
42443      C_O_FLAG_HI="$C_O_FLAG_NORM"
42444      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42445      ;;
42446    slowdebug )
42447      # Disable optimization
42448      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42449      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42450      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42451      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42452      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42453      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42454      ;;
42455  esac
42456
42457
42458
42459
42460
42461
42462
42463
42464
42465
42466
42467
42468
42469  # Special extras...
42470  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42471    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42472      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42473      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42474    fi
42475  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42476    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42477    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42478    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42479  fi
42480
42481  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42482    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42483$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42484  fi
42485
42486  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42487    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42488$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42489  fi
42490
42491  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42492    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42493$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42494  fi
42495
42496
42497# Check whether --with-extra-cflags was given.
42498if test "${with_extra_cflags+set}" = set; then :
42499  withval=$with_extra_cflags;
42500fi
42501
42502
42503
42504# Check whether --with-extra-cxxflags was given.
42505if test "${with_extra_cxxflags+set}" = set; then :
42506  withval=$with_extra_cxxflags;
42507fi
42508
42509
42510
42511# Check whether --with-extra-ldflags was given.
42512if test "${with_extra_ldflags+set}" = set; then :
42513  withval=$with_extra_ldflags;
42514fi
42515
42516
42517  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42518  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42519  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42520
42521  # Hotspot needs these set in their legacy form
42522  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42523  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42524  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42525
42526
42527
42528
42529
42530  ###############################################################################
42531  #
42532  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42533  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42534  #
42535
42536  # Setup compiler/platform specific flags into
42537  #    CFLAGS_JDK    - C Compiler flags
42538  #    CXXFLAGS_JDK  - C++ Compiler flags
42539  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42540  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42541    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42542        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42543    case $OPENJDK_TARGET_CPU_ARCH in
42544      arm )
42545        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42546        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42547        ;;
42548      ppc )
42549        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42550        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42551        ;;
42552      * )
42553        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42554        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42555        ;;
42556    esac
42557  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42558    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42559    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42560      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42561      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42562    fi
42563
42564    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42565    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42566  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42567    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42568    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42569  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42570    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42571    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
42572    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42573    -DWIN32 -DIAL"
42574    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42575      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42576    else
42577      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42578    fi
42579  fi
42580
42581  ###############################################################################
42582
42583  # Adjust flags according to debug level.
42584  case $DEBUG_LEVEL in
42585    fastdebug | slowdebug )
42586      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42587      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42588      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42589      ;;
42590    release )
42591      ;;
42592    * )
42593      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42594      ;;
42595  esac
42596
42597  # Setup LP64
42598  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42599
42600  # Set some common defines. These works for all compilers, but assume
42601  # -D is universally accepted.
42602
42603  # Setup endianness
42604  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42605    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42606    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42607    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42608    #   Note: -Dmacro         is the same as    #define macro 1
42609    #         -Dmacro=        is the same as    #define macro
42610    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42611      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42612    else
42613      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42614    fi
42615  else
42616    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42617    # are defined in the system?
42618    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42619      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42620    else
42621      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42622    fi
42623  fi
42624
42625  # Setup target OS define. Use OS target name but in upper case.
42626  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42627  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42628
42629  # Setup target CPU
42630  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42631
42632  # Setup debug/release defines
42633  if test "x$DEBUG_LEVEL" = xrelease; then
42634    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42635    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42636      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42637    fi
42638  else
42639    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42640  fi
42641
42642  # Setup release name
42643  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42644
42645
42646  # Set some additional per-OS defines.
42647  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42648    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42649  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42650    # FIXME: PPC64 should not be here.
42651    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42652  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42653    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42654  fi
42655
42656  # Additional macosx handling
42657  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42658    # Setting these parameters makes it an error to link to macosx APIs that are
42659    # newer than the given OS version and makes the linked binaries compatible
42660    # even if built on a newer version of the OS.
42661    # The expected format is X.Y.Z
42662    MACOSX_VERSION_MIN=10.7.0
42663
42664
42665    # The macro takes the version with no dots, ex: 1070
42666    # Let the flags variables get resolved in make for easier override on make
42667    # command line.
42668    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42669    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42670  fi
42671
42672  # Setup some hard coded includes
42673  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42674      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42675      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42676      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42677
42678  # The shared libraries are compiled using the picflag.
42679  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42680  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42681
42682  # Executable flags
42683  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42684  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42685
42686
42687
42688
42689
42690
42691  # Setup LDFLAGS et al.
42692  #
42693
42694  # Now this is odd. The JDK native libraries have to link against libjvm.so
42695  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42696  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42697  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42698  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42699  # libraries will link to whatever is in memory. Yuck.
42700  #
42701  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42702  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42703    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42704    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42705      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42706    fi
42707    # TODO: make -debug optional "--disable-full-debug-symbols"
42708    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42709  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42710    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42711    # We have previously set HAS_GNU_HASH if this is the case
42712    if test -n "$HAS_GNU_HASH"; then
42713      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42714    fi
42715    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42716      # And since we now know that the linker is gnu, then add -z defs, to forbid
42717      # undefined symbols in object files.
42718      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42719      case $DEBUG_LEVEL in
42720        release )
42721          # tell linker to optimize libraries.
42722          # Should this be supplied to the OSS linker as well?
42723          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42724          ;;
42725        slowdebug )
42726          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42727            # do relocations at load
42728            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42729            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42730          fi
42731          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42732            # mark relocations read only
42733            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42734            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42735          fi
42736          ;;
42737        fastdebug )
42738          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42739            # mark relocations read only
42740            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42741            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42742          fi
42743          ;;
42744        * )
42745          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42746          ;;
42747        esac
42748    fi
42749  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42750    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42751    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42752  fi
42753
42754  # Customize LDFLAGS for executables
42755
42756  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42757
42758  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42759    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42760      LDFLAGS_STACK_SIZE=1048576
42761    else
42762      LDFLAGS_STACK_SIZE=327680
42763    fi
42764    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42765  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42766    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42767  fi
42768
42769  # Customize LDFLAGS for libs
42770  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42771
42772  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42773    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42774    LDFLAGS_JDKLIB_SUFFIX=""
42775  else
42776    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42777        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42778
42779    # On some platforms (mac) the linker warns about non existing -L dirs.
42780    # Add server first if available. Linking aginst client does not always produce the same results.
42781    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42782    # Default to server for other variants.
42783    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42784      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42785    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42786      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42787    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42788      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42789    else
42790      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42791    fi
42792
42793    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42794    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42795      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42796    fi
42797  fi
42798
42799
42800
42801
42802
42803
42804
42805
42806  # Some Zero and Shark settings.
42807  # ZERO_ARCHFLAG tells the compiler which mode to build for
42808  case "${OPENJDK_TARGET_CPU}" in
42809    s390)
42810      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42811      ;;
42812    *)
42813      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42814  esac
42815
42816  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42817$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42818  supports=yes
42819
42820  saved_cflags="$CFLAGS"
42821  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42822  ac_ext=c
42823ac_cpp='$CPP $CPPFLAGS'
42824ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42825ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42826ac_compiler_gnu=$ac_cv_c_compiler_gnu
42827
42828  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42829/* end confdefs.h.  */
42830int i;
42831_ACEOF
42832if ac_fn_c_try_compile "$LINENO"; then :
42833
42834else
42835  supports=no
42836fi
42837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42838  ac_ext=cpp
42839ac_cpp='$CXXCPP $CPPFLAGS'
42840ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42841ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42842ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42843
42844  CFLAGS="$saved_cflags"
42845
42846  saved_cxxflags="$CXXFLAGS"
42847  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42848  ac_ext=cpp
42849ac_cpp='$CXXCPP $CPPFLAGS'
42850ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42851ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42852ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42853
42854  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42855/* end confdefs.h.  */
42856int i;
42857_ACEOF
42858if ac_fn_cxx_try_compile "$LINENO"; then :
42859
42860else
42861  supports=no
42862fi
42863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42864  ac_ext=cpp
42865ac_cpp='$CXXCPP $CPPFLAGS'
42866ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42867ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42868ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42869
42870  CXXFLAGS="$saved_cxxflags"
42871
42872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42873$as_echo "$supports" >&6; }
42874  if test "x$supports" = "xyes" ; then
42875    :
42876  else
42877    ZERO_ARCHFLAG=""
42878  fi
42879
42880
42881
42882  # Check that the compiler supports -mX (or -qX on AIX) flags
42883  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42884
42885  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42886$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42887  supports=yes
42888
42889  saved_cflags="$CFLAGS"
42890  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42891  ac_ext=c
42892ac_cpp='$CPP $CPPFLAGS'
42893ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42894ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42895ac_compiler_gnu=$ac_cv_c_compiler_gnu
42896
42897  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42898/* end confdefs.h.  */
42899int i;
42900_ACEOF
42901if ac_fn_c_try_compile "$LINENO"; then :
42902
42903else
42904  supports=no
42905fi
42906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42907  ac_ext=cpp
42908ac_cpp='$CXXCPP $CPPFLAGS'
42909ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42910ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42911ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42912
42913  CFLAGS="$saved_cflags"
42914
42915  saved_cxxflags="$CXXFLAGS"
42916  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42917  ac_ext=cpp
42918ac_cpp='$CXXCPP $CPPFLAGS'
42919ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42920ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42921ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42922
42923  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42924/* end confdefs.h.  */
42925int i;
42926_ACEOF
42927if ac_fn_cxx_try_compile "$LINENO"; then :
42928
42929else
42930  supports=no
42931fi
42932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42933  ac_ext=cpp
42934ac_cpp='$CXXCPP $CPPFLAGS'
42935ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42936ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42937ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42938
42939  CXXFLAGS="$saved_cxxflags"
42940
42941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42942$as_echo "$supports" >&6; }
42943  if test "x$supports" = "xyes" ; then
42944    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42945  else
42946    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42947  fi
42948
42949
42950
42951  case "${TOOLCHAIN_TYPE}" in
42952    microsoft)
42953      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42954      ;;
42955    solstudio)
42956      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42957      ;;
42958    gcc)
42959      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42960      ;;
42961    clang)
42962      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42963      ;;
42964  esac
42965
42966
42967
42968# Setup debug symbols (need objcopy from the toolchain for that)
42969
42970  #
42971  # ENABLE_DEBUG_SYMBOLS
42972  # This must be done after the toolchain is setup, since we're looking at objcopy.
42973  #
42974  # Check whether --enable-debug-symbols was given.
42975if test "${enable_debug_symbols+set}" = set; then :
42976  enableval=$enable_debug_symbols;
42977fi
42978
42979
42980  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42981$as_echo_n "checking if we should generate debug symbols... " >&6; }
42982
42983  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42984    # explicit enabling of enable-debug-symbols and can't find objcopy
42985    #   this is an error
42986    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42987  fi
42988
42989  if test "x$enable_debug_symbols" = "xyes"; then
42990    ENABLE_DEBUG_SYMBOLS=true
42991  elif test "x$enable_debug_symbols" = "xno"; then
42992    ENABLE_DEBUG_SYMBOLS=false
42993  else
42994    # Default is on if objcopy is found
42995    if test "x$OBJCOPY" != x; then
42996      ENABLE_DEBUG_SYMBOLS=true
42997    # MacOS X and Windows don't use objcopy but default is on for those OSes
42998    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42999      ENABLE_DEBUG_SYMBOLS=true
43000    else
43001      ENABLE_DEBUG_SYMBOLS=false
43002    fi
43003  fi
43004
43005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43006$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43007
43008  #
43009  # ZIP_DEBUGINFO_FILES
43010  #
43011  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43012$as_echo_n "checking if we should zip debug-info files... " >&6; }
43013  # Check whether --enable-zip-debug-info was given.
43014if test "${enable_zip_debug_info+set}" = set; then :
43015  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43016else
43017  enable_zip_debug_info="yes"
43018fi
43019
43020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43021$as_echo "${enable_zip_debug_info}" >&6; }
43022
43023  if test "x${enable_zip_debug_info}" = "xno"; then
43024    ZIP_DEBUGINFO_FILES=false
43025  else
43026    ZIP_DEBUGINFO_FILES=true
43027  fi
43028
43029
43030
43031
43032
43033###############################################################################
43034#
43035# Check dependencies for external and internal libraries.
43036#
43037###############################################################################
43038
43039# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43040
43041  # When using cygwin or msys, we need a wrapper binary that renames
43042  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43043  # @files and rewrites these too! This wrapper binary is
43044  # called fixpath.
43045  FIXPATH=
43046  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43047    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43048$as_echo_n "checking if fixpath can be created... " >&6; }
43049    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43050    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
43051    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43052      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
43053      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
43054      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43055      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
43056    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43057      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
43058      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
43059
43060      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43061      # @ was chosen as separator to minimize risk of other tools messing around with it
43062      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
43063      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43064
43065      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
43066    fi
43067    rm -f $OUTPUT_ROOT/fixpath*
43068    cd $OUTPUT_ROOT
43069    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
43070    cd $CURDIR
43071
43072    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
43073      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43074$as_echo "no" >&6; }
43075      cat $OUTPUT_ROOT/fixpath1.log
43076      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
43077    fi
43078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43079$as_echo "yes" >&6; }
43080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43081$as_echo_n "checking if fixpath.exe works... " >&6; }
43082    cd $OUTPUT_ROOT
43083    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
43084    cd $CURDIR
43085    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
43086      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43087$as_echo "no" >&6; }
43088      cat $OUTPUT_ROOT/fixpath2.log
43089      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43090    fi
43091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43092$as_echo "yes" >&6; }
43093    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
43094  fi
43095
43096
43097
43098
43099
43100
43101  ###############################################################################
43102  #
43103  # OS specific settings that we never will need to probe.
43104  #
43105  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43106    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43107$as_echo_n "checking what is not needed on Linux?... " >&6; }
43108    PULSE_NOT_NEEDED=yes
43109    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43110$as_echo "pulse" >&6; }
43111  fi
43112
43113  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43114    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43115$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43116    ALSA_NOT_NEEDED=yes
43117    PULSE_NOT_NEEDED=yes
43118    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43119$as_echo "alsa pulse" >&6; }
43120  fi
43121
43122  if test "x$OPENJDK_TARGET_OS" = xaix; then
43123    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43124$as_echo_n "checking what is not needed on AIX?... " >&6; }
43125    ALSA_NOT_NEEDED=yes
43126    PULSE_NOT_NEEDED=yes
43127    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43128$as_echo "alsa pulse" >&6; }
43129  fi
43130
43131
43132  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43134$as_echo_n "checking what is not needed on Windows?... " >&6; }
43135    CUPS_NOT_NEEDED=yes
43136    ALSA_NOT_NEEDED=yes
43137    PULSE_NOT_NEEDED=yes
43138    X11_NOT_NEEDED=yes
43139    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43140$as_echo "alsa cups pulse x11" >&6; }
43141  fi
43142
43143  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43144    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43145$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43146    ALSA_NOT_NEEDED=yes
43147    PULSE_NOT_NEEDED=yes
43148    X11_NOT_NEEDED=yes
43149    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43150$as_echo "alsa pulse x11" >&6; }
43151  fi
43152
43153  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43154    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43155$as_echo_n "checking what is not needed on bsd?... " >&6; }
43156    ALSA_NOT_NEEDED=yes
43157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43158$as_echo "alsa" >&6; }
43159  fi
43160
43161  if test "x$OPENJDK" = "xfalse"; then
43162    FREETYPE_NOT_NEEDED=yes
43163  fi
43164
43165  if test "x$SUPPORT_HEADFUL" = xno; then
43166    X11_NOT_NEEDED=yes
43167  fi
43168
43169
43170
43171  ###############################################################################
43172  #
43173  # Check for X Windows
43174  #
43175
43176  if test "x$X11_NOT_NEEDED" = xyes; then
43177    if test "x${with_x}" != x; then
43178      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43179$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43180    fi
43181    X_CFLAGS=
43182    X_LIBS=
43183  else
43184    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43185    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43186    # --x-libraries for the sysroot, if that seems to be correct.
43187    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43188      if test "x$SYSROOT" != "x"; then
43189        if test "x$x_includes" = xNONE; then
43190          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43191            x_includes="$SYSROOT/usr/X11R6/include"
43192          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43193            x_includes="$SYSROOT/usr/include"
43194          fi
43195        fi
43196        if test "x$x_libraries" = xNONE; then
43197          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43198            x_libraries="$SYSROOT/usr/X11R6/lib"
43199          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43200            x_libraries="$SYSROOT/usr/lib64"
43201          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43202            x_libraries="$SYSROOT/usr/lib"
43203          fi
43204        fi
43205      fi
43206    fi
43207
43208    # Now let autoconf do it's magic
43209    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43210$as_echo_n "checking for X... " >&6; }
43211
43212
43213# Check whether --with-x was given.
43214if test "${with_x+set}" = set; then :
43215  withval=$with_x;
43216fi
43217
43218# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43219if test "x$with_x" = xno; then
43220  # The user explicitly disabled X.
43221  have_x=disabled
43222else
43223  case $x_includes,$x_libraries in #(
43224    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43225    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43226  $as_echo_n "(cached) " >&6
43227else
43228  # One or both of the vars are not set, and there is no cached value.
43229ac_x_includes=no ac_x_libraries=no
43230rm -f -r conftest.dir
43231if mkdir conftest.dir; then
43232  cd conftest.dir
43233  cat >Imakefile <<'_ACEOF'
43234incroot:
43235	@echo incroot='${INCROOT}'
43236usrlibdir:
43237	@echo usrlibdir='${USRLIBDIR}'
43238libdir:
43239	@echo libdir='${LIBDIR}'
43240_ACEOF
43241  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43242    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43243    for ac_var in incroot usrlibdir libdir; do
43244      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43245    done
43246    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43247    for ac_extension in a so sl dylib la dll; do
43248      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43249	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43250	ac_im_usrlibdir=$ac_im_libdir; break
43251      fi
43252    done
43253    # Screen out bogus values from the imake configuration.  They are
43254    # bogus both because they are the default anyway, and because
43255    # using them would break gcc on systems where it needs fixed includes.
43256    case $ac_im_incroot in
43257	/usr/include) ac_x_includes= ;;
43258	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43259    esac
43260    case $ac_im_usrlibdir in
43261	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43262	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43263    esac
43264  fi
43265  cd ..
43266  rm -f -r conftest.dir
43267fi
43268
43269# Standard set of common directories for X headers.
43270# Check X11 before X11Rn because it is often a symlink to the current release.
43271ac_x_header_dirs='
43272/usr/X11/include
43273/usr/X11R7/include
43274/usr/X11R6/include
43275/usr/X11R5/include
43276/usr/X11R4/include
43277
43278/usr/include/X11
43279/usr/include/X11R7
43280/usr/include/X11R6
43281/usr/include/X11R5
43282/usr/include/X11R4
43283
43284/usr/local/X11/include
43285/usr/local/X11R7/include
43286/usr/local/X11R6/include
43287/usr/local/X11R5/include
43288/usr/local/X11R4/include
43289
43290/usr/local/include/X11
43291/usr/local/include/X11R7
43292/usr/local/include/X11R6
43293/usr/local/include/X11R5
43294/usr/local/include/X11R4
43295
43296/usr/X386/include
43297/usr/x386/include
43298/usr/XFree86/include/X11
43299
43300/usr/include
43301/usr/local/include
43302/usr/unsupported/include
43303/usr/athena/include
43304/usr/local/x11r5/include
43305/usr/lpp/Xamples/include
43306
43307/usr/openwin/include
43308/usr/openwin/share/include'
43309
43310if test "$ac_x_includes" = no; then
43311  # Guess where to find include files, by looking for Xlib.h.
43312  # First, try using that file with no special directory specified.
43313  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43314/* end confdefs.h.  */
43315#include <X11/Xlib.h>
43316_ACEOF
43317if ac_fn_cxx_try_cpp "$LINENO"; then :
43318  # We can compile using X headers with no special include directory.
43319ac_x_includes=
43320else
43321  for ac_dir in $ac_x_header_dirs; do
43322  if test -r "$ac_dir/X11/Xlib.h"; then
43323    ac_x_includes=$ac_dir
43324    break
43325  fi
43326done
43327fi
43328rm -f conftest.err conftest.i conftest.$ac_ext
43329fi # $ac_x_includes = no
43330
43331if test "$ac_x_libraries" = no; then
43332  # Check for the libraries.
43333  # See if we find them without any special options.
43334  # Don't add to $LIBS permanently.
43335  ac_save_LIBS=$LIBS
43336  LIBS="-lX11 $LIBS"
43337  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43338/* end confdefs.h.  */
43339#include <X11/Xlib.h>
43340int
43341main ()
43342{
43343XrmInitialize ()
43344  ;
43345  return 0;
43346}
43347_ACEOF
43348if ac_fn_cxx_try_link "$LINENO"; then :
43349  LIBS=$ac_save_LIBS
43350# We can link X programs with no special library path.
43351ac_x_libraries=
43352else
43353  LIBS=$ac_save_LIBS
43354for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43355do
43356  # Don't even attempt the hair of trying to link an X program!
43357  for ac_extension in a so sl dylib la dll; do
43358    if test -r "$ac_dir/libX11.$ac_extension"; then
43359      ac_x_libraries=$ac_dir
43360      break 2
43361    fi
43362  done
43363done
43364fi
43365rm -f core conftest.err conftest.$ac_objext \
43366    conftest$ac_exeext conftest.$ac_ext
43367fi # $ac_x_libraries = no
43368
43369case $ac_x_includes,$ac_x_libraries in #(
43370  no,* | *,no | *\'*)
43371    # Didn't find X, or a directory has "'" in its name.
43372    ac_cv_have_x="have_x=no";; #(
43373  *)
43374    # Record where we found X for the cache.
43375    ac_cv_have_x="have_x=yes\
43376	ac_x_includes='$ac_x_includes'\
43377	ac_x_libraries='$ac_x_libraries'"
43378esac
43379fi
43380;; #(
43381    *) have_x=yes;;
43382  esac
43383  eval "$ac_cv_have_x"
43384fi # $with_x != no
43385
43386if test "$have_x" != yes; then
43387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43388$as_echo "$have_x" >&6; }
43389  no_x=yes
43390else
43391  # If each of the values was on the command line, it overrides each guess.
43392  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43393  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43394  # Update the cache value to reflect the command line values.
43395  ac_cv_have_x="have_x=yes\
43396	ac_x_includes='$x_includes'\
43397	ac_x_libraries='$x_libraries'"
43398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43399$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43400fi
43401
43402    if test "$no_x" = yes; then
43403  # Not all programs may use this symbol, but it does not hurt to define it.
43404
43405$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43406
43407  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43408else
43409  if test -n "$x_includes"; then
43410    X_CFLAGS="$X_CFLAGS -I$x_includes"
43411  fi
43412
43413  # It would also be nice to do this for all -L options, not just this one.
43414  if test -n "$x_libraries"; then
43415    X_LIBS="$X_LIBS -L$x_libraries"
43416    # For Solaris; some versions of Sun CC require a space after -R and
43417    # others require no space.  Words are not sufficient . . . .
43418    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43419$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43420    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43421    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43422    ac_cxx_werror_flag=yes
43423    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43424/* end confdefs.h.  */
43425
43426int
43427main ()
43428{
43429
43430  ;
43431  return 0;
43432}
43433_ACEOF
43434if ac_fn_cxx_try_link "$LINENO"; then :
43435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43436$as_echo "no" >&6; }
43437       X_LIBS="$X_LIBS -R$x_libraries"
43438else
43439  LIBS="$ac_xsave_LIBS -R $x_libraries"
43440       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43441/* end confdefs.h.  */
43442
43443int
43444main ()
43445{
43446
43447  ;
43448  return 0;
43449}
43450_ACEOF
43451if ac_fn_cxx_try_link "$LINENO"; then :
43452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43453$as_echo "yes" >&6; }
43454	  X_LIBS="$X_LIBS -R $x_libraries"
43455else
43456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43457$as_echo "neither works" >&6; }
43458fi
43459rm -f core conftest.err conftest.$ac_objext \
43460    conftest$ac_exeext conftest.$ac_ext
43461fi
43462rm -f core conftest.err conftest.$ac_objext \
43463    conftest$ac_exeext conftest.$ac_ext
43464    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43465    LIBS=$ac_xsave_LIBS
43466  fi
43467
43468  # Check for system-dependent libraries X programs must link with.
43469  # Do this before checking for the system-independent R6 libraries
43470  # (-lICE), since we may need -lsocket or whatever for X linking.
43471
43472  if test "$ISC" = yes; then
43473    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43474  else
43475    # Martyn Johnson says this is needed for Ultrix, if the X
43476    # libraries were built with DECnet support.  And Karl Berry says
43477    # the Alpha needs dnet_stub (dnet does not exist).
43478    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43479    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43480/* end confdefs.h.  */
43481
43482/* Override any GCC internal prototype to avoid an error.
43483   Use char because int might match the return type of a GCC
43484   builtin and then its argument prototype would still apply.  */
43485#ifdef __cplusplus
43486extern "C"
43487#endif
43488char XOpenDisplay ();
43489int
43490main ()
43491{
43492return XOpenDisplay ();
43493  ;
43494  return 0;
43495}
43496_ACEOF
43497if ac_fn_cxx_try_link "$LINENO"; then :
43498
43499else
43500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43501$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43502if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43503  $as_echo_n "(cached) " >&6
43504else
43505  ac_check_lib_save_LIBS=$LIBS
43506LIBS="-ldnet  $LIBS"
43507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43508/* end confdefs.h.  */
43509
43510/* Override any GCC internal prototype to avoid an error.
43511   Use char because int might match the return type of a GCC
43512   builtin and then its argument prototype would still apply.  */
43513#ifdef __cplusplus
43514extern "C"
43515#endif
43516char dnet_ntoa ();
43517int
43518main ()
43519{
43520return dnet_ntoa ();
43521  ;
43522  return 0;
43523}
43524_ACEOF
43525if ac_fn_cxx_try_link "$LINENO"; then :
43526  ac_cv_lib_dnet_dnet_ntoa=yes
43527else
43528  ac_cv_lib_dnet_dnet_ntoa=no
43529fi
43530rm -f core conftest.err conftest.$ac_objext \
43531    conftest$ac_exeext conftest.$ac_ext
43532LIBS=$ac_check_lib_save_LIBS
43533fi
43534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43535$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43536if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43537  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43538fi
43539
43540    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43541      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43542$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43543if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43544  $as_echo_n "(cached) " >&6
43545else
43546  ac_check_lib_save_LIBS=$LIBS
43547LIBS="-ldnet_stub  $LIBS"
43548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43549/* end confdefs.h.  */
43550
43551/* Override any GCC internal prototype to avoid an error.
43552   Use char because int might match the return type of a GCC
43553   builtin and then its argument prototype would still apply.  */
43554#ifdef __cplusplus
43555extern "C"
43556#endif
43557char dnet_ntoa ();
43558int
43559main ()
43560{
43561return dnet_ntoa ();
43562  ;
43563  return 0;
43564}
43565_ACEOF
43566if ac_fn_cxx_try_link "$LINENO"; then :
43567  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43568else
43569  ac_cv_lib_dnet_stub_dnet_ntoa=no
43570fi
43571rm -f core conftest.err conftest.$ac_objext \
43572    conftest$ac_exeext conftest.$ac_ext
43573LIBS=$ac_check_lib_save_LIBS
43574fi
43575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43576$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43577if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43578  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43579fi
43580
43581    fi
43582fi
43583rm -f core conftest.err conftest.$ac_objext \
43584    conftest$ac_exeext conftest.$ac_ext
43585    LIBS="$ac_xsave_LIBS"
43586
43587    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43588    # to get the SysV transport functions.
43589    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43590    # needs -lnsl.
43591    # The nsl library prevents programs from opening the X display
43592    # on Irix 5.2, according to T.E. Dickey.
43593    # The functions gethostbyname, getservbyname, and inet_addr are
43594    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43595    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43596if test "x$ac_cv_func_gethostbyname" = xyes; then :
43597
43598fi
43599
43600    if test $ac_cv_func_gethostbyname = no; then
43601      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43602$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43603if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43604  $as_echo_n "(cached) " >&6
43605else
43606  ac_check_lib_save_LIBS=$LIBS
43607LIBS="-lnsl  $LIBS"
43608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43609/* end confdefs.h.  */
43610
43611/* Override any GCC internal prototype to avoid an error.
43612   Use char because int might match the return type of a GCC
43613   builtin and then its argument prototype would still apply.  */
43614#ifdef __cplusplus
43615extern "C"
43616#endif
43617char gethostbyname ();
43618int
43619main ()
43620{
43621return gethostbyname ();
43622  ;
43623  return 0;
43624}
43625_ACEOF
43626if ac_fn_cxx_try_link "$LINENO"; then :
43627  ac_cv_lib_nsl_gethostbyname=yes
43628else
43629  ac_cv_lib_nsl_gethostbyname=no
43630fi
43631rm -f core conftest.err conftest.$ac_objext \
43632    conftest$ac_exeext conftest.$ac_ext
43633LIBS=$ac_check_lib_save_LIBS
43634fi
43635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43636$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43637if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43638  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43639fi
43640
43641      if test $ac_cv_lib_nsl_gethostbyname = no; then
43642	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43643$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43644if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43645  $as_echo_n "(cached) " >&6
43646else
43647  ac_check_lib_save_LIBS=$LIBS
43648LIBS="-lbsd  $LIBS"
43649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43650/* end confdefs.h.  */
43651
43652/* Override any GCC internal prototype to avoid an error.
43653   Use char because int might match the return type of a GCC
43654   builtin and then its argument prototype would still apply.  */
43655#ifdef __cplusplus
43656extern "C"
43657#endif
43658char gethostbyname ();
43659int
43660main ()
43661{
43662return gethostbyname ();
43663  ;
43664  return 0;
43665}
43666_ACEOF
43667if ac_fn_cxx_try_link "$LINENO"; then :
43668  ac_cv_lib_bsd_gethostbyname=yes
43669else
43670  ac_cv_lib_bsd_gethostbyname=no
43671fi
43672rm -f core conftest.err conftest.$ac_objext \
43673    conftest$ac_exeext conftest.$ac_ext
43674LIBS=$ac_check_lib_save_LIBS
43675fi
43676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43677$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43678if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43679  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43680fi
43681
43682      fi
43683    fi
43684
43685    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43686    # socket/setsockopt and other routines are undefined under SCO ODT
43687    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43688    # on later versions), says Simon Leinen: it contains gethostby*
43689    # variants that don't use the name server (or something).  -lsocket
43690    # must be given before -lnsl if both are needed.  We assume that
43691    # if connect needs -lnsl, so does gethostbyname.
43692    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43693if test "x$ac_cv_func_connect" = xyes; then :
43694
43695fi
43696
43697    if test $ac_cv_func_connect = no; then
43698      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43699$as_echo_n "checking for connect in -lsocket... " >&6; }
43700if ${ac_cv_lib_socket_connect+:} false; then :
43701  $as_echo_n "(cached) " >&6
43702else
43703  ac_check_lib_save_LIBS=$LIBS
43704LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43706/* end confdefs.h.  */
43707
43708/* Override any GCC internal prototype to avoid an error.
43709   Use char because int might match the return type of a GCC
43710   builtin and then its argument prototype would still apply.  */
43711#ifdef __cplusplus
43712extern "C"
43713#endif
43714char connect ();
43715int
43716main ()
43717{
43718return connect ();
43719  ;
43720  return 0;
43721}
43722_ACEOF
43723if ac_fn_cxx_try_link "$LINENO"; then :
43724  ac_cv_lib_socket_connect=yes
43725else
43726  ac_cv_lib_socket_connect=no
43727fi
43728rm -f core conftest.err conftest.$ac_objext \
43729    conftest$ac_exeext conftest.$ac_ext
43730LIBS=$ac_check_lib_save_LIBS
43731fi
43732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43733$as_echo "$ac_cv_lib_socket_connect" >&6; }
43734if test "x$ac_cv_lib_socket_connect" = xyes; then :
43735  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43736fi
43737
43738    fi
43739
43740    # Guillermo Gomez says -lposix is necessary on A/UX.
43741    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43742if test "x$ac_cv_func_remove" = xyes; then :
43743
43744fi
43745
43746    if test $ac_cv_func_remove = no; then
43747      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43748$as_echo_n "checking for remove in -lposix... " >&6; }
43749if ${ac_cv_lib_posix_remove+:} false; then :
43750  $as_echo_n "(cached) " >&6
43751else
43752  ac_check_lib_save_LIBS=$LIBS
43753LIBS="-lposix  $LIBS"
43754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43755/* end confdefs.h.  */
43756
43757/* Override any GCC internal prototype to avoid an error.
43758   Use char because int might match the return type of a GCC
43759   builtin and then its argument prototype would still apply.  */
43760#ifdef __cplusplus
43761extern "C"
43762#endif
43763char remove ();
43764int
43765main ()
43766{
43767return remove ();
43768  ;
43769  return 0;
43770}
43771_ACEOF
43772if ac_fn_cxx_try_link "$LINENO"; then :
43773  ac_cv_lib_posix_remove=yes
43774else
43775  ac_cv_lib_posix_remove=no
43776fi
43777rm -f core conftest.err conftest.$ac_objext \
43778    conftest$ac_exeext conftest.$ac_ext
43779LIBS=$ac_check_lib_save_LIBS
43780fi
43781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43782$as_echo "$ac_cv_lib_posix_remove" >&6; }
43783if test "x$ac_cv_lib_posix_remove" = xyes; then :
43784  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43785fi
43786
43787    fi
43788
43789    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43790    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43791if test "x$ac_cv_func_shmat" = xyes; then :
43792
43793fi
43794
43795    if test $ac_cv_func_shmat = no; then
43796      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43797$as_echo_n "checking for shmat in -lipc... " >&6; }
43798if ${ac_cv_lib_ipc_shmat+:} false; then :
43799  $as_echo_n "(cached) " >&6
43800else
43801  ac_check_lib_save_LIBS=$LIBS
43802LIBS="-lipc  $LIBS"
43803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43804/* end confdefs.h.  */
43805
43806/* Override any GCC internal prototype to avoid an error.
43807   Use char because int might match the return type of a GCC
43808   builtin and then its argument prototype would still apply.  */
43809#ifdef __cplusplus
43810extern "C"
43811#endif
43812char shmat ();
43813int
43814main ()
43815{
43816return shmat ();
43817  ;
43818  return 0;
43819}
43820_ACEOF
43821if ac_fn_cxx_try_link "$LINENO"; then :
43822  ac_cv_lib_ipc_shmat=yes
43823else
43824  ac_cv_lib_ipc_shmat=no
43825fi
43826rm -f core conftest.err conftest.$ac_objext \
43827    conftest$ac_exeext conftest.$ac_ext
43828LIBS=$ac_check_lib_save_LIBS
43829fi
43830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43831$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43832if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43833  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43834fi
43835
43836    fi
43837  fi
43838
43839  # Check for libraries that X11R6 Xt/Xaw programs need.
43840  ac_save_LDFLAGS=$LDFLAGS
43841  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43842  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43843  # check for ICE first), but we must link in the order -lSM -lICE or
43844  # we get undefined symbols.  So assume we have SM if we have ICE.
43845  # These have to be linked with before -lX11, unlike the other
43846  # libraries we check for below, so use a different variable.
43847  # John Interrante, Karl Berry
43848  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43849$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43850if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43851  $as_echo_n "(cached) " >&6
43852else
43853  ac_check_lib_save_LIBS=$LIBS
43854LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43856/* end confdefs.h.  */
43857
43858/* Override any GCC internal prototype to avoid an error.
43859   Use char because int might match the return type of a GCC
43860   builtin and then its argument prototype would still apply.  */
43861#ifdef __cplusplus
43862extern "C"
43863#endif
43864char IceConnectionNumber ();
43865int
43866main ()
43867{
43868return IceConnectionNumber ();
43869  ;
43870  return 0;
43871}
43872_ACEOF
43873if ac_fn_cxx_try_link "$LINENO"; then :
43874  ac_cv_lib_ICE_IceConnectionNumber=yes
43875else
43876  ac_cv_lib_ICE_IceConnectionNumber=no
43877fi
43878rm -f core conftest.err conftest.$ac_objext \
43879    conftest$ac_exeext conftest.$ac_ext
43880LIBS=$ac_check_lib_save_LIBS
43881fi
43882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43883$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43884if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43885  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43886fi
43887
43888  LDFLAGS=$ac_save_LDFLAGS
43889
43890fi
43891
43892
43893    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43894    # this doesn't make sense so we remove it.
43895    if test "x$COMPILE_TYPE" = xcross; then
43896      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43897    fi
43898
43899    if test "x$no_x" = xyes; then
43900
43901  # Print a helpful message on how to acquire the necessary build dependency.
43902  # x11 is the help tag: freetype, cups, pulse, alsa etc
43903  MISSING_DEPENDENCY=x11
43904
43905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43906    cygwin_help $MISSING_DEPENDENCY
43907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43908    msys_help $MISSING_DEPENDENCY
43909  else
43910    PKGHANDLER_COMMAND=
43911
43912    case $PKGHANDLER in
43913      apt-get)
43914        apt_help     $MISSING_DEPENDENCY ;;
43915      yum)
43916        yum_help     $MISSING_DEPENDENCY ;;
43917      port)
43918        port_help    $MISSING_DEPENDENCY ;;
43919      pkgutil)
43920        pkgutil_help $MISSING_DEPENDENCY ;;
43921      pkgadd)
43922        pkgadd_help  $MISSING_DEPENDENCY ;;
43923    esac
43924
43925    if test "x$PKGHANDLER_COMMAND" != x; then
43926      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43927    fi
43928  fi
43929
43930      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43931    fi
43932
43933    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43934      OPENWIN_HOME="/usr/openwin"
43935      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43936      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43937          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43938          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43939          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43940    fi
43941
43942    ac_ext=c
43943ac_cpp='$CPP $CPPFLAGS'
43944ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43945ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43946ac_compiler_gnu=$ac_cv_c_compiler_gnu
43947
43948    OLD_CFLAGS="$CFLAGS"
43949    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
43950
43951    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43952    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43953do :
43954  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43955ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43956          # include <X11/Xlib.h>
43957          # include <X11/Xutil.h>
43958
43959
43960"
43961if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43962  cat >>confdefs.h <<_ACEOF
43963#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43964_ACEOF
43965 X11_HEADERS_OK=yes
43966else
43967  X11_HEADERS_OK=no; break
43968fi
43969
43970done
43971
43972
43973    if test "x$X11_HEADERS_OK" = xno; then
43974
43975  # Print a helpful message on how to acquire the necessary build dependency.
43976  # x11 is the help tag: freetype, cups, pulse, alsa etc
43977  MISSING_DEPENDENCY=x11
43978
43979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43980    cygwin_help $MISSING_DEPENDENCY
43981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43982    msys_help $MISSING_DEPENDENCY
43983  else
43984    PKGHANDLER_COMMAND=
43985
43986    case $PKGHANDLER in
43987      apt-get)
43988        apt_help     $MISSING_DEPENDENCY ;;
43989      yum)
43990        yum_help     $MISSING_DEPENDENCY ;;
43991      port)
43992        port_help    $MISSING_DEPENDENCY ;;
43993      pkgutil)
43994        pkgutil_help $MISSING_DEPENDENCY ;;
43995      pkgadd)
43996        pkgadd_help  $MISSING_DEPENDENCY ;;
43997    esac
43998
43999    if test "x$PKGHANDLER_COMMAND" != x; then
44000      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44001    fi
44002  fi
44003
44004      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44005    fi
44006
44007    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
44008    # defined in libawt_xawt.
44009    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
44010$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
44011    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44012/* end confdefs.h.  */
44013#include <X11/extensions/Xrender.h>
44014int
44015main ()
44016{
44017XLinearGradient x;
44018  ;
44019  return 0;
44020}
44021_ACEOF
44022if ac_fn_c_try_compile "$LINENO"; then :
44023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44024$as_echo "yes" >&6; }
44025else
44026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44027$as_echo "no" >&6; }
44028         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44029fi
44030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44031
44032    CFLAGS="$OLD_CFLAGS"
44033    ac_ext=cpp
44034ac_cpp='$CXXCPP $CPPFLAGS'
44035ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44036ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44037ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44038
44039  fi # X11_NOT_NEEDED
44040
44041
44042
44043
44044
44045
44046  ###############################################################################
44047  #
44048  # The common unix printing system cups is used to print from java.
44049  #
44050
44051# Check whether --with-cups was given.
44052if test "${with_cups+set}" = set; then :
44053  withval=$with_cups;
44054fi
44055
44056
44057# Check whether --with-cups-include was given.
44058if test "${with_cups_include+set}" = set; then :
44059  withval=$with_cups_include;
44060fi
44061
44062
44063  if test "x$CUPS_NOT_NEEDED" = xyes; then
44064    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44065      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44066$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44067    fi
44068    CUPS_CFLAGS=
44069  else
44070    CUPS_FOUND=no
44071
44072    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44073      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44074    fi
44075
44076    if test "x${with_cups}" != x; then
44077      CUPS_CFLAGS="-I${with_cups}/include"
44078      CUPS_FOUND=yes
44079    fi
44080    if test "x${with_cups_include}" != x; then
44081      CUPS_CFLAGS="-I${with_cups_include}"
44082      CUPS_FOUND=yes
44083    fi
44084    if test "x$CUPS_FOUND" = xno; then
44085
44086
44087  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44088    # Source the builddeps file again, to make sure it uses the latest variables!
44089    . $builddepsfile
44090    # Look for a target and build machine specific resource!
44091    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44092    if test "x$resource" = x; then
44093      # Ok, lets instead look for a target specific resource
44094      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44095    fi
44096    if test "x$resource" = x; then
44097      # Ok, lets instead look for a build specific resource
44098      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44099    fi
44100    if test "x$resource" = x; then
44101      # Ok, lets instead look for a generic resource
44102      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44103      resource=${builddep_cups}
44104    fi
44105    if test "x$resource" != x; then
44106      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44107$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44108      # If the resource in the builddeps.conf file is an existing directory,
44109      # for example /java/linux/cups
44110      if test -d ${resource}; then
44111        depdir=${resource}
44112      else
44113
44114  # cups is for example mymodule
44115  # $resource is for example libs/general/libmymod_1_2_3.zip
44116  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44117  # $with_builddeps_dir is for example /localhome/builddeps
44118  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44119  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44120  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44121  filename=`basename $resource`
44122  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44123  filebase=${filename%%.*}
44124  extension=${filename#*.}
44125  installdir=$with_builddeps_dir/$filebase
44126  if test ! -f $installdir/$filename.unpacked; then
44127    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44128$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44129    if test ! -d $installdir; then
44130      mkdir -p $installdir
44131    fi
44132    if test ! -d $installdir; then
44133      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44134    fi
44135    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44136    touch $tmpfile
44137    if test ! -f $tmpfile; then
44138      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44139    fi
44140
44141  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44142  # $tmpfile is the local file name for the downloaded file.
44143  VALID_TOOL=no
44144  if test "x$BDEPS_FTP" = xwget; then
44145    VALID_TOOL=yes
44146    wget -O $tmpfile $with_builddeps_server/$resource
44147  fi
44148  if test "x$BDEPS_FTP" = xlftp; then
44149    VALID_TOOL=yes
44150    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44151  fi
44152  if test "x$BDEPS_FTP" = xftp; then
44153    VALID_TOOL=yes
44154    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44155    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44156    FTPUSERPWD=${FTPSERVER%%@*}
44157    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44158      FTPUSER=${userpwd%%:*}
44159      FTPPWD=${userpwd#*@}
44160      FTPSERVER=${FTPSERVER#*@}
44161    else
44162      FTPUSER=ftp
44163      FTPPWD=ftp
44164    fi
44165    # the "pass" command does not work on some
44166    # ftp clients (read ftp.exe) but if it works,
44167    # passive mode is better!
44168    ( \
44169        echo "user $FTPUSER $FTPPWD"        ; \
44170        echo "pass"                         ; \
44171        echo "bin"                          ; \
44172        echo "get $FTPPATH $tmpfile"              ; \
44173    ) | ftp -in $FTPSERVER
44174  fi
44175  if test "x$VALID_TOOL" != xyes; then
44176    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44177  fi
44178
44179    mv $tmpfile $installdir/$filename
44180    if test ! -s $installdir/$filename; then
44181      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44182    fi
44183    case "$extension" in
44184      zip)  echo "Unzipping $installdir/$filename..."
44185        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44186        ;;
44187      tar.gz) echo "Untaring $installdir/$filename..."
44188        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44189        ;;
44190      tgz) echo "Untaring $installdir/$filename..."
44191        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44192        ;;
44193      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44194        ;;
44195    esac
44196  fi
44197  if test -f $installdir/$filename.unpacked; then
44198    depdir=$installdir
44199  fi
44200
44201      fi
44202      # Source the builddeps file again, because in the previous command, the depdir
44203      # was updated to point at the current build dependency install directory.
44204      . $builddepsfile
44205      # Now extract variables from the builddeps.conf files.
44206      theroot=${builddep_cups_ROOT}
44207      thecflags=${builddep_cups_CFLAGS}
44208      thelibs=${builddep_cups_LIBS}
44209      if test "x$depdir" = x; then
44210        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44211      fi
44212      CUPS=$depdir
44213      if test "x$theroot" != x; then
44214        CUPS="$theroot"
44215      fi
44216      if test "x$thecflags" != x; then
44217        CUPS_CFLAGS="$thecflags"
44218      fi
44219      if test "x$thelibs" != x; then
44220        CUPS_LIBS="$thelibs"
44221      fi
44222      CUPS_FOUND=yes
44223
44224    fi
44225
44226  fi
44227
44228    fi
44229    if test "x$CUPS_FOUND" = xno; then
44230      # Are the cups headers installed in the default /usr/include location?
44231      for ac_header in cups/cups.h cups/ppd.h
44232do :
44233  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44234ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44235if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44236  cat >>confdefs.h <<_ACEOF
44237#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44238_ACEOF
44239
44240            CUPS_FOUND=yes
44241            CUPS_CFLAGS=
44242            DEFAULT_CUPS=yes
44243
44244
44245fi
44246
44247done
44248
44249    fi
44250    if test "x$CUPS_FOUND" = xno; then
44251      # Getting nervous now? Lets poke around for standard Solaris third-party
44252      # package installation locations.
44253      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44254$as_echo_n "checking for cups headers... " >&6; }
44255      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44256        # An SFW package seems to be installed!
44257        CUPS_FOUND=yes
44258        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44259      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44260        # A CSW package seems to be installed!
44261        CUPS_FOUND=yes
44262        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44263      fi
44264      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44265$as_echo "$CUPS_FOUND" >&6; }
44266    fi
44267    if test "x$CUPS_FOUND" = xno; then
44268
44269  # Print a helpful message on how to acquire the necessary build dependency.
44270  # cups is the help tag: freetype, cups, pulse, alsa etc
44271  MISSING_DEPENDENCY=cups
44272
44273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44274    cygwin_help $MISSING_DEPENDENCY
44275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44276    msys_help $MISSING_DEPENDENCY
44277  else
44278    PKGHANDLER_COMMAND=
44279
44280    case $PKGHANDLER in
44281      apt-get)
44282        apt_help     $MISSING_DEPENDENCY ;;
44283      yum)
44284        yum_help     $MISSING_DEPENDENCY ;;
44285      port)
44286        port_help    $MISSING_DEPENDENCY ;;
44287      pkgutil)
44288        pkgutil_help $MISSING_DEPENDENCY ;;
44289      pkgadd)
44290        pkgadd_help  $MISSING_DEPENDENCY ;;
44291    esac
44292
44293    if test "x$PKGHANDLER_COMMAND" != x; then
44294      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44295    fi
44296  fi
44297
44298      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44299    fi
44300  fi
44301
44302
44303
44304
44305
44306
44307  ###############################################################################
44308  #
44309  # The ubiquitous freetype library is used to render fonts.
44310  #
44311
44312# Check whether --with-freetype was given.
44313if test "${with_freetype+set}" = set; then :
44314  withval=$with_freetype;
44315fi
44316
44317
44318# Check whether --with-freetype-include was given.
44319if test "${with_freetype_include+set}" = set; then :
44320  withval=$with_freetype_include;
44321fi
44322
44323
44324# Check whether --with-freetype-lib was given.
44325if test "${with_freetype_lib+set}" = set; then :
44326  withval=$with_freetype_lib;
44327fi
44328
44329
44330# Check whether --with-freetype-src was given.
44331if test "${with_freetype_src+set}" = set; then :
44332  withval=$with_freetype_src;
44333fi
44334
44335  # Check whether --enable-freetype-bundling was given.
44336if test "${enable_freetype_bundling+set}" = set; then :
44337  enableval=$enable_freetype_bundling;
44338fi
44339
44340
44341  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44342  FREETYPE_BASE_NAME=freetype
44343  FREETYPE_CFLAGS=
44344  FREETYPE_LIBS=
44345  FREETYPE_BUNDLE_LIB_PATH=
44346
44347  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44348    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
44349      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44350$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44351    fi
44352    if test "x$enable_freetype_bundling" != x; then
44353      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44354$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44355    fi
44356  else
44357    # freetype is needed to build; go get it!
44358
44359    BUNDLE_FREETYPE="$enable_freetype_bundling"
44360
44361    if  test "x$with_freetype_src" != x; then
44362      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44363        # Try to build freetype if --with-freetype-src was given on Windows
44364
44365  FREETYPE_SRC_PATH="$with_freetype_src"
44366  BUILD_FREETYPE=yes
44367
44368  # Check if the freetype sources are acessible..
44369  if ! test -d $FREETYPE_SRC_PATH; then
44370    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
44371$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44372    BUILD_FREETYPE=no
44373  fi
44374  # ..and contain a vc2010 project file
44375  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44376  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44377    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
44378$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44379    BUILD_FREETYPE=no
44380  fi
44381  # Now check if configure found a version of 'msbuild.exe'
44382  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44383    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&5
44384$as_echo "$as_me: WARNING: Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&2;}
44385    BUILD_FREETYPE=no
44386  fi
44387
44388  # Ready to go..
44389  if test "x$BUILD_FREETYPE" = xyes; then
44390
44391    # msbuild requires trailing slashes for output directories
44392    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44393    freetype_lib_path_unix="$freetype_lib_path"
44394    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44395
44396  unix_path="$vcxproj_path"
44397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44398    windows_path=`$CYGPATH -m "$unix_path"`
44399    vcxproj_path="$windows_path"
44400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44401    windows_path=`cmd //c echo $unix_path`
44402    vcxproj_path="$windows_path"
44403  fi
44404
44405
44406  unix_path="$freetype_lib_path"
44407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44408    windows_path=`$CYGPATH -m "$unix_path"`
44409    freetype_lib_path="$windows_path"
44410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44411    windows_path=`cmd //c echo $unix_path`
44412    freetype_lib_path="$windows_path"
44413  fi
44414
44415
44416  unix_path="$freetype_obj_path"
44417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44418    windows_path=`$CYGPATH -m "$unix_path"`
44419    freetype_obj_path="$windows_path"
44420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44421    windows_path=`cmd //c echo $unix_path`
44422    freetype_obj_path="$windows_path"
44423  fi
44424
44425    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44426      freetype_platform=x64
44427    else
44428      freetype_platform=win32
44429    fi
44430
44431    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44432    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44433    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44434    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44435    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44436$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44437
44438    # First we try to build the freetype.dll
44439    $ECHO -e "@echo off\n"\
44440	     "$MSBUILD $vcxproj_path "\
44441		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44442		       "/p:Configuration=\"Release Multithreaded\" "\
44443		       "/p:Platform=$freetype_platform "\
44444		       "/p:ConfigurationType=DynamicLibrary "\
44445		       "/p:TargetName=freetype "\
44446		       "/p:OutDir=\"$freetype_lib_path\" "\
44447		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44448    cmd /c freetype.bat
44449
44450    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44451      # If that succeeds we also build freetype.lib
44452      $ECHO -e "@echo off\n"\
44453	       "$MSBUILD $vcxproj_path "\
44454			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44455			 "/p:Configuration=\"Release Multithreaded\" "\
44456			 "/p:Platform=$freetype_platform "\
44457			 "/p:ConfigurationType=StaticLibrary "\
44458			 "/p:TargetName=freetype "\
44459			 "/p:OutDir=\"$freetype_lib_path\" "\
44460			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44461      cmd /c freetype.bat
44462
44463      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44464	# Once we build both, lib and dll, set freetype lib and include path appropriately
44465	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44466	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44467	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44468$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44469      else
44470	BUILD_FREETYPE=no
44471      fi
44472    else
44473      BUILD_FREETYPE=no
44474    fi
44475  fi
44476
44477        if test "x$BUILD_FREETYPE" = xyes; then
44478          # Okay, we built it. Check that it works.
44479
44480  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44481  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44482  METHOD="--with-freetype-src"
44483
44484  # Let's start with an optimistic view of the world :-)
44485  FOUND_FREETYPE=yes
44486
44487  # First look for the canonical freetype main include file ft2build.h.
44488  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44489    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44490    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44491    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44492      # Fail.
44493      FOUND_FREETYPE=no
44494    fi
44495  fi
44496
44497  if test "x$FOUND_FREETYPE" = xyes; then
44498    # Include file found, let's continue the sanity check.
44499    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44500$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44501
44502    # Reset to default value
44503    FREETYPE_BASE_NAME=freetype
44504    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44505    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44506      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44507          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44508        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44509        # for the .6 version explicitly.
44510        FREETYPE_BASE_NAME=freetype.6
44511        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44512        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44513$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44514      else
44515        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44516$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44517        FOUND_FREETYPE=no
44518      fi
44519    else
44520      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44521        # On Windows, we will need both .lib and .dll file.
44522        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44523          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44524$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44525          FOUND_FREETYPE=no
44526        fi
44527      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44528          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44529        # Found lib in isa dir, use that instead.
44530        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44531        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44532$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44533      fi
44534    fi
44535  fi
44536
44537  if test "x$FOUND_FREETYPE" = xyes; then
44538
44539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44540
44541  # Input might be given as Windows format, start by converting to
44542  # unix format.
44543  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44544  new_path=`$CYGPATH -u "$path"`
44545
44546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44549  # "foo.exe" is OK but "foo" is an error.
44550  #
44551  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44552  # It is also a way to make sure we got the proper file name for the real test later on.
44553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44554  if test "x$test_shortpath" = x; then
44555    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44556$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44557    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44558  fi
44559
44560  # Call helper function which possibly converts this using DOS-style short mode.
44561  # If so, the updated path is stored in $new_path.
44562
44563  input_path="$new_path"
44564  # Check if we need to convert this using DOS-style short mode. If the path
44565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44566  # take no chances and rewrite it.
44567  # Note: m4 eats our [], so we need to use [ and ] instead.
44568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44569  if test "x$has_forbidden_chars" != x; then
44570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44571    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44572    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44573    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44574      # Going to short mode and back again did indeed matter. Since short mode is
44575      # case insensitive, let's make it lowercase to improve readability.
44576      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44577      # Now convert it back to Unix-stile (cygpath)
44578      input_path=`$CYGPATH -u "$shortmode_path"`
44579      new_path="$input_path"
44580    fi
44581  fi
44582
44583  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44584  if test "x$test_cygdrive_prefix" = x; then
44585    # As a simple fix, exclude /usr/bin since it's not a real path.
44586    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44587      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44588      # a path prefixed by /cygdrive for fixpath to work.
44589      new_path="$CYGWIN_ROOT_PATH$input_path"
44590    fi
44591  fi
44592
44593
44594  if test "x$path" != "x$new_path"; then
44595    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44597$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44598  fi
44599
44600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44601
44602  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44603  has_colon=`$ECHO $path | $GREP ^.:`
44604  new_path="$path"
44605  if test "x$has_colon" = x; then
44606    # Not in mixed or Windows style, start by that.
44607    new_path=`cmd //c echo $path`
44608  fi
44609
44610
44611  input_path="$new_path"
44612  # Check if we need to convert this using DOS-style short mode. If the path
44613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44614  # take no chances and rewrite it.
44615  # Note: m4 eats our [], so we need to use [ and ] instead.
44616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44617  if test "x$has_forbidden_chars" != x; then
44618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44620  fi
44621
44622
44623  windows_path="$new_path"
44624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44625    unix_path=`$CYGPATH -u "$windows_path"`
44626    new_path="$unix_path"
44627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44629    new_path="$unix_path"
44630  fi
44631
44632  if test "x$path" != "x$new_path"; then
44633    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44635$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44636  fi
44637
44638  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44639  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44640
44641  else
44642    # We're on a unix platform. Hooray! :)
44643    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44644    has_space=`$ECHO "$path" | $GREP " "`
44645    if test "x$has_space" != x; then
44646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44647$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44648      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44649    fi
44650
44651    # Use eval to expand a potential ~
44652    eval path="$path"
44653    if test ! -f "$path" && test ! -d "$path"; then
44654      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44655    fi
44656
44657    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44658  fi
44659
44660
44661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44662
44663  # Input might be given as Windows format, start by converting to
44664  # unix format.
44665  path="$POTENTIAL_FREETYPE_LIB_PATH"
44666  new_path=`$CYGPATH -u "$path"`
44667
44668  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44669  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44670  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44671  # "foo.exe" is OK but "foo" is an error.
44672  #
44673  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44674  # It is also a way to make sure we got the proper file name for the real test later on.
44675  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44676  if test "x$test_shortpath" = x; then
44677    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44678$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44679    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44680  fi
44681
44682  # Call helper function which possibly converts this using DOS-style short mode.
44683  # If so, the updated path is stored in $new_path.
44684
44685  input_path="$new_path"
44686  # Check if we need to convert this using DOS-style short mode. If the path
44687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44688  # take no chances and rewrite it.
44689  # Note: m4 eats our [], so we need to use [ and ] instead.
44690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44691  if test "x$has_forbidden_chars" != x; then
44692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44696      # Going to short mode and back again did indeed matter. Since short mode is
44697      # case insensitive, let's make it lowercase to improve readability.
44698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44699      # Now convert it back to Unix-stile (cygpath)
44700      input_path=`$CYGPATH -u "$shortmode_path"`
44701      new_path="$input_path"
44702    fi
44703  fi
44704
44705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44706  if test "x$test_cygdrive_prefix" = x; then
44707    # As a simple fix, exclude /usr/bin since it's not a real path.
44708    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44710      # a path prefixed by /cygdrive for fixpath to work.
44711      new_path="$CYGWIN_ROOT_PATH$input_path"
44712    fi
44713  fi
44714
44715
44716  if test "x$path" != "x$new_path"; then
44717    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44719$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44720  fi
44721
44722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44723
44724  path="$POTENTIAL_FREETYPE_LIB_PATH"
44725  has_colon=`$ECHO $path | $GREP ^.:`
44726  new_path="$path"
44727  if test "x$has_colon" = x; then
44728    # Not in mixed or Windows style, start by that.
44729    new_path=`cmd //c echo $path`
44730  fi
44731
44732
44733  input_path="$new_path"
44734  # Check if we need to convert this using DOS-style short mode. If the path
44735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44736  # take no chances and rewrite it.
44737  # Note: m4 eats our [], so we need to use [ and ] instead.
44738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44739  if test "x$has_forbidden_chars" != x; then
44740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44742  fi
44743
44744
44745  windows_path="$new_path"
44746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44747    unix_path=`$CYGPATH -u "$windows_path"`
44748    new_path="$unix_path"
44749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44751    new_path="$unix_path"
44752  fi
44753
44754  if test "x$path" != "x$new_path"; then
44755    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44757$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44758  fi
44759
44760  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44761  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44762
44763  else
44764    # We're on a unix platform. Hooray! :)
44765    path="$POTENTIAL_FREETYPE_LIB_PATH"
44766    has_space=`$ECHO "$path" | $GREP " "`
44767    if test "x$has_space" != x; then
44768      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44769$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44770      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44771    fi
44772
44773    # Use eval to expand a potential ~
44774    eval path="$path"
44775    if test ! -f "$path" && test ! -d "$path"; then
44776      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44777    fi
44778
44779    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44780  fi
44781
44782
44783    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44784    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44785$as_echo_n "checking for freetype includes... " >&6; }
44786    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44787$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44788    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44789    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44790$as_echo_n "checking for freetype libraries... " >&6; }
44791    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44792$as_echo "$FREETYPE_LIB_PATH" >&6; }
44793  fi
44794
44795          if test "x$FOUND_FREETYPE" != xyes; then
44796            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44797          fi
44798        else
44799          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44800$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44801          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44802        fi
44803      else
44804        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44805$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44806      fi
44807    fi
44808
44809    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44810      # User has specified settings
44811
44812      if test "x$BUNDLE_FREETYPE" = x; then
44813        # If not specified, default is to bundle freetype
44814        BUNDLE_FREETYPE=yes
44815      fi
44816
44817      if test "x$with_freetype" != x; then
44818        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44819        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44820      fi
44821
44822      # Allow --with-freetype-lib and --with-freetype-include to override
44823      if test "x$with_freetype_include" != x; then
44824        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44825      fi
44826      if test "x$with_freetype_lib" != x; then
44827        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44828      fi
44829
44830      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44831        # Okay, we got it. Check that it works.
44832
44833  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44834  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44835  METHOD="--with-freetype"
44836
44837  # Let's start with an optimistic view of the world :-)
44838  FOUND_FREETYPE=yes
44839
44840  # First look for the canonical freetype main include file ft2build.h.
44841  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44842    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44843    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44844    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44845      # Fail.
44846      FOUND_FREETYPE=no
44847    fi
44848  fi
44849
44850  if test "x$FOUND_FREETYPE" = xyes; then
44851    # Include file found, let's continue the sanity check.
44852    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44853$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44854
44855    # Reset to default value
44856    FREETYPE_BASE_NAME=freetype
44857    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44858    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44859      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44860          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44861        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44862        # for the .6 version explicitly.
44863        FREETYPE_BASE_NAME=freetype.6
44864        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44865        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44866$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44867      else
44868        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44869$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44870        FOUND_FREETYPE=no
44871      fi
44872    else
44873      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44874        # On Windows, we will need both .lib and .dll file.
44875        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44876          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44877$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44878          FOUND_FREETYPE=no
44879        fi
44880      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44881          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44882        # Found lib in isa dir, use that instead.
44883        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44884        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44885$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44886      fi
44887    fi
44888  fi
44889
44890  if test "x$FOUND_FREETYPE" = xyes; then
44891
44892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44893
44894  # Input might be given as Windows format, start by converting to
44895  # unix format.
44896  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44897  new_path=`$CYGPATH -u "$path"`
44898
44899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44902  # "foo.exe" is OK but "foo" is an error.
44903  #
44904  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44905  # It is also a way to make sure we got the proper file name for the real test later on.
44906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44907  if test "x$test_shortpath" = x; then
44908    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44909$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44910    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44911  fi
44912
44913  # Call helper function which possibly converts this using DOS-style short mode.
44914  # If so, the updated path is stored in $new_path.
44915
44916  input_path="$new_path"
44917  # Check if we need to convert this using DOS-style short mode. If the path
44918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44919  # take no chances and rewrite it.
44920  # Note: m4 eats our [], so we need to use [ and ] instead.
44921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44922  if test "x$has_forbidden_chars" != x; then
44923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44927      # Going to short mode and back again did indeed matter. Since short mode is
44928      # case insensitive, let's make it lowercase to improve readability.
44929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44930      # Now convert it back to Unix-stile (cygpath)
44931      input_path=`$CYGPATH -u "$shortmode_path"`
44932      new_path="$input_path"
44933    fi
44934  fi
44935
44936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44937  if test "x$test_cygdrive_prefix" = x; then
44938    # As a simple fix, exclude /usr/bin since it's not a real path.
44939    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44941      # a path prefixed by /cygdrive for fixpath to work.
44942      new_path="$CYGWIN_ROOT_PATH$input_path"
44943    fi
44944  fi
44945
44946
44947  if test "x$path" != "x$new_path"; then
44948    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44950$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44951  fi
44952
44953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44954
44955  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44956  has_colon=`$ECHO $path | $GREP ^.:`
44957  new_path="$path"
44958  if test "x$has_colon" = x; then
44959    # Not in mixed or Windows style, start by that.
44960    new_path=`cmd //c echo $path`
44961  fi
44962
44963
44964  input_path="$new_path"
44965  # Check if we need to convert this using DOS-style short mode. If the path
44966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44967  # take no chances and rewrite it.
44968  # Note: m4 eats our [], so we need to use [ and ] instead.
44969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44970  if test "x$has_forbidden_chars" != x; then
44971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44973  fi
44974
44975
44976  windows_path="$new_path"
44977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44978    unix_path=`$CYGPATH -u "$windows_path"`
44979    new_path="$unix_path"
44980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44982    new_path="$unix_path"
44983  fi
44984
44985  if test "x$path" != "x$new_path"; then
44986    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44988$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44989  fi
44990
44991  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44992  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44993
44994  else
44995    # We're on a unix platform. Hooray! :)
44996    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44997    has_space=`$ECHO "$path" | $GREP " "`
44998    if test "x$has_space" != x; then
44999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45000$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45001      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45002    fi
45003
45004    # Use eval to expand a potential ~
45005    eval path="$path"
45006    if test ! -f "$path" && test ! -d "$path"; then
45007      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45008    fi
45009
45010    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45011  fi
45012
45013
45014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45015
45016  # Input might be given as Windows format, start by converting to
45017  # unix format.
45018  path="$POTENTIAL_FREETYPE_LIB_PATH"
45019  new_path=`$CYGPATH -u "$path"`
45020
45021  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45022  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45023  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45024  # "foo.exe" is OK but "foo" is an error.
45025  #
45026  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45027  # It is also a way to make sure we got the proper file name for the real test later on.
45028  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45029  if test "x$test_shortpath" = x; then
45030    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45031$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45032    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45033  fi
45034
45035  # Call helper function which possibly converts this using DOS-style short mode.
45036  # If so, the updated path is stored in $new_path.
45037
45038  input_path="$new_path"
45039  # Check if we need to convert this using DOS-style short mode. If the path
45040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45041  # take no chances and rewrite it.
45042  # Note: m4 eats our [], so we need to use [ and ] instead.
45043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45044  if test "x$has_forbidden_chars" != x; then
45045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45046    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45047    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45048    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45049      # Going to short mode and back again did indeed matter. Since short mode is
45050      # case insensitive, let's make it lowercase to improve readability.
45051      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45052      # Now convert it back to Unix-stile (cygpath)
45053      input_path=`$CYGPATH -u "$shortmode_path"`
45054      new_path="$input_path"
45055    fi
45056  fi
45057
45058  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45059  if test "x$test_cygdrive_prefix" = x; then
45060    # As a simple fix, exclude /usr/bin since it's not a real path.
45061    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45062      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45063      # a path prefixed by /cygdrive for fixpath to work.
45064      new_path="$CYGWIN_ROOT_PATH$input_path"
45065    fi
45066  fi
45067
45068
45069  if test "x$path" != "x$new_path"; then
45070    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45072$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45073  fi
45074
45075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45076
45077  path="$POTENTIAL_FREETYPE_LIB_PATH"
45078  has_colon=`$ECHO $path | $GREP ^.:`
45079  new_path="$path"
45080  if test "x$has_colon" = x; then
45081    # Not in mixed or Windows style, start by that.
45082    new_path=`cmd //c echo $path`
45083  fi
45084
45085
45086  input_path="$new_path"
45087  # Check if we need to convert this using DOS-style short mode. If the path
45088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45089  # take no chances and rewrite it.
45090  # Note: m4 eats our [], so we need to use [ and ] instead.
45091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45092  if test "x$has_forbidden_chars" != x; then
45093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45094    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45095  fi
45096
45097
45098  windows_path="$new_path"
45099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45100    unix_path=`$CYGPATH -u "$windows_path"`
45101    new_path="$unix_path"
45102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45104    new_path="$unix_path"
45105  fi
45106
45107  if test "x$path" != "x$new_path"; then
45108    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45110$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45111  fi
45112
45113  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45114  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45115
45116  else
45117    # We're on a unix platform. Hooray! :)
45118    path="$POTENTIAL_FREETYPE_LIB_PATH"
45119    has_space=`$ECHO "$path" | $GREP " "`
45120    if test "x$has_space" != x; then
45121      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45122$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45123      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45124    fi
45125
45126    # Use eval to expand a potential ~
45127    eval path="$path"
45128    if test ! -f "$path" && test ! -d "$path"; then
45129      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45130    fi
45131
45132    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45133  fi
45134
45135
45136    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45137    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45138$as_echo_n "checking for freetype includes... " >&6; }
45139    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45140$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45141    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45142    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45143$as_echo_n "checking for freetype libraries... " >&6; }
45144    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45145$as_echo "$FREETYPE_LIB_PATH" >&6; }
45146  fi
45147
45148        if test "x$FOUND_FREETYPE" != xyes; then
45149          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45150        fi
45151      else
45152        # User specified only one of lib or include. This is an error.
45153        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45154          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45155$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45156          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45157        else
45158          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45159$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45160          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45161        fi
45162      fi
45163    else
45164      # User did not specify settings, but we need freetype. Try to locate it.
45165
45166      if test "x$BUNDLE_FREETYPE" = x; then
45167        # If not specified, default is to bundle freetype only on windows
45168        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45169          BUNDLE_FREETYPE=yes
45170        else
45171          BUNDLE_FREETYPE=no
45172        fi
45173      fi
45174
45175      if test "x$FOUND_FREETYPE" != xyes; then
45176        # Check builddeps
45177
45178
45179  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45180    # Source the builddeps file again, to make sure it uses the latest variables!
45181    . $builddepsfile
45182    # Look for a target and build machine specific resource!
45183    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45184    if test "x$resource" = x; then
45185      # Ok, lets instead look for a target specific resource
45186      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45187    fi
45188    if test "x$resource" = x; then
45189      # Ok, lets instead look for a build specific resource
45190      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45191    fi
45192    if test "x$resource" = x; then
45193      # Ok, lets instead look for a generic resource
45194      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45195      resource=${builddep_freetype2}
45196    fi
45197    if test "x$resource" != x; then
45198      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45199$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45200      # If the resource in the builddeps.conf file is an existing directory,
45201      # for example /java/linux/cups
45202      if test -d ${resource}; then
45203        depdir=${resource}
45204      else
45205
45206  # freetype2 is for example mymodule
45207  # $resource is for example libs/general/libmymod_1_2_3.zip
45208  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45209  # $with_builddeps_dir is for example /localhome/builddeps
45210  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45211  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45212  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45213  filename=`basename $resource`
45214  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45215  filebase=${filename%%.*}
45216  extension=${filename#*.}
45217  installdir=$with_builddeps_dir/$filebase
45218  if test ! -f $installdir/$filename.unpacked; then
45219    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45220$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45221    if test ! -d $installdir; then
45222      mkdir -p $installdir
45223    fi
45224    if test ! -d $installdir; then
45225      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45226    fi
45227    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45228    touch $tmpfile
45229    if test ! -f $tmpfile; then
45230      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45231    fi
45232
45233  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45234  # $tmpfile is the local file name for the downloaded file.
45235  VALID_TOOL=no
45236  if test "x$BDEPS_FTP" = xwget; then
45237    VALID_TOOL=yes
45238    wget -O $tmpfile $with_builddeps_server/$resource
45239  fi
45240  if test "x$BDEPS_FTP" = xlftp; then
45241    VALID_TOOL=yes
45242    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45243  fi
45244  if test "x$BDEPS_FTP" = xftp; then
45245    VALID_TOOL=yes
45246    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45247    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45248    FTPUSERPWD=${FTPSERVER%%@*}
45249    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45250      FTPUSER=${userpwd%%:*}
45251      FTPPWD=${userpwd#*@}
45252      FTPSERVER=${FTPSERVER#*@}
45253    else
45254      FTPUSER=ftp
45255      FTPPWD=ftp
45256    fi
45257    # the "pass" command does not work on some
45258    # ftp clients (read ftp.exe) but if it works,
45259    # passive mode is better!
45260    ( \
45261        echo "user $FTPUSER $FTPPWD"        ; \
45262        echo "pass"                         ; \
45263        echo "bin"                          ; \
45264        echo "get $FTPPATH $tmpfile"              ; \
45265    ) | ftp -in $FTPSERVER
45266  fi
45267  if test "x$VALID_TOOL" != xyes; then
45268    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45269  fi
45270
45271    mv $tmpfile $installdir/$filename
45272    if test ! -s $installdir/$filename; then
45273      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45274    fi
45275    case "$extension" in
45276      zip)  echo "Unzipping $installdir/$filename..."
45277        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45278        ;;
45279      tar.gz) echo "Untaring $installdir/$filename..."
45280        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45281        ;;
45282      tgz) echo "Untaring $installdir/$filename..."
45283        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45284        ;;
45285      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45286        ;;
45287    esac
45288  fi
45289  if test -f $installdir/$filename.unpacked; then
45290    depdir=$installdir
45291  fi
45292
45293      fi
45294      # Source the builddeps file again, because in the previous command, the depdir
45295      # was updated to point at the current build dependency install directory.
45296      . $builddepsfile
45297      # Now extract variables from the builddeps.conf files.
45298      theroot=${builddep_freetype2_ROOT}
45299      thecflags=${builddep_freetype2_CFLAGS}
45300      thelibs=${builddep_freetype2_LIBS}
45301      if test "x$depdir" = x; then
45302        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45303      fi
45304      FREETYPE=$depdir
45305      if test "x$theroot" != x; then
45306        FREETYPE="$theroot"
45307      fi
45308      if test "x$thecflags" != x; then
45309        FREETYPE_CFLAGS="$thecflags"
45310      fi
45311      if test "x$thelibs" != x; then
45312        FREETYPE_LIBS="$thelibs"
45313      fi
45314      FOUND_FREETYPE=yes
45315      else FOUND_FREETYPE=no
45316
45317    fi
45318    else FOUND_FREETYPE=no
45319
45320  fi
45321
45322        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45323        if test "x$FOUND_FREETYPE" = xyes; then
45324          if test "x$BUNDLE_FREETYPE" = xyes; then
45325            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45326$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45327            FOUND_FREETYPE=no
45328          else
45329            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45330$as_echo_n "checking for freetype... " >&6; }
45331            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45332$as_echo "yes (using builddeps)" >&6; }
45333          fi
45334        fi
45335      fi
45336
45337      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45338      if test "x$SYSROOT" = x; then
45339        if test "x$FOUND_FREETYPE" != xyes; then
45340          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45341          if test "x$PKG_CONFIG" != x; then
45342
45343pkg_failed=no
45344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45345$as_echo_n "checking for FREETYPE... " >&6; }
45346
45347if test -n "$FREETYPE_CFLAGS"; then
45348    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45349 elif test -n "$PKG_CONFIG"; then
45350    if test -n "$PKG_CONFIG" && \
45351    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45352  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45353  ac_status=$?
45354  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45355  test $ac_status = 0; }; then
45356  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45357else
45358  pkg_failed=yes
45359fi
45360 else
45361    pkg_failed=untried
45362fi
45363if test -n "$FREETYPE_LIBS"; then
45364    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45365 elif test -n "$PKG_CONFIG"; then
45366    if test -n "$PKG_CONFIG" && \
45367    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45368  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45369  ac_status=$?
45370  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45371  test $ac_status = 0; }; then
45372  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45373else
45374  pkg_failed=yes
45375fi
45376 else
45377    pkg_failed=untried
45378fi
45379
45380
45381
45382if test $pkg_failed = yes; then
45383
45384if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45385        _pkg_short_errors_supported=yes
45386else
45387        _pkg_short_errors_supported=no
45388fi
45389        if test $_pkg_short_errors_supported = yes; then
45390	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45391        else
45392	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45393        fi
45394	# Put the nasty error message in config.log where it belongs
45395	echo "$FREETYPE_PKG_ERRORS" >&5
45396
45397	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45398$as_echo "no" >&6; }
45399                FOUND_FREETYPE=no
45400elif test $pkg_failed = untried; then
45401	FOUND_FREETYPE=no
45402else
45403	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45404	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45405        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45406$as_echo "yes" >&6; }
45407	FOUND_FREETYPE=yes
45408fi
45409            if test "x$FOUND_FREETYPE" = xyes; then
45410              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45411              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45412              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45413              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45414                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45415              fi
45416              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45417              if test "x$BUNDLE_FREETYPE" = xyes; then
45418                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45419$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45420                FOUND_FREETYPE=no
45421              else
45422                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45423$as_echo_n "checking for freetype... " >&6; }
45424                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45425$as_echo "yes (using pkg-config)" >&6; }
45426              fi
45427            fi
45428          fi
45429        fi
45430      fi
45431
45432      if test "x$FOUND_FREETYPE" != xyes; then
45433        # Check in well-known locations
45434        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45435          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45436
45437  windows_path="$FREETYPE_BASE_DIR"
45438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45439    unix_path=`$CYGPATH -u "$windows_path"`
45440    FREETYPE_BASE_DIR="$unix_path"
45441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45443    FREETYPE_BASE_DIR="$unix_path"
45444  fi
45445
45446
45447  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45448  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45449  METHOD="well-known location"
45450
45451  # Let's start with an optimistic view of the world :-)
45452  FOUND_FREETYPE=yes
45453
45454  # First look for the canonical freetype main include file ft2build.h.
45455  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45456    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45457    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45458    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45459      # Fail.
45460      FOUND_FREETYPE=no
45461    fi
45462  fi
45463
45464  if test "x$FOUND_FREETYPE" = xyes; then
45465    # Include file found, let's continue the sanity check.
45466    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45467$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45468
45469    # Reset to default value
45470    FREETYPE_BASE_NAME=freetype
45471    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45472    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45473      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45474          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45475        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45476        # for the .6 version explicitly.
45477        FREETYPE_BASE_NAME=freetype.6
45478        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45479        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45480$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45481      else
45482        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45483$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45484        FOUND_FREETYPE=no
45485      fi
45486    else
45487      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45488        # On Windows, we will need both .lib and .dll file.
45489        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45490          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45491$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45492          FOUND_FREETYPE=no
45493        fi
45494      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45495          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45496        # Found lib in isa dir, use that instead.
45497        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45498        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45499$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45500      fi
45501    fi
45502  fi
45503
45504  if test "x$FOUND_FREETYPE" = xyes; then
45505
45506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45507
45508  # Input might be given as Windows format, start by converting to
45509  # unix format.
45510  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45511  new_path=`$CYGPATH -u "$path"`
45512
45513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45516  # "foo.exe" is OK but "foo" is an error.
45517  #
45518  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45519  # It is also a way to make sure we got the proper file name for the real test later on.
45520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45521  if test "x$test_shortpath" = x; then
45522    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45523$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45524    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45525  fi
45526
45527  # Call helper function which possibly converts this using DOS-style short mode.
45528  # If so, the updated path is stored in $new_path.
45529
45530  input_path="$new_path"
45531  # Check if we need to convert this using DOS-style short mode. If the path
45532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45533  # take no chances and rewrite it.
45534  # Note: m4 eats our [], so we need to use [ and ] instead.
45535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45536  if test "x$has_forbidden_chars" != x; then
45537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45541      # Going to short mode and back again did indeed matter. Since short mode is
45542      # case insensitive, let's make it lowercase to improve readability.
45543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45544      # Now convert it back to Unix-stile (cygpath)
45545      input_path=`$CYGPATH -u "$shortmode_path"`
45546      new_path="$input_path"
45547    fi
45548  fi
45549
45550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45551  if test "x$test_cygdrive_prefix" = x; then
45552    # As a simple fix, exclude /usr/bin since it's not a real path.
45553    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45555      # a path prefixed by /cygdrive for fixpath to work.
45556      new_path="$CYGWIN_ROOT_PATH$input_path"
45557    fi
45558  fi
45559
45560
45561  if test "x$path" != "x$new_path"; then
45562    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45564$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45565  fi
45566
45567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45568
45569  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45570  has_colon=`$ECHO $path | $GREP ^.:`
45571  new_path="$path"
45572  if test "x$has_colon" = x; then
45573    # Not in mixed or Windows style, start by that.
45574    new_path=`cmd //c echo $path`
45575  fi
45576
45577
45578  input_path="$new_path"
45579  # Check if we need to convert this using DOS-style short mode. If the path
45580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45581  # take no chances and rewrite it.
45582  # Note: m4 eats our [], so we need to use [ and ] instead.
45583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45584  if test "x$has_forbidden_chars" != x; then
45585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45586    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45587  fi
45588
45589
45590  windows_path="$new_path"
45591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45592    unix_path=`$CYGPATH -u "$windows_path"`
45593    new_path="$unix_path"
45594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45596    new_path="$unix_path"
45597  fi
45598
45599  if test "x$path" != "x$new_path"; then
45600    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45602$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45603  fi
45604
45605  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45606  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45607
45608  else
45609    # We're on a unix platform. Hooray! :)
45610    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45611    has_space=`$ECHO "$path" | $GREP " "`
45612    if test "x$has_space" != x; then
45613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45614$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45615      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45616    fi
45617
45618    # Use eval to expand a potential ~
45619    eval path="$path"
45620    if test ! -f "$path" && test ! -d "$path"; then
45621      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45622    fi
45623
45624    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45625  fi
45626
45627
45628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45629
45630  # Input might be given as Windows format, start by converting to
45631  # unix format.
45632  path="$POTENTIAL_FREETYPE_LIB_PATH"
45633  new_path=`$CYGPATH -u "$path"`
45634
45635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45638  # "foo.exe" is OK but "foo" is an error.
45639  #
45640  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45641  # It is also a way to make sure we got the proper file name for the real test later on.
45642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45643  if test "x$test_shortpath" = x; then
45644    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45645$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45646    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45647  fi
45648
45649  # Call helper function which possibly converts this using DOS-style short mode.
45650  # If so, the updated path is stored in $new_path.
45651
45652  input_path="$new_path"
45653  # Check if we need to convert this using DOS-style short mode. If the path
45654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45655  # take no chances and rewrite it.
45656  # Note: m4 eats our [], so we need to use [ and ] instead.
45657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45658  if test "x$has_forbidden_chars" != x; then
45659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45660    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45661    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45662    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45663      # Going to short mode and back again did indeed matter. Since short mode is
45664      # case insensitive, let's make it lowercase to improve readability.
45665      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45666      # Now convert it back to Unix-stile (cygpath)
45667      input_path=`$CYGPATH -u "$shortmode_path"`
45668      new_path="$input_path"
45669    fi
45670  fi
45671
45672  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45673  if test "x$test_cygdrive_prefix" = x; then
45674    # As a simple fix, exclude /usr/bin since it's not a real path.
45675    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45676      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45677      # a path prefixed by /cygdrive for fixpath to work.
45678      new_path="$CYGWIN_ROOT_PATH$input_path"
45679    fi
45680  fi
45681
45682
45683  if test "x$path" != "x$new_path"; then
45684    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45686$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45687  fi
45688
45689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45690
45691  path="$POTENTIAL_FREETYPE_LIB_PATH"
45692  has_colon=`$ECHO $path | $GREP ^.:`
45693  new_path="$path"
45694  if test "x$has_colon" = x; then
45695    # Not in mixed or Windows style, start by that.
45696    new_path=`cmd //c echo $path`
45697  fi
45698
45699
45700  input_path="$new_path"
45701  # Check if we need to convert this using DOS-style short mode. If the path
45702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45703  # take no chances and rewrite it.
45704  # Note: m4 eats our [], so we need to use [ and ] instead.
45705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45706  if test "x$has_forbidden_chars" != x; then
45707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45708    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45709  fi
45710
45711
45712  windows_path="$new_path"
45713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45714    unix_path=`$CYGPATH -u "$windows_path"`
45715    new_path="$unix_path"
45716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45718    new_path="$unix_path"
45719  fi
45720
45721  if test "x$path" != "x$new_path"; then
45722    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45724$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45725  fi
45726
45727  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45728  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45729
45730  else
45731    # We're on a unix platform. Hooray! :)
45732    path="$POTENTIAL_FREETYPE_LIB_PATH"
45733    has_space=`$ECHO "$path" | $GREP " "`
45734    if test "x$has_space" != x; then
45735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45736$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45737      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45738    fi
45739
45740    # Use eval to expand a potential ~
45741    eval path="$path"
45742    if test ! -f "$path" && test ! -d "$path"; then
45743      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45744    fi
45745
45746    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45747  fi
45748
45749
45750    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45752$as_echo_n "checking for freetype includes... " >&6; }
45753    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45754$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45755    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45756    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45757$as_echo_n "checking for freetype libraries... " >&6; }
45758    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45759$as_echo "$FREETYPE_LIB_PATH" >&6; }
45760  fi
45761
45762          if test "x$FOUND_FREETYPE" != xyes; then
45763            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45764
45765  windows_path="$FREETYPE_BASE_DIR"
45766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45767    unix_path=`$CYGPATH -u "$windows_path"`
45768    FREETYPE_BASE_DIR="$unix_path"
45769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45771    FREETYPE_BASE_DIR="$unix_path"
45772  fi
45773
45774
45775  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45776  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45777  METHOD="well-known location"
45778
45779  # Let's start with an optimistic view of the world :-)
45780  FOUND_FREETYPE=yes
45781
45782  # First look for the canonical freetype main include file ft2build.h.
45783  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45784    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45785    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45786    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45787      # Fail.
45788      FOUND_FREETYPE=no
45789    fi
45790  fi
45791
45792  if test "x$FOUND_FREETYPE" = xyes; then
45793    # Include file found, let's continue the sanity check.
45794    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45795$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45796
45797    # Reset to default value
45798    FREETYPE_BASE_NAME=freetype
45799    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45800    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45801      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45802          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45803        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45804        # for the .6 version explicitly.
45805        FREETYPE_BASE_NAME=freetype.6
45806        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45807        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45808$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45809      else
45810        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45811$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45812        FOUND_FREETYPE=no
45813      fi
45814    else
45815      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45816        # On Windows, we will need both .lib and .dll file.
45817        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45818          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45819$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45820          FOUND_FREETYPE=no
45821        fi
45822      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45823          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45824        # Found lib in isa dir, use that instead.
45825        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45826        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45827$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45828      fi
45829    fi
45830  fi
45831
45832  if test "x$FOUND_FREETYPE" = xyes; then
45833
45834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45835
45836  # Input might be given as Windows format, start by converting to
45837  # unix format.
45838  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45839  new_path=`$CYGPATH -u "$path"`
45840
45841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45844  # "foo.exe" is OK but "foo" is an error.
45845  #
45846  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45847  # It is also a way to make sure we got the proper file name for the real test later on.
45848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45849  if test "x$test_shortpath" = x; then
45850    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45851$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45852    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45853  fi
45854
45855  # Call helper function which possibly converts this using DOS-style short mode.
45856  # If so, the updated path is stored in $new_path.
45857
45858  input_path="$new_path"
45859  # Check if we need to convert this using DOS-style short mode. If the path
45860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45861  # take no chances and rewrite it.
45862  # Note: m4 eats our [], so we need to use [ and ] instead.
45863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45864  if test "x$has_forbidden_chars" != x; then
45865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45869      # Going to short mode and back again did indeed matter. Since short mode is
45870      # case insensitive, let's make it lowercase to improve readability.
45871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45872      # Now convert it back to Unix-stile (cygpath)
45873      input_path=`$CYGPATH -u "$shortmode_path"`
45874      new_path="$input_path"
45875    fi
45876  fi
45877
45878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45879  if test "x$test_cygdrive_prefix" = x; then
45880    # As a simple fix, exclude /usr/bin since it's not a real path.
45881    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45883      # a path prefixed by /cygdrive for fixpath to work.
45884      new_path="$CYGWIN_ROOT_PATH$input_path"
45885    fi
45886  fi
45887
45888
45889  if test "x$path" != "x$new_path"; then
45890    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45892$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45893  fi
45894
45895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45896
45897  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45898  has_colon=`$ECHO $path | $GREP ^.:`
45899  new_path="$path"
45900  if test "x$has_colon" = x; then
45901    # Not in mixed or Windows style, start by that.
45902    new_path=`cmd //c echo $path`
45903  fi
45904
45905
45906  input_path="$new_path"
45907  # Check if we need to convert this using DOS-style short mode. If the path
45908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45909  # take no chances and rewrite it.
45910  # Note: m4 eats our [], so we need to use [ and ] instead.
45911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45912  if test "x$has_forbidden_chars" != x; then
45913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45915  fi
45916
45917
45918  windows_path="$new_path"
45919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45920    unix_path=`$CYGPATH -u "$windows_path"`
45921    new_path="$unix_path"
45922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45924    new_path="$unix_path"
45925  fi
45926
45927  if test "x$path" != "x$new_path"; then
45928    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45930$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45931  fi
45932
45933  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45934  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45935
45936  else
45937    # We're on a unix platform. Hooray! :)
45938    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45939    has_space=`$ECHO "$path" | $GREP " "`
45940    if test "x$has_space" != x; then
45941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45942$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45943      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45944    fi
45945
45946    # Use eval to expand a potential ~
45947    eval path="$path"
45948    if test ! -f "$path" && test ! -d "$path"; then
45949      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45950    fi
45951
45952    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45953  fi
45954
45955
45956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45957
45958  # Input might be given as Windows format, start by converting to
45959  # unix format.
45960  path="$POTENTIAL_FREETYPE_LIB_PATH"
45961  new_path=`$CYGPATH -u "$path"`
45962
45963  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45964  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45965  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45966  # "foo.exe" is OK but "foo" is an error.
45967  #
45968  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45969  # It is also a way to make sure we got the proper file name for the real test later on.
45970  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45971  if test "x$test_shortpath" = x; then
45972    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45973$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45974    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45975  fi
45976
45977  # Call helper function which possibly converts this using DOS-style short mode.
45978  # If so, the updated path is stored in $new_path.
45979
45980  input_path="$new_path"
45981  # Check if we need to convert this using DOS-style short mode. If the path
45982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45983  # take no chances and rewrite it.
45984  # Note: m4 eats our [], so we need to use [ and ] instead.
45985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45986  if test "x$has_forbidden_chars" != x; then
45987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45991      # Going to short mode and back again did indeed matter. Since short mode is
45992      # case insensitive, let's make it lowercase to improve readability.
45993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45994      # Now convert it back to Unix-stile (cygpath)
45995      input_path=`$CYGPATH -u "$shortmode_path"`
45996      new_path="$input_path"
45997    fi
45998  fi
45999
46000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46001  if test "x$test_cygdrive_prefix" = x; then
46002    # As a simple fix, exclude /usr/bin since it's not a real path.
46003    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46005      # a path prefixed by /cygdrive for fixpath to work.
46006      new_path="$CYGWIN_ROOT_PATH$input_path"
46007    fi
46008  fi
46009
46010
46011  if test "x$path" != "x$new_path"; then
46012    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46014$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46015  fi
46016
46017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46018
46019  path="$POTENTIAL_FREETYPE_LIB_PATH"
46020  has_colon=`$ECHO $path | $GREP ^.:`
46021  new_path="$path"
46022  if test "x$has_colon" = x; then
46023    # Not in mixed or Windows style, start by that.
46024    new_path=`cmd //c echo $path`
46025  fi
46026
46027
46028  input_path="$new_path"
46029  # Check if we need to convert this using DOS-style short mode. If the path
46030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46031  # take no chances and rewrite it.
46032  # Note: m4 eats our [], so we need to use [ and ] instead.
46033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46034  if test "x$has_forbidden_chars" != x; then
46035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46036    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46037  fi
46038
46039
46040  windows_path="$new_path"
46041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46042    unix_path=`$CYGPATH -u "$windows_path"`
46043    new_path="$unix_path"
46044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46046    new_path="$unix_path"
46047  fi
46048
46049  if test "x$path" != "x$new_path"; then
46050    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46052$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46053  fi
46054
46055  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46056  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46057
46058  else
46059    # We're on a unix platform. Hooray! :)
46060    path="$POTENTIAL_FREETYPE_LIB_PATH"
46061    has_space=`$ECHO "$path" | $GREP " "`
46062    if test "x$has_space" != x; then
46063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46064$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46065      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46066    fi
46067
46068    # Use eval to expand a potential ~
46069    eval path="$path"
46070    if test ! -f "$path" && test ! -d "$path"; then
46071      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46072    fi
46073
46074    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46075  fi
46076
46077
46078    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46079    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46080$as_echo_n "checking for freetype includes... " >&6; }
46081    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46082$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46083    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46084    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46085$as_echo_n "checking for freetype libraries... " >&6; }
46086    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46087$as_echo "$FREETYPE_LIB_PATH" >&6; }
46088  fi
46089
46090          fi
46091        else
46092          FREETYPE_BASE_DIR="$SYSROOT/usr"
46093
46094  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46095  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46096  METHOD="well-known location"
46097
46098  # Let's start with an optimistic view of the world :-)
46099  FOUND_FREETYPE=yes
46100
46101  # First look for the canonical freetype main include file ft2build.h.
46102  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46103    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46104    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46105    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46106      # Fail.
46107      FOUND_FREETYPE=no
46108    fi
46109  fi
46110
46111  if test "x$FOUND_FREETYPE" = xyes; then
46112    # Include file found, let's continue the sanity check.
46113    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46114$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46115
46116    # Reset to default value
46117    FREETYPE_BASE_NAME=freetype
46118    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46119    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46120      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46121          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46122        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46123        # for the .6 version explicitly.
46124        FREETYPE_BASE_NAME=freetype.6
46125        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46126        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46127$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46128      else
46129        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46130$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46131        FOUND_FREETYPE=no
46132      fi
46133    else
46134      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46135        # On Windows, we will need both .lib and .dll file.
46136        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46137          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46138$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46139          FOUND_FREETYPE=no
46140        fi
46141      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46142          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46143        # Found lib in isa dir, use that instead.
46144        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46145        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46146$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46147      fi
46148    fi
46149  fi
46150
46151  if test "x$FOUND_FREETYPE" = xyes; then
46152
46153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46154
46155  # Input might be given as Windows format, start by converting to
46156  # unix format.
46157  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46158  new_path=`$CYGPATH -u "$path"`
46159
46160  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46161  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46162  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46163  # "foo.exe" is OK but "foo" is an error.
46164  #
46165  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46166  # It is also a way to make sure we got the proper file name for the real test later on.
46167  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46168  if test "x$test_shortpath" = x; then
46169    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46170$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46171    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46172  fi
46173
46174  # Call helper function which possibly converts this using DOS-style short mode.
46175  # If so, the updated path is stored in $new_path.
46176
46177  input_path="$new_path"
46178  # Check if we need to convert this using DOS-style short mode. If the path
46179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46180  # take no chances and rewrite it.
46181  # Note: m4 eats our [], so we need to use [ and ] instead.
46182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46183  if test "x$has_forbidden_chars" != x; then
46184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46185    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46186    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46187    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46188      # Going to short mode and back again did indeed matter. Since short mode is
46189      # case insensitive, let's make it lowercase to improve readability.
46190      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46191      # Now convert it back to Unix-stile (cygpath)
46192      input_path=`$CYGPATH -u "$shortmode_path"`
46193      new_path="$input_path"
46194    fi
46195  fi
46196
46197  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46198  if test "x$test_cygdrive_prefix" = x; then
46199    # As a simple fix, exclude /usr/bin since it's not a real path.
46200    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46201      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46202      # a path prefixed by /cygdrive for fixpath to work.
46203      new_path="$CYGWIN_ROOT_PATH$input_path"
46204    fi
46205  fi
46206
46207
46208  if test "x$path" != "x$new_path"; then
46209    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46211$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46212  fi
46213
46214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46215
46216  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46217  has_colon=`$ECHO $path | $GREP ^.:`
46218  new_path="$path"
46219  if test "x$has_colon" = x; then
46220    # Not in mixed or Windows style, start by that.
46221    new_path=`cmd //c echo $path`
46222  fi
46223
46224
46225  input_path="$new_path"
46226  # Check if we need to convert this using DOS-style short mode. If the path
46227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46228  # take no chances and rewrite it.
46229  # Note: m4 eats our [], so we need to use [ and ] instead.
46230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46231  if test "x$has_forbidden_chars" != x; then
46232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46234  fi
46235
46236
46237  windows_path="$new_path"
46238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46239    unix_path=`$CYGPATH -u "$windows_path"`
46240    new_path="$unix_path"
46241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46243    new_path="$unix_path"
46244  fi
46245
46246  if test "x$path" != "x$new_path"; then
46247    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46249$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46250  fi
46251
46252  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46253  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46254
46255  else
46256    # We're on a unix platform. Hooray! :)
46257    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46258    has_space=`$ECHO "$path" | $GREP " "`
46259    if test "x$has_space" != x; then
46260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46261$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46262      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46263    fi
46264
46265    # Use eval to expand a potential ~
46266    eval path="$path"
46267    if test ! -f "$path" && test ! -d "$path"; then
46268      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46269    fi
46270
46271    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46272  fi
46273
46274
46275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46276
46277  # Input might be given as Windows format, start by converting to
46278  # unix format.
46279  path="$POTENTIAL_FREETYPE_LIB_PATH"
46280  new_path=`$CYGPATH -u "$path"`
46281
46282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46285  # "foo.exe" is OK but "foo" is an error.
46286  #
46287  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46288  # It is also a way to make sure we got the proper file name for the real test later on.
46289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46290  if test "x$test_shortpath" = x; then
46291    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46292$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46293    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46294  fi
46295
46296  # Call helper function which possibly converts this using DOS-style short mode.
46297  # If so, the updated path is stored in $new_path.
46298
46299  input_path="$new_path"
46300  # Check if we need to convert this using DOS-style short mode. If the path
46301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46302  # take no chances and rewrite it.
46303  # Note: m4 eats our [], so we need to use [ and ] instead.
46304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46305  if test "x$has_forbidden_chars" != x; then
46306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46307    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46308    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46309    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46310      # Going to short mode and back again did indeed matter. Since short mode is
46311      # case insensitive, let's make it lowercase to improve readability.
46312      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46313      # Now convert it back to Unix-stile (cygpath)
46314      input_path=`$CYGPATH -u "$shortmode_path"`
46315      new_path="$input_path"
46316    fi
46317  fi
46318
46319  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46320  if test "x$test_cygdrive_prefix" = x; then
46321    # As a simple fix, exclude /usr/bin since it's not a real path.
46322    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46323      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46324      # a path prefixed by /cygdrive for fixpath to work.
46325      new_path="$CYGWIN_ROOT_PATH$input_path"
46326    fi
46327  fi
46328
46329
46330  if test "x$path" != "x$new_path"; then
46331    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46333$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46334  fi
46335
46336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46337
46338  path="$POTENTIAL_FREETYPE_LIB_PATH"
46339  has_colon=`$ECHO $path | $GREP ^.:`
46340  new_path="$path"
46341  if test "x$has_colon" = x; then
46342    # Not in mixed or Windows style, start by that.
46343    new_path=`cmd //c echo $path`
46344  fi
46345
46346
46347  input_path="$new_path"
46348  # Check if we need to convert this using DOS-style short mode. If the path
46349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46350  # take no chances and rewrite it.
46351  # Note: m4 eats our [], so we need to use [ and ] instead.
46352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46353  if test "x$has_forbidden_chars" != x; then
46354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46355    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46356  fi
46357
46358
46359  windows_path="$new_path"
46360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46361    unix_path=`$CYGPATH -u "$windows_path"`
46362    new_path="$unix_path"
46363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46365    new_path="$unix_path"
46366  fi
46367
46368  if test "x$path" != "x$new_path"; then
46369    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46371$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46372  fi
46373
46374  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46375  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46376
46377  else
46378    # We're on a unix platform. Hooray! :)
46379    path="$POTENTIAL_FREETYPE_LIB_PATH"
46380    has_space=`$ECHO "$path" | $GREP " "`
46381    if test "x$has_space" != x; then
46382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46383$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46384      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46385    fi
46386
46387    # Use eval to expand a potential ~
46388    eval path="$path"
46389    if test ! -f "$path" && test ! -d "$path"; then
46390      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46391    fi
46392
46393    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46394  fi
46395
46396
46397    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46398    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46399$as_echo_n "checking for freetype includes... " >&6; }
46400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46401$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46402    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46403    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46404$as_echo_n "checking for freetype libraries... " >&6; }
46405    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46406$as_echo "$FREETYPE_LIB_PATH" >&6; }
46407  fi
46408
46409
46410          if test "x$FOUND_FREETYPE" != xyes; then
46411            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46412
46413  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46414  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46415  METHOD="well-known location"
46416
46417  # Let's start with an optimistic view of the world :-)
46418  FOUND_FREETYPE=yes
46419
46420  # First look for the canonical freetype main include file ft2build.h.
46421  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46422    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46423    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46424    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46425      # Fail.
46426      FOUND_FREETYPE=no
46427    fi
46428  fi
46429
46430  if test "x$FOUND_FREETYPE" = xyes; then
46431    # Include file found, let's continue the sanity check.
46432    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46433$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46434
46435    # Reset to default value
46436    FREETYPE_BASE_NAME=freetype
46437    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46438    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46439      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46440          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46441        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46442        # for the .6 version explicitly.
46443        FREETYPE_BASE_NAME=freetype.6
46444        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46445        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46446$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46447      else
46448        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46449$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46450        FOUND_FREETYPE=no
46451      fi
46452    else
46453      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46454        # On Windows, we will need both .lib and .dll file.
46455        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46456          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46457$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46458          FOUND_FREETYPE=no
46459        fi
46460      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46461          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46462        # Found lib in isa dir, use that instead.
46463        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46464        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46465$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46466      fi
46467    fi
46468  fi
46469
46470  if test "x$FOUND_FREETYPE" = xyes; then
46471
46472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46473
46474  # Input might be given as Windows format, start by converting to
46475  # unix format.
46476  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46477  new_path=`$CYGPATH -u "$path"`
46478
46479  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46480  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46481  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46482  # "foo.exe" is OK but "foo" is an error.
46483  #
46484  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46485  # It is also a way to make sure we got the proper file name for the real test later on.
46486  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46487  if test "x$test_shortpath" = x; then
46488    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46489$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46490    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46491  fi
46492
46493  # Call helper function which possibly converts this using DOS-style short mode.
46494  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46505    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46506    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46507      # Going to short mode and back again did indeed matter. Since short mode is
46508      # case insensitive, let's make it lowercase to improve readability.
46509      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46510      # Now convert it back to Unix-stile (cygpath)
46511      input_path=`$CYGPATH -u "$shortmode_path"`
46512      new_path="$input_path"
46513    fi
46514  fi
46515
46516  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46517  if test "x$test_cygdrive_prefix" = x; then
46518    # As a simple fix, exclude /usr/bin since it's not a real path.
46519    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46520      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46521      # a path prefixed by /cygdrive for fixpath to work.
46522      new_path="$CYGWIN_ROOT_PATH$input_path"
46523    fi
46524  fi
46525
46526
46527  if test "x$path" != "x$new_path"; then
46528    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46530$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46531  fi
46532
46533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46534
46535  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46536  has_colon=`$ECHO $path | $GREP ^.:`
46537  new_path="$path"
46538  if test "x$has_colon" = x; then
46539    # Not in mixed or Windows style, start by that.
46540    new_path=`cmd //c echo $path`
46541  fi
46542
46543
46544  input_path="$new_path"
46545  # Check if we need to convert this using DOS-style short mode. If the path
46546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46547  # take no chances and rewrite it.
46548  # Note: m4 eats our [], so we need to use [ and ] instead.
46549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46550  if test "x$has_forbidden_chars" != x; then
46551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46552    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46553  fi
46554
46555
46556  windows_path="$new_path"
46557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46558    unix_path=`$CYGPATH -u "$windows_path"`
46559    new_path="$unix_path"
46560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46562    new_path="$unix_path"
46563  fi
46564
46565  if test "x$path" != "x$new_path"; then
46566    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46568$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46569  fi
46570
46571  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46572  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46573
46574  else
46575    # We're on a unix platform. Hooray! :)
46576    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46577    has_space=`$ECHO "$path" | $GREP " "`
46578    if test "x$has_space" != x; then
46579      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46580$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46581      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46582    fi
46583
46584    # Use eval to expand a potential ~
46585    eval path="$path"
46586    if test ! -f "$path" && test ! -d "$path"; then
46587      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46588    fi
46589
46590    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46591  fi
46592
46593
46594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46595
46596  # Input might be given as Windows format, start by converting to
46597  # unix format.
46598  path="$POTENTIAL_FREETYPE_LIB_PATH"
46599  new_path=`$CYGPATH -u "$path"`
46600
46601  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46602  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46603  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46604  # "foo.exe" is OK but "foo" is an error.
46605  #
46606  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46607  # It is also a way to make sure we got the proper file name for the real test later on.
46608  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46609  if test "x$test_shortpath" = x; then
46610    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46611$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46612    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46613  fi
46614
46615  # Call helper function which possibly converts this using DOS-style short mode.
46616  # If so, the updated path is stored in $new_path.
46617
46618  input_path="$new_path"
46619  # Check if we need to convert this using DOS-style short mode. If the path
46620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46621  # take no chances and rewrite it.
46622  # Note: m4 eats our [], so we need to use [ and ] instead.
46623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46624  if test "x$has_forbidden_chars" != x; then
46625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46626    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46627    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46628    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46629      # Going to short mode and back again did indeed matter. Since short mode is
46630      # case insensitive, let's make it lowercase to improve readability.
46631      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46632      # Now convert it back to Unix-stile (cygpath)
46633      input_path=`$CYGPATH -u "$shortmode_path"`
46634      new_path="$input_path"
46635    fi
46636  fi
46637
46638  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46639  if test "x$test_cygdrive_prefix" = x; then
46640    # As a simple fix, exclude /usr/bin since it's not a real path.
46641    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46642      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46643      # a path prefixed by /cygdrive for fixpath to work.
46644      new_path="$CYGWIN_ROOT_PATH$input_path"
46645    fi
46646  fi
46647
46648
46649  if test "x$path" != "x$new_path"; then
46650    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46651    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46652$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46653  fi
46654
46655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46656
46657  path="$POTENTIAL_FREETYPE_LIB_PATH"
46658  has_colon=`$ECHO $path | $GREP ^.:`
46659  new_path="$path"
46660  if test "x$has_colon" = x; then
46661    # Not in mixed or Windows style, start by that.
46662    new_path=`cmd //c echo $path`
46663  fi
46664
46665
46666  input_path="$new_path"
46667  # Check if we need to convert this using DOS-style short mode. If the path
46668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46669  # take no chances and rewrite it.
46670  # Note: m4 eats our [], so we need to use [ and ] instead.
46671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46672  if test "x$has_forbidden_chars" != x; then
46673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46674    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46675  fi
46676
46677
46678  windows_path="$new_path"
46679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46680    unix_path=`$CYGPATH -u "$windows_path"`
46681    new_path="$unix_path"
46682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46684    new_path="$unix_path"
46685  fi
46686
46687  if test "x$path" != "x$new_path"; then
46688    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46689    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46690$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46691  fi
46692
46693  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46694  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46695
46696  else
46697    # We're on a unix platform. Hooray! :)
46698    path="$POTENTIAL_FREETYPE_LIB_PATH"
46699    has_space=`$ECHO "$path" | $GREP " "`
46700    if test "x$has_space" != x; then
46701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46702$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46703      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46704    fi
46705
46706    # Use eval to expand a potential ~
46707    eval path="$path"
46708    if test ! -f "$path" && test ! -d "$path"; then
46709      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46710    fi
46711
46712    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46713  fi
46714
46715
46716    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46717    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46718$as_echo_n "checking for freetype includes... " >&6; }
46719    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46720$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46721    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46723$as_echo_n "checking for freetype libraries... " >&6; }
46724    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46725$as_echo "$FREETYPE_LIB_PATH" >&6; }
46726  fi
46727
46728          fi
46729
46730          if test "x$FOUND_FREETYPE" != xyes; then
46731            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46732
46733  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46734  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46735  METHOD="well-known location"
46736
46737  # Let's start with an optimistic view of the world :-)
46738  FOUND_FREETYPE=yes
46739
46740  # First look for the canonical freetype main include file ft2build.h.
46741  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46742    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46743    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46744    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46745      # Fail.
46746      FOUND_FREETYPE=no
46747    fi
46748  fi
46749
46750  if test "x$FOUND_FREETYPE" = xyes; then
46751    # Include file found, let's continue the sanity check.
46752    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46753$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46754
46755    # Reset to default value
46756    FREETYPE_BASE_NAME=freetype
46757    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46758    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46759      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46760          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46761        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46762        # for the .6 version explicitly.
46763        FREETYPE_BASE_NAME=freetype.6
46764        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46765        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46766$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46767      else
46768        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46769$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46770        FOUND_FREETYPE=no
46771      fi
46772    else
46773      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46774        # On Windows, we will need both .lib and .dll file.
46775        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46776          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46777$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46778          FOUND_FREETYPE=no
46779        fi
46780      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46781          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46782        # Found lib in isa dir, use that instead.
46783        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46784        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46785$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46786      fi
46787    fi
46788  fi
46789
46790  if test "x$FOUND_FREETYPE" = xyes; then
46791
46792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46793
46794  # Input might be given as Windows format, start by converting to
46795  # unix format.
46796  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46797  new_path=`$CYGPATH -u "$path"`
46798
46799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46802  # "foo.exe" is OK but "foo" is an error.
46803  #
46804  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46805  # It is also a way to make sure we got the proper file name for the real test later on.
46806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46807  if test "x$test_shortpath" = x; then
46808    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46809$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46810    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46811  fi
46812
46813  # Call helper function which possibly converts this using DOS-style short mode.
46814  # If so, the updated path is stored in $new_path.
46815
46816  input_path="$new_path"
46817  # Check if we need to convert this using DOS-style short mode. If the path
46818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46819  # take no chances and rewrite it.
46820  # Note: m4 eats our [], so we need to use [ and ] instead.
46821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46822  if test "x$has_forbidden_chars" != x; then
46823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46824    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46827      # Going to short mode and back again did indeed matter. Since short mode is
46828      # case insensitive, let's make it lowercase to improve readability.
46829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46830      # Now convert it back to Unix-stile (cygpath)
46831      input_path=`$CYGPATH -u "$shortmode_path"`
46832      new_path="$input_path"
46833    fi
46834  fi
46835
46836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46837  if test "x$test_cygdrive_prefix" = x; then
46838    # As a simple fix, exclude /usr/bin since it's not a real path.
46839    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46841      # a path prefixed by /cygdrive for fixpath to work.
46842      new_path="$CYGWIN_ROOT_PATH$input_path"
46843    fi
46844  fi
46845
46846
46847  if test "x$path" != "x$new_path"; then
46848    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46850$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46851  fi
46852
46853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46854
46855  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46856  has_colon=`$ECHO $path | $GREP ^.:`
46857  new_path="$path"
46858  if test "x$has_colon" = x; then
46859    # Not in mixed or Windows style, start by that.
46860    new_path=`cmd //c echo $path`
46861  fi
46862
46863
46864  input_path="$new_path"
46865  # Check if we need to convert this using DOS-style short mode. If the path
46866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46867  # take no chances and rewrite it.
46868  # Note: m4 eats our [], so we need to use [ and ] instead.
46869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46870  if test "x$has_forbidden_chars" != x; then
46871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46872    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46873  fi
46874
46875
46876  windows_path="$new_path"
46877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46878    unix_path=`$CYGPATH -u "$windows_path"`
46879    new_path="$unix_path"
46880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46882    new_path="$unix_path"
46883  fi
46884
46885  if test "x$path" != "x$new_path"; then
46886    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46888$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46889  fi
46890
46891  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46892  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46893
46894  else
46895    # We're on a unix platform. Hooray! :)
46896    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46897    has_space=`$ECHO "$path" | $GREP " "`
46898    if test "x$has_space" != x; then
46899      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46900$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46901      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46902    fi
46903
46904    # Use eval to expand a potential ~
46905    eval path="$path"
46906    if test ! -f "$path" && test ! -d "$path"; then
46907      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46908    fi
46909
46910    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46911  fi
46912
46913
46914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46915
46916  # Input might be given as Windows format, start by converting to
46917  # unix format.
46918  path="$POTENTIAL_FREETYPE_LIB_PATH"
46919  new_path=`$CYGPATH -u "$path"`
46920
46921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46924  # "foo.exe" is OK but "foo" is an error.
46925  #
46926  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46927  # It is also a way to make sure we got the proper file name for the real test later on.
46928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46929  if test "x$test_shortpath" = x; then
46930    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46931$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46932    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46933  fi
46934
46935  # Call helper function which possibly converts this using DOS-style short mode.
46936  # If so, the updated path is stored in $new_path.
46937
46938  input_path="$new_path"
46939  # Check if we need to convert this using DOS-style short mode. If the path
46940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46941  # take no chances and rewrite it.
46942  # Note: m4 eats our [], so we need to use [ and ] instead.
46943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46944  if test "x$has_forbidden_chars" != x; then
46945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46946    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46947    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46948    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46949      # Going to short mode and back again did indeed matter. Since short mode is
46950      # case insensitive, let's make it lowercase to improve readability.
46951      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46952      # Now convert it back to Unix-stile (cygpath)
46953      input_path=`$CYGPATH -u "$shortmode_path"`
46954      new_path="$input_path"
46955    fi
46956  fi
46957
46958  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46959  if test "x$test_cygdrive_prefix" = x; then
46960    # As a simple fix, exclude /usr/bin since it's not a real path.
46961    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46962      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46963      # a path prefixed by /cygdrive for fixpath to work.
46964      new_path="$CYGWIN_ROOT_PATH$input_path"
46965    fi
46966  fi
46967
46968
46969  if test "x$path" != "x$new_path"; then
46970    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46972$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46973  fi
46974
46975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46976
46977  path="$POTENTIAL_FREETYPE_LIB_PATH"
46978  has_colon=`$ECHO $path | $GREP ^.:`
46979  new_path="$path"
46980  if test "x$has_colon" = x; then
46981    # Not in mixed or Windows style, start by that.
46982    new_path=`cmd //c echo $path`
46983  fi
46984
46985
46986  input_path="$new_path"
46987  # Check if we need to convert this using DOS-style short mode. If the path
46988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46989  # take no chances and rewrite it.
46990  # Note: m4 eats our [], so we need to use [ and ] instead.
46991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46992  if test "x$has_forbidden_chars" != x; then
46993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46995  fi
46996
46997
46998  windows_path="$new_path"
46999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47000    unix_path=`$CYGPATH -u "$windows_path"`
47001    new_path="$unix_path"
47002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47004    new_path="$unix_path"
47005  fi
47006
47007  if test "x$path" != "x$new_path"; then
47008    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47010$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47011  fi
47012
47013  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47014  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47015
47016  else
47017    # We're on a unix platform. Hooray! :)
47018    path="$POTENTIAL_FREETYPE_LIB_PATH"
47019    has_space=`$ECHO "$path" | $GREP " "`
47020    if test "x$has_space" != x; then
47021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47022$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47023      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47024    fi
47025
47026    # Use eval to expand a potential ~
47027    eval path="$path"
47028    if test ! -f "$path" && test ! -d "$path"; then
47029      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47030    fi
47031
47032    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47033  fi
47034
47035
47036    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47037    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47038$as_echo_n "checking for freetype includes... " >&6; }
47039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47040$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47041    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47042    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47043$as_echo_n "checking for freetype libraries... " >&6; }
47044    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47045$as_echo "$FREETYPE_LIB_PATH" >&6; }
47046  fi
47047
47048          fi
47049
47050          if test "x$FOUND_FREETYPE" != xyes; then
47051            FREETYPE_BASE_DIR="$SYSROOT/usr"
47052            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47053
47054  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47055  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47056  METHOD="well-known location"
47057
47058  # Let's start with an optimistic view of the world :-)
47059  FOUND_FREETYPE=yes
47060
47061  # First look for the canonical freetype main include file ft2build.h.
47062  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47063    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47064    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47065    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47066      # Fail.
47067      FOUND_FREETYPE=no
47068    fi
47069  fi
47070
47071  if test "x$FOUND_FREETYPE" = xyes; then
47072    # Include file found, let's continue the sanity check.
47073    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47074$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47075
47076    # Reset to default value
47077    FREETYPE_BASE_NAME=freetype
47078    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47079    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47080      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47081          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47082        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47083        # for the .6 version explicitly.
47084        FREETYPE_BASE_NAME=freetype.6
47085        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47086        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47087$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47088      else
47089        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47090$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47091        FOUND_FREETYPE=no
47092      fi
47093    else
47094      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47095        # On Windows, we will need both .lib and .dll file.
47096        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47097          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47098$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47099          FOUND_FREETYPE=no
47100        fi
47101      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47102          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47103        # Found lib in isa dir, use that instead.
47104        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47105        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47106$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47107      fi
47108    fi
47109  fi
47110
47111  if test "x$FOUND_FREETYPE" = xyes; then
47112
47113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47114
47115  # Input might be given as Windows format, start by converting to
47116  # unix format.
47117  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47118  new_path=`$CYGPATH -u "$path"`
47119
47120  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47121  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47122  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47123  # "foo.exe" is OK but "foo" is an error.
47124  #
47125  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47126  # It is also a way to make sure we got the proper file name for the real test later on.
47127  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47128  if test "x$test_shortpath" = x; then
47129    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47130$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47131    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47132  fi
47133
47134  # Call helper function which possibly converts this using DOS-style short mode.
47135  # If so, the updated path is stored in $new_path.
47136
47137  input_path="$new_path"
47138  # Check if we need to convert this using DOS-style short mode. If the path
47139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47140  # take no chances and rewrite it.
47141  # Note: m4 eats our [], so we need to use [ and ] instead.
47142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47143  if test "x$has_forbidden_chars" != x; then
47144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47145    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47146    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47147    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47148      # Going to short mode and back again did indeed matter. Since short mode is
47149      # case insensitive, let's make it lowercase to improve readability.
47150      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47151      # Now convert it back to Unix-stile (cygpath)
47152      input_path=`$CYGPATH -u "$shortmode_path"`
47153      new_path="$input_path"
47154    fi
47155  fi
47156
47157  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47158  if test "x$test_cygdrive_prefix" = x; then
47159    # As a simple fix, exclude /usr/bin since it's not a real path.
47160    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47161      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47162      # a path prefixed by /cygdrive for fixpath to work.
47163      new_path="$CYGWIN_ROOT_PATH$input_path"
47164    fi
47165  fi
47166
47167
47168  if test "x$path" != "x$new_path"; then
47169    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47171$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47172  fi
47173
47174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47175
47176  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47177  has_colon=`$ECHO $path | $GREP ^.:`
47178  new_path="$path"
47179  if test "x$has_colon" = x; then
47180    # Not in mixed or Windows style, start by that.
47181    new_path=`cmd //c echo $path`
47182  fi
47183
47184
47185  input_path="$new_path"
47186  # Check if we need to convert this using DOS-style short mode. If the path
47187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47188  # take no chances and rewrite it.
47189  # Note: m4 eats our [], so we need to use [ and ] instead.
47190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47191  if test "x$has_forbidden_chars" != x; then
47192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47193    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47194  fi
47195
47196
47197  windows_path="$new_path"
47198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47199    unix_path=`$CYGPATH -u "$windows_path"`
47200    new_path="$unix_path"
47201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47203    new_path="$unix_path"
47204  fi
47205
47206  if test "x$path" != "x$new_path"; then
47207    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47209$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47210  fi
47211
47212  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47213  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47214
47215  else
47216    # We're on a unix platform. Hooray! :)
47217    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47218    has_space=`$ECHO "$path" | $GREP " "`
47219    if test "x$has_space" != x; then
47220      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47221$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47222      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47223    fi
47224
47225    # Use eval to expand a potential ~
47226    eval path="$path"
47227    if test ! -f "$path" && test ! -d "$path"; then
47228      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47229    fi
47230
47231    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47232  fi
47233
47234
47235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47236
47237  # Input might be given as Windows format, start by converting to
47238  # unix format.
47239  path="$POTENTIAL_FREETYPE_LIB_PATH"
47240  new_path=`$CYGPATH -u "$path"`
47241
47242  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47243  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47244  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47245  # "foo.exe" is OK but "foo" is an error.
47246  #
47247  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47248  # It is also a way to make sure we got the proper file name for the real test later on.
47249  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47250  if test "x$test_shortpath" = x; then
47251    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47252$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47253    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47254  fi
47255
47256  # Call helper function which possibly converts this using DOS-style short mode.
47257  # If so, the updated path is stored in $new_path.
47258
47259  input_path="$new_path"
47260  # Check if we need to convert this using DOS-style short mode. If the path
47261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47262  # take no chances and rewrite it.
47263  # Note: m4 eats our [], so we need to use [ and ] instead.
47264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47265  if test "x$has_forbidden_chars" != x; then
47266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47267    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47268    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47269    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47270      # Going to short mode and back again did indeed matter. Since short mode is
47271      # case insensitive, let's make it lowercase to improve readability.
47272      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47273      # Now convert it back to Unix-stile (cygpath)
47274      input_path=`$CYGPATH -u "$shortmode_path"`
47275      new_path="$input_path"
47276    fi
47277  fi
47278
47279  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47280  if test "x$test_cygdrive_prefix" = x; then
47281    # As a simple fix, exclude /usr/bin since it's not a real path.
47282    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47283      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47284      # a path prefixed by /cygdrive for fixpath to work.
47285      new_path="$CYGWIN_ROOT_PATH$input_path"
47286    fi
47287  fi
47288
47289
47290  if test "x$path" != "x$new_path"; then
47291    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47293$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47294  fi
47295
47296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47297
47298  path="$POTENTIAL_FREETYPE_LIB_PATH"
47299  has_colon=`$ECHO $path | $GREP ^.:`
47300  new_path="$path"
47301  if test "x$has_colon" = x; then
47302    # Not in mixed or Windows style, start by that.
47303    new_path=`cmd //c echo $path`
47304  fi
47305
47306
47307  input_path="$new_path"
47308  # Check if we need to convert this using DOS-style short mode. If the path
47309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47310  # take no chances and rewrite it.
47311  # Note: m4 eats our [], so we need to use [ and ] instead.
47312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47313  if test "x$has_forbidden_chars" != x; then
47314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47315    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47316  fi
47317
47318
47319  windows_path="$new_path"
47320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47321    unix_path=`$CYGPATH -u "$windows_path"`
47322    new_path="$unix_path"
47323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47325    new_path="$unix_path"
47326  fi
47327
47328  if test "x$path" != "x$new_path"; then
47329    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47331$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47332  fi
47333
47334  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47335  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47336
47337  else
47338    # We're on a unix platform. Hooray! :)
47339    path="$POTENTIAL_FREETYPE_LIB_PATH"
47340    has_space=`$ECHO "$path" | $GREP " "`
47341    if test "x$has_space" != x; then
47342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47343$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47344      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47345    fi
47346
47347    # Use eval to expand a potential ~
47348    eval path="$path"
47349    if test ! -f "$path" && test ! -d "$path"; then
47350      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47351    fi
47352
47353    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47354  fi
47355
47356
47357    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47358    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47359$as_echo_n "checking for freetype includes... " >&6; }
47360    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47361$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47362    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47363    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47364$as_echo_n "checking for freetype libraries... " >&6; }
47365    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47366$as_echo "$FREETYPE_LIB_PATH" >&6; }
47367  fi
47368
47369            else
47370
47371  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47372  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47373  METHOD="well-known location"
47374
47375  # Let's start with an optimistic view of the world :-)
47376  FOUND_FREETYPE=yes
47377
47378  # First look for the canonical freetype main include file ft2build.h.
47379  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47380    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47381    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47382    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47383      # Fail.
47384      FOUND_FREETYPE=no
47385    fi
47386  fi
47387
47388  if test "x$FOUND_FREETYPE" = xyes; then
47389    # Include file found, let's continue the sanity check.
47390    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47391$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47392
47393    # Reset to default value
47394    FREETYPE_BASE_NAME=freetype
47395    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47396    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47397      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47398          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47399        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47400        # for the .6 version explicitly.
47401        FREETYPE_BASE_NAME=freetype.6
47402        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47403        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47404$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47405      else
47406        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47407$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47408        FOUND_FREETYPE=no
47409      fi
47410    else
47411      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47412        # On Windows, we will need both .lib and .dll file.
47413        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47414          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47415$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47416          FOUND_FREETYPE=no
47417        fi
47418      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47419          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47420        # Found lib in isa dir, use that instead.
47421        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47422        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47423$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47424      fi
47425    fi
47426  fi
47427
47428  if test "x$FOUND_FREETYPE" = xyes; then
47429
47430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47431
47432  # Input might be given as Windows format, start by converting to
47433  # unix format.
47434  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47435  new_path=`$CYGPATH -u "$path"`
47436
47437  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47438  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47439  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47440  # "foo.exe" is OK but "foo" is an error.
47441  #
47442  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47443  # It is also a way to make sure we got the proper file name for the real test later on.
47444  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47445  if test "x$test_shortpath" = x; then
47446    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47447$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47448    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47449  fi
47450
47451  # Call helper function which possibly converts this using DOS-style short mode.
47452  # If so, the updated path is stored in $new_path.
47453
47454  input_path="$new_path"
47455  # Check if we need to convert this using DOS-style short mode. If the path
47456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47457  # take no chances and rewrite it.
47458  # Note: m4 eats our [], so we need to use [ and ] instead.
47459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47460  if test "x$has_forbidden_chars" != x; then
47461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47462    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47463    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47464    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47465      # Going to short mode and back again did indeed matter. Since short mode is
47466      # case insensitive, let's make it lowercase to improve readability.
47467      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47468      # Now convert it back to Unix-stile (cygpath)
47469      input_path=`$CYGPATH -u "$shortmode_path"`
47470      new_path="$input_path"
47471    fi
47472  fi
47473
47474  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47475  if test "x$test_cygdrive_prefix" = x; then
47476    # As a simple fix, exclude /usr/bin since it's not a real path.
47477    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47478      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47479      # a path prefixed by /cygdrive for fixpath to work.
47480      new_path="$CYGWIN_ROOT_PATH$input_path"
47481    fi
47482  fi
47483
47484
47485  if test "x$path" != "x$new_path"; then
47486    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47488$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47489  fi
47490
47491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47492
47493  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47494  has_colon=`$ECHO $path | $GREP ^.:`
47495  new_path="$path"
47496  if test "x$has_colon" = x; then
47497    # Not in mixed or Windows style, start by that.
47498    new_path=`cmd //c echo $path`
47499  fi
47500
47501
47502  input_path="$new_path"
47503  # Check if we need to convert this using DOS-style short mode. If the path
47504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47505  # take no chances and rewrite it.
47506  # Note: m4 eats our [], so we need to use [ and ] instead.
47507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47508  if test "x$has_forbidden_chars" != x; then
47509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47510    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47511  fi
47512
47513
47514  windows_path="$new_path"
47515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47516    unix_path=`$CYGPATH -u "$windows_path"`
47517    new_path="$unix_path"
47518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47520    new_path="$unix_path"
47521  fi
47522
47523  if test "x$path" != "x$new_path"; then
47524    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47525    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47526$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47527  fi
47528
47529  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47530  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47531
47532  else
47533    # We're on a unix platform. Hooray! :)
47534    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47535    has_space=`$ECHO "$path" | $GREP " "`
47536    if test "x$has_space" != x; then
47537      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47538$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47539      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47540    fi
47541
47542    # Use eval to expand a potential ~
47543    eval path="$path"
47544    if test ! -f "$path" && test ! -d "$path"; then
47545      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47546    fi
47547
47548    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47549  fi
47550
47551
47552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47553
47554  # Input might be given as Windows format, start by converting to
47555  # unix format.
47556  path="$POTENTIAL_FREETYPE_LIB_PATH"
47557  new_path=`$CYGPATH -u "$path"`
47558
47559  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47560  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47561  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47562  # "foo.exe" is OK but "foo" is an error.
47563  #
47564  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47565  # It is also a way to make sure we got the proper file name for the real test later on.
47566  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47567  if test "x$test_shortpath" = x; then
47568    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47569$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47570    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47571  fi
47572
47573  # Call helper function which possibly converts this using DOS-style short mode.
47574  # If so, the updated path is stored in $new_path.
47575
47576  input_path="$new_path"
47577  # Check if we need to convert this using DOS-style short mode. If the path
47578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47579  # take no chances and rewrite it.
47580  # Note: m4 eats our [], so we need to use [ and ] instead.
47581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47582  if test "x$has_forbidden_chars" != x; then
47583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47584    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47585    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47586    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47587      # Going to short mode and back again did indeed matter. Since short mode is
47588      # case insensitive, let's make it lowercase to improve readability.
47589      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47590      # Now convert it back to Unix-stile (cygpath)
47591      input_path=`$CYGPATH -u "$shortmode_path"`
47592      new_path="$input_path"
47593    fi
47594  fi
47595
47596  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47597  if test "x$test_cygdrive_prefix" = x; then
47598    # As a simple fix, exclude /usr/bin since it's not a real path.
47599    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47600      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47601      # a path prefixed by /cygdrive for fixpath to work.
47602      new_path="$CYGWIN_ROOT_PATH$input_path"
47603    fi
47604  fi
47605
47606
47607  if test "x$path" != "x$new_path"; then
47608    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47610$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47611  fi
47612
47613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47614
47615  path="$POTENTIAL_FREETYPE_LIB_PATH"
47616  has_colon=`$ECHO $path | $GREP ^.:`
47617  new_path="$path"
47618  if test "x$has_colon" = x; then
47619    # Not in mixed or Windows style, start by that.
47620    new_path=`cmd //c echo $path`
47621  fi
47622
47623
47624  input_path="$new_path"
47625  # Check if we need to convert this using DOS-style short mode. If the path
47626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47627  # take no chances and rewrite it.
47628  # Note: m4 eats our [], so we need to use [ and ] instead.
47629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47630  if test "x$has_forbidden_chars" != x; then
47631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47632    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47633  fi
47634
47635
47636  windows_path="$new_path"
47637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47638    unix_path=`$CYGPATH -u "$windows_path"`
47639    new_path="$unix_path"
47640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47642    new_path="$unix_path"
47643  fi
47644
47645  if test "x$path" != "x$new_path"; then
47646    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47648$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47649  fi
47650
47651  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47652  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47653
47654  else
47655    # We're on a unix platform. Hooray! :)
47656    path="$POTENTIAL_FREETYPE_LIB_PATH"
47657    has_space=`$ECHO "$path" | $GREP " "`
47658    if test "x$has_space" != x; then
47659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47660$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47661      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47662    fi
47663
47664    # Use eval to expand a potential ~
47665    eval path="$path"
47666    if test ! -f "$path" && test ! -d "$path"; then
47667      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47668    fi
47669
47670    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47671  fi
47672
47673
47674    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47675    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47676$as_echo_n "checking for freetype includes... " >&6; }
47677    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47678$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47679    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47680    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47681$as_echo_n "checking for freetype libraries... " >&6; }
47682    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47683$as_echo "$FREETYPE_LIB_PATH" >&6; }
47684  fi
47685
47686              if test "x$FOUND_FREETYPE" != xyes; then
47687
47688  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47689  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47690  METHOD="well-known location"
47691
47692  # Let's start with an optimistic view of the world :-)
47693  FOUND_FREETYPE=yes
47694
47695  # First look for the canonical freetype main include file ft2build.h.
47696  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47697    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47698    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47699    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47700      # Fail.
47701      FOUND_FREETYPE=no
47702    fi
47703  fi
47704
47705  if test "x$FOUND_FREETYPE" = xyes; then
47706    # Include file found, let's continue the sanity check.
47707    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47708$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47709
47710    # Reset to default value
47711    FREETYPE_BASE_NAME=freetype
47712    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47713    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47714      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47715          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47716        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47717        # for the .6 version explicitly.
47718        FREETYPE_BASE_NAME=freetype.6
47719        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47720        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47721$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47722      else
47723        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47724$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47725        FOUND_FREETYPE=no
47726      fi
47727    else
47728      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47729        # On Windows, we will need both .lib and .dll file.
47730        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47731          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47732$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47733          FOUND_FREETYPE=no
47734        fi
47735      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47736          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47737        # Found lib in isa dir, use that instead.
47738        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47739        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47740$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47741      fi
47742    fi
47743  fi
47744
47745  if test "x$FOUND_FREETYPE" = xyes; then
47746
47747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47748
47749  # Input might be given as Windows format, start by converting to
47750  # unix format.
47751  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47752  new_path=`$CYGPATH -u "$path"`
47753
47754  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47755  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47756  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47757  # "foo.exe" is OK but "foo" is an error.
47758  #
47759  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47760  # It is also a way to make sure we got the proper file name for the real test later on.
47761  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47762  if test "x$test_shortpath" = x; then
47763    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47764$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47765    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47766  fi
47767
47768  # Call helper function which possibly converts this using DOS-style short mode.
47769  # If so, the updated path is stored in $new_path.
47770
47771  input_path="$new_path"
47772  # Check if we need to convert this using DOS-style short mode. If the path
47773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47774  # take no chances and rewrite it.
47775  # Note: m4 eats our [], so we need to use [ and ] instead.
47776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47777  if test "x$has_forbidden_chars" != x; then
47778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47779    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47780    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47781    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47782      # Going to short mode and back again did indeed matter. Since short mode is
47783      # case insensitive, let's make it lowercase to improve readability.
47784      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47785      # Now convert it back to Unix-stile (cygpath)
47786      input_path=`$CYGPATH -u "$shortmode_path"`
47787      new_path="$input_path"
47788    fi
47789  fi
47790
47791  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47792  if test "x$test_cygdrive_prefix" = x; then
47793    # As a simple fix, exclude /usr/bin since it's not a real path.
47794    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47795      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47796      # a path prefixed by /cygdrive for fixpath to work.
47797      new_path="$CYGWIN_ROOT_PATH$input_path"
47798    fi
47799  fi
47800
47801
47802  if test "x$path" != "x$new_path"; then
47803    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47805$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47806  fi
47807
47808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47809
47810  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47811  has_colon=`$ECHO $path | $GREP ^.:`
47812  new_path="$path"
47813  if test "x$has_colon" = x; then
47814    # Not in mixed or Windows style, start by that.
47815    new_path=`cmd //c echo $path`
47816  fi
47817
47818
47819  input_path="$new_path"
47820  # Check if we need to convert this using DOS-style short mode. If the path
47821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47822  # take no chances and rewrite it.
47823  # Note: m4 eats our [], so we need to use [ and ] instead.
47824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47825  if test "x$has_forbidden_chars" != x; then
47826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47827    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47828  fi
47829
47830
47831  windows_path="$new_path"
47832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47833    unix_path=`$CYGPATH -u "$windows_path"`
47834    new_path="$unix_path"
47835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47837    new_path="$unix_path"
47838  fi
47839
47840  if test "x$path" != "x$new_path"; then
47841    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47843$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47844  fi
47845
47846  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47847  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47848
47849  else
47850    # We're on a unix platform. Hooray! :)
47851    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47852    has_space=`$ECHO "$path" | $GREP " "`
47853    if test "x$has_space" != x; then
47854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47855$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47856      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47857    fi
47858
47859    # Use eval to expand a potential ~
47860    eval path="$path"
47861    if test ! -f "$path" && test ! -d "$path"; then
47862      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47863    fi
47864
47865    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47866  fi
47867
47868
47869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47870
47871  # Input might be given as Windows format, start by converting to
47872  # unix format.
47873  path="$POTENTIAL_FREETYPE_LIB_PATH"
47874  new_path=`$CYGPATH -u "$path"`
47875
47876  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47877  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47878  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47879  # "foo.exe" is OK but "foo" is an error.
47880  #
47881  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47882  # It is also a way to make sure we got the proper file name for the real test later on.
47883  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47884  if test "x$test_shortpath" = x; then
47885    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47886$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47887    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47888  fi
47889
47890  # Call helper function which possibly converts this using DOS-style short mode.
47891  # If so, the updated path is stored in $new_path.
47892
47893  input_path="$new_path"
47894  # Check if we need to convert this using DOS-style short mode. If the path
47895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47896  # take no chances and rewrite it.
47897  # Note: m4 eats our [], so we need to use [ and ] instead.
47898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47899  if test "x$has_forbidden_chars" != x; then
47900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47901    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47902    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47903    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47904      # Going to short mode and back again did indeed matter. Since short mode is
47905      # case insensitive, let's make it lowercase to improve readability.
47906      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47907      # Now convert it back to Unix-stile (cygpath)
47908      input_path=`$CYGPATH -u "$shortmode_path"`
47909      new_path="$input_path"
47910    fi
47911  fi
47912
47913  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47914  if test "x$test_cygdrive_prefix" = x; then
47915    # As a simple fix, exclude /usr/bin since it's not a real path.
47916    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47917      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47918      # a path prefixed by /cygdrive for fixpath to work.
47919      new_path="$CYGWIN_ROOT_PATH$input_path"
47920    fi
47921  fi
47922
47923
47924  if test "x$path" != "x$new_path"; then
47925    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47927$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47928  fi
47929
47930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47931
47932  path="$POTENTIAL_FREETYPE_LIB_PATH"
47933  has_colon=`$ECHO $path | $GREP ^.:`
47934  new_path="$path"
47935  if test "x$has_colon" = x; then
47936    # Not in mixed or Windows style, start by that.
47937    new_path=`cmd //c echo $path`
47938  fi
47939
47940
47941  input_path="$new_path"
47942  # Check if we need to convert this using DOS-style short mode. If the path
47943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47944  # take no chances and rewrite it.
47945  # Note: m4 eats our [], so we need to use [ and ] instead.
47946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47947  if test "x$has_forbidden_chars" != x; then
47948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47949    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47950  fi
47951
47952
47953  windows_path="$new_path"
47954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47955    unix_path=`$CYGPATH -u "$windows_path"`
47956    new_path="$unix_path"
47957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47959    new_path="$unix_path"
47960  fi
47961
47962  if test "x$path" != "x$new_path"; then
47963    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47965$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47966  fi
47967
47968  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47969  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47970
47971  else
47972    # We're on a unix platform. Hooray! :)
47973    path="$POTENTIAL_FREETYPE_LIB_PATH"
47974    has_space=`$ECHO "$path" | $GREP " "`
47975    if test "x$has_space" != x; then
47976      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47977$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47978      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47979    fi
47980
47981    # Use eval to expand a potential ~
47982    eval path="$path"
47983    if test ! -f "$path" && test ! -d "$path"; then
47984      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47985    fi
47986
47987    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47988  fi
47989
47990
47991    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47992    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47993$as_echo_n "checking for freetype includes... " >&6; }
47994    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47995$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47996    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47997    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47998$as_echo_n "checking for freetype libraries... " >&6; }
47999    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48000$as_echo "$FREETYPE_LIB_PATH" >&6; }
48001  fi
48002
48003              fi
48004            fi
48005          fi
48006        fi
48007      fi # end check in well-known locations
48008
48009      if test "x$FOUND_FREETYPE" != xyes; then
48010
48011  # Print a helpful message on how to acquire the necessary build dependency.
48012  # freetype is the help tag: freetype, cups, pulse, alsa etc
48013  MISSING_DEPENDENCY=freetype
48014
48015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48016    cygwin_help $MISSING_DEPENDENCY
48017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48018    msys_help $MISSING_DEPENDENCY
48019  else
48020    PKGHANDLER_COMMAND=
48021
48022    case $PKGHANDLER in
48023      apt-get)
48024        apt_help     $MISSING_DEPENDENCY ;;
48025      yum)
48026        yum_help     $MISSING_DEPENDENCY ;;
48027      port)
48028        port_help    $MISSING_DEPENDENCY ;;
48029      pkgutil)
48030        pkgutil_help $MISSING_DEPENDENCY ;;
48031      pkgadd)
48032        pkgadd_help  $MISSING_DEPENDENCY ;;
48033    esac
48034
48035    if test "x$PKGHANDLER_COMMAND" != x; then
48036      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48037    fi
48038  fi
48039
48040        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48041      fi
48042    fi # end user specified settings
48043
48044    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48045    if test "x$FREETYPE_CFLAGS" = x; then
48046
48047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48048
48049  # Input might be given as Windows format, start by converting to
48050  # unix format.
48051  path="$FREETYPE_INCLUDE_PATH"
48052  new_path=`$CYGPATH -u "$path"`
48053
48054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48057  # "foo.exe" is OK but "foo" is an error.
48058  #
48059  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48060  # It is also a way to make sure we got the proper file name for the real test later on.
48061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48062  if test "x$test_shortpath" = x; then
48063    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48064$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48065    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48066  fi
48067
48068  # Call helper function which possibly converts this using DOS-style short mode.
48069  # If so, the updated path is stored in $new_path.
48070
48071  input_path="$new_path"
48072  # Check if we need to convert this using DOS-style short mode. If the path
48073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48074  # take no chances and rewrite it.
48075  # Note: m4 eats our [], so we need to use [ and ] instead.
48076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48077  if test "x$has_forbidden_chars" != x; then
48078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48079    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48080    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48081    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48082      # Going to short mode and back again did indeed matter. Since short mode is
48083      # case insensitive, let's make it lowercase to improve readability.
48084      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48085      # Now convert it back to Unix-stile (cygpath)
48086      input_path=`$CYGPATH -u "$shortmode_path"`
48087      new_path="$input_path"
48088    fi
48089  fi
48090
48091  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48092  if test "x$test_cygdrive_prefix" = x; then
48093    # As a simple fix, exclude /usr/bin since it's not a real path.
48094    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48095      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48096      # a path prefixed by /cygdrive for fixpath to work.
48097      new_path="$CYGWIN_ROOT_PATH$input_path"
48098    fi
48099  fi
48100
48101
48102  if test "x$path" != "x$new_path"; then
48103    FREETYPE_INCLUDE_PATH="$new_path"
48104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48105$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48106  fi
48107
48108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48109
48110  path="$FREETYPE_INCLUDE_PATH"
48111  has_colon=`$ECHO $path | $GREP ^.:`
48112  new_path="$path"
48113  if test "x$has_colon" = x; then
48114    # Not in mixed or Windows style, start by that.
48115    new_path=`cmd //c echo $path`
48116  fi
48117
48118
48119  input_path="$new_path"
48120  # Check if we need to convert this using DOS-style short mode. If the path
48121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48122  # take no chances and rewrite it.
48123  # Note: m4 eats our [], so we need to use [ and ] instead.
48124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48125  if test "x$has_forbidden_chars" != x; then
48126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48128  fi
48129
48130
48131  windows_path="$new_path"
48132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48133    unix_path=`$CYGPATH -u "$windows_path"`
48134    new_path="$unix_path"
48135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48137    new_path="$unix_path"
48138  fi
48139
48140  if test "x$path" != "x$new_path"; then
48141    FREETYPE_INCLUDE_PATH="$new_path"
48142    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48143$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48144  fi
48145
48146  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48147  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48148
48149  else
48150    # We're on a unix platform. Hooray! :)
48151    path="$FREETYPE_INCLUDE_PATH"
48152    has_space=`$ECHO "$path" | $GREP " "`
48153    if test "x$has_space" != x; then
48154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48155$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48156      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48157    fi
48158
48159    # Use eval to expand a potential ~
48160    eval path="$path"
48161    if test ! -f "$path" && test ! -d "$path"; then
48162      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48163    fi
48164
48165    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48166  fi
48167
48168      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48169        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48170      else
48171        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48172      fi
48173    fi
48174
48175    if test "x$FREETYPE_LIBS" = x; then
48176
48177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48178
48179  # Input might be given as Windows format, start by converting to
48180  # unix format.
48181  path="$FREETYPE_LIB_PATH"
48182  new_path=`$CYGPATH -u "$path"`
48183
48184  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48185  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48186  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48187  # "foo.exe" is OK but "foo" is an error.
48188  #
48189  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48190  # It is also a way to make sure we got the proper file name for the real test later on.
48191  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48192  if test "x$test_shortpath" = x; then
48193    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48194$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48195    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48196  fi
48197
48198  # Call helper function which possibly converts this using DOS-style short mode.
48199  # If so, the updated path is stored in $new_path.
48200
48201  input_path="$new_path"
48202  # Check if we need to convert this using DOS-style short mode. If the path
48203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48204  # take no chances and rewrite it.
48205  # Note: m4 eats our [], so we need to use [ and ] instead.
48206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48207  if test "x$has_forbidden_chars" != x; then
48208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48209    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48210    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48211    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48212      # Going to short mode and back again did indeed matter. Since short mode is
48213      # case insensitive, let's make it lowercase to improve readability.
48214      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48215      # Now convert it back to Unix-stile (cygpath)
48216      input_path=`$CYGPATH -u "$shortmode_path"`
48217      new_path="$input_path"
48218    fi
48219  fi
48220
48221  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48222  if test "x$test_cygdrive_prefix" = x; then
48223    # As a simple fix, exclude /usr/bin since it's not a real path.
48224    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48225      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48226      # a path prefixed by /cygdrive for fixpath to work.
48227      new_path="$CYGWIN_ROOT_PATH$input_path"
48228    fi
48229  fi
48230
48231
48232  if test "x$path" != "x$new_path"; then
48233    FREETYPE_LIB_PATH="$new_path"
48234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48235$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48236  fi
48237
48238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48239
48240  path="$FREETYPE_LIB_PATH"
48241  has_colon=`$ECHO $path | $GREP ^.:`
48242  new_path="$path"
48243  if test "x$has_colon" = x; then
48244    # Not in mixed or Windows style, start by that.
48245    new_path=`cmd //c echo $path`
48246  fi
48247
48248
48249  input_path="$new_path"
48250  # Check if we need to convert this using DOS-style short mode. If the path
48251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48252  # take no chances and rewrite it.
48253  # Note: m4 eats our [], so we need to use [ and ] instead.
48254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48255  if test "x$has_forbidden_chars" != x; then
48256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48258  fi
48259
48260
48261  windows_path="$new_path"
48262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48263    unix_path=`$CYGPATH -u "$windows_path"`
48264    new_path="$unix_path"
48265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48267    new_path="$unix_path"
48268  fi
48269
48270  if test "x$path" != "x$new_path"; then
48271    FREETYPE_LIB_PATH="$new_path"
48272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48273$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48274  fi
48275
48276  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48277  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48278
48279  else
48280    # We're on a unix platform. Hooray! :)
48281    path="$FREETYPE_LIB_PATH"
48282    has_space=`$ECHO "$path" | $GREP " "`
48283    if test "x$has_space" != x; then
48284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48285$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48286      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48287    fi
48288
48289    # Use eval to expand a potential ~
48290    eval path="$path"
48291    if test ! -f "$path" && test ! -d "$path"; then
48292      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48293    fi
48294
48295    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48296  fi
48297
48298      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48299        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48300      else
48301        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48302      fi
48303    fi
48304
48305    # Try to compile it
48306    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48307$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48308    ac_ext=cpp
48309ac_cpp='$CXXCPP $CPPFLAGS'
48310ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48311ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48312ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48313
48314    PREV_CXXCFLAGS="$CXXFLAGS"
48315    PREV_LIBS="$LIBS"
48316    PREV_CXX="$CXX"
48317    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48318    LIBS="$LIBS $FREETYPE_LIBS"
48319    CXX="$FIXPATH $CXX"
48320    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48321/* end confdefs.h.  */
48322
48323          #include<ft2build.h>
48324          #include FT_FREETYPE_H
48325          int main () {
48326            FT_Init_FreeType(NULL);
48327            return 0;
48328          }
48329
48330_ACEOF
48331if ac_fn_cxx_try_link "$LINENO"; then :
48332
48333          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48334$as_echo "yes" >&6; }
48335
48336else
48337
48338          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48339$as_echo "no" >&6; }
48340          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48341$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48342          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48343$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48344
48345
48346  # Print a helpful message on how to acquire the necessary build dependency.
48347  # freetype is the help tag: freetype, cups, pulse, alsa etc
48348  MISSING_DEPENDENCY=freetype
48349
48350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48351    cygwin_help $MISSING_DEPENDENCY
48352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48353    msys_help $MISSING_DEPENDENCY
48354  else
48355    PKGHANDLER_COMMAND=
48356
48357    case $PKGHANDLER in
48358      apt-get)
48359        apt_help     $MISSING_DEPENDENCY ;;
48360      yum)
48361        yum_help     $MISSING_DEPENDENCY ;;
48362      port)
48363        port_help    $MISSING_DEPENDENCY ;;
48364      pkgutil)
48365        pkgutil_help $MISSING_DEPENDENCY ;;
48366      pkgadd)
48367        pkgadd_help  $MISSING_DEPENDENCY ;;
48368    esac
48369
48370    if test "x$PKGHANDLER_COMMAND" != x; then
48371      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48372    fi
48373  fi
48374
48375
48376          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48377
48378
48379fi
48380rm -f core conftest.err conftest.$ac_objext \
48381    conftest$ac_exeext conftest.$ac_ext
48382    CXXCFLAGS="$PREV_CXXFLAGS"
48383    LIBS="$PREV_LIBS"
48384    CXX="$PREV_CXX"
48385    ac_ext=cpp
48386ac_cpp='$CXXCPP $CPPFLAGS'
48387ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48388ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48389ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48390
48391
48392    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48393$as_echo_n "checking if we should bundle freetype... " >&6; }
48394    if test "x$BUNDLE_FREETYPE" = xyes; then
48395      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48396    fi
48397    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48398$as_echo "$BUNDLE_FREETYPE" >&6; }
48399
48400  fi # end freetype needed
48401
48402
48403
48404
48405
48406
48407
48408  ###############################################################################
48409  #
48410  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48411  #
48412
48413# Check whether --with-alsa was given.
48414if test "${with_alsa+set}" = set; then :
48415  withval=$with_alsa;
48416fi
48417
48418
48419# Check whether --with-alsa-include was given.
48420if test "${with_alsa_include+set}" = set; then :
48421  withval=$with_alsa_include;
48422fi
48423
48424
48425# Check whether --with-alsa-lib was given.
48426if test "${with_alsa_lib+set}" = set; then :
48427  withval=$with_alsa_lib;
48428fi
48429
48430
48431  if test "x$ALSA_NOT_NEEDED" = xyes; then
48432    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48433      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48434$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48435    fi
48436    ALSA_CFLAGS=
48437    ALSA_LIBS=
48438  else
48439    ALSA_FOUND=no
48440
48441    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48442      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48443    fi
48444
48445    if test "x${with_alsa}" != x; then
48446      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48447      ALSA_CFLAGS="-I${with_alsa}/include"
48448      ALSA_FOUND=yes
48449    fi
48450    if test "x${with_alsa_include}" != x; then
48451      ALSA_CFLAGS="-I${with_alsa_include}"
48452      ALSA_FOUND=yes
48453    fi
48454    if test "x${with_alsa_lib}" != x; then
48455      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48456      ALSA_FOUND=yes
48457    fi
48458    if test "x$ALSA_FOUND" = xno; then
48459
48460
48461  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48462    # Source the builddeps file again, to make sure it uses the latest variables!
48463    . $builddepsfile
48464    # Look for a target and build machine specific resource!
48465    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48466    if test "x$resource" = x; then
48467      # Ok, lets instead look for a target specific resource
48468      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48469    fi
48470    if test "x$resource" = x; then
48471      # Ok, lets instead look for a build specific resource
48472      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48473    fi
48474    if test "x$resource" = x; then
48475      # Ok, lets instead look for a generic resource
48476      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48477      resource=${builddep_alsa}
48478    fi
48479    if test "x$resource" != x; then
48480      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48481$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48482      # If the resource in the builddeps.conf file is an existing directory,
48483      # for example /java/linux/cups
48484      if test -d ${resource}; then
48485        depdir=${resource}
48486      else
48487
48488  # alsa is for example mymodule
48489  # $resource is for example libs/general/libmymod_1_2_3.zip
48490  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48491  # $with_builddeps_dir is for example /localhome/builddeps
48492  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48493  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48494  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48495  filename=`basename $resource`
48496  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48497  filebase=${filename%%.*}
48498  extension=${filename#*.}
48499  installdir=$with_builddeps_dir/$filebase
48500  if test ! -f $installdir/$filename.unpacked; then
48501    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48502$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48503    if test ! -d $installdir; then
48504      mkdir -p $installdir
48505    fi
48506    if test ! -d $installdir; then
48507      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48508    fi
48509    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48510    touch $tmpfile
48511    if test ! -f $tmpfile; then
48512      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48513    fi
48514
48515  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48516  # $tmpfile is the local file name for the downloaded file.
48517  VALID_TOOL=no
48518  if test "x$BDEPS_FTP" = xwget; then
48519    VALID_TOOL=yes
48520    wget -O $tmpfile $with_builddeps_server/$resource
48521  fi
48522  if test "x$BDEPS_FTP" = xlftp; then
48523    VALID_TOOL=yes
48524    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48525  fi
48526  if test "x$BDEPS_FTP" = xftp; then
48527    VALID_TOOL=yes
48528    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48529    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48530    FTPUSERPWD=${FTPSERVER%%@*}
48531    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48532      FTPUSER=${userpwd%%:*}
48533      FTPPWD=${userpwd#*@}
48534      FTPSERVER=${FTPSERVER#*@}
48535    else
48536      FTPUSER=ftp
48537      FTPPWD=ftp
48538    fi
48539    # the "pass" command does not work on some
48540    # ftp clients (read ftp.exe) but if it works,
48541    # passive mode is better!
48542    ( \
48543        echo "user $FTPUSER $FTPPWD"        ; \
48544        echo "pass"                         ; \
48545        echo "bin"                          ; \
48546        echo "get $FTPPATH $tmpfile"              ; \
48547    ) | ftp -in $FTPSERVER
48548  fi
48549  if test "x$VALID_TOOL" != xyes; then
48550    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48551  fi
48552
48553    mv $tmpfile $installdir/$filename
48554    if test ! -s $installdir/$filename; then
48555      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48556    fi
48557    case "$extension" in
48558      zip)  echo "Unzipping $installdir/$filename..."
48559        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48560        ;;
48561      tar.gz) echo "Untaring $installdir/$filename..."
48562        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48563        ;;
48564      tgz) echo "Untaring $installdir/$filename..."
48565        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48566        ;;
48567      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48568        ;;
48569    esac
48570  fi
48571  if test -f $installdir/$filename.unpacked; then
48572    depdir=$installdir
48573  fi
48574
48575      fi
48576      # Source the builddeps file again, because in the previous command, the depdir
48577      # was updated to point at the current build dependency install directory.
48578      . $builddepsfile
48579      # Now extract variables from the builddeps.conf files.
48580      theroot=${builddep_alsa_ROOT}
48581      thecflags=${builddep_alsa_CFLAGS}
48582      thelibs=${builddep_alsa_LIBS}
48583      if test "x$depdir" = x; then
48584        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48585      fi
48586      ALSA=$depdir
48587      if test "x$theroot" != x; then
48588        ALSA="$theroot"
48589      fi
48590      if test "x$thecflags" != x; then
48591        ALSA_CFLAGS="$thecflags"
48592      fi
48593      if test "x$thelibs" != x; then
48594        ALSA_LIBS="$thelibs"
48595      fi
48596      ALSA_FOUND=yes
48597      else ALSA_FOUND=no
48598
48599    fi
48600    else ALSA_FOUND=no
48601
48602  fi
48603
48604    fi
48605    # Do not try pkg-config if we have a sysroot set.
48606    if test "x$SYSROOT" = x; then
48607      if test "x$ALSA_FOUND" = xno; then
48608
48609pkg_failed=no
48610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48611$as_echo_n "checking for ALSA... " >&6; }
48612
48613if test -n "$ALSA_CFLAGS"; then
48614    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48615 elif test -n "$PKG_CONFIG"; then
48616    if test -n "$PKG_CONFIG" && \
48617    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48618  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48619  ac_status=$?
48620  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48621  test $ac_status = 0; }; then
48622  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48623else
48624  pkg_failed=yes
48625fi
48626 else
48627    pkg_failed=untried
48628fi
48629if test -n "$ALSA_LIBS"; then
48630    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48631 elif test -n "$PKG_CONFIG"; then
48632    if test -n "$PKG_CONFIG" && \
48633    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48634  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48635  ac_status=$?
48636  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48637  test $ac_status = 0; }; then
48638  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48639else
48640  pkg_failed=yes
48641fi
48642 else
48643    pkg_failed=untried
48644fi
48645
48646
48647
48648if test $pkg_failed = yes; then
48649
48650if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48651        _pkg_short_errors_supported=yes
48652else
48653        _pkg_short_errors_supported=no
48654fi
48655        if test $_pkg_short_errors_supported = yes; then
48656	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48657        else
48658	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48659        fi
48660	# Put the nasty error message in config.log where it belongs
48661	echo "$ALSA_PKG_ERRORS" >&5
48662
48663	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48664$as_echo "no" >&6; }
48665                ALSA_FOUND=no
48666elif test $pkg_failed = untried; then
48667	ALSA_FOUND=no
48668else
48669	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48670	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48671        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48672$as_echo "yes" >&6; }
48673	ALSA_FOUND=yes
48674fi
48675      fi
48676    fi
48677    if test "x$ALSA_FOUND" = xno; then
48678      for ac_header in alsa/asoundlib.h
48679do :
48680  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48681if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48682  cat >>confdefs.h <<_ACEOF
48683#define HAVE_ALSA_ASOUNDLIB_H 1
48684_ACEOF
48685
48686            ALSA_FOUND=yes
48687            ALSA_CFLAGS=-Iignoreme
48688            ALSA_LIBS=-lasound
48689            DEFAULT_ALSA=yes
48690
48691else
48692  ALSA_FOUND=no
48693fi
48694
48695done
48696
48697    fi
48698    if test "x$ALSA_FOUND" = xno; then
48699
48700  # Print a helpful message on how to acquire the necessary build dependency.
48701  # alsa is the help tag: freetype, cups, pulse, alsa etc
48702  MISSING_DEPENDENCY=alsa
48703
48704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48705    cygwin_help $MISSING_DEPENDENCY
48706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48707    msys_help $MISSING_DEPENDENCY
48708  else
48709    PKGHANDLER_COMMAND=
48710
48711    case $PKGHANDLER in
48712      apt-get)
48713        apt_help     $MISSING_DEPENDENCY ;;
48714      yum)
48715        yum_help     $MISSING_DEPENDENCY ;;
48716      port)
48717        port_help    $MISSING_DEPENDENCY ;;
48718      pkgutil)
48719        pkgutil_help $MISSING_DEPENDENCY ;;
48720      pkgadd)
48721        pkgadd_help  $MISSING_DEPENDENCY ;;
48722    esac
48723
48724    if test "x$PKGHANDLER_COMMAND" != x; then
48725      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48726    fi
48727  fi
48728
48729      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48730    fi
48731  fi
48732
48733
48734
48735
48736
48737
48738  ###############################################################################
48739  #
48740  # Check for the jpeg library
48741  #
48742
48743
48744# Check whether --with-libjpeg was given.
48745if test "${with_libjpeg+set}" = set; then :
48746  withval=$with_libjpeg;
48747fi
48748
48749
48750  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48751$as_echo_n "checking for which libjpeg to use... " >&6; }
48752
48753  # default is bundled
48754  DEFAULT_LIBJPEG=bundled
48755
48756  #
48757  # if user didn't specify, use DEFAULT_LIBJPEG
48758  #
48759  if test "x${with_libjpeg}" = "x"; then
48760    with_libjpeg=${DEFAULT_LIBJPEG}
48761  fi
48762
48763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48764$as_echo "${with_libjpeg}" >&6; }
48765
48766  if test "x${with_libjpeg}" = "xbundled"; then
48767    USE_EXTERNAL_LIBJPEG=false
48768  elif test "x${with_libjpeg}" = "xsystem"; then
48769    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48770if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48771
48772else
48773   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48774fi
48775
48776
48777    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48778$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48779if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48780  $as_echo_n "(cached) " >&6
48781else
48782  ac_check_lib_save_LIBS=$LIBS
48783LIBS="-ljpeg  $LIBS"
48784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48785/* end confdefs.h.  */
48786
48787/* Override any GCC internal prototype to avoid an error.
48788   Use char because int might match the return type of a GCC
48789   builtin and then its argument prototype would still apply.  */
48790#ifdef __cplusplus
48791extern "C"
48792#endif
48793char jpeg_CreateDecompress ();
48794int
48795main ()
48796{
48797return jpeg_CreateDecompress ();
48798  ;
48799  return 0;
48800}
48801_ACEOF
48802if ac_fn_cxx_try_link "$LINENO"; then :
48803  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48804else
48805  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48806fi
48807rm -f core conftest.err conftest.$ac_objext \
48808    conftest$ac_exeext conftest.$ac_ext
48809LIBS=$ac_check_lib_save_LIBS
48810fi
48811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48812$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48813if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48814  cat >>confdefs.h <<_ACEOF
48815#define HAVE_LIBJPEG 1
48816_ACEOF
48817
48818  LIBS="-ljpeg $LIBS"
48819
48820else
48821   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48822fi
48823
48824
48825    USE_EXTERNAL_LIBJPEG=true
48826  else
48827    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48828  fi
48829
48830
48831
48832  ###############################################################################
48833  #
48834  # Check for the gif library
48835  #
48836
48837
48838# Check whether --with-giflib was given.
48839if test "${with_giflib+set}" = set; then :
48840  withval=$with_giflib;
48841fi
48842
48843
48844
48845  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48846$as_echo_n "checking for which giflib to use... " >&6; }
48847
48848  # default is bundled
48849  DEFAULT_GIFLIB=bundled
48850
48851  #
48852  # if user didn't specify, use DEFAULT_GIFLIB
48853  #
48854  if test "x${with_giflib}" = "x"; then
48855    with_giflib=${DEFAULT_GIFLIB}
48856  fi
48857
48858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48859$as_echo "${with_giflib}" >&6; }
48860
48861  if test "x${with_giflib}" = "xbundled"; then
48862    USE_EXTERNAL_LIBGIF=false
48863  elif test "x${with_giflib}" = "xsystem"; then
48864    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48865if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48866
48867else
48868   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48869fi
48870
48871
48872    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48873$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48874if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48875  $as_echo_n "(cached) " >&6
48876else
48877  ac_check_lib_save_LIBS=$LIBS
48878LIBS="-lgif  $LIBS"
48879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48880/* end confdefs.h.  */
48881
48882/* Override any GCC internal prototype to avoid an error.
48883   Use char because int might match the return type of a GCC
48884   builtin and then its argument prototype would still apply.  */
48885#ifdef __cplusplus
48886extern "C"
48887#endif
48888char DGifGetCode ();
48889int
48890main ()
48891{
48892return DGifGetCode ();
48893  ;
48894  return 0;
48895}
48896_ACEOF
48897if ac_fn_cxx_try_link "$LINENO"; then :
48898  ac_cv_lib_gif_DGifGetCode=yes
48899else
48900  ac_cv_lib_gif_DGifGetCode=no
48901fi
48902rm -f core conftest.err conftest.$ac_objext \
48903    conftest$ac_exeext conftest.$ac_ext
48904LIBS=$ac_check_lib_save_LIBS
48905fi
48906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48907$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48908if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48909  cat >>confdefs.h <<_ACEOF
48910#define HAVE_LIBGIF 1
48911_ACEOF
48912
48913  LIBS="-lgif $LIBS"
48914
48915else
48916   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48917fi
48918
48919
48920    USE_EXTERNAL_LIBGIF=true
48921  else
48922    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48923  fi
48924
48925
48926  ###############################################################################
48927  #
48928  # Check for the lcms2 library
48929  #
48930
48931
48932# Check whether --with-lcms was given.
48933if test "${with_lcms+set}" = set; then :
48934  withval=$with_lcms;
48935fi
48936
48937
48938  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
48939$as_echo_n "checking for which lcms to use... " >&6; }
48940
48941  DEFAULT_LCMS=bundled
48942
48943  #
48944  # If user didn't specify, use DEFAULT_LCMS
48945  #
48946  if test "x${with_lcms}" = "x"; then
48947      with_lcms=${DEFAULT_LCMS}
48948  fi
48949
48950  if test "x${with_lcms}" = "xbundled"; then
48951    USE_EXTERNAL_LCMS=false
48952    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48953$as_echo "bundled" >&6; }
48954  elif test "x${with_lcms}" = "xsystem"; then
48955    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48956$as_echo "system" >&6; }
48957
48958pkg_failed=no
48959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
48960$as_echo_n "checking for LCMS... " >&6; }
48961
48962if test -n "$LCMS_CFLAGS"; then
48963    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
48964 elif test -n "$PKG_CONFIG"; then
48965    if test -n "$PKG_CONFIG" && \
48966    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48967  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48968  ac_status=$?
48969  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48970  test $ac_status = 0; }; then
48971  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
48972else
48973  pkg_failed=yes
48974fi
48975 else
48976    pkg_failed=untried
48977fi
48978if test -n "$LCMS_LIBS"; then
48979    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
48980 elif test -n "$PKG_CONFIG"; then
48981    if test -n "$PKG_CONFIG" && \
48982    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48983  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48984  ac_status=$?
48985  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48986  test $ac_status = 0; }; then
48987  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
48988else
48989  pkg_failed=yes
48990fi
48991 else
48992    pkg_failed=untried
48993fi
48994
48995
48996
48997if test $pkg_failed = yes; then
48998
48999if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49000        _pkg_short_errors_supported=yes
49001else
49002        _pkg_short_errors_supported=no
49003fi
49004        if test $_pkg_short_errors_supported = yes; then
49005	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49006        else
49007	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49008        fi
49009	# Put the nasty error message in config.log where it belongs
49010	echo "$LCMS_PKG_ERRORS" >&5
49011
49012	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49013$as_echo "no" >&6; }
49014                LCMS_FOUND=no
49015elif test $pkg_failed = untried; then
49016	LCMS_FOUND=no
49017else
49018	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49019	LCMS_LIBS=$pkg_cv_LCMS_LIBS
49020        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49021$as_echo "yes" >&6; }
49022	LCMS_FOUND=yes
49023fi
49024    if test "x${LCMS_FOUND}" = "xyes"; then
49025      USE_EXTERNAL_LCMS=true
49026    else
49027      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49028    fi
49029  else
49030    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49031  fi
49032
49033
49034
49035  ###############################################################################
49036  #
49037  # Check for the png library
49038  #
49039
49040
49041# Check whether --with-libpng was given.
49042if test "${with_libpng+set}" = set; then :
49043  withval=$with_libpng;
49044fi
49045
49046
49047
49048  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49049$as_echo_n "checking for which libpng to use... " >&6; }
49050
49051  # default is bundled
49052  DEFAULT_LIBPNG=bundled
49053
49054  #
49055  # if user didn't specify, use DEFAULT_LIBPNG
49056  #
49057  if test "x${with_libpng}" = "x"; then
49058      with_libpng=${DEFAULT_LIBPNG}
49059  fi
49060
49061  if test "x${with_libpng}" = "xbundled"; then
49062      USE_EXTERNAL_LIBPNG=false
49063      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49064$as_echo "bundled" >&6; }
49065  elif test "x${with_libpng}" = "xsystem"; then
49066
49067pkg_failed=no
49068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49069$as_echo_n "checking for PNG... " >&6; }
49070
49071if test -n "$PNG_CFLAGS"; then
49072    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49073 elif test -n "$PKG_CONFIG"; then
49074    if test -n "$PKG_CONFIG" && \
49075    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49076  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49077  ac_status=$?
49078  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49079  test $ac_status = 0; }; then
49080  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49081else
49082  pkg_failed=yes
49083fi
49084 else
49085    pkg_failed=untried
49086fi
49087if test -n "$PNG_LIBS"; then
49088    pkg_cv_PNG_LIBS="$PNG_LIBS"
49089 elif test -n "$PKG_CONFIG"; then
49090    if test -n "$PKG_CONFIG" && \
49091    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49092  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49093  ac_status=$?
49094  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49095  test $ac_status = 0; }; then
49096  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49097else
49098  pkg_failed=yes
49099fi
49100 else
49101    pkg_failed=untried
49102fi
49103
49104
49105
49106if test $pkg_failed = yes; then
49107
49108if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49109        _pkg_short_errors_supported=yes
49110else
49111        _pkg_short_errors_supported=no
49112fi
49113        if test $_pkg_short_errors_supported = yes; then
49114	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49115        else
49116	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49117        fi
49118	# Put the nasty error message in config.log where it belongs
49119	echo "$PNG_PKG_ERRORS" >&5
49120
49121	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49122$as_echo "no" >&6; }
49123                 LIBPNG_FOUND=no
49124elif test $pkg_failed = untried; then
49125	 LIBPNG_FOUND=no
49126else
49127	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49128	PNG_LIBS=$pkg_cv_PNG_LIBS
49129        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49130$as_echo "yes" >&6; }
49131	 LIBPNG_FOUND=yes
49132fi
49133      if test "x${LIBPNG_FOUND}" = "xyes"; then
49134          USE_EXTERNAL_LIBPNG=true
49135          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49136$as_echo "system" >&6; }
49137      else
49138          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49139$as_echo "system not found" >&6; }
49140          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49141      fi
49142  else
49143      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49144  fi
49145
49146
49147  ###############################################################################
49148  #
49149  # Check for the zlib library
49150  #
49151
49152
49153# Check whether --with-zlib was given.
49154if test "${with_zlib+set}" = set; then :
49155  withval=$with_zlib;
49156fi
49157
49158
49159  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49160$as_echo_n "checking for compress in -lz... " >&6; }
49161if ${ac_cv_lib_z_compress+:} false; then :
49162  $as_echo_n "(cached) " >&6
49163else
49164  ac_check_lib_save_LIBS=$LIBS
49165LIBS="-lz  $LIBS"
49166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49167/* end confdefs.h.  */
49168
49169/* Override any GCC internal prototype to avoid an error.
49170   Use char because int might match the return type of a GCC
49171   builtin and then its argument prototype would still apply.  */
49172#ifdef __cplusplus
49173extern "C"
49174#endif
49175char compress ();
49176int
49177main ()
49178{
49179return compress ();
49180  ;
49181  return 0;
49182}
49183_ACEOF
49184if ac_fn_cxx_try_link "$LINENO"; then :
49185  ac_cv_lib_z_compress=yes
49186else
49187  ac_cv_lib_z_compress=no
49188fi
49189rm -f core conftest.err conftest.$ac_objext \
49190    conftest$ac_exeext conftest.$ac_ext
49191LIBS=$ac_check_lib_save_LIBS
49192fi
49193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49194$as_echo "$ac_cv_lib_z_compress" >&6; }
49195if test "x$ac_cv_lib_z_compress" = xyes; then :
49196   ZLIB_FOUND=yes
49197else
49198   ZLIB_FOUND=no
49199fi
49200
49201
49202  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49203$as_echo_n "checking for which zlib to use... " >&6; }
49204
49205  DEFAULT_ZLIB=bundled
49206  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49207    #
49208    # On macosx default is system...on others default is
49209    #
49210    DEFAULT_ZLIB=system
49211  fi
49212
49213  if test "x${ZLIB_FOUND}" != "xyes"; then
49214    #
49215    # If we don't find any system...set default to bundled
49216    #
49217    DEFAULT_ZLIB=bundled
49218  fi
49219
49220  #
49221  # If user didn't specify, use DEFAULT_ZLIB
49222  #
49223  if test "x${with_zlib}" = "x"; then
49224    with_zlib=${DEFAULT_ZLIB}
49225  fi
49226
49227  if test "x${with_zlib}" = "xbundled"; then
49228    USE_EXTERNAL_LIBZ=false
49229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49230$as_echo "bundled" >&6; }
49231  elif test "x${with_zlib}" = "xsystem"; then
49232    if test "x${ZLIB_FOUND}" = "xyes"; then
49233      USE_EXTERNAL_LIBZ=true
49234      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49235$as_echo "system" >&6; }
49236    else
49237      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49238$as_echo "system not found" >&6; }
49239      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49240    fi
49241  else
49242    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49243  fi
49244
49245
49246
49247  ###############################################################################
49248  LIBZIP_CAN_USE_MMAP=true
49249
49250
49251
49252  ###############################################################################
49253  #
49254  # Check if altzone exists in time.h
49255  #
49256
49257  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49258/* end confdefs.h.  */
49259#include <time.h>
49260int
49261main ()
49262{
49263return (int)altzone;
49264  ;
49265  return 0;
49266}
49267_ACEOF
49268if ac_fn_cxx_try_link "$LINENO"; then :
49269  has_altzone=yes
49270else
49271  has_altzone=no
49272fi
49273rm -f core conftest.err conftest.$ac_objext \
49274    conftest$ac_exeext conftest.$ac_ext
49275  if test "x$has_altzone" = xyes; then
49276
49277$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49278
49279  fi
49280
49281  ###############################################################################
49282  #
49283  # Check the maths library
49284  #
49285
49286  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49287$as_echo_n "checking for cos in -lm... " >&6; }
49288if ${ac_cv_lib_m_cos+:} false; then :
49289  $as_echo_n "(cached) " >&6
49290else
49291  ac_check_lib_save_LIBS=$LIBS
49292LIBS="-lm  $LIBS"
49293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49294/* end confdefs.h.  */
49295
49296/* Override any GCC internal prototype to avoid an error.
49297   Use char because int might match the return type of a GCC
49298   builtin and then its argument prototype would still apply.  */
49299#ifdef __cplusplus
49300extern "C"
49301#endif
49302char cos ();
49303int
49304main ()
49305{
49306return cos ();
49307  ;
49308  return 0;
49309}
49310_ACEOF
49311if ac_fn_cxx_try_link "$LINENO"; then :
49312  ac_cv_lib_m_cos=yes
49313else
49314  ac_cv_lib_m_cos=no
49315fi
49316rm -f core conftest.err conftest.$ac_objext \
49317    conftest$ac_exeext conftest.$ac_ext
49318LIBS=$ac_check_lib_save_LIBS
49319fi
49320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49321$as_echo "$ac_cv_lib_m_cos" >&6; }
49322if test "x$ac_cv_lib_m_cos" = xyes; then :
49323  cat >>confdefs.h <<_ACEOF
49324#define HAVE_LIBM 1
49325_ACEOF
49326
49327  LIBS="-lm $LIBS"
49328
49329else
49330
49331        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49332$as_echo "$as_me: Maths library was not found" >&6;}
49333
49334
49335fi
49336
49337
49338
49339  ###############################################################################
49340  #
49341  # Check for libdl.so
49342
49343  save_LIBS="$LIBS"
49344  LIBS=""
49345  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49346$as_echo_n "checking for dlopen in -ldl... " >&6; }
49347if ${ac_cv_lib_dl_dlopen+:} false; then :
49348  $as_echo_n "(cached) " >&6
49349else
49350  ac_check_lib_save_LIBS=$LIBS
49351LIBS="-ldl  $LIBS"
49352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49353/* end confdefs.h.  */
49354
49355/* Override any GCC internal prototype to avoid an error.
49356   Use char because int might match the return type of a GCC
49357   builtin and then its argument prototype would still apply.  */
49358#ifdef __cplusplus
49359extern "C"
49360#endif
49361char dlopen ();
49362int
49363main ()
49364{
49365return dlopen ();
49366  ;
49367  return 0;
49368}
49369_ACEOF
49370if ac_fn_cxx_try_link "$LINENO"; then :
49371  ac_cv_lib_dl_dlopen=yes
49372else
49373  ac_cv_lib_dl_dlopen=no
49374fi
49375rm -f core conftest.err conftest.$ac_objext \
49376    conftest$ac_exeext conftest.$ac_ext
49377LIBS=$ac_check_lib_save_LIBS
49378fi
49379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49380$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49381if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49382  cat >>confdefs.h <<_ACEOF
49383#define HAVE_LIBDL 1
49384_ACEOF
49385
49386  LIBS="-ldl $LIBS"
49387
49388fi
49389
49390  LIBDL="$LIBS"
49391
49392  LIBS="$save_LIBS"
49393
49394
49395  ###############################################################################
49396  #
49397  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49398  # dynamic build is configured on command line.
49399  #
49400
49401# Check whether --with-stdc++lib was given.
49402if test "${with_stdc__lib+set}" = set; then :
49403  withval=$with_stdc__lib;
49404        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49405                && test "x$with_stdc__lib" != xdefault; then
49406          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49407        fi
49408
49409else
49410  with_stdc__lib=default
49411
49412fi
49413
49414
49415  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49416    # Test if -lstdc++ works.
49417    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49418$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49419    ac_ext=cpp
49420ac_cpp='$CXXCPP $CPPFLAGS'
49421ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49422ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49423ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49424
49425    OLD_CXXFLAGS="$CXXFLAGS"
49426    CXXFLAGS="$CXXFLAGS -lstdc++"
49427    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49428/* end confdefs.h.  */
49429
49430int
49431main ()
49432{
49433return 0;
49434  ;
49435  return 0;
49436}
49437_ACEOF
49438if ac_fn_cxx_try_link "$LINENO"; then :
49439  has_dynamic_libstdcxx=yes
49440else
49441  has_dynamic_libstdcxx=no
49442fi
49443rm -f core conftest.err conftest.$ac_objext \
49444    conftest$ac_exeext conftest.$ac_ext
49445    CXXFLAGS="$OLD_CXXFLAGS"
49446    ac_ext=cpp
49447ac_cpp='$CXXCPP $CPPFLAGS'
49448ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49449ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49450ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49451
49452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49453$as_echo "$has_dynamic_libstdcxx" >&6; }
49454
49455    # Test if stdc++ can be linked statically.
49456    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49457$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49458    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49459    ac_ext=cpp
49460ac_cpp='$CXXCPP $CPPFLAGS'
49461ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49462ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49463ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49464
49465    OLD_LIBS="$LIBS"
49466    OLD_CXX="$CXX"
49467    LIBS="$STATIC_STDCXX_FLAGS"
49468    CXX="$CC"
49469    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49470/* end confdefs.h.  */
49471
49472int
49473main ()
49474{
49475return 0;
49476  ;
49477  return 0;
49478}
49479_ACEOF
49480if ac_fn_cxx_try_link "$LINENO"; then :
49481  has_static_libstdcxx=yes
49482else
49483  has_static_libstdcxx=no
49484fi
49485rm -f core conftest.err conftest.$ac_objext \
49486    conftest$ac_exeext conftest.$ac_ext
49487    LIBS="$OLD_LIBS"
49488    CXX="$OLD_CXX"
49489    ac_ext=cpp
49490ac_cpp='$CXXCPP $CPPFLAGS'
49491ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49492ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49493ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49494
49495    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49496$as_echo "$has_static_libstdcxx" >&6; }
49497
49498    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49499      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49500    fi
49501
49502    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49503      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49504    fi
49505
49506    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49507      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49508    fi
49509
49510    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49511$as_echo_n "checking how to link with libstdc++... " >&6; }
49512    # If dynamic was requested, it's available since it would fail above otherwise.
49513    # If dynamic wasn't requested, go with static unless it isn't available.
49514    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49515      LIBCXX="$LIBCXX -lstdc++"
49516      LDCXX="$CXX"
49517      STATIC_CXX_SETTING="STATIC_CXX=false"
49518      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49519$as_echo "dynamic" >&6; }
49520    else
49521      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49522      LDCXX="$CC"
49523      STATIC_CXX_SETTING="STATIC_CXX=true"
49524      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49525$as_echo "static" >&6; }
49526    fi
49527  fi
49528
49529
49530  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49531    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49532
49533pkg_failed=no
49534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49535$as_echo_n "checking for LIBFFI... " >&6; }
49536
49537if test -n "$LIBFFI_CFLAGS"; then
49538    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49539 elif test -n "$PKG_CONFIG"; then
49540    if test -n "$PKG_CONFIG" && \
49541    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49542  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49543  ac_status=$?
49544  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49545  test $ac_status = 0; }; then
49546  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49547else
49548  pkg_failed=yes
49549fi
49550 else
49551    pkg_failed=untried
49552fi
49553if test -n "$LIBFFI_LIBS"; then
49554    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49555 elif test -n "$PKG_CONFIG"; then
49556    if test -n "$PKG_CONFIG" && \
49557    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49558  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49559  ac_status=$?
49560  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49561  test $ac_status = 0; }; then
49562  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49563else
49564  pkg_failed=yes
49565fi
49566 else
49567    pkg_failed=untried
49568fi
49569
49570
49571
49572if test $pkg_failed = yes; then
49573
49574if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49575        _pkg_short_errors_supported=yes
49576else
49577        _pkg_short_errors_supported=no
49578fi
49579        if test $_pkg_short_errors_supported = yes; then
49580	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49581        else
49582	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49583        fi
49584	# Put the nasty error message in config.log where it belongs
49585	echo "$LIBFFI_PKG_ERRORS" >&5
49586
49587	as_fn_error $? "Package requirements (libffi) were not met:
49588
49589$LIBFFI_PKG_ERRORS
49590
49591Consider adjusting the PKG_CONFIG_PATH environment variable if you
49592installed software in a non-standard prefix.
49593
49594Alternatively, you may set the environment variables LIBFFI_CFLAGS
49595and LIBFFI_LIBS to avoid the need to call pkg-config.
49596See the pkg-config man page for more details.
49597" "$LINENO" 5
49598elif test $pkg_failed = untried; then
49599	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49600$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49601as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49602is in your PATH or set the PKG_CONFIG environment variable to the full
49603path to pkg-config.
49604
49605Alternatively, you may set the environment variables LIBFFI_CFLAGS
49606and LIBFFI_LIBS to avoid the need to call pkg-config.
49607See the pkg-config man page for more details.
49608
49609To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49610See \`config.log' for more details" "$LINENO" 5; }
49611else
49612	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49613	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49614        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49615$as_echo "yes" >&6; }
49616	:
49617fi
49618
49619  fi
49620
49621  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49622    # Extract the first word of "llvm-config", so it can be a program name with args.
49623set dummy llvm-config; ac_word=$2
49624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49625$as_echo_n "checking for $ac_word... " >&6; }
49626if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49627  $as_echo_n "(cached) " >&6
49628else
49629  if test -n "$LLVM_CONFIG"; then
49630  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49631else
49632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49633for as_dir in $PATH
49634do
49635  IFS=$as_save_IFS
49636  test -z "$as_dir" && as_dir=.
49637    for ac_exec_ext in '' $ac_executable_extensions; do
49638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49639    ac_cv_prog_LLVM_CONFIG="llvm-config"
49640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49641    break 2
49642  fi
49643done
49644  done
49645IFS=$as_save_IFS
49646
49647fi
49648fi
49649LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49650if test -n "$LLVM_CONFIG"; then
49651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49652$as_echo "$LLVM_CONFIG" >&6; }
49653else
49654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49655$as_echo "no" >&6; }
49656fi
49657
49658
49659
49660    if test "x$LLVM_CONFIG" != xllvm-config; then
49661      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49662    fi
49663
49664    llvm_components="jit mcjit engine nativecodegen native"
49665    unset LLVM_CFLAGS
49666    for flag in $("$LLVM_CONFIG" --cxxflags); do
49667      if echo "${flag}" | grep -q '^-[ID]'; then
49668        if test "${flag}" != "-D_DEBUG" ; then
49669          if test "${LLVM_CFLAGS}" != "" ; then
49670            LLVM_CFLAGS="${LLVM_CFLAGS} "
49671          fi
49672          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49673        fi
49674      fi
49675    done
49676    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49677    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49678
49679    unset LLVM_LDFLAGS
49680    for flag in $("${LLVM_CONFIG}" --ldflags); do
49681      if echo "${flag}" | grep -q '^-L'; then
49682        if test "${LLVM_LDFLAGS}" != ""; then
49683          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49684        fi
49685        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49686      fi
49687    done
49688
49689    unset LLVM_LIBS
49690    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49691      if echo "${flag}" | grep -q '^-l'; then
49692        if test "${LLVM_LIBS}" != ""; then
49693          LLVM_LIBS="${LLVM_LIBS} "
49694        fi
49695        LLVM_LIBS="${LLVM_LIBS}${flag}"
49696      fi
49697    done
49698
49699
49700
49701
49702  fi
49703
49704  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49705  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49706    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49707  fi
49708
49709  # TODO better (platform agnostic) test
49710  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49711    LIBCXX="-lstdc++"
49712  fi
49713
49714
49715
49716
49717  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49718
49719
49720# Check whether --with-msvcr-dll was given.
49721if test "${with_msvcr_dll+set}" = set; then :
49722  withval=$with_msvcr_dll;
49723fi
49724
49725
49726  if test "x$with_msvcr_dll" != x; then
49727    # If given explicitely by user, do not probe. If not present, fail directly.
49728
49729  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
49730  METHOD="--with-msvcr-dll"
49731  if test -e "$POSSIBLE_MSVCR_DLL"; then
49732    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49733$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49734
49735    # Need to check if the found msvcr is correct architecture
49736    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49737$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49738    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49739    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49740      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49741      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49742      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49743        CORRECT_MSVCR_ARCH="PE32 executable"
49744      else
49745        CORRECT_MSVCR_ARCH="PE32+ executable"
49746      fi
49747    else
49748      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49749        CORRECT_MSVCR_ARCH=386
49750      else
49751        CORRECT_MSVCR_ARCH=x86-64
49752      fi
49753    fi
49754    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49755      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49756$as_echo "ok" >&6; }
49757      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49758      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49759$as_echo_n "checking for msvcr100.dll... " >&6; }
49760      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49761$as_echo "$MSVCR_DLL" >&6; }
49762    else
49763      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49764$as_echo "incorrect, ignoring" >&6; }
49765      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49766$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49767    fi
49768  fi
49769
49770    if test "x$MSVCR_DLL" = x; then
49771      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
49772    fi
49773  fi
49774
49775  if test "x$MSVCR_DLL" = x; then
49776    # Probe: Using well-known location from Visual Studio 10.0
49777    if test "x$VCINSTALLDIR" != x; then
49778      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49779
49780  windows_path="$CYGWIN_VC_INSTALL_DIR"
49781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49782    unix_path=`$CYGPATH -u "$windows_path"`
49783    CYGWIN_VC_INSTALL_DIR="$unix_path"
49784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49786    CYGWIN_VC_INSTALL_DIR="$unix_path"
49787  fi
49788
49789      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49790        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
49791      else
49792        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
49793      fi
49794
49795  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49796  METHOD="well-known location in VCINSTALLDIR"
49797  if test -e "$POSSIBLE_MSVCR_DLL"; then
49798    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49799$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49800
49801    # Need to check if the found msvcr is correct architecture
49802    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49803$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49804    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49805    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49806      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49807      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49808      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49809        CORRECT_MSVCR_ARCH="PE32 executable"
49810      else
49811        CORRECT_MSVCR_ARCH="PE32+ executable"
49812      fi
49813    else
49814      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49815        CORRECT_MSVCR_ARCH=386
49816      else
49817        CORRECT_MSVCR_ARCH=x86-64
49818      fi
49819    fi
49820    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49821      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49822$as_echo "ok" >&6; }
49823      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49824      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49825$as_echo_n "checking for msvcr100.dll... " >&6; }
49826      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49827$as_echo "$MSVCR_DLL" >&6; }
49828    else
49829      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49830$as_echo "incorrect, ignoring" >&6; }
49831      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49832$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49833    fi
49834  fi
49835
49836    fi
49837  fi
49838
49839  if test "x$MSVCR_DLL" = x; then
49840    # Probe: Check in the Boot JDK directory.
49841    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
49842
49843  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49844  METHOD="well-known location in Boot JDK"
49845  if test -e "$POSSIBLE_MSVCR_DLL"; then
49846    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49847$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49848
49849    # Need to check if the found msvcr is correct architecture
49850    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49851$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49852    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49853    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49854      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49855      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49856      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49857        CORRECT_MSVCR_ARCH="PE32 executable"
49858      else
49859        CORRECT_MSVCR_ARCH="PE32+ executable"
49860      fi
49861    else
49862      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49863        CORRECT_MSVCR_ARCH=386
49864      else
49865        CORRECT_MSVCR_ARCH=x86-64
49866      fi
49867    fi
49868    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49869      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49870$as_echo "ok" >&6; }
49871      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49872      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49873$as_echo_n "checking for msvcr100.dll... " >&6; }
49874      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49875$as_echo "$MSVCR_DLL" >&6; }
49876    else
49877      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49878$as_echo "incorrect, ignoring" >&6; }
49879      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49880$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49881    fi
49882  fi
49883
49884  fi
49885
49886  if test "x$MSVCR_DLL" = x; then
49887    # Probe: Look in the Windows system32 directory
49888    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49889
49890  windows_path="$CYGWIN_SYSTEMROOT"
49891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49892    unix_path=`$CYGPATH -u "$windows_path"`
49893    CYGWIN_SYSTEMROOT="$unix_path"
49894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49896    CYGWIN_SYSTEMROOT="$unix_path"
49897  fi
49898
49899    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
49900
49901  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49902  METHOD="well-known location in SYSTEMROOT"
49903  if test -e "$POSSIBLE_MSVCR_DLL"; then
49904    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49905$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49906
49907    # Need to check if the found msvcr is correct architecture
49908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49909$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49910    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49911    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49912      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49913      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49914      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49915        CORRECT_MSVCR_ARCH="PE32 executable"
49916      else
49917        CORRECT_MSVCR_ARCH="PE32+ executable"
49918      fi
49919    else
49920      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49921        CORRECT_MSVCR_ARCH=386
49922      else
49923        CORRECT_MSVCR_ARCH=x86-64
49924      fi
49925    fi
49926    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49927      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49928$as_echo "ok" >&6; }
49929      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49930      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49931$as_echo_n "checking for msvcr100.dll... " >&6; }
49932      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49933$as_echo "$MSVCR_DLL" >&6; }
49934    else
49935      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49936$as_echo "incorrect, ignoring" >&6; }
49937      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49938$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49939    fi
49940  fi
49941
49942  fi
49943
49944  if test "x$MSVCR_DLL" = x; then
49945    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49946    if test "x$VS100COMNTOOLS" != x; then
49947      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49948
49949  windows_path="$CYGWIN_VS_TOOLS_DIR"
49950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49951    unix_path=`$CYGPATH -u "$windows_path"`
49952    CYGWIN_VS_TOOLS_DIR="$unix_path"
49953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49955    CYGWIN_VS_TOOLS_DIR="$unix_path"
49956  fi
49957
49958      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49959        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
49960      else
49961        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
49962      fi
49963
49964  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49965  METHOD="search of VS100COMNTOOLS"
49966  if test -e "$POSSIBLE_MSVCR_DLL"; then
49967    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49968$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49969
49970    # Need to check if the found msvcr is correct architecture
49971    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49972$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49973    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49974    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49975      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49976      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49977      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49978        CORRECT_MSVCR_ARCH="PE32 executable"
49979      else
49980        CORRECT_MSVCR_ARCH="PE32+ executable"
49981      fi
49982    else
49983      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49984        CORRECT_MSVCR_ARCH=386
49985      else
49986        CORRECT_MSVCR_ARCH=x86-64
49987      fi
49988    fi
49989    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49990      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49991$as_echo "ok" >&6; }
49992      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49993      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49994$as_echo_n "checking for msvcr100.dll... " >&6; }
49995      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49996$as_echo "$MSVCR_DLL" >&6; }
49997    else
49998      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49999$as_echo "incorrect, ignoring" >&6; }
50000      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
50001$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
50002    fi
50003  fi
50004
50005    fi
50006  fi
50007
50008  if test "x$MSVCR_DLL" = x; then
50009    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50010    # (This was the original behaviour; kept since it might turn up something)
50011    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50012      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50013        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
50014      else
50015        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50016        if test "x$POSSIBLE_MSVCR_DLL" = x; then
50017          # We're grasping at straws now...
50018          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
50019        fi
50020      fi
50021
50022
50023  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
50024  METHOD="search of VCINSTALLDIR"
50025  if test -e "$POSSIBLE_MSVCR_DLL"; then
50026    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
50027$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
50028
50029    # Need to check if the found msvcr is correct architecture
50030    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
50031$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
50032    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
50033    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50034      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50035      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50036      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50037        CORRECT_MSVCR_ARCH="PE32 executable"
50038      else
50039        CORRECT_MSVCR_ARCH="PE32+ executable"
50040      fi
50041    else
50042      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50043        CORRECT_MSVCR_ARCH=386
50044      else
50045        CORRECT_MSVCR_ARCH=x86-64
50046      fi
50047    fi
50048    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50049      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50050$as_echo "ok" >&6; }
50051      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
50052      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
50053$as_echo_n "checking for msvcr100.dll... " >&6; }
50054      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
50055$as_echo "$MSVCR_DLL" >&6; }
50056    else
50057      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50058$as_echo "incorrect, ignoring" >&6; }
50059      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
50060$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
50061    fi
50062  fi
50063
50064    fi
50065  fi
50066
50067  if test "x$MSVCR_DLL" = x; then
50068    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
50069$as_echo_n "checking for msvcr100.dll... " >&6; }
50070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50071$as_echo "no" >&6; }
50072    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
50073  fi
50074
50075
50076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50077
50078  # Input might be given as Windows format, start by converting to
50079  # unix format.
50080  path="$MSVCR_DLL"
50081  new_path=`$CYGPATH -u "$path"`
50082
50083  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50084  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50085  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50086  # "foo.exe" is OK but "foo" is an error.
50087  #
50088  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50089  # It is also a way to make sure we got the proper file name for the real test later on.
50090  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50091  if test "x$test_shortpath" = x; then
50092    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50093$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50094    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
50095  fi
50096
50097  # Call helper function which possibly converts this using DOS-style short mode.
50098  # If so, the updated path is stored in $new_path.
50099
50100  input_path="$new_path"
50101  # Check if we need to convert this using DOS-style short mode. If the path
50102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50103  # take no chances and rewrite it.
50104  # Note: m4 eats our [], so we need to use [ and ] instead.
50105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50106  if test "x$has_forbidden_chars" != x; then
50107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50111      # Going to short mode and back again did indeed matter. Since short mode is
50112      # case insensitive, let's make it lowercase to improve readability.
50113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50114      # Now convert it back to Unix-stile (cygpath)
50115      input_path=`$CYGPATH -u "$shortmode_path"`
50116      new_path="$input_path"
50117    fi
50118  fi
50119
50120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50121  if test "x$test_cygdrive_prefix" = x; then
50122    # As a simple fix, exclude /usr/bin since it's not a real path.
50123    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50125      # a path prefixed by /cygdrive for fixpath to work.
50126      new_path="$CYGWIN_ROOT_PATH$input_path"
50127    fi
50128  fi
50129
50130
50131  if test "x$path" != "x$new_path"; then
50132    MSVCR_DLL="$new_path"
50133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50134$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50135  fi
50136
50137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50138
50139  path="$MSVCR_DLL"
50140  has_colon=`$ECHO $path | $GREP ^.:`
50141  new_path="$path"
50142  if test "x$has_colon" = x; then
50143    # Not in mixed or Windows style, start by that.
50144    new_path=`cmd //c echo $path`
50145  fi
50146
50147
50148  input_path="$new_path"
50149  # Check if we need to convert this using DOS-style short mode. If the path
50150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50151  # take no chances and rewrite it.
50152  # Note: m4 eats our [], so we need to use [ and ] instead.
50153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50154  if test "x$has_forbidden_chars" != x; then
50155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50156    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50157  fi
50158
50159
50160  windows_path="$new_path"
50161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50162    unix_path=`$CYGPATH -u "$windows_path"`
50163    new_path="$unix_path"
50164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50166    new_path="$unix_path"
50167  fi
50168
50169  if test "x$path" != "x$new_path"; then
50170    MSVCR_DLL="$new_path"
50171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50172$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50173  fi
50174
50175  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50176  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50177
50178  else
50179    # We're on a unix platform. Hooray! :)
50180    path="$MSVCR_DLL"
50181    has_space=`$ECHO "$path" | $GREP " "`
50182    if test "x$has_space" != x; then
50183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50184$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50185      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50186    fi
50187
50188    # Use eval to expand a potential ~
50189    eval path="$path"
50190    if test ! -f "$path" && test ! -d "$path"; then
50191      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50192    fi
50193
50194    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
50195  fi
50196
50197
50198
50199
50200# Check whether --with-dxsdk was given.
50201if test "${with_dxsdk+set}" = set; then :
50202  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
50203$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
50204fi
50205
50206
50207
50208
50209# Check whether --with-dxsdk-lib was given.
50210if test "${with_dxsdk_lib+set}" = set; then :
50211  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
50212$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
50213fi
50214
50215
50216
50217
50218# Check whether --with-dxsdk-include was given.
50219if test "${with_dxsdk_include+set}" = set; then :
50220  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
50221$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
50222fi
50223
50224
50225  fi
50226
50227
50228
50229###############################################################################
50230#
50231# We need to do some final tweaking, when everything else is done.
50232#
50233###############################################################################
50234
50235
50236  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
50237
50238
50239  # The name of the Service Agent jar.
50240  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
50241  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50242    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
50243  fi
50244
50245
50246
50247    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
50248$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
50249
50250    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
50251      ENABLE_INTREE_EC=yes
50252      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50253$as_echo "yes" >&6; }
50254    else
50255      ENABLE_INTREE_EC=no
50256      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50257$as_echo "no" >&6; }
50258    fi
50259
50260
50261
50262
50263###############################################################################
50264#
50265# Configure parts of the build that only affect the build performance,
50266# not the result.
50267#
50268###############################################################################
50269
50270
50271  # How many cores do we have on this build system?
50272
50273# Check whether --with-num-cores was given.
50274if test "${with_num_cores+set}" = set; then :
50275  withval=$with_num_cores;
50276fi
50277
50278  if test "x$with_num_cores" = x; then
50279    # The number of cores were not specified, try to probe them.
50280
50281  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
50282$as_echo_n "checking for number of cores... " >&6; }
50283  NUM_CORES=1
50284  FOUND_CORES=no
50285
50286  if test -f /proc/cpuinfo; then
50287    # Looks like a Linux (or cygwin) system
50288    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
50289    FOUND_CORES=yes
50290  elif test -x /usr/sbin/psrinfo; then
50291    # Looks like a Solaris system
50292    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
50293    FOUND_CORES=yes
50294  elif test -x /usr/sbin/system_profiler; then
50295    # Looks like a MacOSX system
50296    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
50297    FOUND_CORES=yes
50298  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
50299    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
50300    FOUND_CORES=yes
50301  elif test -n "$NUMBER_OF_PROCESSORS"; then
50302    # On windows, look in the env
50303    NUM_CORES=$NUMBER_OF_PROCESSORS
50304    FOUND_CORES=yes
50305  fi
50306
50307  if test "x$FOUND_CORES" = xyes; then
50308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
50309$as_echo "$NUM_CORES" >&6; }
50310  else
50311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
50312$as_echo "could not detect number of cores, defaulting to 1" >&6; }
50313    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
50314$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
50315  fi
50316
50317  else
50318    NUM_CORES=$with_num_cores
50319  fi
50320
50321
50322
50323  # How much memory do we have on this build system?
50324
50325# Check whether --with-memory-size was given.
50326if test "${with_memory_size+set}" = set; then :
50327  withval=$with_memory_size;
50328fi
50329
50330  if test "x$with_memory_size" = x; then
50331    # The memory size was not specified, try to probe it.
50332
50333  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
50334$as_echo_n "checking for memory size... " >&6; }
50335  # Default to 1024 MB
50336  MEMORY_SIZE=1024
50337  FOUND_MEM=no
50338
50339  if test -f /proc/meminfo; then
50340    # Looks like a Linux (or cygwin) system
50341    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
50342    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
50343    FOUND_MEM=yes
50344  elif test -x /usr/sbin/prtconf; then
50345    # Looks like a Solaris or AIX system
50346    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
50347    FOUND_MEM=yes
50348  elif test -x /usr/sbin/system_profiler; then
50349    # Looks like a MacOSX system
50350    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
50351    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
50352    FOUND_MEM=yes
50353  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50354    # Windows, but without cygwin
50355    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
50356    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
50357    FOUND_MEM=yes
50358  fi
50359
50360  if test "x$FOUND_MEM" = xyes; then
50361    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
50362$as_echo "$MEMORY_SIZE MB" >&6; }
50363  else
50364    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
50365$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
50366    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
50367$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
50368  fi
50369
50370  else
50371    MEMORY_SIZE=$with_memory_size
50372  fi
50373
50374
50375
50376  # Provide a decent default number of parallel jobs for make depending on
50377  # number of cores, amount of memory and machine architecture.
50378
50379# Check whether --with-jobs was given.
50380if test "${with_jobs+set}" = set; then :
50381  withval=$with_jobs;
50382fi
50383
50384  if test "x$with_jobs" = x; then
50385    # Number of jobs was not specified, calculate.
50386    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
50387$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
50388    # Approximate memory in GB.
50389    memory_gb=`expr $MEMORY_SIZE / 1024`
50390    # Pick the lowest of memory in gb and number of cores.
50391    if test "$memory_gb" -lt "$NUM_CORES"; then
50392      JOBS="$memory_gb"
50393    else
50394      JOBS="$NUM_CORES"
50395      # On bigger machines, leave some room for other processes to run
50396      if test "$JOBS" -gt "4"; then
50397        JOBS=`expr $JOBS '*' 90 / 100`
50398      fi
50399    fi
50400    # Cap number of jobs to 16
50401    if test "$JOBS" -gt "16"; then
50402      JOBS=16
50403    fi
50404    if test "$JOBS" -eq "0"; then
50405      JOBS=1
50406    fi
50407    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
50408$as_echo "$JOBS" >&6; }
50409  else
50410    JOBS=$with_jobs
50411  fi
50412
50413
50414
50415# Setup arguments for the boot jdk (after cores and memory have been setup)
50416
50417  ##############################################################################
50418  #
50419  # Specify jvm options for anything that is run with the Boot JDK.
50420  # Not all JVM:s accept the same arguments on the command line.
50421  #
50422
50423# Check whether --with-boot-jdk-jvmargs was given.
50424if test "${with_boot_jdk_jvmargs+set}" = set; then :
50425  withval=$with_boot_jdk_jvmargs;
50426fi
50427
50428
50429  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
50430$as_echo_n "checking flags for boot jdk java command ... " >&6; }
50431
50432  # Disable special log output when a debug build is used as Boot JDK...
50433
50434  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
50435  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
50436  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
50437  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50438  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50439  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50440    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
50441    JVM_ARG_OK=true
50442  else
50443    $ECHO "Arg failed:" >&5
50444    $ECHO "$OUTPUT" >&5
50445    JVM_ARG_OK=false
50446  fi
50447
50448
50449  # Apply user provided options.
50450
50451  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
50452  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
50453  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
50454  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50455  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50456  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50457    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
50458    JVM_ARG_OK=true
50459  else
50460    $ECHO "Arg failed:" >&5
50461    $ECHO "$OUTPUT" >&5
50462    JVM_ARG_OK=false
50463  fi
50464
50465
50466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
50467$as_echo "$boot_jdk_jvmargs" >&6; }
50468
50469  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
50470  JAVA_FLAGS=$boot_jdk_jvmargs
50471
50472
50473
50474  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
50475$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
50476
50477  # Starting amount of heap memory.
50478
50479  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
50480  $ECHO "Command: $JAVA -Xms64M -version" >&5
50481  OUTPUT=`$JAVA -Xms64M -version 2>&1`
50482  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50483  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50484  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50485    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
50486    JVM_ARG_OK=true
50487  else
50488    $ECHO "Arg failed:" >&5
50489    $ECHO "$OUTPUT" >&5
50490    JVM_ARG_OK=false
50491  fi
50492
50493
50494  # Maximum amount of heap memory.
50495  # Maximum stack size.
50496  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
50497  if test "x$BUILD_NUM_BITS" = x32; then
50498    if test "$JVM_MAX_HEAP" -gt "1100"; then
50499      JVM_MAX_HEAP=1100
50500    elif test "$JVM_MAX_HEAP" -lt "512"; then
50501      JVM_MAX_HEAP=512
50502    fi
50503    STACK_SIZE=768
50504  else
50505    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
50506    # pointers are used. Apparently, we need to increase the heap and stack
50507    # space for the jvm. More specifically, when running javac to build huge
50508    # jdk batch
50509    if test "$JVM_MAX_HEAP" -gt "1600"; then
50510      JVM_MAX_HEAP=1600
50511    elif test "$JVM_MAX_HEAP" -lt "512"; then
50512      JVM_MAX_HEAP=512
50513    fi
50514    STACK_SIZE=1536
50515  fi
50516
50517  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
50518  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
50519  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
50520  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50521  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50522  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50523    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
50524    JVM_ARG_OK=true
50525  else
50526    $ECHO "Arg failed:" >&5
50527    $ECHO "$OUTPUT" >&5
50528    JVM_ARG_OK=false
50529  fi
50530
50531
50532  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
50533  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
50534  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
50535  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50536  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50537  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50538    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
50539    JVM_ARG_OK=true
50540  else
50541    $ECHO "Arg failed:" >&5
50542    $ECHO "$OUTPUT" >&5
50543    JVM_ARG_OK=false
50544  fi
50545
50546
50547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
50548$as_echo "$boot_jdk_jvmargs_big" >&6; }
50549
50550  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
50551
50552
50553
50554  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
50555$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
50556
50557  # Use serial gc for small short lived tools if possible
50558
50559  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
50560  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
50561  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
50562  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50563  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50564  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50565    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
50566    JVM_ARG_OK=true
50567  else
50568    $ECHO "Arg failed:" >&5
50569    $ECHO "$OUTPUT" >&5
50570    JVM_ARG_OK=false
50571  fi
50572
50573
50574  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
50575  $ECHO "Command: $JAVA -Xms32M -version" >&5
50576  OUTPUT=`$JAVA -Xms32M -version 2>&1`
50577  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50578  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50579  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50580    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
50581    JVM_ARG_OK=true
50582  else
50583    $ECHO "Arg failed:" >&5
50584    $ECHO "$OUTPUT" >&5
50585    JVM_ARG_OK=false
50586  fi
50587
50588
50589  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
50590  $ECHO "Command: $JAVA -Xmx512M -version" >&5
50591  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
50592  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50593  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50594  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50595    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
50596    JVM_ARG_OK=true
50597  else
50598    $ECHO "Arg failed:" >&5
50599    $ECHO "$OUTPUT" >&5
50600    JVM_ARG_OK=false
50601  fi
50602
50603
50604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
50605$as_echo "$boot_jdk_jvmargs_small" >&6; }
50606
50607  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
50608
50609
50610  JAVA_TOOL_FLAGS_SMALL=""
50611  for f in $JAVA_FLAGS_SMALL; do
50612    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
50613  done
50614
50615
50616
50617# Setup smart javac (after cores and memory have been setup)
50618
50619
50620# Check whether --with-sjavac-server-java was given.
50621if test "${with_sjavac_server_java+set}" = set; then :
50622  withval=$with_sjavac_server_java;
50623fi
50624
50625
50626  if test "x$with_sjavac_server_java" != x; then
50627    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
50628    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
50629    if test "x$FOUND_VERSION" = x; then
50630      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
50631    fi
50632  else
50633    SJAVAC_SERVER_JAVA="$JAVA"
50634  fi
50635
50636
50637  if test "$MEMORY_SIZE" -gt "3000"; then
50638
50639  $ECHO "Check if jvm arg is ok: -d64" >&5
50640  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
50641  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
50642  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50643  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50644  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50645    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
50646    JVM_ARG_OK=true
50647  else
50648    $ECHO "Arg failed:" >&5
50649    $ECHO "$OUTPUT" >&5
50650    JVM_ARG_OK=false
50651  fi
50652
50653    if test "$JVM_ARG_OK" = true; then
50654      JVM_64BIT=true
50655      JVM_ARG_OK=false
50656    fi
50657  fi
50658
50659  MX_VALUE=`expr $MEMORY_SIZE / 2`
50660  if test "$JVM_64BIT" = true; then
50661    # Set ms lower than mx since more than one instance of the server might
50662    # get launched at the same time before they figure out which instance won.
50663    MS_VALUE=512
50664    if test "$MX_VALUE" -gt "2048"; then
50665      MX_VALUE=2048
50666    fi
50667  else
50668    MS_VALUE=256
50669    if test "$MX_VALUE" -gt "1500"; then
50670      MX_VALUE=1500
50671    fi
50672  fi
50673  if test "$MX_VALUE" -lt "512"; then
50674    MX_VALUE=512
50675  fi
50676
50677  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
50678  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
50679  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
50680  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50681  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50682  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50683    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
50684    JVM_ARG_OK=true
50685  else
50686    $ECHO "Arg failed:" >&5
50687    $ECHO "$OUTPUT" >&5
50688    JVM_ARG_OK=false
50689  fi
50690
50691
50692
50693  # Check whether --enable-sjavac was given.
50694if test "${enable_sjavac+set}" = set; then :
50695  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
50696else
50697  ENABLE_SJAVAC='no'
50698fi
50699
50700  if test "x$JVM_ARG_OK" = "xfalse"; then
50701    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
50702$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
50703    ENABLE_SJAVAC=no;
50704  fi
50705  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
50706$as_echo_n "checking whether to use sjavac... " >&6; }
50707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
50708$as_echo "$ENABLE_SJAVAC" >&6; }
50709
50710
50711  if test "x$ENABLE_SJAVAC" = xyes; then
50712    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
50713  else
50714    SJAVAC_SERVER_DIR=
50715  fi
50716
50717
50718
50719# Can the C/C++ compiler use precompiled headers?
50720
50721
50722  ###############################################################################
50723  #
50724  # Can the C/C++ compiler use precompiled headers?
50725  #
50726  # Check whether --enable-precompiled-headers was given.
50727if test "${enable_precompiled_headers+set}" = set; then :
50728  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
50729else
50730  ENABLE_PRECOMPH=yes
50731fi
50732
50733
50734  USE_PRECOMPILED_HEADER=1
50735  if test "x$ENABLE_PRECOMPH" = xno; then
50736    USE_PRECOMPILED_HEADER=0
50737  fi
50738
50739  if test "x$ENABLE_PRECOMPH" = xyes; then
50740    # Check that the compiler actually supports precomp headers.
50741    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50742      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
50743$as_echo_n "checking that precompiled headers work... " >&6; }
50744      echo "int alfa();" > conftest.h
50745      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
50746      if test ! -f conftest.hpp.gch; then
50747        USE_PRECOMPILED_HEADER=0
50748        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50749$as_echo "no" >&6; }
50750      else
50751        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50752$as_echo "yes" >&6; }
50753      fi
50754      rm -f conftest.h conftest.hpp.gch
50755    fi
50756  fi
50757
50758
50759
50760
50761# Setup use of ccache, if available
50762
50763  # Check whether --enable-ccache was given.
50764if test "${enable_ccache+set}" = set; then :
50765  enableval=$enable_ccache;
50766fi
50767
50768
50769  CCACHE=
50770  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
50771$as_echo_n "checking is ccache enabled... " >&6; }
50772  ENABLE_CCACHE=$enable_ccache
50773  if test "x$enable_ccache" = xyes; then
50774    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50775$as_echo "yes" >&6; }
50776    OLD_PATH="$PATH"
50777    if test "x$TOOLCHAIN_PATH" != x; then
50778      PATH=$TOOLCHAIN_PATH:$PATH
50779    fi
50780
50781
50782
50783  # Publish this variable in the help.
50784
50785
50786  if test "x$CCACHE" = x; then
50787    # The variable is not set by user, try to locate tool using the code snippet
50788    for ac_prog in ccache
50789do
50790  # Extract the first word of "$ac_prog", so it can be a program name with args.
50791set dummy $ac_prog; ac_word=$2
50792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50793$as_echo_n "checking for $ac_word... " >&6; }
50794if ${ac_cv_path_CCACHE+:} false; then :
50795  $as_echo_n "(cached) " >&6
50796else
50797  case $CCACHE in
50798  [\\/]* | ?:[\\/]*)
50799  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50800  ;;
50801  *)
50802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50803for as_dir in $PATH
50804do
50805  IFS=$as_save_IFS
50806  test -z "$as_dir" && as_dir=.
50807    for ac_exec_ext in '' $ac_executable_extensions; do
50808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50809    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50811    break 2
50812  fi
50813done
50814  done
50815IFS=$as_save_IFS
50816
50817  ;;
50818esac
50819fi
50820CCACHE=$ac_cv_path_CCACHE
50821if test -n "$CCACHE"; then
50822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50823$as_echo "$CCACHE" >&6; }
50824else
50825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50826$as_echo "no" >&6; }
50827fi
50828
50829
50830  test -n "$CCACHE" && break
50831done
50832
50833  else
50834    # The variable is set, but is it from the command line or the environment?
50835
50836    # Try to remove the string !CCACHE! from our list.
50837    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
50838    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
50839      # If it failed, the variable was not from the command line. Ignore it,
50840      # but warn the user (except for BASH, which is always set by the calling BASH).
50841      if test "xCCACHE" != xBASH; then
50842        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
50843$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
50844      fi
50845      # Try to locate tool using the code snippet
50846      for ac_prog in ccache
50847do
50848  # Extract the first word of "$ac_prog", so it can be a program name with args.
50849set dummy $ac_prog; ac_word=$2
50850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50851$as_echo_n "checking for $ac_word... " >&6; }
50852if ${ac_cv_path_CCACHE+:} false; then :
50853  $as_echo_n "(cached) " >&6
50854else
50855  case $CCACHE in
50856  [\\/]* | ?:[\\/]*)
50857  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50858  ;;
50859  *)
50860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50861for as_dir in $PATH
50862do
50863  IFS=$as_save_IFS
50864  test -z "$as_dir" && as_dir=.
50865    for ac_exec_ext in '' $ac_executable_extensions; do
50866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50867    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50869    break 2
50870  fi
50871done
50872  done
50873IFS=$as_save_IFS
50874
50875  ;;
50876esac
50877fi
50878CCACHE=$ac_cv_path_CCACHE
50879if test -n "$CCACHE"; then
50880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50881$as_echo "$CCACHE" >&6; }
50882else
50883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50884$as_echo "no" >&6; }
50885fi
50886
50887
50888  test -n "$CCACHE" && break
50889done
50890
50891    else
50892      # If it succeeded, then it was overridden by the user. We will use it
50893      # for the tool.
50894
50895      # First remove it from the list of overridden variables, so we can test
50896      # for unknown variables in the end.
50897      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
50898
50899      # Check if the provided tool contains a complete path.
50900      tool_specified="$CCACHE"
50901      tool_basename="${tool_specified##*/}"
50902      if test "x$tool_basename" = "x$tool_specified"; then
50903        # A command without a complete path is provided, search $PATH.
50904        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
50905$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
50906        # Extract the first word of "$tool_basename", so it can be a program name with args.
50907set dummy $tool_basename; ac_word=$2
50908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50909$as_echo_n "checking for $ac_word... " >&6; }
50910if ${ac_cv_path_CCACHE+:} false; then :
50911  $as_echo_n "(cached) " >&6
50912else
50913  case $CCACHE in
50914  [\\/]* | ?:[\\/]*)
50915  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50916  ;;
50917  *)
50918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50919for as_dir in $PATH
50920do
50921  IFS=$as_save_IFS
50922  test -z "$as_dir" && as_dir=.
50923    for ac_exec_ext in '' $ac_executable_extensions; do
50924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50925    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50927    break 2
50928  fi
50929done
50930  done
50931IFS=$as_save_IFS
50932
50933  ;;
50934esac
50935fi
50936CCACHE=$ac_cv_path_CCACHE
50937if test -n "$CCACHE"; then
50938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50939$as_echo "$CCACHE" >&6; }
50940else
50941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50942$as_echo "no" >&6; }
50943fi
50944
50945
50946        if test "x$CCACHE" = x; then
50947          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
50948        fi
50949      else
50950        # Otherwise we believe it is a complete path. Use it as it is.
50951        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
50952$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
50953        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
50954$as_echo_n "checking for CCACHE... " >&6; }
50955        if test ! -x "$tool_specified"; then
50956          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
50957$as_echo "not found" >&6; }
50958          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
50959        fi
50960        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
50961$as_echo "$tool_specified" >&6; }
50962      fi
50963    fi
50964  fi
50965
50966
50967
50968  if test "x$CCACHE" = x; then
50969    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
50970  fi
50971
50972
50973    CCACHE_STATUS="enabled"
50974    PATH="$OLD_PATH"
50975  elif test "x$enable_ccache" = xno; then
50976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
50977$as_echo "no, explicitly disabled" >&6; }
50978  elif test "x$enable_ccache" = x; then
50979    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50980$as_echo "no" >&6; }
50981  else
50982    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
50983$as_echo "unknown" >&6; }
50984    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
50985  fi
50986
50987
50988
50989# Check whether --with-ccache-dir was given.
50990if test "${with_ccache_dir+set}" = set; then :
50991  withval=$with_ccache_dir;
50992fi
50993
50994
50995  if test "x$with_ccache_dir" != x; then
50996    # When using a non home ccache directory, assume the use is to share ccache files
50997    # with other users. Thus change the umask.
50998    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
50999    if test "x$CCACHE" = x; then
51000      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
51001$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
51002    fi
51003  fi
51004
51005  if test "x$CCACHE" != x; then
51006
51007  if test "x$CCACHE" != x; then
51008    # Only use ccache if it is 3.1.4 or later, which supports
51009    # precompiled headers.
51010    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
51011$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
51012    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
51013    if test "x$HAS_GOOD_CCACHE" = x; then
51014      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
51015$as_echo "no, disabling ccache" >&6; }
51016      CCACHE=
51017      CCACHE_STATUS="disabled"
51018    else
51019      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51020$as_echo "yes" >&6; }
51021      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
51022$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
51023      PUSHED_FLAGS="$CXXFLAGS"
51024      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
51025      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51026/* end confdefs.h.  */
51027
51028int
51029main ()
51030{
51031
51032  ;
51033  return 0;
51034}
51035_ACEOF
51036if ac_fn_cxx_try_compile "$LINENO"; then :
51037  CC_KNOWS_CCACHE_TRICK=yes
51038else
51039  CC_KNOWS_CCACHE_TRICK=no
51040fi
51041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51042      CXXFLAGS="$PUSHED_FLAGS"
51043      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
51044        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51045$as_echo "yes" >&6; }
51046      else
51047        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
51048$as_echo "no, disabling ccaching of precompiled headers" >&6; }
51049        CCACHE=
51050        CCACHE_STATUS="disabled"
51051      fi
51052    fi
51053  fi
51054
51055  if test "x$CCACHE" != x; then
51056    CCACHE_SLOPPINESS=time_macros
51057    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
51058    CCACHE_FLAGS=-fpch-preprocess
51059
51060    if test "x$SET_CCACHE_DIR" != x; then
51061      mkdir -p $CCACHE_DIR > /dev/null 2>&1
51062      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
51063    fi
51064  fi
51065
51066  fi
51067
51068
51069###############################################################################
51070#
51071# And now the finish...
51072#
51073###############################################################################
51074
51075# Check for some common pitfalls
51076
51077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51078    file_to_test="$SRC_ROOT/LICENSE"
51079    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
51080      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
51081    fi
51082  fi
51083
51084
51085  # Did user specify any unknown variables?
51086
51087  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
51088    # Replace the separating ! with spaces before presenting for end user.
51089    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
51090    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
51091$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
51092  fi
51093
51094
51095  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
51096$as_echo_n "checking if build directory is on local disk... " >&6; }
51097
51098  # df -l lists only local disks; if the given directory is not found then
51099  # a non-zero exit code is given
51100  if test "x$DF" = x; then
51101    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51102      # msys does not have df; use Windows "net use" instead.
51103      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
51104      if test "x$IS_NETWORK_DISK" = x; then
51105        OUTPUT_DIR_IS_LOCAL="yes"
51106      else
51107        OUTPUT_DIR_IS_LOCAL="no"
51108      fi
51109    else
51110      # No df here, say it's local
51111      OUTPUT_DIR_IS_LOCAL="yes"
51112    fi
51113  else
51114    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
51115      OUTPUT_DIR_IS_LOCAL="yes"
51116    else
51117      OUTPUT_DIR_IS_LOCAL="no"
51118    fi
51119  fi
51120
51121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
51122$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
51123
51124
51125
51126  # Check if the user has any old-style ALT_ variables set.
51127  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
51128
51129  # Before generating output files, test if they exist. If they do, this is a reconfigure.
51130  # Since we can't properly handle the dependencies for this, warn the user about the situation
51131  if test -e $OUTPUT_ROOT/spec.gmk; then
51132    IS_RECONFIGURE=yes
51133  else
51134    IS_RECONFIGURE=no
51135  fi
51136
51137
51138# At the end, call the custom hook. (Dummy macro if no custom sources available)
51139
51140
51141# We're messing a bit with internal autoconf variables to put the config.status
51142# in the output directory instead of the current directory.
51143CONFIG_STATUS="$OUTPUT_ROOT/config.status"
51144
51145# Create the actual output files. Now the main work of configure is done.
51146cat >confcache <<\_ACEOF
51147# This file is a shell script that caches the results of configure
51148# tests run on this system so they can be shared between configure
51149# scripts and configure runs, see configure's option --config-cache.
51150# It is not useful on other systems.  If it contains results you don't
51151# want to keep, you may remove or edit it.
51152#
51153# config.status only pays attention to the cache file if you give it
51154# the --recheck option to rerun configure.
51155#
51156# `ac_cv_env_foo' variables (set or unset) will be overridden when
51157# loading this file, other *unset* `ac_cv_foo' will be assigned the
51158# following values.
51159
51160_ACEOF
51161
51162# The following way of writing the cache mishandles newlines in values,
51163# but we know of no workaround that is simple, portable, and efficient.
51164# So, we kill variables containing newlines.
51165# Ultrix sh set writes to stderr and can't be redirected directly,
51166# and sets the high bit in the cache file unless we assign to the vars.
51167(
51168  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
51169    eval ac_val=\$$ac_var
51170    case $ac_val in #(
51171    *${as_nl}*)
51172      case $ac_var in #(
51173      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
51174$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
51175      esac
51176      case $ac_var in #(
51177      _ | IFS | as_nl) ;; #(
51178      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
51179      *) { eval $ac_var=; unset $ac_var;} ;;
51180      esac ;;
51181    esac
51182  done
51183
51184  (set) 2>&1 |
51185    case $as_nl`(ac_space=' '; set) 2>&1` in #(
51186    *${as_nl}ac_space=\ *)
51187      # `set' does not quote correctly, so add quotes: double-quote
51188      # substitution turns \\\\ into \\, and sed turns \\ into \.
51189      sed -n \
51190	"s/'/'\\\\''/g;
51191	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
51192      ;; #(
51193    *)
51194      # `set' quotes correctly as required by POSIX, so do not add quotes.
51195      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
51196      ;;
51197    esac |
51198    sort
51199) |
51200  sed '
51201     /^ac_cv_env_/b end
51202     t clear
51203     :clear
51204     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
51205     t end
51206     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
51207     :end' >>confcache
51208if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
51209  if test -w "$cache_file"; then
51210    if test "x$cache_file" != "x/dev/null"; then
51211      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
51212$as_echo "$as_me: updating cache $cache_file" >&6;}
51213      if test ! -f "$cache_file" || test -h "$cache_file"; then
51214	cat confcache >"$cache_file"
51215      else
51216        case $cache_file in #(
51217        */* | ?:*)
51218	  mv -f confcache "$cache_file"$$ &&
51219	  mv -f "$cache_file"$$ "$cache_file" ;; #(
51220        *)
51221	  mv -f confcache "$cache_file" ;;
51222	esac
51223      fi
51224    fi
51225  else
51226    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
51227$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
51228  fi
51229fi
51230rm -f confcache
51231
51232test "x$prefix" = xNONE && prefix=$ac_default_prefix
51233# Let make expand exec_prefix.
51234test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
51235
51236# Transform confdefs.h into DEFS.
51237# Protect against shell expansion while executing Makefile rules.
51238# Protect against Makefile macro expansion.
51239#
51240# If the first sed substitution is executed (which looks for macros that
51241# take arguments), then branch to the quote section.  Otherwise,
51242# look for a macro that doesn't take arguments.
51243ac_script='
51244:mline
51245/\\$/{
51246 N
51247 s,\\\n,,
51248 b mline
51249}
51250t clear
51251:clear
51252s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
51253t quote
51254s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
51255t quote
51256b any
51257:quote
51258s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
51259s/\[/\\&/g
51260s/\]/\\&/g
51261s/\$/$$/g
51262H
51263:any
51264${
51265	g
51266	s/^\n//
51267	s/\n/ /g
51268	p
51269}
51270'
51271DEFS=`sed -n "$ac_script" confdefs.h`
51272
51273
51274ac_libobjs=
51275ac_ltlibobjs=
51276U=
51277for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
51278  # 1. Remove the extension, and $U if already installed.
51279  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
51280  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
51281  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
51282  #    will be set to the directory where LIBOBJS objects are built.
51283  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
51284  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
51285done
51286LIBOBJS=$ac_libobjs
51287
51288LTLIBOBJS=$ac_ltlibobjs
51289
51290
51291
51292: "${CONFIG_STATUS=./config.status}"
51293ac_write_fail=0
51294ac_clean_files_save=$ac_clean_files
51295ac_clean_files="$ac_clean_files $CONFIG_STATUS"
51296{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
51297$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
51298as_write_fail=0
51299cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
51300#! $SHELL
51301# Generated by $as_me.
51302# Run this file to recreate the current configuration.
51303# Compiler output produced by configure, useful for debugging
51304# configure, is in config.log if it exists.
51305
51306debug=false
51307ac_cs_recheck=false
51308ac_cs_silent=false
51309
51310SHELL=\${CONFIG_SHELL-$SHELL}
51311export SHELL
51312_ASEOF
51313cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
51314## -------------------- ##
51315## M4sh Initialization. ##
51316## -------------------- ##
51317
51318# Be more Bourne compatible
51319DUALCASE=1; export DUALCASE # for MKS sh
51320if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
51321  emulate sh
51322  NULLCMD=:
51323  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
51324  # is contrary to our usage.  Disable this feature.
51325  alias -g '${1+"$@"}'='"$@"'
51326  setopt NO_GLOB_SUBST
51327else
51328  case `(set -o) 2>/dev/null` in #(
51329  *posix*) :
51330    set -o posix ;; #(
51331  *) :
51332     ;;
51333esac
51334fi
51335
51336
51337as_nl='
51338'
51339export as_nl
51340# Printing a long string crashes Solaris 7 /usr/bin/printf.
51341as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
51342as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
51343as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
51344# Prefer a ksh shell builtin over an external printf program on Solaris,
51345# but without wasting forks for bash or zsh.
51346if test -z "$BASH_VERSION$ZSH_VERSION" \
51347    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
51348  as_echo='print -r --'
51349  as_echo_n='print -rn --'
51350elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51351  as_echo='printf %s\n'
51352  as_echo_n='printf %s'
51353else
51354  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
51355    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
51356    as_echo_n='/usr/ucb/echo -n'
51357  else
51358    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
51359    as_echo_n_body='eval
51360      arg=$1;
51361      case $arg in #(
51362      *"$as_nl"*)
51363	expr "X$arg" : "X\\(.*\\)$as_nl";
51364	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
51365      esac;
51366      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
51367    '
51368    export as_echo_n_body
51369    as_echo_n='sh -c $as_echo_n_body as_echo'
51370  fi
51371  export as_echo_body
51372  as_echo='sh -c $as_echo_body as_echo'
51373fi
51374
51375# The user is always right.
51376if test "${PATH_SEPARATOR+set}" != set; then
51377  PATH_SEPARATOR=:
51378  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
51379    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
51380      PATH_SEPARATOR=';'
51381  }
51382fi
51383
51384
51385# IFS
51386# We need space, tab and new line, in precisely that order.  Quoting is
51387# there to prevent editors from complaining about space-tab.
51388# (If _AS_PATH_WALK were called with IFS unset, it would disable word
51389# splitting by setting IFS to empty value.)
51390IFS=" ""	$as_nl"
51391
51392# Find who we are.  Look in the path if we contain no directory separator.
51393as_myself=
51394case $0 in #((
51395  *[\\/]* ) as_myself=$0 ;;
51396  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51397for as_dir in $PATH
51398do
51399  IFS=$as_save_IFS
51400  test -z "$as_dir" && as_dir=.
51401    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
51402  done
51403IFS=$as_save_IFS
51404
51405     ;;
51406esac
51407# We did not find ourselves, most probably we were run as `sh COMMAND'
51408# in which case we are not to be found in the path.
51409if test "x$as_myself" = x; then
51410  as_myself=$0
51411fi
51412if test ! -f "$as_myself"; then
51413  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
51414  exit 1
51415fi
51416
51417# Unset variables that we do not need and which cause bugs (e.g. in
51418# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
51419# suppresses any "Segmentation fault" message there.  '((' could
51420# trigger a bug in pdksh 5.2.14.
51421for as_var in BASH_ENV ENV MAIL MAILPATH
51422do eval test x\${$as_var+set} = xset \
51423  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
51424done
51425PS1='$ '
51426PS2='> '
51427PS4='+ '
51428
51429# NLS nuisances.
51430LC_ALL=C
51431export LC_ALL
51432LANGUAGE=C
51433export LANGUAGE
51434
51435# CDPATH.
51436(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
51437
51438
51439# as_fn_error STATUS ERROR [LINENO LOG_FD]
51440# ----------------------------------------
51441# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
51442# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
51443# script with STATUS, using 1 if that was 0.
51444as_fn_error ()
51445{
51446  as_status=$1; test $as_status -eq 0 && as_status=1
51447  if test "$4"; then
51448    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
51449    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
51450  fi
51451  $as_echo "$as_me: error: $2" >&2
51452  as_fn_exit $as_status
51453} # as_fn_error
51454
51455
51456# as_fn_set_status STATUS
51457# -----------------------
51458# Set $? to STATUS, without forking.
51459as_fn_set_status ()
51460{
51461  return $1
51462} # as_fn_set_status
51463
51464# as_fn_exit STATUS
51465# -----------------
51466# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
51467as_fn_exit ()
51468{
51469  set +e
51470  as_fn_set_status $1
51471  exit $1
51472} # as_fn_exit
51473
51474# as_fn_unset VAR
51475# ---------------
51476# Portably unset VAR.
51477as_fn_unset ()
51478{
51479  { eval $1=; unset $1;}
51480}
51481as_unset=as_fn_unset
51482# as_fn_append VAR VALUE
51483# ----------------------
51484# Append the text in VALUE to the end of the definition contained in VAR. Take
51485# advantage of any shell optimizations that allow amortized linear growth over
51486# repeated appends, instead of the typical quadratic growth present in naive
51487# implementations.
51488if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
51489  eval 'as_fn_append ()
51490  {
51491    eval $1+=\$2
51492  }'
51493else
51494  as_fn_append ()
51495  {
51496    eval $1=\$$1\$2
51497  }
51498fi # as_fn_append
51499
51500# as_fn_arith ARG...
51501# ------------------
51502# Perform arithmetic evaluation on the ARGs, and store the result in the
51503# global $as_val. Take advantage of shells that can avoid forks. The arguments
51504# must be portable across $(()) and expr.
51505if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
51506  eval 'as_fn_arith ()
51507  {
51508    as_val=$(( $* ))
51509  }'
51510else
51511  as_fn_arith ()
51512  {
51513    as_val=`expr "$@" || test $? -eq 1`
51514  }
51515fi # as_fn_arith
51516
51517
51518if expr a : '\(a\)' >/dev/null 2>&1 &&
51519   test "X`expr 00001 : '.*\(...\)'`" = X001; then
51520  as_expr=expr
51521else
51522  as_expr=false
51523fi
51524
51525if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
51526  as_basename=basename
51527else
51528  as_basename=false
51529fi
51530
51531if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
51532  as_dirname=dirname
51533else
51534  as_dirname=false
51535fi
51536
51537as_me=`$as_basename -- "$0" ||
51538$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
51539	 X"$0" : 'X\(//\)$' \| \
51540	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
51541$as_echo X/"$0" |
51542    sed '/^.*\/\([^/][^/]*\)\/*$/{
51543	    s//\1/
51544	    q
51545	  }
51546	  /^X\/\(\/\/\)$/{
51547	    s//\1/
51548	    q
51549	  }
51550	  /^X\/\(\/\).*/{
51551	    s//\1/
51552	    q
51553	  }
51554	  s/.*/./; q'`
51555
51556# Avoid depending upon Character Ranges.
51557as_cr_letters='abcdefghijklmnopqrstuvwxyz'
51558as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
51559as_cr_Letters=$as_cr_letters$as_cr_LETTERS
51560as_cr_digits='0123456789'
51561as_cr_alnum=$as_cr_Letters$as_cr_digits
51562
51563ECHO_C= ECHO_N= ECHO_T=
51564case `echo -n x` in #(((((
51565-n*)
51566  case `echo 'xy\c'` in
51567  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
51568  xy)  ECHO_C='\c';;
51569  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
51570       ECHO_T='	';;
51571  esac;;
51572*)
51573  ECHO_N='-n';;
51574esac
51575
51576rm -f conf$$ conf$$.exe conf$$.file
51577if test -d conf$$.dir; then
51578  rm -f conf$$.dir/conf$$.file
51579else
51580  rm -f conf$$.dir
51581  mkdir conf$$.dir 2>/dev/null
51582fi
51583if (echo >conf$$.file) 2>/dev/null; then
51584  if ln -s conf$$.file conf$$ 2>/dev/null; then
51585    as_ln_s='ln -s'
51586    # ... but there are two gotchas:
51587    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
51588    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
51589    # In both cases, we have to default to `cp -pR'.
51590    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
51591      as_ln_s='cp -pR'
51592  elif ln conf$$.file conf$$ 2>/dev/null; then
51593    as_ln_s=ln
51594  else
51595    as_ln_s='cp -pR'
51596  fi
51597else
51598  as_ln_s='cp -pR'
51599fi
51600rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
51601rmdir conf$$.dir 2>/dev/null
51602
51603
51604# as_fn_mkdir_p
51605# -------------
51606# Create "$as_dir" as a directory, including parents if necessary.
51607as_fn_mkdir_p ()
51608{
51609
51610  case $as_dir in #(
51611  -*) as_dir=./$as_dir;;
51612  esac
51613  test -d "$as_dir" || eval $as_mkdir_p || {
51614    as_dirs=
51615    while :; do
51616      case $as_dir in #(
51617      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
51618      *) as_qdir=$as_dir;;
51619      esac
51620      as_dirs="'$as_qdir' $as_dirs"
51621      as_dir=`$as_dirname -- "$as_dir" ||
51622$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51623	 X"$as_dir" : 'X\(//\)[^/]' \| \
51624	 X"$as_dir" : 'X\(//\)$' \| \
51625	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
51626$as_echo X"$as_dir" |
51627    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51628	    s//\1/
51629	    q
51630	  }
51631	  /^X\(\/\/\)[^/].*/{
51632	    s//\1/
51633	    q
51634	  }
51635	  /^X\(\/\/\)$/{
51636	    s//\1/
51637	    q
51638	  }
51639	  /^X\(\/\).*/{
51640	    s//\1/
51641	    q
51642	  }
51643	  s/.*/./; q'`
51644      test -d "$as_dir" && break
51645    done
51646    test -z "$as_dirs" || eval "mkdir $as_dirs"
51647  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
51648
51649
51650} # as_fn_mkdir_p
51651if mkdir -p . 2>/dev/null; then
51652  as_mkdir_p='mkdir -p "$as_dir"'
51653else
51654  test -d ./-p && rmdir ./-p
51655  as_mkdir_p=false
51656fi
51657
51658
51659# as_fn_executable_p FILE
51660# -----------------------
51661# Test if FILE is an executable regular file.
51662as_fn_executable_p ()
51663{
51664  test -f "$1" && test -x "$1"
51665} # as_fn_executable_p
51666as_test_x='test -x'
51667as_executable_p=as_fn_executable_p
51668
51669# Sed expression to map a string onto a valid CPP name.
51670as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
51671
51672# Sed expression to map a string onto a valid variable name.
51673as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
51674
51675
51676exec 6>&1
51677## ----------------------------------- ##
51678## Main body of $CONFIG_STATUS script. ##
51679## ----------------------------------- ##
51680_ASEOF
51681test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
51682
51683cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51684# Save the log message, to keep $0 and so on meaningful, and to
51685# report actual input values of CONFIG_FILES etc. instead of their
51686# values after options handling.
51687ac_log="
51688This file was extended by OpenJDK $as_me jdk9, which was
51689generated by GNU Autoconf 2.69.  Invocation command line was
51690
51691  CONFIG_FILES    = $CONFIG_FILES
51692  CONFIG_HEADERS  = $CONFIG_HEADERS
51693  CONFIG_LINKS    = $CONFIG_LINKS
51694  CONFIG_COMMANDS = $CONFIG_COMMANDS
51695  $ $0 $@
51696
51697on `(hostname || uname -n) 2>/dev/null | sed 1q`
51698"
51699
51700_ACEOF
51701
51702case $ac_config_files in *"
51703"*) set x $ac_config_files; shift; ac_config_files=$*;;
51704esac
51705
51706
51707
51708cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51709# Files that config.status was made for.
51710config_files="$ac_config_files"
51711
51712_ACEOF
51713
51714cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51715ac_cs_usage="\
51716\`$as_me' instantiates files and other configuration actions
51717from templates according to the current configuration.  Unless the files
51718and actions are specified as TAGs, all are instantiated by default.
51719
51720Usage: $0 [OPTION]... [TAG]...
51721
51722  -h, --help       print this help, then exit
51723  -V, --version    print version number and configuration settings, then exit
51724      --config     print configuration, then exit
51725  -q, --quiet, --silent
51726                   do not print progress messages
51727  -d, --debug      don't remove temporary files
51728      --recheck    update $as_me by reconfiguring in the same conditions
51729      --file=FILE[:TEMPLATE]
51730                   instantiate the configuration file FILE
51731
51732Configuration files:
51733$config_files
51734
51735Report bugs to <build-dev@openjdk.java.net>.
51736OpenJDK home page: <http://openjdk.java.net>."
51737
51738_ACEOF
51739cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51740ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
51741ac_cs_version="\\
51742OpenJDK config.status jdk9
51743configured by $0, generated by GNU Autoconf 2.69,
51744  with options \\"\$ac_cs_config\\"
51745
51746Copyright (C) 2012 Free Software Foundation, Inc.
51747This config.status script is free software; the Free Software Foundation
51748gives unlimited permission to copy, distribute and modify it."
51749
51750ac_pwd='$ac_pwd'
51751srcdir='$srcdir'
51752AWK='$AWK'
51753test -n "\$AWK" || AWK=awk
51754_ACEOF
51755
51756cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51757# The default lists apply if the user does not specify any file.
51758ac_need_defaults=:
51759while test $# != 0
51760do
51761  case $1 in
51762  --*=?*)
51763    ac_option=`expr "X$1" : 'X\([^=]*\)='`
51764    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
51765    ac_shift=:
51766    ;;
51767  --*=)
51768    ac_option=`expr "X$1" : 'X\([^=]*\)='`
51769    ac_optarg=
51770    ac_shift=:
51771    ;;
51772  *)
51773    ac_option=$1
51774    ac_optarg=$2
51775    ac_shift=shift
51776    ;;
51777  esac
51778
51779  case $ac_option in
51780  # Handling of the options.
51781  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
51782    ac_cs_recheck=: ;;
51783  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
51784    $as_echo "$ac_cs_version"; exit ;;
51785  --config | --confi | --conf | --con | --co | --c )
51786    $as_echo "$ac_cs_config"; exit ;;
51787  --debug | --debu | --deb | --de | --d | -d )
51788    debug=: ;;
51789  --file | --fil | --fi | --f )
51790    $ac_shift
51791    case $ac_optarg in
51792    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
51793    '') as_fn_error $? "missing file argument" ;;
51794    esac
51795    as_fn_append CONFIG_FILES " '$ac_optarg'"
51796    ac_need_defaults=false;;
51797  --he | --h |  --help | --hel | -h )
51798    $as_echo "$ac_cs_usage"; exit ;;
51799  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
51800  | -silent | --silent | --silen | --sile | --sil | --si | --s)
51801    ac_cs_silent=: ;;
51802
51803  # This is an error.
51804  -*) as_fn_error $? "unrecognized option: \`$1'
51805Try \`$0 --help' for more information." ;;
51806
51807  *) as_fn_append ac_config_targets " $1"
51808     ac_need_defaults=false ;;
51809
51810  esac
51811  shift
51812done
51813
51814ac_configure_extra_args=
51815
51816if $ac_cs_silent; then
51817  exec 6>/dev/null
51818  ac_configure_extra_args="$ac_configure_extra_args --silent"
51819fi
51820
51821_ACEOF
51822cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51823if \$ac_cs_recheck; then
51824  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
51825  shift
51826  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
51827  CONFIG_SHELL='$SHELL'
51828  export CONFIG_SHELL
51829  exec "\$@"
51830fi
51831
51832_ACEOF
51833cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51834exec 5>>config.log
51835{
51836  echo
51837  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
51838## Running $as_me. ##
51839_ASBOX
51840  $as_echo "$ac_log"
51841} >&5
51842
51843_ACEOF
51844cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51845_ACEOF
51846
51847cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51848
51849# Handling of arguments.
51850for ac_config_target in $ac_config_targets
51851do
51852  case $ac_config_target in
51853    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
51854    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
51855    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
51856    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
51857    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
51858
51859  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
51860  esac
51861done
51862
51863
51864# If the user did not use the arguments to specify the items to instantiate,
51865# then the envvar interface is used.  Set only those that are not.
51866# We use the long form for the default assignment because of an extremely
51867# bizarre bug on SunOS 4.1.3.
51868if $ac_need_defaults; then
51869  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
51870fi
51871
51872# Have a temporary directory for convenience.  Make it in the build tree
51873# simply because there is no reason against having it here, and in addition,
51874# creating and moving files from /tmp can sometimes cause problems.
51875# Hook for its removal unless debugging.
51876# Note that there is a small window in which the directory will not be cleaned:
51877# after its creation but before its name has been assigned to `$tmp'.
51878$debug ||
51879{
51880  tmp= ac_tmp=
51881  trap 'exit_status=$?
51882  : "${ac_tmp:=$tmp}"
51883  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
51884' 0
51885  trap 'as_fn_exit 1' 1 2 13 15
51886}
51887# Create a (secure) tmp directory for tmp files.
51888
51889{
51890  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
51891  test -d "$tmp"
51892}  ||
51893{
51894  tmp=./conf$$-$RANDOM
51895  (umask 077 && mkdir "$tmp")
51896} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
51897ac_tmp=$tmp
51898
51899# Set up the scripts for CONFIG_FILES section.
51900# No need to generate them if there are no CONFIG_FILES.
51901# This happens for instance with `./config.status config.h'.
51902if test -n "$CONFIG_FILES"; then
51903
51904
51905ac_cr=`echo X | tr X '\015'`
51906# On cygwin, bash can eat \r inside `` if the user requested igncr.
51907# But we know of no other shell where ac_cr would be empty at this
51908# point, so we can use a bashism as a fallback.
51909if test "x$ac_cr" = x; then
51910  eval ac_cr=\$\'\\r\'
51911fi
51912ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
51913if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
51914  ac_cs_awk_cr='\\r'
51915else
51916  ac_cs_awk_cr=$ac_cr
51917fi
51918
51919echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
51920_ACEOF
51921
51922
51923{
51924  echo "cat >conf$$subs.awk <<_ACEOF" &&
51925  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
51926  echo "_ACEOF"
51927} >conf$$subs.sh ||
51928  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51929ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
51930ac_delim='%!_!# '
51931for ac_last_try in false false false false false :; do
51932  . ./conf$$subs.sh ||
51933    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51934
51935  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
51936  if test $ac_delim_n = $ac_delim_num; then
51937    break
51938  elif $ac_last_try; then
51939    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51940  else
51941    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
51942  fi
51943done
51944rm -f conf$$subs.sh
51945
51946cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51947cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
51948_ACEOF
51949sed -n '
51950h
51951s/^/S["/; s/!.*/"]=/
51952p
51953g
51954s/^[^!]*!//
51955:repl
51956t repl
51957s/'"$ac_delim"'$//
51958t delim
51959:nl
51960h
51961s/\(.\{148\}\)..*/\1/
51962t more1
51963s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
51964p
51965n
51966b repl
51967:more1
51968s/["\\]/\\&/g; s/^/"/; s/$/"\\/
51969p
51970g
51971s/.\{148\}//
51972t nl
51973:delim
51974h
51975s/\(.\{148\}\)..*/\1/
51976t more2
51977s/["\\]/\\&/g; s/^/"/; s/$/"/
51978p
51979b
51980:more2
51981s/["\\]/\\&/g; s/^/"/; s/$/"\\/
51982p
51983g
51984s/.\{148\}//
51985t delim
51986' <conf$$subs.awk | sed '
51987/^[^""]/{
51988  N
51989  s/\n//
51990}
51991' >>$CONFIG_STATUS || ac_write_fail=1
51992rm -f conf$$subs.awk
51993cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51994_ACAWK
51995cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
51996  for (key in S) S_is_set[key] = 1
51997  FS = ""
51998
51999}
52000{
52001  line = $ 0
52002  nfields = split(line, field, "@")
52003  substed = 0
52004  len = length(field[1])
52005  for (i = 2; i < nfields; i++) {
52006    key = field[i]
52007    keylen = length(key)
52008    if (S_is_set[key]) {
52009      value = S[key]
52010      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
52011      len += length(value) + length(field[++i])
52012      substed = 1
52013    } else
52014      len += 1 + keylen
52015  }
52016
52017  print line
52018}
52019
52020_ACAWK
52021_ACEOF
52022cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52023if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
52024  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
52025else
52026  cat
52027fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
52028  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
52029_ACEOF
52030
52031# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
52032# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
52033# trailing colons and then remove the whole line if VPATH becomes empty
52034# (actually we leave an empty line to preserve line numbers).
52035if test "x$srcdir" = x.; then
52036  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
52037h
52038s///
52039s/^/:/
52040s/[	 ]*$/:/
52041s/:\$(srcdir):/:/g
52042s/:\${srcdir}:/:/g
52043s/:@srcdir@:/:/g
52044s/^:*//
52045s/:*$//
52046x
52047s/\(=[	 ]*\).*/\1/
52048G
52049s/\n//
52050s/^[^=]*=[	 ]*$//
52051}'
52052fi
52053
52054cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52055fi # test -n "$CONFIG_FILES"
52056
52057
52058eval set X "  :F $CONFIG_FILES      "
52059shift
52060for ac_tag
52061do
52062  case $ac_tag in
52063  :[FHLC]) ac_mode=$ac_tag; continue;;
52064  esac
52065  case $ac_mode$ac_tag in
52066  :[FHL]*:*);;
52067  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
52068  :[FH]-) ac_tag=-:-;;
52069  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
52070  esac
52071  ac_save_IFS=$IFS
52072  IFS=:
52073  set x $ac_tag
52074  IFS=$ac_save_IFS
52075  shift
52076  ac_file=$1
52077  shift
52078
52079  case $ac_mode in
52080  :L) ac_source=$1;;
52081  :[FH])
52082    ac_file_inputs=
52083    for ac_f
52084    do
52085      case $ac_f in
52086      -) ac_f="$ac_tmp/stdin";;
52087      *) # Look for the file first in the build tree, then in the source tree
52088	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
52089	 # because $ac_f cannot contain `:'.
52090	 test -f "$ac_f" ||
52091	   case $ac_f in
52092	   [\\/$]*) false;;
52093	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
52094	   esac ||
52095	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
52096      esac
52097      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
52098      as_fn_append ac_file_inputs " '$ac_f'"
52099    done
52100
52101    # Let's still pretend it is `configure' which instantiates (i.e., don't
52102    # use $as_me), people would be surprised to read:
52103    #    /* config.h.  Generated by config.status.  */
52104    configure_input='Generated from '`
52105	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
52106	`' by configure.'
52107    if test x"$ac_file" != x-; then
52108      configure_input="$ac_file.  $configure_input"
52109      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
52110$as_echo "$as_me: creating $ac_file" >&6;}
52111    fi
52112    # Neutralize special characters interpreted by sed in replacement strings.
52113    case $configure_input in #(
52114    *\&* | *\|* | *\\* )
52115       ac_sed_conf_input=`$as_echo "$configure_input" |
52116       sed 's/[\\\\&|]/\\\\&/g'`;; #(
52117    *) ac_sed_conf_input=$configure_input;;
52118    esac
52119
52120    case $ac_tag in
52121    *:-:* | *:-) cat >"$ac_tmp/stdin" \
52122      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
52123    esac
52124    ;;
52125  esac
52126
52127  ac_dir=`$as_dirname -- "$ac_file" ||
52128$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52129	 X"$ac_file" : 'X\(//\)[^/]' \| \
52130	 X"$ac_file" : 'X\(//\)$' \| \
52131	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
52132$as_echo X"$ac_file" |
52133    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52134	    s//\1/
52135	    q
52136	  }
52137	  /^X\(\/\/\)[^/].*/{
52138	    s//\1/
52139	    q
52140	  }
52141	  /^X\(\/\/\)$/{
52142	    s//\1/
52143	    q
52144	  }
52145	  /^X\(\/\).*/{
52146	    s//\1/
52147	    q
52148	  }
52149	  s/.*/./; q'`
52150  as_dir="$ac_dir"; as_fn_mkdir_p
52151  ac_builddir=.
52152
52153case "$ac_dir" in
52154.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
52155*)
52156  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
52157  # A ".." for each directory in $ac_dir_suffix.
52158  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
52159  case $ac_top_builddir_sub in
52160  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
52161  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
52162  esac ;;
52163esac
52164ac_abs_top_builddir=$ac_pwd
52165ac_abs_builddir=$ac_pwd$ac_dir_suffix
52166# for backward compatibility:
52167ac_top_builddir=$ac_top_build_prefix
52168
52169case $srcdir in
52170  .)  # We are building in place.
52171    ac_srcdir=.
52172    ac_top_srcdir=$ac_top_builddir_sub
52173    ac_abs_top_srcdir=$ac_pwd ;;
52174  [\\/]* | ?:[\\/]* )  # Absolute name.
52175    ac_srcdir=$srcdir$ac_dir_suffix;
52176    ac_top_srcdir=$srcdir
52177    ac_abs_top_srcdir=$srcdir ;;
52178  *) # Relative name.
52179    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
52180    ac_top_srcdir=$ac_top_build_prefix$srcdir
52181    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
52182esac
52183ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
52184
52185
52186  case $ac_mode in
52187  :F)
52188  #
52189  # CONFIG_FILE
52190  #
52191
52192_ACEOF
52193
52194cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52195# If the template does not know about datarootdir, expand it.
52196# FIXME: This hack should be removed a few years after 2.60.
52197ac_datarootdir_hack=; ac_datarootdir_seen=
52198ac_sed_dataroot='
52199/datarootdir/ {
52200  p
52201  q
52202}
52203/@datadir@/p
52204/@docdir@/p
52205/@infodir@/p
52206/@localedir@/p
52207/@mandir@/p'
52208case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
52209*datarootdir*) ac_datarootdir_seen=yes;;
52210*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
52211  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
52212$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
52213_ACEOF
52214cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52215  ac_datarootdir_hack='
52216  s&@datadir@&$datadir&g
52217  s&@docdir@&$docdir&g
52218  s&@infodir@&$infodir&g
52219  s&@localedir@&$localedir&g
52220  s&@mandir@&$mandir&g
52221  s&\\\${datarootdir}&$datarootdir&g' ;;
52222esac
52223_ACEOF
52224
52225# Neutralize VPATH when `$srcdir' = `.'.
52226# Shell code in configure.ac might set extrasub.
52227# FIXME: do we really want to maintain this feature?
52228cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52229ac_sed_extra="$ac_vpsub
52230$extrasub
52231_ACEOF
52232cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52233:t
52234/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
52235s|@configure_input@|$ac_sed_conf_input|;t t
52236s&@top_builddir@&$ac_top_builddir_sub&;t t
52237s&@top_build_prefix@&$ac_top_build_prefix&;t t
52238s&@srcdir@&$ac_srcdir&;t t
52239s&@abs_srcdir@&$ac_abs_srcdir&;t t
52240s&@top_srcdir@&$ac_top_srcdir&;t t
52241s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
52242s&@builddir@&$ac_builddir&;t t
52243s&@abs_builddir@&$ac_abs_builddir&;t t
52244s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
52245$ac_datarootdir_hack
52246"
52247eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
52248  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52249
52250test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
52251  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
52252  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
52253      "$ac_tmp/out"`; test -z "$ac_out"; } &&
52254  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52255which seems to be undefined.  Please make sure it is defined" >&5
52256$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52257which seems to be undefined.  Please make sure it is defined" >&2;}
52258
52259  rm -f "$ac_tmp/stdin"
52260  case $ac_file in
52261  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
52262  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
52263  esac \
52264  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52265 ;;
52266
52267
52268
52269  esac
52270
52271done # for ac_tag
52272
52273
52274as_fn_exit 0
52275_ACEOF
52276ac_clean_files=$ac_clean_files_save
52277
52278test $ac_write_fail = 0 ||
52279  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
52280
52281
52282# configure is writing to config.log, and then calls config.status.
52283# config.status does its own redirection, appending to config.log.
52284# Unfortunately, on DOS this fails, as config.log is still kept open
52285# by configure, so config.status won't be able to write to it; its
52286# output is simply discarded.  So we exec the FD to /dev/null,
52287# effectively closing config.log, so it can be properly (re)opened and
52288# appended to by config.status.  When coming back to configure, we
52289# need to make the FD available again.
52290if test "$no_create" != yes; then
52291  ac_cs_success=:
52292  ac_config_status_args=
52293  test "$silent" = yes &&
52294    ac_config_status_args="$ac_config_status_args --quiet"
52295  exec 5>/dev/null
52296  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
52297  exec 5>>config.log
52298  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
52299  # would make configure fail if this is the last instruction.
52300  $ac_cs_success || as_fn_exit 1
52301fi
52302if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
52303  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
52304$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
52305fi
52306
52307
52308# Try to move the config.log file to the output directory.
52309if test -e ./config.log; then
52310  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
52311fi
52312
52313# Make the compare script executable
52314$CHMOD +x $OUTPUT_ROOT/compare.sh
52315
52316# Finally output some useful information to the user
52317
52318  # Finally output some useful information to the user
52319
52320  printf "\n"
52321  printf "====================================================\n"
52322  if test "x$no_create" != "xyes"; then
52323    if test "x$IS_RECONFIGURE" != "xyes"; then
52324      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
52325    else
52326      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
52327    fi
52328  else
52329    if test "x$IS_RECONFIGURE" != "xyes"; then
52330      printf "A configuration has been successfully checked but not created\n"
52331    else
52332      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
52333    fi
52334  fi
52335  if test "x$CONFIGURE_COMMAND_LINE" != x; then
52336    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
52337  else
52338    printf "using default settings.\n"
52339  fi
52340
52341  printf "\n"
52342  printf "Configuration summary:\n"
52343  printf "* Debug level:    $DEBUG_LEVEL\n"
52344  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
52345  printf "* JDK variant:    $JDK_VARIANT\n"
52346  printf "* JVM variants:   $with_jvm_variants\n"
52347  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
52348
52349  printf "\n"
52350  printf "Tools summary:\n"
52351  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
52352    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
52353  fi
52354  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
52355  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
52356  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
52357  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
52358
52359  printf "\n"
52360  printf "Build performance summary:\n"
52361  printf "* Cores to use:   $JOBS\n"
52362  printf "* Memory limit:   $MEMORY_SIZE MB\n"
52363  if test "x$CCACHE_STATUS" != "x"; then
52364    printf "* ccache status:  $CCACHE_STATUS\n"
52365  fi
52366  printf "\n"
52367
52368  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
52369    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
52370    printf "will result in longer build times.\n"
52371    printf "\n"
52372  fi
52373
52374  if test "x$FOUND_ALT_VARIABLES" != "x"; then
52375    printf "WARNING: You have old-style ALT_ environment variables set.\n"
52376    printf "These are not respected, and will be ignored. It is recommended\n"
52377    printf "that you clean your environment. The following variables are set:\n"
52378    printf "$FOUND_ALT_VARIABLES\n"
52379    printf "\n"
52380  fi
52381
52382  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
52383    printf "WARNING: Your build output directory is not on a local disk.\n"
52384    printf "This will severely degrade build performance!\n"
52385    printf "It is recommended that you create an output directory on a local disk,\n"
52386    printf "and run the configure script again from that directory.\n"
52387    printf "\n"
52388  fi
52389
52390  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
52391    printf "WARNING: The result of this configuration has overridden an older\n"
52392    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
52393    printf "proper build. Failure to do so might result in strange build problems.\n"
52394    printf "\n"
52395  fi
52396
52397  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
52398    printf "WARNING: The result of this configuration was not saved.\n"
52399    printf "You should run without '--no-create | -n' to create the configuration.\n"
52400    printf "\n"
52401  fi
52402
52403
52404
52405if test -e "$OUTPUT_ROOT/config.log"; then
52406  $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
52407  if test $? -eq 0; then
52408    printf "The following warnings were produced. Repeated here for convenience:\n"
52409    # We must quote sed expression (using []) to stop m4 from eating the [].
52410    $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e  's/^configure:[0-9]*: //'
52411    printf "\n"
52412  fi
52413fi
52414
52415
52416